forked from Kitware/CDash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coverageRow.xsl
87 lines (80 loc) · 3.14 KB
/
coverageRow.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
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
<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 name="coverageRow">
<tr class="child_row">
<td align="left" class="paddt"><xsl:value-of select="site"/></td>
<td align="left" class="paddt">
<xsl:choose>
<xsl:when test="childlink">
<a>
<xsl:attribute name="href">
<xsl:value-of select="childlink"/>
</xsl:attribute>
<xsl:value-of select="buildname"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="buildname"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="center">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="percentage >= percentagegreen">
normal
</xsl:when>
<xsl:otherwise>
warning
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="childlink">
<xsl:value-of select="childlink"/>
</xsl:when>
<xsl:otherwise>
viewCoverage.php?buildid=<xsl:value-of select="buildid"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="percentage"/>%
</a>
<xsl:if test="percentagediff > 0">
<sub>+<xsl:value-of select="percentagediff"/>%</sub>
</xsl:if>
<xsl:if test="percentagediff < 0">
<sub><xsl:value-of select="percentagediff"/>%</sub>
</xsl:if>
</td>
<td align="center" ><xsl:value-of select="pass"/>
<xsl:if test="passdiff > 0"><sub>+<xsl:value-of select="passdiff"/></sub></xsl:if>
<xsl:if test="passdiff < 0"><sub><xsl:value-of select="passdiff"/></sub></xsl:if>
</td>
<td align="center" ><xsl:value-of select="fail"/>
<xsl:if test="faildiff > 0"><sub>+<xsl:value-of select="faildiff"/></sub></xsl:if>
<xsl:if test="faildiff < 0"><sub><xsl:value-of select="faildiff"/></sub></xsl:if>
</td>
<td align="center">
<xsl:if test="/cdash/dashboard/displaylabels=0">
<xsl:attribute name="class">nob</xsl:attribute>
</xsl:if>
<span class="sorttime" style="display:none"><xsl:value-of select="datefull"/></span>
<span class="builddateelapsed">
<xsl:attribute name="alt"><xsl:value-of select="date"/></xsl:attribute>
<xsl:value-of select="dateelapsed"/>
</span>
</td>
<xsl:if test="/cdash/dashboard/displaylabels=1">
<td class="nob" align="left">
<xsl:if test="count(labels/label)=0">(none)</xsl:if>
<xsl:if test="count(labels/label)=1"><xsl:value-of select="labels/label"/></xsl:if>
<xsl:if test="count(labels/label)>1">(<xsl:value-of select="count(labels/label)"/> labels)</xsl:if>
</td>
</xsl:if>
</tr>
</xsl:template>
</xsl:stylesheet>