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