luci-app-mwan3: make interface list non sortable
[project/luci.git] / applications / luci-app-mwan3 / luasrc / model / cbi / mwan / interface.lua
index a8e68a0..604a4fa 100644 (file)
@@ -59,24 +59,24 @@ end
 function interfaceWarnings() -- display status and warning messages at the top of the page
        local warnings = ""
        if interfaceNumber <= 250 then
 function interfaceWarnings() -- display status and warning messages at the top of the page
        local warnings = ""
        if interfaceNumber <= 250 then
-               warnings = "<strong>There are currently " .. interfaceNumber .. " of 250 supported interfaces configured</strong>"
+               warnings = "<strong>" .. translatef("There are currently %d of 250 supported interfaces configured", interfaceNumber) .. "</strong>"
        else
        else
-               warnings = "<font color=\"ff0000\"><strong>WARNING: " .. interfaceNumber .. " interfaces are configured exceeding the maximum of 250!</strong></font>"
+               warnings = "<font color=\"ff0000\"><strong>" .. translatef("WARNING: %d interfaces are configured exceeding the maximum of 250!", interfaceNumber) .. "</strong></font>"
        end
        if errorReliabilityList ~= " " then
        end
        if errorReliabilityList ~= " " then
-               warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>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
        end
        if errorRouteList ~= " " then
-               warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>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
        end
        if errorNetConfigList ~= " " then
-               warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>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
        end
        if errorNoMetricList ~= " " then
-               warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>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
        end
        if errorDuplicateMetricList ~= " " then
-               warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>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
        end
        return warnings
 end
@@ -99,7 +99,7 @@ interfaceCheck()
 
 
 m5 = Map("mwan3", translate("MWAN Interface Configuration"),
 
 
 m5 = Map("mwan3", translate("MWAN Interface Configuration"),
-       translate(interfaceWarnings()))
+       interfaceWarnings())
        m5:append(Template("mwan/config_css"))
 
 
        m5:append(Template("mwan/config_css"))
 
 
@@ -112,7 +112,7 @@ mwan_interface = m5:section(TypedSection, "interface", translate("Interfaces"),
        mwan_interface.addremove = true
        mwan_interface.dynamic = false
        mwan_interface.sectionhead = "Interface"
        mwan_interface.addremove = true
        mwan_interface.dynamic = false
        mwan_interface.sectionhead = "Interface"
-       mwan_interface.sortable = true
+       mwan_interface.sortable = false
        mwan_interface.template = "cbi/tblsection"
        mwan_interface.extedit = dsp.build_url("admin", "network", "mwan", "configuration", "interface", "%s")
        function mwan_interface.create(self, section)
        mwan_interface.template = "cbi/tblsection"
        mwan_interface.extedit = dsp.build_url("admin", "network", "mwan", "configuration", "interface", "%s")
        function mwan_interface.create(self, section)