mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-12-04 19:15:30 +00:00
fix #1485: allow more than 100 rows default in dashboard
The dashboard.domains_custom route was hardcoded to either return all the domains, or at most 100, regardless of default_domain_table_size setting. Make this limit be dependent on default_domain_table_size instead. The API will now limit to 100 or default_domain_table_size, whichever one is higher. This is done to not break any seconday use-cases that might depend on the hardcoded setting.
This commit is contained in:
parent
53cfa4fdaa
commit
0d0339a316
@ -141,7 +141,7 @@ def domains_custom(tab_id):
|
||||
filtered_count = domains.count()
|
||||
|
||||
start = int(request.args.get("start", 0))
|
||||
length = min(int(request.args.get("length", 0)), 100)
|
||||
length = min(int(request.args.get("length", 0)), max(100, int(Setting().get('default_domain_table_size'))))
|
||||
|
||||
if length != -1:
|
||||
domains = domains[start:start + length]
|
||||
|
Loading…
Reference in New Issue
Block a user