Avoid displaying all VLANs on device ports when there are 1000's
This commit is contained in:
@@ -86,6 +86,24 @@ table_pagesize: 10
|
||||
table_showrecordsmenu:
|
||||
- [10, 25, 50, 100, '-1']
|
||||
- [10, 25, 50, 100, 'All']
|
||||
vlanctl: true
|
||||
portctl_nameonly: false
|
||||
portctl_nophones: false
|
||||
portctl_vlans: false
|
||||
portctl_uplinks: false
|
||||
port_control_reasons:
|
||||
address: 'Address Allocation Abuse'
|
||||
copyright: 'Copyright Violation'
|
||||
dos: 'Denial of Service'
|
||||
bandwidth: 'Excessive Bandwidth'
|
||||
polling: 'Excessive Polling of DNS/DHCP/SNMP'
|
||||
noserv: 'Not In Service'
|
||||
exploit: 'Remote Exploit Possible'
|
||||
compromised: 'System Compromised'
|
||||
other: 'Other'
|
||||
resolved: 'Issue Resolved'
|
||||
check_userlog: true
|
||||
deviceport_vlan_membership_threshold: 150
|
||||
|
||||
# -------------
|
||||
# NETDISCO CORE
|
||||
@@ -157,23 +175,6 @@ ignore_interfaces:
|
||||
- '(E|T)\d \d\/\d\/\d'
|
||||
ignore_private_nets: false
|
||||
reverse_sysname: false
|
||||
vlanctl: true
|
||||
portctl_nameonly: false
|
||||
portctl_nophones: false
|
||||
portctl_vlans: false
|
||||
portctl_uplinks: false
|
||||
check_userlog: true
|
||||
port_control_reasons:
|
||||
address: 'Address Allocation Abuse'
|
||||
copyright: 'Copyright Violation'
|
||||
dos: 'Denial of Service'
|
||||
bandwidth: 'Excessive Bandwidth'
|
||||
polling: 'Excessive Polling of DNS/DHCP/SNMP'
|
||||
noserv: 'Not In Service'
|
||||
exploit: 'Remote Exploit Possible'
|
||||
compromised: 'System Compromised'
|
||||
other: 'Other'
|
||||
resolved: 'Issue Resolved'
|
||||
|
||||
# --------------
|
||||
# BACKEND DAEMON
|
||||
|
||||
@@ -188,23 +188,27 @@
|
||||
|
||||
[% IF params.c_vmember %]
|
||||
<td>
|
||||
[% IF row.vlan_count %]
|
||||
[% SET output = '' %]
|
||||
[% SET vlanlist = [] %]
|
||||
[% FOREACH vlan IN row.all_port_vlans %][% vlanlist.push(vlan.get_column('vlan')) %][% END %]
|
||||
[% FOREACH vlan IN vlanlist.nsort %]
|
||||
[% SET output = output _
|
||||
'<a href="' _ uri_for('/search') _ '?tab=vlan&q=' _ vlan _ '">' _ vlan _ '</a>' %]
|
||||
[% SET output = output _ ', ' IF NOT loop.last %]
|
||||
[% END %]
|
||||
[% IF row.vlan_count > 10 %] [%# TODO make this a settable variable %]
|
||||
[% SET output = '<div class="nd_vlan-total">(' _ row.vlan_count
|
||||
_ ')</div><span class="nd_linkcell nd_collapse-vlans">
|
||||
<div class="nd_arrow-up-down-left icon-chevron-up icon-large"></div>Show VLANs</span>
|
||||
<div class="nd_collapsing nd_collapse-pre-hidden">' _ output %]
|
||||
[% SET output = output _ '</div>' %]
|
||||
[% END %]
|
||||
[% output %]
|
||||
[% IF vmember_ok %]
|
||||
[% IF row.vlan_count %]
|
||||
[% SET output = '' %]
|
||||
[% SET vlanlist = [] %]
|
||||
[% FOREACH vlan IN row.all_port_vlans %][% vlanlist.push(vlan.get_column('vlan')) %][% END %]
|
||||
[% FOREACH vlan IN vlanlist.nsort %]
|
||||
[% SET output = output _
|
||||
'<a href="' _ uri_for('/search') _ '?tab=vlan&q=' _ vlan _ '">' _ vlan _ '</a>' %]
|
||||
[% SET output = output _ ', ' IF NOT loop.last %]
|
||||
[% END %]
|
||||
[% IF row.vlan_count > 10 %] [%# TODO make this a settable variable %]
|
||||
[% SET output = '<div class="nd_vlan-total">(' _ row.vlan_count
|
||||
_ ')</div><span class="nd_linkcell nd_collapse-vlans">
|
||||
<div class="nd_arrow-up-down-left icon-chevron-up icon-large"></div>Show VLANs</span>
|
||||
<div class="nd_collapsing nd_collapse-pre-hidden">' _ output %]
|
||||
[% SET output = output _ '</div>' %]
|
||||
[% END %]
|
||||
[% output %]
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
<i class="icon-asterisk"></i> (too many to list)
|
||||
[% END %]
|
||||
</td>
|
||||
[% END %]
|
||||
|
||||
Reference in New Issue
Block a user