From 0b60febdb43d437538265fbb2c25ff52a9a152f7 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 20 Nov 2023 12:26:24 +0100 Subject: [PATCH] feat: test an iteration --- .../FlowLoopIterationPreview.svelte | 161 ++++++++++++++++++ .../components/flows/content/FlowLoop.svelte | 29 +++- 2 files changed, 189 insertions(+), 1 deletion(-) create mode 100644 frontend/src/lib/components/FlowLoopIterationPreview.svelte diff --git a/frontend/src/lib/components/FlowLoopIterationPreview.svelte b/frontend/src/lib/components/FlowLoopIterationPreview.svelte new file mode 100644 index 0000000000..af3a198c49 --- /dev/null +++ b/frontend/src/lib/components/FlowLoopIterationPreview.svelte @@ -0,0 +1,161 @@ + + + + +
+
+
+
+ + {#if isRunning} + + {:else} + + {/if} +
+
+
+ +
+
+
+ +
+
+ {#if jobId} + { + job = detail + }} + bind:selectedJobStep + /> + {:else} +
Flow status will be displayed here
+ {/if} +
+
+
diff --git a/frontend/src/lib/components/flows/content/FlowLoop.svelte b/frontend/src/lib/components/flows/content/FlowLoop.svelte index b8154dfcad..5c0b7e956b 100644 --- a/frontend/src/lib/components/flows/content/FlowLoop.svelte +++ b/frontend/src/lib/components/flows/content/FlowLoop.svelte @@ -9,13 +9,16 @@ import FlowModuleEarlyStop from './FlowModuleEarlyStop.svelte' import FlowModuleSuspend from './FlowModuleSuspend.svelte' // import FlowRetries from './FlowRetries.svelte' - import { Button, Tab, TabContent, Tabs } from '$lib/components/common' + import { Button, Drawer, Tab, TabContent, Tabs } from '$lib/components/common' import type { FlowModule } from '$lib/gen/models/FlowModule' import { Pane, Splitpanes } from 'svelte-splitpanes' import { getStepPropPicker } from '../previousResults' import FlowModuleSleep from './FlowModuleSleep.svelte' import FlowModuleMock from './FlowModuleMock.svelte' + import { Play } from 'lucide-svelte' + import type { Job } from '$lib/gen' + import FlowLoopIterationPreview from '$lib/components/FlowLoopIterationPreview.svelte' const { previewArgs, flowStateStore, flowStore } = getContext('FlowEditorContext') @@ -37,8 +40,27 @@ $previewArgs, false ) + + let previewOpen = false + let jobId: string | undefined = undefined + let job: Job | undefined = undefined + + $: previewIterationArgs = $flowStateStore[mod.id]?.previewArgs ?? {} + + { + previewOpen = false + }} + /> + +
@@ -116,6 +138,11 @@ /> {/if} {/if} +
+ +