/usr/share/bcfg2/xsl-transforms/xsl-transform-includes/html-templates.xsl is in bcfg2-server 1.4.0~pre2+git141-g6d40dace6358-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | <?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://www.w3.org/1999/xhtml">
<xsl:template match="Node">
<xsl:if test="count(Statistics/Good)+count(Statistics/Bad)+count(Statistics/Extra)+count(Statistics/Modified)+count(Statistics/Stale) > 0">
<a name="{Client/@name}}"></a>
<div class="nodebox">
<span class="notebox">Time Ran: <xsl:value-of select="Statistics/@time" /></span>
<span class="configbox">(<xsl:value-of select="Client/@profile" />)</span>
<table class="invisitable">
<tr><td width="43%"><h2>Node: <span class="nodename"><xsl:value-of select="Client/@name" /></span></h2></td>
<td width="23%"><xsl:if test="Statistics/@revision > -1" > Revision: <xsl:value-of select="Statistics/@revision" /></xsl:if></td>
<td width="33%"><div class="statusborder">
<div class="greenbar" style="width: {((Statistics/@good) div (Statistics/@total))*100}%;"><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text></div>
<div class="redbar" style="width: {(((Statistics/@total)-(Statistics/@good)) div (Statistics/@total))*100}%;"><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text></div>
</div>
</td></tr>
</table>
<xsl:apply-templates select="Statistics" />
</div>
</xsl:if>
</xsl:template>
<xsl:template match="Statistics">
<xsl:apply-templates select="Stale" />
<xsl:apply-templates select="Good" />
<xsl:apply-templates select="Bad" />
<xsl:apply-templates select="Modified" />
<xsl:apply-templates select="Extra" />
</xsl:template>
<xsl:template match="Good">
<div class="clean">
<span class="nodelisttitle">Node is clean; Everything has been satisfactorily configured.</span>
</div>
</xsl:template>
<xsl:template match="Stale">
<div class="warning">
<span class="nodelisttitle">This node did not run within the last 24 hours-- it may be out of date.</span>
</div>
</xsl:template>
<xsl:template match="Bad">
<div class="bad">
<span class="nodelisttitle"><a href="javascript:toggleLayer('{generate-id(.)}');" title="Click to expand" class="commentLink"><xsl:value-of select="count(./*)" /></a> items did not verify and are considered Dirty.<br /></span>
<div class="items" id="{generate-id(.)}"><ul class="plain">
<xsl:apply-templates select="ConfigFile">
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:apply-templates select="Directory">
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:apply-templates select="Package">
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:apply-templates select="Service">
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:apply-templates select="SymLink">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</ul></div>
</div>
</xsl:template>
<xsl:template match="Modified">
<xsl:if test='count(./*) > 0'>
<div class="modified">
<span class="nodelisttitle"><a href="javascript:toggleLayer('{generate-id(.)}');" title="Click to Expand" class="commentLink"><xsl:value-of select="count(./*)" /></a> items were modified in the last run.<br /></span>
<div class="items" id="{generate-id(.)}"><ul class="plain">
<xsl:apply-templates select="ConfigFile">
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:apply-templates select="Directory">
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:apply-templates select="Package">
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:apply-templates select="Service">
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:apply-templates select="SymLink">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</ul></div>
</div>
</xsl:if>
</xsl:template>
<xsl:template match="Extra">
<xsl:if test='count(./*) > 0'>
<div class="extra">
<span class="nodelisttitle"><a href="javascript:toggleLayer('{generate-id(.)}');" title="Click to Expand" class="commentLink"><xsl:value-of select="count(./*)" /></a> extra configuration elements on node.<br /></span>
<div class="items" id="{generate-id(.)}"><ul class="plain">
<xsl:apply-templates select="ConfigFile">
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:apply-templates select="Directory">
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:apply-templates select="Package">
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:apply-templates select="Service">
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:apply-templates select="SymLink">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</ul></div>
</div>
</xsl:if>
</xsl:template>
<xsl:template match="ConfigFile">
<li><b>Config File: </b>
<tt><xsl:value-of select="@name"/></tt></li>
</xsl:template>
<xsl:template match="Package">
<li><b>Package: </b>
<tt><xsl:value-of select="@name"/></tt></li>
</xsl:template>
<xsl:template match="Directory">
<li><b>Directory: </b>
<tt><xsl:value-of select="@name"/></tt></li>
</xsl:template>
<xsl:template match="Service">
<li><b>Service: </b>
<tt><xsl:value-of select="@name"/></tt></li>
</xsl:template>
<xsl:template match="SymLink">
<li><b>SymLink: </b>
<tt><xsl:value-of select="@name"/></tt></li>
</xsl:template>
</xsl:stylesheet>
|