diff --git a/Netdisco/lib/App/Netdisco/Configuration.pm b/Netdisco/lib/App/Netdisco/Configuration.pm index ae4f41ce..514566e7 100644 --- a/Netdisco/lib/App/Netdisco/Configuration.pm +++ b/Netdisco/lib/App/Netdisco/Configuration.pm @@ -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'}; diff --git a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod index 4166a03e..70d3fa2b 100644 --- a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod +++ b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod @@ -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 +=head3 C Value: Number. Default: C<150>. diff --git a/Netdisco/lib/App/Netdisco/Manual/ReleaseNotes.pod b/Netdisco/lib/App/Netdisco/Manual/ReleaseNotes.pod index c0af216a..8c994832 100644 --- a/Netdisco/lib/App/Netdisco/Manual/ReleaseNotes.pod +++ b/Netdisco/lib/App/Netdisco/Manual/ReleaseNotes.pod @@ -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 -. The default is 150. +average of the VLANs per port, configurable in . The +default is 150. =head1 2.031005 diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin/Device/Ports.pm b/Netdisco/lib/App/Netdisco/Web/Plugin/Device/Ports.pm index 112e6c7d..be8eb8f5 100644 --- a/Netdisco/lib/App/Netdisco/Web/Plugin/Device/Ports.pm +++ b/Netdisco/lib/App/Netdisco/Web/Plugin/Device/Ports.pm @@ -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 diff --git a/Netdisco/share/config.yml b/Netdisco/share/config.yml index cbd061f9..f93cc93b 100644 --- a/Netdisco/share/config.yml +++ b/Netdisco/share/config.yml @@ -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