diff --git a/frontend/src/lib/components/FlowStatusViewer.svelte b/frontend/src/lib/components/FlowStatusViewer.svelte index 3a812088ae..b06f9dafca 100644 --- a/frontend/src/lib/components/FlowStatusViewer.svelte +++ b/frontend/src/lib/components/FlowStatusViewer.svelte @@ -12,6 +12,7 @@ export let job: QueuedJob | CompletedJob export let jobs: (Job | Job[] | undefined)[] = [] + export let fullyRetrieved = -1 let lastJobid: string | undefined @@ -31,17 +32,18 @@ id: last.job ?? '' }) jobs = jobs - pres[i].scroll({ top: pres[i]?.scrollHeight, behavior: 'smooth' }) + pres[i]?.scroll({ top: pres[i]?.scrollHeight, behavior: 'smooth' }) } } } if (job.id != lastJobid) { lastJobid = job.id jobs = [] + fullyRetrieved = -1 } job?.flow_status?.modules?.forEach(async (x, i) => { if ( - (i >= jobs.length && x.type == FlowStatusModule.type.SUCCESS) || + (i > fullyRetrieved && x.type == FlowStatusModule.type.SUCCESS) || x.type == FlowStatusModule.type.FAILURE ) { if (x.forloop_jobs) { @@ -52,11 +54,12 @@ await JobService.getCompletedJob({ workspace: $workspaceStore!, id: j }) ) } - jobs.push(forloop_jobs) + jobs[i] = forloop_jobs } else { - jobs.push(await JobService.getCompletedJob({ workspace: $workspaceStore!, id: x.job! })) + jobs[i] = await JobService.getCompletedJob({ workspace: $workspaceStore!, id: x.job! }) } jobs = jobs + fullyRetrieved = i } }) } @@ -100,8 +103,7 @@
{toJob(
- jobs[i]
- ).logs ?? ''}
+ {#if toJob(jobs[i])?.raw_flow}
+
+ Forloop current iteration
+
+
+ {:else}
+
+ {toJob(
+ jobs[i]
+ ).logs ?? ''}
-
+