summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2018-12-18 15:46:53 +0100
committerFlorian Eckert <fe@dev.tdt.de>2018-12-20 10:19:07 +0100
commit6475221d54be41dbfa4639c4cef5046b186e296f (patch)
treee367a59e1e449e9672e9b3c03bba323c36f25ab4 /modules/luci-base/htdocs/luci-static
parentaee720f11f0c09b3a67a70c6a863bac9c15fe1dc (diff)
modules: use configurable poll interval
Make poll interval configurable. Use option from ---- config core 'main' option pollinterval '5' --- This will only be used if the interval option is less or equal zero. If the poll interval is not configured then a default value of 5 seconds is used. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/xhr.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/xhr.js b/modules/luci-base/htdocs/luci-static/resources/xhr.js
index 8292fcdb6c..3133898b5e 100644
--- a/modules/luci-base/htdocs/luci-static/resources/xhr.js
+++ b/modules/luci-base/htdocs/luci-static/resources/xhr.js
@@ -169,8 +169,8 @@ XHR.post = function(url, data, callback) {
}
XHR.poll = function(interval, url, data, callback, post) {
- if (isNaN(interval) || interval < 1)
- interval = 5;
+ if (isNaN(interval) || interval <= 0)
+ interval = L.env.pollinterval;
if (!XHR._q) {
XHR._t = 0;