#325 significant speed-up to Device > Ports tab (thx to T. Teräs)

This commit is contained in:
Oliver Gorwits
2017-07-09 10:03:52 +01:00
parent 46c0b6b6e0
commit 4e5b544b9c
6 changed files with 69 additions and 69 deletions

View File

@@ -104,18 +104,13 @@
[% END %]
[% IF params.c_vmember %]
[% 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 _ ',' IF NOT loop.first %]
[% SET output = output _ vlan %]
[% END %]
[% myport.push(output) %]
[% ELSE %]
[% myport.push('') %]
[% SET portname = row.port %]
[% SET output = '' %]
[% FOREACH vlan IN vlans.$portname.vlan_set.nsort %]
[% SET output = output _ ',' IF NOT loop.first %]
[% SET output = output _ vlan %]
[% END %]
[% myport.push(output) %]
[% END %]
[% IF params.c_power %]
@@ -139,9 +134,9 @@
[% IF params.c_neighbors %]
[% IF (row.remote_ip OR row.is_uplink) %]
[% IF row.neighbor %]
[% myport.push( row.neighbor.ip ) %]
[% myport.push( row.neighbor.dns.remove(settings.domain_suffix) ) %]
[% IF row.get_column('neighbor_ip') %]
[% myport.push( row.get_column('neighbor_ip') ) %]
[% myport.push( row.get_column('neighbor_dns').remove(settings.domain_suffix) ) %]
[% ELSIF row.remote_ip AND row.remote_port %]
[% myport.push( row.remote_ip ) %]
[% myport.push('') %]