Skip to content

Commit 0dcad05

Browse files
authored
flatten line when stage is skipped when collapsed (#846)
1 parent 0754ddc commit 0dcad05

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/main/frontend/pipeline-graph-view/pipeline-graph/main/PipelineGraphLayout.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export function layoutGraph(
140140
const timings = createTimings(allNodeColumns, collapsed, showDurations);
141141
const smallLabels = createSmallLabels(allNodeColumns, collapsed);
142142
const branchLabels = createBranchLabels(allNodeColumns, collapsed);
143-
const connections = createConnections(allNodeColumns);
143+
const connections = createConnections(allNodeColumns, collapsed);
144144

145145
// Calculate the size of the graph
146146
let measuredWidth = 0;
@@ -401,10 +401,6 @@ function createTimings(
401401
}
402402
const stage = column.topStage;
403403

404-
if (stage?.state === Result.skipped) {
405-
continue;
406-
}
407-
408404
const text = stage?.totalDurationMillis + "";
409405
if (!text) {
410406
// shouldn't happen
@@ -501,14 +497,15 @@ function createBranchLabels(
501497
*/
502498
function createConnections(
503499
columns: Array<NodeColumn>,
500+
collapsed: boolean,
504501
): Array<CompositeConnection> {
505502
const connections: Array<CompositeConnection> = [];
506503

507504
let sourceNodes: Array<NodeInfo> = [];
508505
let skippedNodes: Array<NodeInfo> = [];
509506

510507
for (const column of columns) {
511-
if (column.topStage && column.topStage.state === "skipped") {
508+
if (!collapsed && column.topStage?.state === Result.skipped) {
512509
skippedNodes.push(column.rows[0][0]);
513510
continue;
514511
}

0 commit comments

Comments
 (0)