-my %templates = (
- en => <<'HTML',
-<table border>
-<thead>
-<tr><th>Test number<th>Result<th>Time
-<tbody>
-<tmpl_loop tests><tr><td><tmpl_var id><td class="r<tmpl_var result>"><tmpl_var result_text><td><tmpl_var time>
-</tmpl_loop>
-</table>
-HTML
-);
-
-$templates{$_} = header($_, TITLE) . $templates{$_} for keys %templates;
-$templates{$_} .= footer $_ for keys %templates;
-
-sub generate{
- $_[0] =~ m,^(?:ct/([^/]+)/)?log/([^/]+)/index\.html$,;
- local $Gruntmaster::Data::contest = $1;
- my $id = $2;
-
- my $htc = HTML::Template::Compiled->new(scalarref => \$templates{$_[1]});
-
- my @tests = map {
- $_->{time} = sprintf "%.4fs", $_->{time};
- $_
- } @{job_results $id};