forked from lix-project/hydra
Fix Changes section on build page. Now shows the changes of the first evaluation a build was part of compared to the previous one. Also separated previous builds from the changes section, as that was confusing sometimes.
This commit is contained in:
parent
a1b5020562
commit
fd36d79581
|
@ -107,6 +107,11 @@ sub build_GET {
|
|||
entity => $build
|
||||
);
|
||||
|
||||
my ($eval2) = $c->stash->{eval}->jobset->jobsetevals->search(
|
||||
{ hasnewbuilds => 1, id => { '<', $c->stash->{eval}->id } },
|
||||
{ order_by => "id DESC", rows => 1 });
|
||||
$c->stash->{otherEval} = $eval2 if defined $eval2;
|
||||
|
||||
# If this is an aggregate build, get its constituents.
|
||||
$c->stash->{constituents} = [$c->stash->{build}->constituents_->search({}, {order_by => ["job"]})];
|
||||
}
|
||||
|
|
|
@ -224,8 +224,13 @@
|
|||
[% INCLUDE renderBuildSteps type="Failed" %]
|
||||
[% END %]
|
||||
|
||||
[% IF prevSuccessfulBuild %]
|
||||
[% IF otherEval %]
|
||||
<h3>Changes</h3>
|
||||
[% INCLUDE renderInputDiff inputs2=eval.jobsetevalinputs inputs1=otherEval.jobsetevalinputs %]
|
||||
[% END %]
|
||||
|
||||
[% IF prevSuccessfulBuild %]
|
||||
<h3>Previous builds</h3>
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<th>Last successful build [% INCLUDE renderDateTime timestamp = prevSuccessfulBuild.timestamp %]</th>
|
||||
|
@ -250,7 +255,6 @@
|
|||
[% IF prevSuccessfulBuild && firstBrokenBuild && firstBrokenBuild.id != build.id %]
|
||||
<td>[% INCLUDE renderInputDiff inputs1=prevSuccessfulBuild.inputs inputs2=firstBrokenBuild.inputs %]</td>
|
||||
[% END %]
|
||||
<td>[% INCLUDE renderInputDiff inputs1=prevSuccessfulBuild.inputs inputs2=build.inputs %]</td>
|
||||
</tr>
|
||||
</table>
|
||||
[% END %]
|
||||
|
@ -380,11 +384,6 @@
|
|||
|
||||
[% INCLUDE renderInputs inputs=build.inputs %]
|
||||
|
||||
[% IF prevBuild %]
|
||||
<h3>Changes since previous [% INCLUDE renderBuildLink build=prevBuild %]</h3>
|
||||
[% INCLUDE renderInputDiff inputs2=build.inputs inputs1=prevBuild.inputs %]
|
||||
[% END %]
|
||||
|
||||
[% ELSIF eval %]
|
||||
|
||||
[% INCLUDE renderInputs inputs=eval.jobsetevalinputs %]
|
||||
|
|
Loading…
Reference in a new issue