summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2017-04-06 11:11:37 +0300
committerGitHub <noreply@github.com>2017-04-06 11:11:37 +0300
commita33dfdd67c6784b317af300409dd1fe1a969c7be (patch)
treee559354ee5273be954ac63467498f8c239fe2062 /applications
parentd3fc9b2a37ada259614d5d7dda767632b43f7f33 (diff)
parent71f2f045b2b3b1a738d759ff694c5b041176417e (diff)
Merge pull request #1094 from TDT-GmbH/luci-app-mwan3-update
luci-app-mwan3: update interfaceconfig page with new params
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-mwan3/Makefile3
-rw-r--r--applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua76
2 files changed, 56 insertions, 23 deletions
diff --git a/applications/luci-app-mwan3/Makefile b/applications/luci-app-mwan3/Makefile
index 758ec90a0..d65cd3af1 100644
--- a/applications/luci-app-mwan3/Makefile
+++ b/applications/luci-app-mwan3/Makefile
@@ -11,7 +11,8 @@ LUCI_DEPENDS:=+mwan3 +luci-mod-admin-full +luci-app-firewall +luci-lib-nixio
LUCI_PKGARCH:=all
PKG_LICENSE:=GPLv2
-PKG_MAINTAINER:=Aedan Renner <chipdankly@gmail.com>
+PKG_MAINTAINER:=Aedan Renner <chipdankly@gmail.com> \
+ Florian Eckert <fe@dev.tdt.de>
include ../../luci.mk
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 b1820cc68..e81ef74d2 100644
--- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua
+++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua
@@ -141,31 +141,63 @@ size = mwan_interface:option(Value, "size", translate("Ping size"))
timeout = mwan_interface:option(ListValue, "timeout", translate("Ping timeout"))
timeout.default = "2"
- timeout:value("1", translate("1 second"))
- timeout:value("2", translate("2 seconds"))
- timeout:value("3", translate("3 seconds"))
- timeout:value("4", translate("4 seconds"))
- timeout:value("5", translate("5 seconds"))
- timeout:value("6", translate("6 seconds"))
- timeout:value("7", translate("7 seconds"))
- timeout:value("8", translate("8 seconds"))
- timeout:value("9", translate("9 seconds"))
- timeout:value("10", translate("10 seconds"))
+ timeout:value("1", translatef("%d second", 1))
+ timeout:value("2", translatef("%d seconds", 2))
+ timeout:value("3", translatef("%d seconds", 3))
+ timeout:value("4", translatef("%d seconds", 4))
+ timeout:value("5", translatef("%d seconds", 5))
+ timeout:value("6", translatef("%d seconds", 6))
+ timeout:value("7", translatef("%d seconds", 7))
+ timeout:value("8", translatef("%d seconds", 8))
+ timeout:value("9", translatef("%d seconds", 9))
+ timeout:value("10", translatef("%d seconds", 10))
interval = mwan_interface:option(ListValue, "interval", translate("Ping interval"))
interval.default = "5"
- interval:value("1", translate("1 second"))
- interval:value("3", translate("3 seconds"))
- interval:value("5", translate("5 seconds"))
- interval:value("10", translate("10 seconds"))
- interval:value("20", translate("20 seconds"))
- interval:value("30", translate("30 seconds"))
- interval:value("60", translate("1 minute"))
- interval:value("300", translate("5 minutes"))
- interval:value("600", translate("10 minutes"))
- interval:value("900", translate("15 minutes"))
- interval:value("1800", translate("30 minutes"))
- interval:value("3600", translate("1 hour"))
+ interval:value("1", translatef("%d second", 1))
+ interval:value("3", translatef("%d seconds", 3))
+ interval:value("5", translatef("%d seconds", 5))
+ interval:value("10", translatef("%d seconds", 10))
+ interval:value("20", translatef("%d seconds", 20))
+ interval:value("30", translatef("%d seconds", 30))
+ interval:value("60", translatef("%d minute", 1))
+ interval:value("300", translatef("%d minutes", 5))
+ interval:value("600", translatef("%d minutes", 10))
+ interval:value("900", translatef("%d minutes", 15))
+ 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"))