@rancher/shell 0.3.3 → 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 (249) 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 +15 -2
  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-helpers.js +64 -61
  86. package/core/plugin-routes.ts +23 -0
  87. package/creators/app/app.package.json +2 -1
  88. package/creators/app/files/.eslintrc.js +1 -1
  89. package/creators/app/files/babel.config.js +1 -18
  90. package/creators/app/files/vue.config.js +7 -0
  91. package/creators/app/init +5 -5
  92. package/creators/pkg/files/.github/workflows/build-extension.yml +111 -0
  93. package/creators/pkg/init +35 -4
  94. package/creators/update/init +1 -1
  95. package/detail/constraints.gatekeeper.sh.constraint.vue +20 -10
  96. package/detail/fleet.cattle.io.gitrepo.vue +19 -11
  97. package/detail/harvesterhci.io.management.cluster.vue +3 -3
  98. package/detail/provisioning.cattle.io.cluster.vue +54 -12
  99. package/detail/workload/index.vue +3 -3
  100. package/dialog/AddClusterMemberDialog.vue +1 -1
  101. package/dialog/AddProjectMemberDialog.vue +2 -2
  102. package/dialog/AddonConfigConfirmationDialog.vue +27 -15
  103. package/dialog/DiagnosticTimingsDialog.vue +1 -1
  104. package/dialog/ForceMachineRemoveDialog.vue +1 -1
  105. package/dialog/GenericPrompt.vue +18 -6
  106. package/dialog/RotateEncryptionKeyDialog.vue +1 -1
  107. package/dialog/SaveAsRKETemplateDialog.vue +1 -1
  108. package/dialog/ScaleMachineDownDialog.vue +1 -1
  109. package/edit/auth/github.vue +8 -8
  110. package/edit/auth/googleoauth.vue +5 -5
  111. package/edit/auth/ldap/index.vue +1 -1
  112. package/edit/auth/oidc.vue +1 -1
  113. package/edit/auth/saml.vue +1 -1
  114. package/edit/cis.cattle.io.clusterscan.vue +1 -1
  115. package/edit/fleet.cattle.io.clustergroup.vue +6 -4
  116. package/edit/fleet.cattle.io.gitrepo.vue +16 -3
  117. package/edit/helm.cattle.io.projecthelmchart.vue +5 -1
  118. package/edit/management.cattle.io.fleetworkspace.vue +141 -6
  119. package/edit/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +4 -1
  120. package/edit/management.cattle.io.setting.vue +1 -1
  121. package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +2 -2
  122. package/edit/monitoring.coreos.com.receiver/tls.vue +18 -18
  123. package/edit/monitoring.coreos.com.receiver/types/webhook.banner.vue +4 -4
  124. package/edit/monitoring.coreos.com.receiver/types/webhook.vue +1 -1
  125. package/edit/namespace.vue +2 -2
  126. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +126 -45
  127. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
  128. package/edit/provisioning.cattle.io.cluster/MachinePool.vue +10 -0
  129. package/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue +1 -0
  130. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +202 -2
  131. package/edit/provisioning.cattle.io.cluster/rke2.vue +248 -84
  132. package/edit/resources.cattle.io.backup.vue +1 -1
  133. package/edit/service.vue +1 -1
  134. package/edit/storage.k8s.io.storageclass/provisioners/driver.harvesterhci.io.vue +2 -2
  135. package/edit/workload/__tests__/Job.test.ts +3 -1
  136. package/edit/workload/index.vue +8 -3
  137. package/edit/workload/mixins/workload.js +16 -0
  138. package/layouts/default.vue +7 -3
  139. package/list/fleet.cattle.io.bundle.vue +6 -3
  140. package/list/fleet.cattle.io.clusterregistrationtoken.vue +3 -1
  141. package/list/fleet.cattle.io.gitrepo.vue +44 -5
  142. package/list/management.cattle.io.fleetworkspace.vue +45 -0
  143. package/list/node.vue +69 -16
  144. package/list/provisioning.cattle.io.cluster.vue +30 -1
  145. package/machine-config/azure.vue +97 -38
  146. package/middleware/authenticated.js +34 -0
  147. package/mixins/chart.js +73 -2
  148. package/mixins/resource-fetch.js +2 -2
  149. package/models/apps.statefulset.js +28 -0
  150. package/models/cluster/node.js +23 -2
  151. package/models/cluster.x-k8s.io.machine.js +4 -2
  152. package/models/clusterroletemplatebinding.js +7 -0
  153. package/models/constraints.gatekeeper.sh.constraint.js +9 -0
  154. package/models/fleet.cattle.io.cluster.js +19 -10
  155. package/models/fleet.cattle.io.gitrepo.js +7 -2
  156. package/models/management.cattle.io.cluster.js +1 -1
  157. package/models/management.cattle.io.fleetworkspace.js +12 -0
  158. package/models/management.cattle.io.gitreporestriction.js +5 -0
  159. package/models/management.cattle.io.podsecurityadmissionconfigurationtemplate.js +3 -0
  160. package/models/namespace.js +5 -5
  161. package/models/provisioning.cattle.io.cluster.js +7 -5
  162. package/nuxt/App.js +210 -0
  163. package/nuxt/axios.js +186 -0
  164. package/nuxt/client.js +817 -0
  165. package/nuxt/components/nuxt-build-indicator.vue +143 -0
  166. package/nuxt/components/nuxt-child.js +122 -0
  167. package/nuxt/components/nuxt-error.vue +98 -0
  168. package/nuxt/components/nuxt-link.client.js +98 -0
  169. package/nuxt/components/nuxt-link.server.js +16 -0
  170. package/nuxt/components/nuxt-loading.vue +154 -0
  171. package/nuxt/components/nuxt.js +101 -0
  172. package/nuxt/cookie-universal-nuxt.js +9 -0
  173. package/nuxt/empty.js +1 -0
  174. package/nuxt/index.js +365 -0
  175. package/nuxt/jsonp.js +82 -0
  176. package/nuxt/loading.html +39 -0
  177. package/nuxt/middleware.js +12 -0
  178. package/nuxt/mixins/fetch.client.js +90 -0
  179. package/nuxt/mixins/fetch.server.js +69 -0
  180. package/nuxt/portal-vue.js +4 -0
  181. package/nuxt/server.js +312 -0
  182. package/nuxt/store.js +178 -0
  183. package/nuxt/utils.js +630 -0
  184. package/nuxt/views/app.template.html +9 -0
  185. package/nuxt/views/error.html +23 -0
  186. package/package.json +5 -9
  187. package/pages/auth/setup.vue +2 -2
  188. package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +33 -0
  189. package/pages/c/_cluster/apps/charts/chart.vue +4 -4
  190. package/pages/c/_cluster/apps/charts/install.helpers.js +26 -0
  191. package/pages/c/_cluster/apps/charts/install.vue +40 -66
  192. package/pages/c/_cluster/explorer/EventsTable.vue +5 -19
  193. package/pages/c/_cluster/explorer/index.vue +29 -25
  194. package/pages/c/_cluster/explorer/tools/index.vue +8 -8
  195. package/pages/c/_cluster/fleet/index.vue +95 -34
  196. package/pages/c/_cluster/gatekeeper/index.vue +1 -1
  197. package/pages/c/_cluster/istio/index.vue +5 -5
  198. package/pages/c/_cluster/manager/cloudCredential/index.vue +1 -1
  199. package/pages/c/_cluster/monitoring/index.vue +7 -0
  200. package/pages/c/_cluster/uiplugins/InstallDialog.vue +8 -8
  201. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +20 -7
  202. package/pages/c/_cluster/uiplugins/index.vue +49 -17
  203. package/pages/home.vue +9 -4
  204. package/pages/index.vue +10 -1
  205. package/plugins/clean-html-directive.js +31 -0
  206. package/plugins/dashboard-store/actions.js +32 -9
  207. package/plugins/dashboard-store/mutations.js +5 -2
  208. package/plugins/dashboard-store/resource-class.js +8 -1
  209. package/plugins/steve/mutations.js +3 -2
  210. package/plugins/steve/steve-description-class.js +5 -1
  211. package/plugins/steve/subscribe.js +63 -54
  212. package/plugins/steve-create-worker.js +14 -0
  213. package/promptRemove/management.cattle.io.globalrole.vue +2 -2
  214. package/promptRemove/management.cattle.io.project.vue +2 -2
  215. package/promptRemove/management.cattle.io.roletemplate.vue +2 -2
  216. package/promptRemove/pod.vue +1 -1
  217. package/public/index.html +65 -0
  218. package/rancher-components/components/Banner/Banner.test.ts +9 -1
  219. package/rancher-components/components/Banner/Banner.vue +1 -1
  220. package/rancher-components/components/Form/Checkbox/Checkbox.vue +2 -0
  221. package/rancher-components/components/Form/Radio/RadioButton.vue +1 -1
  222. package/scripts/build-pkg.sh +1 -0
  223. package/scripts/clean +6 -0
  224. package/scripts/extension/bundle +58 -0
  225. package/scripts/extension/helmpatch +89 -0
  226. package/scripts/extension/publish +314 -0
  227. package/scripts/test-plugins-build.sh +4 -0
  228. package/store/__tests__/index.test.ts +110 -0
  229. package/store/index.js +145 -58
  230. package/store/type-map.js +26 -19
  231. package/tsconfig.default.json +36 -0
  232. package/tsconfig.json +24 -0
  233. package/types/shell/index.d.ts +420 -343
  234. package/utils/__tests__/string.test.ts +12 -0
  235. package/utils/auth.js +65 -0
  236. package/utils/monitoring.js +2 -1
  237. package/utils/position.js +5 -8
  238. package/utils/router.scrollBehavior.js +80 -0
  239. package/utils/select.js +1 -3
  240. package/utils/socket.js +1 -0
  241. package/utils/string.js +13 -0
  242. package/utils/time.js +9 -0
  243. package/vue.config.js +679 -0
  244. package/yarn-error.log +196 -0
  245. package/chart/rancher-alerting-drivers.vue +0 -53
  246. package/chart/rancher-gatekeeper.vue +0 -37
  247. package/creators/app/files/nuxt.config.js +0 -6
  248. package/models/management.cattle.io.podsecurityadmissionconfigurationtemplate.ts +0 -4
  249. package/nuxt.config.js +0 -798
