DataTables for node vendor inventory report

This commit is contained in:
Eric A. Miller
2014-05-29 20:28:18 -04:00
parent 2111a4079b
commit 9a11ab08b1
4 changed files with 63 additions and 92 deletions

View File

@@ -2,7 +2,7 @@
[% IF opt %]
[% CSV.dump(['MAC' 'Vendor' 'Company' 'Device' 'Port']) %]
[% WHILE (row = results.next) %]
[% FOREACH row IN results %]
[% mylist = [] %]
[% device = row.device.dns || row.device.name || row.switch %]
[% FOREACH col IN [ row.mac.upper row.oui.abbrev row.oui.company device row.port ] %]
@@ -14,7 +14,7 @@
[% ELSE %]
[% CSV.dump(['Vendor' 'Count']) %]
[% WHILE (row = results.next) %]
[% FOREACH row IN results %]
[% mylist = [] %]
[% vendor = row.vendor || '(Unknown Vendor)' %]
[% FOREACH col IN [ vendor row.count ] %]