Files
netdisco/Netdisco/share/views/ajax/report/devicebylocation.tt
Eric A. Miller 8e37f6f47f Remove floatThead
2014-05-27 23:27:05 -04:00

55 lines
1.9 KiB
Plaintext

<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
<th class="nd_center-cell">Location</th>
<th class="nd_center-cell">Device</th>
<th class="nd_center-cell">System Name</th>
<th class="nd_center-cell">Vendor</th>
<th class="nd_center-cell">Model</th>
</tr>
</thead>
</table>
<script type="text/javascript">
$(document).ready(function() {
var table = $('#data-table').dataTable({
"deferRender": true,
"data": [% results %],
"columns": [
{
data: 'location',
render: function(data, type, row, meta) {
if (data) {
return '<a href="[% search_device %]&q=' + data + '&location=' + data + '">' + data + '</a>';
} else {
return '[Not Set]';
}
}
}, {
data: 'ip',
render: function(data, type, row, meta) {
return '<a href="[% uri_for('/device') %]?q=' + data + '">' + (row.dns || row.ip) + '</a>';
}
}, {
data: 'name',
render: function(data, type, row, meta) {
return '<a href="[% search_device %]&q=' + data + '&model=' + data + '">' + data + '</a>';
}
}, {
data: 'vendor',
render: function(data, type, row, meta) {
return '<a href="[% search_device %]&q=' + data + '&model=' + data + '">' + data + '</a>';
}
}, {
data: 'model',
render: function(data, type, row, meta) {
return '<a href="[% search_device %]&q=' + data + '&model=' + data + '">' + data + '</a>';
}
}
]
});
});
</script>