X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-app-mwan3%2Fluasrc%2Fmodel%2Fcbi%2Fmwan%2Finterface.lua;h=14bf1384f78eff1673f07348a2792049794cc4aa;hp=920dc6afb18937aed7c1d6c8d0eeaaf0aa06895a;hb=7161284d752cca0d1cc54b68650fd570b6d2da1a;hpb=e386d76d57f038b432d10f5caae450237b316ac1 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 920dc6afb..14bf1384f 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua @@ -8,37 +8,37 @@ dsp = require "luci.dispatcher" function interfaceWarnings(overview, count) local warnings = "" if count <= 250 then - warnings = string.format("%s
", + warnings = string.format("%s
", translatef("There are currently %d of 250 supported interfaces configured", count) ) else - warnings = string.format("%s
", + warnings = string.format("%s
", translatef("WARNING: %d interfaces are configured exceeding the maximum of 250!", count) ) end for i, k in pairs(overview) do if overview[i]["network"] == false then - warnings = warnings .. string.format("%s
", + warnings = warnings .. string.format("%s
", translatef("WARNING: Interface %s are not found in /etc/config/network", i) ) end if overview[i]["default_route"] == false then - warnings = warnings .. string.format("%s
", + warnings = warnings .. string.format("%s
", translatef("WARNING: Interface %s has no default route in the main routing table", i) ) end if overview[i]["reliability"] == false then - warnings = warnings .. string.format("%s
", + warnings = warnings .. string.format("%s
", translatef("WARNING: Interface %s has a higher reliability " .. "requirement than tracking hosts (%d)", i, overview[i]["tracking"]) ) end if overview[i]["duplicate_metric"] == true then - warnings = warnings .. string.format("%s
", + warnings = warnings .. string.format("%s
", translatef("WARNING: Interface %s has a duplicate metric %s configured", i, overview[i]["metric"]) ) end @@ -93,7 +93,7 @@ function configCheck() local trackingNumber = uci:get("mwan3", iface, "track_ip") overview[iface]["tracking"] = 0 - if #trackingNumber > 0 then + if trackingNumber and #trackingNumber > 0 then overview[iface]["tracking"] = #trackingNumber overview[iface]["reliability"] = false local reliabilityNumber = tonumber(uci:get("mwan3", iface, "reliability"))