50 lines
1.3 KiB
Plaintext
50 lines
1.3 KiB
Plaintext
<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>DNS</th>
|
|
<th>IP Address</th>
|
|
<th>Contact</th>
|
|
<th>Location</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
var table = $('#data-table').dataTable({
|
|
"deferRender": true,
|
|
"data": [% results %],
|
|
"columns": [
|
|
{
|
|
"data": 'ip',
|
|
"render": function(data, type, row, meta) {
|
|
return '<a href="[% search_device %]&q=' + encodeURIComponent(data) + '">' + he.encode(row.name || row.ip) + '</a>';
|
|
}
|
|
}, {
|
|
"data": 'dns',
|
|
"render": function(data, type, row, meta) {
|
|
return he.encode(data || '');
|
|
}
|
|
}, {
|
|
"data": 'ip',
|
|
"render": function(data, type, row, meta) {
|
|
return he.encode(data || '');
|
|
}
|
|
}, {
|
|
"data": 'contact',
|
|
"render": function(data, type, row, meta) {
|
|
return he.encode(data || '');
|
|
}
|
|
}, {
|
|
"data": 'location',
|
|
"render": function(data, type, row, meta) {
|
|
return he.encode(data || '');
|
|
}
|
|
}
|
|
],
|
|
[% INCLUDE 'ajax/datatabledefaults.tt' -%]
|
|
});
|
|
});
|
|
</script>
|