From 3ee0c7692c48d78281a869f1d0fd722cb8c96039 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Tue, 7 Mar 2023 20:42:20 +0000 Subject: [PATCH] #991 Recently Added Devices report --- share/config.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/share/config.yml b/share/config.yml index 4560e192..4c272f04 100644 --- a/share/config.yml +++ b/share/config.yml @@ -214,6 +214,27 @@ system_reports: GROUP BY alias HAVING count(ip) > 1 ORDER BY count(ip) DESC, alias ASC + - tag: recentlyaddeddevices + category: Device + label: 'Recently Added Devices' + columns: + - { ip: 'Device IP', _searchable: true } + - { devname: 'Name' } + - { model: 'Model' } + - { vendor: 'Vendor' } + - { creation: 'Date Added' } + - { os: 'Operating System' } + - { os_ver: 'OS Version' } + - { location: 'Location' } + - { contact: 'Contact' } + - { serial: 'Serial' } + bind_params: ['since'] + query: | + SELECT ip, COALESCE(NULLIF(dns,''), NULLIF(name,''), '') AS devname, + model, vendor, creation, os, os_ver, location, contact, serial + FROM device + WHERE creation > (LOCALTIMESTAMP - COALESCE(NULLIF(?,''), '2 months')::interval) + ORDER BY creation DESC table_pagesize: 10 table_showrecordsmenu: - [10, 25, 50, 100, '-1']