summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2018-01-18 07:41:41 +0100
committerFlorian Eckert <fe@dev.tdt.de>2018-01-18 15:09:56 +0100
commit278b3f53dbf07e4e73cade28b9cb262f77c790cd (patch)
tree109a4f99de0f2f98707235c1dde5e090afd3d03b /applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua
parent831bd71eb387973a25277e3fa7391c6a4af83597 (diff)
luci-app-mwan3: fix unify luci code styling
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua')
-rw-r--r--applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua73
1 files changed, 36 insertions, 37 deletions
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua
index 5c6329e33..5b19693e6 100644
--- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua
+++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua
@@ -47,54 +47,53 @@ mwan_rule = m5:section(TypedSection, "rule", nil,
"Traffic matching a rule, but all WAN interfaces for that policy are down will be blackholed<br />" ..
"Names may contain characters A-Z, a-z, 0-9, _ and no spaces<br />" ..
"Rules may not share the same name as configured interfaces, members or policies"))
- mwan_rule.addremove = true
- mwan_rule.anonymous = false
- mwan_rule.dynamic = false
- mwan_rule.sectionhead = translate("Rule")
- mwan_rule.sortable = true
- mwan_rule.template = "cbi/tblsection"
- mwan_rule.extedit = dsp.build_url("admin", "network", "mwan", "rule", "%s")
- function mwan_rule.create(self, section)
- TypedSection.create(self, section)
- m5.uci:save("mwan3")
- luci.http.redirect(dsp.build_url("admin", "network", "mwan", "rule", section))
- end
-
+mwan_rule.addremove = true
+mwan_rule.anonymous = false
+mwan_rule.dynamic = false
+mwan_rule.sectionhead = translate("Rule")
+mwan_rule.sortable = true
+mwan_rule.template = "cbi/tblsection"
+mwan_rule.extedit = dsp.build_url("admin", "network", "mwan", "rule", "%s")
+function mwan_rule.create(self, section)
+ TypedSection.create(self, section)
+ m5.uci:save("mwan3")
+ luci.http.redirect(dsp.build_url("admin", "network", "mwan", "rule", section))
+end
src_ip = mwan_rule:option(DummyValue, "src_ip", translate("Source address"))
- src_ip.rawhtml = true
- function src_ip.cfgvalue(self, s)
- return self.map:get(s, "src_ip") or "&#8212;"
- end
+src_ip.rawhtml = true
+function src_ip.cfgvalue(self, s)
+ return self.map:get(s, "src_ip") or "&#8212;"
+end
src_port = mwan_rule:option(DummyValue, "src_port", translate("Source port"))
- src_port.rawhtml = true
- function src_port.cfgvalue(self, s)
- return self.map:get(s, "src_port") or "&#8212;"
- end
+src_port.rawhtml = true
+function src_port.cfgvalue(self, s)
+ return self.map:get(s, "src_port") or "&#8212;"
+end
dest_ip = mwan_rule:option(DummyValue, "dest_ip", translate("Destination address"))
- dest_ip.rawhtml = true
- function dest_ip.cfgvalue(self, s)
- return self.map:get(s, "dest_ip") or "&#8212;"
- end
+dest_ip.rawhtml = true
+function dest_ip.cfgvalue(self, s)
+ return self.map:get(s, "dest_ip") or "&#8212;"
+end
dest_port = mwan_rule:option(DummyValue, "dest_port", translate("Destination port"))
- dest_port.rawhtml = true
- function dest_port.cfgvalue(self, s)
- return self.map:get(s, "dest_port") or "&#8212;"
- end
+dest_port.rawhtml = true
+function dest_port.cfgvalue(self, s)
+ return self.map:get(s, "dest_port") or "&#8212;"
+end
proto = mwan_rule:option(DummyValue, "proto", translate("Protocol"))
- proto.rawhtml = true
- function proto.cfgvalue(self, s)
- return self.map:get(s, "proto") or "all"
- end
+proto.rawhtml = true
+function proto.cfgvalue(self, s)
+ return self.map:get(s, "proto") or "all"
+end
use_policy = mwan_rule:option(DummyValue, "use_policy", translate("Policy assigned"))
- use_policy.rawhtml = true
- function use_policy.cfgvalue(self, s)
- return self.map:get(s, "use_policy") or "&#8212;"
- end
+use_policy.rawhtml = true
+function use_policy.cfgvalue(self, s)
+ return self.map:get(s, "use_policy") or "&#8212;"
+end
return m5