relocate repo files so ND2 is the only code
This commit is contained in:
26
share/views/ajax/report/nodevendor_csv.tt
Normal file
26
share/views/ajax/report/nodevendor_csv.tt
Normal file
@@ -0,0 +1,26 @@
|
||||
[% USE CSV -%]
|
||||
[% IF opt %]
|
||||
[% CSV.dump(['MAC' 'Vendor' 'Company' 'Device' 'Port']) %]
|
||||
|
||||
[% 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 ] %]
|
||||
[% mylist.push(col) %]
|
||||
[% END %]
|
||||
[% CSV.dump(mylist) %]
|
||||
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% CSV.dump(['Vendor' 'Count']) %]
|
||||
|
||||
[% FOREACH row IN results %]
|
||||
[% mylist = [] %]
|
||||
[% vendor = row.vendor || '(Unknown Vendor)' %]
|
||||
[% FOREACH col IN [ vendor row.count ] %]
|
||||
[% mylist.push(col) %]
|
||||
[% END %]
|
||||
[% CSV.dump(mylist) %]
|
||||
|
||||
[% END %]
|
||||
[% END %]
|
||||
Reference in New Issue
Block a user