-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Summary
The Operations page (/admin/operations) currently shows running tasks but provides no indication of progress. Users have no way to know if a long-running task is progressing or stuck.
Current Behaviour
- Operations page shows: Type, Name, Status, Created, Initiated By
- No progress information displayed
- Status only shows state (e.g., "Executing"), not progress
Desired Behaviour
Show real-time progress for running tasks:
- Progress bar showing percentage complete
- Current status message (e.g., "Imported 2450 objects (page 3)", "Reconciling pending exports")
- Objects processed / Objects to process count
Technical Context
Existing Infrastructure
The Activity model already tracks progress:
ObjectsToProcess- total count of objectsObjectsProcessed- current count processedCurrentMessage- status message updated during execution
These fields are already being updated during sync operations in SyncImportTaskProcessor:
// Line 106-107 in SyncImportTaskProcessor.cs
_activity.ObjectsProcessed = totalObjectsImported;
await _jim.Activities.UpdateActivityMessageAsync(_activity, $"Imported {totalObjectsImported} objects (page {pageNumber})");The Operations page already polls every 2 seconds for updates (line 164 in Operations.razor).
Implementation Steps
-
Update
WorkerTaskHeaderDTO (JIM.Models/Tasking/DTOs/WorkerTaskHeader.cs):public int? ObjectsToProcess { get; set; } public int? ObjectsProcessed { get; set; } public string? ProgressMessage { get; set; }
-
Update
GetWorkerTaskHeadersAsyncinTaskingServer.cs:- Join with Activity table to get progress fields
- Populate the new WorkerTaskHeader fields
-
Update Operations.razor:
- Add a "Progress" column or expand Status display
- Show
MudProgressLinearwhenObjectsToProcess > 0:@if (context.ObjectsToProcess > 0) { <MudProgressLinear Value="@((double)context.ObjectsProcessed / context.ObjectsToProcess * 100)" Color="Color.Primary" Rounded="true" Size="Size.Small" /> <MudText Typo="Typo.caption">@context.ObjectsProcessed / @context.ObjectsToProcess</MudText> }
- Show
ProgressMessagebelow status or in tooltip
-
Ensure progress updates propagate:
- The existing polling mechanism should pick up changes automatically
- Verify
UpdateActivityMessageAsynccommits changes so polling sees them
Files to Modify
JIM.Models/Tasking/DTOs/WorkerTaskHeader.cs- Add progress fieldsJIM.Application/Servers/TaskingServer.cs- Update query to include progressJIM.Web/Pages/Admin/Operations.razor- Display progress UI
UI Mock-up
| Type | Name | Status | Progress | Created | Initiated By |
|------|-------------------|------------|-----------------------------|---------|--------------|
| Sync | AD - Full Import | Executing | [========> ] 75% | 2 min | admin |
| | | | Reconciling pending exports | | |
Acceptance Criteria
- Progress bar visible for tasks with known total (ObjectsToProcess > 0)
- Indeterminate progress for tasks without known total
- Current status message displayed
- Progress updates in real-time (within 2-second polling interval)
- No progress shown for queued/completed tasks (only Executing)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request