From fa5062a7578b28aab72f972aa538b2d25975deb7 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 26 Apr 2018 16:37:03 +0200 Subject: buildmaster/build-list.php: links at top a little nicer now --- buildmaster/build-list.php | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'buildmaster/build-list.php') 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 "build logs
\n"; +print "build logs\n"; + +foreach ($to_shows as $link => $dummy) { + print "-\n"; + if ($link != $to_show) + print ""; + print $link . " package builds"; + if ($link != $to_show) + print ""; + print "\n"; +} if ($count > 0) { -- cgit v1.2.3-70-g09d2