Changeset 7294

Show
Ignore:
Timestamp:
07/17/11 07:47:26 (23 months ago)
Author:
jow
Message:

luci-0.10: merge r7293

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/branches/luci-0.10/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua

    r7087 r7294  
    1919    function(x) 
    2020        local switch_name = x.name or x['.name'] 
    21         local has_enable  = "enable" 
    22         local has_reset   = nil 
    2321        local has_vlan    = nil 
    2422        local has_learn   = nil  
     
    5654                        line:match("ports: (%d+) %(cpu @ (%d+)%), vlans: (%d+)") 
    5755 
    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 
    6159                    min_vid    = 1 
    62                     has_enable = nil 
    6360 
    6461                elseif line:match(": pvid") or line:match(": tag") or line:match(": vid") then 
     
    7168                elseif line:match(": enable_learning") then 
    7269                    has_learn = "enable_learning" 
    73  
    74                 elseif line:match(": reset") then 
    75                     has_reset = "reset" 
    7670 
    7771                elseif line:match(": enable_vlan4k") then 
     
    118112        s.addremove = false 
    119113 
    120         if has_enable then 
    121             x = s:option(Flag, has_enable, translate("Enable this switch")) 
    122             x.default = x.enabled 
    123         end 
    124  
    125114        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")) 
    128116        end 
    129117 
     
    141129            x.enabled = "3" 
    142130            x.rmempty = true 
    143         end 
    144  
    145         if has_reset then 
    146             x = s:option(Flag, has_reset, translate("Reset switch during setup")) 
    147             x.default = x.enabled 
    148131        end 
    149132