Sort constituents by job name

This commit is contained in:
Eelco Dolstra 2013-08-15 03:28:21 +02:00
parent 06c74085b5
commit 72a0fa6ec5
2 changed files with 6 additions and 3 deletions

View file

@ -118,6 +118,9 @@ sub build_GET {
] ]
}) })
); );
# If this is an aggregate build, get its constituents.
$c->stash->{constituents} = [$c->stash->{build}->constituents_->search({}, {order_by => ["job"]})];
} }

View file

@ -7,7 +7,7 @@
[% project = build.project %] [% project = build.project %]
[% jobset = build.jobset %] [% jobset = build.jobset %]
[% job = build.job %] [% job = build.job %]
[% isAggregate = build.constituents_ ? 1 : 0 %] [% isAggregate = constituents ? 1 : 0 %]
[% BLOCK renderOutputs %] [% BLOCK renderOutputs %]
[% start=1; FOREACH output IN outputs %] [% start=1; FOREACH output IN outputs %]
@ -122,7 +122,7 @@
nrConstituents = 0; nrConstituents = 0;
nrFinished = 0; nrFinished = 0;
nrFailedConstituents = 0; nrFailedConstituents = 0;
FOREACH b IN build.constituents_; FOREACH b IN constituents;
nrConstituents = nrConstituents + 1; nrConstituents = nrConstituents + 1;
IF b.finished; nrFinished = nrFinished + 1; END; IF b.finished; nrFinished = nrFinished + 1; END;
IF b.finished && b.buildstatus != 0; nrFailedConstituents = nrFailedConstituents + 1; END; IF b.finished && b.buildstatus != 0; nrFailedConstituents = nrFailedConstituents + 1; END;
@ -267,7 +267,7 @@
<p>This build is an aggregate of the following builds:</p> <p>This build is an aggregate of the following builds:</p>
[% INCLUDE renderBuildList builds=build.constituents_ %] [% INCLUDE renderBuildList builds=constituents %]
</div> </div>