Merge changes jgh did on krot
[buildfarm-server.git] / templates / status.tt
index 23fcff2ff4209dd1ef1897766aecf61117924588..573dfb06776b985836fcced4e15642a8fd4af2e6 100644 (file)
@@ -1,57 +1,63 @@
+[%#
+
+Copyright (c) 2003-2010, Andrew Dunstan
+
+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',
+     dane => '/img/helmet.png',
+     doc => '/img/doc.png',
+     gnutls => '/img/gnutls_icon.gif',
+     ldap => '/img/openldap_logo.jpg',
+     mysql => '/img/mysql_logo.png',
      openssl => '/img/ssl_icon.gif',
-     nls => '/img/translateicon.gif',
-     krb5 => '/img/krb.gif',
-     tcl => '/img/tcl.png',
-     vpath => '/img/vpath.png',
-     xml => '/img/xml.png',
-     'thread-safety' => '/img/threads.gif',
-     'integer-datetimes' = '/img/days.png',
-     git => '/img/git.png',
+     perl = '/img/camel.png',
+     pgsql => '/img/postgresql-icon-32.png',
+     ldap => '/img/openldap_logo.jpg',
+     dane => '/img/helmet.png',
+     doc => '/img/doc.png',
+     ipv6 => '/img/6.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',
+     #tcl => '/img/tcl.png',
+     #vpath => '/img/vpath.png',
+     #xml => '/img/xml.png',
+     #'thread-safety' => '/img/threads.gif',
+     #'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 %][%#
+[%- 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 %][%#
                                                                                                                                                                                                          flag ; ' '
 %][% END ; END -%]
+[%- BLOCK sysnotes ; IF row.sys_notes %]<img src=/img/notes.png height=16 width=16 title="[% row.sys_notes_ts.replace(' .*','') | html %]: [% row.sys_notes | html %]"/>
+[%- ELSE %]&nbsp;[% END ; END -%]
 [%- BLOCK cl %] class="[% SWITCH bgfor.replace('-.*','') -%]
   [%- CASE 'OK' %]pass[% CASE 'ContribCheck' %]warn[% CASE [ 'Check' 'InstallCheck' ] %]warnx[% CASE %]fail[% END %]"
 [%- END -%]
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-    <title>PostgreSQL BuildFarm Status</title>
-<link rel="icon" type="image/png" href="/elephant-icon.png" /> 
-    <link rel="stylesheet" rev="stylesheet" href="/inc/pgbf.css" charset="utf-8" />
-       <style type="text/css"><!--
-       li#status a { color:rgb(17,45,137); background: url(/inc/b/r.png) no-repeat 100% -20px; } 
-       li#status { background: url(/inc/b/l.png) no-repeat 0% -20px; }
-       --></style>
-</head>
-<body>
-<div id="wrapper">
-<div id="banner">
-<a href="/index.html"><img src="/inc/pgbuildfarm-banner.png" alt="PostgreSQL BuildFarm" width="800" height="73" /></a>
-<div id="nav">
-<ul>
-    <li id="home"><a href="/index.html" title="PostgreSQL BuildFarm Home">Home</a></li>
-    <li id="status"><a href="/cgi-bin/show_status.pl" title="Current results">Status</a></li>
-    <li id="members"><a href="/cgi-bin/show_members.pl" title="Platforms tested">Members</a></li>
-    <li id="register"><a href="/cgi-bin/register-form.pl" title="Join PostgreSQL BuildFarm">Register</a></li>
-    <li id="pgfoundry"><a href="http://pgfoundry.org/projects/pgbuildfarm/">PGFoundry</a></li>
-    <li id="postgresql.org"><a href="http://www.postgresql.org">PostgreSQL.org</a></li>
-</ul>
-</div><!-- nav -->
-</div><!-- banner -->
-<div id="main">
-    <h1>PostgreSQL BuildFarm Status</h1>
+[%# 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 -%]
+[% WRAPPER 'page.tt' 
+       title = 'Exim BuildFarm Status'
+       bodyclass = 'none'
+       pagebutton = 'status'
+%]
+    <h1>Exim BuildFarm Status</h1>
     <p>
       Shown here is the latest status of each farm member 
       for each branch it has reported on in the last 30 days.
@@ -62,7 +68,7 @@
     </p>
 <table><tr><th class="head" rowspan="2">Legend</th>
 [% FOREACH flagset IN flag_imgs %]
-<td><img src="[% flagset.value %]" title="[% flagset.key %]" alt="[% flagset.key %]" height="16" width="16" class="inline"  align="center"/> =  [% flagset.key %]</td>
+<td><img src=[% flagset.value %] title="[% flagset.key %]" alt="[% flagset.key %]" height=16 width=16 class=inline align=center/> =  [% flagset.key %]</td>
 [% IF loop.count == 7 %]</tr><tr>[% END %]
 [% END %]
 </tr></table>
 [% brch = "" %]
 [% FOREACH row IN statrows %]
 [% IF row.branch != brch ; brch = row.branch %]
-<tr><th class="head" colspan="4">Branch: [% brch %]</th></tr>
-<tr><th>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 
     href="show_history.pl?nm=[% row.sysname %]&amp;br=[% row.branch %]"
     title="History"
     >[% row.sysname %]</a></td>
+    <td>[% PROCESS sysnotes %]</td>
     <td><span class="opsys">[% row.operating_system %]
             [% row.os_version %]</span> <span class="compiler">
             [%- row.compiler %]
     <td class="status">
             [%- row.when_ago | replace('\s','&nbsp;') %]&nbsp;ago&nbsp;
             [% row.stage -%]
+           [[% row.git_head_ref.substr(0,7) %]]
             <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="flags">[% FOREACH flag IN row.build_flags.split().sort() ; PROCESS img ; END %]</td>
+    <td class="flags">[% FOREACH flag IN row.build_flags.split().unique().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>
-</div><!-- main -->
-<hr />
-<p style="text-align: center;">
-The PostgreSQL Buildfarm website is provided by: 
-<a href="http://www.commandprompt.com">CommandPrompt, 
-The PostgreSQL Company</a> <br />
-The PostgreSQL community makes it work!
-</p>
-</div><!-- wrapper -->
-  </body>
-</html>
-
-
-
-
-
-
-
-
+[% END %]