diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2017-08-16 18:40:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-16 18:40:47 +0300 |
commit | dff56b96dc22a7796430010244ddff5091345427 (patch) | |
tree | 4c03ceae035d94bb9ba3fc6a5d489b2cae99f40f /applications | |
parent | 3d338ee3e6d943719c7f667e89f286d533ad05dc (diff) | |
parent | 71f07bb65b8b3ad5e202728f3ab4e66a58fa187a (diff) |
Merge pull request #1304 from marcin1j/pr/20170814-mwan3-tracking-method
luci-app-mwan3: add new config option 'track_method'
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 "" |