@rancher/shell 3.0.0-rc.3 → 3.0.0-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 (295) hide show
  1. package/assets/styles/base/_variables.scss +12 -4
  2. package/assets/styles/global/_layout.scss +1 -1
  3. package/assets/styles/global/_tooltip.scss +1 -1
  4. package/assets/translations/en-us.yaml +61 -26
  5. package/assets/translations/zh-hans.yaml +6 -5
  6. package/chart/istio.vue +2 -0
  7. package/chart/monitoring/ClusterSelector.vue +2 -0
  8. package/chart/monitoring/StorageClassSelector.vue +4 -1
  9. package/chart/monitoring/index.vue +2 -0
  10. package/chart/rancher-backup/S3.vue +2 -0
  11. package/chart/rancher-backup/index.vue +2 -0
  12. package/cloud-credential/aws.vue +2 -0
  13. package/cloud-credential/azure.vue +2 -0
  14. package/cloud-credential/digitalocean.vue +2 -0
  15. package/cloud-credential/gcp.vue +2 -0
  16. package/cloud-credential/generic.vue +2 -0
  17. package/cloud-credential/harvester.vue +2 -0
  18. package/cloud-credential/linode.vue +2 -0
  19. package/cloud-credential/pnap.vue +2 -0
  20. package/cloud-credential/s3.vue +2 -0
  21. package/cloud-credential/vmwarevsphere.vue +2 -0
  22. package/components/ActionMenu.vue +4 -1
  23. package/components/AppModal.vue +4 -1
  24. package/components/ButtonDropdown.vue +3 -0
  25. package/components/ButtonGroup.vue +2 -0
  26. package/components/ButtonMultiAction.vue +41 -0
  27. package/components/Carousel.vue +3 -0
  28. package/components/CodeMirror.vue +6 -4
  29. package/components/Collapse.vue +4 -1
  30. package/components/CollapsibleCard.vue +4 -1
  31. package/components/ContainerResourceLimit.vue +2 -0
  32. package/components/CopyCode.vue +8 -4
  33. package/components/CopyToClipboardText.vue +2 -0
  34. package/components/CruResource.vue +2 -0
  35. package/components/CruResourceFooter.vue +2 -0
  36. package/components/Dialog.vue +2 -0
  37. package/components/DisableAuthProviderModal.vue +4 -1
  38. package/components/EmberPage.vue +2 -0
  39. package/components/ExplorerProjectsNamespaces.vue +11 -8
  40. package/components/GlobalRoleBindings.vue +2 -0
  41. package/components/Import.vue +2 -0
  42. package/components/InputOrDisplay.vue +23 -18
  43. package/components/Loading.vue +4 -1
  44. package/components/Markdown.vue +2 -0
  45. package/components/ModalWithCard.vue +2 -0
  46. package/components/MoveModal.vue +2 -0
  47. package/components/PodSecurityAdmission.vue +2 -0
  48. package/components/Questions/Array.vue +2 -0
  49. package/components/Questions/Boolean.vue +2 -0
  50. package/components/Questions/CloudCredential.vue +2 -0
  51. package/components/Questions/Enum.vue +2 -0
  52. package/components/Questions/Float.vue +2 -0
  53. package/components/Questions/Int.vue +2 -0
  54. package/components/Questions/QuestionMap.vue +4 -1
  55. package/components/Questions/Radio.vue +2 -0
  56. package/components/Questions/Reference.vue +2 -0
  57. package/components/Questions/String.vue +2 -0
  58. package/components/Questions/Yaml.vue +2 -0
  59. package/components/Questions/index.vue +2 -0
  60. package/components/ResourceCancelModal.vue +2 -0
  61. package/components/ResourceDetail/Masthead.vue +4 -3
  62. package/components/ResourceDetail/index.vue +17 -15
  63. package/components/ResourceTable.vue +2 -0
  64. package/components/ResourceYaml.vue +2 -0
  65. package/components/SelectIconGrid.vue +2 -0
  66. package/components/SimpleBox.vue +2 -0
  67. package/components/SortableTable/THead.vue +2 -0
  68. package/components/SortableTable/index.vue +15 -19
  69. package/components/StatusTable.vue +2 -0
  70. package/components/Tabbed/Tab.vue +2 -0
  71. package/components/Tabbed/index.vue +2 -0
  72. package/components/Wizard.vue +2 -0
  73. package/components/YamlEditor.vue +2 -0
  74. package/components/__tests__/ButtonMultiAction.test.ts +31 -0
  75. package/components/auth/RoleDetailEdit.vue +2 -0
  76. package/components/auth/SelectPrincipal.vue +2 -0
  77. package/components/auth/login/ldap.vue +2 -0
  78. package/components/fleet/FleetStatus.vue +3 -2
  79. package/components/form/ArrayList.vue +16 -1
  80. package/components/form/ArrayListSelect.vue +2 -0
  81. package/components/form/ChangePassword.vue +2 -0
  82. package/components/form/ColorInput.vue +2 -0
  83. package/components/form/Command.vue +2 -0
  84. package/components/form/FileImageSelector.vue +2 -0
  85. package/components/form/FileSelector.vue +2 -0
  86. package/components/form/Footer.vue +2 -0
  87. package/components/form/GitPicker.vue +1 -0
  88. package/components/form/HealthCheck.vue +5 -3
  89. package/components/form/HookOption.vue +22 -18
  90. package/components/form/InputWithSelect.vue +3 -1
  91. package/components/form/KeyValue.vue +2 -0
  92. package/components/form/LabeledSelect.vue +13 -3
  93. package/components/form/LifecycleHooks.vue +2 -0
  94. package/components/form/MatchExpressions.vue +2 -0
  95. package/components/form/Members/ClusterPermissionsEditor.vue +2 -0
  96. package/components/form/Members/MembershipEditor.vue +2 -0
  97. package/components/form/NameNsDescription.vue +4 -1
  98. package/components/form/Networking.vue +2 -0
  99. package/components/form/NodeAffinity.vue +4 -1
  100. package/components/form/Password.vue +2 -0
  101. package/components/form/PlusMinus.vue +2 -0
  102. package/components/form/PodAffinity.vue +4 -1
  103. package/components/form/Ports.vue +2 -0
  104. package/components/form/Probe.vue +8 -4
  105. package/components/form/ResourceQuota/NamespaceRow.vue +2 -0
  106. package/components/form/ResourceQuota/Project.vue +2 -0
  107. package/components/form/ResourceQuota/ProjectRow.vue +2 -0
  108. package/components/form/RuleSelector.vue +2 -0
  109. package/components/form/SecretSelector.vue +1 -0
  110. package/components/form/Security.vue +5 -2
  111. package/components/form/Select.vue +2 -1
  112. package/components/form/SelectOrCreateAuthSecret.vue +2 -0
  113. package/components/form/ServiceNameSelect.vue +2 -0
  114. package/components/form/ServicePorts.vue +2 -0
  115. package/components/form/ShellInput.vue +2 -0
  116. package/components/form/SimpleSecretSelector.vue +2 -0
  117. package/components/form/Taints.vue +2 -0
  118. package/components/form/Tolerations.vue +2 -0
  119. package/components/form/ValueFromResource.vue +2 -0
  120. package/components/form/WorkloadPorts.vue +5 -3
  121. package/components/form/__tests__/HookOption.test.ts +28 -0
  122. package/components/form/__tests__/LabeledSelect.test.ts +42 -0
  123. package/components/form/__tests__/Probe.test.ts +12 -0
  124. package/components/nav/Header.vue +26 -128
  125. package/components/nav/HeaderPageActionMenu.vue +151 -0
  126. package/components/nav/Jump.vue +2 -0
  127. package/components/nav/NamespaceFilter.vue +5 -1
  128. package/components/nav/Type.vue +28 -2
  129. package/components/nav/WindowManager/ContainerShell.vue +6 -12
  130. package/components/nav/WindowManager/index.vue +2 -0
  131. package/components/nav/__tests__/Type.test.ts +68 -24
  132. package/composables/useClickOutside.ts +81 -0
  133. package/config/product/cis.js +4 -3
  134. package/config/product/manager.js +1 -0
  135. package/config/router/routes.js +1 -1
  136. package/config/table-headers.js +0 -10
  137. package/config/uiplugins.js +186 -143
  138. package/config/version.js +10 -0
  139. package/detail/autoscaling.horizontalpodautoscaler/index.vue +2 -0
  140. package/detail/configmap.vue +2 -0
  141. package/detail/fleet.cattle.io.cluster.vue +2 -0
  142. package/detail/fleet.cattle.io.clustergroup.vue +2 -0
  143. package/detail/fleet.cattle.io.gitrepo.vue +2 -0
  144. package/detail/harvesterhci.io.management.cluster.vue +2 -0
  145. package/detail/management.cattle.io.roletemplate.vue +4 -4
  146. package/detail/management.cattle.io.user.vue +2 -0
  147. package/detail/namespace.vue +2 -0
  148. package/detail/networking.k8s.io.ingress.vue +1 -0
  149. package/detail/node.vue +2 -0
  150. package/detail/provisioning.cattle.io.cluster.vue +2 -0
  151. package/detail/secret.vue +2 -0
  152. package/detail/service.vue +2 -0
  153. package/detail/workload/index.vue +1 -1
  154. package/dialog/AddClusterMemberDialog.vue +2 -0
  155. package/dialog/AddCustomBadgeDialog.vue +3 -1
  156. package/dialog/AddProjectMemberDialog.vue +2 -0
  157. package/dialog/AddonConfigConfirmationDialog.vue +2 -0
  158. package/dialog/DeactivateDriverDialog.vue +2 -0
  159. package/dialog/DiagnosticTimingsDialog.vue +2 -0
  160. package/dialog/DrainNode.vue +2 -0
  161. package/dialog/ForceMachineRemoveDialog.vue +2 -0
  162. package/dialog/GenericPrompt.vue +2 -0
  163. package/dialog/RollbackWorkloadDialog.vue +2 -0
  164. package/dialog/RotateCertificatesDialog.vue +2 -0
  165. package/dialog/RotateEncryptionKeyDialog.vue +2 -0
  166. package/dialog/SaveAsRKETemplateDialog.vue +2 -0
  167. package/dialog/ScaleMachineDownDialog.vue +2 -0
  168. package/dialog/ScalePoolDownDialog.vue +2 -0
  169. package/dialog/SloDialog.vue +2 -0
  170. package/edit/auth/ldap/config.vue +2 -0
  171. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +3 -3
  172. package/edit/autoscaling.horizontalpodautoscaler/index.vue +4 -2
  173. package/edit/catalog.cattle.io.clusterrepo.vue +2 -0
  174. package/edit/cis.cattle.io.clusterscan.vue +38 -18
  175. package/edit/cloudcredential.vue +2 -0
  176. package/edit/constraints.gatekeeper.sh.constraint/MatchKinds.vue +2 -0
  177. package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +2 -0
  178. package/edit/constraints.gatekeeper.sh.constraint/Scope.vue +2 -0
  179. package/edit/constraints.gatekeeper.sh.constraint/index.vue +2 -0
  180. package/edit/fleet.cattle.io.cluster.vue +2 -0
  181. package/edit/fleet.cattle.io.clustergroup.vue +4 -1
  182. package/edit/fleet.cattle.io.gitrepo.vue +2 -0
  183. package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +2 -0
  184. package/edit/logging-flow/Match.vue +2 -0
  185. package/edit/logging-flow/index.vue +10 -8
  186. package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +1 -1
  187. package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +1 -1
  188. package/edit/logging.banzaicloud.io.output/providers/redis.vue +3 -3
  189. package/edit/management.cattle.io.fleetworkspace.vue +4 -1
  190. package/edit/management.cattle.io.project.vue +2 -0
  191. package/edit/management.cattle.io.roletemplate.vue +1 -1
  192. package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -0
  193. package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +2 -0
  194. package/edit/monitoring.coreos.com.receiver/types/email.vue +1 -0
  195. package/edit/namespace.vue +1 -0
  196. package/edit/networking.k8s.io.ingress/Certificate.vue +2 -0
  197. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -1
  198. package/edit/networking.k8s.io.ingress/Rule.vue +1 -0
  199. package/edit/networking.k8s.io.ingress/RulePath.vue +20 -23
  200. package/edit/networking.k8s.io.ingress/index.vue +1 -0
  201. package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +1 -1
  202. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -0
  203. package/edit/node.vue +2 -0
  204. package/edit/persistentvolumeclaim.vue +1 -0
  205. package/edit/policy.poddisruptionbudget.vue +3 -1
  206. package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +2 -0
  207. package/edit/provisioning.cattle.io.cluster/Labels.vue +2 -0
  208. package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +2 -0
  209. package/edit/provisioning.cattle.io.cluster/import.vue +2 -0
  210. package/edit/provisioning.cattle.io.cluster/index.vue +2 -2
  211. package/edit/provisioning.cattle.io.cluster/rke2.vue +38 -13
  212. package/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest.vue +49 -0
  213. package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +32 -65
  214. package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +2 -0
  215. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +2 -0
  216. package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +2 -0
  217. package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +2 -0
  218. package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +2 -0
  219. package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +2 -0
  220. package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +2 -0
  221. package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +1 -0
  222. package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +2 -0
  223. package/edit/resources.cattle.io.backup.vue +2 -2
  224. package/edit/secret/index.vue +2 -0
  225. package/edit/service.vue +2 -1
  226. package/edit/ui.cattle.io.navlink.vue +1 -0
  227. package/edit/workload/Job.vue +3 -2
  228. package/edit/workload/Upgrading.vue +1 -0
  229. package/edit/workload/index.vue +18 -7
  230. package/edit/workload/storage/ContainerMountPaths.vue +37 -97
  231. package/edit/workload/storage/awsElasticBlockStore.vue +1 -1
  232. package/edit/workload/storage/azureDisk.vue +1 -1
  233. package/edit/workload/storage/csi/driver.longhorn.io.vue +2 -0
  234. package/edit/workload/storage/ephemeralVolume/index.vue +2 -0
  235. package/edit/workload/storage/gcePersistentDisk.vue +1 -1
  236. package/edit/workload/storage/index.vue +38 -22
  237. package/edit/workload/storage/persistentVolumeClaim/index.vue +2 -0
  238. package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +1 -0
  239. package/edit/workload/storage/vsphereVolume.vue +1 -1
  240. package/initialize/install-components.js +0 -12
  241. package/initialize/install-plugins.js +4 -5
  242. package/machine-config/azure.vue +2 -0
  243. package/machine-config/generic.vue +2 -0
  244. package/machine-config/vmwarevsphere.vue +2 -0
  245. package/mixins/resource-manager.js +1 -1
  246. package/models/cis.cattle.io.clusterscan.js +17 -16
  247. package/models/cis.cattle.io.clusterscanprofile.js +17 -0
  248. package/models/management.cattle.io.cluster.js +1 -1
  249. package/models/management.cattle.io.user.js +3 -3
  250. package/models/provisioning.cattle.io.cluster.js +2 -1
  251. package/models/steve-schema.ts +1 -1
  252. package/models/workload.js +2 -1
  253. package/package.json +5 -7
  254. package/pages/c/_cluster/apps/charts/chart.vue +3 -1
  255. package/pages/c/_cluster/apps/charts/install.vue +5 -56
  256. package/pages/c/_cluster/fleet/index.vue +0 -1
  257. package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/receiver.vue +1 -0
  258. package/pages/c/_cluster/settings/DefaultLinksEditor.vue +2 -0
  259. package/pages/c/_cluster/settings/performance.vue +2 -2
  260. package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +11 -16
  261. package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +2 -0
  262. package/pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue +2 -0
  263. package/pages/c/_cluster/uiplugins/CatalogList/index.vue +2 -0
  264. package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +6 -3
  265. package/pages/c/_cluster/uiplugins/InstallDialog.vue +2 -0
  266. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +7 -17
  267. package/pages/c/_cluster/uiplugins/UninstallDialog.vue +2 -0
  268. package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +3 -6
  269. package/pages/c/_cluster/uiplugins/index.vue +93 -92
  270. package/pkg/vue.config.js +2 -0
  271. package/plugins/plugin.js +27 -19
  272. package/plugins/version.js +3 -13
  273. package/promptRemove/pod.vue +2 -0
  274. package/rancher-components/Form/LabeledInput/LabeledInput.vue +14 -8
  275. package/rancher-components/Form/Radio/RadioButton.vue +0 -1
  276. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +17 -9
  277. package/rancher-components/StringList/StringList.vue +6 -15
  278. package/scripts/extension/bundle +1 -1
  279. package/scripts/extension/publish +174 -99
  280. package/scripts/publish-shell.sh +3 -4
  281. package/scripts/typegen.sh +1 -1
  282. package/store/catalog.js +0 -26
  283. package/store/growl.js +8 -5
  284. package/types/shell/index.d.ts +22 -0
  285. package/utils/cluster.js +9 -0
  286. package/utils/versions.ts +39 -0
  287. package/vue.config.js +5 -0
  288. package/components/form/PodSecurity.vue +0 -168
  289. package/components/formatter/Weight.vue +0 -147
  290. package/components/nuxt/nuxt-build-indicator.vue +0 -170
  291. package/components/nuxt/nuxt-child.js +0 -52
  292. package/components/nuxt/nuxt-error.vue +0 -128
  293. package/components/nuxt/nuxt-link.client.js +0 -17
  294. package/components/nuxt/nuxt-loading.vue +0 -165
  295. package/shell/types/shell/index.d.ts +0 -2
