aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2011-07-19 14:51:59 +0000
committerRob Austein <sra@hactrn.net>2011-07-19 14:51:59 +0000
commitcfeea77a28fb0bd97e08e31633843e298e4d5ed7 (patch)
tree2048be3613cb0d9c3f01810a3bad350eee5c42a9
parent5b0797809f761734fe1477795e60f63f5c1c7a49 (diff)
Subtotals
svn path=/rcynic-ng/rcynic.xsl; revision=3938
-rw-r--r--rcynic-ng/rcynic.xsl19
1 files changed, 15 insertions, 4 deletions
diff --git a/rcynic-ng/rcynic.xsl b/rcynic-ng/rcynic.xsl
index ed3c6e07..af161773 100644
--- a/rcynic-ng/rcynic.xsl
+++ b/rcynic-ng/rcynic.xsl
@@ -131,7 +131,7 @@
</xsl:for-each>
</xsl:variable>
- <!-- Calculate totals, figure out which columns to display -->
+ <!-- Calculate grand totals, figure out which columns to display -->
<xsl:variable name="totals">
<xsl:for-each select="rcynic-summary/labels/*">
<xsl:variable name="sum" select="count(com:node-set($host-data)/x[@status = name(current())])"/>
@@ -155,7 +155,7 @@
<!-- Show the total -->
<xsl:if test="$show-total != 0">
<br/>
- <h2>Totals</h2>
+ <h2>Grand Totals</h2>
<table class="summary" rules="all" border="1">
<thead>
<tr>
@@ -212,13 +212,12 @@
<xsl:otherwise>bad</xsl:otherwise>
</xsl:choose>
</xsl:variable>
-
<xsl:if test="$goodness + $badness + $warnings">
<tr class="{$mood}">
<td><xsl:value-of select="concat($generation, ' ', $fn2)"/></td>
<xsl:for-each select="com:node-set($totals)/x[@show = 1]">
<xsl:variable name="label" select="@name"/>
- <xsl:variable name="value" select="count(com:node-set($host-data)/x[@hostname = $hostname and @fn2 = $fn2 and @status = $label])"/>
+ <xsl:variable name="value" select="count(com:node-set($host-data)/x[@hostname = $hostname and @fn2 = $fn2 and @generation = $generation and @status = $label])"/>
<td>
<xsl:if test="$value != 0">
<xsl:value-of select="$value"/>
@@ -229,6 +228,18 @@
</xsl:if>
</xsl:for-each>
</xsl:for-each>
+ <tr>
+ <td>Total</td>
+ <xsl:for-each select="com:node-set($totals)/x[@show = 1]">
+ <xsl:variable name="label" select="@name"/>
+ <xsl:variable name="value" select="count(com:node-set($host-data)/x[@hostname = $hostname and @status = $label])"/>
+ <td>
+ <xsl:if test="$value != 0">
+ <xsl:value-of select="$value"/>
+ </xsl:if>
+ </td>
+ </xsl:for-each>
+ </tr>
</tbody>
</table>
</xsl:for-each>