{#if flow_status}
{min ? displayDate(new Date(min), true) : ''}
{#if max && min}
{msToSec(max - min)}s
{/if}
{max ? displayDate(new Date(max), true) : ''} {#if !max && min} {#if now} {msToSec(now - min, 3)}s {/if}
{/if}
Waiting for executor
Execution
{#each Object.entries(flow_status).sort(([, a], [, b]) => { const ta = new Date(a.started_at ?? a.scheduled_for ?? 0).getTime() const tb = new Date(b.started_at ?? b.scheduled_for ?? 0).getTime() return ta - tb }) as [k, v] (k)} {@const isInlineStep = isStep(k)} {@const isSleep = (v as any).sleep_duration_s != undefined} {@const isApproval = (v as any).approval === true} {@const isRunning = !flowDone && v.duration_ms == undefined && v.started_at != undefined} {@const isDone = v.duration_ms != undefined || flowDone} {@const isExpanded = expandedRows[k] ?? false}
{#if isSleep}
sleep ({(v as any).sleep_duration_s}s)
{:else if isApproval} {@const selfApprovalDisabled = (v as any).self_approval_disabled === true} {@const formSchema = (v as any).form?.schema ?? (v as any).form} {@const hasForm = formSchema && typeof formSchema === 'object' && Object.keys(formSchema).length > 0} {@const canApprove = !isDone && jobId}
{v.name ?? stepKey(k)}
{#if !isDone}
waiting
{#if canApprove}
handleApprove(k, formSchema)} > Approve
handleCancel()} > Reject
{/if} {:else}
{msToSec(v.duration_ms ?? 0)}s
{/if}
{#if canApprove && selfApprovalDisabled && $userStore?.is_admin}
Self-approval is disabled but allowed because you are an admin/owner
{/if} {#if canApprove && hasForm}
{#if emptyString($enterpriseLicense)}
{:else}
{/if}
{/if}
{:else}
toggleRow(k)} >
{#if isExpanded}
{:else}
{/if}
{#if isInlineStep}
{v.name ?? stepKey(k)}
{:else}
e.stopPropagation()} > {v.name ?? k}
{/if}
{#if min && total} {@const scheduledFor = v?.scheduled_for ? new Date(v?.scheduled_for).getTime() : undefined} {@const startedAt = v?.started_at ? new Date(v?.started_at).getTime() : undefined} {@const waitingLen = scheduledFor ? startedAt ? startedAt - scheduledFor : now - scheduledFor : 0}
{#if isInlineStep} {#if startedAt}
{/if} {:else}
{#if startedAt}
{/if} {/if}
{/if}
{#if isExpanded}
{#if isInlineStep} {@const result = stepResults[stepKey(k)]} {#if isDone && result !== undefined}
Result
{:else}
Step completed (no result)
{/if} {:else if loadingJobs[k] && !childJobs[k]}
Loading...
{:else if childJobs[k]} {@const job = childJobs[k]} {#if job.logs || isRunning}
Logs
{/if} {#if isDone && job.result !== undefined}
Result
{/if} {:else}
No data available
{/if}
{/if} {/if}
{/each} {#if flowDone && result !== undefined}
(resultExpanded = !resultExpanded)} >
{#if resultExpanded}
{:else}
{/if}
{#if success}
{:else}
{/if} Result
{#if resultExpanded}
{/if}
{/if}
{:else}
{/if}