applications/luci-ahcp: rework status javascript to use XHR.poll()
This commit is contained in:
parent
fa52f7f54b
commit
97f74fe766
1 changed files with 31 additions and 38 deletions
|
@ -1,9 +1,5 @@
|
|||
<script type="text/javascript">//<![CDATA[
|
||||
var stxhr = new XHR();
|
||||
(function() {
|
||||
var func = arguments.callee;
|
||||
|
||||
stxhr.get('<%=luci.dispatcher.build_url("admin", "network", "ahcpd", "status")%>', null,
|
||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "network", "ahcpd", "status")%>', null,
|
||||
function(x, st)
|
||||
{
|
||||
var tb = document.getElementById('ahcpd_status_table');
|
||||
|
@ -38,11 +34,8 @@
|
|||
else
|
||||
tx.innerHTML = String.format('The AHCP Service is running with ID %s.', st.uid);
|
||||
}
|
||||
|
||||
window.setTimeout(func, 5000);
|
||||
}
|
||||
)
|
||||
})();
|
||||
);
|
||||
//]]></script>
|
||||
|
||||
<fieldset class="cbi-section">
|
||||
|
|
Loading…
Reference in a new issue