]>
Commit | Line | Data |
---|---|---|
42546e6c MG |
1 | package Gruntmaster::Page::Log::Entry; |
2 | ||
3 | use 5.014000; | |
4 | use strict; | |
5 | use warnings; | |
bb95f538 MG |
6 | use Gruntmaster::Page::Base log_entry => 'Job <tmpl_var id>'; |
7 | our @ISA = qw/Gruntmaster::Page::Base/; | |
42546e6c MG |
8 | our $VERSION = '0.001'; |
9 | ||
bb95f538 | 10 | sub _generate{ |
191f4979 MG |
11 | my ($self, $htc, $lang, $env, $ct, $id) = @_; |
12 | debug $env => "language is '$lang', contest is '$ct' and id is '$id'"; | |
3c53f795 | 13 | local $Gruntmaster::Data::contest = $ct if $ct; |
cd9af27e | 14 | |
b83e43dc MG |
15 | my @tests = (); |
16 | ||
17 | eval { | |
18 | @tests = map { | |
19 | $_->{time} = sprintf "%.4fs", $_->{time}; | |
20 | $_ | |
21 | } @{job_results $id}; | |
22 | }; | |
cd9af27e MG |
23 | |
24 | $htc->param(id => $id); | |
25 | $htc->param(tests => \@tests); | |
7f0f55d8 | 26 | $htc->param(errors => job_errors $id) |
42546e6c MG |
27 | } |
28 | ||
29 | 1 |