status.xslt (2030B)
1 <?xml version="1.0" encoding="UTF-8"?> 2 <xsl:stylesheet version="1.0" 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 4 <xsl:output method="html"/> 5 6 <xsl:template match="/"> 7 <html> 8 <head> 9 <title>Crossroads Status Overview</title> 10 <style type="text/css"> 11 h1 { 12 font-family: Verdana,Helvetica; 13 font-size: 12pt; 14 color: blue; 15 } 16 body { 17 font-family: Verdana,Helvetica; 18 font-size: 10pt; 19 } 20 td { 21 font-family: Verdana,Helvetica; 22 font-size: 10pt; 23 } 24 .backend { background-color: #f3f099; } 25 .info { font-size: 8pt; background-color: #ffff99; } 26 .footer { color: gray; } 27 </style> 28 </head> 29 <body> 30 <h1>XR Status Overview</h1> 31 <hr/> 32 <xsl:apply-templates/> 33 </body> 34 </html> 35 </xsl:template> 36 37 <xsl:template match="/status"> 38 <table> 39 <xsl:apply-templates/> 40 </table> 41 </xsl:template> 42 43 <xsl:template match="/status/backend"> 44 <tr> <td colspan="2"></td></tr> 45 <tr> 46 <td class="backend" colspan="2"> 47 <b> Back end <xsl:value-of select="address"/> </b> 48 </td> 49 </tr> 50 <tr> 51 <td class="info">Weight</td> 52 <td class="info"><xsl:value-of select="weight"/></td> 53 </tr> 54 <tr> 55 <td class="info">Max. connections</td> 56 <td class="info"><xsl:value-of select="maxconnections"/></td> 57 </tr> 58 <tr> 59 <td class="info">Host match</td> 60 <td class="info"><xsl:value-of select="hostmatch"/></td> 61 </tr> 62 <tr> 63 <td class="info">Health state</td> 64 <td class="info"><xsl:value-of select="live"/></td> 65 </tr> 66 <tr> 67 <td class="info">Availability</td> 68 <td class="info"><xsl:value-of select="available"/></td> 69 </tr> 70 <tr> 71 <td class="info">Connections</td> 72 <td class="info"><xsl:value-of select="connections"/></td> 73 </tr> 74 <tr> 75 <td class="info">Bytes served</td> 76 <td class="info"><xsl:value-of select="bytesserved"/></td> 77 </tr> 78 <tr> 79 <td class="info">Clients served</td> 80 <td class="info"><xsl:value-of select="clientsserved"/></td> 81 </tr> 82 </xsl:template> 83 84 <xsl:template match="*"/> 85 86 </xsl:stylesheet> 87