diff options
Diffstat (limited to 'reports/xsl-transforms/nodes-digest-html.xsl')
-rw-r--r-- | reports/xsl-transforms/nodes-digest-html.xsl | 107 |
1 files changed, 100 insertions, 7 deletions
diff --git a/reports/xsl-transforms/nodes-digest-html.xsl b/reports/xsl-transforms/nodes-digest-html.xsl index a03a5bde0..11521e14b 100644 --- a/reports/xsl-transforms/nodes-digest-html.xsl +++ b/reports/xsl-transforms/nodes-digest-html.xsl @@ -4,6 +4,13 @@ <xsl:include href="xsl-transform-includes/html-templates.xsl" /> <xsl:output method="xml" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> <xsl:template match="Report"> + <xsl:variable name="cleannodes" select="/Report/Node[count(Statistics/Good)>0]"/> + <xsl:variable name="dirtynodes" select="/Report/Node[count(Statistics/Bad)>0]"/> + <xsl:variable name="modifiednodes" select="/Report/Node[count(Statistics/Modified)>0]"/> + <xsl:variable name="stalenodes" select="/Report/Node[count(Statistics/Stale)>0]"/> + <xsl:variable name="unpingablenodes" select="/Report/Node[HostInfo/@pingable='N']"/> + <xsl:variable name="pingablenodes" select="/Report/Node[HostInfo/@pingable='Y']"/> + <html> <head> <title> @@ -35,33 +42,119 @@ <p class="indented"><xsl:value-of select="count(/Report/Node)" /> Nodes were included in your report.</p> <xsl:if test="count(/Report/Node/Statistics/Good) > 0"> <div class="clean"> - <span class="nodelisttitle"><xsl:value-of select="count(/Report/Node/Statistics/Good)" /> nodes are clean.<br /></span> + <span class="nodelisttitle"><a href="javascript:toggleLayer('goodsummary');" title="Click to Expand" class="commentLink"><xsl:value-of select="count(/Report/Node/Statistics/Good)" /></a> nodes are clean.<br /></span> + <div class="items" id="goodsummary"><ul class="plain"> + + <xsl:for-each select="Node"> + <xsl:sort select="HostInfo/@fqdn"/> + <xsl:if test="count(Statistics/Good) > 0"> + <li><b>Node: </b> + <tt><a href="#{HostInfo/@fqdn}"><xsl:value-of select="HostInfo/@fqdn" /></a></tt></li> + </xsl:if> + </xsl:for-each> + </ul></div> </div> </xsl:if> <xsl:if test="count(/Report/Node/Statistics/Bad) > 0"> <div class="bad"> - <span class="nodelisttitle"><xsl:value-of select="count(/Report/Node/Statistics/Bad)" /> nodes are bad.<br /></span> + <span class="nodelisttitle"><a href="javascript:toggleLayer('badsummary');" title="Click to Expand" class="commentLink"><xsl:value-of select="count(/Report/Node/Statistics/Bad)" /></a> nodes are bad.<br /></span> + + <div class="items" id="badsummary"><ul class="plain"> + <xsl:for-each select="Node"> + <xsl:sort select="HostInfo/@fqdn"/> + <xsl:if test="count(Statistics/Bad) > 0"> + <li><b>Node: </b> + <tt><a href="#{HostInfo/@fqdn}"><xsl:value-of select="HostInfo/@fqdn" /></a></tt></li> + </xsl:if> + </xsl:for-each> + </ul></div> </div> </xsl:if> <xsl:if test="count(/Report/Node/Statistics/Extra) > 0"> <div class="extra"> - <span class="nodelisttitle"><xsl:value-of select="count(/Report/Node/Statistics/Extra)" /> nodes have extra configuration. (includes both good and bad nodes)<br /></span> + <span class="nodelisttitle"><a href="javascript:toggleLayer('extrasummary');" title="Click to Expand" class="commentLink"><xsl:value-of select="count(/Report/Node/Statistics/Extra)" /></a> nodes have extra configuration. (includes both good and bad nodes)<br /></span> + <div class="items" id="extrasummary"><ul class="plain"> + <xsl:for-each select="Node"> + <xsl:sort select="HostInfo/@fqdn"/> + <xsl:if test="count(Statistics/Extra) > 0"> + <li><b>Node: </b> + <tt><a href="#{HostInfo/@fqdn}"><xsl:value-of select="HostInfo/@fqdn" /></a></tt></li> + </xsl:if> + </xsl:for-each> + </ul></div> + </div> </xsl:if> <xsl:if test="count(/Report/Node/Statistics/Modified) > 0"> <div class="modified"> - <span class="nodelisttitle"><xsl:value-of select="count(/Report/Node/Statistics/Modified)" /> nodes were modified in the last run. (includes both good and bad nodes)<br /></span> + <span class="nodelisttitle"><a href="javascript:toggleLayer('modifiedsummary');" title="Click to Expand" class="commentLink"><xsl:value-of select="count(/Report/Node/Statistics/Modified)" /></a> nodes were modified in the last run. (includes both good and bad nodes)<br /></span> + + <div class="items" id="modifiedsummary"><ul class="plain"> + <xsl:for-each select="Node"> + <xsl:sort select="HostInfo/@fqdn"/> + <xsl:if test="count(Statistics/Modified) > 0"> + <li><b>Node: </b> + <tt><a href="#{HostInfo/@fqdn}"><xsl:value-of select="HostInfo/@fqdn" /></a></tt></li> + </xsl:if> + </xsl:for-each> + </ul></div> </div> </xsl:if> - - <xsl:if test="count(/Report/Node/Statistics/Stale) > 0"> + + <xsl:if test="count($stalenodes[count(.|$pingablenodes)= count($pingablenodes)]) > 0"> <div class="warning"> - <span class="nodelisttitle"><xsl:value-of select="count(/Report/Node/Statistics/Stale)" /> nodes did not run this calendar day.<br /></span> + <span class="nodelisttitle"><a href="javascript:toggleLayer('vstalesummary');" title="Click to Expand" class="commentLink"><xsl:value-of select="count($stalenodes[count(.|$pingablenodes)= count($pingablenodes)])" /></a> nodes did not run within the last 24 hours but were pingable.<br /></span> + <div class="items" id="vstalesummary"><ul class="plain"> + <xsl:for-each select="Node"> + <xsl:sort select="HostInfo/@fqdn"/> + <xsl:if test="count(Statistics/Stale)-count(HostInfo[@pingable='N']) > 0"> + <li><b>Node: </b> + <tt><a href="#{HostInfo/@fqdn}"><xsl:value-of select="HostInfo/@fqdn" /></a></tt></li> + </xsl:if> + </xsl:for-each> + </ul></div> + </div> + </xsl:if> + + <xsl:if test="count(/Report/Node/Statistics/Stale) > 0"> + <div class="all-warning"> + <span class="nodelisttitle"><a href="javascript:toggleLayer('stalesummary');" title="Click to Expand" class="commentLink"><xsl:value-of select="count(/Report/Node/Statistics/Stale)" /></a> nodes did not run within the last 24 hours. (includes nodes up and down)<br /></span> + + <div class="items" id="stalesummary"><ul class="plain"> + <xsl:for-each select="Node"> + <xsl:sort select="HostInfo/@fqdn"/> + <xsl:if test="count(Statistics/Stale) > 0"> + <li><b>Node: </b> + <tt><a href="#{HostInfo/@fqdn}"><xsl:value-of select="HostInfo/@fqdn" /></a></tt></li> + </xsl:if> + </xsl:for-each> + </ul></div> + </div> </xsl:if> + + <xsl:if test="count(/Report/Node[HostInfo/@pingable='N']) > 0"> + <div class="down"> + <span class="nodelisttitle"><a href="javascript:toggleLayer('unpingablesummary');" title="Click to Expand" class="commentLink"><xsl:value-of select="count(/Report/Node/HostInfo[@pingable='N'])" /></a> nodes were down.<br /></span> + + <div class="items" id="unpingablesummary"><ul class="plain"> + <xsl:for-each select="Node"> + <xsl:sort select="HostInfo/@fqdn"/> + <xsl:if test="count(HostInfo[@pingable='N']) > 0"> + <li><b>Node: </b> + <tt><a href="#{HostInfo/@fqdn}"><xsl:value-of select="HostInfo/@fqdn" /></a></tt></li> + </xsl:if> + </xsl:for-each> + </ul></div> + </div> + </xsl:if> + + + + </div> <xsl:apply-templates select="Node"> |