]>
iEval git - gruntmaster-page.git/blob - lib/Gruntmaster/Page/Log/Entry.pm
08230bfaf8fa475895960943e58a5aa5dd98e340
1 package Gruntmaster
::Page
::Log
::Entry
;
6 use parent qw
/Exporter/;
7 our @EXPORT_OK = qw
/generate/;
8 our $VERSION = '0.001';
10 use constant TITLE
=> 'Job <tmpl_var id>';
13 use HTML
::Template
::Compiled
;
15 use POSIX qw
/strftime/;
16 use YAML
::Any qw
/LoadFile/;
17 use Gruntmaster
::Page qw
/header footer/;
23 <tr><th>Test number<th>Result<th>Time
25 <tmpl_loop tests><tr><td><tmpl_var id><td class="r<tmpl_var result>"><tmpl_var result_text><td><tmpl_var time>
31 $templates{$_} = header
($_, TITLE
) . $templates{$_} for keys %templates;
32 $templates{$_} .= footer
$_ for keys %templates;
35 my ($path, $lang) = @_;
36 $path = ($path =~ m
,log/(.*)/index
,)[0];
37 my $template = $templates{$lang};
39 my $htc = HTML
::Template
::Compiled
->new(scalarref
=> \
$template);
40 flock my $metafh = IO
::File
->new("<log/$path/meta.yml"), LOCK_SH
;
41 my $meta = LoadFile
"log/$path/meta.yml";
44 $_->{time} = sprintf "%.4fs", $_->{time};
46 } @
{$meta->{results
}};
48 $htc->param(id
=> $path);
49 $htc->param(tests
=> \
@tests);
This page took 0.045369 seconds and 4 git commands to generate.