diff options
author | Marcin Jurkowski <marcin1j@gmail.com> | 2017-08-14 18:49:41 +0200 |
---|---|---|
committer | Marcin Jurkowski <marcin1j@gmail.com> | 2017-08-14 18:53:55 +0200 |
commit | 71f07bb65b8b3ad5e202728f3ab4e66a58fa187a (patch) | |
tree | 9cc019f24644d93fb3e803d260916358c73ef97c /applications | |
parent | 09e0519fca7ac3bbb6d391ca5c04a1735ee1d49f (diff) |
luci-app-mwan3: add new config option 'track_method'
Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
Diffstat (limited to 'applications')
3 files changed, 19 insertions, 0 deletions
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua index aeabc63616..c8c122ad48 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua @@ -147,6 +147,16 @@ track_ip = mwan_interface:option(DummyValue, "track_ip", translate("Tracking IP" end end +track_method = mwan_interface:option(DummyValue, "track_method", translate("Tracking method")) + track_method.rawhtml = true + function track_method.cfgvalue(self, s) + if tracked then + return self.map:get(s, "track_method") or "—" + else + return "—" + end + end + reliability = mwan_interface:option(DummyValue, "reliability", translate("Tracking reliability")) reliability.rawhtml = true function reliability.cfgvalue(self, s) diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua index ab44ba6970..0318091d6c 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua @@ -117,6 +117,12 @@ track_ip = mwan_interface:option(DynamicList, "track_ip", translate("Tracking ho translate("This hostname or IP address will be pinged to determine if the link is up or down. Leave blank to assume interface is always online")) track_ip.datatype = "host" +track_method = mwan_interface:option(ListValue, "track_method", translate("Tracking method")) + track_method.default = "ping" + track_method:value("ping") + track_method:value("arping") + track_method:value("httping") + reliability = mwan_interface:option(Value, "reliability", translate("Tracking reliability"), translate("Acceptable values: 1-100. This many Tracking IP addresses must respond for the link to be deemed up")) reliability.datatype = "range(1, 100)" diff --git a/applications/luci-app-mwan3/po/templates/mwan3.pot b/applications/luci-app-mwan3/po/templates/mwan3.pot index 8694298728..9e17c3d040 100644 --- a/applications/luci-app-mwan3/po/templates/mwan3.pot +++ b/applications/luci-app-mwan3/po/templates/mwan3.pot @@ -415,6 +415,9 @@ msgstr "" msgid "Tracking hostname or IP address" msgstr "" +msgid "Tracking method" +msgstr "" + msgid "Tracking reliability" msgstr "" |