From deb33ed79c6792bb7b9889763a016fed17fe10e4 Mon Sep 17 00:00:00 2001 From: "Eric A. Miller" Date: Thu, 19 Jun 2014 19:07:07 -0400 Subject: [PATCH] Modify wireless ap radio channel power CSV report to work with new datatables results --- .../ajax/report/apradiochannelpower_csv.tt | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/Netdisco/share/views/ajax/report/apradiochannelpower_csv.tt b/Netdisco/share/views/ajax/report/apradiochannelpower_csv.tt index bac27864..9e7feaf8 100644 --- a/Netdisco/share/views/ajax/report/apradiochannelpower_csv.tt +++ b/Netdisco/share/views/ajax/report/apradiochannelpower_csv.tt @@ -2,21 +2,14 @@ [% CSV.dump([ 'Device' 'Model' 'Device Location' 'Port' ' Port Name' 'Port Description' 'Channel' 'Tx Power mW' 'Tx Power dBm' ]) %] -[% FOREACH row IN results.keys.sort %] +[% FOREACH row IN results %] [% mydlist = [] %] - [% mydevice = results.$row.device.dns || results.$row.device.name %] + [% mydevice = row.dns || row.device_name || row.ip %] [% mydlist.push(mydevice) %] - [% mydlist.push(results.$row.device.model) %] - [% mydlist.push(results.$row.device.location) %] - [% FOREACH p IN results.$row.ports %] - [% myplist = [] %] - [% NEXT UNLESS p.channel # No channel port is admin down %] - [% FOREACH col IN [ p.port p.name p.descr p.channel p.power - p.power2 ] %] - [% myplist.push(col) %] - [% END %] - [% CALL mydlist.splice(3, 6, myplist ) %] - [% CSV.dump(mydlist) %] - + [% FOREACH col IN [ row.model row.location row.port row.name row.descr + row.channel row.power row.power2 ] %] + [% mydlist.push(col) %] [% END %] + [% CSV.dump(mydlist) %] + [%END%]