Skip to content

Commit 42457f6

Browse files
committed
Fix vai sort order, and sort all State columns by pseudo type and then name
1 parent 1dfd288 commit 42457f6

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

shell/config/pagination-table-headers.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ export const STEVE_ID_COL = {
3333
};
3434

3535
export const STEVE_STATE_COL = {
36-
...STATE,
3736
// Note, we're show the 'state' as per model, not the 'metadata.state.name' that's available in the model to remotely sort/filter
38-
// 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)
39-
// This means we'll show something different to what we sort and filter on.
40-
sort: ['metadata.state.name'],
37+
...STATE,
38+
// non vai sort works on colour --> name. the best we can do here is error --> transitioning --> name
39+
sort: ['metadata.state.error:desc', 'metadata.state.transitioning:desc', 'metadata.state.name'],
4140
search: 'metadata.state.name',
4241
};
4342

shell/plugins/steve/steve-pagination-utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ class StevePaginationUtils extends NamespaceProjectFilters {
229229
{ field: 'metadata.namespace' },
230230
{ field: 'id' },
231231
{ field: 'metadata.state.name' },
232+
{ field: 'metadata.state.error' },
233+
{ field: 'metadata.state.transitioning' },
232234
{ field: 'metadata.creationTimestamp' },
233235
{ field: 'metadata.labels', startsWith: true },
234236
],

0 commit comments

Comments
 (0)