On aggregate job pages, show a matrix showing all the constituent builds
[?]
Aug 26, 2013, 4:58 PM
CQQSJLONTAKIWT4AEEDZFLFAFCSIPEGWLBJDJIS7VJK6FJ3LZ2RACDependencies
- [2]
5GRW5XU4Job page: Put latest builds on top - [3]
R6B5CAFFLet Builds.timestamp refer to the time the build was added - [4]
2QISRMJKJob page: show queued as well as running builds - [5]
777XFGVYHydra/22: on job page, 'finished builds' shows nothing for old (non-current) jobs - [6]
MOX7XJ2EMerge the BuildSchedulingInfo table into the Builds table - [7]
CQTN62OHDie tabs die - [8]
3PNG7NIBRemove trailing whitespace - [*]
DEMSSSB2* Controller for jobs which inherits all actions in ListBuilds. So - [*]
ODNCGFQ5* Improved the navigation bar: don't include all projects (since that - [*]
WGUKOIQZFix indentation
Change contents
- edit in src/lib/Hydra/Controller/Job.pm at line 23
my $job = $c->stash->{job}; - replacement in src/lib/Hydra/Controller/Job.pm at line 28
[ $c->stash->{job}->builds->search({ finished => 1 },[ $job->builds->search({ finished => 1 }, - replacement in src/lib/Hydra/Controller/Job.pm at line 32
$c->stash->{job}->builds->search($job->builds->search( - edit in src/lib/Hydra/Controller/Job.pm at line 40
# If this is an aggregate job, then get its constituents.my @constituents = $c->model('DB::Builds')->search({ aggregate => { -in => $job->builds->search({}, { columns => ["id"], order_by => "id desc", rows => 10 })->as_query } },{ join => 'aggregateconstituents_constituents',columns => ['id', 'job', 'finished', 'buildstatus'],+select => ['aggregateconstituents_constituents.aggregate'],+as => ['aggregate']});my $aggregates = {};my %constituentJobs;foreach my $b (@constituents) {my $jobName = $b->get_column('job');$aggregates->{$b->get_column('aggregate')}->{$jobName} ={ id => $b->id, finished => $b->finished, buildstatus => $b->buildstatus};$constituentJobs{$jobName} = 1;}$c->stash->{aggregates} = $aggregates;$c->stash->{constituentJobs} = [sort (keys %constituentJobs)]; - edit in src/root/job.tt at line 7[12.105][2.226]
[% IF constituentJobs.size > 0 %]<li><a href="#tabs-constituents" data-toggle="tab">Constituents</a></li>[% END %] - edit in src/root/job.tt at line 26[12.816][12.816]
[% IF constituentJobs.size > 0 %]<div id="tabs-constituents" class="tab-pane"><table class="table table-striped table-condensed"><thead><tr><th>#</th>[% FOREACH j IN constituentJobs %]<th>[% HTML.escape(j) %]</th>[% END %]</tr></thead><tbody>[% FOREACH agg IN aggregates.keys.nsort.reverse %]<tr><td><a class="row-link" href="[% c.uri_for('/build' agg) %]">[% agg %]</a></td>[% FOREACH j IN constituentJobs %]<td>[% r = aggregates.$agg.$j; IF r.id %]<a href="[% c.uri_for('/build' r.id) %]">[% INCLUDE renderBuildStatusIcon size=16 build=r %]</a>[% END %]</td>[% END %]</tr>[% END %]</tbody></table><hr/><table class="table table-striped table-condensed"><thead><tr><th>#</th>[% FOREACH j IN constituentJobs %]<th>[% HTML.escape(j) %]</th>[% END %]</tr></thead><tbody>[% FOREACH agg IN aggregates.keys.nsort.reverse %]<tr><td><a class="row-link" href="[% c.uri_for('/build' agg) %]">[% agg %]</a></td>[% FOREACH j IN constituentJobs %]<td>[% r = aggregates.$agg.$j; IF r.id %]<a href="[% c.uri_for('/build' r.id) %]">[% INCLUDE renderBuildStatusIcon size=16 build=r %]</a>[% END %]</td>[% END %]</tr>[% END %]</tbody></table></div>[% END %]