warnings = "<font color=\"ff0000\"><strong>" .. translatef("WARNING: %d interfaces are configured exceeding the maximum of 250!", interfaceNumber) .. "</strong></font>"
end
if errorReliabilityList ~= " " then
- warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces have a higher reliability requirement than there are tracking IP addresses!") .. "</strong></font>"
+ warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: Some interfaces have a higher reliability requirement than there are tracking IP addresses!") .. "</strong></font>"
end
if errorRouteList ~= " " then
- warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces have no default route in the main routing table!") .. "</strong></font>"
+ warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: Some interfaces have no default route in the main routing table!") .. "</strong></font>"
end
if errorNetConfigList ~= " " then
- warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces are configured incorrectly or not at all in /etc/config/network!") .. "</strong></font>"
+ warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: Some interfaces are configured incorrectly or not at all in /etc/config/network!") .. "</strong></font>"
end
if errorNoMetricList ~= " " then
- warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces have no metric configured in /etc/config/network!") .. "</strong></font>"
+ warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: Some interfaces have no metric configured in /etc/config/network!") .. "</strong></font>"
end
if errorDuplicateMetricList ~= " " then
- warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces have duplicate metrics configured in /etc/config/network!") .. "</strong></font>"
+ warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: Some interfaces have duplicate metrics configured in /etc/config/network!") .. "</strong></font>"
end
return warnings
end
interfaceCheck()
-m5 = Map("mwan3", translate("MWAN Interface Configuration"),
+m5 = Map("mwan3", translate("MWAN - Interfaces"),
interfaceWarnings())
m5:append(Template("mwan/config_css"))
-mwan_interface = m5:section(TypedSection, "interface", translate("Interfaces"),
+mwan_interface = m5:section(TypedSection, "interface", nil,
translate("MWAN supports up to 250 physical and/or logical interfaces<br />" ..
"MWAN requires that all interfaces have a unique metric configured in /etc/config/network<br />" ..
"Names must match the interface name found in /etc/config/network (see advanced tab)<br />" ..
mwan_interface.sectionhead = translate("Interface")
mwan_interface.sortable = false
mwan_interface.template = "cbi/tblsection"
- mwan_interface.extedit = dsp.build_url("admin", "network", "mwan", "configuration", "interface", "%s")
+ mwan_interface.extedit = dsp.build_url("admin", "network", "mwan", "interface", "%s")
function mwan_interface.create(self, section)
TypedSection.create(self, section)
m5.uci:save("mwan3")
- luci.http.redirect(dsp.build_url("admin", "network", "mwan", "configuration", "interface", section))
+ luci.http.redirect(dsp.build_url("admin", "network", "mwan", "interface", section))
end
end
end
+track_method = mwan_interface:option(DummyValue, "track_method", translate("Tracking method"))
+ track_method.rawhtml = true
+ function track_method.cfgvalue(self, s)
+ if tracked then
+ return self.map:get(s, "track_method") or "—"
+ else
+ return "—"
+ end
+ end
+
reliability = mwan_interface:option(DummyValue, "reliability", translate("Tracking reliability"))
reliability.rawhtml = true
function reliability.cfgvalue(self, s)