e51062bb3131c5c7371e1824dfdc79aa6793664a
[buildfarm-server.git] / templates / status.tt
1 [%#
2
3 Copyright (c) 2003-2010, Andrew Dunstan
4
5 See accompanying License file for license details
6
7 -%]
8 [%
9  flag_imgs = {
10      dane =>    '/img/helmet.png',
11      doc =>     '/img/doc.png',
12      gnutls =>  '/img/gnutls_icon.gif',
13      ipv6 =>    '/img/6.png',
14      ldap =>    '/img/openldap_logo.jpg',
15      mysql =>   '/img/mysql_logo.png',
16      openssl => '/img/ssl_icon.gif',
17      perl =     '/img/camel.png',
18      pgsql =>   '/img/postgresql-icon-32.png',
19      spf =>   '/img/spf.png',
20      #test => '/img/hammer.jpeg',
21      #python => '/img/python.png',
22      #debug => '/img/bug.png',
23      #pam => '/img/pam.png',
24      #cassert => '/img/cassert.png',
25      #nls => '/img/translateicon.gif',
26      #krb5 => '/img/krb.gif',
27      #gssapi => '/img/gssapi.gif',
28      #tcl => '/img/tcl.png',
29      #vpath => '/img/vpath.png',
30      #xml => '/img/xml.png',
31      #'thread-safety' => '/img/threads.gif',
32      #'integer-datetimes' => '/img/days.png',
33      }
34 -%]
35 [%
36  res_imgs = {
37      P = '/img/t_good.gif',
38      F => '/img/t_fail.gif',
39      '.' => '/img/t_notdone.gif',
40      }
41 -%]
42 [%- 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 %][%#
43                                                                                                                                                                                                           flag ; ' '
44 %][% END ; END -%]
45 [%- 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 %]"/>
46 [%- ELSE %]&nbsp;[% END ; END -%]
47 [%- BLOCK cl %] class="[% SWITCH bgfor.replace('-.*','') -%]
48   [%- CASE 'OK' %]pass[% CASE 'ContribCheck' %]warn[% CASE [ 'Check' 'InstallCheck' ] %]warnx[% CASE %]fail[% END %]"
49 [%- END -%]
50 [%# The IF-backstop is ugly and I'm not understanding why the res_img lookup does not for for '.' -%]
51 [%- BLOCK colour ; IF res_imgs.$c.defined ; res_imgs.$c ; ELSE %]/img/t_notdone.gif [% END; END %]
52 [%- BLOCK colourbar %]<img src=[% PROCESS colour %] title="[% st %]-[% st + w - 1 %]" height=16 width=[% w %] class=inline align=bottom/>[%- END -%]
53 [% WRAPPER 'page.tt' 
54         title = 'Exim BuildFarm Status'
55         bodyclass = 'none'
56         pagebutton = 'status'
57 %]
58     <h1>Exim BuildFarm Status</h1>
59     <p>
60       Shown here is the latest status of each farm member 
61       for each branch it has reported on in the last 30 days.
62     </p>
63     <p>
64        Use the farm member link for history of that member 
65        on the relevant branch.
66     </p>
67 <table><tr><th class="head" rowspan="2">Legend</th>
68 [% FOREACH flagset IN flag_imgs %]
69 <td><img src=[% flagset.value %] title="[% flagset.key %]" alt="[% flagset.key %]" height=16 width=16 class=inline align=center/> =  [% flagset.key %]</td>
70 [% IF loop.count == 7 %]</tr><tr>[% END %]
71 [% END %]
72 </tr></table>
73 <br />
74     <table cellspacing="0">
75 [% brch = "" %]
76 [% FOREACH row IN statrows %]
77 [% IF row.branch != brch ; brch = row.branch %]
78 <tr><th class="head" colspan="6">Branch: [% brch %]</th></tr>
79 <tr><th colspan="2">Alias</th><th>System</th><th>Status</th><th>Flags</th><th>Detail</th></tr>
80 [% END %]
81 <tr [% PROCESS cl bgfor=row.stage %]>
82     <td><a 
83     href="show_history.pl?nm=[% row.sysname %]&amp;br=[% row.branch | uri %]"
84     title="History"
85     >[% row.sysname %]</a></td>
86     <td>[% PROCESS sysnotes %]</td>
87     <td><span class="opsys">[% row.operating_system %]
88             [% row.os_version %]</span> <span class="compiler">
89             [%- row.compiler %]
90             [% row.compiler_version %]</span> <span class="arch">
91             [%- row.architecture %]</span></td>
92     <td class="status">
93             [%- row.when_ago | replace('\s','&nbsp;') %]&nbsp;ago&nbsp;
94             [% row.stage -%]
95             [[% row.git_head_ref.substr(0,7) %]]
96             <a href="show_log.pl?nm=
97                [%- row.sysname %]&amp;dt=
98                [%- row.snapshot | uri %]">
99                 [%- IF row.stage != 'OK' %]Details[% ELSE %]Config[% END -%]</a></td>
100
101     <td class="flags">[% FOREACH flag IN row.build_flags.split().unique().sort() ; PROCESS img ; END %]</td>
102     <td class="tests">[% FOREACH range IN row.log_text ;
103         r = range.split(' '); c = r.0; st = r.1; w = r.2; PROCESS colourbar; END %]</td>
104 </tr>
105 [% END %]
106     </table>
107 [% END %]