Add IP Phones discovered through LLDP/CDP report
This commit is contained in:
28
Netdisco/share/views/ajax/report/phonesdiscovered.tt
Normal file
28
Netdisco/share/views/ajax/report/phonesdiscovered.tt
Normal file
@@ -0,0 +1,28 @@
|
||||
<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">Port</th>
|
||||
<th class="nd_center-cell">Remote ID</th>
|
||||
<th class="nd_center-cell">Remote IP</th>
|
||||
<th class="nd_center-cell">Remote Port</th>
|
||||
<th class="nd_center-cell">Remote Type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</tbody>
|
||||
[% WHILE (row = results.next) %]
|
||||
<tr>
|
||||
<td class="nd_center-cell">[% row.dns || row.name || row.ip | html_entity %]</td>
|
||||
<td class="nd_center-cell"><a class="nd_linkcell"
|
||||
href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.port | uri %]">
|
||||
[% row.port | html_entity %]</a></td>
|
||||
<td class="nd_center-cell">[% row.remote_id | html_entity %]</td>
|
||||
<td class="nd_center-cell"><a class="nd_linkcell"
|
||||
href="[% search_node %]&q=[% row.remote_ip | uri %]">[% row.remote_ip | html_entity %]</a></td>
|
||||
<td class="nd_center-cell">[% row.remote_port | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% row.remote_type | html_entity %]</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
12
Netdisco/share/views/ajax/report/phonesdiscovered_csv.tt
Normal file
12
Netdisco/share/views/ajax/report/phonesdiscovered_csv.tt
Normal file
@@ -0,0 +1,12 @@
|
||||
[% USE CSV -%]
|
||||
[% CSV.dump([ 'Device' 'Port' 'Remote ID' 'Remote IP' 'Remote Port' 'Remote Type']) %]
|
||||
|
||||
[% WHILE (row = results.next) %]
|
||||
[% 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 %]
|
||||
Reference in New Issue
Block a user