local net = require "luci.model.network".init()
+
m = Map("mwan3", translate("MWAN - Globals"))
s = m:section(NamedSection, "globals", "globals", nil)
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"))
+ 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
dsp = require "luci.dispatcher"
-sys = require "luci.sys"
-ut = require "luci.util"
+
function interfaceWarnings(overview, count)
local warnings = ""
dsp = require "luci.dispatcher"
-sys = require "luci.sys"
-ut = require "luci.util"
arg[1] = arg[1] or ""
-ds = require "luci.dispatcher"
+dsp = require "luci.dispatcher"
m5 = Map("mwan3", translate("MWAN - Members"))
mwan_member.sectionhead = translate("Member")
mwan_member.sortable = true
mwan_member.template = "cbi/tblsection"
- mwan_member.extedit = ds.build_url("admin", "network", "mwan", "member", "%s")
+ mwan_member.extedit = dsp.build_url("admin", "network", "mwan", "member", "%s")
function mwan_member.create(self, section)
TypedSection.create(self, section)
m5.uci:save("mwan3")
- luci.http.redirect(ds.build_url("admin", "network", "mwan", "member", section))
+ luci.http.redirect(dsp.build_url("admin", "network", "mwan", "member", section))
end
interface = mwan_member:option(DummyValue, "interface", translate("Interface"))
--- ------ hotplug script configuration ------ --
-
local fs = require "nixio.fs"
local ut = require "luci.util"
script = "/etc/mwan3.user"
+
m5 = SimpleForm("luci", translate("MWAN - Notification"))
f = m5:section(SimpleSection, nil,
-ds = require "luci.dispatcher"
-sys = require "luci.sys"
+dsp = require "luci.dispatcher"
+
function policyCheck()
local policy_error = {}
mwan_policy.sectionhead = translate("Policy")
mwan_policy.sortable = true
mwan_policy.template = "cbi/tblsection"
- mwan_policy.extedit = ds.build_url("admin", "network", "mwan", "policy", "%s")
+ mwan_policy.extedit = dsp.build_url("admin", "network", "mwan", "policy", "%s")
function mwan_policy.create(self, section)
TypedSection.create(self, section)
m5.uci:save("mwan3")
- luci.http.redirect(ds.build_url("admin", "network", "mwan", "policy", section))
+ luci.http.redirect(dsp.build_url("admin", "network", "mwan", "policy", section))
end
dsp = require "luci.dispatcher"
arg[1] = arg[1] or ""
+
m5 = Map("mwan3", translatef("MWAN Policy Configuration - %s", arg[1]))
m5.redirect = dsp.build_url("admin", "network", "mwan", "policy")
dsp = require "luci.dispatcher"
-sys = require "luci.sys"
-ut = require "luci.util"
+
function ruleCheck()
local rule_error = {}
dsp = require "luci.dispatcher"
-sys = require "luci.sys"
-ut = require "luci.util"
arg[1] = arg[1] or ""
+
m5 = Map("mwan3", translatef("MWAN Rule Configuration - %s", arg[1]))
m5.redirect = dsp.build_url("admin", "network", "mwan", "rule")