@rancher/shell 3.0.5-rc.3 → 3.0.5-rc.5

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 (200) hide show
  1. package/assets/images/icons/document.svg +3 -0
  2. package/assets/images/vendor/cognito.svg +1 -0
  3. package/assets/styles/app.scss +1 -0
  4. package/assets/styles/base/_basic.scss +10 -0
  5. package/assets/styles/base/_spacing.scss +29 -0
  6. package/assets/styles/global/_layout.scss +1 -1
  7. package/assets/styles/themes/_dark.scss +25 -0
  8. package/assets/styles/themes/_light.scss +65 -0
  9. package/assets/translations/en-us.yaml +322 -24
  10. package/assets/translations/zh-hans.yaml +8 -5
  11. package/components/Certificates.vue +5 -0
  12. package/components/FilterPanel.vue +156 -0
  13. package/components/{fleet/ForceDirectedTreeChart/index.vue → ForceDirectedTreeChart.vue} +47 -41
  14. package/components/IconOrSvg.vue +14 -35
  15. package/components/PromptRemove.vue +5 -1
  16. package/components/Resource/Detail/Card/PodsCard/Bubble.vue +13 -0
  17. package/components/Resource/Detail/Card/PodsCard/composable.ts +30 -0
  18. package/components/Resource/Detail/Card/PodsCard/index.vue +118 -0
  19. package/components/Resource/Detail/Card/ResourceUsageCard/composable.ts +51 -0
  20. package/components/Resource/Detail/Card/ResourceUsageCard/index.vue +79 -0
  21. package/components/Resource/Detail/Card/Scaler.vue +89 -0
  22. package/components/Resource/Detail/Card/StateCard/composables.ts +112 -0
  23. package/components/Resource/Detail/Card/StateCard/index.vue +39 -0
  24. package/components/Resource/Detail/Card/VerticalGap.vue +11 -0
  25. package/components/Resource/Detail/Card/__tests__/Card.test.ts +36 -0
  26. package/components/Resource/Detail/Card/__tests__/PodsCard.test.ts +84 -0
  27. package/components/Resource/Detail/Card/__tests__/ResourceUsageCard.test.ts +72 -0
  28. package/components/Resource/Detail/Card/__tests__/Scaler.test.ts +87 -0
  29. package/components/Resource/Detail/Card/__tests__/StateCard.test.ts +53 -0
  30. package/components/Resource/Detail/Card/__tests__/VerticalGap.test.ts +14 -0
  31. package/components/Resource/Detail/Card/__tests__/index.test.ts +36 -0
  32. package/components/Resource/Detail/Card/index.vue +56 -0
  33. package/components/Resource/Detail/Metadata/Annotations/__tests__/index.test.ts +19 -0
  34. package/components/Resource/Detail/Metadata/Annotations/composable.ts +12 -0
  35. package/components/Resource/Detail/Metadata/Annotations/index.vue +26 -0
  36. package/components/Resource/Detail/Metadata/IdentifyingInformation/__tests__/index.test.ts +103 -0
  37. package/components/Resource/Detail/Metadata/IdentifyingInformation/composable.ts +281 -0
  38. package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +111 -0
  39. package/components/Resource/Detail/Metadata/KeyValue.vue +130 -0
  40. package/components/Resource/Detail/Metadata/Labels/__tests__/index.test.ts +18 -0
  41. package/components/Resource/Detail/Metadata/Labels/composable.ts +12 -0
  42. package/components/Resource/Detail/Metadata/Labels/index.vue +27 -0
  43. package/components/Resource/Detail/Metadata/Rectangle.vue +32 -0
  44. package/components/Resource/Detail/Metadata/__tests__/KeyValue.test.ts +107 -0
  45. package/components/Resource/Detail/Metadata/__tests__/Rectangle.test.ts +24 -0
  46. package/components/Resource/Detail/Metadata/__tests__/index.test.ts +91 -0
  47. package/components/Resource/Detail/Metadata/composables.ts +29 -0
  48. package/components/Resource/Detail/Metadata/index.vue +66 -0
  49. package/components/Resource/Detail/Page.vue +22 -0
  50. package/components/Resource/Detail/PercentageBar.vue +40 -0
  51. package/components/Resource/Detail/ResourceRow.vue +119 -0
  52. package/components/Resource/Detail/SpacedRow.vue +14 -0
  53. package/components/Resource/Detail/StatusBar.vue +59 -0
  54. package/components/Resource/Detail/StatusRow.vue +61 -0
  55. package/components/Resource/Detail/TitleBar/Title.vue +13 -0
  56. package/components/Resource/Detail/TitleBar/Top.vue +14 -0
  57. package/components/Resource/Detail/TitleBar/__tests__/Title.test.ts +17 -0
  58. package/components/Resource/Detail/TitleBar/__tests__/Top.test.ts +17 -0
  59. package/components/Resource/Detail/TitleBar/__tests__/index.test.ts +142 -0
  60. package/components/Resource/Detail/TitleBar/composable.ts +31 -0
  61. package/components/Resource/Detail/TitleBar/index.vue +124 -0
  62. package/components/Resource/Detail/Top/index.vue +34 -0
  63. package/components/Resource/Detail/__tests__/Page.test.ts +32 -0
  64. package/components/ResourceDetail/__tests__/index.test.ts +114 -0
  65. package/components/ResourceDetail/index.vue +64 -562
  66. package/components/ResourceDetail/legacy.vue +545 -0
  67. package/components/ResourceTable.vue +41 -7
  68. package/components/SlideInPanelManager.vue +76 -8
  69. package/components/SortableTable/index.vue +13 -2
  70. package/components/SortableTable/selection.js +21 -8
  71. package/components/StatusBadge.vue +6 -4
  72. package/components/SubtleLink.vue +25 -0
  73. package/components/Wizard.vue +12 -1
  74. package/components/YamlEditor.vue +1 -1
  75. package/components/__tests__/FilterPanel.test.ts +81 -0
  76. package/components/auth/AuthBanner.vue +2 -3
  77. package/components/auth/RoleDetailEdit.vue +45 -3
  78. package/components/auth/login/oidc.vue +6 -1
  79. package/components/fleet/FleetApplications.vue +181 -0
  80. package/components/fleet/FleetHelmOps.vue +115 -0
  81. package/components/fleet/FleetIntro.vue +58 -28
  82. package/components/fleet/FleetNoWorkspaces.vue +5 -1
  83. package/components/fleet/FleetOCIStorageSecret.vue +171 -0
  84. package/components/fleet/FleetRepos.vue +38 -76
  85. package/components/fleet/FleetResources.vue +50 -22
  86. package/components/fleet/FleetSummary.vue +26 -51
  87. package/components/fleet/__tests__/FleetOCIStorageSecret.test.ts +213 -0
  88. package/components/fleet/__tests__/FleetSummary.test.ts +39 -39
  89. package/components/fleet/dashboard/Empty.vue +73 -0
  90. package/components/fleet/dashboard/ResourceCard.vue +183 -0
  91. package/components/fleet/dashboard/ResourceCardSummary.vue +199 -0
  92. package/components/fleet/dashboard/ResourceDetails.vue +196 -0
  93. package/components/fleet/dashboard/ResourcePanel.vue +376 -0
  94. package/components/form/ArrayList.vue +6 -0
  95. package/components/form/SimpleSecretSelector.vue +8 -2
  96. package/components/form/ValueFromResource.vue +31 -19
  97. package/components/formatter/FleetApplicationClustersReady.vue +77 -0
  98. package/components/formatter/FleetApplicationSource.vue +71 -0
  99. package/components/formatter/FleetSummaryGraph.vue +7 -0
  100. package/components/nav/Header.vue +8 -7
  101. package/components/nav/TopLevelMenu.helper.ts +55 -34
  102. package/components/nav/TopLevelMenu.vue +11 -0
  103. package/components/nav/Type.vue +4 -1
  104. package/composables/useI18n.ts +12 -11
  105. package/config/labels-annotations.js +14 -11
  106. package/config/product/auth.js +1 -0
  107. package/config/product/fleet.js +70 -17
  108. package/config/query-params.js +3 -1
  109. package/config/roles.ts +1 -0
  110. package/config/router/routes.js +20 -2
  111. package/config/secret.ts +15 -0
  112. package/config/settings.ts +3 -2
  113. package/config/table-headers.js +52 -22
  114. package/config/types.js +2 -0
  115. package/core/plugin-helpers.ts +3 -2
  116. package/detail/fleet.cattle.io.cluster.vue +28 -15
  117. package/detail/fleet.cattle.io.gitrepo.vue +10 -1
  118. package/detail/fleet.cattle.io.helmop.vue +157 -0
  119. package/dialog/HelmOpForceUpdateDialog.vue +132 -0
  120. package/dialog/RedeployWorkloadDialog.vue +164 -0
  121. package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +56 -67
  122. package/edit/auth/oidc.vue +159 -93
  123. package/edit/fleet.cattle.io.gitrepo.vue +26 -33
  124. package/edit/fleet.cattle.io.helmop.vue +997 -0
  125. package/edit/management.cattle.io.fleetworkspace.vue +43 -10
  126. package/list/fleet.cattle.io.gitrepo.vue +1 -1
  127. package/list/fleet.cattle.io.helmop.vue +108 -0
  128. package/list/namespace.vue +5 -2
  129. package/mixins/auth-config.js +8 -1
  130. package/mixins/preset.js +100 -0
  131. package/mixins/resource-fetch-api-pagination.js +2 -0
  132. package/mixins/resource-fetch.js +1 -1
  133. package/mixins/resource-table-watch.js +45 -0
  134. package/models/__tests__/chart.test.ts +273 -0
  135. package/models/__tests__/fleet.cattle.io.gitrepo.test.ts +1 -1
  136. package/models/chart.js +144 -2
  137. package/models/fleet-application.js +385 -0
  138. package/models/fleet.cattle.io.bundle.js +9 -8
  139. package/models/fleet.cattle.io.gitrepo.js +41 -365
  140. package/models/fleet.cattle.io.helmop.js +228 -0
  141. package/models/management.cattle.io.authconfig.js +1 -0
  142. package/models/management.cattle.io.fleetworkspace.js +12 -0
  143. package/models/workload.js +14 -18
  144. package/package.json +2 -1
  145. package/pages/auth/verify.vue +13 -1
  146. package/pages/c/_cluster/apps/charts/AddRepoLink.vue +37 -0
  147. package/pages/c/_cluster/apps/charts/AppChartCardFooter.vue +80 -0
  148. package/pages/c/_cluster/apps/charts/AppChartCardSubHeader.vue +54 -0
  149. package/pages/c/_cluster/apps/charts/StatusLabel.vue +33 -0
  150. package/pages/c/_cluster/apps/charts/index.vue +302 -484
  151. package/pages/c/_cluster/explorer/EventsTable.vue +1 -1
  152. package/pages/c/_cluster/fleet/__tests__/index.test.ts +426 -0
  153. package/pages/c/_cluster/fleet/application/_resource/_id.vue +14 -0
  154. package/pages/c/_cluster/fleet/application/_resource/create.vue +14 -0
  155. package/pages/c/_cluster/fleet/application/create.vue +340 -0
  156. package/pages/c/_cluster/fleet/application/index.vue +139 -0
  157. package/pages/c/_cluster/fleet/graph/config.js +277 -0
  158. package/pages/c/_cluster/fleet/index.vue +772 -330
  159. package/pages/explorer/resource/detail/configmap.vue +19 -0
  160. package/plugins/dashboard-store/actions.js +31 -9
  161. package/plugins/dashboard-store/getters.js +34 -21
  162. package/plugins/dashboard-store/mutations.js +51 -7
  163. package/plugins/dashboard-store/resource-class.js +14 -2
  164. package/plugins/steve/__tests__/subscribe.spec.ts +66 -1
  165. package/plugins/steve/actions.js +3 -0
  166. package/plugins/steve/steve-pagination-utils.ts +14 -13
  167. package/plugins/steve/subscribe.js +229 -42
  168. package/rancher-components/BadgeState/BadgeState.vue +3 -1
  169. package/rancher-components/Form/Checkbox/Checkbox.vue +2 -2
  170. package/rancher-components/RcItemCard/RcItemCard.test.ts +189 -0
  171. package/rancher-components/RcItemCard/RcItemCard.vue +425 -0
  172. package/rancher-components/RcItemCard/RcItemCardAction.vue +24 -0
  173. package/rancher-components/RcItemCard/index.ts +2 -0
  174. package/store/auth.js +1 -0
  175. package/store/catalog.js +62 -24
  176. package/store/index.js +33 -14
  177. package/store/slideInPanel.ts +6 -0
  178. package/store/type-map.js +1 -0
  179. package/types/fleet.d.ts +35 -0
  180. package/types/resources/settings.d.ts +19 -1
  181. package/types/shell/index.d.ts +339 -272
  182. package/types/store/dashboard-store.types.ts +17 -3
  183. package/types/store/pagination.types.ts +6 -1
  184. package/types/store/subscribe.types.ts +50 -0
  185. package/utils/auth.js +32 -3
  186. package/utils/fleet-types.ts +0 -0
  187. package/utils/fleet.ts +200 -1
  188. package/utils/pagination-utils.ts +26 -1
  189. package/utils/pagination-wrapper.ts +132 -50
  190. package/utils/settings.ts +4 -1
  191. package/utils/style.ts +39 -0
  192. package/utils/validators/formRules/__tests__/index.test.ts +36 -3
  193. package/utils/validators/formRules/index.ts +10 -3
  194. package/utils/window.js +11 -7
  195. package/components/__tests__/ApplicationCard.test.ts +0 -27
  196. package/components/cards/ApplicationCard.vue +0 -145
  197. package/components/fleet/ForceDirectedTreeChart/chartIcons.js +0 -17
  198. package/config/secret.js +0 -14
  199. package/pages/c/_cluster/fleet/GitRepoGraphConfig.js +0 -249
  200. /package/{components/form/SSHKnownHosts → dialog}/__tests__/KnownHostsEditDialog.test.ts +0 -0
