From 9430f3a5dfd53c857296c2d79cda1eb53915078e Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 23 Sep 2022 04:28:02 -0700 Subject: [PATCH] fix(frontend): loading flows with for loops + flowStatusViewer treat single jobs properly --- .../lib/components/FlowStatusViewer.svelte | 21 +++-- .../lib/components/flows/FlowEditor.svelte | 10 ++- .../lib/components/flows/flowStateUtils.ts | 4 +- .../flows/map/FlowModuleSchemaMap.svelte | 12 +-- frontend/src/routes/run/[...run].svelte | 86 ++++++++++--------- 5 files changed, 74 insertions(+), 59 deletions(-) diff --git a/frontend/src/lib/components/FlowStatusViewer.svelte b/frontend/src/lib/components/FlowStatusViewer.svelte index b6a47e6fdf..9806df468e 100644 --- a/frontend/src/lib/components/FlowStatusViewer.svelte +++ b/frontend/src/lib/components/FlowStatusViewer.svelte @@ -23,6 +23,8 @@ let forloop_selected = '' let timeout: NodeJS.Timeout + $: innerModules = jobResult.job?.flow_status?.modules ?? [] + async function loadJobInProgress() { const job = await JobService.getJob({ workspace: $workspaceStore ?? '', @@ -57,7 +59,9 @@ {#if jobResult.job}
-

Flow result

+ {#if innerModules.length > 0} +

Flow result

+ {/if} {#if `result` in jobResult.job} @@ -95,17 +99,22 @@
{/each} - {:else if Array.isArray(jobResult.innerJobs)} + {:else if innerModules.length > 0}