]>
iEval git - gruntmaster-page.git/blob - lib/Gruntmaster/Page/Log/Entry.pm
1 package Gruntmaster
::Page
::Log
::Entry
;
6 use parent qw
/Exporter/;
7 our @EXPORT_OK = qw
/generate/;
8 our $VERSION = '0.001';
10 use HTML
::Template
::Compiled
;
11 use POSIX qw
/strftime/;
12 use Gruntmaster
::Page
::Common qw
/cook_templates reload_templates/;
13 use Gruntmaster
::Data qw
/job_results/;
15 my %orig_templates = (
19 <tr><th>Test number<th>Result<th>Time
21 <tmpl_loop tests><tr><td><tmpl_var id><td class="r<tmpl_var result>"><tmpl_var result_text><td><tmpl_var time>
27 my %templates = cook_templates
%orig_templates, log_entry
=> 'Job <tmpl_var id>';
30 %templates = cook_templates
%orig_templates, log_entry
=> 'Job <tmpl_var id>' if reload_templates
;
31 $_[0] =~ m
,^(?
:ct
/([^/]+)/)?log/job
/([^/]+)\
.html
$,;
32 local $Gruntmaster::Data
::contest
= $1;
35 my $htc = HTML
::Template
::Compiled
->new(scalarref
=> \
$templates{$_[1]});
38 $_->{time} = sprintf "%.4fs", $_->{time};
42 $htc->param(id
=> $id);
43 $htc->param(tests
=> \
@tests);
This page took 0.048349 seconds and 5 git commands to generate.