use new faster portvlanmismatch query without duplication

This commit is contained in:
Oliver Gorwits
2023-06-13 17:40:27 +01:00
parent 460b014e91
commit f14e495e49
3 changed files with 126 additions and 70 deletions

View File

@@ -3,10 +3,10 @@
<tr>
<th>Left Device</th>
<th>Left Port</th>
<th>Left VLANs</th>
<th>Only Left VLANs</th>
<th>Right Device</th>
<th>Right Port</th>
<th>Right VLANs</th>
<th>Only Right VLANs</th>
</tr>
</thead>
</table>
@@ -18,35 +18,35 @@ $(document).ready(function() {
"data": [% results | none %],
"columns": [
{
"data": 'left_device',
"data": 'left_ip',
"render": function(data, type, row, meta) {
return '<a href="[% device_ports | none %]&q=' + encodeURIComponent(data) + '">' + he.encode(data || '') + '</a>'
+ '<br />' + he.encode(row.left_name || ''); }
+ '<br />' + he.encode(row.left_dns || ''); }
}, {
"data": 'left_port',
"type": 'portsort',
"render": function(data, type, row, meta) {
return type === 'display' ?
'<a href="[% device_ports | none %]&q=' + encodeURIComponent(row.left_device) + '&f=' + encodeURIComponent(data) + '">' + he.encode(data || '') + '</a>'
+ '<br />' + he.encode(row.left_portname || '')
'<a href="[% device_ports | none %]&q=' + encodeURIComponent(row.left_ip) + '&f=' + encodeURIComponent(data) + '">' + he.encode(data || '') + '</a>'
+ '<br />' + he.encode(row.left_port_descr || '')
: he.encode(data || ''); }
}, {
"data": 'left_vlans'
"data": 'only_left_vlans'
}, {
"data": 'right_device',
"data": 'right_ip',
"render": function(data, type, row, meta) {
return '<a href="[% device_ports | none %]&q=' + encodeURIComponent(data) + '">' + he.encode(data || '') + '</a>'
+ '<br />' + he.encode(row.right_name || ''); }
+ '<br />' + he.encode(row.right_dns || ''); }
}, {
"data": 'right_port',
"type": 'portsort',
"render": function(data, type, row, meta) {
return type === 'display' ?
'<a href="[% device_ports | none %]&q=' + encodeURIComponent(row.right_device) + '&f=' + encodeURIComponent(data) + '">' + he.encode(data || '') + '</a>'
+ '<br />' + he.encode(row.right_portname || '')
'<a href="[% device_ports | none %]&q=' + encodeURIComponent(row.right_ip) + '&f=' + encodeURIComponent(data) + '">' + he.encode(data || '') + '</a>'
+ '<br />' + he.encode(row.right_port_descr || '')
: he.encode(data || ''); }
}, {
"data": 'right_vlans'
"data": 'only_right_vlans'
}
],
[% INCLUDE 'ajax/datatabledefaults.tt' -%]