From 7e4fb9998b7dd8e0c31e25b25fa69d28fb140243 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 3 Apr 2017 11:16:42 +0200 Subject: [PATCH] luci-app-mwan3: add failure and recovery interval Signed-off-by: Florian Eckert --- .../luasrc/model/cbi/mwan/interfaceconfig.lua | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) 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 f4b207c73..e81ef74d2 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua @@ -167,6 +167,38 @@ interval = mwan_interface:option(ListValue, "interval", translate("Ping interval interval:value("1800", translatef("%d minutes", 30)) interval:value("3600", translatef("%d hour", 1)) +failure = mwan_interface:option(Value, "failure_interval", translate("Failure interval"), + translate("Ping interval during failure detection")) + failure.default = "5" + failure:value("1", translatef("%d second", 1)) + failure:value("3", translatef("%d seconds", 3)) + failure:value("5", translatef("%d seconds", 5)) + failure:value("10", translatef("%d seconds", 10)) + failure:value("20", translatef("%d seconds", 20)) + failure:value("30", translatef("%d seconds", 30)) + failure:value("60", translatef("%d minute", 1)) + failure:value("300", translatef("%d minutes", 5)) + failure:value("600", translatef("%d minutes", 10)) + failure:value("900", translatef("%d minutes", 15)) + failure:value("1800", translatef("%d minutes", 30)) + failure:value("3600", translatef("%d hour", 1)) + +recovery = mwan_interface:option(Value, "recovery_interval", translate("Recovery interval"), + translate("Ping interval during failure recovering")) + recovery.default = "5" + recovery:value("1", translatef("%d second", 1)) + recovery:value("3", translatef("%d seconds", 3)) + recovery:value("5", translatef("%d seconds", 5)) + recovery:value("10", translatef("%d seconds", 10)) + recovery:value("20", translatef("%d seconds", 20)) + recovery:value("30", translatef("%d seconds", 30)) + recovery:value("60", translatef("%d minute", 1)) + recovery:value("300", translatef("%d minutes", 5)) + recovery:value("600", translatef("%d minutes", 10)) + recovery:value("900", translatef("%d minutes", 15)) + recovery:value("1800", translatef("%d minutes", 30)) + recovery:value("3600", translatef("%d hour", 1)) + down = mwan_interface:option(ListValue, "down", translate("Interface down"), translate("Interface will be deemed down after this many failed ping tests")) down.default = "3" -- 2.25.1