App-Netdisco
view release on metacpan or search on metacpan
share/views/ajax/report/apradiochannelpower.tt view on Meta::CPAN
<table id="data-table" class="table table-bordered table-hover" width="100%" cellspacing="0">
<thead>
<tr>
<th>IP</th>
<th>DNS</th>
<th>Device</th>
<th>Port</th>
<th>Name</th>
<th>Description</th>
<th class="nd_center-cell">Channel</th>
<th class="nd_center-cell">Tx Power (mW/dBm)</th>
</tr>
</thead>
</table>
<style>
tr.group,
tr.group:hover {
background-color: #ddd !important;
}
</style>
<script>
function groupString(d) {
"use strict";
var s = '';
s = s + 'Device: ';
s = s + '<a href="[% uri_for('/device') | none %]?tab=details&q=' + encodeURIComponent(d.ip) + '">';
s = s + he.encode(d.dns || d.device_name || d.ip);
if (d.dns || d.device_name) {
s = s + ' (' + he.encode(d.ip) + ') ';
}
s = s + '</a> Model: ' + he.encode(d.model || '');
s = s + he.encode(d.location ? ' Location: ' + d.location : '');
return s;
}
$(document).ready(function() {
var table = $('#data-table').DataTable({
"serverSide": true,
"ajax": "[% uri_for('/ajax/content/report/apradiochannelpower/data') | none %]",
"order": [[ 0, 'asc' ]],
"columns": [
{
// Grouping column
"data": 'ip',
"visible": false
}, {
// Included for filtering
"data": 'dns',
"visible": false
}, {
// Included for filtering
"data": 'device_name',
"visible": false
}, {
"data": 'port',
"type": 'portsort',
"render": function(data, type, row, meta) {
return type === 'display' ?
'<a href="[% device_ports | none %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(data) + '">' + he.encode(data || '') + '</a>' :
he.encode(data || '');
}
}, {
"data": 'port_name',
"render": function(data, type, row, meta) {
return he.encode(data || '');
}
}, {
"data": 'descr',
"render": function(data, type, row, meta) {
return he.encode(data || '');
}
}, {
"data": 'channel',
"className": "nd_center-cell"
}, {
"data": 'power',
( run in 2.024 seconds using v1.01-cache-2.11-cpan-e1769b4cff6 )