rename option deviceport_vlan_membership_threshold to devport_vlan_limit
This commit is contained in:
		| @@ -52,7 +52,14 @@ if (exists setting('workers')->{interactives} | ||||
| setting('dns')->{hosts_file} ||= '/etc/hosts'; | ||||
| setting('dns')->{no} ||= ['fe80::/64','169.254.0.0/16']; | ||||
|  | ||||
| # cope with legacy config name | ||||
| # legacy config item names | ||||
|  | ||||
| config->{'devport_vlan_limit'} = | ||||
|   config->{'deviceport_vlan_membership_threshold'} | ||||
|   if setting('deviceport_vlan_membership_threshold') | ||||
|      and not setting('devport_vlan_limit'); | ||||
| delete config->{'deviceport_vlan_membership_threshold'}; | ||||
|  | ||||
| config->{'schedule'} = config->{'housekeeping'} | ||||
|   if setting('housekeeping') and not setting('schedule'); | ||||
| delete config->{'housekeeping'}; | ||||
|   | ||||
| @@ -413,7 +413,7 @@ Set to false to disable the periodic AJAX check for completed entries in the | ||||
| job queue for this user. Mainly useful for development to suppress noisy web | ||||
| frontend activity. | ||||
|  | ||||
| =head3 C<deviceport_vlan_membership_threshold> | ||||
| =head3 C<devport_vlan_limit> | ||||
|  | ||||
| Value: Number. Default: C<150>. | ||||
|  | ||||
|   | ||||
| @@ -42,8 +42,8 @@ but they are backwards compatible. | ||||
|  | ||||
| When displaying device ports, Netdisco will now avoid showing VLAN Membership | ||||
| if it looks like there are a large number of VLANs on many ports. This is an | ||||
| average of the VLANs per port, configurable in | ||||
| <deviceport_vlan_membership_threshold>. The default is 150. | ||||
| average of the VLANs per port, configurable in <devport_vlan_limit>. The | ||||
| default is 150. | ||||
|  | ||||
| =head1 2.031005 | ||||
|  | ||||
|   | ||||
| @@ -127,7 +127,7 @@ get '/ajax/content/device/ports' => require_login sub { | ||||
|     my $port_cnt = $device->ports->count() || 1; | ||||
|     my $vlan_cnt = $device->port_vlans->count() || 1; | ||||
|     my $vmember_ok = | ||||
|       (($vlan_cnt / $port_cnt) <= setting('deviceport_vlan_membership_threshold')); | ||||
|       (($vlan_cnt / $port_cnt) <= setting('devport_vlan_limit')); | ||||
|  | ||||
|     if ($vmember_ok) { | ||||
|         $set = $set->search_rs({}, { prefetch => 'all_port_vlans' })->with_vlan_count | ||||
|   | ||||
		Reference in New Issue
	
	Block a user