From 0eceb8c7bbe0b68311e0bc296fde9b13004f96bb Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 2 May 2018 10:43:58 +0200 Subject: buildmaster/status.php: some more content --- buildmaster/status.php | 65 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 22 deletions(-) (limited to 'buildmaster') diff --git a/buildmaster/status.php b/buildmaster/status.php index d58d379..46c2fc1 100644 --- a/buildmaster/status.php +++ b/buildmaster/status.php @@ -1,28 +1,49 @@ - - - Build master status - - - - - Start page
- num_rows > 0) { + $result = $result->fetch_assoc(); + $last_commit = $result["last_commit"]; +} + +$result = mysql_run_query( + "SELECT MAX(`build_assignments`.`return_date`) AS `last_return`" . + " FROM `build_assignments`" +); + +if ($result -> num_rows > 0) { + $result = $result->fetch_assoc(); + $last_return = $result["last_return"]; +} + +$result = mysql_run_query( + "SELECT MAX(`binary_packages`.`last_moved`) AS `last_moved`" . + " FROM `binary_packages`" . + " JOIN `build_assignments` ON `binary_packages`.`build_assignment`=`build_assignments`.`id`" . + " WHERE `binary_packages`.`last_moved`>`build_assignments`.`return_date`" +); if ($result -> num_rows > 0) { - $row = $result->fetch_assoc(); - print " latest package source is from " . $row["last"] . ".
\n"; + $result = $result->fetch_assoc(); + $last_moved = $result["last_moved"]; } -?> - - +print_header("Build Master Status"); + +if (isset($last_commit)) + print " latest package source is from " . $last_commit . ".
\n"; + +if (isset($last_return)) + print " latest built package is from " . $last_return . ".
\n"; + +if (isset($last_return)) + print " latest package move was on " . $last_moved . ".
\n"; + +print_footer("Copyright © 2018 Erich Eckner."); -- cgit v1.2.3-70-g09d2