More efficient html for detail column
[buildfarm-server.git] / templates / status.tt
index f861f9bf1ad0a5ee8101b93a9ed3a6bce83f380a..29be4e32d59a176829e427f17144197215588835 100644 (file)
@@ -45,7 +45,8 @@ See accompanying License file for license details
   [%- 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 -%]
+[%- BLOCK colour ; IF res_imgs.$c.defined ; res_imgs.$c ; ELSE %]/img/t_notdone.gif [% END; END %]
+[%- BLOCK colourbar %]<img src="[% PROCESS colour %]" title="[% st %]" alt="[% c %]" height="16" width="[% w %]" class="inline" align="bottom" />[%- END -%]
 [% WRAPPER 'page.tt' 
        title = 'Exim BuildFarm Status'
        bodyclass = 'none'
@@ -95,7 +96,8 @@ 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>
+    <td class="tests">[% FOREACH range IN row.log_text ;
+       r = range.split(' '); c = r.0; st = r.1; w = r.2; PROCESS colourbar; END %]</td>
 </tr>
 [% END %]
     </table>