diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 411065d3..9a702ea8 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -405,32 +405,6 @@ sub runtime_deps : Chained('buildChain') PathPart('runtime-deps') { } -sub history_graphs : Chained('buildChain') PathPart('history-graphs') { - my ($self, $c) = @_; - my $build = $c->stash->{build}; - if ($build->finished) { - $c->stash->{prevBuilds} = [$c->model('DB::Builds')->search( - { project => $c->stash->{project}->name - , jobset => $c->stash->{jobset}->name - , job => $c->stash->{job}->name - , 'me.system' => $build->system - , finished => 1 - , buildstatus => 0 - , 'me.id' => { '<=' => $build->id } - } - , { join => "actualBuildStep" - , "+select" => ["actualBuildStep.stoptime - actualBuildStep.starttime"] - , "+as" => ["actualBuildTime"] - , order_by => "me.id DESC" - , rows => 50 - } - ) - ]; - } - $c->stash->{template} = 'build-history-tab.tt'; -} - - sub nix : Chained('buildChain') PathPart('nix') CaptureArgs(0) { my ($self, $c) = @_; diff --git a/src/lib/Hydra/Controller/Job.pm b/src/lib/Hydra/Controller/Job.pm index aa708bb2..274d9604 100644 --- a/src/lib/Hydra/Controller/Job.pm +++ b/src/lib/Hydra/Controller/Job.pm @@ -80,6 +80,18 @@ sub overview : Chained('job') PathPart('') Args(0) { } +sub build_times : Chained('job') PathPart('build-times') Args(0) { + my ($self, $c) = @_; + my @res = $c->stash->{job}->builds->search( + { finished => 1, buildstatus => 0, closuresize => { '!=', 0 } }, + { join => "actualBuildStep" + , "+select" => ["actualBuildStep.stoptime - actualBuildStep.starttime"] + , "+as" => ["actualBuildTime"], + , order_by => "id" }); + $self->status_ok($c, entity => [ map { { id => $_->id, timestamp => $_ ->timestamp, value => $_->get_column('actualBuildTime') } } @res ]); +} + + sub closure_sizes : Chained('job') PathPart('closure-sizes') Args(0) { my ($self, $c) = @_; my @res = $c->stash->{job}->builds->search( diff --git a/src/root/build-history-tab.tt b/src/root/build-history-tab.tt deleted file mode 100644 index 8d274f71..00000000 --- a/src/root/build-history-tab.tt +++ /dev/null @@ -1,73 +0,0 @@ -[% PROCESS common.tt %] -[% PROCESS "product-list.tt" %] -[% USE HTML %] -[% USE Date %] - -