More efficient html for detail column
[buildfarm-server.git] / templates / status.tt
index d9a64c1d312f6b77f527b39755f4d63196ef8263..29be4e32d59a176829e427f17144197215588835 100644 (file)
@@ -8,12 +8,17 @@ See accompanying License file for license details
 [%
  flag_imgs = {
      perl = '/img/camel.png',
-     #python = '/img/python.png',
-     #debug = '/img/bug.png',
-     #pam => '/img/pam.png',
-     #cassert => '/img/cassert.png',
      openssl => '/img/ssl_icon.gif',
      gnutls => '/img/gnutls_icon.gif',
+     mysql => '/img/mysql_logo.png',
+     pgsql => '/img/postgresql-icon-32.png',
+     ldap => '/img/openldap_logo.jpg',
+     doc => '/img/doc.png',
+     test => '/img/hammer.jpeg',
+     #python => '/img/python.png',
+     #debug => '/img/bug.png',
+     #pam => '/img/pam.png',
+     #cassert => '/img/cassert.png',
      #nls => '/img/translateicon.gif',
      #krb5 => '/img/krb.gif',
      #gssapi => '/img/gssapi.gif',
@@ -21,8 +26,14 @@ See accompanying License file for license details
      #vpath => '/img/vpath.png',
      #xml => '/img/xml.png',
      #'thread-safety' => '/img/threads.gif',
-     #'integer-datetimes' = '/img/days.png',
-     mysql = '/img/mysql_logo.png',
+     #'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 %]<img src="[% flag_imgs.$flag %]" title="[% flag %]" alt="[% flag %]" height="16" width="16" class="inline" align="bottom" />  [% ELSE %][%#
@@ -33,6 +44,9 @@ 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 colour ; IF res_imgs.$c.defined ; res_imgs.$c ; ELSE %]/img/t_notdone.gif [% END; END %]
+[%- BLOCK colourbar %]<img src="[% PROCESS colour %]" title="[% st %]" alt="[% c %]" height="16" width="[% w %]" class="inline" align="bottom" />[%- END -%]
 [% WRAPPER 'page.tt' 
        title = 'Exim BuildFarm Status'
        bodyclass = 'none'
@@ -58,8 +72,8 @@ See accompanying License file for license details
 [% brch = "" %]
 [% FOREACH row IN statrows %]
 [% IF row.branch != brch ; brch = row.branch %]
-<tr><th class="head" colspan="5">Branch: [% brch %]</th></tr>
-<tr><th colspan="2">Alias</th><th>System</th><th>Status</th><th>Flags</th></tr>
+<tr><th class="head" colspan="6">Branch: [% brch %]</th></tr>
+<tr><th colspan="2">Alias</th><th>System</th><th>Status</th><th>Flags</th><th>Detail</th></tr>
 [% END %]
 <tr [% PROCESS cl bgfor=row.stage %]>
     <td><a 
@@ -82,6 +96,8 @@ See accompanying License file for license details
                 [%- IF row.stage != 'OK' %]Details[% ELSE %]Config[% END -%]</a></td>
 
     <td class="flags">[% FOREACH flag IN row.build_flags.split().sort() ; PROCESS img ; END %]</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>