From: Jo-Philipp Wich Date: Sun, 17 Jul 2011 05:47:26 +0000 (+0000) Subject: luci-0.10: merge r7293 X-Git-Tag: 0.10.0~100 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0e9548cc7727166c0d488e9a244f7da9f283b762;p=oweals%2Fluci.git luci-0.10: merge r7293 --- diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua b/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua index c2f1c1fe5..ee35261b8 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua @@ -18,8 +18,6 @@ m = Map("network", translate("Switch"), translate("The network ports on your rou m.uci:foreach("network", "switch", function(x) local switch_name = x.name or x['.name'] - local has_enable = "enable" - local has_reset = nil local has_vlan = nil local has_learn = nil local has_vlan4k = nil @@ -55,11 +53,10 @@ m.uci:foreach("network", "switch", num_ports, cpu_port, num_vlans = line:match("ports: (%d+) %(cpu @ (%d+)%), vlans: (%d+)") - num_ports = tonumber(num_ports or 6) - num_vlans = tonumber(num_vlans or 16) - cpu_port = tonumber(cpu_port or 5) + num_ports = tonumber(num_ports) or 6 + num_vlans = tonumber(num_vlans) or 16 + cpu_port = tonumber(cpu_port) or 5 min_vid = 1 - has_enable = nil elseif line:match(": pvid") or line:match(": tag") or line:match(": vid") then if is_vlan_attr then has_vlan4k = line:match(": (%w+)") end @@ -71,9 +68,6 @@ m.uci:foreach("network", "switch", elseif line:match(": enable_learning") then has_learn = "enable_learning" - elseif line:match(": reset") then - has_reset = "reset" - elseif line:match(": enable_vlan4k") then enable_vlan4k = true @@ -117,14 +111,8 @@ m.uci:foreach("network", "switch", s = m:section(NamedSection, x['.name'], "switch", translatef("Switch %q", switch_name)) s.addremove = false - if has_enable then - x = s:option(Flag, has_enable, translate("Enable this switch")) - x.default = x.enabled - end - if has_vlan then - x = s:option(Flag, has_vlan, translate("Enable VLAN functionality")) - x.default = x.enabled + s:option(Flag, has_vlan, translate("Enable VLAN functionality")) end if enable_vlan4k then @@ -142,11 +130,6 @@ m.uci:foreach("network", "switch", x.rmempty = true end - if has_reset then - x = s:option(Flag, has_reset, translate("Reset switch during setup")) - x.default = x.enabled - end - -- VLAN table s = m:section(TypedSection, "switch_vlan", translatef("VLANs on %q", switch_name))