Loading
Add sorting to the Kubernetes agents table
Makes the Name, Connection status, Last contact, Agent ID and Project columns sortable on the Kubernetes agents table. The default order stays Last contact, descending, so the table looks unchanged on first load.
Version has no sort. An agent's pods can report different versions, so there is no single value to order by.
Agents that have never connected sort last in both directions.
Sorting is client-side, matching the existing client-side pagination, and runs before the page slice so it orders the whole loaded list. The overview card caps the table at six agents with no pagination, so it gets no sort headers.
Screenshots or screen recordings
| Default sort | Selected sort |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Visit a project's Operate > Kubernetes clusters page with at least two registered agents.
- Confirm the list is ordered by Last contact, most recent first, and that the Last contact header shows a descending indicator.
- Click the Name, Connection status, Agent ID and Last contact headers. Confirm the order changes, the indicator moves, and a second click on the same column reverses it.
- With more than 20 agents, sort by Name and page forward. Confirm page two continues the alphabetical order instead of re-sorting within the page.
- On a group's Kubernetes clusters page, confirm the Project column is also sortable.
References
Edited by Anna Vovchenko