@@ -1,8 +1,8 @@
1
- import { _CREATE, _EDIT } from '@shell/config/query-params';
1
+ import { NAME as PRODUCT_NAME } from '@shell/config/product/cis';
2
2
  import { CIS } from '@shell/config/types';
3
3
  import { findBy } from '@shell/utils/array';
4
4
  import { downloadFile, generateZip } from '@shell/utils/download';
5
- import { get, isEmpty, set } from '@shell/utils/object';
5
+ import { get, isEmpty } from '@shell/utils/object';
6
6
  import { sortBy } from '@shell/utils/sort';
7
7
  import day from 'dayjs';
8
8
  import SteveModel from '@shell/plugins/steve/steve-class';
@@ -77,20 +77,6 @@ export default class ClusterScan extends SteveModel {
77
77
  return out;
78
78
  }
79
79
 
80
- applyDefaults(vm, mode) {
81
- if (mode === _CREATE || mode === _EDIT) {
82
- const includeScheduling = this.canBeScheduled();
83
- const spec = this.spec || {};
84
-
85
- spec.scanProfileName = null;
86
- if (includeScheduling) {
87
- spec.scoreWarning = 'pass';
88
- spec.scheduledScanConfig = { scanAlertRule: {}, retentionCount: 3 };
89
- }
90
- set(this, 'spec', spec);
91
- }
92
- }
93
-
94
80
  canBeScheduled() {
95
81
  return hasSpecsScheduledScanConfig(this.$getters['schemaFor'](this.type));
96
82
  }
