Skip to content

Commit f634ab2

Browse files
committed
ui: devices: list the pass pct
This helps find failed cases which may be supported but are flaky. Also it fixes the column width on Firefox which doesn't like empty cells. Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 4974eae commit f634ab2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ui/devices.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,17 @@ function load_tables()
8383
if (rn in sta_db[tn]) {
8484
let ste = sta_db[tn][rn];
8585

86-
if (ste.passing)
86+
pct = 100 * ste.pass_cnt / (ste.fail_cnt + ste.pass_cnt);
87+
pct = Math.round(pct);
88+
if (ste.passing) {
8789
cell.setAttribute("class", "box-pass");
88-
else
90+
if (pct != 100)
91+
cell.innerText = pct + "%";
92+
} else {
8993
cell.setAttribute("class", "box-skip");
94+
if (pct != 0)
95+
cell.innerText = pct + "%";
96+
}
9097
}
9198
}
9299
}

0 commit comments

Comments
 (0)