@rancher/shell 0.3.4 → 0.3.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 (246) hide show
  1. package/assets/styles/app.scss +1 -1
  2. package/assets/styles/fonts/_fontstack.scss +11 -11
  3. package/assets/styles/vendor/vue-js-modal.scss +3 -3
  4. package/assets/translations/en-us.yaml +92 -22
  5. package/assets/translations/zh-hans.yaml +84 -15
  6. package/babel.config.js +13 -0
  7. package/chart/gatekeeper.vue +77 -0
  8. package/chart/istio.vue +108 -111
  9. package/chart/logging/index.vue +13 -4
  10. package/chart/monitoring/index.vue +15 -5
  11. package/chart/monitoring/steps/uninstall-v1.vue +2 -2
  12. package/chart/rancher-backup/index.vue +10 -3
  13. package/cloud-credential/aws.vue +1 -1
  14. package/cloud-credential/digitalocean.vue +1 -1
  15. package/cloud-credential/gcp.vue +1 -1
  16. package/cloud-credential/generic.vue +2 -2
  17. package/cloud-credential/linode.vue +1 -1
  18. package/cloud-credential/pnap.vue +1 -1
  19. package/components/ActionMenu.vue +3 -4
  20. package/components/AssignTo.vue +1 -1
  21. package/components/AsyncButton.vue +1 -1
  22. package/components/BannerGraphic.vue +1 -1
  23. package/components/ButtonDropdown.vue +2 -3
  24. package/components/ChartPsp.vue +76 -0
  25. package/components/CruResource.vue +6 -2
  26. package/components/DashboardMetrics.vue +12 -10
  27. package/components/DetailText.vue +1 -1
  28. package/components/DisableAuthProviderModal.vue +1 -1
  29. package/components/EmberPage.vue +1 -1
  30. package/components/EtcdInfoBanner.vue +5 -4
  31. package/components/ExplorerMembers.vue +1 -1
  32. package/components/ExplorerProjectsNamespaces.vue +14 -1
  33. package/components/FileDiff.vue +6 -7
  34. package/components/GrafanaDashboard.vue +18 -21
  35. package/components/LazyImage.vue +10 -12
  36. package/components/LogItem.vue +1 -1
  37. package/components/Markdown.vue +1 -1
  38. package/components/PromptRemove.vue +2 -2
  39. package/components/PromptRestore.vue +1 -1
  40. package/components/ResourceDetail/Masthead.vue +16 -0
  41. package/components/ResourceDetail/index.vue +21 -4
  42. package/components/ResourceList/index.vue +1 -1
  43. package/components/ResourceTable.vue +4 -1
  44. package/components/SingleClusterInfo.vue +2 -2
  45. package/components/SortableTable/THead.vue +1 -1
  46. package/components/SortableTable/index.vue +5 -2
  47. package/components/__tests__/AsyncButton.test.ts +3 -1
  48. package/components/__tests__/ChartPsp.test.ts +75 -0
  49. package/components/__tests__/CruResource.test.ts +3 -1
  50. package/components/auth/Principal.vue +1 -1
  51. package/components/fleet/FleetBundles.vue +3 -1
  52. package/components/fleet/FleetClusters.vue +1 -2
  53. package/components/fleet/FleetIntro.vue +9 -1
  54. package/components/fleet/FleetNoWorkspaces.vue +62 -0
  55. package/components/fleet/FleetSummary.vue +7 -1
  56. package/components/form/LabeledSelect.vue +14 -11
  57. package/components/form/MatchExpressions.vue +17 -2
  58. package/components/form/NameNsDescription.vue +31 -45
  59. package/components/form/ResourceSelector.vue +1 -1
  60. package/components/form/SecretSelector.vue +5 -1
  61. package/components/form/ServiceNameSelect.vue +1 -1
  62. package/components/form/SimpleSecretSelector.vue +9 -9
  63. package/components/form/__tests__/LabeledSelect.test.ts +138 -0
  64. package/components/form/__tests__/NameNsDescription.ts +32 -0
  65. package/components/formatter/InternalExternalIP.vue +6 -0
  66. package/components/formatter/InvolvedObjectLink.vue +54 -0
  67. package/components/formatter/Link.vue +20 -4
  68. package/components/formatter/LinkName.vue +6 -1
  69. package/components/formatter/ServiceTargets.vue +1 -1
  70. package/components/nav/Group.vue +2 -2
  71. package/components/nav/NamespaceFilter.vue +15 -11
  72. package/components/nav/TopLevelMenu.vue +2 -4
  73. package/components/nav/Type.vue +1 -1
  74. package/components/nav/WorkspaceSwitcher.vue +46 -5
  75. package/config/labels-annotations.js +17 -0
  76. package/config/product/auth.js +3 -2
  77. package/config/product/explorer.js +11 -4
  78. package/config/product/fleet.js +2 -0
  79. package/config/router.js +414 -0
  80. package/config/table-headers.js +10 -2
  81. package/config/types.js +11 -8
  82. package/config/uiplugins.js +30 -0
  83. package/content/docs/en-us/whats-new.md +10 -0
  84. package/content/docs/zh-hans/whats-new.md +11 -1
  85. package/core/plugin-routes.ts +23 -0
  86. package/creators/app/app.package.json +2 -1
  87. package/creators/app/files/.eslintrc.js +1 -1
  88. package/creators/app/files/babel.config.js +1 -18
  89. package/creators/app/files/vue.config.js +7 -0
  90. package/creators/app/init +5 -5
  91. package/creators/pkg/files/.github/workflows/build-extension.yml +111 -0
  92. package/creators/pkg/init +35 -4
  93. package/creators/update/init +1 -1
  94. package/detail/constraints.gatekeeper.sh.constraint.vue +20 -10
  95. package/detail/fleet.cattle.io.gitrepo.vue +19 -11
  96. package/detail/harvesterhci.io.management.cluster.vue +3 -3
  97. package/detail/provisioning.cattle.io.cluster.vue +54 -12
  98. package/detail/workload/index.vue +3 -3
  99. package/dialog/AddClusterMemberDialog.vue +1 -1
  100. package/dialog/AddProjectMemberDialog.vue +2 -2
  101. package/dialog/AddonConfigConfirmationDialog.vue +27 -15
  102. package/dialog/DiagnosticTimingsDialog.vue +1 -1
  103. package/dialog/ForceMachineRemoveDialog.vue +1 -1
  104. package/dialog/GenericPrompt.vue +18 -6
  105. package/dialog/RotateEncryptionKeyDialog.vue +1 -1
  106. package/dialog/SaveAsRKETemplateDialog.vue +1 -1
  107. package/dialog/ScaleMachineDownDialog.vue +1 -1
  108. package/edit/auth/github.vue +8 -8
  109. package/edit/auth/googleoauth.vue +5 -5
  110. package/edit/auth/ldap/index.vue +1 -1
  111. package/edit/auth/oidc.vue +1 -1
  112. package/edit/auth/saml.vue +1 -1
  113. package/edit/cis.cattle.io.clusterscan.vue +1 -1
  114. package/edit/fleet.cattle.io.clustergroup.vue +6 -4
  115. package/edit/fleet.cattle.io.gitrepo.vue +16 -3
  116. package/edit/helm.cattle.io.projecthelmchart.vue +5 -1
  117. package/edit/management.cattle.io.fleetworkspace.vue +141 -6
  118. package/edit/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +4 -1
  119. package/edit/management.cattle.io.setting.vue +1 -1
  120. package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +2 -2
  121. package/edit/monitoring.coreos.com.receiver/tls.vue +18 -18
  122. package/edit/monitoring.coreos.com.receiver/types/webhook.banner.vue +4 -4
  123. package/edit/monitoring.coreos.com.receiver/types/webhook.vue +1 -1
  124. package/edit/namespace.vue +2 -2
  125. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +126 -45
  126. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
  127. package/edit/provisioning.cattle.io.cluster/MachinePool.vue +10 -0
  128. package/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue +1 -0
  129. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +202 -2
  130. package/edit/provisioning.cattle.io.cluster/rke2.vue +248 -84
  131. package/edit/resources.cattle.io.backup.vue +1 -1
  132. package/edit/service.vue +1 -1
  133. package/edit/storage.k8s.io.storageclass/provisioners/driver.harvesterhci.io.vue +2 -2
  134. package/edit/workload/__tests__/Job.test.ts +3 -1
  135. package/edit/workload/index.vue +8 -3
  136. package/edit/workload/mixins/workload.js +16 -0
  137. package/layouts/default.vue +7 -3
  138. package/list/fleet.cattle.io.bundle.vue +6 -3
  139. package/list/fleet.cattle.io.clusterregistrationtoken.vue +3 -1
  140. package/list/fleet.cattle.io.gitrepo.vue +44 -5
  141. package/list/management.cattle.io.fleetworkspace.vue +45 -0
  142. package/list/node.vue +69 -16
  143. package/list/provisioning.cattle.io.cluster.vue +30 -1
  144. package/machine-config/azure.vue +97 -38
  145. package/middleware/authenticated.js +34 -0
  146. package/mixins/chart.js +73 -2
  147. package/mixins/resource-fetch.js +2 -2
  148. package/models/apps.statefulset.js +28 -0
  149. package/models/cluster/node.js +23 -2
  150. package/models/cluster.x-k8s.io.machine.js +4 -2
  151. package/models/clusterroletemplatebinding.js +7 -0
  152. package/models/constraints.gatekeeper.sh.constraint.js +9 -0
  153. package/models/fleet.cattle.io.cluster.js +19 -10
  154. package/models/fleet.cattle.io.gitrepo.js +7 -2
  155. package/models/management.cattle.io.cluster.js +1 -1
  156. package/models/management.cattle.io.fleetworkspace.js +12 -0
  157. package/models/management.cattle.io.gitreporestriction.js +5 -0
  158. package/models/management.cattle.io.podsecurityadmissionconfigurationtemplate.js +3 -0
  159. package/models/provisioning.cattle.io.cluster.js +7 -5
  160. package/nuxt/App.js +210 -0
  161. package/nuxt/axios.js +186 -0
  162. package/nuxt/client.js +817 -0
  163. package/nuxt/components/nuxt-build-indicator.vue +143 -0
  164. package/nuxt/components/nuxt-child.js +122 -0
  165. package/nuxt/components/nuxt-error.vue +98 -0
  166. package/nuxt/components/nuxt-link.client.js +98 -0
  167. package/nuxt/components/nuxt-link.server.js +16 -0
  168. package/nuxt/components/nuxt-loading.vue +154 -0
  169. package/nuxt/components/nuxt.js +101 -0
  170. package/nuxt/cookie-universal-nuxt.js +9 -0
  171. package/nuxt/empty.js +1 -0
  172. package/nuxt/index.js +365 -0
  173. package/nuxt/jsonp.js +82 -0
  174. package/nuxt/loading.html +39 -0
  175. package/nuxt/middleware.js +12 -0
  176. package/nuxt/mixins/fetch.client.js +90 -0
  177. package/nuxt/mixins/fetch.server.js +69 -0
  178. package/nuxt/portal-vue.js +4 -0
  179. package/nuxt/server.js +312 -0
  180. package/nuxt/store.js +178 -0
  181. package/nuxt/utils.js +630 -0
  182. package/nuxt/views/app.template.html +9 -0
  183. package/nuxt/views/error.html +23 -0
  184. package/package.json +5 -9
  185. package/pages/auth/setup.vue +2 -2
  186. package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +33 -0
  187. package/pages/c/_cluster/apps/charts/chart.vue +4 -4
  188. package/pages/c/_cluster/apps/charts/install.helpers.js +26 -0
  189. package/pages/c/_cluster/apps/charts/install.vue +40 -66
  190. package/pages/c/_cluster/explorer/EventsTable.vue +5 -19
  191. package/pages/c/_cluster/explorer/index.vue +29 -25
  192. package/pages/c/_cluster/explorer/tools/index.vue +8 -8
  193. package/pages/c/_cluster/fleet/index.vue +95 -34
  194. package/pages/c/_cluster/gatekeeper/index.vue +1 -1
  195. package/pages/c/_cluster/istio/index.vue +5 -5
  196. package/pages/c/_cluster/manager/cloudCredential/index.vue +1 -1
  197. package/pages/c/_cluster/monitoring/index.vue +7 -0
  198. package/pages/c/_cluster/uiplugins/InstallDialog.vue +8 -8
  199. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +20 -7
  200. package/pages/c/_cluster/uiplugins/index.vue +49 -17
  201. package/pages/home.vue +9 -4
  202. package/pages/index.vue +10 -1
  203. package/plugins/clean-html-directive.js +31 -0
  204. package/plugins/dashboard-store/actions.js +32 -9
  205. package/plugins/dashboard-store/mutations.js +5 -2
  206. package/plugins/dashboard-store/resource-class.js +8 -1
  207. package/plugins/steve/mutations.js +3 -2
  208. package/plugins/steve/steve-description-class.js +5 -1
  209. package/plugins/steve/subscribe.js +63 -54
  210. package/plugins/steve-create-worker.js +14 -0
  211. package/promptRemove/management.cattle.io.globalrole.vue +2 -2
  212. package/promptRemove/management.cattle.io.project.vue +2 -2
  213. package/promptRemove/management.cattle.io.roletemplate.vue +2 -2
  214. package/promptRemove/pod.vue +1 -1
  215. package/public/index.html +65 -0
  216. package/rancher-components/components/Banner/Banner.test.ts +9 -1
  217. package/rancher-components/components/Banner/Banner.vue +1 -1
  218. package/rancher-components/components/Form/Checkbox/Checkbox.vue +2 -0
  219. package/rancher-components/components/Form/Radio/RadioButton.vue +1 -1
  220. package/scripts/build-pkg.sh +1 -0
  221. package/scripts/clean +6 -0
  222. package/scripts/extension/bundle +58 -0
  223. package/scripts/extension/helmpatch +89 -0
  224. package/scripts/extension/publish +314 -0
  225. package/scripts/test-plugins-build.sh +4 -0
  226. package/store/__tests__/index.test.ts +110 -0
  227. package/store/index.js +145 -58
  228. package/store/type-map.js +5 -1
  229. package/tsconfig.default.json +36 -0
  230. package/tsconfig.json +24 -0
  231. package/types/shell/index.d.ts +420 -343
  232. package/utils/__tests__/string.test.ts +12 -0
  233. package/utils/auth.js +65 -0
  234. package/utils/monitoring.js +2 -1
  235. package/utils/position.js +5 -8
  236. package/utils/router.scrollBehavior.js +80 -0
  237. package/utils/select.js +1 -3
  238. package/utils/socket.js +1 -0
  239. package/utils/string.js +13 -0
  240. package/utils/time.js +9 -0
  241. package/vue.config.js +679 -0
  242. package/chart/rancher-alerting-drivers.vue +0 -53
  243. package/chart/rancher-gatekeeper.vue +0 -37
  244. package/creators/app/files/nuxt.config.js +0 -6
  245. package/models/management.cattle.io.podsecurityadmissionconfigurationtemplate.ts +0 -4
  246. package/nuxt.config.js +0 -798
