[#195] Fix CGI params parsing rows limit when "All" selected
This commit is contained in:
		@@ -171,7 +171,7 @@ sub _with_datatables_paging {
 | 
			
		||||
    $attrs->{'offset'} = $offset;
 | 
			
		||||
 | 
			
		||||
    $rs = $rs->search( {}, $attrs );
 | 
			
		||||
    $rs = $rs->limit($limit);
 | 
			
		||||
    $rs = $rs->limit($limit) if ($limit and $limit > 0);
 | 
			
		||||
 | 
			
		||||
    return $rs;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -22,11 +22,8 @@ get '/ajax/content/report/devicepoestatus/data' => require_role admin => sub {
 | 
			
		||||
    my $rs = schema('netdisco')->resultset('Virtual::DevicePoeStatus');
 | 
			
		||||
 | 
			
		||||
    my $exp_params = expand_hash( scalar params );
 | 
			
		||||
 | 
			
		||||
    my $recordsTotal = $rs->count;
 | 
			
		||||
 | 
			
		||||
    my @data = $rs->get_datatables_data($exp_params)->hri->all;
 | 
			
		||||
 | 
			
		||||
    my $recordsFiltered = $rs->get_datatables_filtered_count($exp_params);
 | 
			
		||||
 | 
			
		||||
    content_type 'application/json';
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user