X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=applications%2Fluci-app-mwan3%2Fluasrc%2Fmodel%2Fcbi%2Fmwan%2Finterface.lua;h=77198d5c399eea93a93935e46f95ed58ac2f50f4;hb=e40282cb382987b3d3e223c8f158924044283f71;hp=7e863a371fa60994c0c75007691a1bef2baacebc;hpb=7f256e257c98a6e81dca448532acb4d6d0cf9d1d;p=project%2Fluci.git
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua
index 7e863a371f..77198d5c39 100644
--- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua
+++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua
@@ -64,19 +64,19 @@ function interfaceWarnings() -- display status and warning messages at the top o
warnings = "" .. translatef("WARNING: %d interfaces are configured exceeding the maximum of 250!", interfaceNumber) .. ""
end
if errorReliabilityList ~= " " then
- warnings = warnings .. "
" .. translate("WARNING: some interfaces have a higher reliability requirement than there are tracking IP addresses!") .. ""
+ warnings = warnings .. "
" .. translate("WARNING: Some interfaces have a higher reliability requirement than there are tracking IP addresses!") .. ""
end
if errorRouteList ~= " " then
- warnings = warnings .. "
" .. translate("WARNING: some interfaces have no default route in the main routing table!") .. ""
+ warnings = warnings .. "
" .. translate("WARNING: Some interfaces have no default route in the main routing table!") .. ""
end
if errorNetConfigList ~= " " then
- warnings = warnings .. "
" .. translate("WARNING: some interfaces are configured incorrectly or not at all in /etc/config/network!") .. ""
+ warnings = warnings .. "
" .. translate("WARNING: Some interfaces are configured incorrectly or not at all in /etc/config/network!") .. ""
end
if errorNoMetricList ~= " " then
- warnings = warnings .. "
" .. translate("WARNING: some interfaces have no metric configured in /etc/config/network!") .. ""
+ warnings = warnings .. "
" .. translate("WARNING: Some interfaces have no metric configured in /etc/config/network!") .. ""
end
if errorDuplicateMetricList ~= " " then
- warnings = warnings .. "
" .. translate("WARNING: some interfaces have duplicate metrics configured in /etc/config/network!") .. ""
+ warnings = warnings .. "
" .. translate("WARNING: Some interfaces have duplicate metrics configured in /etc/config/network!") .. ""
end
return warnings
end
@@ -111,14 +111,14 @@ mwan_interface = m5:section(TypedSection, "interface", translate("Interfaces"),
"Interfaces may not share the same name as configured members, policies or rules"))
mwan_interface.addremove = true
mwan_interface.dynamic = false
- mwan_interface.sectionhead = "Interface"
- mwan_interface.sortable = true
+ 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
@@ -147,6 +147,16 @@ track_ip = mwan_interface:option(DummyValue, "track_ip", translate("Tracking IP"
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)