From: Willy Tarreau Date: Wed, 4 Sep 2024 07:11:04 +0000 (+0200) Subject: DEV: patchbot: count the number of backported/non-backported patches X-Git-Tag: v3.1-dev7~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eaf4adb5e21409f0e0a827248e41dac9ac52c881;p=thirdparty%2Fhaproxy.git DEV: patchbot: count the number of backported/non-backported patches It's useful to instantly see how many patches of each category have already been backported and are still pending, let's count them and report them at the top of the page. --- diff --git a/dev/patchbot/scripts/post-ai.sh b/dev/patchbot/scripts/post-ai.sh index 7dba63a118..c1abc31cee 100755 --- a/dev/patchbot/scripts/post-ai.sh +++ b/dev/patchbot/scripts/post-ai.sh @@ -150,11 +150,14 @@ function updt_table(line) { var w = document.getElementById("sh_w").checked; var y = document.getElementById("sh_y").checked; var tn = 0, tu = 0, tw = 0, ty = 0; + var bn = 0, bu = 0, bw = 0, by = 0; var i, el; for (i = 1; i < nb_patches; i++) { if (document.getElementById("bt_" + i + "_n").checked) { tn++; + if (bkp[i]) + bn++; if (line && i != line) continue; el = document.getElementById("tr_" + i); @@ -163,6 +166,8 @@ function updt_table(line) { } else if (document.getElementById("bt_" + i + "_u").checked) { tu++; + if (bkp[i]) + bu++; if (line && i != line) continue; el = document.getElementById("tr_" + i); @@ -171,6 +176,8 @@ function updt_table(line) { } else if (document.getElementById("bt_" + i + "_w").checked) { tw++; + if (bkp[i]) + bw++; if (line && i != line) continue; el = document.getElementById("tr_" + i); @@ -179,6 +186,8 @@ function updt_table(line) { } else if (document.getElementById("bt_" + i + "_y").checked) { ty++; + if (bkp[i]) + by++; if (line && i != line) continue; el = document.getElementById("tr_" + i); @@ -198,6 +207,18 @@ function updt_table(line) { document.getElementById("cnt_u").innerText = tu; document.getElementById("cnt_w").innerText = tw; document.getElementById("cnt_y").innerText = ty; + + document.getElementById("cnt_bn").innerText = bn; + document.getElementById("cnt_bu").innerText = bu; + document.getElementById("cnt_bw").innerText = bw; + document.getElementById("cnt_by").innerText = by; + document.getElementById("cnt_bt").innerText = bn + bu + bw + by; + + document.getElementById("cnt_nbn").innerText = tn - bn; + document.getElementById("cnt_nbu").innerText = tu - bu; + document.getElementById("cnt_nbw").innerText = tw - bw; + document.getElementById("cnt_nby").innerText = ty - by; + document.getElementById("cnt_nbt").innerText = tn - bn + tu - bu + tw - bw + ty - by; } function updt_output() { @@ -242,13 +263,27 @@ function updt(line,value) { EOF echo "" +echo -n "" +echo -n "" +echo -n "" +echo -n "" +echo -n "" +echo -n "" +echo "" +echo -n "" +echo -n "" +echo -n "" +echo -n "" +echo -n "" +echo -n "" +echo "
Backported N: 0 U: 0 W: 0 Y: 0 total: 0
Not backported N: 0 U: 0 W: 0 Y: 0 total: 0

" echo -n "Show:" echo -n " B (${#bkp[*]}) " echo -n " N (0) " echo -n " U (0) " echo -n " W (0) " echo -n " Y (0) " -echo -n " (B=show backported, N=no/drop, U=uncertain, W=wait/next, Y=yes/pick" +echo -n "
(B=show backported, N=no/drop, U=uncertain, W=wait/next, Y=yes/pick" echo ")

" echo ""