@rancher/shell 3.0.6 → 3.0.8-rc.1

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 (146) 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/images/vendor/githubapp.svg +13 -0
  4. package/assets/styles/base/_basic.scss +2 -2
  5. package/assets/styles/base/_color-classic.scss +51 -0
  6. package/assets/styles/base/_color.scss +3 -3
  7. package/assets/styles/base/_mixins.scss +1 -1
  8. package/assets/styles/base/_typography.scss +1 -1
  9. package/assets/styles/base/_variables-classic.scss +47 -0
  10. package/assets/styles/global/_button.scss +49 -17
  11. package/assets/styles/global/_form.scss +1 -1
  12. package/assets/styles/themes/_dark.scss +4 -0
  13. package/assets/styles/themes/_light.scss +3 -69
  14. package/assets/styles/themes/_modern.scss +194 -50
  15. package/assets/styles/vendor/vue-select.scss +1 -2
  16. package/assets/translations/en-us.yaml +124 -32
  17. package/assets/translations/zh-hans.yaml +0 -4
  18. package/components/ClusterIconMenu.vue +1 -1
  19. package/components/ClusterProviderIcon.vue +1 -1
  20. package/components/CodeMirror.vue +1 -1
  21. package/components/IconOrSvg.vue +40 -29
  22. package/components/Inactivity.vue +222 -106
  23. package/components/InstallHelmCharts.vue +2 -2
  24. package/components/ResourceDetail/index.vue +2 -1
  25. package/components/SortableTable/index.vue +17 -2
  26. package/components/SortableTable/sorting.js +3 -1
  27. package/components/Tabbed/index.vue +5 -5
  28. package/components/fleet/FleetConfigMapSelector.vue +117 -0
  29. package/components/fleet/FleetSecretSelector.vue +127 -0
  30. package/components/fleet/__tests__/FleetConfigMapSelector.test.ts +125 -0
  31. package/components/fleet/__tests__/FleetSecretSelector.test.ts +82 -0
  32. package/components/form/FileImageSelector.vue +13 -4
  33. package/components/form/FileSelector.vue +11 -2
  34. package/components/form/ResourceLabeledSelect.vue +1 -0
  35. package/components/form/ResourceTabs/index.vue +37 -18
  36. package/components/form/SecretSelector.vue +6 -2
  37. package/components/form/__tests__/ResourceLabeledSelect.test.ts +90 -0
  38. package/components/nav/Group.vue +29 -9
  39. package/components/nav/Header.vue +7 -8
  40. package/components/nav/NamespaceFilter.vue +1 -1
  41. package/components/nav/TopLevelMenu.helper.ts +47 -20
  42. package/components/nav/TopLevelMenu.vue +44 -14
  43. package/components/nav/Type.vue +0 -5
  44. package/components/nav/__tests__/TopLevelMenu.test.ts +2 -0
  45. package/config/pagination-table-headers.js +10 -2
  46. package/config/product/auth.js +1 -0
  47. package/config/product/explorer.js +4 -3
  48. package/config/query-params.js +1 -0
  49. package/config/settings.ts +8 -1
  50. package/config/table-headers.js +9 -0
  51. package/config/types.js +2 -0
  52. package/core/plugin.ts +18 -6
  53. package/core/types.ts +8 -0
  54. package/detail/provisioning.cattle.io.cluster.vue +1 -0
  55. package/dialog/AddonConfigConfirmationDialog.vue +45 -1
  56. package/dialog/InstallExtensionDialog.vue +71 -45
  57. package/dialog/UninstallExtensionDialog.vue +2 -1
  58. package/dialog/__tests__/InstallExtensionDialog.test.ts +111 -0
  59. package/edit/__tests__/fleet.cattle.io.helmop.test.ts +52 -11
  60. package/edit/auth/AuthProviderWarningBanners.vue +14 -1
  61. package/edit/auth/github-app-steps.vue +97 -0
  62. package/edit/auth/github-steps.vue +75 -0
  63. package/edit/auth/github.vue +94 -65
  64. package/edit/auth/oidc.vue +86 -16
  65. package/edit/fleet.cattle.io.helmop.vue +51 -2
  66. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +15 -5
  67. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +11 -9
  68. package/edit/provisioning.cattle.io.cluster/rke2.vue +56 -9
  69. package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +28 -2
  70. package/list/projectsecret.vue +1 -1
  71. package/machine-config/azure.vue +1 -1
  72. package/mixins/__tests__/chart.test.ts +1 -1
  73. package/mixins/chart.js +2 -2
  74. package/models/__tests__/chart.test.ts +17 -9
  75. package/models/__tests__/compliance.cattle.io.clusterscanprofile.spec.js +30 -0
  76. package/models/catalog.cattle.io.app.js +1 -1
  77. package/models/chart.js +3 -1
  78. package/models/compliance.cattle.io.clusterscanprofile.js +1 -1
  79. package/models/event.js +7 -0
  80. package/models/management.cattle.io.authconfig.js +1 -0
  81. package/models/provisioning.cattle.io.cluster.js +9 -0
  82. package/package.json +2 -2
  83. package/pages/auth/login.vue +5 -2
  84. package/pages/auth/verify.vue +1 -1
  85. package/pages/c/_cluster/apps/charts/AppChartCardSubHeader.vue +3 -2
  86. package/pages/c/_cluster/apps/charts/chart.vue +2 -2
  87. package/pages/c/_cluster/explorer/EventsTable.vue +92 -9
  88. package/pages/c/_cluster/explorer/tools/index.vue +3 -3
  89. package/pages/c/_cluster/settings/performance.vue +13 -26
  90. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +159 -62
  91. package/pages/c/_cluster/uiplugins/__tests__/PluginInfoPanel.test.ts +102 -0
  92. package/pages/c/_cluster/uiplugins/__tests__/{index.spec.ts → index.test.ts} +121 -55
  93. package/pages/c/_cluster/uiplugins/index.vue +110 -94
  94. package/pages/home.vue +313 -12
  95. package/plugins/__tests__/subscribe.events.test.ts +194 -0
  96. package/plugins/axios.js +2 -1
  97. package/plugins/dashboard-store/actions.js +4 -1
  98. package/plugins/dashboard-store/getters.js +1 -1
  99. package/plugins/dashboard-store/resource-class.js +20 -5
  100. package/plugins/steve/__tests__/subscribe.spec.ts +27 -24
  101. package/plugins/steve/index.js +18 -10
  102. package/plugins/steve/mutations.js +2 -2
  103. package/plugins/steve/resourceWatcher.js +2 -2
  104. package/plugins/steve/steve-pagination-utils.ts +12 -9
  105. package/plugins/steve/subscribe.js +113 -85
  106. package/plugins/subscribe-events.ts +211 -0
  107. package/rancher-components/BadgeState/BadgeState.vue +8 -6
  108. package/rancher-components/Banner/Banner.vue +2 -1
  109. package/rancher-components/Form/Checkbox/Checkbox.vue +3 -3
  110. package/rancher-components/Form/Radio/RadioButton.vue +3 -3
  111. package/scripts/extension/publish +1 -1
  112. package/store/auth.js +8 -3
  113. package/store/aws.js +8 -6
  114. package/store/features.js +1 -0
  115. package/store/index.js +21 -25
  116. package/store/prefs.js +6 -0
  117. package/types/extension-manager.ts +8 -1
  118. package/types/kube/kube-api.ts +2 -1
  119. package/types/rancher/index.d.ts +1 -0
  120. package/types/resources/settings.d.ts +52 -23
  121. package/types/shell/index.d.ts +412 -336
  122. package/types/store/subscribe-events.types.ts +70 -0
  123. package/types/store/subscribe.types.ts +6 -22
  124. package/utils/__tests__/cluster.test.ts +379 -1
  125. package/utils/cluster.js +157 -3
  126. package/utils/dynamic-content/__tests__/config.test.ts +187 -0
  127. package/utils/dynamic-content/__tests__/index.test.ts +390 -0
  128. package/utils/dynamic-content/__tests__/info.test.ts +263 -0
  129. package/utils/dynamic-content/__tests__/new-release.test.ts +216 -0
  130. package/utils/dynamic-content/__tests__/support-notice.test.ts +262 -0
  131. package/utils/dynamic-content/__tests__/util.test.ts +235 -0
  132. package/utils/dynamic-content/config.ts +55 -0
  133. package/utils/dynamic-content/index.ts +273 -0
  134. package/utils/dynamic-content/info.ts +219 -0
  135. package/utils/dynamic-content/new-release.ts +126 -0
  136. package/utils/dynamic-content/support-notice.ts +169 -0
  137. package/utils/dynamic-content/types.d.ts +101 -0
  138. package/utils/dynamic-content/util.ts +122 -0
  139. package/utils/inactivity.ts +104 -0
  140. package/utils/pagination-utils.ts +105 -31
  141. package/utils/pagination-wrapper.ts +6 -8
  142. package/utils/release-notes.ts +1 -1
  143. package/utils/sort.js +5 -0
  144. package/utils/unit-tests/pagination-utils.spec.ts +283 -0
  145. package/utils/validators/formRules/__tests__/index.test.ts +7 -0
  146. package/utils/validators/formRules/index.ts +2 -2
