64 lines
1.7 KiB
Plaintext
64 lines
1.7 KiB
Plaintext
<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
|
|
<thead>
|
|
<tr>
|
|
<th>Device</th>
|
|
<th>Port</th>
|
|
<th>Remote ID</th>
|
|
<th>Remote IP</th>
|
|
<th>Remote Port</th>
|
|
<th>Remote Type</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
var table = $('#data-table').dataTable({
|
|
"processing": true,
|
|
"stateSave": true,
|
|
"pageLength": [% settings.table_pagesize %],
|
|
"language": {
|
|
"search": 'Filter records: '
|
|
},
|
|
"deferRender": true,
|
|
"data": [% results %],
|
|
"columns": [
|
|
{
|
|
"data": 'ip',
|
|
"render": function(data, type, row, meta) {
|
|
return he.encode(row.dns || row.name || 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>' :
|
|
data;
|
|
}
|
|
}, {
|
|
"data": 'remote_id',
|
|
"render": function(data, type, row, meta) {
|
|
return he.encode(data || '');
|
|
}
|
|
}, {
|
|
"data": 'remote_ip',
|
|
"render": function(data, type, row, meta) {
|
|
return '<a href="[% search_node %]&q=' + encodeURIComponent(data) + '">' + he.encode(data) + '</a>';
|
|
}
|
|
}, {
|
|
"data": 'remote_port',
|
|
"render": function(data, type, row, meta) {
|
|
return he.encode(data || '');
|
|
}
|
|
}, {
|
|
"data": 'remote_type',
|
|
"render": function(data, type, row, meta) {
|
|
return he.encode(data || '');
|
|
}
|
|
}
|
|
]
|
|
});
|
|
});
|
|
</script>
|