Files
netdisco/share/views/ajax/report/nodesdiscovered_csv.tt
2017-04-14 23:08:55 +01:00

13 lines
377 B
Plaintext

[% USE CSV -%]
[% CSV.dump([ 'Device' 'Port' 'Remote ID' 'Remote IP' 'Remote Port' 'Remote Type']) %]
[% FOREACH row IN results %]
[% mylist = [] %]
[% device = row.dns || row.name || row.ip %]
[% FOREACH col IN [ device row.port row.remote_id row.remote_ip row.remote_port row.remote_type ] %]
[% mylist.push(col) %]
[% END %]
[% CSV.dump(mylist) %]
[% END %]