-
-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
default_domain_table_size does not work correctly for values higher than 100 #1485
Comments
Short investigation shows that PDA seems to be doing everything right - the |
I think I found the issue. https://github.com/PowerDNS-Admin/PowerDNS-Admin/blob/v0.4.0/powerdnsadmin/routes/dashboard.py#L144 PDA caps the search result at 100 rows. DataTables is correctly requesting 1000 rows, but only getting 100 back. When switching to "all", the Solution IMO would be to tie that hard cap to the default_domain_table_size setting, instead of hardcoding it to 100. |
@JanKoppe thank you for your work on this! I am preparing to do a rebuild on the zone editor features to clean up a lot of poorly written functionality as it relates to this very area. Stay tuned for big updates on that in a semi near future release! |
Would you be willing to accept a tiny patch for this with my suggested change, to make it more usable until the rework? :) |
@JanKoppe I welcome it! All I ask is that when you make the change, be mindful of the fact that many current users are dealing with very large data sets, so change accordingly! |
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.
PR opened. For large users this should have no negative effect. The default was 10, you could set it up to 100, now you can set it to whatever you wish. If you have a giant dataset, you can just leave it at 100, and that limit will still be respected. There should be no performance degradation from this, just more options. I've tested this locally with 1500 domains, and I did not observe any performance degradation. |
PDA version
0.4.0
Python version
3.10
Steps to Reproduce
Expected Behavior
A single dashboard page should show the configured amount of zones per page, as set in default_domain_table_size.
Observed Behavior
There will only ever be 100 zones shown per page. The pagination at the bottom seems to respect the new value in calculating the amount of available pages. Going to page two then only shows the zones 101-200, not the actual offset that should be used.
It seems that the value of default_domain_table_size is not being respected at all in the frontend.
The text was updated successfully, but these errors were encountered: