improve searchable generic report fields (#1133)
* implement links on all v4/v6/mac found in _searchable fields * word boundaries on matching
This commit is contained in:
@@ -183,7 +183,7 @@ system_reports:
|
||||
label: 'Blocked - Error-Disabled'
|
||||
category: Port
|
||||
columns:
|
||||
- { ip: Device }
|
||||
- { ip: Device, _searchable: true }
|
||||
- { dns: DNS }
|
||||
- { port: Port }
|
||||
- { name: Description }
|
||||
@@ -259,12 +259,12 @@ system_reports:
|
||||
HAVING count(vlan) > COALESCE(NULLIF(?,''), '1') ::integer
|
||||
ORDER BY vlans DESC, ip ASC, port ASC
|
||||
- tag: duplicateprivatenetworks
|
||||
category: Port
|
||||
category: IP
|
||||
label: 'Duplicate Private Networks'
|
||||
columns:
|
||||
- { subnet: 'Subnet', _searchable: true }
|
||||
- { count: 'Instances' }
|
||||
- { seen: 'Where Seen' }
|
||||
- { seen: 'Where Seen', _searchable: true }
|
||||
query: |
|
||||
SELECT subnet, count(subnet), array_agg(host(alias)::text || ' on ' || host(ip)::text) AS seen
|
||||
FROM device_ip
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<td>
|
||||
[% FOREACH record IN row.item(col) %]
|
||||
[% IF column_options.$col._searchable %]
|
||||
<a href="[% uri_for('/search') | none %]?q=[% record | uri %]">[% record | html_entity %]</a>
|
||||
[% record | none %]
|
||||
[% ELSE %]
|
||||
[% record | html_entity %]
|
||||
[% END %]
|
||||
|
||||
Reference in New Issue
Block a user