luci-app-mwan3: add quality check options
authorFlorian Eckert <fe@dev.tdt.de>
Mon, 7 May 2018 12:38:10 +0000 (14:38 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Wed, 16 May 2018 13:41:05 +0000 (16:41 +0300)
Add new quality_check feature

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 9a93359d42d6a16727e1198910cc440abce584ba)

applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua

index 8cfeecd12fcd365507bb5562b668b46a2e146752..a6570e341cebb18381409de0f4056f92e64c3c9f 100644 (file)
@@ -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))