Skip to content
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

Adjust API calls to retrieve data based on page size in User groups and Netgroups tabs #358

Open
carma12 opened this issue Apr 30, 2024 · 0 comments

Comments

@carma12
Copy link
Collaborator

carma12 commented Apr 30, 2024

The data in User groups and Netgroups tabs is currently being retrieved as following:

const netgroupsNotMemberOfQuery = useGettingNetgroupsQuery({
    no_user: uid,
    apiVersion: API_VERSION_BACKUP,
    startIdx: firstUserIdx,
    stopIdx: 100, // Limited to max. 100 netgroups to show in the dual selector
  });

The reason behind this is that the retrieved data is meant to be displayed in two lists depending on the membership direction: direct or indirect. Prior to this, the limitation was done based on pagination size, but the number of retrieved elements were both direct and indirect, resulting in shorter lists and inaccurate results.

Retrieving data based on page size has the advantage of limiting the search based on the current context. E.g., it is more efficient to retrieve just 20 elements to display in a table rather than 200 entries and just take only 20 of them.

That is why a new solution to perform searches based on the page size while keeping the coherence direct | indirect is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant