[#181] AP Client Count report was broken
The DB query was joining on the device_port_wireless table which as any fule kno isn't using the device port subinterface name so there would always be zero results (as wireless data is related to the subinterface). Fixed the query to use the device_port_ssid table, and also added a dedicated template so additional data can be displayed in the report.
This commit is contained in:
		
							
								
								
									
										14
									
								
								Netdisco/share/views/ajax/report/apclients_csv.tt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								Netdisco/share/views/ajax/report/apclients_csv.tt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| [% USE CSV -%] | ||||
| [% CSV.dump([ 'Device' 'Model' 'Location' 'Port' 'SSID' 'Node Count' ]) %] | ||||
|  | ||||
| [% FOREACH row IN results %] | ||||
|   [% mylist = [] %] | ||||
|   [% mylist.push(row.dns || row.name || row.ip) %] | ||||
|   [% mylist.push(row.model) %] | ||||
|   [% mylist.push(row.location) %] | ||||
|   [% mylist.push(row.port) %] | ||||
|   [% mylist.push(row.ssid) %] | ||||
|   [% mylist.push(row.mac_count) %] | ||||
|   [% CSV.dump(mylist) %] | ||||
|  | ||||
| [% END %] | ||||
		Reference in New Issue
	
	Block a user