Changeset 7294
- Timestamp:
- 07/17/11 07:47:26 (23 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
luci/branches/luci-0.10/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua
r7087 r7294 19 19 function(x) 20 20 local switch_name = x.name or x['.name'] 21 local has_enable = "enable"22 local has_reset = nil23 21 local has_vlan = nil 24 22 local has_learn = nil … … 56 54 line:match("ports: (%d+) %(cpu @ (%d+)%), vlans: (%d+)") 57 55 58 num_ports = tonumber(num_ports or 6)59 num_vlans = tonumber(num_vlans or 16)60 cpu_port = tonumber(cpu_port or 5)56 num_ports = tonumber(num_ports) or 6 57 num_vlans = tonumber(num_vlans) or 16 58 cpu_port = tonumber(cpu_port) or 5 61 59 min_vid = 1 62 has_enable = nil63 60 64 61 elseif line:match(": pvid") or line:match(": tag") or line:match(": vid") then … … 71 68 elseif line:match(": enable_learning") then 72 69 has_learn = "enable_learning" 73 74 elseif line:match(": reset") then75 has_reset = "reset"76 70 77 71 elseif line:match(": enable_vlan4k") then … … 118 112 s.addremove = false 119 113 120 if has_enable then121 x = s:option(Flag, has_enable, translate("Enable this switch"))122 x.default = x.enabled123 end124 125 114 if has_vlan then 126 x = s:option(Flag, has_vlan, translate("Enable VLAN functionality")) 127 x.default = x.enabled 115 s:option(Flag, has_vlan, translate("Enable VLAN functionality")) 128 116 end 129 117 … … 141 129 x.enabled = "3" 142 130 x.rmempty = true 143 end144 145 if has_reset then146 x = s:option(Flag, has_reset, translate("Reset switch during setup"))147 x.default = x.enabled148 131 end 149 132
