Skip to content

Commit

Permalink
contests: ui: flakes: add a link to contest.html
Browse files Browse the repository at this point in the history
Support clicking on a test name in flakes to go to list
of runs for a given test (in contest).

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
kuba-moo committed Apr 30, 2024
1 parent d4461ff commit 1508eb7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contest/flakes.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function load_result_table(data_raw)
let needle = document.getElementById("tn-needle").value;

var test_row = {};
let tn_urls = {};

$.each(data_raw, function(i, v) {
$.each(v.results, function(j, r) {
Expand All @@ -47,6 +48,8 @@ function load_result_table(data_raw)
if (needle && !tn.includes(needle))
return 1;

tn_urls[tn] = "executor=" + v.executor + "&test=" + r.test;

if (!(tn in test_row)) {
test_row[tn] = {};
for (let i = 1; i <= branches.length; i++)
Expand Down Expand Up @@ -111,7 +114,7 @@ function load_result_table(data_raw)

let row = table.insertRow();
let name = row.insertCell(0);
name.innerHTML = tn;
name.innerHTML = "<a style=\"text-decoration: none\" href=\"contest.html?" + tn_urls[tn] + "\">" + tn + "</a>";
name.setAttribute("style", "padding: 0px");

for (let i = 0; i < branches.length; i++) {
Expand Down

0 comments on commit 1508eb7

Please sign in to comment.