From 0d0339a3166409d6f84c677e4453f80332a137b2 Mon Sep 17 00:00:00 2001 From: Jan Koppe Date: Wed, 29 Mar 2023 14:52:00 +0200 Subject: [PATCH] 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. --- powerdnsadmin/routes/dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerdnsadmin/routes/dashboard.py b/powerdnsadmin/routes/dashboard.py index 14a8ae3..e517207 100644 --- a/powerdnsadmin/routes/dashboard.py +++ b/powerdnsadmin/routes/dashboard.py @@ -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]