Detail on the per-animal history page
[buildfarm-server.git] / templates / history.tt
1 [%#
2
3 Copyright (c) 2003-2010, Andrew Dunstan
4
5 See accompanying License file for license details
6
7 -%]
8 [%- BLOCK cl %] class="[% SWITCH bgfor -%]
9   [%- CASE 'OK' %]pass[% CASE 'ContribCheck' %]warn[% CASE [ 'Check' 'InstallCheck' ] %]warnx[% CASE %]fail[% END %]"
10 [%- END -%]
11 [% WRAPPER 'page.tt' 
12         title = 'Exim BuildFarm History'
13         bodyclass = 'history'
14         pagebutton = 'none'
15 %]
16 <h1>Exim BuildFarm Status History</h1>
17   <table cellspacing="0">
18     <tr><th class="head" colspan="3">System Detail</th></tr>
19     <tr class="member"><th>Farm member</th><td>[% member %]</td></tr>
20     <tr><th>OS</th><td>[% statrows.0.operating_system %] [% statrows.0.os_version %]</td></tr>
21     <tr><th>Compiler</th><td>[% statrows.0.compiler %] [% statrows.0.compiler_version %]</td></tr>
22     <tr><th>Architecture</th><td>[% statrows.0.architecture %]</td></tr>
23     <tr><th>Owner</th><td>[% statrows.0.owner_email %]</td></tr>
24   </table>
25 [% IF statrows.0.sys_notes %]
26     <br />
27     <table>
28      <tr>
29        <th class="head" rowspan="2">System Notes</th>
30        <th>Date</th>
31        <th>Notes</th>
32      </tr>
33      <tr>
34       <td>[% statrows.0.sys_notes_date %]</td>
35       <td>[% statrows.0.sys_notes %]</td>
36      </tr>
37    </table>
38 [% END %]
39   <h3>Branch: [% branch %][% IF statrows.size >= hm %] (last [% hm %] entries shown)[% END %]</h3>
40 [%
41  res_imgs = {
42      P = '/img/t_good.gif',
43      F => '/img/t_fail.gif',
44      '.' => '/img/t_notdone.gif',
45      }
46 -%]
47 [%# The IF-backstop is ugly and I'm not understanding why the res_img lookup does not for for '.' -%]
48 [%- BLOCK colour ; IF res_imgs.$c.defined ; res_imgs.$c ; ELSE %]/img/t_notdone.gif [% END; END %]
49 [%- BLOCK colourbar %]<img src="[% PROCESS colour %]" title="[% st %]" alt="[% c %]" height="16" width="[% w %]" class="inline" align="bottom" />[%- END -%]
50 [% BLOCK stdet %]
51     <tr [% PROCESS cl bgfor=row.stage %]>
52       <td>[%- row.when_ago | replace('\s','&nbsp;') %]&nbsp;ago&nbsp;</td>
53       <td class="status">[% row.stage -%]</td>
54       <td class="status"><a href="show_log.pl?nm=
55                [%- row.sysname %]&amp;dt=
56                [%- row.snapshot | uri %]">
57                 [%- IF row.stage != 'OK' %]Details[% ELSE %]Config[% END -%]</a></td>
58       <td class="tests">[% FOREACH range IN row.log_text ;
59         r = range.split(' '); c = r.0; st = r.1; w = r.2; PROCESS colourbar; END %]</td>
60     </tr>
61 [% END %]
62     <td><table cellspacing="0">
63         [% FOREACH xrow IN statrows %][% PROCESS stdet row=xrow %][% END %]
64     </table></td>
65 [% END %]