tune the portvlanmismatch and include domain name in report view

This commit is contained in:
Oliver Gorwits
2023-06-19 21:28:23 +01:00
parent f14e495e49
commit bb046f036e
2 changed files with 4 additions and 6 deletions

View File

@@ -60,7 +60,7 @@ FROM (
ON dpv.ip = dp.ip AND dpv.port = dp.port
LEFT JOIN device_ip dip
ON dp.remote_ip = dip.alias
ON dp.remote_ip = dip.alias AND (SELECT count(*) FROM device_ip WHERE alias = dp.remote_ip) = 1
UNION
@@ -74,7 +74,7 @@ FROM (
ON dp3.ip = dpv2.ip AND dp3.port = dpv2.port
LEFT JOIN device_ip dip2
ON dp2.remote_ip = dip2.alias
ON dp2.remote_ip = dip2.alias AND (SELECT count(*) FROM device_ip WHERE alias = dp2.remote_ip) = 1
) alldpv
WHERE vlan NOT IN ( ?, ?, ?, ? ) AND remote_ip IS NOT NULL

View File

@@ -20,8 +20,7 @@ $(document).ready(function() {
{
"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_dns || ''); }
return '<a href="[% device_ports | none %]&q=' + encodeURIComponent(data) + '">' + he.encode(row.left_dns || data || '') + '</a>'; }
}, {
"data": 'left_port',
"type": 'portsort',
@@ -35,8 +34,7 @@ $(document).ready(function() {
}, {
"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_dns || ''); }
return '<a href="[% device_ports | none %]&q=' + encodeURIComponent(data) + '">' + he.encode(row.right_dns || data || '') + '</a>'; }
}, {
"data": 'right_port',
"type": 'portsort',