forked from lix-project/hydra
Build.pm: Don't get isChannel using buildproducts.
We now have a column for that, so no need for counting rows which was a bit inefficient anyway, because we only would have needed the first row in the result. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
ba7402ed6c
commit
ed361a0145
|
@ -108,10 +108,6 @@ sub build_GET {
|
||||||
|
|
||||||
# If this is an aggregate build, get its constituents.
|
# If this is an aggregate build, get its constituents.
|
||||||
$c->stash->{constituents} = [$c->stash->{build}->constituents_->search({}, {order_by => ["job"]})];
|
$c->stash->{constituents} = [$c->stash->{build}->constituents_->search({}, {order_by => ["job"]})];
|
||||||
|
|
||||||
$c->stash->{isChannel} = $c->stash->{build}->buildproducts->search(
|
|
||||||
{type => "channel"}
|
|
||||||
)->count > 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@
|
||||||
<td>[% IF cachedBuild; INCLUDE renderFullBuildLink build=cachedBuild; ELSE %]<em>unknown</em>[% END %]</td>
|
<td>[% IF cachedBuild; INCLUDE renderFullBuildLink build=cachedBuild; ELSE %]<em>unknown</em>[% END %]</td>
|
||||||
</tr>
|
</tr>
|
||||||
[% END %]
|
[% END %]
|
||||||
[% IF (!isAggregate || !isChannel) && build.finished; actualBuild = build.iscachedbuild ? cachedBuild : build %]
|
[% IF (!isAggregate || !build.isChannel) && build.finished; actualBuild = build.iscachedbuild ? cachedBuild : build %]
|
||||||
[% IF actualBuild %]
|
[% IF actualBuild %]
|
||||||
<tr>
|
<tr>
|
||||||
<th>Duration:</th>
|
<th>Duration:</th>
|
||||||
|
@ -200,7 +200,7 @@
|
||||||
<td>[% INCLUDE renderDateTime timestamp = build.stoptime; %]</td>
|
<td>[% INCLUDE renderDateTime timestamp = build.stoptime; %]</td>
|
||||||
</tr>
|
</tr>
|
||||||
[% END %]
|
[% END %]
|
||||||
[% IF (!isAggregate || !isChannel) && buildLogExists(build) %]
|
[% IF (!isAggregate || !build.isChannel) && buildLogExists(build) %]
|
||||||
<tr>
|
<tr>
|
||||||
<th>Logfile:</th>
|
<th>Logfile:</th>
|
||||||
<td>
|
<td>
|
||||||
|
@ -215,7 +215,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
[% IF isChannel || (build.buildproducts && !isAggregate) %]
|
[% IF build.isChannel || (build.buildproducts && !isAggregate) %]
|
||||||
|
|
||||||
<h3>Build products</h3>
|
<h3>Build products</h3>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue