Merge pull request #1304 from marcin1j/pr/20170814-mwan3-tracking-method
luci-app-mwan3: add new config option 'track_method'
This commit is contained in:
commit
dff56b96dc
3 changed files with 19 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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)"
|
||||
|
|
|
@ -415,6 +415,9 @@ msgstr ""
|
|||
msgid "Tracking hostname or IP address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Tracking method"
|
||||
msgstr ""
|
||||
|
||||
msgid "Tracking reliability"
|
||||
msgstr ""
|
||||
|
||||
|
|
Loading…
Reference in a new issue