From 7c4eece009717e4188eeb8b1dedd094589dc2bdf Mon Sep 17 00:00:00 2001
From: Ruben Fiszel
Date: Fri, 5 Apr 2024 16:43:32 +0200
Subject: [PATCH] fix: show flow user states in flow state preview
---
frontend/src/lib/components/FlowStatusViewerInner.svelte | 7 +++++++
frontend/src/lib/components/JobArgs.svelte | 7 ++++---
openflow.openapi.yaml | 2 ++
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/frontend/src/lib/components/FlowStatusViewerInner.svelte b/frontend/src/lib/components/FlowStatusViewerInner.svelte
index b26c2164f0..934b9097b5 100644
--- a/frontend/src/lib/components/FlowStatusViewerInner.svelte
+++ b/frontend/src/lib/components/FlowStatusViewerInner.svelte
@@ -700,6 +700,9 @@
Timeline
Details
+ {#if Object.keys(job?.flow_status?.user_states ?? {}).length > 0}
+ User States
+ {/if}
{#if rightColumnSelect == 'timeline'}
Select a node to see its details here
{/if}
+ {:else if rightColumnSelect == 'user_states'}
+
+
+
{/if}
diff --git a/frontend/src/lib/components/JobArgs.svelte b/frontend/src/lib/components/JobArgs.svelte
index dac1f44eba..2e7ba8545b 100644
--- a/frontend/src/lib/components/JobArgs.svelte
+++ b/frontend/src/lib/components/JobArgs.svelte
@@ -12,6 +12,7 @@
import Row from './table/Row.svelte'
export let args: any
+ export let argLabel: string | undefined = undefined
let jsonViewer: Drawer
let runLocally: Drawer
@@ -27,8 +28,8 @@ ${Object.entries(args)
.join('\n')}
main(${Object.keys(args)
- .map((x) => `${x} = ${x}`)
- .join(', ')})
+ .map((x) => `${x} = ${x}`)
+ .join(', ')})
`
}
@@ -51,7 +52,7 @@ ${Object.entries(args)
- | Argument |
+ {argLabel ?? 'Arg'} |
Value |
diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml
index 5e6b2cac45..1da7843a46 100644
--- a/openflow.openapi.yaml
+++ b/openflow.openapi.yaml
@@ -419,6 +419,8 @@ components:
type: array
items:
$ref: "#/components/schemas/FlowStatusModule"
+ user_states:
+ additionalProperties: true
failure_module:
allOf:
- $ref: "#/components/schemas/FlowStatusModule"