From: Florian Eckert Date: Mon, 7 May 2018 12:38:10 +0000 (+0200) Subject: luci-app-mwan3: add quality check options X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=211d7bb9e4cc8c63c797c516de7fc43b15cdf4d8;p=oweals%2Fluci.git luci-app-mwan3: add quality check options Add new quality_check feature Signed-off-by: Florian Eckert (cherry picked from commit 9a93359d42d6a16727e1198910cc440abce584ba) --- 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 8cfeecd12..a6570e341 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua @@ -68,6 +68,52 @@ size.datatype = "range(1, 65507)" size.rmempty = false size.optional = false +check_quality = mwan_interface:option(Flag, "check_quality", translate("Check link quality")) +check_quality:depends("track_method", "ping") +check_quality.default = false + +failure_latency = mwan_interface:option(Value, "failure_latency", translate("Max packet latency [ms]")) +failure_latency:depends("check_quality", 1) +failure_latency.default = "1000" +failure_latency:value("25") +failure_latency:value("50") +failure_latency:value("75") +failure_latency:value("100") +failure_latency:value("150") +failure_latency:value("200") +failure_latency:value("250") +failure_latency:value("300") + +failure_loss = mwan_interface:option(Value, "failure_loss", translate("Max packet loss [%]")) +failure_loss:depends("check_quality", 1) +failure_loss.default = "20" +failure_loss:value("2") +failure_loss:value("5") +failure_loss:value("10") +failure_loss:value("20") +failure_loss:value("25") + +recovery_latency = mwan_interface:option(Value, "recovery_latency", translate("Min packet latency [ms]")) +recovery_latency:depends("check_quality", 1) +recovery_latency.default = "500" +recovery_latency:value("25") +recovery_latency:value("50") +recovery_latency:value("75") +recovery_latency:value("100") +recovery_latency:value("150") +recovery_latency:value("200") +recovery_latency:value("250") +recovery_latency:value("300") + +recovery_loss = mwan_interface:option(Value, "recovery_loss", translate("Min packet loss [%]")) +recovery_loss:depends("check_quality", 1) +recovery_loss.default = "5" +recovery_loss:value("2") +recovery_loss:value("5") +recovery_loss:value("10") +recovery_loss:value("20") +recovery_loss:value("25") + timeout = mwan_interface:option(ListValue, "timeout", translate("Ping timeout")) timeout.default = "2" timeout:value("1", translatef("%d second", 1))