package/store/auth.js CHANGED
@@ -17,6 +17,7 @@ const SLO_TOKENS_ENDPOINT_LOGOUT_RES_BASETYPE = ['authConfigLogoutOutput'];
17
17
 
18
18
  export const BASE_SCOPES = {
19
19
  github: ['read:org'],
20
+ githubapp: ['read:org'],
20
21
  googleoauth: ['openid profile email'],
21
22
  azuread: [],
22
23
  keycloakoidc: ['openid profile email'],
@@ -374,11 +375,11 @@ export const actions = {
374
375
  commit('cookies/remove', { key: KEY }, { root: true });
375
376
  },
376
377
 
377
- uiLogout({ commit, dispatch }) {
378
+ uiLogout({ commit, dispatch }, options = {}) {
378
379
  removeEmberPage();
379
380
 
380
381
  commit('loggedOut');
381
- dispatch('onLogout', null, { root: true });
382
+ dispatch('onLogout', options, { root: true });
382
383
 
383
384
  dispatch('uiplugins/setReady', false, { root: true });
384
385
  },
@@ -430,6 +431,10 @@ export const actions = {
430
431
  } catch (e) {
431
432
  }
432
433
 
433
- dispatch('uiLogout');
434
+ const propagateOptions = {};
435
+
436
+ propagateOptions.sessionIdle = options.sessionIdle;
437
+
438
+ dispatch('uiLogout', propagateOptions);
434
439
  }
435
440
  };
