diff --git a/frontend/src/lib/components/FlowStatusViewerInner.svelte b/frontend/src/lib/components/FlowStatusViewerInner.svelte
index 4ae3aff676..0d7188ed7c 100644
--- a/frontend/src/lib/components/FlowStatusViewerInner.svelte
+++ b/frontend/src/lib/components/FlowStatusViewerInner.svelte
@@ -31,6 +31,7 @@
| {
moduleId: string
flowJobs: string[]
+ length: number
}
| undefined = undefined
export let job: Job | undefined = undefined
@@ -55,6 +56,15 @@
}
}
+ if (flowJobIds) {
+ $durationStatuses[flowJobIds?.moduleId ?? ''] = {
+ ...($durationStatuses[flowJobIds?.moduleId ?? ''] ?? {}),
+ iteration_from: Math.max(flowJobIds.flowJobs.length - 20, 0),
+ iteration_total: flowJobIds?.length,
+ byJob: {}
+ }
+ }
+
function updateForloop(len: number) {
forloop_selected = flowJobIds?.flowJobs[len - 1] ?? ''
lastSize = len
@@ -91,7 +101,6 @@
mod.type === FlowStatusModule.type.WAITING_FOR_EXECUTOR &&
$flowModuleStates[mod.id ?? '']?.scheduled_for == undefined
) {
- console.debug('updating', mod.job)
JobService.getJob({
workspace: workspaceId ?? $workspaceStore ?? '',
id: mod.job ?? ''
@@ -177,7 +186,7 @@
}
}
if ($durationStatuses[mod.id] == undefined) {
- $durationStatuses[mod.id] = {}
+ $durationStatuses[mod.id] = { byJob: {} }
}
let started_at = job.started_at ? new Date(job.started_at).getTime() : undefined
if (job.type == 'QueuedJob') {
@@ -189,7 +198,7 @@
started_at,
parent_module: mod['parent_module']
}
- $durationStatuses[mod.id][job.id] = {
+ $durationStatuses[mod.id].byJob[job.id] = {
created_at: job.created_at ? new Date(job.created_at).getTime() : undefined,
started_at
}
@@ -203,10 +212,11 @@
parent_module: mod['parent_module'],
duration_ms: job['duration_ms'],
started_at: started_at,
+ iteration: mod.iterator?.itered?.length,
iteration_total: mod.iterator?.itered?.length
// retries: $flowStateStore?.raw_flow
}
- $durationStatuses[mod.id][job.id] = {
+ $durationStatuses[mod.id].byJob[job.id] = {
created_at: job.created_at ? new Date(job.created_at).getTime() : undefined,
started_at,
duration_ms: job['duration_ms']
@@ -214,7 +224,6 @@
}
}
}
- let showEmbeddeds = -20
let flowTimeline: FlowTimeline
@@ -229,14 +238,23 @@
{/if} -->
{#if isListJob}
- {#if (flowJobIds?.flowJobs.length ?? 0) > 20}
-
- For performance reasons, only the last 20 items are shown.