Finished applying MPDASHBOARD-22 (replaces NaN with N/A for totals that are not numbers)

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@170720 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
vmassol
2005-05-18 08:09:55 +00:00
parent 67c00be2b9
commit 8ebeed204e

View File

@@ -59,11 +59,19 @@
<x:forEach var="aggregatorName" select="project[1]/aggregator/@name">
<td>
<b>
<x:expr select="sum(//aggregator[@name='${aggregatorName.value}'][not(text()='-')][text()])"/>
<x:set var="theTotal" select="sum(//aggregator[@name='${aggregatorName.value}'][not(text()='-')][text()])"/>
<j:choose>
<j:when test="${theTotal == 'NaN'}">
<x:expr select="string('N/A')" />
</j:when>
<j:otherwise>
<x:expr select="round(${theTotal})" />
</j:otherwise>
</j:choose>
</b>
</td>
</x:forEach>
</tr>
</tr>
</table>
</section>