Merge pull request #2442 from TDT-AG/pr/20190109-luci-mod-system-pollinterval

luci-mod-system: add pollinterval option
This commit is contained in:
Jo-Philipp Wich 2019-01-21 20:14:00 +01:00 committed by GitHub
commit f73f1106f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,7 @@ s.addremove = false
s:tab("general", translate("General Settings"))
s:tab("logging", translate("Logging"))
s:tab("language", translate("Language and Style"))
s:tab("advanced", translate("Advanced"))
if has_zram then s:tab("zram", translate("ZRam Settings")) end
--
@ -169,6 +170,28 @@ function o.write(self, section, value)
end
--
-- Advanced
--
o = s:taboption("advanced", Value, "_pollinterval",
translate("Polling interval"),
translate("Polling interval for status queries in seconds"))
o.datatype = "range(3, 20)"
o.default = 5
o:value("3")
o:value("5")
o:value("10")
function o.cfgvalue(...)
return m.uci:get("luci", "main", "pollinterval")
end
function o.write(self, section, value)
m.uci:set("luci", "main", "pollinterval", value)
end
--
-- NTP
--