diff options
author | Rob Austein <sra@hactrn.net> | 2010-05-05 03:06:37 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2010-05-05 03:06:37 +0000 |
commit | 8eefef40c3cc8dfa2c98d041f8f0f77731c08af3 (patch) | |
tree | 44ba15143930ca64cbab57f80fb23bc66ae2f9a2 /rcynic | |
parent | 8d37fe4c4ec20dc33362c9aded460c71eaac8b1b (diff) |
Having jumped off the CSS cliff, let's try a few colors.
svn path=/rcynic/rcynic.xsl; revision=3236
Diffstat (limited to 'rcynic')
-rw-r--r-- | rcynic/rcynic.xsl | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/rcynic/rcynic.xsl b/rcynic/rcynic.xsl index c197a4cf..8cb49d69 100644 --- a/rcynic/rcynic.xsl +++ b/rcynic/rcynic.xsl @@ -67,6 +67,9 @@ <style type="text/css"> td { text-align: center; padding: 4px } td.uri { text-align: left } + tr.happy { background-color: #77ff77 } + tr.warning { background-color: yellow } + tr.danger { background-color: #ff5500 } </style> </head> <body> @@ -79,11 +82,7 @@ <xsl:for-each select="rcynic-summary/labels/*"> <xsl:variable name="p" select="position()"/> <xsl:if test="$suppress-zero-columns = 0 or position() = 1 or exslt:node-set($sums)/x[$p]/@sum > 0"> - <td> - <b> - <xsl:apply-templates/> - </b> - </td> + <td><b><xsl:apply-templates/></b></td> </xsl:if> </xsl:for-each> </tr> @@ -96,27 +95,17 @@ <xsl:for-each select="*"> <xsl:variable name="p" select="position()"/> <xsl:if test="$suppress-zero-columns = 0 or position() = 1 or exslt:node-set($sums)/x[$p]/@sum > 0"> - <td> - <xsl:if test=". != 0"> - <xsl:apply-templates/> - </xsl:if> - </td> + <td><xsl:if test=". != 0"><xsl:apply-templates/></xsl:if></td> </xsl:if> </xsl:for-each> </tr> </xsl:for-each> <xsl:if test="$show-total != 0"> <tr> - <td> - <b>Total</b> - </td> + <td><b>Total</b></td> <xsl:for-each select="exslt:node-set($sums)/x[position() > 1]"> <xsl:if test="$suppress-zero-columns = 0 or @sum > 0"> - <td> - <b> - <xsl:value-of select="@sum"/> - </b> - </td> + <td><b><xsl:value-of select="@sum"/></b></td> </xsl:if> </xsl:for-each> </tr> @@ -136,7 +125,13 @@ <tbody> <xsl:for-each select="rcynic-summary/validation_status"> <xsl:variable name="status" select="@status"/> - <tr> + <xsl:variable name="mood"> + <xsl:choose> + <xsl:when test="$status = 'validation_ok'">happy</xsl:when> + <xsl:otherwise>danger</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <tr class="{$mood}"> <td class="timestamp"><xsl:value-of select="@timestamp"/></td> <td class="status"><xsl:value-of select="/rcynic-summary/labels/*[name() = $status] "/></td> <td class="uri"><xsl:value-of select="."/></td> |