improved stylesheet

This commit is contained in:
Roman Arutyunyan
2012-05-10 16:35:29 +04:00
parent d82c16499d
commit e572e242c2

View File

@ -4,12 +4,15 @@
<xsl:template match="/">
<html>
<head><title>RTMP statistics</title></head>
<head>
<title>RTMP statistics</title>
</head>
<body>
<xsl:apply-templates select="rtmp"/>
<hr/>
Generated by <a href='https://github.com/arut/nginx-rtmp-module'>NGINX RTMP module</a>
</body></html>
</body>
</html>
</xsl:template>
<xsl:template match="rtmp">
@ -22,11 +25,6 @@ Generated by <a href='https://github.com/arut/nginx-rtmp-module'>NGINX RTMP modu
<th>In Kbps</th>
<th>Out Kbps</th>
<th>State</th>
<th>Address</th>
<th>Flash version</th>
<th>Page URL</th>
<th>Dropped</th>
<th bgcolor="#ffffff"></th>
</tr>
<tr>
<td colspan="2"/>
@ -46,42 +44,82 @@ Generated by <a href='https://github.com/arut/nginx-rtmp-module'>NGINX RTMP modu
<xsl:template match="application">
<tr bgcolor="#999999">
<td><b><xsl:value-of select="name"/></b></td>
<td>
<b><xsl:value-of select="name"/></b>
</td>
</tr>
<xsl:apply-templates select="live"/>
</xsl:template>
<xsl:template match="live">
<tr bgcolor="#aaaaaa">
<td><i>live streams</i></td>
<td align="middle"><xsl:value-of select="nclients"/></td>
<td>
<i>live streams</i>
</td>
<td align="middle">
<xsl:value-of select="nclients"/>
</td>
</tr>
<xsl:apply-templates select="stream"/>
</xsl:template>
<xsl:template match="stream">
<tr valign="top" bgcolor="#cccccc">
<td><xsl:value-of select="name"/></td>
<td align="middle"><xsl:value-of select="nclients"/></td>
<td><xsl:value-of select="in"/></td>
<td><xsl:value-of select="out"/></td>
<td><xsl:value-of select="round(bwin div 1024)"/></td>
<td><xsl:value-of select="round(bwout div 1024)"/></td>
<td><xsl:apply-templates select="publishing"/></td>
<td bgcolor="#ffffff">
<td>
<xsl:value-of select="name"/>
</td>
<td align="middle">
<xsl:value-of select="nclients"/>
</td>
<td>
<xsl:value-of select="in"/>
</td>
<td>
<xsl:value-of select="out"/>
</td>
<td>
<xsl:value-of select="round(bwin div 1024)"/>
</td>
<td>
<xsl:value-of select="round(bwout div 1024)"/>
</td>
<td>
<xsl:apply-templates select="publishing"/>
</td>
</tr>
<tr>
<td colspan="7" ngcolor="#eeeeee">
<table cellspacing="1" cellpadding="5">
<tr>
<th>State</th>
<th>Address</th>
<th>Flash version</th>
<th>Page URL</th>
<th>Dropped</th>
</tr>
<xsl:apply-templates select="client"/>
</table>
</td>
</tr>
</xsl:template>
<xsl:template match="client">
<tr bgcolor="#eeeeee">
<td colspan="6" bgcolor="#ffffff"/>
<td><xsl:apply-templates select="publishing"/></td>
<td><xsl:value-of select="address"/></td>
<td><xsl:value-of select="flashver"/></td>
<td><xsl:value-of select="pageurl"/></td>
<td><xsl:value-of select="dropped"/></td>
<td>
<xsl:apply-templates select="publishing"/>
</td>
<td>
<xsl:value-of select="address"/>
</td>
<td>
<xsl:value-of select="flashver"/>
</td>
<td>
<xsl:value-of select="pageurl"/>
</td>
<td>
<xsl:value-of select="dropped"/>
</td>
</tr>
</xsl:template>