diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2019-01-18 17:36:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-18 17:36:27 +0200 |
commit | 68d3351d36752cd111ea7059505fc9dfc71d32fb (patch) | |
tree | 4cc9c0e631171df0b7bbf66fdf44c757ee8c01f6 /applications/luci-app-mwan3/luasrc/model/cbi/mwan/policy.lua | |
parent | 52e1d8339f0c4c50bee778366020f9b497130146 (diff) | |
parent | c95fdfcc1af9fb52a79853f59e67aed02193a16d (diff) |
Merge pull request #2464 from TDT-AG/pr/20190117-luci-app-mwan3
luci-app-mwan3: fix cbi local scope
Diffstat (limited to 'applications/luci-app-mwan3/luasrc/model/cbi/mwan/policy.lua')
-rw-r--r-- | applications/luci-app-mwan3/luasrc/model/cbi/mwan/policy.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policy.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policy.lua index 4543260f6f..c2f47d6b21 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policy.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policy.lua @@ -2,9 +2,10 @@ -- Copyright 2018 Florian Eckert <fe@dev.tdt.de> -- Licensed to the public under the GNU General Public License v2. -dsp = require "luci.dispatcher" -uci = require "uci" +local dsp = require "luci.dispatcher" +local uci = require "uci" +local m, mwan_policy, use_member, last_resort function policyCheck() local policy_error = {} @@ -34,10 +35,10 @@ function policyError(policy_error) return warnings end -m5 = Map("mwan3", translate("MWAN - Policies"), +m = Map("mwan3", translate("MWAN - Policies"), policyError(policyCheck())) -mwan_policy = m5:section(TypedSection, "policy", nil, +mwan_policy = m:section(TypedSection, "policy", nil, translate("Policies are profiles grouping one or more members controlling how MWAN distributes traffic<br />" .. "Member interfaces with lower metrics are used first<br />" .. "Member interfaces with the same metric will be load-balanced<br />" .. @@ -53,7 +54,7 @@ mwan_policy.template = "cbi/tblsection" 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") + m.uci:save("mwan3") luci.http.redirect(dsp.build_url("admin", "network", "mwan", "policy", section)) end @@ -84,4 +85,4 @@ function last_resort.cfgvalue(self, s) end end -return m5 +return m |