Machine listing pagination displays incorrect total number of pages
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MAAS | Status tracked in 3.5 | |||||
3.4 |
Fix Released
|
High
|
Peter Makowski | |||
3.5 |
Fix Committed
|
High
|
Peter Makowski | |||
maas-ui |
Fix Committed
|
High
|
Peter Makowski | |||
3.3 |
Fix Committed
|
High
|
Peter Makowski | |||
3.4 |
Fix Committed
|
High
|
Peter Makowski |
Bug Description
### Description
Machine listing pagination displays incorrect total number of pages.
Machine list pagination is calculating the total number of pages from count and page_size. This does not take into account collapsed groups and may result in an incorrect number of total pages being displayed.
MAAS UI should use instead the total_pages property returned by the API machine.list.
### Steps to reproduce:
- Go to machine listing on a MAAS with multiple machines
- If needed, you can set the page size manually to a low value in developer tools console by typing `localStorage.
- collapse a group of machines and take note of the total number of pages
- expand a group of machines
#### Expected:
the total number of machines should update
#### Actual:
the total number of machines does not update and is incorrect
Changed in maas-ui: | |
importance: | Undecided → High |
milestone: | none → 3.4.x |
milestone: | 3.4.x → none |
Changed in maas-ui: | |
status: | New → Triaged |
assignee: | nobody → Peter Makowski (petermakowski) |
Changed in maas-ui: | |
milestone: | none → 3.5.0 |
no longer affects: | maas-ui/3.5 |
Changed in maas-ui: | |
status: | Triaged → In Progress |
description: | updated |
Changed in maas-ui: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 3.5.0 |
Changed in maas: | |
status: | Triaged → Fix Committed |
This affects both 3.3 and 3.4.
Fix for main in review: https:/ /github. com/canonical/ maas-ui/ pull/5029