summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-26 16:37:03 +0200
committerErich Eckner <git@eckner.net>2018-04-26 16:37:03 +0200
commitfa5062a7578b28aab72f972aa538b2d25975deb7 (patch)
treefcf3e3ef5f18acd2473ade84679871f2637b5f9b
parent938f4312ad4fd67c7cd28062c2e686d9ebedcd55 (diff)
downloadarchweb32-fa5062a7578b28aab72f972aa538b2d25975deb7.tar.xz
buildmaster/build-list.php: links at top a little nicer now
-rw-r--r--buildmaster/build-list.php35
1 files changed, 27 insertions, 8 deletions
diff --git a/buildmaster/build-list.php b/buildmaster/build-list.php
index f92dda8..8121340 100644
--- a/buildmaster/build-list.php
+++ b/buildmaster/build-list.php
@@ -8,13 +8,22 @@ if (isset($_GET["show"]))
else
$to_show="all";
-if ($to_show == "all")
- $match = "";
-elseif ($to_show == "broken")
- $match = " AND (`build_assignments`.`is_broken` OR `build_assignments`.`is_blocked` IS NOT NULL)";
-elseif ($to_show == "next")
- $match = "";
-else
+$to_shows = array(
+ "all" => "",
+ "broken" => " AND (`build_assignments`.`is_broken` OR `build_assignments`.`is_blocked` IS NOT NULL)",
+ "next" => ""
+);
+
+$found = false;
+
+foreach ($to_shows as $candidate => $mc)
+ if ($to_show == $candidate) {
+ $match = $mc;
+ $found = true;
+ break;
+ }
+
+if (!$found)
die_500("Unknown parameter for \"show\".");
$result = mysql_run_query(
@@ -184,7 +193,17 @@ print_header("List of " . strtoupper(substr($to_show,0,1)) . substr($to_show,1)
show_warning_on_offline_slave();
-print "<a href=\"https://buildmaster.archlinux32.org/build-logs/\">build logs</a><br>\n";
+print "<a href=\"https://buildmaster.archlinux32.org/build-logs/\">build logs</a>\n";
+
+foreach ($to_shows as $link => $dummy) {
+ print "-\n";
+ if ($link != $to_show)
+ print "<a href=\"?show=" . $link . "\">";
+ print $link . " package builds";
+ if ($link != $to_show)
+ print "</a>";
+ print "\n";
+}
if ($count > 0) {