Skip to content

Commit 559ec5d

Browse files
committed
Fix build name column in Traffic Light table
The table renders correctly when benchmarks are executed across all platforms. However, if benchmarks are only run on a subset of platforms, the Build Name column does not display all entries. This PR addresses the issue by checking for unique buildNameTitle values across all benchmarks. Fixes: automation/issues/560 Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>
1 parent 2270c24 commit 559ec5d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test-result-summary-client/src/TrafficLight/TrafficLight.jsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,17 @@ function TrafficLight() {
248248
);
249249
}
250250
};
251-
const firstRow = first(tableData) ?? {};
252-
const groups = Object.values(firstRow) ?? [];
251+
253252
const buildNameTitles = uniq(
254-
groups.map(({ buildNameTitle }) => buildNameTitle).filter(identity)
253+
tableData
254+
.map((row = {}) =>
255+
Object.values(row)
256+
.map(({ buildNameTitle }) => buildNameTitle)
257+
.filter(identity)
258+
)
259+
.flat()
255260
);
261+
256262
const columns = [
257263
{
258264
title: 'Benchmark Name',

0 commit comments

Comments
 (0)