@@ -93,7 +93,8 @@ export default {
93
93
  'isSingleProduct',
94
94
  'isRancherInHarvester',
95
95
  'showTopLevelMenu',
96
- 'isMultiCluster'
96
+ 'isMultiCluster',
97
+ 'showWorkspaceSwitcher'
97
98
  ]),
98
99
 
99
100
  samlAuthProviderEnabled() {
@@ -238,16 +239,16 @@ export default {
238
239
  },
239
240
 
240
241
  watch: {
241
- currentCluster(nue, old) {
242
- if (nue && old && nue.id !== old.id) {
242
+ currentCluster(neu, old) {
243
+ if (neu && old && neu.id !== old.id) {
243
244
  this.checkClusterName();
244
245
  }
245
246
  },
246
247
  // since the Header is a "persistent component" we need to update it at every route change...
247
248
  $route: {
248
- handler(nue) {
249
- if (nue) {
250
- this.extensionHeaderActions = getApplicableExtensionEnhancements(this, ExtensionPoint.ACTION, ActionLocation.HEADER, nue);
249
+ handler(neu) {
250
+ if (neu) {
251
+ this.extensionHeaderActions = getApplicableExtensionEnhancements(this, ExtensionPoint.ACTION, ActionLocation.HEADER, neu);
251
252
 
252
253
  this.navHeaderRight = this.$plugin?.getDynamic('component', 'NavHeaderRight');
253
254
  }
@@ -533,7 +534,7 @@ export default {
533
534
  class="top"
534
535
  >
535
536
  <NamespaceFilter v-if="clusterReady && currentProduct && (currentProduct.showNamespaceFilter || isExplorer)" />
536
- <WorkspaceSwitcher v-else-if="clusterReady && currentProduct && currentProduct.showWorkspaceSwitcher" />
537
+ <WorkspaceSwitcher v-else-if="clusterReady && currentProduct && currentProduct.showWorkspaceSwitcher && showWorkspaceSwitcher" />
537
538
  </div>
538
539
  <div
539
540
  v-if="currentCluster && !simple"
@@ -1,10 +1,12 @@
1
1
  import { CAPI, MANAGEMENT } from '@shell/config/types';
2
+ import { STORE } from '@shell/store/store-types';
2
3
  import { PaginationParam, PaginationParamFilter, PaginationSort } from '@shell/types/store/pagination.types';
3
4
  import { VuexStore } from '@shell/types/store/vuex';
4
5
  import { filterHiddenLocalCluster, filterOnlyKubernetesClusters, paginationFilterClusters } from '@shell/utils/cluster';
5
6
  import PaginationWrapper from '@shell/utils/pagination-wrapper';
6
7
  import { allHash } from '@shell/utils/promise';
7
8
  import { sortBy } from '@shell/utils/sort';
9
+ import { reactive } from 'vue';
8
10
  import { LocationAsRelativeRaw } from 'vue-router';
9
11
 
10
12
  interface TopLevelMenuCluster {
@@ -86,7 +88,15 @@ export interface TopLevelMenuHelper {
86
88
  */
87
89
  clustersOthers: Array<TopLevelMenuCluster>;
88
90
 
89
- update: (args: UpdateArgs) => Promise<void>
91
+ /**
92
+ * Fetch all cluster resources
93
+ */
94
+ update: (args: UpdateArgs) => Promise<void>;
95
+
96
+ /**
97
+ * Cleanup on destroy of TopLevelMenu
98
+ */
99
+ destroy: () => Promise<void>;
90
100
  }
91
101
 
92
102
  export abstract class BaseTopLevelMenuHelper {
@@ -106,7 +116,7 @@ export abstract class BaseTopLevelMenuHelper {
106
116
  * 2. ready
107
117
  * 3. name
108
118
  */
109
- public clustersPinned: Array<TopLevelMenuCluster> = [];
119
+ public clustersPinned: Array<TopLevelMenuCluster> = reactive([]);
110
120
 
111
121
  /**
112
122
  * Filter mgmt clusters by
@@ -121,7 +131,7 @@ export abstract class BaseTopLevelMenuHelper {
121
131
  * 2. ready
122
132
  * 3. name
123
133
  */
124
- public clustersOthers: Array<TopLevelMenuCluster> = [];
134
+ public clustersOthers: Array<TopLevelMenuCluster> = reactive([]);
125
135
 
126
136
  constructor({ $store }: {
127
137
  $store: VuexStore,
@@ -141,7 +151,7 @@ export abstract class BaseTopLevelMenuHelper {
141
151
  return {
142
152
  id: mgmtCluster.id,
143
153
  label: mgmtCluster.nameDisplay,
144
- ready: mgmtCluster.isReady, // && !provCluster?.hasError,
154
+ ready: mgmtCluster.isReady,
145
155
  providerNavLogo: mgmtCluster.providerMenuLogo,
146
156
  badge: mgmtCluster.badge,
147
157
  iconColor: mgmtCluster.iconColor,
@@ -165,69 +175,64 @@ export abstract class BaseTopLevelMenuHelper {
165
175
  export class TopLevelMenuHelperPagination extends BaseTopLevelMenuHelper implements TopLevelMenuHelper {
166
176
  private args?: UpdateArgs;
167
177
 
168
- private clustersPinnedWrapper: PaginationWrapper;
169
- private clustersOthersWrapper: PaginationWrapper;
170
- private provClusterWrapper: PaginationWrapper;
171
-
172
- private commonClusterFilters: PaginationParam[];
178
+ private clustersPinnedWrapper: PaginationWrapper<any>;
179
+ private clustersOthersWrapper: PaginationWrapper<any>;
180
+ private provClusterWrapper: PaginationWrapper<any>;
173
181
 
174
182
  constructor({ $store }: {
175
183
  $store: VuexStore,
176
184
  }) {
177
185
  super({ $store });
178
186
 
179
- this.commonClusterFilters = paginationFilterClusters({ getters: this.$store.getters });
180
-
187
+ // Fetch all PINNED clusters (see `clustersPinned` description for details)
188
+ // No need to monitor for changes, the UNPINNED request will handle it
181
189
  this.clustersPinnedWrapper = new PaginationWrapper({
182
190
  $store,
183
- onUpdate: () => {
184
- // trigger on websocket update (only need 1 trigger for this cluster type)
185
- // https://github.com/rancher/rancher/issues/40773 / https://github.com/rancher/dashboard/issues/12734
186
- if (this.args) {
187
- this.update(this.args);
188
- }
189
- },
191
+ id: 'tlm-pinned-clusters',
190
192
  enabledFor: {
191
- store: 'management',
193
+ store: STORE.MANAGEMENT,
192
194
  resource: {
193
195
  id: MANAGEMENT.CLUSTER,
194
196
  context: 'side-bar',
195
197
  }
196
- }
198
+ },
199
+ formatResponse: { classify: true }
197
200
  });
201
+ // Fetch all UNPINNED clusters capped at 10 (see `clustersOthers` description for details)
198
202
  this.clustersOthersWrapper = new PaginationWrapper({
199
203
  $store,
200
- onUpdate: (res) => {
201
- // trigger on websocket update (only need 1 trigger for this cluster type)
202
- // https://github.com/rancher/rancher/issues/40773 / https://github.com/rancher/dashboard/issues/12734
204
+ id: 'tlm-unpinned-clusters',
205
+ onChange: () => {
203
206
  if (this.args) {
204
207
  this.update(this.args);
205
208
  }
206
209
  },
207
210
  enabledFor: {
208
- store: 'management',
211
+ store: STORE.MANAGEMENT,
209
212
  resource: {
210
213
  id: MANAGEMENT.CLUSTER,
211
214
  context: 'side-bar',
212
215
  }
213
- }
216
+ },
217
+ formatResponse: { classify: true }
214
218
  });
219
+ // Fetch all prov clusters for the mgmt clusters we have
215
220
  this.provClusterWrapper = new PaginationWrapper({
216
221
  $store,
217
- onUpdate: (res) => {
218
- // trigger on websocket update (only need 1 trigger for this cluster type)
219
- // https://github.com/rancher/rancher/issues/40773 / https://github.com/rancher/dashboard/issues/12734
222
+ id: 'tlm-prov-clusters',
223
+ onChange: () => {
220
224
  if (this.args) {
221
225
  this.update(this.args);
222
226
  }
223
227
  },
224
228
  enabledFor: {
225
- store: 'management',
229
+ store: STORE.MANAGEMENT,
226
230
  resource: {
227
231
  id: CAPI.RANCHER_CLUSTER,
228
232
  context: 'side-bar',
229
233
  }
230
- }
234
+ },
235
+ formatResponse: { classify: true }
231
236
  });
232
237
  }
233
238
 
@@ -258,6 +263,7 @@ export class TopLevelMenuHelperPagination extends BaseTopLevelMenuHelper impleme
258
263
  return res;
259
264
  }, {} as { [mgmtId: string]: ProvCluster});
260
265
 
266
+ // Filter out mgmt clusters that don't have matching prov cluster and convert remaining to required format
261
267
  const _clustersNotPinned = res.notPinned
262
268
  .filter((mgmtCluster) => !!provClustersByMgmtId[mgmtCluster.id])
263
269
  .map((mgmtCluster) => this.convertToCluster(mgmtCluster, provClustersByMgmtId[mgmtCluster.id]));
@@ -274,6 +280,19 @@ export class TopLevelMenuHelperPagination extends BaseTopLevelMenuHelper impleme
274
280
  this.cacheClusters();
275
281
  }
276
282
 
283
+ async destroy() {
284
+ this.clustersPinnedWrapper.onDestroy();
285
+ this.clustersOthersWrapper.onDestroy();
286
+ this.provClusterWrapper.onDestroy();
287
+ }
288
+
289
+ /**
290
+ * Helper function
291
+ *
292
+ * This extracts all the functionality previously in TopLevelMenu
293
+ *
294
+ * Construct SSP filter params
295
+ */
277
296
  private constructParams({
278
297
  pinnedIds,
279
298
  searchTerm,
@@ -289,7 +308,8 @@ export class TopLevelMenuHelperPagination extends BaseTopLevelMenuHelper impleme
289
308
  includePinned?: boolean,
290
309
  excludePinned?: boolean,
291
310
  }): PaginationParam[] {
292
- const filters: PaginationParam[] = [...this.commonClusterFilters];
311
+ const commonClusterFilters = paginationFilterClusters({ getters: this.$store.getters });
312
+ const filters: PaginationParam[] = [...commonClusterFilters];
293
313
 
294
314
  if (pinnedIds) {
295
315
  if (includePinned) {
@@ -341,7 +361,6 @@ export class TopLevelMenuHelperPagination extends BaseTopLevelMenuHelper impleme
341
361
  sort: DEFAULT_SORT,
342
362
  projectsOrNamespaces: []
343
363
  },
344
- classify: true,
345
364
  }).then((r) => r.data);
346
365
  }
347
366
 
@@ -362,7 +381,6 @@ export class TopLevelMenuHelperPagination extends BaseTopLevelMenuHelper impleme
362
381
  sort: DEFAULT_SORT,
363
382
  projectsOrNamespaces: []
364
383
  },
365
- classify: true,
366
384
  }).then((r) => r.data);
367
385
  }
368
386
 
@@ -386,7 +404,6 @@ export class TopLevelMenuHelperPagination extends BaseTopLevelMenuHelper impleme
386
404
  sort: [],
387
405
  projectsOrNamespaces: []
388
406
  },
389
- classify: true,
390
407
  }).then((r) => r.data);
391
408
  }
392
409
  }
@@ -419,6 +436,10 @@ export class TopLevelMenuHelperLegacy extends BaseTopLevelMenuHelper implements
419
436
  this.cacheClusters();
420
437
  }
421
438
 
439
+ async destroy() {
440
+ // No-op
441
+ }
442
+
422
443
  /**
423
444
  * Filter mgmt clusters by
424
445
  * 1. Harvester type 1 (filterOnlyKubernetesClusters)
@@ -257,6 +257,13 @@ export default {
257
257
  });
258
258
 
259
259
  return appBar;
260
+ },
261
+
262
+ hideLocalCluster() {
263
+ const hideLocalSetting = this.$store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.HIDE_LOCAL_CLUSTER) || {};
264
+ const value = hideLocalSetting.value || hideLocalSetting.default || 'false';
265
+
266
+ return value === 'true';
260
267
  }
261
268
  },
262
269
 
@@ -309,6 +316,9 @@ export default {
309
316
  immediate: true,
310
317
  },
311
318
 
319
+ hideLocalCluster() {
320
+ this.updateClusters(this.pinnedIds, 'slow');
321
+ }
312
322
  },
313
323
 
314
324
  mounted() {
@@ -317,6 +327,7 @@ export default {
317
327
 
318
328
  beforeUnmount() {
319
329
  document.removeEventListener('keyup', this.handler);
330
+ this.helper?.destroy();
320
331
  },
321
332
 
322
333
  methods: {
@@ -64,7 +64,10 @@ export default {
64
64
  // If the route explicitly declares the nav path that should be highlighted, then use that
65
65
  if (routeMetaNav) {
66
66
  const cluster = this.$route.params?.cluster;
67
- const navPath = routeMetaNav.replace(':cluster', cluster);
67
+ const product = this.$route.params?.product;
68
+ const navPath = routeMetaNav
69
+ .replace(':cluster', cluster)
70
+ .replace(':product', product);
68
71
 
69
72
  if (navPath === typeFullPath) {
70
73
  return true;
@@ -3,17 +3,6 @@ import { Store } from 'vuex';
3
3
  import { stringFor } from '@shell/plugins/i18n';
4
4
 
5
5
  let store: Store<any> | null = null;
6
-
7
- export const useI18n = (vuexStore: Store<any>): { t: typeof t } => {
8
- store = vuexStore;
9
-
10
- if (!store) {
11
- throw new Error('usI18n() must be called from setup()');
12
- }
13
-
14
- return { t };
15
- };
16
-
17
6
  /**
18
7
  * Allows for consuming i18n strings with the Vue composition API.
19
8
  * @param key - The key for the i18n string to translate.
@@ -24,3 +13,15 @@ export const useI18n = (vuexStore: Store<any>): { t: typeof t } => {
24
13
  const t = (key: string, args?: unknown, raw?: boolean): string => {
25
14
  return stringFor(store, key, args, raw);
26
15
  };
16
+
17
+ export type I18n = { t: typeof t };
18
+
19
+ export const useI18n = (vuexStore: Store<any>): I18n => {
20
+ store = vuexStore;
21
+
22
+ if (!store) {
23
+ throw new Error('usI18n() must be called from setup()');
24
+ }
25
+
26
+ return { t };
27
+ };
@@ -116,17 +116,20 @@ export const CATALOG = {
116
116
  };
117
117
 
118
118
  export const FLEET = {
119
- REPO_NAME: 'fleet.cattle.io/repo-name',
120
- CLUSTER_DISPLAY_NAME: 'management.cattle.io/cluster-display-name',
121
- CLUSTER_NAME: 'management.cattle.io/cluster-name',
122
- BUNDLE_ID: 'fleet.cattle.io/bundle-id',
123
- BUNDLE_NAME: 'fleet.cattle.io/bundle-name',
124
- BUNDLE_NAMESPACE: 'fleet.cattle.io/bundle-namespace',
125
- MANAGED: 'fleet.cattle.io/managed',
126
- CLUSTER_NAMESPACE: 'fleet.cattle.io/cluster-namespace',
127
- CLUSTER: 'fleet.cattle.io/cluster',
128
- CREATED_BY_USER_ID: 'fleet.cattle.io/created-by-user-id',
129
- CREATED_BY_USER_NAME: 'fleet.cattle.io/created-by-display-name',
119
+ REPO_NAME: 'fleet.cattle.io/repo-name',
120
+ HELM_NAME: 'fleet.cattle.io/fleet-helm-name',
121
+ CLUSTER_DISPLAY_NAME: 'management.cattle.io/cluster-display-name',
122
+ CLUSTER_NAME: 'management.cattle.io/cluster-name',
123
+ BUNDLE_ID: 'fleet.cattle.io/bundle-id',
124
+ BUNDLE_NAME: 'fleet.cattle.io/bundle-name',
125
+ BUNDLE_NAMESPACE: 'fleet.cattle.io/bundle-namespace',
126
+ MANAGED: 'fleet.cattle.io/managed',
127
+ CLUSTER_NAMESPACE: 'fleet.cattle.io/cluster-namespace',
128
+ CLUSTER: 'fleet.cattle.io/cluster',
129
+ CREATED_BY_USER_ID: 'fleet.cattle.io/created-by-user-id',
130
+ CREATED_BY_USER_NAME: 'fleet.cattle.io/created-by-display-name',
131
+ OCI_STORAGE_SECRET_DEFAULT: 'ui-default-oci-registry',
132
+ OCI_STORAGE_SECRET_GENERATED: 'fleet.cattle.io/bundle-internal-secret',
130
133
  };
131
134
 
132
135
  export const RBAC = { PRODUCT: 'management.cattle.io/ui-product' };
@@ -175,6 +175,7 @@ export function init(store) {
175
175
  componentForType(`${ MANAGEMENT.AUTH_CONFIG }/azuread`, 'auth/azuread');
176
176
  componentForType(`${ MANAGEMENT.AUTH_CONFIG }/keycloakoidc`, 'auth/oidc');
177
177
  componentForType(`${ MANAGEMENT.AUTH_CONFIG }/genericoidc`, 'auth/oidc');
178
+ componentForType(`${ MANAGEMENT.AUTH_CONFIG }/cognito`, 'auth/oidc');
178
179
 
179
180
  basicType([
180
181
  'config',
@@ -1,10 +1,16 @@
1
1
  import { DSL } from '@shell/store/type-map';
2
2
  import { FLEET } from '@shell/config/types';
3
- import { STATE, NAME as NAME_COL, AGE } from '@shell/config/table-headers';
3
+ import { STATE, NAME as NAME_COL, AGE, FLEET_APPLICATION_TYPE } from '@shell/config/table-headers';
4
4
  import { FLEET as FLEET_FEATURE } from '@shell/store/features';
5
- import { gitRepoGraphConfig } from '@shell/pages/c/_cluster/fleet/GitRepoGraphConfig';
5
+ import { graphConfig } from '@shell/pages/c/_cluster/fleet/graph/config';
6
6
  import { BLANK_CLUSTER } from '@shell/store/store-types.js';
7
7
 
8
+ export const SOURCE_TYPE = {
9
+ REPO: 'repo',
10
+ OCI: 'oci',
11
+ TARBALL: 'tarball',
12
+ };
13
+
8
14
  export const NAME = 'fleet';
9
15
  export const CHART_NAME = 'fleet';
10
16
 
@@ -20,7 +26,7 @@ export function init(store) {
20
26
  } = DSL(store, NAME);
21
27
 
22
28
  product({
23
- ifHaveType: FLEET.GIT_REPO,
29
+ ifHaveType: new RegExp(`${ FLEET.GIT_REPO }|${ FLEET.HELM_OP }`, 'i'),
24
30
  ifFeature: FLEET_FEATURE,
25
31
  icon: 'fleet',
26
32
  inStore: 'management',
@@ -39,7 +45,7 @@ export function init(store) {
39
45
  group: 'Root',
40
46
  namespaced: false,
41
47
  name: FLEET.DASHBOARD,
42
- weight: 110,
48
+ weight: 112,
43
49
  route: {
44
50
  name: 'c-cluster-fleet',
45
51
  params: { resource: FLEET.DASHBOARD, cluster: BLANK_CLUSTER }
@@ -47,30 +53,58 @@ export function init(store) {
47
53
  exact: true,
48
54
  });
49
55
 
56
+ virtualType({
57
+ labelKey: 'fleet.application.menuLabel',
58
+ group: 'Root',
59
+ namespaced: true,
60
+ name: FLEET.APPLICATION,
61
+ weight: 111,
62
+ route: {
63
+ name: 'c-cluster-fleet-application',
64
+ params: { resource: FLEET.APPLICATION, cluster: BLANK_CLUSTER }
65
+ },
66
+ exact: false,
67
+ });
68
+
69
+ configureType(FLEET.APPLICATION, {
70
+ subTypes: [
71
+ FLEET.GIT_REPO,
72
+ FLEET.HELM_OP
73
+ ],
74
+ location: {
75
+ name: 'c-cluster-fleet-application',
76
+ params: { resource: FLEET.APPLICATION, cluster: BLANK_CLUSTER }
77
+ },
78
+ listGroups: [
79
+ {
80
+ icon: 'icon-list-flat',
81
+ value: 'none',
82
+ tooltipKey: 'resourceTable.groupBy.none',
83
+ },
84
+ {
85
+ icon: 'icon-repository',
86
+ value: 'kind',
87
+ field: 'kind',
88
+ tooltipKey: 'fleet.application.groupBy',
89
+ hideColumn: FLEET_APPLICATION_TYPE.name,
90
+ }
91
+ ],
92
+ listGroupsWillOverride: true,
93
+ });
94
+
50
95
  basicType([
51
96
  FLEET.DASHBOARD,
97
+ FLEET.APPLICATION,
52
98
  FLEET.CLUSTER,
53
99
  FLEET.CLUSTER_GROUP,
54
- FLEET.GIT_REPO,
100
+ FLEET.WORKSPACE,
55
101
  ]);
56
102
 
57
103
  configureType(FLEET.CLUSTER, { isCreatable: false });
58
- configureType(FLEET.GIT_REPO, {
59
- showListMasthead: false, hasGraph: true, graphConfig: gitRepoGraphConfig
60
- });
61
104
 
62
- weightType(FLEET.GIT_REPO, 109, true);
63
105
  weightType(FLEET.CLUSTER, 108, true);
64
106
  weightType(FLEET.CLUSTER_GROUP, 107, true);
65
107
 
66
- basicType([
67
- FLEET.WORKSPACE,
68
- FLEET.BUNDLE,
69
- FLEET.TOKEN,
70
- FLEET.BUNDLE_NAMESPACE_MAPPING,
71
- FLEET.GIT_REPO_RESTRICTION
72
- ], 'advanced');
73
-
74
108
  headers(FLEET.WORKSPACE, [
75
109
  STATE,
76
110
  NAME_COL,
@@ -97,4 +131,23 @@ export function init(store) {
97
131
  },
98
132
  AGE
99
133
  ]);
134
+
135
+ basicType([
136
+ FLEET.GIT_REPO,
137
+ FLEET.HELM_OP,
138
+ FLEET.BUNDLE,
139
+ FLEET.TOKEN,
140
+ FLEET.BUNDLE_NAMESPACE_MAPPING,
141
+ FLEET.GIT_REPO_RESTRICTION
142
+ ], 'resources');
143
+
144
+ configureType(FLEET.GIT_REPO, {
145
+ showListMasthead: false, hasGraph: true, graphConfig
146
+ });
147
+ configureType(FLEET.HELM_OP, {
148
+ showListMasthead: false, hasGraph: true, graphConfig
149
+ });
150
+
151
+ weightType(FLEET.GIT_REPO, 110, true);
152
+ weightType(FLEET.HELM_OP, 109, true);
100
153
  }
@@ -36,6 +36,7 @@ export const _LIST = 'list';
36
36
  export const _CLONE = 'clone';
37
37
  export const _STAGE = 'stage';
38
38
  export const _IMPORT = 'import';
39
+ export const LEGACY = 'legacy';
39
40
 
40
41
  export const AS = 'as';
41
42
  export const _DETAIL = 'detail';
@@ -63,7 +64,8 @@ export const NAME = 'name';
63
64
  export const NAMESPACE = 'namespace';
64
65
  export const DESCRIPTION = 'description';
65
66
  export const CATEGORY = 'category';
66
- export const OPERATING_SYSTEM = 'os';
67
+ export const TAG = 'tag';
68
+ export const STATUS = 'status';
67
69
  export const DEPRECATED = 'deprecated';
68
70
  export const HIDDEN = 'hidden';
69
71
  export const FROM_TOOLS = 'tools';
package/config/roles.ts CHANGED
@@ -57,6 +57,7 @@ export const SCOPED_RESOURCES = {
57
57
  'Contents',
58
58
  'GitRepos',
59
59
  'GitRepoRestrictions',
60
+ 'HelmOps',
60
61
  ],
61
62
  },
62
63
  'gitjob.cattle.io': {
@@ -214,6 +214,22 @@ export default [
214
214
  path: '/c/:cluster/fleet',
215
215
  component: () => interopDefault(import('@shell/pages/c/_cluster/fleet/index.vue')),
216
216
  name: 'c-cluster-fleet',
217
+ }, {
218
+ path: '/c/:cluster/fleet/application',
219
+ component: () => interopDefault(import('@shell/pages/c/_cluster/fleet/application/index.vue')),
220
+ name: 'c-cluster-fleet-application',
221
+ }, {
222
+ path: '/c/:cluster/fleet/application/create',
223
+ component: () => interopDefault(import('@shell/pages/c/_cluster/fleet/application/create.vue')),
224
+ name: 'c-cluster-fleet-application-create',
225
+ }, {
226
+ path: '/c/:cluster/fleet/application/:resource/create',
227
+ component: () => interopDefault(import('@shell/pages/c/_cluster/fleet/application/_resource/create.vue')),
228
+ name: 'c-cluster-fleet-application-resource-create'
229
+ }, {
230
+ path: '/c/:cluster/fleet/application/:resource/:namespace/:id?',
231
+ component: () => interopDefault(import('@shell/pages/c/_cluster/fleet/application/_resource/_id.vue')),
232
+ name: 'c-cluster-fleet-application-resource-namespace-id'
217
233
  }, {
218
234
  path: '/c/:cluster/gatekeeper',
219
235
  component: () => interopDefault(import('@shell/pages/c/_cluster/gatekeeper/index.vue')),
@@ -479,11 +495,13 @@ export default [
479
495
  }, {
480
496
  path: '/c/:cluster/:product/:resource/:id',
481
497
  component: () => interopDefault(import('@shell/pages/c/_cluster/_product/_resource/_id.vue')),
482
- name: 'c-cluster-product-resource-id'
498
+ name: 'c-cluster-product-resource-id',
499
+ meta: { asyncSetup: true }
483
500
  }, {
484
501
  path: '/c/:cluster/:product/:resource/:namespace/:id',
485
502
  component: () => interopDefault(import('@shell/pages/c/_cluster/_product/_resource/_namespace/_id.vue')),
486
- name: 'c-cluster-product-resource-namespace-id'
503
+ name: 'c-cluster-product-resource-namespace-id',
504
+ meta: { asyncSetup: true }
487
505
  }]
488
506
  },
489
507
  {
@@ -0,0 +1,15 @@
1
+ export const SECRET_TYPES = {
2
+ OPAQUE: 'Opaque',
3
+ SERVICE_ACCT: 'kubernetes.io/service-account-token',
4
+ DOCKER_JSON: 'kubernetes.io/dockerconfigjson',
5
+ BASIC: 'kubernetes.io/basic-auth',
6
+ SSH: 'kubernetes.io/ssh-auth',
7
+ TLS: 'kubernetes.io/tls',
8
+ BOOTSTRAP: 'bootstrap.kubernetes.io/token',
9
+ ISTIO_TLS: 'istio.io/key-and-cert',
10
+ HELM_RELEASE: 'helm.sh/release.v1',
11
+ FLEET_CLUSTER: 'fleet.cattle.io/cluster-registration-values',
12
+ CLOUD_CREDENTIAL: 'provisioning.cattle.io/cloud-credential',
13
+ RKE_AUTH_CONFIG: 'rke.cattle.io/auth-config',
14
+ FLEET_OCI_STORAGE: 'fleet.cattle.io/bundle-oci-storage/v1alpha1'
15
+ };
@@ -250,7 +250,8 @@ export const DEFAULT_PERF_SETTING: PerfSettings = {
250
250
  }
251
251
  },
252
252
  serverPagination: {
253
- useDefaultStores: true,
254
- stores: undefined,
253
+ useDefaultStores: true,
254
+ stores: undefined,
255
+ resourceChangesDebounceMs: 4000,
255
256
  }
256
257
  };