rename option deviceport_vlan_membership_threshold to devport_vlan_limit

This commit is contained in:
Oliver Gorwits
2015-02-18 11:24:09 +00:00
parent 71b3a4a07c
commit 8ea3e0c32f
5 changed files with 13 additions and 6 deletions

View File

@@ -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'};

View File

@@ -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>.

View File

@@ -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

View File

@@ -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

View File

@@ -103,7 +103,7 @@ port_control_reasons:
other: 'Other'
resolved: 'Issue Resolved'
check_userlog: true
deviceport_vlan_membership_threshold: 150
devport_vlan_limit: 150
# -------------
# NETDISCO CORE