diff options
5 files changed, 25 insertions, 15 deletions
diff --git a/modules/admin-full/luasrc/view/admin_network/iface_overview.htm b/modules/admin-full/luasrc/view/admin_network/iface_overview.htm index 08bac76b97..f77ee63e65 100644 --- a/modules/admin-full/luasrc/view/admin_network/iface_overview.htm +++ b/modules/admin-full/luasrc/view/admin_network/iface_overview.htm @@ -66,7 +66,7 @@ $Id$ var wifidevs = <%=luci.http.write_json(netdevs)%>; var arptable = <%=luci.http.write_json(arpcache)%>; - (function() { + var update_status = function() { iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "iface_status", table.concat(netlist, ","))%>', null, function(x, ifcs) { @@ -161,11 +161,13 @@ $Id$ } } } + + window.setTimeout(update_status, 5000); } ) + }; - window.setTimeout(arguments.callee, 5000); - })(); + update_status(); ]]></script> <fieldset class="cbi-section" style="display:none"> diff --git a/modules/admin-full/luasrc/view/admin_network/iface_status.htm b/modules/admin-full/luasrc/view/admin_network/iface_status.htm index 34e3dddfd3..11590e1735 100644 --- a/modules/admin-full/luasrc/view/admin_network/iface_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/iface_status.htm @@ -2,7 +2,7 @@ <script type="text/javascript"><![CDATA[ var iwxhr = new XHR(); - (function() { + var update_status = function() { iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "iface_status", self.network)%>', null, function(x, ifc) { @@ -71,11 +71,13 @@ else if (d) d.innerHTML = '<%:Interface not present or not connected yet.%>'; } + + window.setTimeout(update_status, 5000); } ) + }; - window.setTimeout(arguments.callee, 5000); - })(); + update_status(); ]]></script> <table> diff --git a/modules/admin-full/luasrc/view/admin_network/lease_status.htm b/modules/admin-full/luasrc/view/admin_network/lease_status.htm index 6f90640cb3..1d7c916f26 100644 --- a/modules/admin-full/luasrc/view/admin_network/lease_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/lease_status.htm @@ -1,6 +1,6 @@ <script type="text/javascript"><![CDATA[ var stxhr = new XHR(); - (function() { + var update_status = function() { stxhr.get('<%=luci.dispatcher.build_url("admin", "network", "dhcplease_status")%>', null, function(x, st) { @@ -72,11 +72,13 @@ tb.rows[0].parentNode.appendChild(tr); } } + + window.setTimeout(update_status, 5000); } ) + }; - window.setTimeout(arguments.callee, 5000); - })(); + update_status(); ]]></script> <fieldset class="cbi-section"> diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm b/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm index d47ad0856c..f0d624cc2f 100644 --- a/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm +++ b/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm @@ -97,7 +97,7 @@ $Id$ var wifidevs = <%=luci.http.write_json(netdevs)%>; var arptable = <%=luci.http.write_json(arpcache)%>; - (function() { + var update_status = function() { iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "wireless_status", table.concat(netlist, ","))%>', null, function(x, st) { @@ -241,11 +241,13 @@ $Id$ img.src = '<%=resource%>/icons/wifi' + (devup[dev] ? '' : '_disabled') + '.png'; } } + + window.setTimeout(update_status, 5000); } ) + }; - window.setTimeout(arguments.callee, 5000); - })(); + update_status(); ]]></script> <h2><a id="content" name="content"><%:Wireless Overview%></a></h2> diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_status.htm b/modules/admin-full/luasrc/view/admin_network/wifi_status.htm index e81ff06bda..e4ba482770 100644 --- a/modules/admin-full/luasrc/view/admin_network/wifi_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/wifi_status.htm @@ -2,7 +2,7 @@ <script type="text/javascript"><![CDATA[ var iwxhr = new XHR(); - (function() { + var update_status = function() { iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "wireless_status", self.ifname)%>', null, function(x, iw) { @@ -55,11 +55,13 @@ else if (d) d.innerHTML = '<%:Wireless is disabled or not associated%>'; } + + window.setTimeout(update_status, 5000); } ) + }; - window.setTimeout(arguments.callee, 5000); - })(); + update_status(); ]]></script> <table> |