Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[FIXED JENKINS-25074] Make sure to call Job.getBuildHealthReports jus…
…t once per t:buildHealth render.
- Loading branch information
Showing
with
6 additions
and
2 deletions.
-
+3
−0
changelog.html
-
+3
−2
core/src/main/resources/lib/hudson/buildHealth.jelly
|
@@ -55,6 +55,9 @@ |
|
|
<!-- Record your changes in the trunk here. --> |
|
|
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=--> |
|
|
<ul class=image> |
|
|
<li class=bug> |
|
|
Build health computed repeatedly for a single Weather column cell. |
|
|
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-25074">issue 25074</a>) |
|
|
<li class=rfe> |
|
|
Missing workspace page should use 404 status code. |
|
|
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10450">issue 10450</a>) |
|
|
|
@@ -31,8 +31,9 @@ THE SOFTWARE. |
|
|
--> |
|
|
<?jelly escape-by-default='true'?> |
|
|
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> |
|
|
<j:set var="buildHealth" value="${job.buildHealth}"/> |
|
|
<j:set var="healthReports" value="${job.buildHealthReports}"/> |
|
|
<j:new var="emptyHealthReport" className="hudson.model.HealthReport"/> |
|
|
<j:set var="buildHealth" value="${empty(healthReports) ? emptyHealthReport : healthReports[0]}"/> |
|
|
<j:if test="${td}"><j:set var="useTdElement" value="x"/></j:if> |
|
|
<x:element name="${useTdElement!=null?'td':'div'}"> |
|
|
<x:attribute name="data">${buildHealth.score}</x:attribute> |
|
@@ -74,7 +75,7 @@ THE SOFTWARE. |
|
|
</tr> |
|
|
</thead> |
|
|
<tbody> |
|
|
<j:forEach var="rpt" items="${job.buildHealthReports}"> |
|
|
<j:forEach var="rpt" items="${healthReports}"> |
|
|
<tr> |
|
|
<td align="left"> |
|
|
<l:icon class="${rpt.iconClassName} icon-sm" /> |
|
|