diff --git a/frontend/src/concepts/pipelines/topology/usePipelineTaskTopology.ts b/frontend/src/concepts/pipelines/topology/usePipelineTaskTopology.ts index 1dd1b5af18..6c72094fcc 100644 --- a/frontend/src/concepts/pipelines/topology/usePipelineTaskTopology.ts +++ b/frontend/src/concepts/pipelines/topology/usePipelineTaskTopology.ts @@ -29,6 +29,7 @@ const getNestedNodes = ( components: PipelineComponentsKF, executors: PipelineExecutorsKF, runDetails?: RunDetailsKF, + executions?: Execution[] | null, ): [nestedNodes: PipelineNodeModelExpanded[], children: string[]] => { const nodes: PipelineNodeModelExpanded[] = []; const children: string[] = []; @@ -36,7 +37,11 @@ const getNestedNodes = ( Object.entries(items).forEach(([name, details]) => { const componentRef = details.componentRef.name; const component = components[componentRef]; - const status = parseRuntimeInfoFromRunDetails(name, runDetails); + + const status = executions + ? parseRuntimeInfoFromExecutions(name, executions) + : parseRuntimeInfoFromRunDetails(name, runDetails); + const runAfter: string[] = details.dependentTasks ?? []; const hasSubTask = Object.keys(components).find((task) => task === componentRef) && @@ -56,7 +61,14 @@ const getNestedNodes = ( }; if (hasSubTask && subTasks) { - const [nestedNodes, nestedChildren] = getNestedNodes(spec, subTasks, components, executors); + const [nestedNodes, nestedChildren] = getNestedNodes( + spec, + subTasks, + components, + executors, + runDetails, + executions, + ); const itemNode = createGroupNode( name,