@@ -11,6 +11,7 @@ import { CAPI, MANAGEMENT, NORMAN, SNAPSHOT } from '@shell/config/types';
11
11
  import {
12
12
  STATE, NAME as NAME_COL, AGE, AGE_NORMAN, INTERNAL_EXTERNAL_IP, STATE_NORMAN, ROLES, MACHINE_NODE_OS, MANAGEMENT_NODE_OS, NAME,
13
13
  } from '@shell/config/table-headers';
14
+ import { STATES_ENUM } from '@shell/plugins/dashboard-store/resource-class';
14
15
  import CustomCommand from '@shell/edit/provisioning.cattle.io.cluster/CustomCommand';
15
16
  import AsyncButton from '@shell/components/AsyncButton.vue';
16
17
  import AnsiUp from 'ansi_up';
@@ -30,6 +31,7 @@ import Socket, {
30
31
  import { get } from '@shell/utils/object';
31
32
  import CapiMachineDeployment from '@shell/models/cluster.x-k8s.io.machinedeployment';
32
33
  import { isAlternate } from '@shell/utils/platform';
34
+ import { defaultTableSortGenerationFn } from '@shell/components/ResourceTable.vue';
33
35
 
34
36
  let lastId = 1;
35
37
  const ansiup = new AnsiUp();
@@ -248,15 +250,33 @@ export default {
248
250
  },
249
251
 
250
252
  fakeMachines() {
253
+ const machineNameFn = (clusterName, machinePoolName) => `${ clusterName }-${ machinePoolName }`;
254
+
251
255
  // When we scale up, the quantity will change to N+1 - so from 0 to 1, the quantity changes,
252
256
  // but it takes tiem for the machine to appear, so the pool is empty, but if we just go off on a non-zero quqntity
253
257
  // then the pool would be hidden - so we find empty pool by checking the machines
254
258
  const emptyPools = (this.value.spec.rkeConfig?.machinePools || []).filter((mp) => {
255
- const machinePrefix = `${ this.value.name }-${ mp.name }`;
259
+ const machineFullName = machineNameFn(this.value.name, mp.name);
260
+
256
261
  const machines = this.value.machines.filter((machine) => {
257
262
  const isElementalCluster = machine.spec?.infrastructureRef?.apiVersion.startsWith('elemental.cattle.io');
263
+ const machinePoolInfName = machine.spec?.infrastructureRef?.name;
264
+
265
+ if (isElementalCluster) {
266
+ return machinePoolInfName.includes(machineFullName);
267
+ }
268
+
269
+ // if labels exist, then the machineFullName must unequivocally be equal to manchineLabelFullName (based on labels)
270
+ const machineLabelClusterName = machine.metadata?.labels?.['cluster.x-k8s.io/cluster-name'];
271
+ const machineLabelPoolName = machine.metadata?.labels?.['rke.cattle.io/rke-machine-pool-name'];
272
+
273
+ if (machineLabelClusterName && machineLabelPoolName) {
274
+ const manchineLabelFullName = machineNameFn(machineLabelClusterName, machineLabelPoolName);
275
+
276
+ return machineFullName === manchineLabelFullName;
277
+ }
258
278
 
259
- return !isElementalCluster ? machine.spec?.infrastructureRef?.name.startsWith(machinePrefix) : machine.spec?.infrastructureRef?.name.includes(machinePrefix);
279
+ return machinePoolInfName.startsWith(machineFullName);
260
280
  });
261
281
 
262
282
  return machines.length === 0;
@@ -335,7 +355,7 @@ export default {
335
355
  },
336
356
 
337
357
  showEksNodeGroupWarning() {
338
- if ( this.value.provisioner === 'EKS' ) {
358
+ if ( this.value.provisioner === 'EKS' && this.value.state !== STATES_ENUM.ACTIVE) {
339
359
  const desiredTotal = this.value.eksNodeGroups.filter(g => g.desiredSize === 0);
340
360
 
341
361
  if ( desiredTotal.length === this.value.eksNodeGroups.length ) {
@@ -620,6 +640,26 @@ export default {
620
640
  return day(time).format(this.dateTimeFormatStr);
621
641
  }
622
642
  },
643
+
644
+ machineSortGenerationFn() {
645
+ // The sort generation function creates a unique value and is used to create a key including sort details.
646
+ // The unique key determines if the list is redrawn or a cached version is shown.
647
+ // Because we ensure the 'not in a pool' group is there via a row, and timing issues, the unqiue key doesn't change
648
+ // after a machine is added/removed... so the list won't update... so we need to inject a string to ensure the key is fresh
649
+ const base = defaultTableSortGenerationFn(this.machineSchema, this.$store);
650
+
651
+ return base + (!!this.fakeMachines.length ? '-fake' : '');
652
+ },
653
+
654
+ nodeSortGenerationFn() {
655
+ // The sort generation function creates a unique value and is used to create a key including sort details.
656
+ // The unique key determines if the list is redrawn or a cached version is shown.
657
+ // Because we ensure the 'not in a pool' group is there via a row, and timing issues, the unqiue key doesn't change
658
+ // after a machine is added/removed... so the list won't update... so we need to inject a string to ensure the key is fresh
659
+ const base = defaultTableSortGenerationFn(this.mgmtNodeSchema, this.$store);
660
+
661
+ return base + (!!this.fakeNodes.length ? '-fake' : '');
662
+ },
623
663
  }
624
664
  };
625
665
  </script>
@@ -663,6 +703,7 @@ export default {
663
703
  :group-by="value.isCustom ? null : 'poolId'"
664
704
  group-ref="pool"
665
705
  :group-sort="['pool.nameDisplay']"
706
+ :sort-generation-fn="machineSortGenerationFn"
666
707
  >
667
708
  <template #main-row:isFake="{fullColspan}">
668
709
  <tr class="main-row">
@@ -686,11 +727,11 @@ export default {
686
727
  >
687
728
  <div
688
729
  v-if="group && group.ref"
689
- v-html="group.ref.groupByPoolShortLabel"
730
+ v-clean-html="group.ref.groupByPoolShortLabel"
690
731
  />
691
732
  <div
692
733
  v-else
693
- v-html="t('resourceTable.groupLabel.notInANodePool')"
734
+ v-clean-html="t('resourceTable.groupLabel.notInANodePool')"
694
735
  />
695
736
  <div
696
737
  v-if="group.ref && group.ref.template"
@@ -747,6 +788,7 @@ export default {
747
788
  :group-by="value.isCustom ? null : 'spec.nodePoolName'"
748
789
  group-ref="pool"
749
790
  :group-sort="['pool.nameDisplay']"
791
+ :sort-generation-fn="nodeSortGenerationFn"
750
792
  >
751
793
  <template #main-row:isFake="{fullColspan}">
752
794
  <tr class="main-row">
@@ -770,11 +812,11 @@ export default {
770
812
  >
771
813
  <div
772
814
  v-if="group.ref"
773
- v-html="t('resourceTable.groupLabel.nodePool', { name: group.ref.spec.hostnamePrefix}, true)"
815
+ v-clean-html="t('resourceTable.groupLabel.nodePool', { name: group.ref.spec.hostnamePrefix}, true)"
774
816
  />
775
817
  <div
776
818
  v-else
777
- v-html="t('resourceTable.groupLabel.notInANodePool')"
819
+ v-clean-html="t('resourceTable.groupLabel.notInANodePool')"
778
820
  />
779
821
  <div
780
822
  v-if="group.ref && group.ref.nodeTemplate"
@@ -846,13 +888,13 @@ export default {
846
888
  >
847
889
  <td
848
890
  :key="line.id + '-time'"
891
+ v-clean-html="format(line.time)"
849
892
  class="time"
850
- v-html="format(line.time)"
851
893
  />
852
894
  <td
853
895
  :key="line.id + '-msg'"
896
+ v-clean-html="line.msg"
854
897
  class="msg"
855
- v-html="line.msg"
856
898
  />
857
899
  </tr>
858
900
  </template>
@@ -890,22 +932,22 @@ export default {
890
932
  @copied-windows="hasWindowsMachine ? null : showWindowsWarning = true"
891
933
  />
892
934
  <template v-else>
893
- <h4 v-html="t('cluster.import.commandInstructions', null, true)" />
935
+ <h4 v-clean-html="t('cluster.import.commandInstructions', null, true)" />
894
936
  <CopyCode class="m-10 p-10">
895
937
  {{ clusterToken.command }}
896
938
  </CopyCode>
897
939
 
898
940
  <h4
941
+ v-clean-html="t('cluster.import.commandInstructionsInsecure', null, true)"
899
942
  class="mt-10"
900
- v-html="t('cluster.import.commandInstructionsInsecure', null, true)"
901
943
  />
902
944
  <CopyCode class="m-10 p-10">
903
945
  {{ clusterToken.insecureCommand }}
904
946
  </CopyCode>
905
947
 
906
948
  <h4
949
+ v-clean-html="t('cluster.import.clusterRoleBindingInstructions', null, true)"
907
950
  class="mt-10"
908
- v-html="t('cluster.import.clusterRoleBindingInstructions', null, true)"
909
951
  />
910
952
  <CopyCode class="m-10 p-10">
911
953
  {{ t('cluster.import.clusterRoleBindingCommand', null, true) }}
@@ -108,8 +108,8 @@ export default {
108
108
  computed: {
109
109
  ...mapGetters(['currentCluster']),
110
110
 
111
- isActive() {
112
- return this.value.metadata.state.name === 'active';
111
+ isScalable() {
112
+ return this.value?.canUpdate;
113
113
  },
114
114
 
115
115
  isJob() {
@@ -335,7 +335,7 @@ export default {
335
335
  class="text-right"
336
336
  :label="t('tableHeaders.scale')"
337
337
  :value="value.spec.replicas"
338
- :disabled="!isActive"
338
+ :disabled="!isScalable"
339
339
  @minus="scaleDown"
340
340
  @plus="scaleUp"
341
341
  />
@@ -39,8 +39,8 @@ export default {
39
39
  >
40
40
  <h4
41
41
  slot="title"
42
+ v-clean-html="t('addClusterMemberDialog.title')"
42
43
  class="text-default-text"
43
- v-html="t('addClusterMemberDialog.title')"
44
44
  />
45
45
 
46
46
  <div
@@ -63,7 +63,7 @@ export default {
63
63
  async principalProperty() {
64
64
  const principal = await this.principal;
65
65
 
66
- return principal.principalType === 'group' ? 'groupPrincipalId' : 'userPrincipalId';
66
+ return principal?.principalType === 'group' ? 'groupPrincipalId' : 'userPrincipalId';
67
67
  },
68
68
 
69
69
  close() {
@@ -114,8 +114,8 @@ export default {
114
114
  >
115
115
  <h4
116
116
  slot="title"
117
+ v-clean-html="t('addProjectMemberDialog.title')"
117
118
  class="text-default-text"
118
- v-html="t('addProjectMemberDialog.title')"
119
119
  />
120
120
 
121
121
  <div
@@ -46,7 +46,7 @@ export default {
46
46
 
47
47
  <template>
48
48
  <Card
49
- class="addon-config-confirmation"
49
+ class="prompt-restore"
50
50
  :show-highlight-border="false"
51
51
  >
52
52
  <h4
@@ -66,24 +66,36 @@ export default {
66
66
  slot="actions"
67
67
  class="bottom"
68
68
  >
69
- <button
70
- type="button"
71
- class="btn role-secondary mr-10"
72
- @click="close"
73
- >
74
- {{ t('generic.cancel') }}
75
- </button>
76
- <AsyncButton
77
- mode="continue"
78
- @click="apply"
79
- />
69
+ <div class="buttons">
70
+ <button
71
+ type="button"
72
+ class="btn role-secondary mr-10"
73
+ @click="close"
74
+ >
75
+ {{ t('generic.cancel') }}
76
+ </button>
77
+ <AsyncButton
78
+ mode="continue"
79
+ @click="apply"
80
+ />
81
+ </div>
80
82
  </div>
81
83
  </Card>
82
84
  </template>
83
85
  <style lang='scss' scoped>
84
- ::v-deep .card-actions {
86
+ .prompt-restore {
87
+ margin: 0;
88
+ }
89
+
90
+ .bottom {
91
+ display: flex;
92
+ flex-direction: column;
93
+ flex: 1;
94
+
95
+ .buttons {
85
96
  display: flex;
86
- flex-direction: row;
87
- justify-content: center;
97
+ justify-content: flex-end;
98
+ width: 100%;
88
99
  }
100
+ }
89
101
  </style>
@@ -68,8 +68,8 @@ export default {
68
68
  >
69
69
  <h4
70
70
  slot="title"
71
+ v-clean-html="title"
71
72
  class="text-default-text"
72
- v-html="title"
73
73
  />
74
74
 
75
75
  <template slot="body">
@@ -83,7 +83,7 @@ export default {
83
83
  class="pl-10 pr-10"
84
84
  >
85
85
  <span
86
- v-html="t('promptForceRemove.removeWarning', { nameToMatch }, true)"
86
+ v-clean-html="t('promptForceRemove.removeWarning', { nameToMatch }, true)"
87
87
  />
88
88
  <div class="mt-10 mb-10">
89
89
  {{ t('promptForceRemove.confirmName') }}
@@ -3,6 +3,7 @@ import AsyncButton from '@shell/components/AsyncButton';
3
3
  import { Card } from '@components/Card';
4
4
  import { Banner } from '@components/Banner';
5
5
  import { exceptionToErrorsArray } from '@shell/utils/error';
6
+ import { decodeHtml } from '@shell/utils/string';
6
7
 
7
8
  export default {
8
9
  components: {
@@ -26,28 +27,39 @@ export default {
26
27
  body: {
27
28
  type: String,
28
29
  default: ''
29
- }
30
+ },
31
+
32
+ /**
33
+ * Callback to identify response of the prompt
34
+ */
35
+ confirm: {
36
+ type: Function,
37
+ default: () => { }
38
+ },
30
39
  },
31
40
  data() {
32
41
  return { errors: [] };
33
42
  },
34
43
 
35
44
  methods: {
45
+ decodeHtml,
36
46
  close() {
37
- this.$emit('close');
47
+ this.confirm(false);
48
+ this.$emit('close', false);
38
49
  },
39
50
 
40
51
  async apply(buttonDone) {
41
52
  try {
42
53
  await this.applyAction(buttonDone);
43
- this.close();
54
+ this.confirm(true);
55
+ this.$emit('close', true);
44
56
  } catch (err) {
45
57
  console.error(err); // eslint-disable-line
46
58
  this.errors = exceptionToErrorsArray(err);
47
59
  buttonDone(false);
48
60
  }
49
61
  }
50
- }
62
+ },
51
63
  };
52
64
  </script>
53
65
 
@@ -58,16 +70,16 @@ export default {
58
70
  >
59
71
  <h4
60
72
  slot="title"
73
+ v-clean-html="title"
61
74
  class="text-default-text"
62
- v-html="title"
63
75
  />
64
76
 
65
77
  <template slot="body">
66
78
  <slot name="body">
67
79
  <div
80
+ v-clean-html="decodeHtml(body)"
68
81
  class="pl-10 pr-10"
69
82
  style="min-height: 50px; display: flex;"
70
- v-html="body"
71
83
  />
72
84
  </slot>
73
85
  </template>
@@ -124,8 +124,8 @@ export default {
124
124
  >
125
125
  <h4
126
126
  slot="title"
127
+ v-clean-html="t('promptRotateEncryptionKey.title')"
127
128
  class="text-default-text"
128
- v-html="t('promptRotateEncryptionKey.title')"
129
129
  />
130
130
 
131
131
  <div
@@ -74,8 +74,8 @@ export default {
74
74
  >
75
75
  <h4
76
76
  slot="title"
77
+ v-clean-html="t('promptSaveAsRKETemplate.title', { cluster: cluster.displayName }, true)"
77
78
  class="text-default-text"
78
- v-html="t('promptSaveAsRKETemplate.title', { cluster: cluster.displayName }, true)"
79
79
  />
80
80
 
81
81
  <div
@@ -116,7 +116,7 @@ export default {
116
116
  <span
117
117
  v-for="i in ignored"
118
118
  :key="i.name"
119
- v-html="t('promptScaleMachineDown.retainedMachine2', { name: i.name }, true)"
119
+ v-clean-html="t('promptScaleMachineDown.retainedMachine2', { name: i.name }, true)"
120
120
  />
121
121
  </div>
122
122
  </div>
@@ -187,9 +187,9 @@ export default {
187
187
  class="step-box"
188
188
  >
189
189
  <ul class="step-list">
190
- <li v-html="t(`authConfig.${NAME}.form.prefix.1`, tArgs, true)" />
191
- <li v-html="t(`authConfig.${NAME}.form.prefix.2`, tArgs, true)" />
192
- <li v-html="t(`authConfig.${NAME}.form.prefix.3`, tArgs, true)" />
190
+ <li v-clean-html="t(`authConfig.${NAME}.form.prefix.1`, tArgs, true)" />
191
+ <li v-clean-html="t(`authConfig.${NAME}.form.prefix.2`, tArgs, true)" />
192
+ <li v-clean-html="t(`authConfig.${NAME}.form.prefix.3`, tArgs, true)" />
193
193
  </ul>
194
194
  </InfoBox>
195
195
  <InfoBox
@@ -200,7 +200,7 @@ export default {
200
200
  <li>
201
201
  {{ t(`authConfig.${NAME}.form.instruction`, tArgs, true) }}
202
202
  <ul class="mt-10">
203
- <li><b>{{ t(`authConfig.${NAME}.form.app.label`) }}</b>: <span v-html="t(`authConfig.${NAME}.form.app.value`, tArgs, true)" /></li>
203
+ <li><b>{{ t(`authConfig.${NAME}.form.app.label`) }}</b>: <span v-clean-html="t(`authConfig.${NAME}.form.app.value`, tArgs, true)" /></li>
204
204
  <li>
205
205
  <b>{{ t(`authConfig.${NAME}.form.homepage.label`) }}</b>: {{ serverUrl }} <CopyToClipboard
206
206
  label-as="tooltip"
@@ -209,7 +209,7 @@ export default {
209
209
  action-color="bg-transparent"
210
210
  />
211
211
  </li>
212
- <li><b>{{ t(`authConfig.${NAME}.form.description.label`) }}</b>: <span v-html="t(`authConfig.${NAME}.form.description.value`, tArgs, true)" /></li>
212
+ <li><b>{{ t(`authConfig.${NAME}.form.description.label`) }}</b>: <span v-clean-html="t(`authConfig.${NAME}.form.description.value`, tArgs, true)" /></li>
213
213
  <li>
214
214
  <b>{{ t(`authConfig.${NAME}.form.callback.label`) }}</b>: {{ serverUrl }} <CopyToClipboard
215
215
  :text="serverUrl"
@@ -227,8 +227,8 @@ export default {
227
227
  class="mb-20"
228
228
  >
229
229
  <ul class="step-list">
230
- <li v-html="t(`authConfig.${NAME}.form.suffix.1`, tArgs, true)" />
231
- <li v-html="t(`authConfig.${NAME}.form.suffix.2`, tArgs, true)" />
230
+ <li v-clean-html="t(`authConfig.${NAME}.form.suffix.1`, tArgs, true)" />
231
+ <li v-clean-html="t(`authConfig.${NAME}.form.suffix.2`, tArgs, true)" />
232
232
  </ul>
233
233
  </InfoBox>
234
234
 
@@ -255,8 +255,8 @@ export default {
255
255
  >
256
256
  <div class="col span-12">
257
257
  <Banner
258
+ v-clean-html="t('authConfig.associatedWarning', tArgs, true)"
258
259
  color="info"
259
- v-html="t('authConfig.associatedWarning', tArgs, true)"
260
260
  />
261
261
  </div>
262
262
  </div>
@@ -141,7 +141,7 @@ export default {
141
141
  :step="1"
142
142
  class=" mt-20 mb-20"
143
143
  >
144
- <h3 v-html="t('authConfig.googleoauth.steps.1.title', tArgs, true)" />
144
+ <h3 v-clean-html="t('authConfig.googleoauth.steps.1.title', tArgs, true)" />
145
145
  <ul class="mt-0 step-list">
146
146
  <li>{{ t('authConfig.googleoauth.steps.1.body.1', {}, true) }} </li>
147
147
  <li>
@@ -165,7 +165,7 @@ export default {
165
165
  class="mb-20"
166
166
  >
167
167
  <div class="row">
168
- <h3 v-html="t('authConfig.googleoauth.steps.2.title', tArgs, true)" />
168
+ <h3 v-clean-html="t('authConfig.googleoauth.steps.2.title', tArgs, true)" />
169
169
  </div>
170
170
  <div class="row">
171
171
  <div class="col span-6">
@@ -211,11 +211,11 @@ export default {
211
211
  class="mb-20"
212
212
  >
213
213
  <div class="row">
214
- <h3 v-html="t('authConfig.googleoauth.steps.3.title', tArgs, true)" />
214
+ <h3 v-clean-html="t('authConfig.googleoauth.steps.3.title', tArgs, true)" />
215
215
  </div>
216
216
  <div class="row">
217
217
  <div class="col span-6">
218
- <div v-html="t('authConfig.googleoauth.steps.3.introduction', tArgs, true)" />
218
+ <div v-clean-html="t('authConfig.googleoauth.steps.3.introduction', tArgs, true)" />
219
219
  <ul class="mt-10 step-list">
220
220
  <li>{{ t('authConfig.googleoauth.steps.3.body.1', {}, true) }} </li>
221
221
  <li>{{ t('authConfig.googleoauth.steps.3.body.2', {}, true) }} </li>
@@ -248,8 +248,8 @@ export default {
248
248
  >
249
249
  <div class="col span-12 google">
250
250
  <Banner
251
+ v-clean-html="t('authConfig.associatedWarning', tArgs, true)"
251
252
  color="info"
252
- v-html="t('authConfig.associatedWarning', tArgs, true)"
253
253
  />
254
254
  </div>
255
255
  </div>
@@ -148,8 +148,8 @@ export default {
148
148
  >
149
149
  <div class="col span-12">
150
150
  <Banner
151
+ v-clean-html="t('authConfig.associatedWarning', tArgs, true)"
151
152
  color="info"
152
- v-html="t('authConfig.associatedWarning', tArgs, true)"
153
153
  />
154
154
  </div>
155
155
  </div>
@@ -277,8 +277,8 @@ export default {
277
277
  >
278
278
  <div class="col span-12">
279
279
  <Banner
280
+ v-clean-html="t('authConfig.associatedWarning', tArgs, true)"
280
281
  color="info"
281
- v-html="t('authConfig.associatedWarning', tArgs, true)"
282
282
  />
283
283
  </div>
284
284
  </div>
@@ -257,8 +257,8 @@ export default {
257
257
  >
258
258
  <div class="col span-12">
259
259
  <Banner
260
+ v-clean-html="t('authConfig.associatedWarning', tArgs, true)"
260
261
  color="info"
261
- v-html="t('authConfig.associatedWarning', tArgs, true)"
262
262
  />
263
263
  </div>
264
264
  </div>
@@ -322,7 +322,7 @@ export default {
322
322
  class="mt-0"
323
323
  :color="hasAlertManager ? 'info' : 'warning'"
324
324
  >
325
- <span v-html="t('cis.alertNeeded', {link: monitoringUrl}, true)" />
325
+ <span v-clean-html="t('cis.alertNeeded', {link: monitoringUrl}, true)" />
326
326
  </banner>
327
327
  <Checkbox
328
328
  v-model="scanAlertRule.alertOnComplete"
@@ -27,7 +27,9 @@ export default {
27
27
  mixins: [CreateEditView],
28
28
 
29
29
  async fetch() {
30
- this.allClusters = await this.$store.dispatch('management/findAll', { type: FLEET.CLUSTER });
30
+ if (this.$store.getters['management/schemaFor']( FLEET.CLUSTER )) {
31
+ this.allClusters = await this.$store.getters['management/all'](FLEET.CLUSTER);
32
+ }
31
33
  this.allWorkspaces = await this.$store.dispatch('management/findAll', { type: FLEET.WORKSPACE });
32
34
 
33
35
  if ( !this.value.spec?.selector ) {
@@ -146,15 +148,15 @@ export default {
146
148
  >
147
149
  <span
148
150
  v-if="matchingClusters.isAll"
149
- v-html="t('fleet.clusterGroup.selector.matchesAll', matchingClusters)"
151
+ v-clean-html="t('fleet.clusterGroup.selector.matchesAll', matchingClusters)"
150
152
  />
151
153
  <span
152
154
  v-else-if="matchingClusters.isNone"
153
- v-html="t('fleet.clusterGroup.selector.matchesNone', matchingClusters)"
155
+ v-clean-html="t('fleet.clusterGroup.selector.matchesNone', matchingClusters)"
154
156
  />
155
157
  <span
156
158
  v-else
157
- v-html="t('fleet.clusterGroup.selector.matchesSome', matchingClusters)"
159
+ v-clean-html="t('fleet.clusterGroup.selector.matchesSome', matchingClusters)"
158
160
  />
159
161
  </Banner>
160
162
 
@@ -23,6 +23,7 @@ import { _CREATE } from '@shell/config/query-params';
23
23
  import { isHarvesterCluster } from '@shell/utils/cluster';
24
24
  import { CAPI, CATALOG } from '@shell/config/labels-annotations';
25
25
  import { SECRET_TYPES } from '@shell/config/secret';
26
+ import { checkSchemasForFindAllHash } from '@shell/utils/auth';
26
27
 
27
28
  const _VERIFY = 'verify';
28
29
  const _SKIP = 'skip';
@@ -48,8 +49,20 @@ export default {
48
49
  mixins: [CreateEditView],
49
50
 
50
51
  async fetch() {
51
- this.allClusters = await this.$store.dispatch('management/findAll', { type: FLEET.CLUSTER });
52
- this.allClusterGroups = await this.$store.dispatch('management/findAll', { type: FLEET.CLUSTER_GROUP });
52
+ const hash = await checkSchemasForFindAllHash({
53
+ allClusters: {
54
+ inStoreType: 'management',
55
+ type: FLEET.CLUSTER
56
+ },
57
+
58
+ allClusterGroups: {
59
+ inStoreType: 'management',
60
+ type: FLEET.CLUSTER_GROUP
61
+ }
62
+ }, this.$store);
63
+
64
+ this.allClusters = hash.allClusters || [];
65
+ this.allClusterGroups = hash.allClusterGroups || [];
53
66
 
54
67
  let tls = _VERIFY;
55
68
 
@@ -412,7 +425,7 @@ export default {
412
425
  await secret.save();
413
426
 
414
427
  await this.$nextTick(() => {
415
- this.updateAuth(secret.id, name);
428
+ this.updateAuth(secret.metadata.name, name);
416
429
  });
417
430
 
418
431
  return secret;
@@ -48,6 +48,10 @@ export default {
48
48
  },
49
49
 
50
50
  data() {
51
+ if (!this.value.spec.values) {
52
+ this.$set(this.value.spec, 'values', {});
53
+ }
54
+
51
55
  return {
52
56
  systemNamespaces: null,
53
57
  namespaces: [],
@@ -128,7 +132,7 @@ export default {
128
132
  :side-tabs="true"
129
133
  >
130
134
  <Questions
131
- v-model="value"
135
+ v-model="value.spec.values"
132
136
  tabbed="multiple"
133
137
  :target-namespace="value.metadata.namespace"
134
138
  :source="selectedNamespaceQuestions"