forked from Kitware/CDash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewDynamicAnalysis.xsl
143 lines (125 loc) · 4.51 KB
/
viewDynamicAnalysis.xsl
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
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
<xsl:include href="header.xsl"/>
<xsl:include href="footer.xsl"/>
<!-- Local includes -->
<xsl:include href="local/footer.xsl"/>
<xsl:include href="local/header.xsl"/>
<xsl:output method="xml" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<xsl:template match="/">
<html>
<head>
<title><xsl:value-of select="cdash/title"/></title>
<meta name="robots" content="noindex,nofollow" />
<link rel="StyleSheet" type="text/css">
<xsl:attribute name="href"><xsl:value-of select="cdash/cssfile"/></xsl:attribute>
</link>
<xsl:call-template name="headscripts"/>
</head>
<body bgcolor="#ffffff">
<xsl:choose>
<xsl:when test="/cdash/uselocaldirectory=1">
<xsl:call-template name="header_local"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="header"/>
</xsl:otherwise>
</xsl:choose>
<br/>
<!-- Main -->
<br/>
<h3>Dynamic analysis started on <xsl:value-of select="cdash/build/buildtime"/></h3>
<table border="0">
<tr>
<td align="right"><b>Site Name:</b></td>
<td><xsl:value-of select="cdash/build/site"/></td>
</tr>
<tr>
<td align="right"><b>Build Name:</b></td>
<td><xsl:value-of select="cdash/build/buildname"/></td>
</tr>
</table>
<table xmlns:lxslt="http://xml.apache.org/xslt" cellspacing="0">
<tr>
<th>Name</th>
<th>Status</th>
<xsl:for-each select="cdash/defecttypes">
<th>
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
<xsl:value-of select="type"/>
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
</th>
</xsl:for-each>
<th>Labels</th>
</tr>
<xsl:for-each select="cdash/dynamicanalysis">
<tr align="center">
<xsl:attribute name="bgcolor"><xsl:value-of select="bgcolor"/></xsl:attribute>
<td align="left"><a>
<xsl:attribute name="href">viewDynamicAnalysisFile.php?id=<xsl:value-of select="id"/></xsl:attribute>
<xsl:value-of select="name"/>
</a></td>
<td>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="status='Passed'">
normal
</xsl:when>
<xsl:otherwise>
error
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="status"/></td>
<!-- the various defects are handled by this template -->
<xsl:call-template name="defect-columns">
<xsl:with-param name="context" select="."/>
</xsl:call-template>
<!-- Labels -->
<td>
<xsl:for-each select="labels/label">
<xsl:if test="position() > 1">,
<xsl:text disable-output-escaping="yes"> </xsl:text>
</xsl:if>
<nobr><xsl:value-of select="."/></nobr>
</xsl:for-each>
</td>
</tr>
</xsl:for-each>
</table>
<!-- FOOTER -->
<br/>
<xsl:choose>
<xsl:when test="/cdash/uselocaldirectory=1">
<xsl:call-template name="footer_local"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="footer"/>
</xsl:otherwise>
</xsl:choose>
</body>
</html>
</xsl:template>
<xsl:template name="defect-columns">
<xsl:param name="context"/>
<xsl:param name="index" select="0" />
<xsl:param name="total" select="/cdash/numcolumns"/>
<!-- Do something
<td>Hi</td>
-->
<td>
<xsl:for-each select="$context/defect">
<xsl:if test="column = $index">
<xsl:attribute name="class">warning</xsl:attribute>
<xsl:value-of select="value"/>
</xsl:if>
</xsl:for-each>
</td>
<xsl:if test="not($index = $total)">
<xsl:call-template name="defect-columns">
<xsl:with-param name="index" select="$index + 1" />
<xsl:with-param name="context" select="."/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>