Add testcases detail column to status page
[buildfarm-server.git] / templates / status.tt
index f471f2a6d77c1c484debcf4d39b250664f699c76..f861f9bf1ad0a5ee8101b93a9ed3a6bce83f380a 100644 (file)
@@ -29,6 +29,13 @@ See accompanying License file for license details
      #'integer-datetimes' => '/img/days.png',
      }
 -%]
+[%
+ res_imgs = {
+     P = '/img/t_good.gif',
+     F => '/img/t_fail.gif',
+     '.' => '/img/t_notdone.gif',
+     }
+-%]
 [%- 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 %][%#
                                                                                                                                                                                                          flag ; ' '
 %][% END ; END -%]
@@ -37,6 +44,8 @@ See accompanying License file for license details
 [%- BLOCK cl %] class="[% SWITCH bgfor.replace('-.*','') -%]
   [%- CASE 'OK' %]pass[% CASE 'ContribCheck' %]warn[% CASE [ 'Check' 'InstallCheck' ] %]warnx[% CASE %]fail[% END %]"
 [%- END -%]
+[%# The IF-backstop is ugly and I'm not understanding why the res_img lookup does not for for '.' -%]
+[%- 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 -%]
 [% WRAPPER 'page.tt' 
        title = 'Exim BuildFarm Status'
        bodyclass = 'none'
@@ -62,8 +71,8 @@ See accompanying License file for license details
 [% brch = "" %]
 [% FOREACH row IN statrows %]
 [% IF row.branch != brch ; brch = row.branch %]
-<tr><th class="head" colspan="5">Branch: [% brch %]</th></tr>
-<tr><th colspan="2">Alias</th><th>System</th><th>Status</th><th>Flags</th></tr>
+<tr><th class="head" colspan="6">Branch: [% brch %]</th></tr>
+<tr><th colspan="2">Alias</th><th>System</th><th>Status</th><th>Flags</th><th>Detail</th></tr>
 [% END %]
 <tr [% PROCESS cl bgfor=row.stage %]>
     <td><a 
@@ -86,6 +95,7 @@ See accompanying License file for license details
                 [%- IF row.stage != 'OK' %]Details[% ELSE %]Config[% END -%]</a></td>
 
     <td class="flags">[% FOREACH flag IN row.build_flags.split().sort() ; PROCESS img ; END %]</td>
+    <td class="tests">[% FOREACH test IN row.log_text.keys.nsort ; r = row.log_text.$test ; PROCESS test_result ; END %]</td>
 </tr>
 [% END %]
     </table>