Skip to content

Commit f658f29

Browse files
authored
Don't show empty table heading when no builds (#595)
1 parent 11d956c commit f658f29

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

src/main/frontend/multi-pipeline-graph-view/multi-pipeline-graph/main/MultiPipelineGraph.tsx

+17-13
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,22 @@ export const MultiPipelineGraph = () => {
1616
}
1717
}, [runs, poll]);
1818
return (
19-
<table className="jenkins-table sortable">
20-
<thead>
21-
<tr>
22-
<th className="jenkins-table__cell--tight">id</th>
23-
<th data-sort-disable="true">pipeline</th>
24-
</tr>
25-
</thead>
26-
<tbody>
27-
{runs.map((run) => (
28-
<SingleRun key={run.id} run={run} />
29-
))}
30-
</tbody>
31-
</table>
19+
<>
20+
{runs.length > 0 && (
21+
<table className="jenkins-table sortable">
22+
<thead>
23+
<tr>
24+
<th className="jenkins-table__cell--tight">id</th>
25+
<th data-sort-disable="true">pipeline</th>
26+
</tr>
27+
</thead>
28+
<tbody>
29+
{runs.map((run) => (
30+
<SingleRun key={run.id} run={run} />
31+
))}
32+
</tbody>
33+
</table>
34+
)}
35+
</>
3236
);
3337
};

0 commit comments

Comments
 (0)