Remove dead code

This commit is contained in:
Eelco Dolstra 2013-02-21 13:45:11 +01:00
parent 36032e4bed
commit fec45d1f07
3 changed files with 1 additions and 24 deletions

View file

@ -23,8 +23,6 @@ sub overview : Chained('job') PathPart('') Args(0) {
$c->stash->{template} = 'job.tt';
#getBuildStats($c, scalar $c->stash->{job}->builds);
$c->stash->{currentBuilds} = [$c->stash->{job}->builds->search({finished => 1, iscurrent => 1}, { order_by => 'system' })];
$c->stash->{lastBuilds} =

View file

@ -22,8 +22,6 @@ sub view : Chained('project') PathPart('') Args(0) {
$c->stash->{template} = 'project.tt';
#getBuildStats($c, scalar $c->stash->{project}->builds);
$c->stash->{views} = [$c->stash->{project}->views->all];
$c->stash->{jobsets} = [jobsetOverview($c, $c->stash->{project})];
$c->stash->{releases} = [$c->stash->{project}->releases->search({},

View file

@ -8,7 +8,7 @@ use Hydra::Helper::Nix;
our @ISA = qw(Exporter);
our @EXPORT = qw(
getBuild getPreviousBuild getNextBuild getPreviousSuccessfulBuild getBuildStats
getBuild getPreviousBuild getNextBuild getPreviousSuccessfulBuild
error notFound
requireLogin requireProjectOwner requireAdmin requirePost isAdmin isProjectOwner
trim
@ -81,25 +81,6 @@ sub getPreviousSuccessfulBuild {
}
sub getBuildStats {
my ($c, $builds) = @_;
$c->stash->{finishedBuilds} = $builds->search({finished => 1}) || 0;
$c->stash->{succeededBuilds} = $builds->search({finished => 1, buildStatus => 0}) || 0;
$c->stash->{scheduledBuilds} = $builds->search({finished => 0}) || 0;
$c->stash->{busyBuilds} = $builds->search({finished => 0, busy => 1}) || 0;
my $res;
$res = $builds->search({}, {select => {sum => 'stoptime - starttime'}, as => ['sum']})->first;
$c->stash->{totalBuildTime} = defined ($res) ? $res->get_column('sum') : 0 ;
}
sub error {
my ($c, $msg) = @_;
$c->error($msg);