[ http://jira.codehaus.org/browse/MPDASHBOARD-22?page=comments#action_39248 ] Morten Kristiansen commented on MPDASHBOARD-22: -----------------------------------------------
Sorry. THIS is more correct: <tr> <td><b>Total</b></td> <x:forEach var="aggregatorName" select="project[1]/aggregator/@name"> <td> <b> <x:set var="theTotal" select="sum(//[EMAIL PROTECTED]'${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> > 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(//[EMAIL > PROTECTED]'${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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]