* move things to debug logging instead of info * use message which was discussed * fix for address table sorting
53 lines
1.5 KiB
Plaintext
53 lines
1.5 KiB
Plaintext
<table id="da-data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
|
|
<thead>
|
|
<tr>
|
|
<th>Address</th>
|
|
<th>DNS</th>
|
|
<th class="nd_center-cell">Interface</th>
|
|
<th>Description</th>
|
|
<th>Prefix</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
var table = $('#da-data-table').dataTable({
|
|
"deferRender": true,
|
|
"data": [% results %],
|
|
"columns": [
|
|
{
|
|
"data": 'alias',
|
|
"render": function(data, type, row, meta) {
|
|
return he.encode(data || '');
|
|
}
|
|
}, {
|
|
"data": 'dns',
|
|
"render": function(data, type, row, meta) {
|
|
return he.encode(data || '');
|
|
}
|
|
}, {
|
|
"data": 'port',
|
|
"type": 'portsort',
|
|
"render": function(data, type, row, meta) {
|
|
return type === 'display' ?
|
|
'<a href="[% device_ports %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(data) + '">' + he.encode(data || '') + '</a>' :
|
|
he.encode(data || '');
|
|
}
|
|
}, {
|
|
"data": 'name',
|
|
"render": function(data, type, row, meta) {
|
|
return he.encode(data || '');
|
|
}
|
|
}, {
|
|
"data": 'subnet',
|
|
"render": function(data, type, row, meta) {
|
|
return '<a href="[% search_device %]&q=' + encodeURIComponent(data) + '&ip=' + encodeURIComponent(data) + '">' + he.encode(data || '') + '</a>';
|
|
}
|
|
}
|
|
],
|
|
[% INCLUDE 'ajax/datatabledefaults.tt' -%]
|
|
});
|
|
});
|
|
</script>
|