Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/buildmaster
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-07-15 14:25:33 +0200
committerErich Eckner <git@eckner.net>2019-07-15 14:25:33 +0200
commit7fecce071cea4c660e30b1e1c845c3459ee082ce (patch)
treec1f9ff1b1c954799da288ae54527740705013fd3 /buildmaster
parente7e84cd2fa4ca829b4684135addcb0be78748eab (diff)
buildmaster/log.php: print duration and exit_code for ssh_log, too (and colorize according to exit_code)
Diffstat (limited to 'buildmaster')
-rw-r--r--buildmaster/log.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/buildmaster/log.php b/buildmaster/log.php
index e339db7..6235b06 100644
--- a/buildmaster/log.php
+++ b/buildmaster/log.php
@@ -9,6 +9,8 @@ require_once BASE . "/lib/mysql.php";
$to_show = "ssh";
$columns = array(
"date" => "`ssh_log`.`date`",
+ "duration" => "`ssh_log`.`duration`",
+ "exit code" => "`ssh_log`.`exit_code`",
"build slave" => "`build_slaves`.`name`",
"action" => "`ssh_log`.`action`",
"parameters" => "`ssh_log`.`parameters`"
@@ -101,7 +103,24 @@ require_once BASE . "/lib/mysql.php";
print " <tr>\n";
foreach ($row as $val) {
print " <td>\n";
- print " " . $val . "\n";
+ print " ";
+ if (array_key_exists('exit code', $row)) {
+ print "<font color=\"";
+ switch ($row['exit code']) {
+ case 0:
+ print "#008000";
+ break;
+ default:
+ print "#800000";
+ break;
+ };
+ print "\">";
+ }
+ print $val;
+ if (array_key_exists('exit code', $row)) {
+ print "</font>";
+ }
+ print "\n";
print " </td>\n";
}
print " </tr>\n";