Skip to content

Commit

Permalink
ui: status: add notes to filters
Browse files Browse the repository at this point in the history
Add ability to create short notes and link to things from filters.
Most filters are temporary now, it's useful to track where things
came from.

Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
kuba-moo committed Oct 4, 2024
1 parent a602171 commit b44a4ac
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ui/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -921,12 +921,17 @@ function filters_doit(data_raw)
});

let cf_tests_hdr = document.getElementById("cf-tests-hdr");
let has_notes = false;
add_one_test_filter_hdr(keys_present, "remote", "Remote", cf_tests_hdr);
add_one_test_filter_hdr(keys_present, "executor", "Executor", cf_tests_hdr);
add_one_test_filter_hdr(keys_present, "branch", "Branch", cf_tests_hdr);
add_one_test_filter_hdr(keys_present, "group", "Group", cf_tests_hdr);
add_one_test_filter_hdr(keys_present, "test", "Test", cf_tests_hdr);

if (add_one_test_filter_hdr(keys_present, "link", "Notes", cf_tests_hdr) ||
add_one_test_filter_hdr(keys_present, "comment", "Notes", cf_tests_hdr))
has_notes = true;

$.each(data_raw["ignore-results"], function(_i, v) {
let row = cf_tests.insertRow();
let i = 0;
Expand All @@ -936,6 +941,15 @@ function filters_doit(data_raw)
i += add_one_test_filter(keys_present, "branch", v, i, row);
i += add_one_test_filter(keys_present, "group", v, i, row);
i += add_one_test_filter(keys_present, "test", v, i, row);

// Must be last, we don't handle counting columns properly here.
if (has_notes)
cell = row.insertCell(i);
if (v["comment"] || v["link"]) {
let comment = v["comment"] || "link";
comment = wrap_link(v, v, comment);
cell.innerHTML = comment;
}
});

output = "<b>Crashes ignored:</b><br />";
Expand Down

0 comments on commit b44a4ac

Please sign in to comment.