forked from lix-project/hydra
Hydra/22: on job page, 'finished builds' shows nothing for old (non-current) jobs
This commit is contained in:
parent
742846e476
commit
2ef90804c6
|
@ -27,6 +27,14 @@ sub overview : Chained('job') PathPart('') Args(0) {
|
|||
|
||||
$c->stash->{currentBuilds} = [$c->stash->{job}->builds->search({iscurrent => 1}, { join => 'resultInfo', '+select' => ["resultInfo.releasename", "resultInfo.buildstatus"]
|
||||
, '+as' => ["releasename", "buildstatus"], order_by => 'system' })];
|
||||
|
||||
$c->stash->{lastBuilds} = [$c->stash->{job}->builds->search({}, { join => 'resultInfo', '+select' => ["resultInfo.releasename", "resultInfo.buildstatus"]
|
||||
, '+as' => ["releasename", "buildstatus"], order_by => 'system', rows => 5 })];
|
||||
|
||||
$c->stash->{runningBuilds} = [$c->stash->{job}->builds->search({iscurrent => 1}, { join => ['schedulingInfo', 'project'] , order_by => ["priority DESC", "timestamp"]
|
||||
, '+select' => ['project.enabled', 'schedulingInfo.priority', 'schedulingInfo.disabled', 'schedulingInfo.busy']
|
||||
, '+as' => ['enabled', 'priority', 'disabled', 'busy'] })];
|
||||
|
||||
$c->stash->{systems} = [$c->stash->{job}->builds->search({iscurrent => 1}, {select => ["system"], distinct => 1})];
|
||||
}
|
||||
|
||||
|
|
|
@ -17,11 +17,18 @@
|
|||
<!-- <li><a href="#tabs-statistics">Statistics</a></li> -->
|
||||
</ul>
|
||||
<div id="tabs-status">
|
||||
[% IF currentBuilds.size != 0 %]
|
||||
<h2>Finished builds</h2>
|
||||
[% INCLUDE renderBuildList builds=currentBuilds showStatusChange=0 %]
|
||||
[% IF runningBuilds %]
|
||||
[% ELSE %]
|
||||
[% IF lastBuilds.size != 0 %]
|
||||
<h2>Last 5 builds</h2>
|
||||
[% INCLUDE renderBuildList builds=lastBuilds showStatusChange=0 %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% IF runningBuilds.size != 0 %]
|
||||
<h2>Running builds</h2>
|
||||
[% INCLUDE renderBuildList builds=runningBuilds showStatusChange=0 %]
|
||||
[% INCLUDE renderBuildList builds=runningBuilds showSchedulingInfo=1 hideResultInfo=1 %]
|
||||
[% END %]
|
||||
</div>
|
||||
<div id="tabs-channels">
|
||||
|
|
Loading…
Reference in a new issue