2018-02-28 15:05:10 +00:00
|
|
|
local m, s, o
|
|
|
|
|
2018-03-06 14:09:20 +00:00
|
|
|
m = Map("omr-tracker", translate("OMR-Tracker"), translate("OMR-Tracker detect when a connection is down and execute needed scripts"))
|
2018-02-28 15:05:10 +00:00
|
|
|
|
|
|
|
s = m:section(TypedSection, "defaults", translate("Defaults Settings"))
|
|
|
|
s.anonymous = true
|
|
|
|
|
2018-02-28 16:12:20 +00:00
|
|
|
o = s:option(Value, "timeout", translate("Timeout (s)"))
|
2018-02-28 15:05:10 +00:00
|
|
|
o.placeholder = "1"
|
|
|
|
o.default = "1"
|
|
|
|
o.datatype = "range(1, 100)"
|
|
|
|
o.rmempty = false
|
|
|
|
|
|
|
|
o = s:option(Value, "tries", translate("Tries"))
|
|
|
|
o.placeholder = "4"
|
|
|
|
o.default = "4"
|
|
|
|
o.datatype = "range(1, 10)"
|
|
|
|
o.rmempty = false
|
|
|
|
|
2018-02-28 16:12:20 +00:00
|
|
|
o = s:option(Value, "interval", translate("Retry interval (s)"))
|
2018-02-28 15:05:10 +00:00
|
|
|
o.placeholder = "2"
|
|
|
|
o.default = "2"
|
|
|
|
o.datatype = "range(1, 100)"
|
|
|
|
o.rmempty = false
|
|
|
|
|
2018-03-02 18:59:46 +00:00
|
|
|
o = s:option(ListValue, "type", translate("Type"), translate("Always ping gateway, then test connection by ping or dns. None mode only ping gateway."))
|
2018-03-01 13:56:02 +00:00
|
|
|
o:value("ping","ping")
|
|
|
|
o:value("dns","dns")
|
2018-03-02 06:46:56 +00:00
|
|
|
o:value("none","none")
|
2018-02-28 15:05:10 +00:00
|
|
|
|
|
|
|
o = s:option(DynamicList, "hosts", translate("Hosts"))
|
|
|
|
o.placeholder = "4.2.2.1"
|
|
|
|
o.default = "4.2.2.1"
|
|
|
|
o.rmempty = false
|
|
|
|
|
|
|
|
return m
|