#442 add device ip, port and vlan to the node vendor report results

This commit is contained in:
Oliver Gorwits
2020-02-13 15:36:45 +00:00
parent 8b42fb3774
commit 654799e825

View File

@@ -5,10 +5,9 @@
<tr> <tr>
<th>MAC</th> <th>MAC</th>
<th>Vendor</th> <th>Vendor</th>
<th>Device (Port)</th> <th>Device (IP)</th>
<th>Device DNS</th> <th>Port</th>
<th>Device Name</th> <th>VLAN</th>
<th>Device IP</th>
</tr> </tr>
</thead> </thead>
</table> </table>
@@ -46,22 +45,20 @@ $(document).ready(function() {
return '<a href="[% uri_for('/report/nodevendor') | none %]?vendor=' + encodeURIComponent(row.oui.abbrev || 'blank') + '">' + he.encode(row.oui.company ||'(Unknown Vendor)') + '</a>'; return '<a href="[% uri_for('/report/nodevendor') | none %]?vendor=' + encodeURIComponent(row.oui.abbrev || 'blank') + '">' + he.encode(row.oui.company ||'(Unknown Vendor)') + '</a>';
} }
}, { }, {
"data": 'port', "data": 'switch',
"render": function(data, type, row, meta) { "render": function(data, type, row, meta) {
return '<a href="[% device_ports | none %]&q=' + encodeURIComponent(row.switch) + '&f=' + encodeURIComponent(data) + '&c_nodes=on&n_ssid=on">' + he.encode(row.device.dns || row.device.name || row.switch) + '(' + he.encode(data) + ')</a>'; return '<a href="[% uri_for('/device') | none %]?q=' + encodeURIComponent(data) + '">' + he.encode(row.device.dns || row.device.name || data) + ' (' + he.encode(data) + ')</a>';
} }
}, { }, {
// Included for filtering "data": 'port',
"data": 'device.dns', "render": function(data, type, row, meta) {
"visible": false return '<a href="[% device_ports | none %]&q=' + encodeURIComponent(row.switch) + '&f=' + encodeURIComponent(data) + '&c_nodes=on&n_ssid=on&prefer=port">' + he.encode(data) + '</a>';
}
}, { }, {
// Included for filtering "data": 'vlan',
"data": 'device.name', "render": function(data, type, row, meta) {
"visible": false return '<a href="[% device_ports | none %]&q=' + encodeURIComponent(row.switch) + '&f=' + encodeURIComponent(data) + '&c_nodes=on&n_ssid=on&prefer=vlan">' + he.encode(data) + '</a>';
}, { }
// Included for filtering
"data": 'switch',
"visible": false
} }
], ],
[% ELSE %] [% ELSE %]