package/store/aws.js CHANGED
@@ -213,18 +213,20 @@ export const actions = {
213
213
 
214
214
  list.push({
215
215
  apiName,
216
- currentGeneration: row.CurrentGeneration || false,
216
+ currentGeneration: row.CurrentGeneration || false,
217
217
  groupLabel,
218
218
  instanceClass,
219
- memoryBytes: row.MemoryInfo.SizeInMiB * 1024 * 1024,
220
- supportedUsageClasses: row.SupportedUsageClasses,
221
- label: rootGetters['i18n/t']('cluster.machineConfig.aws.sizeLabel', {
219
+ memoryBytes: row.MemoryInfo.SizeInMiB * 1024 * 1024,
220
+ supportedUsageClasses: row.SupportedUsageClasses,
221
+ supportedArchitectures: row.ProcessorInfo.SupportedArchitectures || [],
222
+ label: rootGetters['i18n/t']('cluster.machineConfig.aws.sizeLabel', {
222
223
  apiName,
223
- cpu: row.VCpuInfo.DefaultVCpus,
224
- memory: row.MemoryInfo.SizeInMiB / 1024,
224
+ cpu: row.VCpuInfo.DefaultVCpus,
225
+ memory: row.MemoryInfo.SizeInMiB / 1024,
225
226
  storageSize,
226
227
  storageUnit,
227
228
  storageType,
229
+ architecture: (row.ProcessorInfo.SupportedArchitectures || []).map((a) => (a === 'arm64' ? 'ARM' : a)).join(', ')
228
230
  }),
229
231
  });
230
232
  }
package/store/features.js CHANGED
@@ -37,6 +37,7 @@ export const STEVE_CACHE = create('ui-sql-cache', false);
37
37
  export const UIEXTENSION = create('uiextension', true);
38
38
  export const PROVISIONING_PRE_BOOTSTRAP = create('provisioningprebootstrap', false);
39
39
  export const SCHEDULING_CUSTOMIZATION = create(SCHEDULING_CUSTOMIZATION_FEATURE, false);
40
+ export const SCC = create('rancher-scc-registration-extension', true);
40
41
 
41
42
  // Not currently used.. no point defining ones we don't use
42
43
  // export const EMBEDDED_CLUSTER_API = create('embedded-cluster-api', true);
package/store/index.js CHANGED
@@ -2,7 +2,7 @@ import { BACK_TO } from '@shell/config/local-storage';
2
2
  import { setBrand, setVendor } from '@shell/config/private-label';
3
3
  import { NAME as EXPLORER } from '@shell/config/product/explorer';
4
4
  import {
5
- LOGGED_OUT, IS_SSO, IS_SLO, TIMED_OUT, UPGRADED, _FLAGGED
5
+ LOGGED_OUT, IS_SSO, IS_SLO, TIMED_OUT, UPGRADED, _FLAGGED, IS_SESSION_IDLE
6
6
  } from '@shell/config/query-params';
7
7
  import { SETTING } from '@shell/config/settings';
8
8
  import {
@@ -40,6 +40,8 @@ import { isDevBuild } from '@shell/utils/version';
40
40
  import { markRaw } from 'vue';
41
41
  import paginationUtils from '@shell/utils/pagination-utils';
42
42
  import { addReleaseNotesNotification } from '@shell/utils/release-notes';
43
+ import sideNavService from '@shell/components/nav/TopLevelMenu.helper';
44
+ import { fetchAndProcessDynamicContent } from '@shell/utils/dynamic-content';
43
45
 
44
46
  // Disables strict mode for all store instances to prevent warning about changing state outside of mutations
45
47
  // because it's more efficient to do that sometimes.
@@ -230,8 +232,8 @@ const updateActiveNamespaceCache = (state, activeNamespaceCache) => {
230
232
  /**
231
233
  * Are we in the vai enabled world where mgmt clusters are paginated?
232
234
  */
233
- const paginateClusters = (rootGetters) => {
234
- return paginationUtils.isEnabled({ rootGetters }, { store: 'management', resource: { id: MANAGEMENT.CLUSTER, context: 'side-bar' } });
235
+ const paginateClusters = ({ rootGetters, state }) => {
236
+ return paginationUtils.isEnabled({ rootGetters, $plugin: state.$plugin }, { store: 'management', resource: { id: MANAGEMENT.CLUSTER, context: 'side-bar' } });
235
237
  };
236
238
 
237
239
  export const state = () => {
@@ -260,11 +262,8 @@ export const state = () => {
260
262
  $router: markRaw({}),
261
263
  $route: markRaw({}),
262
264
  $plugin: markRaw({}),
263
- /**
264
- * Cache state of side nav clusters. This avoids flickering when the user changes pages and the side nav component re-renders
265
- */
266
- sideNavCache: undefined,
267
265
  showWorkspaceSwitcher: true,
266
+
268
267
  };
269
268
  };
270
269
 
@@ -629,10 +628,6 @@ export const getters = {
629
628
  return `${ base }/latest`;
630
629
  },
631
630
 
632
- sideNavCache(state) {
633
- return state.sideNavCache;
634
- },
635
-
636
631
  ...gcGetters
637
632
  };
638
633
 
@@ -773,10 +768,6 @@ export const mutations = {
773
768
  state.$plugin = markRaw(pluginDefinition || {});
774
769
  },
775
770
 
776
- setSideNavCache(state, sideNavCache) {
777
- state.sideNavCache = sideNavCache;
778
- },
779
-
780
771
  showWorkspaceSwitcher(state, value) {
781
772
  state.showWorkspaceSwitcher = value;
782
773
  },
@@ -855,7 +846,7 @@ export const actions = {
855
846
 
856
847
  res = await allHash(promises);
857
848
 
858
- if (!res[MANAGEMENT.SETTING] || !paginateClusters(rootGetters)) {
849
+ if (!res[MANAGEMENT.SETTING] || !paginateClusters({ rootGetters, state })) {
859
850
  // This introduces a synchronous request, however we need settings to determine if SSP is enabled
860
851
  // Eventually it will be removed when SSP is always on
861
852
  res[MANAGEMENT.CLUSTER] = await dispatch('management/findAll', { type: MANAGEMENT.CLUSTER, opt: { watch: false } });
@@ -900,6 +891,8 @@ export const actions = {
900
891
  // Add the notification for the release notes
901
892
  if (isRancher) {
902
893
  await addReleaseNotesNotification(dispatch, getters);
894
+
895
+ fetchAndProcessDynamicContent(dispatch, getters, this.$axios);
903
896
  }
904
897
 
905
898
  if (systemNamespaces) {
@@ -1033,7 +1026,7 @@ export const actions = {
1033
1026
  await dispatch('management/waitForSchema', { type: MANAGEMENT.CLUSTER });
1034
1027
 
1035
1028
  // If SSP is on we won't have requested all clusters
1036
- if (!paginateClusters(rootGetters)) {
1029
+ if (!paginateClusters({ rootGetters, state })) {
1037
1030
  await dispatch('management/waitForHaveAll', { type: MANAGEMENT.CLUSTER });
1038
1031
  }
1039
1032
 
@@ -1132,8 +1125,10 @@ export const actions = {
1132
1125
  commit('updateNamespaces', { filters: ids, getters });
1133
1126
  },
1134
1127
 
1135
- async cleanNamespaces({ getters, dispatch, rootGetters }) {
1136
- if (paginateClusters(rootGetters)) {
1128
+ async cleanNamespaces({
1129
+ getters, dispatch, rootGetters, state
1130
+ }) {
1131
+ if (paginateClusters({ rootGetters, state })) {
1137
1132
  // See https://github.com/rancher/dashboard/issues/12864
1138
1133
  // old world...
1139
1134
  // - loadManagement makes a request to fetch all mgmt clusters
@@ -1176,7 +1171,7 @@ export const actions = {
1176
1171
  }
1177
1172
  },
1178
1173
 
1179
- async onLogout(store) {
1174
+ async onLogout(store, options = {}) {
1180
1175
  const { dispatch, commit, state } = store;
1181
1176
 
1182
1177
  store.dispatch('gcStopIntervals');
@@ -1187,6 +1182,8 @@ export const actions = {
1187
1182
  }
1188
1183
  });
1189
1184
 
1185
+ sideNavService.reset();
1186
+
1190
1187
  await dispatch('management/unsubscribe');
1191
1188
  commit('managementChanged', { ready: false });
1192
1189
  commit('management/reset');
@@ -1216,7 +1213,10 @@ export const actions = {
1216
1213
  window.localStorage.setItem(BACK_TO, window.location.href);
1217
1214
  }
1218
1215
 
1219
- let QUERY = (LOGGED_OUT in route.query) ? LOGGED_OUT : TIMED_OUT;
1216
+ let QUERY = (LOGGED_OUT in route.query) || options.sessionIdle ? LOGGED_OUT : TIMED_OUT;
1217
+
1218
+ // adds IS_SESSION_IDLE query param to login route if logout came from a session idle (check auth/logout action)
1219
+ QUERY += options.sessionIdle ? `&${ IS_SESSION_IDLE }` : '';
1220
1220
 
1221
1221
  // adds IS_SSO query param to login route if logout came with an auth provider enabled
1222
1222
  QUERY += (IS_SSO in route.query) ? `&${ IS_SSO }` : '';
@@ -1308,10 +1308,6 @@ export const actions = {
1308
1308
  });
1309
1309
  },
1310
1310
 
1311
- setSideNavCache({ commit }, sideNavCache) {
1312
- commit('setSideNavCache', sideNavCache);
1313
- },
1314
-
1315
1311
  showWorkspaceSwitcher({ commit }, value) {
1316
1312
  commit('showWorkspaceSwitcher', value);
1317
1313
  },
package/store/prefs.js CHANGED
@@ -114,6 +114,12 @@ export const PROVISIONER = create('provisioner', _RKE2, { options: [_RKE1, _RKE2
114
114
  export const MENU_MAX_CLUSTERS = 10;
115
115
  // Prompt for confirm when scaling down node pool in GUI and save the pref
116
116
  export const SCALE_POOL_PROMPT = create('scale-pool-prompt', null, { parseJSON });
117
+
118
+ // Dynamic content
119
+ export const READ_NEW_RELEASE = create('read-new-release', '', { parseJSON });
120
+ export const READ_SUPPORT_NOTICE = create('read-support-notice', '', { parseJSON });
121
+ export const READ_UPCOMING_SUPPORT_NOTICE = create('read-upcoming-support-notice', '', { parseJSON });
122
+
117
123
  // --------------------
118
124
 
119
125
  const cookiePrefix = 'R_';
@@ -1,4 +1,11 @@
1
+ import { EXT_IDS_VALUES } from '@shell/core/plugin';
1
2
  import { ClusterProvisionerContext } from '@shell/core/types';
3
+
4
+ type ExtensionManagerType = { [name: string]: Function, }
5
+ export type ExtensionManagerTypes =
6
+ { [type in EXT_IDS_VALUES]?: ExtensionManagerType } & // eslint-disable-line no-unused-vars
7
+ { [name: string]: ExtensionManagerType }
8
+
2
9
  export type ExtensionManager = {
3
10
  internal(): any;
4
11
  loadPluginAsync(plugin: any): Promise<void>;
@@ -12,7 +19,7 @@ export type ExtensionManager = {
12
19
  applyPlugin(plugin: any): void;
13
20
  register(type: string, name: string, fn: Function): void;
14
21
  unregister(type: string, name: string, fn: Function): void;
15
- getAll(): any;
22
+ getAll(): ExtensionManagerTypes;
16
23
  getPlugins(): any;
17
24
  getDynamic(typeName: string, name: string): any;
18
25
  getValidator(name: string): any;
@@ -30,5 +30,6 @@ export interface KubeMetadata {
30
30
  }
31
31
 
32
32
  export interface RancherKubeMetadata extends KubeMetadata {
33
- namespace: string,
33
+ namespace?: string,
34
+ name: string
34
35
  }
@@ -4,6 +4,7 @@ declare module '@rancher/auto-import' {
4
4
 
5
5
  declare module '@shell/store/type-map' {
6
6
  export function DSL(store: any, name: string): any;
7
+ export function isAdminUser(getters: any): boolean;
7
8
  }
8
9
 
9
10
  declare module '@shell/plugins/dashboard-store';
@@ -1,26 +1,58 @@
1
-
2
1
  export interface PaginationSettingsStore {
3
- [name: string]: {
4
- resources: {
2
+ resources: {
3
+ /**
4
+ * Enable for all resources in this store
5
+ */
6
+ enableAll?: boolean,
7
+ /**
8
+ * Enable for only some resources in this store
9
+ */
10
+ enableSome?: {
11
+ /**
12
+ * Specific resource type to enable
13
+ */
14
+ enabled?: (string | { resource: string, context: string[]})[],
5
15
  /**
6
- * Enable for all resources in this store
16
+ * Additional resource types that do not have any custom pagination settings (headers, lists, etc) but can be generated automatically (headers from CRD additionalPrinterColumns) can be enabled
7
17
  */
8
- enableAll: boolean,
9
- enableSome: {
10
- /**
11
- * Specific resource type to enable
12
- */
13
- enabled: (string | { resource: string, context: string[]})[],
14
- /**
15
- * There's no hardcoded headers or custom list for the resource type, headers will be generated from schema attributes.columns
16
- */
17
- generic: boolean,
18
- },
19
- }
18
+ generic?: boolean,
19
+ },
20
20
  }
21
21
  }
22
22
 
23
- export type PaginationFeature = 'listAutoRefreshToggle' | 'listManualRefresh'
23
+ /*
24
+ * Determine which resources can utilise server-side pagination
25
+ */
26
+ export interface PaginationSettingsStores {
27
+ [store: string]: PaginationSettingsStore
28
+ }
29
+
30
+ /**
31
+ * Names of pagination features used in pagination settings (not featureflags)
32
+ */
33
+ export type PaginationFeatureName = 'listAutoRefreshToggle' | 'listManualRefresh' | 'homePageCluster'
34
+
35
+ export type PaginationFeatureHomePageClusterConfig = {
36
+ threshold: number,
37
+ results: number,
38
+ pagesPerRow: number
39
+ }
40
+
41
+ /**
42
+ * Details of a specific pagination feature
43
+ */
44
+ export type PaginationFeature<Config = any> = {
45
+ version: number,
46
+ enabled: boolean,
47
+ configuration?: Config,
48
+ }
49
+
50
+ /**
51
+ * List of specific features that can be enabled / disabled
52
+ */
53
+ export type PaginationSettingsFeatures = {
54
+ [key in PaginationFeatureName]?: PaginationFeature
55
+ }
24
56
 
25
57
  /**
26
58
  * Settings to handle server side pagination
@@ -33,16 +65,12 @@ export interface PaginationSettings {
33
65
  /**
34
66
  * Should pagination be enabled for resources in a store
35
67
  */
36
- stores?: PaginationSettingsStore,
68
+ stores?: PaginationSettingsStores,
37
69
 
38
70
  /**
39
71
  * List of specific features that can be enabled / disabled
40
72
  */
41
- features?: {
42
- [key in PaginationFeature]: {
43
- enabled: boolean,
44
- }
45
- },
73
+ features?: PaginationSettingsFeatures,
46
74
 
47
75
  /**
48
76
  * Debounce the amount of time between a resource changing and the backend sending a resource.changes message
@@ -75,6 +103,7 @@ type ManagedFields = {
75
103
  time: string;
76
104
  };
77
105
 
106
+ // Note - this should now be @RancherKubeMetadata
78
107
  type Metadata = {
79
108
  creationTimestamp: string;
80
109
  fields: string[];