summaryrefslogtreecommitdiffstats
path: root/reports/xsl-transforms/xsl-transform-includes/text-templates.xsl
blob: 9f0314e1f0bca249341f8026967e4866bbaf19dc (plain)
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
<?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/Stale)+count(Statistics/Modified) > 0">

<xsl:text>

    </xsl:text>Node:<xsl:value-of select="HostInfo/@fqdn" /><xsl:text>
        </xsl:text>Time Ran: <xsl:value-of select="Statistics/@time" />.
<xsl:apply-templates select="Statistics" />
	</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">
<xsl:text>        </xsl:text>Node is clean; Everything has been satisfactorily configured.
</xsl:template>
<xsl:template match="Stale">
<xsl:text>        </xsl:text>This node did not run today-- it may be out of date.
</xsl:template>
<xsl:template match="Bad">
<xsl:text>        </xsl:text><xsl:value-of select="count(./*)" /> items did not verify and are considered Dirty:
        <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>
    </xsl:template>

<xsl:template match="Modified">
<xsl:text>

        </xsl:text><xsl:value-of select="count(./*)" /> items were modified in the last run.
    <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>
</xsl:template>

<xsl:template match="Extra">
<xsl:text>

        </xsl:text><xsl:value-of select="count(./*)" /> extra configuration elements on node.
    <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>
</xsl:template>

<xsl:template match="ConfigFile">
<xsl:text>
        </xsl:text>Config File: <xsl:value-of select="@name"/>
</xsl:template>

<xsl:template match="Package">
<xsl:text>
        </xsl:text>Package: <xsl:value-of select="@name"/>
</xsl:template>

<xsl:template match="Directory">
<xsl:text>
        </xsl:text>Directory: <xsl:value-of select="@name"/>
</xsl:template>

<xsl:template match="Service">
<xsl:text>
        </xsl:text>Service: <xsl:value-of select="@name"/>
</xsl:template>

<xsl:template match="SymLink">
<xsl:text>
        </xsl:text>SymLink: <xsl:value-of select="@name"/>
</xsl:template>
</xsl:stylesheet>