The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
  <thead>
    <tr>
      <th>VLAN ID</th>
      <th>VLAN Name</th>
      <th>Device Count</th>
      <th>Port Count</th>
    </tr>
  </thead>
</table>

<script type="text/javascript">
$(document).ready(function() {
  var table = $('#data-table').dataTable({
    "deferRender": true,
    "data": [% results %],
    "columns": [
      {
        "data": 'vlan',
        "render": function(data, type, row, meta) {
          return '<a href="[% uri_for('/search') %]?tab=vlan&q=' + encodeURIComponent(data) + '">' + data + '</a>';
        }
      }, {
        "data": 'description',
        "render": function(data, type, row, meta) {
          return '<a href="[% uri_for('/search') %]?tab=vlan&q=' + encodeURIComponent(data) + '">' + he.encode(data || '') + '</a>';
        }
      }, {
        "data": 'dcount',
        "searchable": false,
        "render": function(data, type, row, meta) {
          return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
        }
      }, {
        "data": 'pcount',
        "searchable": false,
        "render": function(data, type, row, meta) {
          return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
        }
      }
    ],
[% INCLUDE 'ajax/datatabledefaults.tt' -%]
  });
});
</script>