lede/package/lean/luci-app-xlnetacc/files/luci/view/xlnetacc/status.htm
2018-09-22 14:26:49 +08:00

22 lines
1.2 KiB
HTML

<fieldset class="cbi-section">
<legend><%:Running Status%></legend>
<table width="100%" cellspacing="10" id="_xlnetacc_status_table">
<tr><td width="33%"><%:XLNetAcc Running Status%></td><td id="_run_state"><em><%:Collecting data...%></em></td></tr>
<tr><td width="33%"><%:DownLink Upgrade Status%></td><td id="_down_state"><em><%:Collecting data...%></em></td></tr>
<tr><td width="33%"><%:UpLink Upgrade Status%></td><td id="_up_state"><em><%:Collecting data...%></em></td></tr>
</table>
</fieldset>
<script type="text/javascript">//<![CDATA[
var run_state = document.getElementById('_run_state');
var down_state = document.getElementById('_down_state');
var up_state = document.getElementById('_up_state');
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "xlnetacc", "status")%>', null, function(x, status) {
if ( x && x.status == 200 ) {
run_state.innerHTML = status.run_state ? '<em><b><font color=green><%:RUNNING%></font></b></em>' : '<em><b><font color=red><%:NOT RUNNING%></font></b></em>';
down_state.innerHTML = status.down_state ? status.down_state : '<%:No upgrade information%>';
up_state.innerHTML = status.up_state ? status.up_state : '<%:No upgrade information%>';
}
});
//]]></script>