@rancher/shell 3.0.5 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/assets/images/pl/dark/rancher-logo.svg +131 -44
  2. package/assets/images/pl/rancher-logo.svg +120 -44
  3. package/assets/styles/base/_basic.scss +2 -2
  4. package/assets/styles/base/_color-classic.scss +51 -0
  5. package/assets/styles/base/_color.scss +3 -3
  6. package/assets/styles/base/_mixins.scss +1 -1
  7. package/assets/styles/base/_variables-classic.scss +47 -0
  8. package/assets/styles/global/_button.scss +49 -17
  9. package/assets/styles/global/_form.scss +1 -1
  10. package/assets/styles/themes/_dark.scss +4 -0
  11. package/assets/styles/themes/_light.scss +3 -69
  12. package/assets/styles/themes/_modern.scss +194 -50
  13. package/assets/styles/vendor/vue-select.scss +1 -2
  14. package/assets/translations/en-us.yaml +33 -21
  15. package/components/ClusterIconMenu.vue +1 -1
  16. package/components/ClusterProviderIcon.vue +1 -1
  17. package/components/CodeMirror.vue +1 -1
  18. package/components/FilterPanel.vue +8 -1
  19. package/components/IconOrSvg.vue +40 -29
  20. package/components/PaginatedResourceTable.vue +7 -2
  21. package/components/PromptRemove.vue +5 -0
  22. package/components/ResourceDetail/index.vue +1 -0
  23. package/components/ResourceTable.vue +30 -20
  24. package/components/SortableTable/sorting.js +3 -1
  25. package/components/Tabbed/index.vue +5 -5
  26. package/components/form/ResourceTabs/index.vue +37 -18
  27. package/components/form/SecretSelector.vue +6 -2
  28. package/components/nav/Group.vue +29 -9
  29. package/components/nav/Header.vue +6 -8
  30. package/components/nav/NamespaceFilter.vue +1 -1
  31. package/components/nav/TopLevelMenu.helper.ts +47 -20
  32. package/components/nav/TopLevelMenu.vue +44 -14
  33. package/components/nav/Type.vue +0 -5
  34. package/components/nav/__tests__/TopLevelMenu.test.ts +2 -0
  35. package/config/pagination-table-headers.js +10 -2
  36. package/config/product/explorer.js +9 -8
  37. package/config/table-headers.js +9 -0
  38. package/config/uiplugins.js +1 -1
  39. package/core/plugin.ts +33 -9
  40. package/core/types.ts +37 -6
  41. package/detail/provisioning.cattle.io.cluster.vue +1 -0
  42. package/dialog/InstallExtensionDialog.vue +71 -45
  43. package/dialog/UninstallExtensionDialog.vue +2 -1
  44. package/dialog/__tests__/InstallExtensionDialog.test.ts +111 -0
  45. package/edit/auth/oidc.vue +86 -16
  46. package/list/catalog.cattle.io.clusterrepo.vue +2 -2
  47. package/mixins/__tests__/chart.test.ts +1 -1
  48. package/mixins/chart.js +1 -1
  49. package/models/event.js +7 -0
  50. package/models/provisioning.cattle.io.cluster.js +9 -0
  51. package/package.json +2 -2
  52. package/pages/c/_cluster/apps/charts/AppChartCardFooter.vue +6 -0
  53. package/pages/c/_cluster/apps/charts/StatusLabel.vue +4 -3
  54. package/pages/c/_cluster/apps/charts/index.vue +12 -11
  55. package/pages/c/_cluster/explorer/EventsTable.vue +3 -6
  56. package/pages/c/_cluster/settings/performance.vue +1 -1
  57. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +159 -62
  58. package/pages/c/_cluster/uiplugins/__tests__/PluginInfoPanel.test.ts +102 -0
  59. package/pages/c/_cluster/uiplugins/__tests__/{index.spec.ts → index.test.ts} +121 -55
  60. package/pages/c/_cluster/uiplugins/index.vue +110 -94
  61. package/plugins/__tests__/subscribe.events.test.ts +194 -0
  62. package/plugins/dashboard-store/actions.js +3 -0
  63. package/plugins/dashboard-store/getters.js +1 -1
  64. package/plugins/dashboard-store/resource-class.js +15 -4
  65. package/plugins/steve/__tests__/subscribe.spec.ts +27 -24
  66. package/plugins/steve/index.js +18 -10
  67. package/plugins/steve/mutations.js +2 -2
  68. package/plugins/steve/resourceWatcher.js +2 -2
  69. package/plugins/steve/steve-pagination-utils.ts +26 -31
  70. package/plugins/steve/subscribe.js +113 -85
  71. package/plugins/subscribe-events.ts +211 -0
  72. package/rancher-components/BadgeState/BadgeState.vue +8 -6
  73. package/rancher-components/Banner/Banner.vue +2 -1
  74. package/rancher-components/Form/Checkbox/Checkbox.vue +3 -3
  75. package/rancher-components/Form/Radio/RadioButton.vue +3 -3
  76. package/scripts/test-plugins-build.sh +4 -5
  77. package/scripts/typegen.sh +2 -0
  78. package/store/auth.js +2 -2
  79. package/store/index.js +12 -22
  80. package/types/extension-manager.ts +8 -1
  81. package/types/resources/settings.d.ts +24 -17
  82. package/types/shell/index.d.ts +534 -336
  83. package/types/store/subscribe-events.types.ts +70 -0
  84. package/types/store/subscribe.types.ts +6 -22
  85. package/types/store/vuex.d.ts +2 -1
  86. package/types/vue-shim.d.ts +2 -5
  87. package/utils/pagination-utils.ts +98 -30
  88. package/utils/pagination-wrapper.ts +6 -8
  89. package/utils/sort.js +5 -0
  90. package/utils/unit-tests/pagination-utils.spec.ts +283 -0
  91. package/utils/validators/formRules/__tests__/index.test.ts +7 -0
  92. package/utils/validators/formRules/index.ts +2 -2
