-$templates{$_} = header($_, TITLE) . $templates{$_} for keys %templates;
-$templates{$_} .= footer $_ for keys %templates;
-
-sub generate{
- my ($path, $lang) = @_;
- my $id = ($path =~ m,log/(.*)/index,)[0];
- $path =~ s,/index\.html,,;
- my $template = $templates{$lang};
-
- my $htc = HTML::Template::Compiled->new(scalarref => \$template);
- flock my $metafh = IO::File->new("<$path/meta.yml"), LOCK_SH;
- my $meta = LoadFile "$path/meta.yml";
-
- my @tests = map {
- $_->{time} = sprintf "%.4fs", $_->{time};
- $_
- } @{$meta->{results}};
-
- $htc->param(id => $id);
- $htc->param(tests => \@tests);
- $htc->output
+ $htc->param(id => $id);
+ $htc->param(tests => \@tests);
+ $htc->param(errors => job_errors $id)