@@ -166,6 +152,21 @@ export default class ClusterScan extends SteveModel {
166
152
  });
167
153
  }
168
154
  }
155
+
156
+ get scanProfileLink() {
157
+ if (this.status?.lastRunScanProfileName) {
158
+ return {
159
+ name: 'c-cluster-product-resource-id',
160
+ params: {
161
+ resource: CIS.CLUSTER_SCAN_PROFILE,
162
+ product: PRODUCT_NAME,
163
+ id: this.status?.lastRunScanProfileName
164
+ }
165
+ };
166
+ }
167
+
168
+ return {};
169
+ }
169
170
  }
170
171
 
171
172
  const labelFor = (report) => {
@@ -1,5 +1,7 @@
1
1
 
2
2
  import SteveModel from '@shell/plugins/steve/steve-class';
3
+ import { NAME as PRODUCT_NAME } from '@shell/config/product/cis';
4
+ import { CIS } from '@shell/config/types';
3
5
 
4
6
  export default class CISProfile extends SteveModel {
5
7
  warnDeletionMessage(toRemove = []) {
@@ -11,4 +13,19 @@ export default class CISProfile extends SteveModel {
11
13
 
12
14
  return skipTests.length;
13
15
  }
16
+
17
+ get benchmarkVersionLink() {
18
+ if (this.spec?.benchmarkVersion) {
19
+ return {
20
+ name: 'c-cluster-product-resource-id',
21
+ params: {
22
+ resource: CIS.BENCHMARK,
23
+ product: PRODUCT_NAME,
24
+ id: this.spec?.benchmarkVersion
25
+ }
26
+ };
27
+ }
28
+
29
+ return {};
30
+ }
14
31
  }
@@ -118,7 +118,7 @@ export default class MgmtCluster extends SteveModel {
118
118
  // Provisioner is the "<something>Config" in the model
119
119
  const provisioner = KONTAINER_TO_DRIVER[(this.provisioner || '').toLowerCase()] || this.provisioner;
120
120
 
121
- if ( provisioner === 'rancherKubernetesEngine' ) {
121
+ if ( provisioner === 'rancherKubernetesEngine' || provisioner === 'rke') {
122
122
  // Look for a cloud provider in one of the node templates
123
123
  if ( this.machinePools?.[0] ) {
124
124
  provider = this.machinePools[0]?.nodeTemplate?.spec?.driver || null;
@@ -105,7 +105,7 @@ export default class User extends HybridModel {
105
105
  * @returns {number}
106
106
  */
107
107
  get userLastLogin() {
108
- return this.metadata?.labels?.['cattle.io/last-login'] * 1000;
108
+ return this.metadata?.labels?.['cattle.io/last-login'] * 1000 || 0;
109
109
  }
110
110
 
111
111
  /**
@@ -113,7 +113,7 @@ export default class User extends HybridModel {
113
113
  * @returns {number}
114
114
  */
115
115
  get userDisabledIn() {
116
- return this.metadata?.labels?.['cattle.io/disable-after'] * 1000;
116
+ return this.metadata?.labels?.['cattle.io/disable-after'] * 1000 || 0;
117
117
  }
118
118
 
119
119
  /**
@@ -129,7 +129,7 @@ export default class User extends HybridModel {
129
129
  * @returns {number}
130
130
  */
131
131
  get userDeletedIn() {
132
- return this.metadata?.labels?.['cattle.io/delete-after'] * 1000;
132
+ return this.metadata?.labels?.['cattle.io/delete-after'] * 1000 || 0;
133
133
  }
134
134
 
135
135
  get state() {
@@ -885,7 +885,8 @@ export default class ProvCluster extends SteveModel {
885
885
  get agentConfig() {
886
886
  // The one we want is the first one with no selector.
887
887
  // If there are multiple with no selector, that will fall under the unsupported message below.
888
- return this.spec.rkeConfig.machineSelectorConfig.find((x) => !x.machineLabelSelector)?.config;
888
+ return this.spec.rkeConfig?.machineSelectorConfig
889
+ .find((x) => !x.machineLabelSelector)?.config || { };
889
890
  }
890
891
 
891
892
  get cloudProvider() {
@@ -160,7 +160,7 @@ export default class SteveSchema extends Schema {
160
160
  url
161
161
  });
162
162
  } catch (e: any) {
163
- if ( e?._status === 500) {
163
+ if (e?._status === 500 || e?._status === 503) {
164
164
  // Rancher could be updating it's definition cache, attempt a few times
165
165
  await wait(2000);
166
166
 
@@ -15,7 +15,8 @@ export const defaultContainer = {
15
15
  readOnlyRootFilesystem: false,
16
16
  privileged: false,
17
17
  allowPrivilegeEscalation: false,
18
- }
18
+ },
19
+ volumeMounts: []
19
20
  };
20
21
  export default class Workload extends WorkloadService {
21
22
  // remove clone as yaml/edit as yaml until API supported
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rancher/shell",
3
- "version": "3.0.0-rc.3",
3
+ "version": "3.0.0-rc.5",
4
4
  "description": "Rancher Dashboard Shell",
5
5
  "repository": "https://github.com/rancherlabs/dashboard",
6
6
  "license": "Apache-2.0",
@@ -27,9 +27,9 @@
27
27
  "e2e:dev": "start-server-and-test dev https://localhost:8005 cy:open"
28
28
  },
29
29
  "dependencies": {
30
- "@aws-sdk/client-ec2": "3.1.0",
30
+ "@aws-sdk/client-ec2": "3.658.1",
31
31
  "@aws-sdk/client-eks": "3.1.0",
32
- "@aws-sdk/client-iam": "3.18.0",
32
+ "@aws-sdk/client-iam": "3.658.1",
33
33
  "@aws-sdk/client-kms": "3.8.1",
34
34
  "@babel/plugin-proposal-optional-chaining": "7.14.5",
35
35
  "@babel/plugin-proposal-private-methods": "7.18.6",
@@ -53,7 +53,6 @@
53
53
  "babel-eslint": "10.1.0",
54
54
  "babel-plugin-module-resolver": "4.0.0",
55
55
  "babel-preset-vue": "2.0.2",
56
- "browser-env": "3.3.0",
57
56
  "clipboard-polyfill": "4.0.1",
58
57
  "codemirror": ">=5.64.0 <6",
59
58
  "codemirror-editor-vue3": "2.7.1",
@@ -99,7 +98,6 @@
99
98
  "js-yaml": "4.1.0",
100
99
  "js-yaml-loader": "1.2.2",
101
100
  "jsdiff": "1.1.1",
102
- "jsdom-global": "3.0.2",
103
101
  "jsonpath-plus": "6.0.1",
104
102
  "jsrsasign": "10.5.25",
105
103
  "jszip": "3.8.0",
@@ -123,13 +121,13 @@
123
121
  "unfetch": "4.2.0",
124
122
  "url-parse": "1.5.10",
125
123
  "vue": "~3.2.13",
126
- "vue-resize": "0.4.5",
127
124
  "vue-router": "4.4.3",
128
125
  "vue-select": "4.0.0-beta.6",
129
126
  "vue-server-renderer": "2.7.16",
130
127
  "vue-template-compiler": "2.7.16",
128
+ "vue3-resize": "0.2.0",
131
129
  "vue3-virtual-scroll-list": "0.2.1",
132
- "vuedraggable": "2.24.3",
130
+ "vuedraggable": "4.1.0",
133
131
  "vuex": "~4.0.0",
134
132
  "webpack-bundle-analyzer": "4.5.0",
135
133
  "webpack-virtual-modules": "0.4.3",
@@ -115,7 +115,9 @@ export default {
115
115
 
116
116
  watch: {
117
117
  '$route.query'(neu, old) {
118
- if ( !isEqual(neu, old) ) {
118
+ // If the query changes, refetch the chart
119
+ // When going back to app list, the query is empty and we don't want to refetch
120
+ if ( !isEqual(neu, old) && Object.keys(neu).length > 0 ) {
119
121
  this.$fetch();
120
122
  }
121
123
  },
@@ -5,6 +5,7 @@ import isEqual from 'lodash/isEqual';
5
5
  import { mapPref, DIFF } from '@shell/store/prefs';
6
6
  import { mapFeature, MULTI_CLUSTER, LEGACY } from '@shell/store/features';
7
7
  import { mapGetters } from 'vuex';
8
+ import { markRaw } from 'vue';
8
9
  import { Banner } from '@components/Banner';
9
10
  import ButtonGroup from '@shell/components/ButtonGroup';
10
11
  import ChartReadme from '@shell/components/ChartReadme';
@@ -260,14 +261,6 @@ export default {
260
261
  await this.loadValuesComponent();
261
262
  }
262
263
 
263
- /*
264
- Check if the Helm chart has indicated
265
- that the user should fill out the chart values
266
- through a wizard-style workflow. If so, load
267
- the chart steps.
268
- */
269
- await this.loadChartSteps();
270
-
271
264
  /*
272
265
  this.loadedVersion will only be true if you select a non-defalut
273
266
  option from the "Version" dropdown menu in Apps & Marketplace
@@ -451,10 +444,6 @@ export default {
451
444
  weight: 10
452
445
  },
453
446
 
454
- customSteps: [
455
-
456
- ],
457
-
458
447
  isPlainLayout: isPlainLayout(this.$route.query),
459
448
 
460
449
  legacyDefs: {
@@ -674,7 +663,6 @@ export default {
674
663
  steps.push(
675
664
  this.stepBasic,
676
665
  this.stepValues,
677
- ...this.customSteps
678
666
  );
679
667
  }
680
668
 
@@ -744,7 +732,9 @@ export default {
744
732
 
745
733
  watch: {
746
734
  '$route.query'(neu, old) {
747
- if ( !isEqual(neu, old) ) {
735
+ // If the query changes, refetch the chart
736
+ // When going back to app list, the query is empty and we don't want to refetch
737
+ if ( !isEqual(neu, old) && Object.keys(neu).length > 0 ) {
748
738
  this.$fetch();
749
739
  this.showSlideIn = false;
750
740
  }
@@ -824,10 +814,6 @@ export default {
824
814
  // for editing values
825
815
  await this.loadValuesComponent();
826
816
 
827
- // Load Helm chart info used for showing
828
- // wizard steps
829
- await this.loadChartSteps();
830
-
831
817
  window.scrollTop = 0;
832
818
 
833
819
  this.preFormYamlOption = this.valuesComponent || this.hasQuestions ? VALUES_STATE.FORM : VALUES_STATE.YAML;
@@ -908,7 +894,7 @@ export default {
908
894
  const hasChartComponent = this.$store.getters['type-map/hasCustomChart'](component);
909
895
 
910
896
  if ( hasChartComponent ) {
911
- this.valuesComponent = this.$store.getters['type-map/importChart'](component);
897
+ this.valuesComponent = markRaw(this.$store.getters['type-map/importChart'](component));
912
898
  this.showValuesComponent = true;
913
899
  } else {
914
900
  this.valuesComponent = null;
@@ -920,32 +906,6 @@ export default {
920
906
  }
921
907
  },
922
908
 
923
- async loadChartSteps() {
924
- const component = this.version?.annotations?.[CATALOG_ANNOTATIONS.COMPONENT];
925
-
926
- if ( component ) {
927
- const steps = await this.$store.getters['catalog/chartSteps'](component);
928
-
929
- this.customSteps = await Promise.all( steps.map((cs) => this.loadChartStep(cs)));
930
- }
931
- },
932
-
933
- async loadChartStep(customStep) {
934
- const loaded = await customStep.component();
935
- const withFallBack = this.$store.getters['i18n/withFallback'];
936
-
937
- return {
938
- name: customStep.name,
939
- label: withFallBack(loaded?.default?.label, null, customStep.name),
940
- subtext: withFallBack(loaded?.default?.subtext, null, ''),
941
- weight: loaded?.default?.weight,
942
- ready: false,
943
- hidden: true,
944
- loading: true,
945
- component: customStep.component,
946
- };
947
- },
948
-
949
909
  selectChart(chart) {
950
910
  if ( !chart ) {
951
911
  return;
@@ -1345,17 +1305,6 @@ export default {
1345
1305
  @cancel="cancel"
1346
1306
  @finish="finish"
1347
1307
  >
1348
- <template
1349
- v-for="customStep of customSteps"
1350
- v-slot:[customStep.name]
1351
- :key="customStep.name"
1352
- >
1353
- <component
1354
- :is="customStep.component"
1355
- @update="updateStep(customStep.name, $event)"
1356
- @errors="e=>errors.push(...e)"
1357
- />
1358
- </template>
1359
1308
  <template #bannerTitleImage>
1360
1309
  <div>
1361
1310
  <div class="logo-bg">
@@ -394,7 +394,6 @@ export default {
394
394
  </template>
395
395
  <template v-slot:content>
396
396
  <ResourceTable
397
- v-bind="$attrs"
398
397
  :schema="schema"
399
398
  :headers="headers"
400
399
  :rows="ws.repos"
@@ -14,6 +14,7 @@ import { clone } from '@shell/utils/object';
14
14
 
15
15
  export default {
16
16
  name: 'AlertmanagerConfigReceiverCreateEdit',
17
+ emits: ['error'],
17
18
  components: {
18
19
  ActionMenu,
19
20
  ButtonGroup,
@@ -5,6 +5,8 @@ import { Checkbox } from '@components/Form/Checkbox';
5
5
  export default {
6
6
  name: 'DefaultLinksEditor',
7
7
 
8
+ emits: ['update:value'],
9
+
8
10
  components: { Checkbox },
9
11
 
10
12
  props: {
@@ -318,7 +318,7 @@ export default {
318
318
  {{ t('performance.manualRefresh.setting') }}
319
319
  </p>
320
320
  <LabeledInput
321
- v-model.number="value.manualRefresh.threshold"
321
+ v-model:value.number="value.manualRefresh.threshold"
322
322
  :mode="mode"
323
323
  :label="t('performance.manualRefresh.inputLabel')"
324
324
  :disabled="!value.manualRefresh.enabled"
@@ -397,7 +397,7 @@ export default {
397
397
  {{ t('performance.gc.howRun.count.description') }}
398
398
  </p>
399
399
  <LabeledInput
400
- v-model.number="value.garbageCollection.countThreshold"
400
+ v-model:value.number="value.garbageCollection.countThreshold"
401
401
  :mode="mode"
402
402
  :label="t('performance.gc.howRun.count.inputLabel')"
403
403
  :disabled="!value.garbageCollection.enabled"
@@ -2,17 +2,12 @@
2
2
  import { CATALOG } from '@shell/config/types';
3
3
  import Dialog from '@shell/components/Dialog.vue';
4
4
  import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
5
- import {
6
- UI_PLUGINS_REPO_NAME,
7
- UI_PLUGINS_REPO_URL,
8
- UI_PLUGINS_REPO_BRANCH,
9
- UI_PLUGINS_PARTNERS_REPO_NAME,
10
- UI_PLUGINS_PARTNERS_REPO_URL,
11
- UI_PLUGINS_PARTNERS_REPO_BRANCH,
12
- } from '@shell/config/uiplugins';
5
+ import { UI_PLUGINS_REPOS } from '@shell/config/uiplugins';
13
6
  import { isRancherPrime } from '@shell/config/version';
14
7
 
15
8
  export default {
9
+ emits: ['done'],
10
+
16
11
  components: {
17
12
  Checkbox,
18
13
  Dialog,
@@ -36,15 +31,15 @@ export default {
36
31
  reposInfo: {
37
32
  official: {
38
33
  repo: undefined,
39
- name: UI_PLUGINS_REPO_NAME,
40
- url: UI_PLUGINS_REPO_URL,
41
- branch: UI_PLUGINS_REPO_BRANCH,
34
+ name: UI_PLUGINS_REPOS.OFFICIAL.NAME,
35
+ url: UI_PLUGINS_REPOS.OFFICIAL.URL,
36
+ branch: UI_PLUGINS_REPOS.OFFICIAL.BRANCH,
42
37
  },
43
38
  partners: {
44
39
  repo: undefined,
45
- name: UI_PLUGINS_PARTNERS_REPO_NAME,
46
- url: UI_PLUGINS_PARTNERS_REPO_URL,
47
- branch: UI_PLUGINS_PARTNERS_REPO_BRANCH,
40
+ name: UI_PLUGINS_REPOS.PARTNERS.NAME,
41
+ url: UI_PLUGINS_REPOS.PARTNERS.URL,
42
+ branch: UI_PLUGINS_REPOS.PARTNERS.BRANCH,
48
43
  }
49
44
  },
50
45
  isDialogActive: false,
@@ -53,10 +48,10 @@ export default {
53
48
 
54
49
  computed: {
55
50
  hasRancherUIPluginsRepo() {
56
- return !!this.repos.find((r) => r.urlDisplay === UI_PLUGINS_REPO_URL);
51
+ return !!this.repos.find((r) => r.urlDisplay === UI_PLUGINS_REPOS.OFFICIAL.URL);
57
52
  },
58
53
  hasRancherUIPartnersPluginsRepo() {
59
- return !!this.repos.find((r) => r.urlDisplay === UI_PLUGINS_PARTNERS_REPO_URL);
54
+ return !!this.repos.find((r) => r.urlDisplay === UI_PLUGINS_REPOS.PARTNERS.URL);
60
55
  }
61
56
  },
62
57
 
@@ -98,6 +98,8 @@ const initialState = () => {
98
98
  };
99
99
 
100
100
  export default {
101
+ emits: ['closed', 'refresh'],
102
+
101
103
  components: {
102
104
  AsyncButton, Banner, LabeledInput, Loading, LabeledSelect, AppModal,
103
105
  },
@@ -9,6 +9,8 @@ import AsyncButton from '@shell/components/AsyncButton';
9
9
  import AppModal from '@shell/components/AppModal.vue';
10
10
 
11
11
  export default {
12
+ emits: ['closed', 'refresh', 'update'],
13
+
12
14
  components: { AsyncButton, AppModal },
13
15
 
14
16
  async fetch() {
@@ -10,6 +10,8 @@ import { UI_PLUGIN_CATALOG } from '@shell/config/table-headers';
10
10
  import ResourceTable from '@shell/components/ResourceTable';
11
11
 
12
12
  export default {
13
+ emits: ['showCatalogUninstallDialog', 'showCatalogLoadDialog'],
14
+
13
15
  name: 'CatalogList',
14
16
 
15
17
  components: { ResourceTable },
@@ -4,9 +4,11 @@ import AppModal from '@shell/components/AppModal.vue';
4
4
  import { LabeledInput } from '@components/Form/LabeledInput';
5
5
  import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
6
6
  import { UI_PLUGIN } from '@shell/config/types';
7
- import { UI_PLUGIN_NAMESPACE } from '@shell/config/uiplugins';
7
+ import { UI_PLUGIN_CHART_ANNOTATIONS, UI_PLUGIN_NAMESPACE } from '@shell/config/uiplugins';
8
8
 
9
9
  export default {
10
+ emits: ['closed'],
11
+
10
12
  components: {
11
13
  AsyncButton,
12
14
  Checkbox,
@@ -105,8 +107,9 @@ export default {
105
107
  endpoint: url,
106
108
  noCache: true,
107
109
  metadata: {
108
- developer: 'true',
109
- direct: 'true'
110
+ developer: 'true',
111
+ direct: 'true',
112
+ [UI_PLUGIN_CHART_ANNOTATIONS.EXTENSIONS_VERSION]: '>= 3',
110
113
  },
111
114
  noAuth: true
112
115
  }
@@ -11,6 +11,8 @@ import { SETTING } from '@shell/config/settings';
11
11
  // Note: This dialog handles installation and update of a plugin
12
12
 
13
13
  export default {
14
+ emits: ['closed', 'update'],
15
+
14
16
  components: {
15
17
  AsyncButton,
16
18
  Banner,
@@ -65,10 +65,9 @@ export default {
65
65
  async loadPluginVersionInfo(version) {
66
66
  const versionName = version || this.info.displayVersion;
67
67
 
68
- const isVersionNotCompatibleWithUi = this.info.versions?.find((v) => v.version === versionName && !v.isCompatibleWithUi);
69
- const isVersionNotCompatibleWithKubeVersion = this.info.versions?.find((v) => v.version === versionName && !v.isCompatibleWithKubeVersion);
68
+ const isVersionNotCompatible = this.info.versions?.find((v) => v.version === versionName && !v.isVersionCompatible);
70
69
 
71
- if (!this.info.chart || isVersionNotCompatibleWithUi || isVersionNotCompatibleWithKubeVersion) {
70
+ if (!this.info.chart || isVersionNotCompatible) {
72
71
  return;
73
72
  }
74
73
 
@@ -107,18 +106,15 @@ export default {
107
106
  },
108
107
 
109
108
  handleVersionBtnTooltip(version) {
110
- if (version.requiredUiVersion) {
111
- return this.t('plugins.info.requiresRancherVersion', { version: version.requiredUiVersion });
112
- }
113
- if (version.requiredKubeVersion) {
114
- return this.t('plugins.info.requiresKubeVersion', { version: version.requiredKubeVersion });
109
+ if (!version.isVersionCompatible && Object.keys(version.versionIncompatibilityData).length) {
110
+ return this.t(version.versionIncompatibilityData?.tooltipKey, { required: version.versionIncompatibilityData?.required, mainHost: version.versionIncompatibilityData?.mainHost });
115
111
  }
116
112
 
117
113
  return '';
118
114
  },
119
115
 
120
116
  handleVersionBtnClass(version) {
121
- return { 'version-active': version.version === this.infoVersion, disabled: !version.isCompatibleWithUi || !version.isCompatibleWithKubeVersion };
117
+ return { 'version-active': version.version === this.infoVersion, disabled: !version.isVersionCompatible };
122
118
  }
123
119
  }
124
120
  };
@@ -185,12 +181,6 @@ export default {
185
181
  </div>
186
182
  </div>
187
183
  <div>
188
- <Banner
189
- v-if="info.error"
190
- color="error"
191
- :label="info.error"
192
- class="mt-10"
193
- />
194
184
  <Banner
195
185
  v-if="info.builtin"
196
186
  color="warning"
@@ -218,8 +208,8 @@ export default {
218
208
  </h3>
219
209
  <div class="plugin-versions mb-10">
220
210
  <div
221
- v-for="(v, i) in info.versions"
222
- :key="i"
211
+ v-for="v in info.versions"
212
+ :key="`${v.name}-${v.version}`"
223
213
  >
224
214
  <a
225
215
  v-clean-tooltip="handleVersionBtnTooltip(v)"
@@ -7,6 +7,8 @@ import { CATALOG } from '@shell/config/types';
7
7
  import { UI_PLUGIN_NAMESPACE } from '@shell/config/uiplugins';
8
8
 
9
9
  export default {
10
+ emits: ['closed', 'update'],
11
+
10
12
  components: {
11
13
  AsyncButton,
12
14
  AppModal,
@@ -1,9 +1,6 @@
1
1
  import { nextTick } from 'vue';
2
2
  import { mount } from '@vue/test-utils';
3
- import {
4
- UI_PLUGINS_REPO_URL,
5
- UI_PLUGINS_PARTNERS_REPO_URL,
6
- } from '@shell/config/uiplugins';
3
+ import { UI_PLUGINS_REPOS } from '@shell/config/uiplugins';
7
4
  import AddExtensionRepos from '@shell/pages/c/_cluster/uiplugins/AddExtensionRepos.vue';
8
5
  const mockedStore = () => {
9
6
  return {
@@ -13,8 +10,8 @@ const mockedStore = () => {
13
10
  t: (text: string) => text,
14
11
  'management/schemaFor': () => true,
15
12
  'management/findAll': () => [
16
- { urlDisplay: UI_PLUGINS_REPO_URL },
17
- { urlDisplay: UI_PLUGINS_PARTNERS_REPO_URL },
13
+ { urlDisplay: UI_PLUGINS_REPOS.OFFICIAL.URL },
14
+ { urlDisplay: UI_PLUGINS_REPOS.PARTNERS.URL },
18
15
  ]
19
16
  }
20
17
  };