@@ -1,4 +1,7 @@
1
1
  import { NORMAN_NAME } from '@shell/config/labels-annotations';
2
+ import { getVersionData } from '@shell/config/version';
3
+ import { parseRancherVersion } from '@shell/config/uiplugins';
4
+ import semver from 'semver';
2
5
  import {
3
6
  _CLONE,
4
7
  _CONFIG,
@@ -59,7 +62,7 @@ const DEFAULT_COLOR = 'warning';
59
62
  const DEFAULT_ICON = 'x';
60
63
 
61
64
  const DEFAULT_WAIT_INTERVAL = 1000;
62
- const DEFAULT_WAIT_TMIMEOUT = 30000;
65
+ const DEFAULT_WAIT_TIMEOUT = 30000;
63
66
 
64
67
  export const STATES_ENUM = {
65
68
  IN_USE: 'in-use',
@@ -803,7 +806,7 @@ export default class Resource {
803
806
  // ------------------------------------------------------------------
804
807
 
805
808
  waitForTestFn(fn, msg, timeoutMs, intervalMs) {
806
- return waitFor(() => fn.apply(this), msg, timeoutMs || DEFAULT_WAIT_TMIMEOUT, intervalMs || DEFAULT_WAIT_INTERVAL, true);
809
+ return waitFor(() => fn.apply(this), msg, timeoutMs || DEFAULT_WAIT_TIMEOUT, intervalMs || DEFAULT_WAIT_INTERVAL, true);
807
810
  }
808
811
 
809
812
  waitForState(state, timeout, interval) {
@@ -852,7 +855,7 @@ export default class Resource {
852
855
  return (entry.status || '').toLowerCase() === `${ withStatus }`.toLowerCase();
853
856
  }
854
857
 
855
- waitForCondition(name, withStatus = 'True', timeoutMs = DEFAULT_WAIT_TMIMEOUT, intervalMs = DEFAULT_WAIT_INTERVAL) {
858
+ waitForCondition(name, withStatus = 'True', timeoutMs = DEFAULT_WAIT_TIMEOUT, intervalMs = DEFAULT_WAIT_INTERVAL) {
856
859
  return this.waitForTestFn(() => {
857
860
  return this.isCondition(name, withStatus);
858
861
  }, `condition ${ name }=${ withStatus }`, timeoutMs, intervalMs);
@@ -929,12 +932,20 @@ export default class Resource {
929
932
  const currentRoute = this.currentRouter().currentRoute.value;
930
933
  const extensionMenuActions = getApplicableExtensionEnhancements(this.$rootState, ExtensionPoint.ACTION, ActionLocation.TABLE, currentRoute, this);
931
934
 
935
+ const currRancherVersionData = getVersionData();
936
+ const parsedRancherVersion = parseRancherVersion(currRancherVersionData.Version);
937
+
938
+ // "showConfiguration" table action is only compatible with Rancher 2.13 and onwards
939
+ // defence against extension issue https://github.com/rancher/dashboard/issues/15564
940
+ // where mostly likely extension CRD model is extending from resource-class
941
+ const isResourceDetailDrawerCompatibleWithRancherSystem = semver.satisfies(parsedRancherVersion, '>= 2.13.0');
942
+
932
943
  const all = [
933
944
  {
934
945
  action: 'showConfiguration',
935
946
  label: this.t('action.showConfiguration'),
936
947
  icon: 'icon icon-document',
937
- enabled: this.disableResourceDetailDrawer !== true && (this.canCustomEdit || this.canYaml), // If the resource can't show an edit or a yaml we don't want to show the configuration drawer
948
+ enabled: isResourceDetailDrawerCompatibleWithRancherSystem && this.disableResourceDetailDrawer !== true && (this.canCustomEdit || this.canYaml), // If the resource can't show an edit or a yaml we don't want to show the configuration drawer
938
949
  },
939
950
  { divider: true },
940
951
  {
@@ -1,17 +1,19 @@
1
1
  import { actions, getters, mutations } from '../subscribe';
2
2
  import { REVISION_TOO_OLD } from '../../../utils/socket';
3
- import { STEVE_WATCH_EVENT } from '../../../types/store/subscribe.types';
3
+ import { STEVE_WATCH_MODE } from '../../../types/store/subscribe.types';
4
4
  import backOff from '../../../utils/back-off';
5
+ import { SteveWatchEventListenerManager } from '../../subscribe-events';
5
6
 
6
7
  describe('steve: subscribe', () => {
7
8
  describe('actions', () => {
8
9
  describe('watch', () => {
9
- const state = {};
10
+ const state = { listenerManager: new SteveWatchEventListenerManager() };
10
11
  const getters = {
11
- normalizeType: (type: string) => type,
12
- schemaFor: () => null,
13
- inError: () => false,
14
- watchStarted: () => false,
12
+ normalizeType: (type: string) => type,
13
+ schemaFor: () => null,
14
+ inError: () => false,
15
+ watchStarted: () => false,
16
+ listenerManager: state.listenerManager
15
17
  };
16
18
  const rootGetters = {
17
19
  'type-map/isSpoofed': () => false,
@@ -211,15 +213,11 @@ describe('steve: subscribe', () => {
211
213
  }, {
212
214
  ...obj,
213
215
  revision,
214
- mode: STEVE_WATCH_EVENT.CHANGES,
216
+ mode: STEVE_WATCH_MODE.RESOURCE_CHANGES,
215
217
  force: true,
216
218
  });
217
219
 
218
- expect(dispatch).toHaveBeenNthCalledWith(1, 'unwatchIncompatible', {
219
- id: undefined, mode: STEVE_WATCH_EVENT.CHANGES, namespace: undefined, selector: undefined, type: obj.type
220
- });
221
-
222
- expect(dispatch).toHaveBeenNthCalledWith(2, 'send', {
220
+ expect(dispatch).toHaveBeenNthCalledWith(1, 'send', {
223
221
  debounceMs: 4000,
224
222
  mode: 'resource.changes',
225
223
  resourceType: obj.type,
@@ -231,7 +229,7 @@ describe('steve: subscribe', () => {
231
229
  state, dispatch, getters, commit
232
230
  }, { ...msg });
233
231
 
234
- expect(dispatch).toHaveBeenCalledTimes(2);
232
+ expect(dispatch).toHaveBeenCalledTimes(1);
235
233
  dispatch.mockClear();
236
234
  };
237
235
 
@@ -252,7 +250,7 @@ describe('steve: subscribe', () => {
252
250
  });
253
251
  expect(state.inError).toStrictEqual(
254
252
  {
255
- 'type=abc,namespace=,id=,selector=': {
253
+ 'type=abc,namespace=,id=,selector=,mode=resource.changes': {
256
254
  obj: {
257
255
  type: msg.resourceType,
258
256
  mode: msg.mode,
@@ -268,7 +266,7 @@ describe('steve: subscribe', () => {
268
266
  }, { ...msg });
269
267
  // stop tries to watch again, however we're in error so will be ignored
270
268
  expect(dispatch).toHaveBeenNthCalledWith(1, 'watch', {
271
- id: undefined, mode: STEVE_WATCH_EVENT.CHANGES, namespace: undefined, selector: undefined, type: obj.type
269
+ id: undefined, mode: STEVE_WATCH_MODE.RESOURCE_CHANGES, namespace: undefined, selector: undefined, standardWatch: true, type: obj.type
272
270
  });
273
271
 
274
272
  dispatch.mockClear();
@@ -349,19 +347,24 @@ describe('steve: subscribe', () => {
349
347
  const obj = { type: 'abc' };
350
348
  const msg = {
351
349
  resourceType: obj.type,
352
- mode: STEVE_WATCH_EVENT.CHANGES,
350
+ mode: STEVE_WATCH_MODE.RESOURCE_CHANGES,
353
351
  };
354
352
 
355
353
  const initStore = () => {
356
- const state = { started: [], inError: {} };
354
+ const state = {
355
+ started: [],
356
+ inError: {},
357
+ listenerManager: new SteveWatchEventListenerManager()
358
+ };
357
359
  const _getters = {
358
- normalizeType: (type: string) => type,
359
- schemaFor: () => ({}),
360
- storeName: 'test',
361
- inError: (...args) => getters.inError(state)(...args),
362
- watchStarted: (...args) => getters.watchStarted(state)(...args),
363
- backOffId: (...args) => getters.backOffId()(...args),
364
- canBackoff: () => true,
360
+ normalizeType: (type: string) => type,
361
+ schemaFor: () => ({}),
362
+ storeName: 'test',
363
+ inError: (...args) => getters.inError(state)(...args),
364
+ watchStarted: (...args) => getters.watchStarted(state)(...args),
365
+ backOffId: (...args) => getters.backOffId()(...args),
366
+ canBackoff: () => true,
367
+ listenerManager: state.listenerManager
365
368
  };
366
369
  const commit = (type, ...args) => mutations[type](state, ...args);
367
370
 
@@ -9,6 +9,8 @@ import {
9
9
  import getters, { STEVE_MODEL_TYPES } from './getters';
10
10
  import mutations from './mutations';
11
11
  import actions from './actions';
12
+ import { SteveWatchEventListenerManager } from '@shell/plugins/subscribe-events';
13
+ import { markRaw } from 'vue';
12
14
 
13
15
  export function SteveFactory(namespace, baseUrl) {
14
16
  return {
@@ -17,16 +19,22 @@ export function SteveFactory(namespace, baseUrl) {
17
19
  state() {
18
20
  return {
19
21
  ...coreStoreState(namespace, baseUrl),
20
- socket: null,
21
- queue: [], // For change event coalescing
22
- wantSocket: false,
23
- debugSocket: false,
24
- allowStreaming: true,
25
- pendingFrames: [],
26
- deferredRequests: {},
27
- started: [],
28
- inError: {},
29
- podsByNamespace: {}, // Cache of pods by namespace
22
+ socket: null,
23
+ queue: [], // For change event coalescing
24
+ wantSocket: false,
25
+ debugSocket: false,
26
+ allowStreaming: true,
27
+ pendingFrames: [],
28
+ deferredRequests: {},
29
+ started: [],
30
+ inError: {},
31
+ /**
32
+ * Socket listener manager for this store
33
+ *
34
+ * Instance of @SteveWatchEventListenerManager . See it's description for more info
35
+ */
36
+ socketListenerManager: markRaw(new SteveWatchEventListenerManager()),
37
+ podsByNamespace: {}, // Cache of pods by namespace
30
38
  };
31
39
  },
32
40
 
@@ -164,10 +164,10 @@ export default {
164
164
  },
165
165
 
166
166
  reset(state) {
167
- // Reset generic store things.... then steve specific things
168
-
167
+ // 1. Reset generic store things
169
168
  resetStore(state, this.commit);
170
169
 
170
+ // 2. Reset steve specific store things
171
171
  this.commit(`${ state.config.namespace }/resetSubscriptions`);
172
172
 
173
173
  // Clear the podsByNamespace cache
@@ -40,10 +40,10 @@ export const WATCH_STATUSES = {
40
40
  * Create a unique key for a specific resource watch's params
41
41
  */
42
42
  export const keyForSubscribe = ({
43
- resourceType, type, namespace, id, selector
43
+ resourceType, type, namespace, id, selector, mode
44
44
  } = {}) => {
45
45
  const keyMap = {
46
- type: resourceType || type, namespace, id, selector
46
+ type: resourceType || type, namespace, id, selector, mode
47
47
  };
48
48
 
49
49
  return Object.entries(keyMap)
@@ -15,13 +15,12 @@ import {
15
15
  HPA,
16
16
  SECRET
17
17
  } from '@shell/config/types';
18
- import {
19
- CAPI as CAPI_LAB_AND_ANO, CATTLE_PUBLIC_ENDPOINTS, STORAGE, UI_PROJECT_SECRET, UI_PROJECT_SECRET_COPY
20
- } from '@shell/config/labels-annotations';
18
+ import { CAPI as CAPI_LAB_AND_ANO, CATTLE_PUBLIC_ENDPOINTS, STORAGE, UI_PROJECT_SECRET_COPY } from '@shell/config/labels-annotations';
21
19
  import { Schema } from '@shell/plugins/steve/schema';
22
- import { PaginationSettingsStore } from '@shell/types/resources/settings';
20
+ import { PaginationSettingsStores } from '@shell/types/resources/settings';
23
21
  import paginationUtils from '@shell/utils/pagination-utils';
24
22
  import { KubeLabelSelector, KubeLabelSelectorExpression } from '@shell/types/kube/kube-api';
23
+ import { parseField } from '@shell/utils/sort';
25
24
 
26
25
  /**
27
26
  * This is a workaround for a ts build issue found in check-plugins-build.
@@ -158,6 +157,7 @@ class StevePaginationUtils extends NamespaceProjectFilters {
158
157
  { field: 'id' },
159
158
  { field: 'metadata.state.name' },
160
159
  { field: 'metadata.creationTimestamp' },
160
+ { field: 'metadata.labels', startsWith: true },
161
161
  ],
162
162
  [NODE]: [
163
163
  { field: 'status.nodeInfo.kubeletVersion' },
@@ -180,18 +180,12 @@ class StevePaginationUtils extends NamespaceProjectFilters {
180
180
  { field: 'spec.internal' },
181
181
  { field: 'spec.displayName' },
182
182
  { field: `status.provider` },
183
- { field: `metadata.labels["${ CAPI_LAB_AND_ANO.PROVIDER }]` },
184
183
  { field: `status.connected` },
185
184
  ],
186
- [CONFIG_MAP]: [
187
- { field: 'metadata.labels[harvesterhci.io/cloud-init-template]' }
188
- ],
189
185
  [SECRET]: [
190
- { field: `metadata.labels[${ UI_PROJECT_SECRET }]` },
191
186
  { field: `metadata.annotations[${ UI_PROJECT_SECRET_COPY }]` },
192
187
  ],
193
188
  [NAMESPACE]: [
194
- { field: 'metadata.labels[field.cattle.io/projectId]' }
195
189
  ],
196
190
  [CAPI.MACHINE]: [
197
191
  { field: 'spec.clusterName' }
@@ -214,7 +208,6 @@ class StevePaginationUtils extends NamespaceProjectFilters {
214
208
  { field: 'status.releaseName' },
215
209
  ],
216
210
  [CAPI.RANCHER_CLUSTER]: [
217
- { field: `metadata.labels[${ CAPI_LAB_AND_ANO.PROVIDER }]` },
218
211
  { field: `status.provider` },
219
212
  { field: 'status.clusterName' },
220
213
  { field: `metadata.annotations[${ CAPI_LAB_AND_ANO.HUMAN_NAME }]` }
@@ -224,14 +217,14 @@ class StevePaginationUtils extends NamespaceProjectFilters {
224
217
  { field: 'spec.clusterIP' },
225
218
  ],
226
219
  [INGRESS]: [
227
- { field: 'spec.rules.host' }, // Pending API Support - BUG - https://github.com/rancher/rancher/issues/50526
220
+ { field: 'spec.rules.host' },
228
221
  { field: 'spec.ingressClassName' },
229
222
  ],
230
223
  [HPA]: [
231
- { field: 'spec.scaleTargetRef.name' }, // Pending API Support - BUG - https://github.com/rancher/rancher/issues/50527
232
- { field: 'spec.minReplicas' }, // Pending API Support - BUG - https://github.com/rancher/rancher/issues/50527
233
- { field: 'spec.maxReplicas' }, // Pending API Support - BUG - https://github.com/rancher/rancher/issues/50527
234
- { field: 'spec.currentReplicas' }, // Pending API Support - BUG - https://github.com/rancher/rancher/issues/50527
224
+ { field: 'spec.scaleTargetRef.name' },
225
+ { field: 'spec.minReplicas' },
226
+ { field: 'spec.maxReplicas' },
227
+ { field: 'spec.currentReplicas' },
235
228
  ],
236
229
  [PVC]: [
237
230
  { field: 'spec.volumeName' },
@@ -249,29 +242,29 @@ class StevePaginationUtils extends NamespaceProjectFilters {
249
242
  ],
250
243
  [WORKLOAD_TYPES.CRON_JOB]: [
251
244
  { field: `metadata.annotations[${ CATTLE_PUBLIC_ENDPOINTS }]` },
252
- { field: 'spec.template.spec.containers.image' }, // Pending API Support - BUG - https://github.com/rancher/rancher/issues/50526
245
+ { field: 'spec.template.spec.containers.image' },
253
246
  ],
254
247
  [WORKLOAD_TYPES.DAEMON_SET]: [
255
248
  { field: `metadata.annotations[${ CATTLE_PUBLIC_ENDPOINTS }]` },
256
- { field: 'spec.template.spec.containers.image' }, // Pending API Support - BUG - https://github.com/rancher/rancher/issues/50526
249
+ { field: 'spec.template.spec.containers.image' },
257
250
  ],
258
251
  [WORKLOAD_TYPES.DEPLOYMENT]: [
259
252
  { field: `metadata.annotations[${ CATTLE_PUBLIC_ENDPOINTS }]` },
260
- { field: 'spec.template.spec.containers.image' }, // Pending API Support - BUG - https://github.com/rancher/rancher/issues/50526
253
+ { field: 'spec.template.spec.containers.image' },
261
254
  ],
262
255
  [WORKLOAD_TYPES.JOB]: [
263
256
  { field: `metadata.annotations[${ CATTLE_PUBLIC_ENDPOINTS }]` },
264
- { field: 'spec.template.spec.containers.image' }, // Pending API Support - BUG - https://github.com/rancher/rancher/issues/50526
257
+ { field: 'spec.template.spec.containers.image' },
265
258
  ],
266
259
  [WORKLOAD_TYPES.STATEFUL_SET]: [
267
260
  { field: `metadata.annotations[${ CATTLE_PUBLIC_ENDPOINTS }]` },
268
- { field: 'spec.template.spec.containers.image' }, // Pending API Support - BUG - https://github.com/rancher/rancher/issues/50526
261
+ { field: 'spec.template.spec.containers.image' },
269
262
  ],
270
263
  [WORKLOAD_TYPES.REPLICA_SET]: [
271
- { field: 'spec.template.spec.containers.image' }, // Pending API Support - BUG - https://github.com/rancher/rancher/issues/50526
264
+ { field: 'spec.template.spec.containers.image' },
272
265
  ],
273
266
  [WORKLOAD_TYPES.REPLICATION_CONTROLLER]: [
274
- { field: 'spec.template.spec.containers.image' }, // Pending API Support - BUG - https://github.com/rancher/rancher/issues/50526
267
+ { field: 'spec.template.spec.containers.image' },
275
268
  ],
276
269
  }
277
270
 
@@ -409,9 +402,13 @@ class StevePaginationUtils extends NamespaceProjectFilters {
409
402
 
410
403
  const joined = opt.pagination.sort
411
404
  .map((s) => {
412
- this.validateField(validateFields, schema, s.field);
405
+ // Use the same mechanism as local sorting to flip logic for asc/des
406
+ const { field, reverse } = parseField(s.field);
407
+ const asc = reverse ? !s.asc : s.asc;
408
+
409
+ this.validateField(validateFields, schema, field);
413
410
 
414
- return `${ s.asc ? '' : '-' }${ this.convertArrayPath(s.field) }`;
411
+ return `${ asc ? '' : '-' }${ this.convertArrayPath(field) }`;
415
412
  })
416
413
  .join(',');
417
414
 
@@ -623,7 +620,6 @@ class StevePaginationUtils extends NamespaceProjectFilters {
623
620
  res.push(`filter=!${ labelKey }`);
624
621
  break;
625
622
  case 'Gt':
626
- // Currently broken - see https://github.com/rancher/rancher/issues/50057
627
623
  // Only applicable to node affinity (atm) - https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#operators
628
624
 
629
625
  if (typeof exp.values !== 'string') {
@@ -636,7 +632,6 @@ class StevePaginationUtils extends NamespaceProjectFilters {
636
632
  res.push(`filter=${ labelKey } > (${ exp.values })`);
637
633
  break;
638
634
  case 'Lt':
639
- // Currently broken - see https://github.com/rancher/rancher/issues/50057
640
635
  // Only applicable to node affinity (atm) - https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#operators
641
636
  if (typeof exp.values !== 'string') {
642
637
  console.error(`Skipping labelSelector to API filter param conversion for ${ exp.key }(Lt) as no value was supplied`); // eslint-disable-line no-console
@@ -657,7 +652,7 @@ class StevePaginationUtils extends NamespaceProjectFilters {
657
652
  }
658
653
  }
659
654
 
660
- export const PAGINATION_SETTINGS_STORE_DEFAULTS: PaginationSettingsStore = {
655
+ export const PAGINATION_SETTINGS_STORE_DEFAULTS: PaginationSettingsStores = {
661
656
  cluster: {
662
657
  resources: {
663
658
  enableAll: false,
@@ -670,7 +665,7 @@ export const PAGINATION_SETTINGS_STORE_DEFAULTS: PaginationSettingsStore = {
670
665
  CATALOG.APP, CATALOG.OPERATION,
671
666
  HPA, INGRESS, SERVICE,
672
667
  PV, CONFIG_MAP, STORAGE_CLASS, PVC, SECRET,
673
- WORKLOAD_TYPES.REPLICA_SET, WORKLOAD_TYPES.REPLICATION_CONTROLLER
668
+ WORKLOAD_TYPES.REPLICA_SET, WORKLOAD_TYPES.REPLICATION_CONTROLLER,
674
669
  ],
675
670
  generic: true,
676
671
  }
@@ -681,8 +676,8 @@ export const PAGINATION_SETTINGS_STORE_DEFAULTS: PaginationSettingsStore = {
681
676
  enableAll: false,
682
677
  enableSome: {
683
678
  enabled: [
684
- // { resource: CAPI.RANCHER_CLUSTER, context: ['home', 'side-bar'] }, // Disabled due to https://github.com/rancher/dashboard/issues/14493
685
- // { resource: MANAGEMENT.CLUSTER, context: ['side-bar'] }, // Disabled due to https://github.com/rancher/dashboard/issues/14493
679
+ // { resource: CAPI.RANCHER_CLUSTER, context: ['home', 'side-bar'] },
680
+ // { resource: MANAGEMENT.CLUSTER, context: ['side-bar'] },
686
681
  { resource: CATALOG.APP, context: ['branding'] },
687
682
  SECRET
688
683
  ],