luci-app-*: use default poll interval
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 20 Dec 2018 09:09:58 +0000 (10:09 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 20 Dec 2018 09:20:23 +0000 (10:20 +0100)
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>
20 files changed:
applications/luci-app-adblock/luasrc/view/adblock/logread.htm
applications/luci-app-adblock/luasrc/view/adblock/runtime.htm
applications/luci-app-ahcp/luasrc/view/ahcp_status.htm
applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm
applications/luci-app-banip/luasrc/view/banip/logview.htm
applications/luci-app-banip/luasrc/view/banip/runtime.htm
applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm
applications/luci-app-ltqtapi/luasrc/view/telephony_status.htm
applications/luci-app-minidlna/luasrc/view/minidlna_status.htm
applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm
applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm
applications/luci-app-ocserv/luasrc/view/ocserv_status.htm
applications/luci-app-privoxy/luasrc/view/privoxy/detail_startstop.htm
applications/luci-app-radicale/luasrc/view/radicale/btn_startstop.htm
applications/luci-app-shadowsocks-libev/luasrc/view/shadowsocks-libev/add_instance.htm
applications/luci-app-travelmate/luasrc/view/travelmate/logread.htm
applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm
applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm
applications/luci-app-upnp/luasrc/view/upnp_status.htm
applications/luci-app-wireguard/luasrc/view/wireguard.htm

index 7fe254ae807e7cc2e743ba198fb246bdffeae328..48e367ec28e9008bcfe4c3124a296a75e8103444 100644 (file)
@@ -10,7 +10,7 @@ This is free software, licensed under the Apache License, Version 2.0
 //<![CDATA[
        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)
                {
                        if (!x)
index 0b5c74857167af84406d7e4412081ddc318270a0..72e2b0d364ac3af7ceaa6fd0ad808b2587a9daaa 100644 (file)
@@ -123,7 +123,7 @@ This is free software, licensed under the Apache License, Version 2.0
                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)
        {
                if (!x || !json_info || !json_info.data)
index ab25f862b8b3583fbd10027f077adccea6abb702..4e043aaf365ce9a5019a6652ee864f7f8cc6e0fe 100644 (file)
@@ -1,5 +1,5 @@
 <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)
                {
                        var tb = document.getElementById('ahcpd_status_table');
index 318182c0814e1c5607941a2c23bb6bc4f3fa1315..9d9ffeeac6879ad05810c3409875dd11ce27886f 100644 (file)
@@ -1,5 +1,5 @@
 <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) {
                var tb = document.getElementById('aria2_status');
                if (data && tb) {
index d298b24de157a250bb2d170b38b4bce952d09b67..86f1ea64fa937e0191f73c2fcd16b6dee1b67f60 100644 (file)
@@ -10,7 +10,7 @@ This is free software, licensed under the Apache License, Version 2.0
 //<![CDATA[
        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)
                {
                        if (!x)
index 65a58bd374beab4cafee375863f2e5462edbe51b..08ef90399d0bf1e58c6582a1b62959b14c766f3e 100644 (file)
@@ -76,7 +76,7 @@ function btn_action(action)
                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)
        {
                if (!x || !json_info)
index f3f45e0d04a5460396d84a4965103cead3071232..b6e89775c3a43f598a68e9f586041af3f0479a88 100644 (file)
        // 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
        // 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) {
                        if (data) { _data2elements(data); }
                }
index 2fd7168bd2df6d4fd33e186c6867e918df9bcd28..6e7c082bb063fa0a6f506fa61d1fd957f5e3f17e 100644 (file)
@@ -1,5 +1,5 @@
 <script type="text/javascript">//<![CDATA[
-XHR.poll(5, '<%=url('admin/telephony/status')%>', null,
+XHR.poll(-1, '<%=url('admin/telephony/status')%>', null,
        function(x, st)
        {
                var tb = document.getElementById('telephony_status_table');
index 866eded03e446134da218c62fdc9c56b472f29a8..eaf372137b478fefe6fd4d4fb4c099306629d0d4 100644 (file)
@@ -1,5 +1,5 @@
 <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)
                {
                        var tb = document.getElementById('minidlna_status');
index 49d120c1ae1a870835423b57a8604afaa6a40d21..259f3c975b31f55d2cbb4bccb5df46bc0e221f7b 100644 (file)
@@ -5,7 +5,7 @@
 -%>
 
 <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)
                {
                        var statusDiv = document.getElementById('mwan_status_text');
index 12700c4a36d71fef5ffaac09de8831d1269b473a..77fce3f913fd83fba23ad69905049a0bc0668875 100644 (file)
@@ -14,7 +14,7 @@
 </ul>
 
 <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)
                {
                        var output = document.getElementById('diag-rc-output');
index c8f3f33d6b720a2a279bfa37aaf485d97721bba9..9c69514b9598ff200b7bdbedd8db63ec9f094b3a 100644 (file)
@@ -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)
                {
                        var tb = document.getElementById('ocserv_status_table');
index 85975ac7d16a7c9d139c3f9aa88909983f22a3c0..12df6fbab3b0ac1d1347585e3ea3b7a1ce2a9ca3 100644 (file)
@@ -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); }
        );
 
index d9ef82214f35b89873a9ac4c25040cbec0aa8f93..48c2a842521169c628bf83d809ee003f194b7819 100644 (file)
@@ -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); }
        );
 
index f016dd47e61bdc07f2e54001c3646b89348c210c..27e101a4da8cf3199ecac6720a9f274aed0a3b8e 100644 (file)
@@ -14,7 +14,7 @@
        <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>" value="<%:Add%>" />
 </div>
 <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)
                {
                        var names = [
index 25c29b8bbe2c9b24ebeec28c3ae357acaf03e8b9..221f915f8cf788780c0c918a76f6dbebacf158f8 100644 (file)
@@ -10,7 +10,7 @@ This is free software, licensed under the Apache License, Version 2.0
 //<![CDATA[
        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)
                {
                        if (!x)
index 0b025fdaeeda99d04a74ee1d62e29d6b602aa4c2..90c3e2b7798d75b427bc092261340a33b6fa8074 100644 (file)
@@ -84,7 +84,7 @@ This is free software, licensed under the Apache License, Version 2.0
                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)
        {
                if (!x || !json_info)
index 98e2e64bce673db8b77dc858aa0e7acff8fa9af4..0e78803d0641ca0e56f9073c2abdf9b15811a7b7 100644 (file)
@@ -86,7 +86,7 @@ This is free software, licensed under the Apache License, Version 2.0
                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)
        {
                if (!x || !json_info)
index ea79e57a6af6a4d22ae850beb40ea31f1d7d9ab2..7238a568021b6e94c42e704acbf343fb7986c6ec 100644 (file)
@@ -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)
                {
                        var tb = document.getElementById('upnp_status_table');
index 6ec9ddb3684f295fa5db8b16d3c7f9d66d537982..53968da1da51e12b95cf53dcb9a90a52ccbb3ade 100644 (file)
                }
        }
 
-       XHR.poll(5, '<%=REQUEST_URI%>', { status: 1 },
+       XHR.poll(-1, '<%=REQUEST_URI%>', { status: 1 },
        function(x, data) {
                for (var key in data) {
                        if (!data.hasOwnProperty(key)) { continue; }