modify module inventory csv due to datatables changes
This commit is contained in:
@@ -109,7 +109,7 @@ get '/ajax/content/report/moduleinventory' => require_login sub {
|
|||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/moduleinventory_csv.tt',
|
template 'ajax/report/moduleinventory_csv.tt',
|
||||||
{ results => $rs, opt => $has_opt },
|
{ results => \@results, opt => $has_opt },
|
||||||
{ layout => undef };
|
{ layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
[% IF opt %]
|
[% IF opt %]
|
||||||
[% CSV.dump(['Device' 'Description' 'Name' 'Class' 'Type' 'Model' 'Serial' 'HW Version' 'SW Version' 'FW Version']) %]
|
[% CSV.dump(['Device' 'Description' 'Name' 'Class' 'Type' 'Model' 'Serial' 'HW Version' 'SW Version' 'FW Version']) %]
|
||||||
|
|
||||||
[% WHILE (row = results.next) %]
|
[% FOREACH row IN results %]
|
||||||
[% mylist = [] %]
|
[% mylist = [] %]
|
||||||
[% device = row.device.dns || row.device.name || row.device.ip %]
|
[% device = row.device.dns || row.device.name || row.ip %]
|
||||||
[% FOREACH col IN [ device row.description row.name row.class.ucfirst row.type row.model row.serial row.hw_ver row.sw_ver row.fw_ver ] %]
|
[% FOREACH col IN [ device row.description row.name row.class.ucfirst row.type row.model row.serial row.hw_ver row.sw_ver row.fw_ver ] %]
|
||||||
[% mylist.push(col) %]
|
[% mylist.push(col) %]
|
||||||
[% END %]
|
[% END %]
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
[% CSV.dump(['Class' 'Count']) %]
|
[% CSV.dump(['Class' 'Count']) %]
|
||||||
|
|
||||||
[% WHILE (row = results.next) %]
|
[% FOREACH row IN results %]
|
||||||
[% mylist = [] %]
|
[% mylist = [] %]
|
||||||
[% FOREACH col IN [ row.class.ucfirst row.count ] %]
|
[% FOREACH col IN [ row.class.ucfirst row.count ] %]
|
||||||
[% mylist.push(col) %]
|
[% mylist.push(col) %]
|
||||||
|
|||||||
Reference in New Issue
Block a user