relocate repo files so ND2 is the only code
This commit is contained in:
54
share/views/ajax/report/portutilization.tt
Normal file
54
share/views/ajax/report/portutilization.tt
Normal file
@@ -0,0 +1,54 @@
|
||||
<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Device</th>
|
||||
<th class="nd_center-cell">Total Ports</th>
|
||||
<th class="nd_center-cell">In Use</th>
|
||||
<th class="nd_center-cell">Shutdown</th>
|
||||
<th class="nd_center-cell">Free</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="[% device_ports %]&q=' + encodeURIComponent(data) + '">' + he.encode(row.dns || row.ip) + '</a>';
|
||||
}
|
||||
}, {
|
||||
"data": 'port_count',
|
||||
"searchable": false,
|
||||
"render": function(data, type, row, meta) {
|
||||
return data.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
}, {
|
||||
"data": 'ports_in_use',
|
||||
"searchable": false,
|
||||
"render": function(data, type, row, meta) {
|
||||
return data.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
}, {
|
||||
"data": 'ports_shutdown',
|
||||
"searchable": false,
|
||||
"render": function(data, type, row, meta) {
|
||||
return data.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
}, {
|
||||
"data": 'ports_free',
|
||||
"searchable": false,
|
||||
"render": function(data, type, row, meta) {
|
||||
return data.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
}
|
||||
],
|
||||
[% INCLUDE 'ajax/datatabledefaults.tt' -%]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user