projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
modules/admin-full: xhr fixes
[project/luci.git]
/
modules
/
admin-full
/
luasrc
/
view
/
admin_network
/
lease_status.htm
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
9555d14
..
1d7c916
100644
(file)
--- a/
modules/admin-full/luasrc/view/admin_network/lease_status.htm
+++ b/
modules/admin-full/luasrc/view/admin_network/lease_status.htm
@@
-1,12
+1,10
@@
<script type="text/javascript"><![CDATA[
var stxhr = new XHR();
<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,
stxhr.get('<%=luci.dispatcher.build_url("admin", "network", "dhcplease_status")%>', null,
- function(x)
+ function(x
, st
)
{
{
- var st = x.responseText ? eval('(' + x.responseText + ')') : null;
var tb = document.getElementById('lease_status_table');
var tb = document.getElementById('lease_status_table');
-
if (st && tb)
{
/* clear all rows */
if (st && tb)
{
/* clear all rows */
@@
-69,16
+67,18
@@
{
var tr = document.createElement('tr');
tr.className = 'cbi-section-table-row';
{
var tr = document.createElement('tr');
tr.className = 'cbi-section-table-row';
- tr.innerHTML = '<td colspan="
5
"><em><br /><%:There are no active leases.%></em></td>';
+ tr.innerHTML = '<td colspan="
4
"><em><br /><%:There are no active leases.%></em></td>';
tb.rows[0].parentNode.appendChild(tr);
}
}
tb.rows[0].parentNode.appendChild(tr);
}
}
+
+ window.setTimeout(update_status, 5000);
}
)
}
)
+ };
- window.setTimeout(arguments.callee, 5000);
- })();
+ update_status();
]]></script>
<fieldset class="cbi-section">
]]></script>
<fieldset class="cbi-section">
@@
-91,7
+91,7
@@
<th class="cbi-section-table-cell"><%:Leasetime remaining%></th>
</tr>
<tr class="cbi-section-table-row">
<th class="cbi-section-table-cell"><%:Leasetime remaining%></th>
</tr>
<tr class="cbi-section-table-row">
- <td colspan="
5
"><em><br /><%:Collecting data...%></em></td>
+ <td colspan="
4
"><em><br /><%:Collecting data...%></em></td>
</tr>
</table>
</fieldset>
</tr>
</table>
</fieldset>