<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
  <thead>
    <tr>
      <th>Observing Interface</th>
      <th>Undiscovered Neighbor</th> 
      <th>Neighbor ID</th> 
      <th nowrap>Last Discovery</th>
    </tr>
  </thead>
  <tbody>
    [% FOREACH row IN results %]
    [% NEXT IF NOT row.remote_ip %]
    <tr>
      <td nowrap><a href="[% device_ports | none %]&q=[% row.ip | uri %]">
              [% row.dns || row.name || row.ip | html_entity %]</a><br>
          <a href="[% device_ports | none %]&q=[% row.ip | uri %]&f=[% row.port | uri %]">
              [% row.port | html_entity %]</a>
          [% IF row.port_description %]<br>[% row.port_description | html_entity %][% END %]
          [% IF row.comment %]<br>&quot;<em>[% row.comment | html_entity %]</em>&quot;[% END %]
      </td>
      <td nowrap><a href="[% search_node | none %]&q=[% row.remote_ip | uri %]">
          [% IF row.remote_dns %][% row.remote_dns | html_entity %]</a><br>[% END %]
          [% row.remote_ip | html_entity %]</a><br>
          [% row.remote_port | html_entity %]</td>
      <td>[% row.remote_id | html_entity %]<br>
          [% row.remote_type | remove('(?:(?:C|c)opyright\s+)?\(c\).*') | remove('Technical Support: http://.*') | html_entity | html_line_break %]</td>
      <td nowrap>[% row.finished | html_entity %]<br>[% row.log | html_entity %]</td>
    </tr>
    [% END %]
  </tbody>
</table>

<script>
$(document).ready(function() {
  $('#data-table').dataTable({
    "order": [[ 2, 'desc' ], [ 1, 'asc' ] ],
[% INCLUDE 'ajax/datatabledefaults.tt' -%]
  } );
} );
</script>

