Add Undiscovered Neighbors admin report

This commit is contained in:
Eric A. Miller
2014-01-06 20:55:02 -05:00
parent ddd9d82eee
commit 0c1be4e900
6 changed files with 151 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<table class="table table-bordered table-condensed table-striped nd_floatinghead">
<thead>
<tr>
<th>Device Location Triggering<br>Last Discovery Attempt</th>
<th>Undiscovered Neighbor</th>
<th class="nd_center-cell">Last Discovery Attempt</th>
<th class="nd_center-cell">Last Discovery Log</th>
</tr>
</thead>
</tbody>
[% FOREACH row IN results %]
<tr>
<td><a href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.port | uri %]">
[% row.dns || row.name || row.ip | html_entity %] ( [% row.port | html_entity %] ) </a></td>
<td><a href="[% search_node %]&q=[% row.remote_ip | uri %]">
[% row.remote_ip | html_entity %]</a>
([% row.remote_port | html_entity %])
[% ' id: '_ row.remote_id IF row.remote_id %]
[% ' type: '_ row.remote_type IF row.remote_type %]</td>
<td class="nd_center-cell">[% row.finished | html_entity %]</td>
<td class="nd_center-cell">[% row.log | html_entity %]</td>
</tr>
[% END %]
</tbody>
</table>

View File

@@ -0,0 +1,18 @@
[% USE CSV -%]
[% CSV.dump([ 'Device Triggering Last Discovery Attempt' 'Device Port'
'Remote IP' 'Remote Port' 'Remote ID' 'Remote Type'
'Last Discovery Attempt' 'Discovery Log']) %]
[% FOREACH row IN results %]
[% mylist = [] %]
[% mylist.push(row.dns || row.name || row.ip) %]
[% mylist.push(row.port) %]
[% mylist.push(row.remote_ip) %]
[% mylist.push(row.remote_port) %]
[% mylist.push(row.remote_id) %]
[% mylist.push(row.remote_type) %]
[% mylist.push(row.finished) %]
[% mylist.push(row.log) %]
[% CSV.dump(mylist) %]
[% END %]