luci-app-*: use default poll interval
Replace all XHR poll time number with -1 so they will use the default poll interval time value from "/etc/config/luci". If this is not set then 5 seconds as default is used. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
6475221d54
commit
121e7fea66
20 changed files with 20 additions and 20 deletions
|
@ -10,7 +10,7 @@ This is free software, licensed under the Apache License, Version 2.0
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
function log_update()
|
function log_update()
|
||||||
{
|
{
|
||||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "adblock", "logread")%>', null,
|
XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "services", "adblock", "logread")%>', null,
|
||||||
function(x)
|
function(x)
|
||||||
{
|
{
|
||||||
if (!x)
|
if (!x)
|
||||||
|
|
|
@ -123,7 +123,7 @@ This is free software, licensed under the Apache License, Version 2.0
|
||||||
status_update(json_info);
|
status_update(json_info);
|
||||||
});
|
});
|
||||||
|
|
||||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "adblock", "status_update")%>', null,
|
XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "services", "adblock", "status_update")%>', null,
|
||||||
function(x, json_info)
|
function(x, json_info)
|
||||||
{
|
{
|
||||||
if (!x || !json_info || !json_info.data)
|
if (!x || !json_info || !json_info.data)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="text/javascript">//<![CDATA[
|
||||||
XHR.poll(5, '<%=url('admin/network/ahcpd/status')%>', null,
|
XHR.poll(-1, '<%=url('admin/network/ahcpd/status')%>', null,
|
||||||
function(x, st)
|
function(x, st)
|
||||||
{
|
{
|
||||||
var tb = document.getElementById('ahcpd_status_table');
|
var tb = document.getElementById('ahcpd_status_table');
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="text/javascript">//<![CDATA[
|
||||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin/services/aria2/status")%>', null,
|
XHR.poll(-1, '<%=luci.dispatcher.build_url("admin/services/aria2/status")%>', null,
|
||||||
function(x, data) {
|
function(x, data) {
|
||||||
var tb = document.getElementById('aria2_status');
|
var tb = document.getElementById('aria2_status');
|
||||||
if (data && tb) {
|
if (data && tb) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ This is free software, licensed under the Apache License, Version 2.0
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
function log_update()
|
function log_update()
|
||||||
{
|
{
|
||||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "banip", "logview")%>', null,
|
XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "services", "banip", "logview")%>', null,
|
||||||
function(x)
|
function(x)
|
||||||
{
|
{
|
||||||
if (!x)
|
if (!x)
|
||||||
|
|
|
@ -76,7 +76,7 @@ function btn_action(action)
|
||||||
status_update(json_info)
|
status_update(json_info)
|
||||||
});
|
});
|
||||||
|
|
||||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "banip", "status")%>', null,
|
XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "services", "banip", "status")%>', null,
|
||||||
function(x, json_info)
|
function(x, json_info)
|
||||||
{
|
{
|
||||||
if (!x || !json_info)
|
if (!x || !json_info)
|
||||||
|
|
|
@ -164,7 +164,7 @@
|
||||||
// define only ONE XHR.poll in a page because if one is running it blocks the other one
|
// define only ONE XHR.poll in a page because if one is running it blocks the other one
|
||||||
// optimum is to define on Map or Section Level from here you can reach all elements
|
// optimum is to define on Map or Section Level from here you can reach all elements
|
||||||
// we need update every 15 seconds only
|
// we need update every 15 seconds only
|
||||||
XHR.poll(5, '<%=url([[admin]], [[services]], [[ddns]], [[status]])%>', null,
|
XHR.poll(-1, '<%=url([[admin]], [[services]], [[ddns]], [[status]])%>', null,
|
||||||
function(x, data) {
|
function(x, data) {
|
||||||
if (data) { _data2elements(data); }
|
if (data) { _data2elements(data); }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="text/javascript">//<![CDATA[
|
||||||
XHR.poll(5, '<%=url('admin/telephony/status')%>', null,
|
XHR.poll(-1, '<%=url('admin/telephony/status')%>', null,
|
||||||
function(x, st)
|
function(x, st)
|
||||||
{
|
{
|
||||||
var tb = document.getElementById('telephony_status_table');
|
var tb = document.getElementById('telephony_status_table');
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="text/javascript">//<![CDATA[
|
||||||
XHR.poll(5, '<%=url("admin/services/minidlna_status")%>', null,
|
XHR.poll(-1, '<%=url("admin/services/minidlna_status")%>', null,
|
||||||
function(x, st)
|
function(x, st)
|
||||||
{
|
{
|
||||||
var tb = document.getElementById('minidlna_status');
|
var tb = document.getElementById('minidlna_status');
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
-%>
|
-%>
|
||||||
|
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="text/javascript">//<![CDATA[
|
||||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_status")%>', null,
|
XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_status")%>', null,
|
||||||
function(x, status)
|
function(x, status)
|
||||||
{
|
{
|
||||||
var statusDiv = document.getElementById('mwan_status_text');
|
var statusDiv = document.getElementById('mwan_status_text');
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="text/javascript">//<![CDATA[
|
||||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "detailed_status")%>', null,
|
XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "detailed_status")%>', null,
|
||||||
function(x)
|
function(x)
|
||||||
{
|
{
|
||||||
var output = document.getElementById('diag-rc-output');
|
var output = document.getElementById('diag-rc-output');
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
XHR.poll(5, '<%=url('admin/services/ocserv/status')%>', null,
|
XHR.poll(-1, '<%=url('admin/services/ocserv/status')%>', null,
|
||||||
function(x, st)
|
function(x, st)
|
||||||
{
|
{
|
||||||
var tb = document.getElementById('ocserv_status_table');
|
var tb = document.getElementById('ocserv_status_table');
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
XHR.poll(5, '<%=url('admin/services/privoxy/status')%>', null,
|
XHR.poll(-1, '<%=url('admin/services/privoxy/status')%>', null,
|
||||||
function(x, data) { _data2elements(x); }
|
function(x, data) { _data2elements(x); }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
XHR.poll(5, '<%=url([[admin/services/radicale/status]])%>', null,
|
XHR.poll(-1, '<%=url([[admin/services/radicale/status]])%>', null,
|
||||||
function(x, data) { _data2elements(x); }
|
function(x, data) { _data2elements(x); }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>" value="<%:Add%>" />
|
<input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>" value="<%:Add%>" />
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="text/javascript">//<![CDATA[
|
||||||
XHR.poll(5, '<%=url('admin/services/shadowsocks-libev/status')%>', null,
|
XHR.poll(-1, '<%=url('admin/services/shadowsocks-libev/status')%>', null,
|
||||||
function(x, st)
|
function(x, st)
|
||||||
{
|
{
|
||||||
var names = [
|
var names = [
|
||||||
|
|
|
@ -10,7 +10,7 @@ This is free software, licensed under the Apache License, Version 2.0
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
function log_update()
|
function log_update()
|
||||||
{
|
{
|
||||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "travelmate", "logread")%>', null,
|
XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "services", "travelmate", "logread")%>', null,
|
||||||
function(x)
|
function(x)
|
||||||
{
|
{
|
||||||
if (!x)
|
if (!x)
|
||||||
|
|
|
@ -84,7 +84,7 @@ This is free software, licensed under the Apache License, Version 2.0
|
||||||
status_update(json_info)
|
status_update(json_info)
|
||||||
});
|
});
|
||||||
|
|
||||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "travelmate", "status")%>', null,
|
XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "services", "travelmate", "status")%>', null,
|
||||||
function(x, json_info)
|
function(x, json_info)
|
||||||
{
|
{
|
||||||
if (!x || !json_info)
|
if (!x || !json_info)
|
||||||
|
|
|
@ -86,7 +86,7 @@ This is free software, licensed under the Apache License, Version 2.0
|
||||||
status_update(json_info)
|
status_update(json_info)
|
||||||
});
|
});
|
||||||
|
|
||||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "travelmate", "status")%>', null,
|
XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "services", "travelmate", "status")%>', null,
|
||||||
function(x, json_info)
|
function(x, json_info)
|
||||||
{
|
{
|
||||||
if (!x || !json_info)
|
if (!x || !json_info)
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
XHR.poll(5, '<%=url('admin/services/upnp/status')%>', null,
|
XHR.poll(-1, '<%=url('admin/services/upnp/status')%>', null,
|
||||||
function(x, st)
|
function(x, st)
|
||||||
{
|
{
|
||||||
var tb = document.getElementById('upnp_status_table');
|
var tb = document.getElementById('upnp_status_table');
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
XHR.poll(5, '<%=REQUEST_URI%>', { status: 1 },
|
XHR.poll(-1, '<%=REQUEST_URI%>', { status: 1 },
|
||||||
function(x, data) {
|
function(x, data) {
|
||||||
for (var key in data) {
|
for (var key in data) {
|
||||||
if (!data.hasOwnProperty(key)) { continue; }
|
if (!data.hasOwnProperty(key)) { continue; }
|
||||||
|
|
Loading…
Reference in a new issue