Add a max_days param, default 10, to failures 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      python = '/img/python.png',
12      debug = '/img/bug.png',
13      pam => '/img/pam.png',
14      cassert => '/img/cassert.png',
15      openssl => '/img/ssl_icon.gif',
16      nls => '/img/translateicon.gif',
17      krb5 => '/img/krb.gif',
18      tcl => '/img/tcl.png',
19      vpath => '/img/vpath.png',
20      xml => '/img/xml.png',
21      'thread-safety' => '/img/threads.gif',
22      'integer-datetimes' = '/img/days.png',
23      }
24 -%]
25 [%- 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 %][%#
26                                                                                                                                                                                                           flag ; ' '
27 %][% END ; END -%]
28 [%- 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 %]" />
29 [%- ELSE %]&nbsp;[% END ; END -%]
30 [%- BLOCK cl %] class="[% SWITCH bgfor.replace('-.*','') -%]
31   [%- CASE 'OK' %]pass[% CASE 'ContribCheck' %]warn[% CASE [ 'Check' 'InstallCheck' ] %]warnx[% CASE %]fail[% END %]"
32 [%- END -%]
33 [% WRAPPER 'page.tt' 
34         title = 'PostgreSQL BuildFarm Status'
35         bodyclass = 'none'
36         pagebutton = 'status'
37 %]
38     <h1>PostgreSQL BuildFarm Status</h1>
39     <p>
40       Shown here is the latest status of each farm member 
41       for each branch it has reported on in the last 30 days.
42     </p>
43     <p>
44        Use the farm member link for history of that member 
45        on the relevant branch.
46     </p>
47 <table><tr><th class="head" rowspan="2">Legend</th>
48 [% FOREACH flagset IN flag_imgs %]
49 <td><img src="[% flagset.value %]" title="[% flagset.key %]" alt="[% flagset.key %]" height="16" width="16" class="inline"  align="center"/> =  [% flagset.key %]</td>
50 [% IF loop.count == 7 %]</tr><tr>[% END %]
51 [% END %]
52 </tr></table>
53 <br />
54     <table cellspacing="0">
55 [% brch = "" %]
56 [% FOREACH row IN statrows %]
57 [% IF row.branch != brch ; brch = row.branch %]
58 <tr><th class="head" colspan="5">Branch: [% brch %]</th></tr>
59 <tr><th colspan="2">Alias</th><th>System</th><th>Status</th><th>Flags</th></tr>
60 [% END %]
61 <tr [% PROCESS cl bgfor=row.stage %]>
62     <td><a 
63     href="show_history.pl?nm=[% row.sysname %]&amp;br=[% row.branch %]"
64     title="History"
65     >[% row.sysname %]</a></td>
66     <td>[% PROCESS sysnotes %]</td>
67     <td><span class="opsys">[% row.operating_system %]
68             [% row.os_version %]</span> <span class="compiler">
69             [%- row.compiler %]
70             [% row.compiler_version %]</span> <span class="arch">
71             [%- row.architecture %]</span></td>
72     <td class="status">
73             [%- row.when_ago | replace('\s','&nbsp;') %]&nbsp;ago&nbsp;
74             [% row.stage -%]
75             <a href="show_log.pl?nm=
76                [%- row.sysname %]&amp;dt=
77                [%- row.snapshot | uri %]">
78                 [%- IF row.stage != 'OK' %]Details[% ELSE %]Config[% END -%]</a></td>
79
80     <td class="flags">[% FOREACH flag IN row.build_flags.split().sort() ; PROCESS img ; END %]</td>
81 </tr>
82 [% END %]
83     </table>
84 [% END %]