2008-11-25 11:01:42 +00:00
|
|
|
package Hydra::View::TT;
|
2008-10-28 10:19:31 +00:00
|
|
|
|
|
|
|
use strict;
|
|
|
|
use base 'Catalyst::View::TT';
|
2013-01-22 21:48:02 +00:00
|
|
|
use Hydra::Helper::Nix;
|
2008-10-28 10:19:31 +00:00
|
|
|
|
2013-01-22 21:48:02 +00:00
|
|
|
__PACKAGE__->config(
|
|
|
|
TEMPLATE_EXTENSION => '.tt',
|
2013-02-05 13:00:09 +00:00
|
|
|
PRE_CHOMP => 1,
|
|
|
|
POST_CHOMP => 1,
|
2013-09-03 18:27:32 +00:00
|
|
|
expose_methods => [qw/buildLogExists buildStepLogExists/]);
|
2008-10-28 10:19:31 +00:00
|
|
|
|
2013-08-30 13:53:25 +00:00
|
|
|
sub buildLogExists {
|
|
|
|
my ($self, $c, $build) = @_;
|
|
|
|
my @outPaths = map { $_->path } $build->buildoutputs->all;
|
|
|
|
return defined findLog($c, $build->drvpath, @outPaths);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub buildStepLogExists {
|
|
|
|
my ($self, $c, $step) = @_;
|
|
|
|
my @outPaths = map { $_->path } $step->buildstepoutputs->all;
|
|
|
|
return defined findLog($c, $step->drvpath, @outPaths);
|
2013-04-26 11:23:34 +00:00
|
|
|
}
|
|
|
|
|
2008-10-28 10:19:31 +00:00
|
|
|
1;
|