Add Device addresses with DNS entries report
This commit is contained in:
21
Netdisco/share/views/ajax/report/deviceaddrnodns.tt
Normal file
21
Netdisco/share/views/ajax/report/deviceaddrnodns.tt
Normal file
@@ -0,0 +1,21 @@
|
||||
<table class="table table-bordered table-condensed table-striped nd_floatinghead">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="nd_center-cell">Device</th>
|
||||
<th class="nd_center-cell">Address</th>
|
||||
<th class="nd_center-cell">Contact</th>
|
||||
<th class="nd_center-cell">Location</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</tbody>
|
||||
[% FOREACH row IN results %]
|
||||
<tr>
|
||||
<td class="nd_center-cell"><a href="[% search_device %]&q=[% row.dns || row.ip | uri %]">
|
||||
[% row.dns || row.name || row.ip | html_entity %]</a>
|
||||
<td class="nd_center-cell">[% row.alias | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% row.contact | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% row.location | html_entity %]</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
</table>
|
||||
12
Netdisco/share/views/ajax/report/deviceaddrnodns_csv.tt
Normal file
12
Netdisco/share/views/ajax/report/deviceaddrnodns_csv.tt
Normal file
@@ -0,0 +1,12 @@
|
||||
[% USE CSV -%]
|
||||
[% CSV.dump([ 'Device' 'Address' 'Contact' 'Location' ]) %]
|
||||
|
||||
[% FOREACH row IN results %]
|
||||
[% mylist = [] %]
|
||||
[% mylist.push(row.dns || row.name || row.ip) %]
|
||||
[% mylist.push(row.alias) %]
|
||||
[% mylist.push(row.contact) %]
|
||||
[% mylist.push(row.location) %]
|
||||
[% CSV.dump(mylist) %]
|
||||
|
||||
[% END %]
|
||||
Reference in New Issue
Block a user