From a30f4fdc1b6d0b503014736074783ee53ed15d32 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Mon, 28 Nov 2016 17:40:14 +0000 Subject: [PATCH] Add testcases detail column to status page --- cgi-bin/show_status.pl | 17 ++++++++++++----- htdocs/img/t_fail.gif | Bin 0 -> 37 bytes htdocs/img/t_good.gif | Bin 0 -> 37 bytes htdocs/img/t_notdone.gif | Bin 0 -> 37 bytes templates/log.tt | 4 ++-- templates/status.tt | 14 ++++++++++++-- 6 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 htdocs/img/t_fail.gif create mode 100644 htdocs/img/t_good.gif create mode 100644 htdocs/img/t_notdone.gif diff --git a/cgi-bin/show_status.pl b/cgi-bin/show_status.pl index f371bdc..baf9623 100755 --- a/cgi-bin/show_status.pl +++ b/cgi-bin/show_status.pl @@ -48,11 +48,14 @@ my $db = DBI->connect($dsn,$dbuser,$dbpass,{pg_expand_array => 0}) my $statement =<fetchrow_hashref) $row->{build_flags} =~ s/,/ /g; $row->{build_flags} =~ s/_PC\b//g; $row->{build_flags} = lc($row->{build_flags}); + if (defined($row->{log_text})) + { # convert to a hash + $row->{log_text} = { split /\s+/, $row->{log_text} }; + } push(@$statrows,$row); } $sth->finish; diff --git a/htdocs/img/t_fail.gif b/htdocs/img/t_fail.gif new file mode 100644 index 0000000000000000000000000000000000000000..e3030bc110cafaab7c0bd5bae4a042124789ccec GIT binary patch literal 37 pcmZ?wbh9u|WMmLvXkcXc&%p5i|9>3@AOMLlFtN1sbFwm60|2IM2h;!n literal 0 HcmV?d00001 diff --git a/htdocs/img/t_good.gif b/htdocs/img/t_good.gif new file mode 100644 index 0000000000000000000000000000000000000000..f8ddab0c91320b32c14e84e586bc878d43bfc31d GIT binary patch literal 37 pcmZ?wbh9u|WMmLvXkcVu`@Q!6|NlA+KmZb9U}9Git log
-Change Set prior to this build
+Change Set prior to this build
 
-Change Set including this build
+Change Set including this build
 
 [% FOREACH clog IN changed_since_success_logs ; PROCESS gitlog -%]
 [%- END -%]
diff --git a/templates/status.tt b/templates/status.tt
index f471f2a..f861f9b 100644
--- a/templates/status.tt
+++ b/templates/status.tt
@@ -29,6 +29,13 @@ See accompanying License file for license details
      #'integer-datetimes' => '/img/days.png',
      }
 -%]
+[%
+ res_imgs = {
+     P = '/img/t_good.gif',
+     F => '/img/t_fail.gif',
+     '.' => '/img/t_notdone.gif',
+     }
+-%]
 [%- BLOCK img ; IF flag == 'depend' or flag == 'gnu-ld' ; ; ELSIF flag_imgs.$flag %][% flag %]  [% ELSE %][%#
 																									  flag ; ' '
 %][% END ; END -%]
@@ -37,6 +44,8 @@ See accompanying License file for license details
 [%- BLOCK cl %] class="[% SWITCH bgfor.replace('-.*','') -%]
   [%- CASE 'OK' %]pass[% CASE 'ContribCheck' %]warn[% CASE [ 'Check' 'InstallCheck' ] %]warnx[% CASE %]fail[% END %]"
 [%- END -%]
+[%# The IF-backstop is ugly and I'm not understanding why the res_img lookup does not for for '.' -%]
+[%- BLOCK test_result %][% r %][%- END -%]
 [% WRAPPER 'page.tt' 
 	title = 'Exim BuildFarm Status'
 	bodyclass = 'none'
@@ -62,8 +71,8 @@ See accompanying License file for license details
 [% brch = "" %]
 [% FOREACH row IN statrows %]
 [% IF row.branch != brch ; brch = row.branch %]
-Branch: [% brch %]
-AliasSystemStatusFlags
+Branch: [% brch %]
+AliasSystemStatusFlagsDetail
 [% END %]
 
     
 
     [% FOREACH flag IN row.build_flags.split().sort() ; PROCESS img ; END %]
+    [% FOREACH test IN row.log_text.keys.nsort ; r = row.log_text.$test ; PROCESS test_result ; END %]
 
 [% END %]
     
-- 
2.30.2