Skip to content

Commit 6e1044c

Browse files
committed
ui: move br_pfx_get() helper to the lib
Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 3e4a126 commit 6e1044c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ui/nipa.js

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ function nipa_msec_to_str(msec) {
2727
return "TLE";
2828
}
2929

30+
function nipa_br_pfx_get(name)
31+
{
32+
return name.substring(0, name.length - 18);
33+
}
34+
3035
function nipa_test_fullname(v, r)
3136
{
3237
return v.remote + "/" + v.executor + "/" + r.group + "/" + r.test;

ui/status.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -715,11 +715,6 @@ function rem_exe(v)
715715
return v.remote + "/" + v.executor;
716716
}
717717

718-
function br_pfx_get(name)
719-
{
720-
return name.substring(0, name.length - 18);
721-
}
722-
723718
var awol_executors;
724719

725720
function load_result_table(data_raw, reload)
@@ -749,7 +744,7 @@ function load_result_table(data_raw, reload)
749744
v.start = new Date(v.start);
750745
v.end = new Date(v.end);
751746

752-
v.br_pfx = br_pfx_get(v.branch);
747+
v.br_pfx = nipa_br_pfx_get(v.branch);
753748
v.br_date = v.branch.substring(v.branch.length - 17);
754749

755750
branches.add(v.branch);
@@ -810,7 +805,7 @@ function load_result_table(data_raw, reload)
810805
if (branch_execs[br].has(re))
811806
continue;
812807
// Exec works on different branch stream
813-
if (!known_execs[re].br_pfx.has(br_pfx_get(br)))
808+
if (!known_execs[re].br_pfx.has(nipa_br_pfx_get(br)))
814809
continue;
815810

816811
data_raw.push({

0 commit comments

Comments
 (0)