diff --git a/src/lib/Hydra/Controller/Job.pm b/src/lib/Hydra/Controller/Job.pm index db2a2333..def78c0a 100644 --- a/src/lib/Hydra/Controller/Job.pm +++ b/src/lib/Hydra/Controller/Job.pm @@ -80,6 +80,15 @@ sub overview : Chained('job') PathPart('') Args(0) { } +sub closure_sizes : Chained('job') PathPart('closure-sizes') Args(0) { + my ($self, $c) = @_; + my @res = $c->stash->{job}->builds->search( + { finished => 1, buildstatus => 0, closuresize => { '!=', 0 } }, + { order_by => "id", columns => [ "id", "timestamp", "closuresize" ] }); + $self->status_ok($c, entity => [ map { { id => $_->id, timestamp => $_ ->timestamp, value => $_->closuresize } } @res ]); +} + + # Hydra::Base::Controller::ListBuilds needs this. sub get_builds : Chained('job') PathPart('') CaptureArgs(0) { my ($self, $c) = @_; diff --git a/src/root/common.tt b/src/root/common.tt index 8a108867..6300bdd9 100644 --- a/src/root/common.tt +++ b/src/root/common.tt @@ -527,4 +527,10 @@ BLOCK renderJobsetOverview %] [% END; +BLOCK includeFlot %] + + +[% END; + + %] diff --git a/src/root/job.tt b/src/root/job.tt index bce2b7d7..1905faf1 100644 --- a/src/root/job.tt +++ b/src/root/job.tt @@ -5,6 +5,8 @@ [% PROCESS common.tt %] [% hideProjectName=1 hideJobsetName=1 hideJobName=1 %] +[% INCLUDE includeFlot %] + [% IF !jobExists(job) %]