[% IF NOT results.size %]
<div class="span4 alert alert-info">No significant events to report.</div>
[% ELSE %]
<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
  <thead>
    <tr>
      <th class="nd_center-cell">Poller Host</th>
      <th class="nd_center-cell">Device</th>
      <th class="nd_center-cell">Device DNS</th>
      <th class="nd_center-cell">Failed Connections</th>
      <th class="nd_center-cell">Last Retry</th>
      <th class="nd_center-cell">Try Again</th>
    </tr>
  </thead>
  <tbody>
    [% FOREACH row IN results %]
    <tr>
      <td class="nd_center-cell">[% row.backend | html_entity %]</td>
      <td class="nd_center-cell"><a class="nd_linkcell"
        href="[% uri_for('/search') | none %]?tab=node&q=[% row.device | uri %]">[% row.device | html_entity %]</a></td>
      <td class="nd_center-cell">[% row.dns | html_entity %]</td>
      <td class="nd_center-cell">[% row.deferrals | html_entity %]</td>
      <td class="nd_center-cell">[% row.last_defer | html_entity %]</td>
      <td class="nd_center-cell">
        <input data-form="del" name="backend" type="hidden" value="[% row.backend | html_entity %]">
        <input data-form="del" name="device"  type="hidden" value="[% row.device  | html_entity %]">
        <button class="btn nd_adminbutton" name="del" type="submit">
          <i class="icon-repeat text-success"></i>
        </button>
      </td>
    </tr>
    [% END %]
  </tbody>
</table>
[% END %]

<script>
$(document).ready(function() {
  $('#data-table').dataTable({
[% INCLUDE 'ajax/datatabledefaults.tt' -%]
  } );
} );
</script>