@@ -0,0 +1,33 @@
1
+ import { ignoreVariables } from '@shell/pages/c/_cluster/apps/charts/install.helpers';
2
+
3
+ describe('fX: ignoreVariables', () => {
4
+ describe.each([['epinio', 'global.rbac.pspEnabled']])('given chart %p with path %p', (name, path) => {
5
+ it.each([
6
+ ['v1.24.11+rke2r1'],
7
+ ])('should not return variable path list if cluster has k8s version %p', (version) => {
8
+ const cluster = { kubernetesVersion: version };
9
+ const data = {
10
+ chart: { name },
11
+ values: { global: { rbac: { pspEnabled: undefined } } }
12
+ };
13
+
14
+ const paths = ignoreVariables(cluster, data);
15
+
16
+ expect(paths).toStrictEqual([]);
17
+ });
18
+
19
+ it.each([
20
+ ['v1.25.11+rke2r1'],
21
+ ])('should return questions if cluster has k8s version %p', (version) => {
22
+ const cluster = { kubernetesVersion: version };
23
+ const data = {
24
+ chart: { name },
25
+ values: { global: { rbac: { pspEnabled: undefined } } }
26
+ };
27
+
28
+ const paths = ignoreVariables(cluster, data);
29
+
30
+ expect(paths).toStrictEqual([path]);
31
+ });
32
+ });
33
+ });
@@ -159,14 +159,14 @@ export default {
159
159
  v-if="osWarning"
160
160
  color="error"
161
161
  >
162
- <span v-html="osWarning" />
162
+ <span v-clean-html="osWarning" />
163
163
  </Banner>
164
164
  <Banner
165
165
  v-for="msg in requires"
166
166
  :key="msg"
167
167
  color="error"
168
168
  >
169
- <span v-html="msg" />
169
+ <span v-clean-html="msg" />
170
170
  </Banner>
171
171
 
172
172
  <Banner
@@ -174,14 +174,14 @@ export default {
174
174
  :key="msg"
175
175
  color="warning"
176
176
  >
177
- <span v-html="msg" />
177
+ <span v-clean-html="msg" />
178
178
  </Banner>
179
179
 
180
180
  <Banner
181
181
  v-if="targetedAppWarning"
182
182
  color="warning"
183
183
  >
184
- <span v-html="targetedAppWarning" />
184
+ <span v-clean-html="targetedAppWarning" />
185
185
  </Banner>
186
186
  </div>
187
187
  <div
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Return list of variables to filter chart questions
3
+ */
4
+ export const ignoreVariables = (cluster, data) => {
5
+ const pspChartMap = {
6
+ epinio: 'global.rbac.pspEnabled',
7
+ longhorn: 'enablePSP',
8
+ 'rancher-alerting-drivers': 'global.cattle.psp.enabled',
9
+ neuvector: 'global.cattle.psp.enabled',
10
+ 'prometheus-federator': 'global.rbac.pspEnabled',
11
+ };
12
+ const path = pspChartMap[data.chart.name];
13
+
14
+ if (path) {
15
+ const clusterVersion = cluster?.kubernetesVersion || '';
16
+ const version = clusterVersion.match(/\d+/g);
17
+ const isRequiredVersion = version?.length ? +version[0] === 1 && +version[1] < 25 : false;
18
+
19
+ // Provide path as question variable to be ignored
20
+ if (!isRequiredVersion) {
21
+ return [path];
22
+ }
23
+ }
24
+
25
+ return [];
26
+ };
@@ -32,6 +32,7 @@ import { CATALOG as CATALOG_ANNOTATIONS, PROJECT } from '@shell/config/labels-an
32
32
 
33
33
  import { exceptionToErrorsArray } from '@shell/utils/error';
34
34
  import { clone, diff, get, set } from '@shell/utils/object';
35
+ import { ignoreVariables } from './install.helpers';
35
36
  import { findBy, insertAt } from '@shell/utils/array';
36
37
  import Vue from 'vue';
37
38
  import { saferDump } from '@shell/utils/create-yaml';
@@ -92,6 +93,7 @@ export default {
92
93
  */
93
94
  await this.fetchChart();
94
95
 
96
+ await this.fetchAutoInstallInfo();
95
97
  this.errors = [];
96
98
 
97
99
  // If the chart doesn't contain system `systemDefaultRegistry` properties there's no point applying them
@@ -360,6 +362,7 @@ export default {
360
362
  migratedApp: false,
361
363
  defaultCmdOpts,
362
364
  customCmdOpts: { ...defaultCmdOpts },
365
+ autoInstallInfo: [],
363
366
 
364
367
  nameDisabled: false,
365
368
 
@@ -425,6 +428,13 @@ export default {
425
428
  ...mapGetters({ inStore: 'catalog/inStore', features: 'features/get' }),
426
429
  mcm: mapFeature(MULTI_CLUSTER),
427
430
 
431
+ /**
432
+ * Return list of variables to filter chart questions
433
+ */
434
+ ignoreVariables() {
435
+ return ignoreVariables(this.currentCluster, this.versionInfo);
436
+ },
437
+
428
438
  namespaceIsNew() {
429
439
  const all = this.$store.getters['cluster/all'](NAMESPACE);
430
440
  const want = this.value?.metadata?.namespace;
@@ -799,7 +809,7 @@ export default {
799
809
  }) : {};
800
810
 
801
811
  if (provCluster.isRke2) { // isRke2 returns true for both RKE2 and K3s clusters.
802
- const agentConfig = provCluster.spec.rkeConfig.machineSelectorConfig.find(x => !x.machineLabelSelector).config;
812
+ const agentConfig = provCluster.spec?.rkeConfig?.machineSelectorConfig?.find(x => !x.machineLabelSelector).config;
803
813
 
804
814
  // If a cluster scoped registry exists,
805
815
  // it should be used by default.
@@ -812,7 +822,7 @@ export default {
812
822
  if (provCluster.isRke1) {
813
823
  // For RKE1 clusters, the cluster scoped private registry is on the management
814
824
  // cluster, not the provisioning cluster.
815
- const rke1Registries = mgmCluster.spec.rancherKubernetesEngineConfig.privateRegistries;
825
+ const rke1Registries = mgmCluster.spec?.rancherKubernetesEngineConfig?.privateRegistries;
816
826
 
817
827
  if (rke1Registries?.length > 0) {
818
828
  const defaultRegistry = rke1Registries.find((registry) => {
@@ -844,10 +854,8 @@ export default {
844
854
  },
845
855
 
846
856
  async loadValuesComponent() {
847
- // TODO: Remove RELEASE_NAME. This is only in until the component annotation is added to the OPA Gatekeeper chart.
848
-
849
857
  // The const component is a string, for example, 'monitoring'.
850
- const component = this.version?.annotations?.[CATALOG_ANNOTATIONS.COMPONENT] || this.version?.annotations?.[CATALOG_ANNOTATIONS.RELEASE_NAME];
858
+ const component = this.version?.annotations?.[CATALOG_ANNOTATIONS.COMPONENT];
851
859
 
852
860
  // Load a values component for the UI if it is named in the Helm chart.
853
861
  if ( component ) {
@@ -872,7 +880,7 @@ export default {
872
880
  },
873
881
 
874
882
  async loadChartSteps() {
875
- const component = this.version?.annotations?.[CATALOG_ANNOTATIONS.COMPONENT] || this.version?.annotations?.[CATALOG_ANNOTATIONS.RELEASE_NAME];
883
+ const component = this.version?.annotations?.[CATALOG_ANNOTATIONS.COMPONENT];
876
884
 
877
885
  if ( component ) {
878
886
  const steps = await this.$store.getters['catalog/chartSteps'](component);
@@ -1167,56 +1175,7 @@ export default {
1167
1175
 
1168
1176
  const more = [];
1169
1177
 
1170
- /*
1171
- An example value for auto is ["rancher-monitoring-crd=match"].
1172
- It is an array of chart names that lets Rancher know of other
1173
- charts that should be auto-installed at the same time.
1174
- */
1175
- let auto = (this.version?.annotations?.[CATALOG_ANNOTATIONS.AUTO_INSTALL] || '').split(/\s*,\s*/).filter(x => !!x).reverse();
1176
-
1177
- for ( const constraint of auto ) {
1178
- const provider = this.$store.getters['catalog/versionSatisfying']({
1179
- constraint,
1180
- repoName: this.chart.repoName,
1181
- repoType: this.chart.repoType,
1182
- chartVersion: this.version.version,
1183
- });
1184
-
1185
- /*
1186
- An example return value for "provider":
1187
- [
1188
- {
1189
- "name": "rancher-monitoring-crd",
1190
- "version": "100.1.3+up19.0.3",
1191
- "description": "Installs the CRDs for rancher-monitoring.",
1192
- "apiVersion": "v1",
1193
- "annotations": {
1194
- "catalog.cattle.io/certified": "rancher",
1195
- "catalog.cattle.io/hidden": "true",
1196
- "catalog.cattle.io/namespace": "cattle-monitoring-system",
1197
- "catalog.cattle.io/release-name": "rancher-monitoring-crd"
1198
- },
1199
- "type": "application",
1200
- "urls": [
1201
- "https://192.168.0.18:8005/k8s/clusters/c-m-hhpg69fv/v1/catalog.cattle.io.clusterrepos/rancher-charts?chartName=rancher-monitoring-crd&link=chart&version=100.1.3%2Bup19.0.3"
1202
- ],
1203
- "created": "2022-04-27T10:04:18.343124-07:00",
1204
- "digest": "ecf07ba23a9cdaa7ffbbb14345d94ea1240b7f3b8e0ce9be4640e3e585c484e2",
1205
- "key": "cluster/rancher-charts/rancher-monitoring-crd/100.1.3+up19.0.3",
1206
- "repoType": "cluster",
1207
- "repoName": "rancher-charts"
1208
- }
1209
- ]
1210
- */
1211
-
1212
- if ( provider ) {
1213
- more.push(provider);
1214
- } else {
1215
- errors.push(`This chart requires ${ constraint } but no matching chart was found`);
1216
- }
1217
- }
1218
-
1219
- auto = (this.version?.annotations?.[CATALOG_ANNOTATIONS.AUTO_INSTALL_GVK] || '').split(/\s*,\s*/).filter(x => !!x).reverse();
1178
+ const auto = (this.version?.annotations?.[CATALOG_ANNOTATIONS.AUTO_INSTALL_GVK] || '').split(/\s*,\s*/).filter(x => !!x).reverse();
1220
1179
 
1221
1180
  for ( const gvr of auto ) {
1222
1181
  const provider = this.$store.getters['catalog/versionProviding']({
@@ -1232,9 +1191,20 @@ export default {
1232
1191
  }
1233
1192
  }
1234
1193
 
1194
+ /* Chart custom UI components have the ability to edit CRD chart values
1195
+ apply those values in addition to the global values being copied over frm the primary chart
1196
+ */
1197
+ for (const versionInfo of this.autoInstallInfo) {
1198
+ out.charts.unshift({
1199
+ chartName: versionInfo.chart.name,
1200
+ version: versionInfo.chart.version,
1201
+ releaseName: versionInfo.chart.annotations[CATALOG_ANNOTATIONS.RELEASE_NAME] || chart.name,
1202
+ projectId: this.project,
1203
+ values: merge(versionInfo.values, this.addGlobalValuesTo({ global: values.global }))
1204
+ });
1205
+ }
1235
1206
  /*
1236
- 'more' contains the values for the CRD chart, which needs the same
1237
- global and cattle values as the chart. It could also contain additional
1207
+ 'more' contains additional
1238
1208
  charts that may not be CRD charts but are also meant to be installed at
1239
1209
  the same time.
1240
1210
  */
@@ -1368,7 +1338,7 @@ export default {
1368
1338
  :key="msg"
1369
1339
  color="error"
1370
1340
  >
1371
- <span v-html="msg" />
1341
+ <span v-clean-html="msg" />
1372
1342
  </Banner>
1373
1343
 
1374
1344
  <Banner
@@ -1376,7 +1346,7 @@ export default {
1376
1346
  :key="msg"
1377
1347
  color="warning"
1378
1348
  >
1379
- <span v-html="msg" />
1349
+ <span v-clean-html="msg" />
1380
1350
  </Banner>
1381
1351
  </div>
1382
1352
  <div
@@ -1479,7 +1449,7 @@ export default {
1479
1449
  v-if="isNamespaceNew && value.metadata.namespace.length"
1480
1450
  color="info"
1481
1451
  >
1482
- <div v-html="t('catalog.install.steps.basics.createNamespace', {namespace: value.metadata.namespace}, true) " />
1452
+ <div v-clean-html="t('catalog.install.steps.basics.createNamespace', {namespace: value.metadata.namespace}, true) " />
1483
1453
  </Banner>
1484
1454
  </div>
1485
1455
  </template>
@@ -1557,7 +1527,7 @@ export default {
1557
1527
  </div>
1558
1528
  <div class="scroll__container">
1559
1529
  <div class="scroll__content">
1560
- <!-- Values (as Custom Component) -->
1530
+ <!-- Values (as Custom Component in ./shell/charts/) -->
1561
1531
  <template v-if="valuesComponent && showValuesComponent">
1562
1532
  <Tabbed
1563
1533
  v-if="componentHasTabs"
@@ -1576,6 +1546,7 @@ export default {
1576
1546
  :existing="existing"
1577
1547
  :version="version"
1578
1548
  :version-info="versionInfo"
1549
+ :auto-install-info="autoInstallInfo"
1579
1550
  @warn="e=>errors.push(e)"
1580
1551
  @register-before-hook="registerBeforeHook"
1581
1552
  @register-after-hook="registerAfterHook"
@@ -1592,13 +1563,15 @@ export default {
1592
1563
  :existing="existing"
1593
1564
  :version="version"
1594
1565
  :version-info="versionInfo"
1566
+ :auto-install-info="autoInstallInfo"
1595
1567
  @warn="e=>errors.push(e)"
1596
1568
  @register-before-hook="registerBeforeHook"
1597
1569
  @register-after-hook="registerAfterHook"
1598
1570
  />
1599
1571
  </template>
1600
1572
  </template>
1601
- <!-- Values (as Questions) -->
1573
+
1574
+ <!-- Values (as Questions, abstracted component based on question.yaml configuration from repositories) -->
1602
1575
  <Tabbed
1603
1576
  v-else-if="hasQuestions && showQuestions"
1604
1577
  ref="tabs"
@@ -1612,6 +1585,7 @@ export default {
1612
1585
  :in-store="inStore"
1613
1586
  :mode="mode"
1614
1587
  :source="versionInfo"
1588
+ :ignore-variables="ignoreVariables"
1615
1589
  tabbed="multiple"
1616
1590
  :target-namespace="targetNamespace"
1617
1591
  />
@@ -1802,17 +1776,17 @@ export default {
1802
1776
  {{ t('catalog.install.error.legacy.label', { legacyType: mcapp ? legacyDefs.mcm : legacyDefs.legacy }, true) }}
1803
1777
  </span>
1804
1778
  <template v-if="!legacyEnabled">
1805
- <span v-html="t('catalog.install.error.legacy.enableLegacy.prompt', true)" />
1779
+ <span v-clean-html="t('catalog.install.error.legacy.enableLegacy.prompt', true)" />
1806
1780
  <nuxt-link :to="legacyFeatureRoute">
1807
1781
  {{ t('catalog.install.error.legacy.enableLegacy.goto') }}
1808
1782
  </nuxt-link>
1809
1783
  </template>
1810
1784
  <template v-else-if="mcapp">
1811
- <span v-html="t('catalog.install.error.legacy.mcmNotSupported')" />
1785
+ <span v-clean-html="t('catalog.install.error.legacy.mcmNotSupported')" />
1812
1786
  </template>
1813
1787
  <template v-else>
1814
1788
  <nuxt-link :to="legacyAppRoute">
1815
- <span v-html="t('catalog.install.error.legacy.navigate')" />
1789
+ <span v-clean-html="t('catalog.install.error.legacy.navigate')" />
1816
1790
  </nuxt-link>
1817
1791
  </template>
1818
1792
  </Banner>
@@ -1,7 +1,7 @@
1
1
  <script>
2
2
 
3
3
  import SortableTable from '@shell/components/SortableTable';
4
- import { REASON } from '@shell/config/table-headers';
4
+ import { MESSAGE, NAME, OBJECT, REASON } from '@shell/config/table-headers';
5
5
  import { EVENT } from '@shell/config/types';
6
6
  import { fetchClusterResources } from './explorer-utils';
7
7
 
@@ -21,14 +21,9 @@ export default {
21
21
 
22
22
  const eventHeaders = [
23
23
  reason,
24
- {
25
- name: 'resource',
26
- label: 'Resource',
27
- labelKey: 'clusterIndexPage.sections.events.resource.label',
28
- value: 'displayInvolvedObject',
29
- sort: ['involvedObject.kind', 'involvedObject.name'],
30
- canBeVariable: true,
31
- },
24
+ OBJECT,
25
+ MESSAGE,
26
+ NAME,
32
27
  {
33
28
  name: 'date',
34
29
  label: 'Date',
@@ -61,14 +56,5 @@ export default {
61
56
  :paging="true"
62
57
  :rows-per-page="10"
63
58
  default-sort-by="date"
64
- >
65
- <template #cell:resource="{row, value}">
66
- <n-link :to="row.detailLocation">
67
- {{ value }}
68
- </n-link>
69
- <div v-if="row.message">
70
- {{ row.displayMessage }}
71
- </div>
72
- </template>
73
- </SortableTable>
59
+ />
74
60
  </template>
@@ -82,27 +82,29 @@ export default {
82
82
  fetch() {
83
83
  fetchClusterResources(this.$store, NODE);
84
84
 
85
- setPromiseResult(
86
- allDashboardsExist(this.$store, this.currentCluster.id, [CLUSTER_METRICS_DETAIL_URL, CLUSTER_METRICS_SUMMARY_URL]),
87
- this,
88
- 'showClusterMetrics',
89
- `Determine cluster metrics`
90
- );
91
- setPromiseResult(
92
- allDashboardsExist(this.$store, this.currentCluster.id, [K8S_METRICS_DETAIL_URL, K8S_METRICS_SUMMARY_URL]),
93
- this,
94
- 'showK8sMetrics',
95
- `Determine k8s metrics`
96
- );
97
- setPromiseResult(
98
- allDashboardsExist(this.$store, this.currentCluster.id, [ETCD_METRICS_DETAIL_URL, ETCD_METRICS_SUMMARY_URL]),
99
- this,
100
- 'showEtcdMetrics',
101
- `Determine etcd metrics`
102
- );
103
-
104
- if (this.currentCluster.isLocal) {
105
- this.$store.dispatch('management/findAll', { type: MANAGEMENT.NODE });
85
+ if (this.currentCluster) {
86
+ setPromiseResult(
87
+ allDashboardsExist(this.$store, this.currentCluster.id, [CLUSTER_METRICS_DETAIL_URL, CLUSTER_METRICS_SUMMARY_URL]),
88
+ this,
89
+ 'showClusterMetrics',
90
+ `Determine cluster metrics`
91
+ );
92
+ setPromiseResult(
93
+ allDashboardsExist(this.$store, this.currentCluster.id, [K8S_METRICS_DETAIL_URL, K8S_METRICS_SUMMARY_URL]),
94
+ this,
95
+ 'showK8sMetrics',
96
+ `Determine k8s metrics`
97
+ );
98
+ setPromiseResult(
99
+ allDashboardsExist(this.$store, this.currentCluster.id, [ETCD_METRICS_DETAIL_URL, ETCD_METRICS_SUMMARY_URL]),
100
+ this,
101
+ 'showEtcdMetrics',
102
+ `Determine etcd metrics`
103
+ );
104
+
105
+ if (this.currentCluster.isLocal) {
106
+ this.$store.dispatch('management/findAll', { type: MANAGEMENT.NODE });
107
+ }
106
108
  }
107
109
  },
108
110
 
@@ -184,7 +186,7 @@ export default {
184
186
  displayProvider() {
185
187
  const other = 'other';
186
188
 
187
- let provider = this.currentCluster.status.provider || other;
189
+ let provider = this.currentCluster?.status?.provider || other;
188
190
 
189
191
  if (provider === 'rke.windows') {
190
192
  provider = 'rkeWindows';
@@ -444,11 +446,11 @@ export default {
444
446
  </div>
445
447
  <div>
446
448
  <label>{{ t('glance.version') }}: </label>
449
+ <span>{{ currentCluster.kubernetesVersionBase }}</span>
447
450
  <span
448
451
  v-if="currentCluster.kubernetesVersionExtension"
449
- style="font-size: 0.5em"
452
+ style="font-size: 0.75em"
450
453
  >{{ currentCluster.kubernetesVersionExtension }}</span>
451
- <span>{{ currentCluster.kubernetesVersionBase }}</span>
452
454
  </div>
453
455
  <div>
454
456
  <label>{{ t('glance.created') }}: </label>
@@ -602,6 +604,8 @@ export default {
602
604
  </div>
603
605
  <Tabbed
604
606
  v-if="hasMetricsTabs"
607
+ default-tab="cluster-metrics"
608
+ :use-hash="false"
605
609
  class="mt-30"
606
610
  >
607
611
  <Tab
@@ -705,7 +709,7 @@ export default {
705
709
  }
706
710
 
707
711
  .etcd-metrics ::v-deep .external-link {
708
- top: -102px;
712
+ top: -107px;
709
713
  }
710
714
 
711
715
  .cluster-tools-tip {
@@ -416,7 +416,7 @@ export default {
416
416
  <template>
417
417
  <Loading v-if="$fetchState.pending" />
418
418
  <div v-else-if="options.length">
419
- <h1 v-html="t('catalog.tools.header')" />
419
+ <h1 v-clean-html="t('catalog.tools.header')" />
420
420
  <TypeDescription
421
421
  v-if="!legacyEnabled"
422
422
  resource="chart"
@@ -466,8 +466,8 @@ export default {
466
466
  </div>
467
467
  <div class="description">
468
468
  <div
469
+ v-clean-html="opt.chart.chartDescription"
469
470
  class="description-content"
470
- v-html="opt.chart.chartDescription"
471
471
  />
472
472
  </div>
473
473
  <div
@@ -483,16 +483,16 @@ export default {
483
483
  <div class="action">
484
484
  <template v-if="opt.blocked">
485
485
  <button
486
+ v-clean-html="t('catalog.tools.action.install')"
486
487
  disabled="true"
487
488
  class="btn btn-sm role-primary"
488
- v-html="t('catalog.tools.action.install')"
489
489
  />
490
490
  </template>
491
491
  <template v-else-if="opt.app && opt.chart.legacy">
492
492
  <button
493
+ v-clean-html="t('catalog.tools.action.manage')"
493
494
  class="btn btn-sm role-secondary"
494
495
  @click="openV1Tool(opt.chart.legacyPage)"
495
- v-html="t('catalog.tools.action.manage')"
496
496
  />
497
497
  </template>
498
498
  <template v-else-if="opt.app && opt.upgradeAvailable && !opt.chart.legacy">
@@ -503,9 +503,9 @@ export default {
503
503
  <i class="icon icon-delete icon-lg" />
504
504
  </button>
505
505
  <button
506
+ v-clean-html="t('catalog.tools.action.upgrade')"
506
507
  class="btn btn-sm role-secondary"
507
508
  @click="edit(opt.app, opt.app.upgradeAvailable)"
508
- v-html="t('catalog.tools.action.upgrade')"
509
509
  />
510
510
  </template>
511
511
  <template v-else-if="opt.app">
@@ -516,23 +516,23 @@ export default {
516
516
  <i class="icon icon-delete icon-lg" />
517
517
  </button>
518
518
  <button
519
+ v-clean-html="t('catalog.tools.action.edit')"
519
520
  class="btn btn-sm role-secondary"
520
521
  @click="edit(opt.app)"
521
- v-html="t('catalog.tools.action.edit')"
522
522
  />
523
523
  </template>
524
524
  <template v-else-if="opt.chart.legacy">
525
525
  <button
526
+ v-clean-html="t('catalog.tools.action.install')"
526
527
  class="btn btn-sm role-primary"
527
528
  @click="openV1Tool(opt.chart.legacyPage)"
528
- v-html="t('catalog.tools.action.install')"
529
529
  />
530
530
  </template>
531
531
  <template v-else>
532
532
  <button
533
+ v-clean-html="t('catalog.tools.action.install')"
533
534
  class="btn btn-sm role-primary"
534
535
  @click="install(opt.chart)"
535
- v-html="t('catalog.tools.action.install')"
536
536
  />
537
537
  </template>
538
538
  </div>