- {job.raw_flow?.modules[i]?.summary ?? ''}
+
+
+
+ {
+ if (flowJobIds?.moduleId) {
+ if (flowState) {
+ if (
+ !flowState[flowJobIds.moduleId].previewResult ||
+ !Array.isArray(flowState[flowJobIds.moduleId]?.previewResult)
+ ) {
+ flowState[flowJobIds.moduleId].previewResult = []
+ }
+ flowState[flowJobIds.moduleId].previewResult[j] = e.detail.result
+ flowState[flowJobIds.moduleId].previewArgs = e.detail.args
+ jobResults[j] =
+ e.detail.result == null ? 'Job in progress ...' : e.detail.result
+ jobFailures[j] = e.detail.success === false
+ }
+ }
+ }}
+ />
+
+ {/each}
+ {:else if innerModules.length > 0}
+
+
+ Step-by-step results
+
+
+ {#each innerModules as mod, i}
+
+
+ {#if job?.raw_flow?.modules && i < job?.raw_flow?.modules.length}
+ Step
+
+ {i + 1}
+
+ out of
+ {job?.raw_flow?.modules.length}
+ {#if job.raw_flow?.modules[i]?.summary}
+ :
+ {job.raw_flow?.modules[i]?.summary ?? ''}
+
+ {/if}
+ {:else}
+ Failure module
+ {/if}
+
+
+ -
+ {#if [FlowStatusModule.type.IN_PROGRESS, FlowStatusModule.type.SUCCESS, FlowStatusModule.type.FAILURE].includes(mod.type)}
+ {
+ if (mod.id && (mod.flow_jobs ?? []).length == 0) {
+ if (flowState && flowState[mod.id]) {
+ flowState[mod.id].previewResult = e.detail.result
+ flowState[mod.id].previewArgs = e.detail.args
+ }
+ if (e.detail.type == 'QueuedJob') {
+ localFlowModuleStates[mod.id] = FlowStatusModule.type.IN_PROGRESS
+ } else {
+ localFlowModuleStates[mod.id] = e.detail.success
+ ? FlowStatusModule.type.SUCCESS
+ : FlowStatusModule.type.FAILURE
+ }
+ }
+ }}
+ />
+ {:else}
+
+
+
+ {#if mod.type == FlowStatusModule.type.WAITING_FOR_EVENT}
+ Waiting to be resumed by receivent events such as approvals
+ {:else if mod.type == FlowStatusModule.type.WAITING_FOR_PRIOR_STEPS}
+ Waiting for prior steps to complete
+ {:else if mod.type == FlowStatusModule.type.WAITING_FOR_EXECUTOR}
+ Job is ready to be executed and will be picked up by the next available worker
+ {/if}
{/if}
- {:else}
-
Failure module
- {/if}
-