git ref in status display
[buildfarm-server.git] / templates / history.tt
index a54bce4dfdaaf600f6818ce8f9b049dfc9b69ce2..84451c97fa05fd1bf3ec3cce5163db4581fa5546 100644 (file)
@@ -1,6 +1,7 @@
 [%#
 
 Copyright (c) 2003-2010, Andrew Dunstan
+Copyright (c) 2022, The Exim Maintainers
 
 See accompanying License file for license details
 
@@ -37,27 +38,30 @@ See accompanying License file for license details
    </table>
 [% END %]
   <h3>Branch: [% branch %][% IF statrows.size >= hm %] (last [% hm %] entries shown)[% END %]</h3>
+[%
+ res_imgs = {
+     P = '/img/t_good.gif',
+     F => '/img/t_fail.gif',
+     '.' => '/img/t_notdone.gif',
+     }
+-%]
+[%# The IF-backstop is ugly and I'm not understanding why the res_img lookup does not for for '.' -%]
+[%- BLOCK colour ; IF res_imgs.$c.defined ; res_imgs.$c ; ELSE %]/img/t_notdone.gif [% END; END %]
+[%- BLOCK colourbar %]<img src=[% PROCESS colour %] title="[% st %]-[% st + w - 1 %]" height=16 width=[% w %] class=inline align=bottom/>[%- END -%]
 [% BLOCK stdet %]
     <tr [% PROCESS cl bgfor=row.stage %]>
       <td>[%- row.when_ago | replace('\s','&nbsp;') %]&nbsp;ago&nbsp;</td>
-      <td class="status">[% row.stage -%]</td>
+      <td class="status">[% row.stage -%] [[% row.git_head_ref.substr(0,7) %]]</td>
+
       <td class="status"><a href="show_log.pl?nm=
                [%- row.sysname %]&amp;dt=
                [%- row.snapshot | uri %]">
                 [%- IF row.stage != 'OK' %]Details[% ELSE %]Config[% END -%]</a></td>
-
+      <td class="tests">[% FOREACH range IN row.log_text ;
+        r = range.split(' '); c = r.0; st = r.1; w = r.2; PROCESS colourbar; END %]</td>
     </tr>
 [% END %]
-<table border="0"> <tr>
-  [% FOREACH offset IN [0,1,2] %][% low = offset * statrows.size / 3 ; high = -1 + (offset + 1) * statrows.size / 3 %] 
-    [% TRY %][% PERL %] 
-      use POSIX qw(floor); 
-      $stash->set(low => floor($stash->get('low'))); 
-      $stash->set(high => floor($stash->get('high'))); 
-    [% END %][% CATCH %]<!-- [% error.info %] --> [% END %]
     <td><table cellspacing="0">
-        [% FOREACH xrow IN statrows.slice(low,high) %][% PROCESS stdet row=xrow %][% END %]
+        [% FOREACH xrow IN statrows %][% PROCESS stdet row=xrow %][% END %]
     </table></td>
-  [% END %]
-</table>
 [% END %]