mirror of
https://github.com/arut/nginx-rtmp-module.git
synced 2025-08-06 15:00:18 +08:00
Added untis chooser
This commit is contained in:
62
stat.xsl
62
stat.xsl
@ -7,8 +7,42 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>RTMP statistics</title>
|
||||
<script type="text/javascript">
|
||||
<xsl:text disable-output-escaping="yes">
|
||||
<![CDATA[
|
||||
function units(wh){
|
||||
if(wh == 1){
|
||||
bits = 'none';
|
||||
bytes = '';
|
||||
document.querySelector('#chooser_bits').style.fontWeight = 'normal';
|
||||
document.querySelector('#chooser_bytes').style.fontWeight = 'bold';
|
||||
}
|
||||
else {
|
||||
bits = '';
|
||||
bytes = 'none';
|
||||
document.querySelector('#chooser_bits').style.fontWeight = 'bold';
|
||||
document.querySelector('#chooser_bytes').style.fontWeight = 'normal';
|
||||
}
|
||||
elements = document.querySelectorAll('.unit_bits');
|
||||
for (var e = 0; e < elements.length; e++){
|
||||
elements[e].style.display = bits;
|
||||
}
|
||||
elements = document.querySelectorAll('.unit_bytes');
|
||||
for (var e = 0; e < elements.length; e++){
|
||||
elements[e].style.display = bytes;
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</xsl:text>
|
||||
</script>
|
||||
<style>
|
||||
.span_link {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<body onload="units(0)">
|
||||
<div>Units: <a id="chooser_bits" class="span_link" onclick="units(0); this.style.fontWeight = 'bold'; return false;">bits/s</a> | <a id="chooser_bytes" class="span_link" onclick="units(1); this.style.fontWeight = 'bold'; return false;">bytes/s</a></div>
|
||||
<xsl:apply-templates select="rtmp"/>
|
||||
<hr/>
|
||||
Generated by <a href='https://github.com/arut/nginx-rtmp-module'>NGINX RTMP module</a>,
|
||||
@ -48,24 +82,28 @@
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
<td>
|
||||
<span class="unit_bytes">
|
||||
<xsl:call-template name="showsize">
|
||||
<xsl:with-param name="size" select="bwin div 8"/>
|
||||
</xsl:call-template>/s
|
||||
<br />
|
||||
</span>
|
||||
<span class="unit_bits">
|
||||
<xsl:call-template name="showsize">
|
||||
<xsl:with-param name="size" select="bwin"/>
|
||||
<xsl:with-param name="bits" select="1"/>
|
||||
</xsl:call-template>/s
|
||||
</xsl:call-template>/s</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="unit_bytes">
|
||||
<xsl:call-template name="showsize">
|
||||
<xsl:with-param name="size" select="bwout div 8"/>
|
||||
</xsl:call-template>/s
|
||||
<br />
|
||||
</span>
|
||||
<span class="unit_bits">
|
||||
<xsl:call-template name="showsize">
|
||||
<xsl:with-param name="size" select="bwout"/>
|
||||
<xsl:with-param name="bits" select="1"/>
|
||||
</xsl:call-template>/s
|
||||
</xsl:call-template>/s</span>
|
||||
</td>
|
||||
<td colspan="5"/>
|
||||
<td>
|
||||
@ -136,23 +174,29 @@
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
<td>
|
||||
<span class="unit_bytes">
|
||||
<xsl:call-template name="showsize">
|
||||
<xsl:with-param name="size" select="bwin div 8"/>
|
||||
</xsl:call-template>/s
|
||||
<br />
|
||||
</span>
|
||||
<span class="unit_bits">
|
||||
<xsl:call-template name="showsize">
|
||||
<xsl:with-param name="size" select="bwin"/>
|
||||
<xsl:with-param name="bits" select="1"/>
|
||||
</xsl:call-template>/s
|
||||
</xsl:call-template>/s</span>
|
||||
</td>
|
||||
<td><xsl:call-template name="showsize">
|
||||
<td>
|
||||
<span class="unit_bytes">
|
||||
<xsl:call-template name="showsize">
|
||||
<xsl:with-param name="size" select="bwout div 8"/>
|
||||
</xsl:call-template>/s
|
||||
<br />
|
||||
</span>
|
||||
<span class="unit_bits">
|
||||
<xsl:call-template name="showsize">
|
||||
<xsl:with-param name="size" select="bwout"/>
|
||||
<xsl:with-param name="bits" select="1"/>
|
||||
</xsl:call-template>/s
|
||||
</span>
|
||||
</td>
|
||||
<td><xsl:value-of select="meta/width"/>x<xsl:value-of select="meta/height"/></td>
|
||||
<td align="middle"><xsl:value-of select="meta/framerate"/></td>
|
||||
|
Reference in New Issue
Block a user