#920 orphan vlans report

This commit is contained in:
Oliver Gorwits
2023-11-27 21:23:54 +00:00
parent bf64f0f368
commit ef2ab9b6b4

View File

@@ -242,6 +242,20 @@ system_reports:
FROM device FROM device
WHERE creation > (LOCALTIMESTAMP - COALESCE(NULLIF(?,''), '2 months')::interval) WHERE creation > (LOCALTIMESTAMP - COALESCE(NULLIF(?,''), '2 months')::interval)
ORDER BY creation DESC ORDER BY creation DESC
- tag: vlansonlyuplinks
category: VLAN
label: 'VLANs Only On Uplinks'
columns:
- { ip: 'Device IP', _searchable: true }
- { vlans: 'VLAN List' }
query: |
SELECT ip, array_to_string(array_agg(DISTINCT vlan::integer ORDER BY vlan::integer ASC), ', ') AS vlans
FROM device_port_vlan
WHERE native IS false
AND vlan NOT IN
(SELECT vlan FROM device_port_vlan WHERE native IS true)
GROUP BY ip
ORDER BY ip
table_pagesize: 10 table_pagesize: 10
table_showrecordsmenu: table_showrecordsmenu:
- [10, 25, 50, 100, '-1'] - [10, 25, 50, 100, '-1']