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