custom reports returning array columns will be split over lines
This commit is contained in:
@@ -265,7 +265,7 @@ system_reports:
|
||||
- { count: 'Instances' }
|
||||
- { seen: 'Where Seen' }
|
||||
query: |
|
||||
SELECT subnet, count(subnet), array_to_string(array_agg(host(alias)::text || ' on ' || host(ip)::text), ', ') AS seen
|
||||
SELECT subnet, count(subnet), array_agg(host(alias)::text || ' on ' || host(ip)::text) AS seen
|
||||
FROM device_ip
|
||||
WHERE ip <> alias
|
||||
AND (masklen(subnet) <> 32 AND masklen(subnet) <> 128)
|
||||
|
||||
@@ -10,13 +10,16 @@
|
||||
[% FOREACH row IN results %]
|
||||
<tr>
|
||||
[% FOREACH col IN columns %]
|
||||
[% IF column_options.$col._searchable %]
|
||||
<td>
|
||||
<a href="[% uri_for('/search') | none %]?q=[% row.item(col) | uri %]">[% row.item(col) | html_entity %]</a>
|
||||
</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>
|
||||
[% ELSE %]
|
||||
<td>[% row.item(col) | html_entity %]</td>
|
||||
[% record | html_entity %]
|
||||
[% END %]
|
||||
[% '<br />' IF loop.size > 1 %]
|
||||
[% END %]
|
||||
</td>
|
||||
[% END %]
|
||||
</tr>
|
||||
[% END %]
|
||||
|
||||
Reference in New Issue
Block a user