diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2018-11-14 16:36:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-14 16:36:08 +0200 |
commit | e064e5be1a5efbba6f42dea42bc144b6be2a67c5 (patch) | |
tree | 24a7fcc9564086982079d615f045b8bd3681ed0c | |
parent | ea45853bc6f63d762e6c880cb48e34d43addbf89 (diff) | |
parent | 8938f53f1b8d5bebaeea0ca8c3f621f65f0d4056 (diff) |
Merge pull request #2281 from TDT-AG/pr/20181114-luci-app-mwan3
luci-app-mwan3: add/remove options
-rw-r--r-- | applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua index d8f90e1e25..f54b6e76c3 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua @@ -3,22 +3,11 @@ local net = require "luci.model.network".init() +local s, m, mask, rtmon, rtlookup m = Map("mwan3", translate("MWAN - Globals")) s = m:section(NamedSection, "globals", "globals", nil) -n = s:option(ListValue, "local_source", - translate("Local source interface"), - translate("Use the IP address of this interface as source IP " .. - "address for traffic initiated by the router itself")) -n:value("none") -n.default = "none" -for _, net in ipairs(net:get_networks()) do - if net:name() ~= "loopback" then - n:value(net:name()) - end -end -n.rmempty = false mask = s:option( Value, @@ -28,4 +17,26 @@ mask = s:option( mask.datatype = "hex(4)" mask.default = "0xff00" +rtmon = s:option( + Value, + "rtmon_interval", + translate("Update interval"), + translate("How often should rtmon update the interface routing table")) +rtmon.datatype = "integer" +rtmon.default = "5" +rtmon:value("1", translatef("%d second", 1)) +rtmon:value("3", translatef("%d seconds", 3)) +rtmon:value("5", translatef("%d seconds", 5)) +rtmon:value("7", translatef("%d seconds", 7)) +rtmon:value("10", translatef("%d seconds", 10)) + +rtlookup = s:option(DynamicList, + "rt_table_lookup", + translate("Routing table lookup"), + translate("Also scan this Routing table for connected networks")) +rtlookup.datatype = "integer" +rtlookup:value("1", translatef("Routing table %d", 1)) +rtlookup:value("2", translatef("Routing table %d", 2)) +rtlookup:value("220", translatef("Routing table %d", 220)) + return m |