Move the store path size chart to the job page

The history is a property of the job, not individual builds.
This commit is contained in:
Eelco Dolstra
2014-10-07 11:45:17 +02:00
parent 5f474b252c
commit 0bb027e633
4 changed files with 93 additions and 141 deletions

View File

@ -89,6 +89,15 @@ sub closure_sizes : Chained('job') PathPart('closure-sizes') Args(0) {
}
sub output_sizes : Chained('job') PathPart('output-sizes') Args(0) {
my ($self, $c) = @_;
my @res = $c->stash->{job}->builds->search(
{ finished => 1, buildstatus => 0, size => { '!=', 0 } },
{ order_by => "id", columns => [ "id", "timestamp", "size" ] });
$self->status_ok($c, entity => [ map { { id => $_->id, timestamp => $_ ->timestamp, value => $_->size } } @res ]);
}
# Hydra::Base::Controller::ListBuilds needs this.
sub get_builds : Chained('job') PathPart('') CaptureArgs(0) {
my ($self, $c) = @_;