提交 f463abbe 编写于 作者: J Jesse Glick

[FIXED JENKINS-25074] Make sure to call Job.getBuildHealthReports just once...

[FIXED JENKINS-25074] Make sure to call Job.getBuildHealthReports just once per t:buildHealth render.
上级 9c96f3dc
......@@ -55,6 +55,9 @@ Upcoming changes</a>
<!-- 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" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册