[#195] Fix CGI params parsing rows limit when "All" selected
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
* [#174] LDAP users should not be able to change password
|
* [#174] LDAP users should not be able to change password
|
||||||
* [#182] SSID and PoE showing in wrong Device Port columns
|
* [#182] SSID and PoE showing in wrong Device Port columns
|
||||||
* [#181] AP Client Count report was broken
|
* [#181] AP Client Count report was broken
|
||||||
|
* [#195] Fix CGI params parsing rows limit when "All" selected
|
||||||
|
|
||||||
2.030000 - 2015-01-08
|
2.030000 - 2015-01-08
|
||||||
|
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ sub _with_datatables_paging {
|
|||||||
$attrs->{'offset'} = $offset;
|
$attrs->{'offset'} = $offset;
|
||||||
|
|
||||||
$rs = $rs->search( {}, $attrs );
|
$rs = $rs->search( {}, $attrs );
|
||||||
$rs = $rs->limit($limit);
|
$rs = $rs->limit($limit) if ($limit and $limit > 0);
|
||||||
|
|
||||||
return $rs;
|
return $rs;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,11 +22,8 @@ get '/ajax/content/report/devicepoestatus/data' => require_role admin => sub {
|
|||||||
my $rs = schema('netdisco')->resultset('Virtual::DevicePoeStatus');
|
my $rs = schema('netdisco')->resultset('Virtual::DevicePoeStatus');
|
||||||
|
|
||||||
my $exp_params = expand_hash( scalar params );
|
my $exp_params = expand_hash( scalar params );
|
||||||
|
|
||||||
my $recordsTotal = $rs->count;
|
my $recordsTotal = $rs->count;
|
||||||
|
|
||||||
my @data = $rs->get_datatables_data($exp_params)->hri->all;
|
my @data = $rs->get_datatables_data($exp_params)->hri->all;
|
||||||
|
|
||||||
my $recordsFiltered = $rs->get_datatables_filtered_count($exp_params);
|
my $recordsFiltered = $rs->get_datatables_filtered_count($exp_params);
|
||||||
|
|
||||||
content_type 'application/json';
|
content_type 'application/json';
|
||||||
|
|||||||
Reference in New Issue
Block a user