diff options
author | Pascal Terjan <pterjan@mageia.org> | 2022-08-20 09:58:36 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2022-08-20 09:58:36 +0000 |
commit | c5666c1999629af385a6d0d93de790e61afbdefb (patch) | |
tree | b0c5233a37515be8115424d8199db59bf90c116f | |
parent | 7447ea0fc35282e656aa64806857299b1d55f6b3 (diff) | |
download | pkgsubmit-c5666c1999629af385a6d0d93de790e61afbdefb.tar pkgsubmit-c5666c1999629af385a6d0d93de790e61afbdefb.tar.gz pkgsubmit-c5666c1999629af385a6d0d93de790e61afbdefb.tar.bz2 pkgsubmit-c5666c1999629af385a6d0d93de790e61afbdefb.tar.xz pkgsubmit-c5666c1999629af385a6d0d93de790e61afbdefb.zip |
Hide the filter section when the run doesn't have attributes
This happens while it hasn't completed or been processed yet.
-rw-r--r-- | autobuild/results.php | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/autobuild/results.php b/autobuild/results.php index 11bbd59..6d6d090 100644 --- a/autobuild/results.php +++ b/autobuild/results.php @@ -277,29 +277,31 @@ echo "<tr><td>Removed</td><td>$nb_removed</td></tr>\n"; echo "<tr><td>Unchanged</td><td>$nb_still_broken</td></tr>\n"; echo "</table>\n"; echo "<br />If no new package was broken, success rate next time should be $estimated_percent%.\n"; -echo "<h2>Filters</h2>\n"; -echo "<form action=\"" . $_SERVER["PHP_SELF"] . "\" method=\"get\">\n"; -if ($_GET["run"]) { - echo "<input type=\"hidden\" name=\"run\" value=\"" . $_GET["run"] . "\" />\n"; -} $all_attrs = get_all_attributes(); $filters = Array(); -foreach ($all_attrs as $attr_type => $attrs) { - echo "<b>$attr_type: </b>"; - $filters[$attr_type] = Array(); - foreach ($attrs as $attr) { - if ($_GET["attr_$attr_type_$attr"]) { - $checked = "checked"; - array_push($filters[$attr_type], $attr); - } else { - $checked=""; +if ($all_attrs) { + echo "<h2>Filters</h2>\n"; + echo "<form action=\"" . $_SERVER["PHP_SELF"] . "\" method=\"get\">\n"; + if ($_GET["run"]) { + echo "<input type=\"hidden\" name=\"run\" value=\"" . $_GET["run"] . "\" />\n"; + } + foreach ($all_attrs as $attr_type => $attrs) { + echo "<b>$attr_type: </b>"; + $filters[$attr_type] = Array(); + foreach ($attrs as $attr) { + if ($_GET["attr_$attr_type_$attr"]) { + $checked = "checked"; + array_push($filters[$attr_type], $attr); + } else { + $checked=""; + } + echo "<input type=\"checkbox\" $checked name=\"attr_$attr_type_$attr\" value=\"1\">$attr</input>\n"; } - echo "<input type=\"checkbox\" $checked name=\"attr_$attr_type_$attr\" value=\"1\">$attr</input>\n"; + echo "<br/>\n"; } - echo "<br/>\n"; + echo "<input type=\"submit\" value=\"Apply\" />\n"; + echo "</form>"; } -echo "<input type=\"submit\" value=\"Apply\" />\n"; -echo "</form>"; echo "<h2>Failed builds ($nb_failed/$nb_tried)</h2>\n"; echo "<table class=\"failureTable\" >\n"; echo "<tr><th></th><th>Status</th><th>Failure type</th><th>Build step</th><th></th><th>Languages</th><th>Detected errors</th></tr>\n"; |