From 42457f6d553c5c04f237eb8c54d64d3cac3d6f55 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Tue, 26 May 2026 13:58:12 +0100 Subject: [PATCH] Fix vai sort order, and sort all State columns by pseudo type and then name --- shell/config/pagination-table-headers.js | 7 +++---- shell/plugins/steve/steve-pagination-utils.ts | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/shell/config/pagination-table-headers.js b/shell/config/pagination-table-headers.js index 681d8ea770..c2bbf9d5a9 100644 --- a/shell/config/pagination-table-headers.js +++ b/shell/config/pagination-table-headers.js @@ -33,11 +33,10 @@ export const STEVE_ID_COL = { }; export const STEVE_STATE_COL = { - ...STATE, // Note, we're show the 'state' as per model, not the 'metadata.state.name' that's available in the model to remotely sort/filter - // Need to investigate whether we should 'dumb down' the state we show to the native one (tracked via https://github.com/rancher/dashboard/issues/8527) - // This means we'll show something different to what we sort and filter on. - sort: ['metadata.state.name'], + ...STATE, + // non vai sort works on colour --> name. the best we can do here is error --> transitioning --> name + sort: ['metadata.state.error:desc', 'metadata.state.transitioning:desc', 'metadata.state.name'], search: 'metadata.state.name', }; diff --git a/shell/plugins/steve/steve-pagination-utils.ts b/shell/plugins/steve/steve-pagination-utils.ts index dcd764f44b..b5d471b7b2 100644 --- a/shell/plugins/steve/steve-pagination-utils.ts +++ b/shell/plugins/steve/steve-pagination-utils.ts @@ -229,6 +229,8 @@ class StevePaginationUtils extends NamespaceProjectFilters { { field: 'metadata.namespace' }, { field: 'id' }, { field: 'metadata.state.name' }, + { field: 'metadata.state.error' }, + { field: 'metadata.state.transitioning' }, { field: 'metadata.creationTimestamp' }, { field: 'metadata.labels', startsWith: true }, ],