Skip to content

Fix statistics and search only seeing the current page - #950

Open
mihaelabalutoiu wants to merge 7 commits into
cloudbase:mainfrom
mihaelabalutoiu:fix-pagination-dashboard
Open

mihaelabalutoiu wants to merge 7 commits into
cloudbase:mainfrom
mihaelabalutoiu:fix-pagination-dashboard

Conversation

@mihaelabalutoiu

Copy link
Copy Markdown
Member

Previously, transfers and deployments were fetched one UI page at a time, with the frontend page size sent to the backend as limit. Dashboard statistics, search and filtering therefore only saw the displayed page.

This PR implements the following:

  • Adds a helper that collects a full list through API pagination;
  • Collects whole transfer and deployment lists in the sources, in batches of fullListFetchBatchSize (100);
  • Preserves list filter, search and page across polls;
  • Makes the UI page size a display setting only, so changing the page or page size no longer hits the backend;
  • Polls less often now that a poll is several requests (listPollTimeout);
  • Removes the unused API pagination path from FilterList.
    Also includes an AGENTS.md file and adds/updates test cases.

The list APIs page by `marker` and report no total, so a short batch
is the only end-of-list signal.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
`getAllTransfers` and `getAllDeployments` walk the backend pagination in
batches sized independently of the UI's items per page, and reject
rather than return a partial list.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
The list reset to an unfiltered page one whenever a poll changed its
length - rare with one backend page stored, now almost every poll.
Only selections whose record is gone are dropped.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
The stores held a single backend page, so dashboard statistics, endpoint
usage counts and search saw only the page the user last paginated to. They
now hold the whole list and FilterList slices it, so changing the page or
page size makes no request.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
The dashboard, endpoints and minion pool pages move to `listPollTimeout`,
and a failed cycle no longer stops the loop.
The dashboard drops `showLoading` on the two shared stores, which blanked
a list already on screen.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Add a minimal AGENTS.md file in order to guide AI Tools.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
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

Successfully merging this pull request may close these issues.

1 participant