#688 Amend vlan search to show number of ports actually using the vlan

This commit is contained in:
Oliver Gorwits
2019-12-22 08:33:11 +00:00
parent d133eb97c2
commit c282a5a565
3 changed files with 21 additions and 10 deletions

View File

@@ -1,10 +1,10 @@
[% USE CSV -%]
[% CSV.dump([ 'VLAN' 'Device' 'Description' 'Model' 'OS' 'Vendor' ]) %]
[% CSV.dump([ 'VLAN' 'Device' 'Description' 'Ports' 'Model' 'OS' 'Vendor' ]) %]
[% FOREACH row IN results %]
[% mylist = [] %]
[% device = row.dns || row.ip %]
[% FOREACH col IN [ row.vlans.vlan device row.vlans.description row.model row.os row.vendor ] %]
[% FOREACH col IN [ row.vlans.vlan device row.vlans.description row.pcount row.model row.os row.vendor ] %]
[% mylist.push(col) %]
[% END %]
[% CSV.dump(mylist) %]