mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-07-29 09:51:41 +08:00
27 lines
1.0 KiB
HTML
27 lines
1.0 KiB
HTML
<script type="text/javascript">//<![CDATA[
|
|
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "nvr", "status")%>', null,
|
|
function(x, data) {
|
|
var tb = document.getElementById('nvr_status');
|
|
if ( data && tb) {
|
|
if ( data.nvrrecord && data.pushpid ) {
|
|
tb.innerHTML = '<font color=green><%:正在录像!%><%: PID: %>' + data.nvrrecord + '</br>' +'<%:正在推流!%><%: PID : %>' + data.pushpid + '</font>';
|
|
} else if ( data.nvrrecord ) {
|
|
tb.innerHTML = '<font color=green><%:正在录像!%><%: PID: %>' + data.nvrrecord + '</font></br>' + '<font color=red><%:未推送!!%></font>';
|
|
} else if ( data.pushpid ) {
|
|
tb.innerHTML = '<font color=red><%:未录像!%></font></br>' + '<font color=green><%:正在推流!%><%: PID: %>' + data.pushpid + '</font>';
|
|
} else {
|
|
tb.innerHTML = '<font color=red><%:未运行!%></font>';
|
|
}
|
|
}
|
|
}
|
|
);
|
|
|
|
//]]>
|
|
</script>
|
|
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
|
<fieldset class="cbi-section">
|
|
<p id="nvr_status">
|
|
<em><%:Collecting data...%></em>
|
|
</p>
|
|
</fieldset>
|