feat(jobs): show what mass passes do now on the desktop, the server section and the admin panel
A running job now says what it does now: "Verifying photo 812 of 2,400 · Harbour sunset · sequence 3 of 41". A paused or failed job says where it stopped. The line appears in the Jobs table under the target, in the job bar (at most 60 characters, the item dropped first, the bar text also its tooltip), in the Archive's recent maintenance (refreshed at most twice a second), in the editor's server-job line and in the sync tooltip. Byte jobs now count sizes in the bar. While connected, the Server section lists the server's running and paused jobs, live through the jobs API and the jobProgress events. Pause, Resume and Cancel are offered only to an account that manages the archive, which is what the server requires to act on someone else's job; for any other account the list is read-only. The list hides while nothing runs, and the capture gains a server-jobs scene. The admin panel's Jobs page and dashboard show the same line under the target and update it with every progress event. The steps, parts and sub-steps are in English and Italian, and an unknown step shows its counts only. Refs #65 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ee9505df22
commit
b95bc997d5
36 files changed
+1895
-28
No files matched your search
@@ -44,7 +44,10 @@ public static class EditorText
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>"Render running on Studio NAS · 1,240 / 3,600 · 11.3 fps · 3 min left"; "Render waiting on Studio NAS".</summary>
|
||||
/// <summary>
|
||||
/// "Render running on Studio NAS · 1,240 / 3,600 · 11.3 fps · 3 min left"; with what the job does now in place of the
|
||||
/// counter ("… · Encoding frame 1,240 of 3,600 · 11.3 fps · 3 min left", owner review 5, #65); "Render waiting on Studio NAS".
|
||||
/// </summary>
|
||||
public static string ServerJobDetail(Job job, string server)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(job);
|
||||
@@ -55,7 +58,8 @@ public static class EditorText
|
||||
_ => "Tooltips.Editor.ServerJob",
|
||||
};
|
||||
var parts = new List<string> { Loc.L(key, JobText.Kind(job.Kind), server) };
|
||||
if (JobText.Counter(job.ProgressDone, job.ProgressTotal) is { Length: > 0 } counter) parts.Add(counter);
|
||||
if (job.State == JobState.Running && JobText.Status(job.Detail) is { Length: > 0 } status) parts.Add(status);
|
||||
else if (JobText.Counter(job.Kind, job.ProgressDone, job.ProgressTotal) is { Length: > 0 } counter) parts.Add(counter);
|
||||
if (JobText.Speed(job.Kind, job.ItemsPerSecond) is { Length: > 0 } speed) parts.Add(speed);
|
||||
if (job.Eta is { } eta) parts.Add(Loc.L("Editor.ServerJob.Left", Formatting.Duration(eta)));
|
||||
return string.Join(Separator, parts);
|
||||
|
||||
@@ -180,6 +180,8 @@ internal sealed class ServerJobs : IAsyncDisposable
|
||||
ProgressTotal = progress.Total,
|
||||
ItemsPerSecond = progress.ItemsPerSecond,
|
||||
Eta = JobEta.FromSeconds(progress.EtaSeconds),
|
||||
// What it does now (owner review 5, #65); an older server sends none, and the last one stays.
|
||||
Detail = JobWire.FromDto(progress.Detail) ?? job.Detail,
|
||||
});
|
||||
break;
|
||||
case JobProgressEvent:
|
||||
|
||||
Reference in new issue
Block a user