function ruleWarn() -- display warning messages at the top of the page
if error_protocol_list ~= " " then
- return "<font color=\"ff0000\"><strong>" .. translate("WARNING: some rules have a port configured with no or improper protocol specified! Please configure a specific protocol!") .. "</strong></font>"
+ return "<font color=\"ff0000\"><strong>" .. translate("WARNING: Some rules have a port configured with no or improper protocol specified! Please configure a specific protocol!") .. "</strong></font>"
else
return ""
end
ruleCheck()
-m5 = Map("mwan3", translate("MWAN Rule Configuration"),
+m5 = Map("mwan3", translate("MWAN - Rules"),
ruleWarn())
m5:append(Template("mwan/config_css"))
-mwan_rule = m5:section(TypedSection, "rule", translate("Traffic Rules"),
+mwan_rule = m5:section(TypedSection, "rule", nil,
translate("Rules specify which traffic will use a particular MWAN policy based on IP address, port or protocol<br />" ..
"Rules are matched from top to bottom. Rules below a matching rule are ignored. Traffic not matching any rule is routed using the main routing table<br />" ..
"Traffic destined for known (other than default) networks is handled by the main routing table. Traffic matching a rule, but all WAN interfaces for that policy are down will be blackholed<br />" ..
mwan_rule.sectionhead = translate("Rule")
mwan_rule.sortable = true
mwan_rule.template = "cbi/tblsection"
- mwan_rule.extedit = dsp.build_url("admin", "network", "mwan", "configuration", "rule", "%s")
+ 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", "configuration", "rule", section))
+ luci.http.redirect(dsp.build_url("admin", "network", "mwan", "rule", section))
end