fix: show flow user states in flow state preview

This commit is contained in:
Ruben Fiszel
2024-04-05 16:43:32 +02:00
parent 7ed7cdf5a9
commit 7c4eece009
3 changed files with 13 additions and 3 deletions
@@ -700,6 +700,9 @@
<Tabs bind:selected={rightColumnSelect}>
<Tab value="timeline"><span class="font-semibold text-md">Timeline</span></Tab>
<Tab value="detail"><span class="font-semibold">Details</span></Tab>
{#if Object.keys(job?.flow_status?.user_states ?? {}).length > 0}
<Tab value="user_states"><span class="font-semibold">User States</span></Tab>
{/if}
</Tabs>
{#if rightColumnSelect == 'timeline'}
<FlowTimeline
@@ -779,6 +782,10 @@
{:else}<p class="p-2 text-tertiary italic">Select a node to see its details here</p
>{/if}
</div>
{:else if rightColumnSelect == 'user_states'}
<div class="p-2">
<JobArgs argLabel="Key" args={job?.flow_status?.user_states ?? {}} />
</div>
{/if}
</div>
</div>
+4 -3
View File
@@ -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)
<DataTable size="sm">
<Head>
<tr>
<Cell head first>Argument</Cell>
<Cell head first>{argLabel ?? 'Arg'}</Cell>
<Cell head last>Value</Cell>
</tr>
<svelte:fragment slot="headerAction">
+2
View File
@@ -419,6 +419,8 @@ components:
type: array
items:
$ref: "#/components/schemas/FlowStatusModule"
user_states:
additionalProperties: true
failure_module:
allOf:
- $ref: "#/components/schemas/FlowStatusModule"