forked from lix-project/hydra
Remove dead code
This commit is contained in:
parent
36032e4bed
commit
fec45d1f07
|
@ -23,8 +23,6 @@ sub overview : Chained('job') PathPart('') Args(0) {
|
||||||
|
|
||||||
$c->stash->{template} = 'job.tt';
|
$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->{currentBuilds} = [$c->stash->{job}->builds->search({finished => 1, iscurrent => 1}, { order_by => 'system' })];
|
||||||
|
|
||||||
$c->stash->{lastBuilds} =
|
$c->stash->{lastBuilds} =
|
||||||
|
|
|
@ -22,8 +22,6 @@ sub view : Chained('project') PathPart('') Args(0) {
|
||||||
|
|
||||||
$c->stash->{template} = 'project.tt';
|
$c->stash->{template} = 'project.tt';
|
||||||
|
|
||||||
#getBuildStats($c, scalar $c->stash->{project}->builds);
|
|
||||||
|
|
||||||
$c->stash->{views} = [$c->stash->{project}->views->all];
|
$c->stash->{views} = [$c->stash->{project}->views->all];
|
||||||
$c->stash->{jobsets} = [jobsetOverview($c, $c->stash->{project})];
|
$c->stash->{jobsets} = [jobsetOverview($c, $c->stash->{project})];
|
||||||
$c->stash->{releases} = [$c->stash->{project}->releases->search({},
|
$c->stash->{releases} = [$c->stash->{project}->releases->search({},
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Hydra::Helper::Nix;
|
||||||
|
|
||||||
our @ISA = qw(Exporter);
|
our @ISA = qw(Exporter);
|
||||||
our @EXPORT = qw(
|
our @EXPORT = qw(
|
||||||
getBuild getPreviousBuild getNextBuild getPreviousSuccessfulBuild getBuildStats
|
getBuild getPreviousBuild getNextBuild getPreviousSuccessfulBuild
|
||||||
error notFound
|
error notFound
|
||||||
requireLogin requireProjectOwner requireAdmin requirePost isAdmin isProjectOwner
|
requireLogin requireProjectOwner requireAdmin requirePost isAdmin isProjectOwner
|
||||||
trim
|
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 {
|
sub error {
|
||||||
my ($c, $msg) = @_;
|
my ($c, $msg) = @_;
|
||||||
$c->error($msg);
|
$c->error($msg);
|
||||||
|
|
Loading…
Reference in a new issue