You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Morten Kristiansen (JIRA)" <ji...@codehaus.org> on 2005/05/18 09:27:35 UTC
[jira] Commented: (MPDASHBOARD-22) Add "Total" to dashboard report
[ http://jira.codehaus.org/browse/MPDASHBOARD-22?page=comments#action_39243 ]
Morten Kristiansen commented on MPDASHBOARD-22:
-----------------------------------------------
Here's the new N/A code:
<tr>
<td><b>Total</b></td>
<x:forEach var="aggregatorName" select="project[1]/aggregator/@name">
<td>
<b>
<x:set var="theTotal" select="sum(//aggregator[@name='${aggregatorName.value}'][not(text()='-')][text()])"/>
<j:if test="${theTotal == 'NaN'}">
<j:set var="theTotal" value="N/A" />
</j:if>
<x:expr select="round(${theTotal})" />
</b>
</td>
</x:forEach>
</tr>
> Add "Total" to dashboard report
> -------------------------------
>
> Key: MPDASHBOARD-22
> URL: http://jira.codehaus.org/browse/MPDASHBOARD-22
> Project: maven-dashboard-plugin
> Type: New Feature
> Versions: 1.7
> Reporter: Morten Kristiansen
> Assignee: Vincent Massol
> Priority: Trivial
> Fix For: 1.8
> Attachments: dashboard-total.png
>
>
> Modify jsl to include a "Total" row at bottom of table. See attached image. My code isn't 100%, but as you see it will calculate values correct even if there are some "-" rows. For rows like "xx %", NaN will show up.
> Jsl code is quite straight forward (could propably be re-written; my xpath knowledge isn't _that_ good):
> <tr>
> <td><b>Total</b></td>
> <x:forEach var="aggregatorName" select="project[1]/aggregator/@name">
> <td>
> <b>
> <x:expr select="sum(//aggregator[@name='${aggregatorName.value}'][not(text()='-')][text()])"/>
> </b>
> </td>
> </x:forEach>
> </tr>
> Or do you want a scm diff on this?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org