DataTables for VLAN search results tab

Modify carrying_vlan and carrying_vlan_name searches to use device_vlan table to capture devices carrying a VLAN but no port members
This commit is contained in:
Eric A. Miller
2014-06-02 23:27:40 -04:00
parent fb65ae30f0
commit 1258049483
4 changed files with 70 additions and 42 deletions

View File

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