summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-mwan3
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2017-08-11 08:52:15 +0200
committerFlorian Eckert <fe@dev.tdt.de>2017-08-11 13:14:55 +0200
commitc88e03548c08e4fc9d4f49d92f56306519094682 (patch)
treea800c16ccf7082675dbe1105f3f91217808a3b5c /applications/luci-app-mwan3
parentafe2d2c18743b0f85efb030fb279c4e5ac169197 (diff)
luci-app-mwan3: add new config options initial_state and keep_failure_interval
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-mwan3')
-rw-r--r--applications/luci-app-mwan3/luasrc/controller/mwan3.lua2
-rw-r--r--applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua10
2 files changed, 12 insertions, 0 deletions
diff --git a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua
index ca39c9bf3..c24beda28 100644
--- a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua
+++ b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua
@@ -29,6 +29,8 @@ function index()
entry({"admin", "network", "mwan", "configuration"},
alias("admin", "network", "mwan", "configuration", "interface"),
_("Configuration"), 20)
+ entry({"admin", "network", "mwan", "configuration", "globals"},
+ cbi("mwan/globalsconfig"),_("Globals"), 5).leaf = true
entry({"admin", "network", "mwan", "configuration", "interface"},
arcombine(cbi("mwan/interface"), cbi("mwan/interfaceconfig")),
_("Interfaces"), 10).leaf = true
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 2b4637639..ab44ba697 100644
--- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua
+++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua
@@ -102,6 +102,12 @@ enabled = mwan_interface:option(ListValue, "enabled", translate("Enabled"))
enabled:value("1", translate("Yes"))
enabled:value("0", translate("No"))
+initial_state = mwan_interface:option(ListValue, "initial_state", translate("Initial state"),
+ translate("Expect interface state on up event"))
+ initial_state.default = "online"
+ initial_state:value("online", translate("Online"))
+ initial_state:value("offline", translate("Offline"))
+
family = mwan_interface:option(ListValue, "family", translate("Internet Protocol"))
family.default = "ipv4"
family:value("ipv4", translate("IPv4"))
@@ -183,6 +189,10 @@ failure = mwan_interface:option(Value, "failure_interval", translate("Failure in
failure:value("1800", translatef("%d minutes", 30))
failure:value("3600", translatef("%d hour", 1))
+keep_failure = mwan_interface:option(Flag, "keep_failure_interval", translate("Keep failure interval"),
+ translate("Keep ping failure interval during failure state"))
+ keep_failure.default = keep_failure.disabled
+
recovery = mwan_interface:option(Value, "recovery_interval", translate("Recovery interval"),
translate("Ping interval during failure recovering"))
recovery.default = "5"