Fix official API pagination defaults for site dropdown - #127
Conversation
|
Thanks for the PR. Looking at the changes the next bump in the road is going to occur when connecting to UniFi OS Servers with more 100 sites. Is that correct? Means we should also fetch all pages while increasing page size to 100 for optimal performance. Can you update the PR to implement this? |
|
I stand corrected, the site count is now 200. Correct? |
|
The 200 count is the "fetch all pages" function loop. As far as I can see that's not changed from the original (ajax/fetch_collections.php -> line 161). The 100 limit is implemented for the site dropdown, so it won't cap on the Unifi API original limit of 25. This would indeed mean that Unifi OS servers with more than that would hit the limit. (Although I doubt there will be many instances of Unifi OS Server that will run into that limit, that's hosted unifi provider territory xD) |
Hi!
This PR fixes the pagination behavior for the official UniFi API integration that I originally reported in #126.
Official API list endpoints were being called without an explicit limit, so the UniFi API default page size was applied. In practice, this meant:
Fix
This PR updates the official API flow so that:
Files changed