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
--- /dev/null
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2017 Florian Eckert <fe@dev.tdt.de>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+local net = require "luci.model.network".init()
+
+m = Map("mwan3")
+
+s = m:section(NamedSection, "globals", "globals", translate("Globals mwan3 options"))
+n = s:option(ListValue, "local_source",
+ translate("Local source interface"),
+ translate("Use the IP address of this interface as source IP address for traffic initiated by the router itself"))
+n:value("none")
+n.default = "none"
+for _, net in ipairs(net:get_networks()) do
+ if net:name() ~= "loopback" then
+ n:value(net:name())
+ end
+end
+n.rmempty = false
+
+return m
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"))
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"
msgid "Errors"
msgstr "エラー"
+msgid "Expect interface state on up event"
+msgstr ""
+
msgid "Failure interval"
msgstr "障害検出 インターバル"
msgid "Flush global firewall conntrack table on interface events"
msgstr ""
+msgid "Globals"
+msgstr ""
+
+msgid "Globals mwan3 options"
+msgstr ""
+
msgid "Hotplug Script"
msgstr "ホットプラグ スクリプト"
msgid "IPv6"
msgstr "IPv6"
+msgid "Initial state"
+msgstr ""
+
msgid "Interface"
msgstr "インターフェース"
msgid "Internet Protocol"
msgstr "インターネット プロトコル"
+msgid "Keep failure interval"
+msgstr ""
+
+msgid "Keep ping failure interval during failure state"
+msgstr ""
+
msgid "Last 50 MWAN systemlog entries. Newest entries sorted at the top :"
msgstr "直近の MWAN システムログ(50行)です。一番上が最新の行です:"
msgid "Loading"
msgstr "読込中"
+msgid "Local source interface"
+msgstr ""
+
msgid "MWAN Config"
msgstr "MWAN 設定"
msgid "Offline"
msgstr "オフライン"
+msgid "Online"
+msgstr ""
+
msgid "Online (tracking active)"
msgstr "オンライン(追跡実行中)"
msgid "Troubleshooting Data"
msgstr "トラブルシューティング データ"
+msgid ""
+"Use the IP address of this interface as source IP address for traffic "
+"initiated by the router itself"
+msgstr ""
+
msgid "View the contents of /etc/protocols for protocol descriptions"
msgstr "プロトコルの説明については、 /etc/protocols の内容を確認してください。"
msgid "Errors"
msgstr ""
+msgid "Expect interface state on up event"
+msgstr ""
+
msgid "Failure interval"
msgstr ""
msgid "Flush global firewall conntrack table on interface events"
msgstr ""
+msgid "Globals"
+msgstr ""
+
+msgid "Globals mwan3 options"
+msgstr ""
+
msgid "Hotplug Script"
msgstr ""
msgid "IPv6"
msgstr ""
+msgid "Initial state"
+msgstr ""
+
msgid "Interface"
msgstr ""
msgid "Internet Protocol"
msgstr ""
+msgid "Keep failure interval"
+msgstr ""
+
+msgid "Keep ping failure interval during failure state"
+msgstr ""
+
msgid "Last 50 MWAN systemlog entries. Newest entries sorted at the top :"
msgstr ""
msgid "Loading"
msgstr ""
+msgid "Local source interface"
+msgstr ""
+
msgid "MWAN Config"
msgstr ""
msgid "Offline"
msgstr ""
+msgid "Online"
+msgstr ""
+
msgid "Online (tracking active)"
msgstr ""
msgid "Troubleshooting Data"
msgstr ""
+msgid ""
+"Use the IP address of this interface as source IP address for traffic "
+"initiated by the router itself"
+msgstr ""
+
msgid "View the contents of /etc/protocols for protocol descriptions"
msgstr ""
msgid "Errors"
msgstr "错误"
+msgid "Expect interface state on up event"
+msgstr ""
+
msgid "Failure interval"
msgstr "故障检测间隔"
msgid "Flush global firewall conntrack table on interface events"
msgstr "在接口事件触发时刷新全局防火墙连接跟踪表"
+msgid "Globals"
+msgstr ""
+
+msgid "Globals mwan3 options"
+msgstr ""
+
msgid "Hotplug Script"
msgstr "Hotplug 脚本"
msgid "IPv6"
msgstr "IPv6"
+msgid "Initial state"
+msgstr ""
+
msgid "Interface"
msgstr "接口"
msgid "Internet Protocol"
msgstr "互联网协议"
+msgid "Keep failure interval"
+msgstr ""
+
+msgid "Keep ping failure interval during failure state"
+msgstr ""
+
msgid "Last 50 MWAN systemlog entries. Newest entries sorted at the top :"
msgstr "最近 50 条 MWAN 系统日志,最新条目排在顶部:"
msgid "Loading"
msgstr "载入中"
+msgid "Local source interface"
+msgstr ""
+
msgid "MWAN Config"
msgstr "MWAN 配置文件"
msgid "Offline"
msgstr "离线"
+msgid "Online"
+msgstr ""
+
msgid "Online (tracking active)"
msgstr "在线(追踪启用中)"
msgid "Troubleshooting Data"
msgstr "故障排除数据"
+msgid ""
+"Use the IP address of this interface as source IP address for traffic "
+"initiated by the router itself"
+msgstr ""
+
msgid "View the contents of /etc/protocols for protocol descriptions"
msgstr "请查看 /etc/protocols 获取可选协议详情"
commit ucitrack
EOF
+uci -q get mwan3.globals >/dev/null || {
+ uci -q add mwan3 globals >/dev/null
+ uci -q rename mwan3.@globals[-1]="globals" >/dev/null
+ uci -q set mwan3.globals.initial_source="none" >/dev/null
+ uci commit mwan3
+}
+
# remove LuCI cache
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache