Hydra/22: on job page, 'finished builds' shows nothing for old (non-current) jobs

[?]
Apr 23, 2010, 8:17 AM
777XFGVYXBMKXY562A2DZQ5YQLZJHIALIT7456TLUWS3HHCQ7E6QC

Dependencies

  • [2] ZI535LI6 * hydra: 'new' UI for project/jobset/job/build
  • [3] AKAXJDMW * Disable the statistics on the project, jobset and job pages for now
  • [*] DEMSSSB2 * Controller for jobs which inherits all actions in ListBuilds. So
  • [*] HUH62VDL show current builds on job page
  • [*] S6OISBQ3 * Mark the "current" builds in a jobset, i.e. those corresponding to
  • [*] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that

Change contents

  • edit in src/lib/Hydra/Controller/Job.pm at line 30
    [6.329]
    [7.0]
    $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'] })];
  • replacement in src/root/job.tt at line 20
    [2.18237][2.18237:18267]()
    <h2>Finished builds</h2>
    [2.18237]
    [2.18267]
    [% IF currentBuilds.size != 0 %]
    <h2>Finished builds</h2>
  • replacement in src/root/job.tt at line 23
    [2.18339][2.18339:18479]()
    [% IF runningBuilds %]
    <h2>Running builds</h2>
    [% INCLUDE renderBuildList builds=runningBuilds showStatusChange=0 %]
    [% END %]
    [2.18339]
    [2.18479]
    [% 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 showSchedulingInfo=1 hideResultInfo=1 %]
    [% END %]