Skip to content

Commit

Permalink
PR feedback from Gage, add params
Browse files Browse the repository at this point in the history
  • Loading branch information
jenny-s51 committed Apr 30, 2024
1 parent 882e8f2 commit 7dfd49a
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,19 @@ const getNestedNodes = (
components: PipelineComponentsKF,
executors: PipelineExecutorsKF,
runDetails?: RunDetailsKF,
executions?: Execution[] | null,
): [nestedNodes: PipelineNodeModelExpanded[], children: string[]] => {
const nodes: PipelineNodeModelExpanded[] = [];
const children: string[] = [];

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) &&
Expand All @@ -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,
Expand Down

0 comments on commit 7dfd49a

Please sign in to comment.