[% USE Number.Format %]
<table class="table table-bordered table-hover nd_floatinghead">
<thead>
<tr>
<th>MAC</th>
[% IF params.show_vendor %]
<th>Vendor</th>
[% END %]
<th>Match</th>
<th>Device or Node</th>
[% IF params.stamps %]
<th>First Seen</th>
<th>Last Seen</th>
[% END %]
</tr>
</thead>
</tbody>
[% SET first_row = 1 %]
[% WHILE (row = ips.next) %]
<tr>
<td>
[% IF first_row %]
<a class="nd_linkcell"
href="[% search_node %]&q=[% row.net_mac.$mac_format_call | uri %]">
[% row.net_mac.$mac_format_call | html_entity %]</a>
[% ELSE %]
[% END %]
</a>
[% IF params.show_vendor %]
<td>
[% IF first_row %]
[% row.oui.company | html_entity %]
[% ELSE %]
[% END %]
</td>
[% END %]
<td>MAC → IP</td>
<td><a href="[% search_node %]&q=[% row.ip | uri %]">[% row.ip | html_entity %]</a>
[% ' <i class="icon-book text-warning"></i> ' IF NOT row.active %]
[% ' (' _ row.dns.remove(settings.domain_suffix) _ ')' IF row.dns %]
</td>
[% IF params.stamps %]
<td>[% row.time_first_stamp | html_entity %]</td>
<td>[% row.time_last_stamp | html_entity %]</td>
[% END %]
</tr>
[% SET first_row = 0 %]
[% END %]
[% WHILE (node = sightings.next) %]
<tr>
<td>
[% IF first_row %]
<a class="nd_linkcell"
href="[% search_node %]&q=[% node.net_mac.$mac_format_call | uri %]">
[% node.net_mac.$mac_format_call | html_entity %]</a>
[% ELSE %]
[% END %]
</td>
[% IF params.show_vendor %]
<td>
[% IF first_row %]
[% node.oui.company | html_entity %]
[% ELSE %]
[% END %]
</td>
[% END %]
<td>Switch Port</td>
<td><a class="nd_linkcell"
href="[% device_ports %]&q=[% node.switch | uri %]&f=[% node.port | uri %]&c_nodes=on&c_neighbors=on">
[% node.switch | html_entity %] - [% node.port | html_entity %]</a>
[% ' <i class="icon-book text-warning"></i> ' IF NOT node.active %]
[% IF node.device.dns AND node.device_port AND node.device_port.name %]
([% node.device.dns | html_entity %] - [% node.device_port.name | html_entity %])
[% END %]
</td>
[% IF params.stamps %]
<td>[% node.time_first_stamp | html_entity %]</td>
<td>[% node.time_last_stamp | html_entity %]</td>
[% END %]
</tr>
[% SET first_row = 0 %]
[% END %]
[% WHILE (port = ports.next) %]
<tr>
<td>
[% IF first_row %]
<a class="nd_linkcell"
href="[% search_node %]&q=[% port.mac | uri %]">[% port.mac | html_entity %]</a>
[% ELSE %]
[% END %]
</td>
[% IF params.show_vendor %]
<td>
[% IF first_row %]
[% port.oui.company | html_entity %]
[% ELSE %]
[% END %]
</td>
[% END %]
<td>Switch Port</td>
<td><a class="nd_linkcell"
href="[% device_ports %]&q=[% port.ip | uri %]&f=[% port.port | uri %]&c_mac=on&c_nodes=on&c_neighbors=on">
[% port.ip | html_entity %] - [% port.descr | html_entity %]</a>
[% IF port.device.dns AND port.name %]
([% port.device.dns | html_entity %] - [% port.name | html_entity %])
[% END %]
</td>
[% IF params.stamps %]
<td>[% port.creation | html_entity %]</td>
<td>[% port.creation | html_entity %]</td>
[% END %]
</tr>
[% SET first_row = 0 %]
[% END %]
[% WHILE (nbt = netbios.next) %]
<tr>
<td>
[% IF first_row %]
<a class="nd_linkcell"
href="[% search_node %]&q=[% nbt.mac | uri %]">[% nbt.mac | html_entity %]</a>
[% ELSE %]
[% END %]
</td>
[% IF params.show_vendor %]
<td>
</td>
[% END %]
<td>NetBIOS</td>
<td class="nd_linkcell">\\<a href="[% uri_for('/report/netbios') %]?domain=[% nbt.domain | uri %]" title="Devices in this Domain">[% nbt.domain | html_entity %]</a>\<a href="[% search_node %]&q=[% nbt.nbname | uri %]">[% nbt.nbname | html_entity %]</a>
<br>[% nbt.nbuser || '[No User]' | html_entity %]@<a href="[% search_node %]&q=[% nbt.ip | uri %]">[% nbt.ip | html_entity %]</a>
</td>
[% IF params.stamps %]
<td>[% nbt.time_first_stamp | html_entity %]</td>
<td>[% nbt.time_last_stamp | html_entity %]</td>
[% END %]
</tr>
[% SET first_row = 0 %]
[% END %]
[% WHILE (wlan = wireless.next) %]
<tr>
<td>
[% IF first_row %]
<a class="nd_linkcell"
href="[% search_node %]&q=[% wireless.mac | uri %]">[% wireless.mac | html_entity %]</a>
[% ELSE %]
[% END %]
</td>
[% IF params.show_vendor %]
<td>
</td>
[% END %]
<td>Wireless Info</td>
<td class="nd_center-cell">SSID: [% wlan.ssid | html_entity %]<br>
MaxRate: [% wlan.maxrate | html_entity %]Mbps TxRate: [% wlan.txrate | html_entity %]Mbps<br>
SigStr: [% wlan.sigstrength | html_entity %] SigQual: [% wlan.sigqual | html_entity %]<br>
Rx: [% wlan.rxpkt | format_number %] pkts, [% wlan.rxbyte | format_number %] bytes<br>
Tx: [% wlan.txpkt | format_number %] pkts, [% wlan.txbyte | format_number %] bytes<br>
</td>
[% IF params.stamps %]
<td> </td>
<td>[% wlan.get_column('time_last_stamp') | html_entity %]</td>
[% END %]
</tr>
[% SET first_row = 0 %]
[% END %]
</tbody>
</table>