User Reports via config, without requiring HTML or Perl
This commit is contained in:
@@ -55,7 +55,7 @@ safe_password_store: true
|
||||
# when: '20 23 * * *'
|
||||
|
||||
# increase the performance of parallel DNS resolution for node
|
||||
# names (the default is max_outstanding: 10)
|
||||
# names (the default is max_outstanding: 50)
|
||||
# ````````````````````````````````````````````````````````````
|
||||
#dns:
|
||||
# max_outstanding: 100
|
||||
|
||||
18
Netdisco/share/views/ajax/report/generic_report.tt
Normal file
18
Netdisco/share/views/ajax/report/generic_report.tt
Normal file
@@ -0,0 +1,18 @@
|
||||
<table class="table table-bordered table-condensed table-striped nd_floatinghead">
|
||||
<thead>
|
||||
<tr>
|
||||
[% FOREACH hdr IN headings %]
|
||||
<th>[% hdr | html_entity %]</th>
|
||||
[% END %]
|
||||
</tr>
|
||||
</thead>
|
||||
</tbody>
|
||||
[% WHILE (row = results.next) %]
|
||||
<tr>
|
||||
[% FOREACH col IN columns %]
|
||||
<td>[% row.get_column(col) | html_entity %]</td>
|
||||
[% END %]
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
</table>
|
||||
11
Netdisco/share/views/ajax/report/generic_report_csv.tt
Normal file
11
Netdisco/share/views/ajax/report/generic_report_csv.tt
Normal file
@@ -0,0 +1,11 @@
|
||||
[% USE CSV %]
|
||||
[% CSV.dump(headings) %]
|
||||
|
||||
[% FOREACH row IN results.all %]
|
||||
[% mylist = [] %]
|
||||
[% FOREACH col IN columns %]
|
||||
[% mylist.push(row.get_column(col)) %]
|
||||
[% END %]
|
||||
[% CSV.dump(mylist) %]
|
||||
|
||||
[% END %]
|
||||
Reference in New Issue
Block a user