dashboard-shell-shell 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1644) hide show
  1. package/.DS_Store +0 -0
  2. package/assets/brand/csp/dark/rancher-logo.svg +148 -0
  3. package/assets/brand/csp/favicon.png +0 -0
  4. package/assets/brand/csp/metadata.json +3 -0
  5. package/assets/brand/csp/rancher-logo.svg +130 -0
  6. package/assets/brand/federal/dark/rancher-logo.svg +104 -0
  7. package/assets/brand/federal/metadata.json +3 -0
  8. package/assets/brand/federal/rancher-logo.svg +1 -0
  9. package/assets/brand/harvester/favicon.png +0 -0
  10. package/assets/brand/harvester/metadata.json +3 -0
  11. package/assets/brand/rgs/dark/rancher-logo.svg +1 -0
  12. package/assets/brand/rgs/metadata.json +3 -0
  13. package/assets/brand/rgs/rancher-logo.svg +1 -0
  14. package/assets/brand/suse/dark/rancher-logo.svg +1 -0
  15. package/assets/brand/suse/favicon.png +0 -0
  16. package/assets/brand/suse/metadata.json +3 -0
  17. package/assets/brand/suse/rancher-logo.svg +1 -0
  18. package/assets/data/aws-regions.json +39 -0
  19. package/assets/data/ec2-instance-groups.json +85 -0
  20. package/assets/fonts/lato/lato-v17-latin-700.woff +0 -0
  21. package/assets/fonts/lato/lato-v17-latin-700.woff2 +0 -0
  22. package/assets/fonts/lato/lato-v17-latin-regular.woff +0 -0
  23. package/assets/fonts/lato/lato-v17-latin-regular.woff2 +0 -0
  24. package/assets/fonts/poppins/poppins-v15-latin-300.woff +0 -0
  25. package/assets/fonts/poppins/poppins-v15-latin-300.woff2 +0 -0
  26. package/assets/fonts/poppins/poppins-v15-latin-500.woff +0 -0
  27. package/assets/fonts/poppins/poppins-v15-latin-500.woff2 +0 -0
  28. package/assets/fonts/roboto-mono/roboto-mono-v13-latin-regular.woff +0 -0
  29. package/assets/fonts/roboto-mono/roboto-mono-v13-latin-regular.woff2 +0 -0
  30. package/assets/icons/demo.css +539 -0
  31. package/assets/icons/demo_index.html +1131 -0
  32. package/assets/icons/iconfont.css +216 -0
  33. package/assets/icons/iconfont.js +1 -0
  34. package/assets/icons/iconfont.json +324 -0
  35. package/assets/icons/iconfont.ttf +0 -0
  36. package/assets/icons/iconfont.woff +0 -0
  37. package/assets/icons/iconfont.woff2 +0 -0
  38. package/assets/images/API.svg +3 -0
  39. package/assets/images/featured/img1.jpg +0 -0
  40. package/assets/images/featured.jpg +0 -0
  41. package/assets/images/field-valid.svg +16 -0
  42. package/assets/images/generic-catalog.svg +15 -0
  43. package/assets/images/generic-driver.svg +17 -0
  44. package/assets/images/generic-plugin.svg +1 -0
  45. package/assets/images/login/password.svg +20 -0
  46. package/assets/images/login/user.svg +6 -0
  47. package/assets/images/login-bg.png +0 -0
  48. package/assets/images/login-left.png +0 -0
  49. package/assets/images/login-logo.svg +19 -0
  50. package/assets/images/logo.png +0 -0
  51. package/assets/images/pl/README.md +13 -0
  52. package/assets/images/pl/banner.svg +241 -0
  53. package/assets/images/pl/dark/banner.svg +242 -0
  54. package/assets/images/pl/dark/login-landscape.svg +291 -0
  55. package/assets/images/pl/dark/rancher-logo.svg +51 -0
  56. package/assets/images/pl/decoration-cloud-big-white.svg +1 -0
  57. package/assets/images/pl/decoration-ground.svg +1 -0
  58. package/assets/images/pl/error-desert-landscape.svg +217 -0
  59. package/assets/images/pl/half-logo.svg +2 -0
  60. package/assets/images/pl/harvester.png +0 -0
  61. package/assets/images/pl/harvester.svg +1 -0
  62. package/assets/images/pl/login-landscape.svg +496 -0
  63. package/assets/images/pl/rancher-logo.svg +51 -0
  64. package/assets/images/pl/setup-step-one.svg +612 -0
  65. package/assets/images/pl/sunglasses.svg +20 -0
  66. package/assets/images/promp-yellow.svg +5 -0
  67. package/assets/images/providers/aliyun-black.svg +14 -0
  68. package/assets/images/providers/aliyun.svg +17 -0
  69. package/assets/images/providers/aliyunecs-black.svg +13 -0
  70. package/assets/images/providers/aliyunecs.svg +21 -0
  71. package/assets/images/providers/amazonec2-black.svg +8 -0
  72. package/assets/images/providers/amazonec2.svg +19 -0
  73. package/assets/images/providers/amazoneks-black.svg +10 -0
  74. package/assets/images/providers/amazoneks.svg +14 -0
  75. package/assets/images/providers/aws.svg +38 -0
  76. package/assets/images/providers/azure-black.svg +29 -0
  77. package/assets/images/providers/azure.svg +32 -0
  78. package/assets/images/providers/azuread-black.svg +22 -0
  79. package/assets/images/providers/azuread.svg +25 -0
  80. package/assets/images/providers/azureaks-black.svg +28 -0
  81. package/assets/images/providers/azureaks.svg +31 -0
  82. package/assets/images/providers/baidu-black.svg +19 -0
  83. package/assets/images/providers/baidu.svg +25 -0
  84. package/assets/images/providers/cloudca-black.svg +45 -0
  85. package/assets/images/providers/cloudca.svg +49 -0
  86. package/assets/images/providers/cloudscale-black.svg +24 -0
  87. package/assets/images/providers/cloudscale.svg +28 -0
  88. package/assets/images/providers/custom.svg +85 -0
  89. package/assets/images/providers/digitalocean-black.svg +21 -0
  90. package/assets/images/providers/digitalocean.svg +24 -0
  91. package/assets/images/providers/equinix-black.svg +13 -0
  92. package/assets/images/providers/equinix.svg +13 -0
  93. package/assets/images/providers/exoscale.svg +1 -0
  94. package/assets/images/providers/gcp.svg +6 -0
  95. package/assets/images/providers/gke-black.svg +10 -0
  96. package/assets/images/providers/gke.svg +28 -0
  97. package/assets/images/providers/google.svg +29 -0
  98. package/assets/images/providers/googlegke-black.svg +10 -0
  99. package/assets/images/providers/googlegke.svg +28 -0
  100. package/assets/images/providers/harvester.svg +1 -0
  101. package/assets/images/providers/huaweicce-black.svg +109 -0
  102. package/assets/images/providers/huaweicce.svg +184 -0
  103. package/assets/images/providers/import.svg +99 -0
  104. package/assets/images/providers/k3s-black.svg +10 -0
  105. package/assets/images/providers/k3s.svg +15 -0
  106. package/assets/images/providers/kubernetes-black.svg +37 -0
  107. package/assets/images/providers/kubernetes.svg +99 -0
  108. package/assets/images/providers/linode.svg +54 -0
  109. package/assets/images/providers/linodelke-black.svg +40 -0
  110. package/assets/images/providers/linodelke.svg +54 -0
  111. package/assets/images/providers/local-cluster.svg +20 -0
  112. package/assets/images/providers/minikube-black.svg +25 -0
  113. package/assets/images/providers/minikube.svg +36 -0
  114. package/assets/images/providers/nutanix.svg +12 -0
  115. package/assets/images/providers/oci-black.svg +41 -0
  116. package/assets/images/providers/oci.svg +44 -0
  117. package/assets/images/providers/openstack-black.svg +16 -0
  118. package/assets/images/providers/openstack.svg +20 -0
  119. package/assets/images/providers/oracle.svg +66 -0
  120. package/assets/images/providers/oracleoke-black.svg +51 -0
  121. package/assets/images/providers/oracleoke.svg +55 -0
  122. package/assets/images/providers/otc-black.svg +15 -0
  123. package/assets/images/providers/otc.svg +33 -0
  124. package/assets/images/providers/otccce.svg +33 -0
  125. package/assets/images/providers/outscale.svg +19 -0
  126. package/assets/images/providers/ovhcloudmks.svg +122 -0
  127. package/assets/images/providers/ovhcloudpubliccloud.svg +122 -0
  128. package/assets/images/providers/packet-black.svg +15 -0
  129. package/assets/images/providers/packet.svg +16 -0
  130. package/assets/images/providers/pinganyunecs-black.svg +26 -0
  131. package/assets/images/providers/pinganyunecs.svg +26 -0
  132. package/assets/images/providers/pnap-black.svg +43 -0
  133. package/assets/images/providers/pnap.svg +48 -0
  134. package/assets/images/providers/rackspace-black.svg +14 -0
  135. package/assets/images/providers/rackspace.svg +18 -0
  136. package/assets/images/providers/rke.svg +26 -0
  137. package/assets/images/providers/rke2.svg +26 -0
  138. package/assets/images/providers/softlayer.svg +27 -0
  139. package/assets/images/providers/tencenttke-black.svg +22 -0
  140. package/assets/images/providers/tencenttke.svg +39 -0
  141. package/assets/images/providers/vmwarevsphere-black.svg +60 -0
  142. package/assets/images/providers/vmwarevsphere.svg +51 -0
  143. package/assets/images/user.png +0 -0
  144. package/assets/images/vendor/activedirectory.svg +20 -0
  145. package/assets/images/vendor/adfs.svg +19 -0
  146. package/assets/images/vendor/azuread.svg +18 -0
  147. package/assets/images/vendor/custom.svg +42 -0
  148. package/assets/images/vendor/email.svg +22 -0
  149. package/assets/images/vendor/freeipa.svg +26 -0
  150. package/assets/images/vendor/github.svg +13 -0
  151. package/assets/images/vendor/googleoauth.svg +9 -0
  152. package/assets/images/vendor/grafana.svg +48 -0
  153. package/assets/images/vendor/jaeger.svg +1 -0
  154. package/assets/images/vendor/keycloak.svg +30 -0
  155. package/assets/images/vendor/kiali.svg +23 -0
  156. package/assets/images/vendor/linux.svg +23 -0
  157. package/assets/images/vendor/longhorn.svg +25 -0
  158. package/assets/images/vendor/neuvector.svg +1 -0
  159. package/assets/images/vendor/okta.svg +31 -0
  160. package/assets/images/vendor/openid.svg +18 -0
  161. package/assets/images/vendor/openldap.svg +34 -0
  162. package/assets/images/vendor/pagerduty.svg +26 -0
  163. package/assets/images/vendor/ping.svg +58 -0
  164. package/assets/images/vendor/prometheus.svg +14 -0
  165. package/assets/images/vendor/shibboleth.svg +481 -0
  166. package/assets/images/vendor/slack.svg +38 -0
  167. package/assets/images/vendor/webhook.svg +23 -0
  168. package/assets/images/vendor/windows.svg +13 -0
  169. package/assets/images/wechat-qr-code.jpg +0 -0
  170. package/assets/styles/all.scss +63 -0
  171. package/assets/styles/app.scss +36 -0
  172. package/assets/styles/base/_basic.scss +152 -0
  173. package/assets/styles/base/_color.scss +11 -0
  174. package/assets/styles/base/_functions.scss +134 -0
  175. package/assets/styles/base/_helpers.scss +271 -0
  176. package/assets/styles/base/_mixins.scss +163 -0
  177. package/assets/styles/base/_typography.scss +70 -0
  178. package/assets/styles/base/_variables.scss +78 -0
  179. package/assets/styles/fonts/_dots.scss +18 -0
  180. package/assets/styles/fonts/_fontstack.scss +49 -0
  181. package/assets/styles/fonts/_icons.scss +101 -0
  182. package/assets/styles/fonts/_zerowidthspace.scss +8 -0
  183. package/assets/styles/global/_button.scss +234 -0
  184. package/assets/styles/global/_cards.scss +94 -0
  185. package/assets/styles/global/_columns.scss +128 -0
  186. package/assets/styles/global/_form.scss +178 -0
  187. package/assets/styles/global/_gauges.scss +55 -0
  188. package/assets/styles/global/_labeled-input.scss +165 -0
  189. package/assets/styles/global/_layout.scss +171 -0
  190. package/assets/styles/global/_resource.scss +89 -0
  191. package/assets/styles/global/_select.scss +202 -0
  192. package/assets/styles/global/_table.scss +106 -0
  193. package/assets/styles/global/_tooltip.scss +206 -0
  194. package/assets/styles/themes/_csp.scss +25 -0
  195. package/assets/styles/themes/_dark.scss +233 -0
  196. package/assets/styles/themes/_light.scss +569 -0
  197. package/assets/styles/themes/_suse.scss +27 -0
  198. package/assets/styles/vendor/_code-mirror.scss +3 -0
  199. package/assets/styles/vendor/normalize.scss +349 -0
  200. package/assets/styles/vendor/vue-select.scss +403 -0
  201. package/assets/translations/en-us.yaml +8184 -0
  202. package/assets/translations/zh-hans.yaml +7825 -0
  203. package/babel.config.js +35 -0
  204. package/chart/__tests__/S3.test.ts +64 -0
  205. package/chart/example.vue +18 -0
  206. package/chart/gatekeeper.vue +69 -0
  207. package/chart/istio.vue +284 -0
  208. package/chart/logging/index.vue +84 -0
  209. package/chart/monitoring/ClusterSelector.vue +215 -0
  210. package/chart/monitoring/StorageClassSelector.vue +49 -0
  211. package/chart/monitoring/alerting/index.vue +188 -0
  212. package/chart/monitoring/grafana/index.vue +378 -0
  213. package/chart/monitoring/index.vue +366 -0
  214. package/chart/monitoring/prometheus/index.vue +376 -0
  215. package/chart/rancher-backup/S3.vue +190 -0
  216. package/chart/rancher-backup/index.vue +260 -0
  217. package/cloud-credential/__tests__/azure.test.ts +43 -0
  218. package/cloud-credential/__tests__/harvester.test.ts +18 -0
  219. package/cloud-credential/aws.vue +111 -0
  220. package/cloud-credential/azure.vue +132 -0
  221. package/cloud-credential/digitalocean.vue +55 -0
  222. package/cloud-credential/gcp.vue +82 -0
  223. package/cloud-credential/generic.vue +100 -0
  224. package/cloud-credential/harvester.vue +125 -0
  225. package/cloud-credential/linode.vue +58 -0
  226. package/cloud-credential/pnap.vue +92 -0
  227. package/cloud-credential/s3.vue +143 -0
  228. package/cloud-credential/vmwarevsphere.vue +109 -0
  229. package/components/ActionDropdown.vue +248 -0
  230. package/components/ActionDropdownShell.vue +71 -0
  231. package/components/ActionMenu.vue +366 -0
  232. package/components/ActionMenuShell.vue +106 -0
  233. package/components/AdvancedSection.vue +40 -0
  234. package/components/Alert.vue +55 -0
  235. package/components/AlertTable.vue +123 -0
  236. package/components/AppModal.vue +307 -0
  237. package/components/AssignTo.vue +199 -0
  238. package/components/AsyncButton.vue +332 -0
  239. package/components/AwsComplianceBanner.vue +47 -0
  240. package/components/BackLink.vue +44 -0
  241. package/components/BannerGraphic.vue +95 -0
  242. package/components/BrandImage.vue +135 -0
  243. package/components/ButtonDropdown.vue +340 -0
  244. package/components/ButtonGroup.vue +124 -0
  245. package/components/ButtonMultiAction.vue +52 -0
  246. package/components/Carousel.vue +397 -0
  247. package/components/Certificates.vue +161 -0
  248. package/components/ChartHeading.vue +25 -0
  249. package/components/ChartReadme.vue +100 -0
  250. package/components/ClusterBadge.vue +48 -0
  251. package/components/ClusterIconMenu.vue +189 -0
  252. package/components/ClusterProviderIcon.vue +131 -0
  253. package/components/CodeMirror.vue +501 -0
  254. package/components/Collapse.vue +87 -0
  255. package/components/CollapsibleCard.vue +121 -0
  256. package/components/CommunityLinks.vue +216 -0
  257. package/components/CompoundStatusBadge.vue +53 -0
  258. package/components/ConsumptionGauge.vue +167 -0
  259. package/components/ContainerResourceLimit.vue +254 -0
  260. package/components/CopyCode.vue +74 -0
  261. package/components/CopyToClipboard.vue +44 -0
  262. package/components/CopyToClipboardText.vue +83 -0
  263. package/components/CountBox.vue +114 -0
  264. package/components/CountGauge.vue +180 -0
  265. package/components/CreateDriver.vue +81 -0
  266. package/components/CruResource.vue +936 -0
  267. package/components/CruResourceFooter.vue +127 -0
  268. package/components/DashboardMetrics.vue +125 -0
  269. package/components/DashboardOptions.vue +159 -0
  270. package/components/DetailText.vue +220 -0
  271. package/components/DetailTop.vue +374 -0
  272. package/components/Dialog.vue +136 -0
  273. package/components/DisableAuthProviderModal.vue +115 -0
  274. package/components/DotState.vue +84 -0
  275. package/components/DraggableZone.vue +181 -0
  276. package/components/EmberPage.vue +622 -0
  277. package/components/EmberPageView.vue +39 -0
  278. package/components/EtcdInfoBanner.vue +76 -0
  279. package/components/ExplorerMembers.vue +453 -0
  280. package/components/ExplorerProjectsNamespaces.vue +654 -0
  281. package/components/ExtensionPanel.vue +42 -0
  282. package/components/FileDiff.vue +184 -0
  283. package/components/FixedBanner.vue +284 -0
  284. package/components/Flag.vue +83 -0
  285. package/components/Glance.vue +79 -0
  286. package/components/GlobalRoleBindings.vue +429 -0
  287. package/components/GradientBox.vue +82 -0
  288. package/components/GrafanaDashboard.vue +321 -0
  289. package/components/GroupPanel.vue +57 -0
  290. package/components/GrowlManager.vue +215 -0
  291. package/components/HardwareResourceGauge.vue +206 -0
  292. package/components/HarvesterServiceAddOnConfig.vue +207 -0
  293. package/components/IconMessage.vue +101 -0
  294. package/components/IconOrSvg.vue +184 -0
  295. package/components/Import.vue +260 -0
  296. package/components/Inactivity.vue +236 -0
  297. package/components/IndentedPanel.vue +26 -0
  298. package/components/InfoBox.vue +84 -0
  299. package/components/InputOrDisplay.vue +91 -0
  300. package/components/KeyValueView.vue +283 -0
  301. package/components/LabelValue.vue +61 -0
  302. package/components/LandingPagePreference.vue +154 -0
  303. package/components/LazyImage.vue +70 -0
  304. package/components/Loading.vue +85 -0
  305. package/components/LocaleSelector.vue +121 -0
  306. package/components/LogItem.vue +69 -0
  307. package/components/Markdown.vue +138 -0
  308. package/components/MessageLink.vue +79 -0
  309. package/components/ModalManager.vue +55 -0
  310. package/components/ModalWithCard.vue +147 -0
  311. package/components/MoveModal.vue +167 -0
  312. package/components/PaginatedResourceTable.vue +133 -0
  313. package/components/PercentageBar.vue +127 -0
  314. package/components/PodSecurityAdmission.vue +306 -0
  315. package/components/ProgressBarMulti.vue +173 -0
  316. package/components/PromptChangePassword.vue +123 -0
  317. package/components/PromptModal.vue +122 -0
  318. package/components/PromptRemove.vue +491 -0
  319. package/components/PromptRestore.vue +328 -0
  320. package/components/Questions/Array.vue +38 -0
  321. package/components/Questions/Boolean.vue +37 -0
  322. package/components/Questions/CloudCredential.vue +54 -0
  323. package/components/Questions/Enum.vue +53 -0
  324. package/components/Questions/Float.vue +41 -0
  325. package/components/Questions/Int.vue +41 -0
  326. package/components/Questions/Question.js +145 -0
  327. package/components/Questions/QuestionMap.vue +45 -0
  328. package/components/Questions/Radio.vue +35 -0
  329. package/components/Questions/Reference.vue +167 -0
  330. package/components/Questions/String.vue +51 -0
  331. package/components/Questions/Yaml.vue +48 -0
  332. package/components/Questions/__tests__/Boolean.test.ts +125 -0
  333. package/components/Questions/__tests__/Float.test.ts +125 -0
  334. package/components/Questions/__tests__/Int.test.ts +125 -0
  335. package/components/Questions/__tests__/String.test.ts +125 -0
  336. package/components/Questions/__tests__/Yaml.test.ts +125 -0
  337. package/components/Questions/__tests__/utils/questions-defaults.ts +20 -0
  338. package/components/Questions/index.vue +522 -0
  339. package/components/Random.vue +100 -0
  340. package/components/RelatedResources.vue +187 -0
  341. package/components/ResourceCancelModal.vue +128 -0
  342. package/components/ResourceDetail/Masthead.vue +838 -0
  343. package/components/ResourceDetail/__tests__/Masthead.test.ts +65 -0
  344. package/components/ResourceDetail/index.vue +572 -0
  345. package/components/ResourceList/Masthead.vue +311 -0
  346. package/components/ResourceList/ResourceLoadingIndicator.vue +137 -0
  347. package/components/ResourceList/index.vue +307 -0
  348. package/components/ResourceList/resource-list.config.js +7 -0
  349. package/components/ResourceSummary.vue +173 -0
  350. package/components/ResourceTable.vue +708 -0
  351. package/components/ResourceYaml.vue +403 -0
  352. package/components/RoleBindings.vue +470 -0
  353. package/components/SelectIconGrid.vue +414 -0
  354. package/components/Setting.vue +115 -0
  355. package/components/SideNav.vue +589 -0
  356. package/components/SimpleBox.vue +121 -0
  357. package/components/SingleClusterInfo.vue +199 -0
  358. package/components/SlideInPanelManager.vue +126 -0
  359. package/components/SortableTable/THead.vue +555 -0
  360. package/components/SortableTable/actions.js +153 -0
  361. package/components/SortableTable/advanced-filtering.js +272 -0
  362. package/components/SortableTable/debug.js +117 -0
  363. package/components/SortableTable/filtering.js +290 -0
  364. package/components/SortableTable/grouping.js +48 -0
  365. package/components/SortableTable/index.vue +2604 -0
  366. package/components/SortableTable/paging.js +155 -0
  367. package/components/SortableTable/selection.js +629 -0
  368. package/components/SortableTable/sortable-config.ts +4 -0
  369. package/components/SortableTable/sorting.js +129 -0
  370. package/components/StatusBadge.vue +77 -0
  371. package/components/StatusTable.vue +61 -0
  372. package/components/TabTitle.vue +78 -0
  373. package/components/Tabbed/Tab.vue +129 -0
  374. package/components/Tabbed/index.vue +587 -0
  375. package/components/TableDataUserIcon.vue +47 -0
  376. package/components/TableSparkLine.vue +108 -0
  377. package/components/Tag.vue +19 -0
  378. package/components/Tip.vue +43 -0
  379. package/components/TypeDescription.vue +65 -0
  380. package/components/Wizard.vue +704 -0
  381. package/components/YamlEditor.vue +296 -0
  382. package/components/__tests__/AppModal.test.ts +106 -0
  383. package/components/__tests__/ApplicationCard.test.ts +27 -0
  384. package/components/__tests__/AsyncButton.test.ts +148 -0
  385. package/components/__tests__/BackLink.test.ts +33 -0
  386. package/components/__tests__/ButtonGroup.test.ts +121 -0
  387. package/components/__tests__/ButtonMultiAction.test.ts +31 -0
  388. package/components/__tests__/Carousel.test.ts +72 -0
  389. package/components/__tests__/Certificates.test.ts +31 -0
  390. package/components/__tests__/ClusterBadge.test.ts +32 -0
  391. package/components/__tests__/CodeMirror.test.ts +93 -0
  392. package/components/__tests__/Collapse.test.ts +44 -0
  393. package/components/__tests__/CollapsibleCard.test.ts +64 -0
  394. package/components/__tests__/ConsumptionGauge.test.ts +88 -0
  395. package/components/__tests__/ContainerResourceLimit.test.ts +35 -0
  396. package/components/__tests__/CopyCode.test.ts +16 -0
  397. package/components/__tests__/CruResource.test.ts +155 -0
  398. package/components/__tests__/EtcdInfoBanner.test.ts +39 -0
  399. package/components/__tests__/FixedBanner.test.ts +114 -0
  400. package/components/__tests__/GrowlManager.test.ts +146 -0
  401. package/components/__tests__/ModalManager.spec.ts +176 -0
  402. package/components/__tests__/NamespaceFilter.test.ts +247 -0
  403. package/components/__tests__/PercentageBar.test.ts +32 -0
  404. package/components/__tests__/PodSecurityAdmission.test.ts +440 -0
  405. package/components/__tests__/ProjectRow.test.ts +59 -0
  406. package/components/__tests__/PromptRestore.test.ts +139 -0
  407. package/components/__tests__/SimpleBox.spec.ts +28 -0
  408. package/components/__tests__/SlideInPanelManager.spec.ts +166 -0
  409. package/components/__tests__/TabTitle.test.ts +136 -0
  410. package/components/auth/AllowedPrincipals.vue +122 -0
  411. package/components/auth/AuthBanner.vue +104 -0
  412. package/components/auth/AzureWarning.vue +77 -0
  413. package/components/auth/Principal.vue +219 -0
  414. package/components/auth/RoleDetailEdit.vue +808 -0
  415. package/components/auth/SelectPrincipal.vue +260 -0
  416. package/components/auth/__tests__/Principal.test.ts +40 -0
  417. package/components/auth/__tests__/RoleDetailEdit.test.ts +84 -0
  418. package/components/auth/login/github.vue +23 -0
  419. package/components/auth/login/ldap.vue +106 -0
  420. package/components/auth/login/oauth.vue +26 -0
  421. package/components/auth/login/oidc.vue +32 -0
  422. package/components/auth/login/saml.vue +39 -0
  423. package/components/cards/ApplicationCard.vue +145 -0
  424. package/components/fleet/FleetBundleResources.vue +86 -0
  425. package/components/fleet/FleetBundles.vue +136 -0
  426. package/components/fleet/FleetClusters.vue +208 -0
  427. package/components/fleet/FleetIntro.vue +65 -0
  428. package/components/fleet/FleetNoWorkspaces.vue +62 -0
  429. package/components/fleet/FleetRepos.vue +184 -0
  430. package/components/fleet/FleetResources.vue +83 -0
  431. package/components/fleet/FleetStatus.vue +301 -0
  432. package/components/fleet/FleetSummary.vue +210 -0
  433. package/components/fleet/ForceDirectedTreeChart/chartIcons.js +17 -0
  434. package/components/fleet/ForceDirectedTreeChart/index.vue +565 -0
  435. package/components/fleet/ResourcesSummary.vue +93 -0
  436. package/components/fleet/__tests__/FleetSummary.test.ts +362 -0
  437. package/components/form/ArrayList.vue +456 -0
  438. package/components/form/ArrayListGrouped.vue +149 -0
  439. package/components/form/ArrayListSelect.vue +103 -0
  440. package/components/form/BannerSettings.vue +220 -0
  441. package/components/form/ChangePassword.vue +461 -0
  442. package/components/form/ClusterAppearance.vue +132 -0
  443. package/components/form/ColorInput.vue +200 -0
  444. package/components/form/Command.vue +204 -0
  445. package/components/form/Conditions.vue +93 -0
  446. package/components/form/EnvVars.vue +162 -0
  447. package/components/form/Error.vue +66 -0
  448. package/components/form/FileImageSelector.vue +140 -0
  449. package/components/form/FileSelector.vue +169 -0
  450. package/components/form/Footer.vue +119 -0
  451. package/components/form/GitPicker.vue +590 -0
  452. package/components/form/HealthCheck.vue +86 -0
  453. package/components/form/HookOption.vue +253 -0
  454. package/components/form/InputWithSelect.vue +330 -0
  455. package/components/form/KeyValue.vue +991 -0
  456. package/components/form/LabeledSelect.vue +719 -0
  457. package/components/form/Labels.vue +154 -0
  458. package/components/form/LifecycleHooks.vue +87 -0
  459. package/components/form/MatchExpressions.vue +471 -0
  460. package/components/form/Members/ClusterMembershipEditor.vue +61 -0
  461. package/components/form/Members/ClusterPermissionsEditor.vue +314 -0
  462. package/components/form/Members/MembershipEditor.vue +230 -0
  463. package/components/form/Members/ProjectMembershipEditor.vue +63 -0
  464. package/components/form/Members/__tests__/MembershipEditor.test.ts +62 -0
  465. package/components/form/NameNsDescription.vue +601 -0
  466. package/components/form/Networking.vue +281 -0
  467. package/components/form/NodeAffinity.vue +258 -0
  468. package/components/form/NodeScheduling.vue +212 -0
  469. package/components/form/NotificationSettings.vue +71 -0
  470. package/components/form/Password.vue +191 -0
  471. package/components/form/PlusMinus.vue +109 -0
  472. package/components/form/PodAffinity.vue +496 -0
  473. package/components/form/Ports.vue +310 -0
  474. package/components/form/Probe.vue +376 -0
  475. package/components/form/ProjectMemberEditor.vue +342 -0
  476. package/components/form/ResourceLabeledSelect.vue +154 -0
  477. package/components/form/ResourceQuota/Namespace.vue +117 -0
  478. package/components/form/ResourceQuota/NamespaceRow.vue +220 -0
  479. package/components/form/ResourceQuota/Project.vue +107 -0
  480. package/components/form/ResourceQuota/ProjectRow.vue +115 -0
  481. package/components/form/ResourceQuota/shared.js +147 -0
  482. package/components/form/ResourceSelector.vue +144 -0
  483. package/components/form/ResourceTabs/index.vue +292 -0
  484. package/components/form/RuleSelector.vue +184 -0
  485. package/components/form/SSHKnownHosts/KnownHostsEditDialog.vue +196 -0
  486. package/components/form/SSHKnownHosts/__tests__/KnownHostsEditDialog.test.ts +115 -0
  487. package/components/form/SSHKnownHosts/index.vue +115 -0
  488. package/components/form/SchedulingCustomization.vue +85 -0
  489. package/components/form/SecretSelector.vue +269 -0
  490. package/components/form/Security.vue +245 -0
  491. package/components/form/Select.vue +407 -0
  492. package/components/form/SelectOrCreateAuthSecret.vue +693 -0
  493. package/components/form/ServiceNameSelect.vue +168 -0
  494. package/components/form/ServicePorts.vue +340 -0
  495. package/components/form/ShellInput.vue +95 -0
  496. package/components/form/SimpleSecretSelector.vue +278 -0
  497. package/components/form/Taints.vue +98 -0
  498. package/components/form/Tolerations.vue +319 -0
  499. package/components/form/UnitInput.vue +257 -0
  500. package/components/form/ValueFromResource.vue +407 -0
  501. package/components/form/WorkloadPorts.vue +514 -0
  502. package/components/form/__tests__/ArrayList.test.ts +127 -0
  503. package/components/form/__tests__/ArrayListGrouped.test.ts +41 -0
  504. package/components/form/__tests__/BannerSettings.test.ts +54 -0
  505. package/components/form/__tests__/ColorInput.test.ts +27 -0
  506. package/components/form/__tests__/Command.test.ts +64 -0
  507. package/components/form/__tests__/Error.test.ts +56 -0
  508. package/components/form/__tests__/FileImageSelector.test.ts +42 -0
  509. package/components/form/__tests__/FileSelector.test.ts +76 -0
  510. package/components/form/__tests__/HookOption.test.ts +28 -0
  511. package/components/form/__tests__/InputWithSelect.test.ts +42 -0
  512. package/components/form/__tests__/KeyValue.test.ts +179 -0
  513. package/components/form/__tests__/LabeledSelect.test.ts +217 -0
  514. package/components/form/__tests__/MatchExpressions.test.ts +78 -0
  515. package/components/form/__tests__/NameNsDescription.test.ts +173 -0
  516. package/components/form/__tests__/NodeAffinity.test.ts +39 -0
  517. package/components/form/__tests__/NodeScheduling.test.ts +44 -0
  518. package/components/form/__tests__/PodAffinity.test.ts +47 -0
  519. package/components/form/__tests__/Probe.test.ts +78 -0
  520. package/components/form/__tests__/SSHKnownHosts.test.ts +70 -0
  521. package/components/form/__tests__/Security.test.ts +55 -0
  522. package/components/form/__tests__/Select.test.ts +67 -0
  523. package/components/form/__tests__/SelectOrCreateAuthSecret.test.ts +34 -0
  524. package/components/form/__tests__/ServiceNameSelect.test.ts +42 -0
  525. package/components/form/__tests__/Taints.test.ts +71 -0
  526. package/components/form/__tests__/UnitInput.test.ts +255 -0
  527. package/components/form/labeled-select-utils/labeled-select-pagination.ts +151 -0
  528. package/components/form/labeled-select-utils/labeled-select.utils.ts +122 -0
  529. package/components/formatter/AppSummaryGraph.vue +154 -0
  530. package/components/formatter/BadgeStateFormatter.vue +66 -0
  531. package/components/formatter/Capitalize.vue +28 -0
  532. package/components/formatter/Checked.vue +31 -0
  533. package/components/formatter/CloudCredExpired.vue +69 -0
  534. package/components/formatter/CloudCredPublicData.vue +30 -0
  535. package/components/formatter/ClusterLink.vue +117 -0
  536. package/components/formatter/ClusterProvider.vue +38 -0
  537. package/components/formatter/CopyToClipboard.vue +18 -0
  538. package/components/formatter/Date.vue +74 -0
  539. package/components/formatter/DelayedValue.vue +46 -0
  540. package/components/formatter/Endpoints.vue +106 -0
  541. package/components/formatter/ExternalLink.vue +11 -0
  542. package/components/formatter/FleetClusterSummaryGraph.vue +27 -0
  543. package/components/formatter/FleetSummaryGraph.vue +122 -0
  544. package/components/formatter/IconIsDefault.vue +34 -0
  545. package/components/formatter/IconText.vue +49 -0
  546. package/components/formatter/ImageName.vue +23 -0
  547. package/components/formatter/ImagePercentageBar.vue +86 -0
  548. package/components/formatter/IngressFullPath.vue +22 -0
  549. package/components/formatter/IngressTarget.vue +96 -0
  550. package/components/formatter/InternalExternalIP.vue +64 -0
  551. package/components/formatter/InvolvedObjectLink.vue +54 -0
  552. package/components/formatter/KeyValue.vue +78 -0
  553. package/components/formatter/Link.vue +189 -0
  554. package/components/formatter/LinkDetail.vue +58 -0
  555. package/components/formatter/LinkDetailImage.vue +31 -0
  556. package/components/formatter/LinkName.vue +66 -0
  557. package/components/formatter/List.vue +22 -0
  558. package/components/formatter/ListLink.vue +37 -0
  559. package/components/formatter/ListLinkDetail.vue +30 -0
  560. package/components/formatter/LiveDate.vue +167 -0
  561. package/components/formatter/LiveDuration.vue +78 -0
  562. package/components/formatter/LiveExpiryBadgeState.vue +79 -0
  563. package/components/formatter/LiveExpiryDate.vue +87 -0
  564. package/components/formatter/LivePodRestarts.vue +50 -0
  565. package/components/formatter/MachineSummaryGraph.vue +108 -0
  566. package/components/formatter/Number.vue +34 -0
  567. package/components/formatter/Percentage.vue +25 -0
  568. package/components/formatter/PercentageBar.vue +41 -0
  569. package/components/formatter/PodImages.vue +72 -0
  570. package/components/formatter/PodsUsage.vue +29 -0
  571. package/components/formatter/Principal.vue +22 -0
  572. package/components/formatter/PrincipalGroupBindings.vue +59 -0
  573. package/components/formatter/QualityText.vue +21 -0
  574. package/components/formatter/RKETemplateName.vue +37 -0
  575. package/components/formatter/ReceiverIcons.vue +132 -0
  576. package/components/formatter/RunBookLink.vue +20 -0
  577. package/components/formatter/Scale.vue +143 -0
  578. package/components/formatter/ScanResult.vue +33 -0
  579. package/components/formatter/SecretData.vue +68 -0
  580. package/components/formatter/ServiceTargets.vue +121 -0
  581. package/components/formatter/ServiceType.vue +54 -0
  582. package/components/formatter/Shortened.vue +55 -0
  583. package/components/formatter/Si.vue +46 -0
  584. package/components/formatter/Translate.vue +32 -0
  585. package/components/formatter/VerticalScroll.vue +17 -0
  586. package/components/formatter/VirtualServiceGateways.vue +111 -0
  587. package/components/formatter/WorkloadDetailEndpoints.vue +107 -0
  588. package/components/formatter/WorkloadHealthScale.vue +339 -0
  589. package/components/formatter/__tests__/Checked.test.ts +19 -0
  590. package/components/formatter/__tests__/ClusterLink.test.ts +101 -0
  591. package/components/formatter/__tests__/Date.test.ts +60 -0
  592. package/components/formatter/__tests__/LinkDetail.test.ts +72 -0
  593. package/components/formatter/__tests__/LiveDate.test.ts +90 -0
  594. package/components/formatter/__tests__/PodsUsage.test.ts +55 -0
  595. package/components/formatter/__tests__/Si.test.ts +35 -0
  596. package/components/formatter/__tests__/WorkloadDetailEndpoints.test.ts +81 -0
  597. package/components/graph/AspectPreserver.vue +79 -0
  598. package/components/graph/Bar.vue +81 -0
  599. package/components/graph/Circle.vue +164 -0
  600. package/components/graph/HalfCircle.vue +46 -0
  601. package/components/graph/LinePlot.vue +189 -0
  602. package/components/graph/ProgressArc.vue +94 -0
  603. package/components/nav/Favorite.vue +60 -0
  604. package/components/nav/GlobalLoading.vue +25 -0
  605. package/components/nav/Group.vue +496 -0
  606. package/components/nav/Header.vue +1182 -0
  607. package/components/nav/HeaderPageActionMenu.vue +22 -0
  608. package/components/nav/Jump.vue +135 -0
  609. package/components/nav/NamespaceFilter.vue +1165 -0
  610. package/components/nav/Pinned.vue +52 -0
  611. package/components/nav/TopLevelMenu.helper.ts +562 -0
  612. package/components/nav/TopLevelMenu.vue +1590 -0
  613. package/components/nav/Type.vue +289 -0
  614. package/components/nav/WindowManager/ChartReadme.vue +48 -0
  615. package/components/nav/WindowManager/ContainerLogs.vue +877 -0
  616. package/components/nav/WindowManager/ContainerShell.vue +585 -0
  617. package/components/nav/WindowManager/KubectlShell.vue +42 -0
  618. package/components/nav/WindowManager/MachineSsh.vue +21 -0
  619. package/components/nav/WindowManager/Window.vue +105 -0
  620. package/components/nav/WindowManager/__tests__/ContainerLogs.test.ts +197 -0
  621. package/components/nav/WindowManager/__tests__/ContainerShell.test.ts +571 -0
  622. package/components/nav/WindowManager/index.vue +587 -0
  623. package/components/nav/WorkspaceSwitcher.vue +190 -0
  624. package/components/nav/__tests__/TopLevelMenu.test.ts +558 -0
  625. package/components/nav/__tests__/Type.test.ts +491 -0
  626. package/components/templates/blank.vue +23 -0
  627. package/components/templates/default.vue +271 -0
  628. package/components/templates/home.vue +135 -0
  629. package/components/templates/plain.vue +143 -0
  630. package/components/templates/standalone.vue +9 -0
  631. package/components/templates/unauthenticated.vue +26 -0
  632. package/components/user.retention/user-retention-header.vue +34 -0
  633. package/composables/focusTrap.ts +76 -0
  634. package/composables/useClickOutside.ts +81 -0
  635. package/composables/useCompactInput.test.ts +36 -0
  636. package/composables/useCompactInput.ts +20 -0
  637. package/composables/useI18n.ts +26 -0
  638. package/composables/useLabeledFormElement.test.ts +135 -0
  639. package/composables/useLabeledFormElement.ts +153 -0
  640. package/composables/useRuntimeFlag.ts +29 -0
  641. package/composables/useUserRetentionValidation.test.ts +178 -0
  642. package/composables/useUserRetentionValidation.ts +201 -0
  643. package/config/__test__/home-links.test.ts +57 -0
  644. package/config/cookies.js +4 -0
  645. package/config/elemental-types.js +9 -0
  646. package/config/features.js +6 -0
  647. package/config/harvester-manager-types.js +3 -0
  648. package/config/home-links.js +209 -0
  649. package/config/labels-annotations.js +192 -0
  650. package/config/local-storage.js +6 -0
  651. package/config/page-actions.js +4 -0
  652. package/config/pagination-table-headers.js +80 -0
  653. package/config/persistentVolume.ts +108 -0
  654. package/config/pod-security-admission.ts +82 -0
  655. package/config/private-label.js +99 -0
  656. package/config/product/apps.js +148 -0
  657. package/config/product/auth.js +218 -0
  658. package/config/product/backup.js +61 -0
  659. package/config/product/cis.js +158 -0
  660. package/config/product/explorer.js +632 -0
  661. package/config/product/fleet.js +100 -0
  662. package/config/product/gatekeeper.js +119 -0
  663. package/config/product/istio.js +89 -0
  664. package/config/product/legacy.js +62 -0
  665. package/config/product/logging.js +377 -0
  666. package/config/product/longhorn.js +49 -0
  667. package/config/product/manager.js +217 -0
  668. package/config/product/monitoring.js +287 -0
  669. package/config/product/navlinks.js +32 -0
  670. package/config/product/neuvector.js +30 -0
  671. package/config/product/settings.js +161 -0
  672. package/config/product/uiplugins.js +18 -0
  673. package/config/query-params.js +79 -0
  674. package/config/roles.ts +409 -0
  675. package/config/router/index.js +26 -0
  676. package/config/router/navigation-guards/attempt-first-login.js +73 -0
  677. package/config/router/navigation-guards/authentication.js +64 -0
  678. package/config/router/navigation-guards/clusters.js +132 -0
  679. package/config/router/navigation-guards/i18n.js +13 -0
  680. package/config/router/navigation-guards/index.js +23 -0
  681. package/config/router/navigation-guards/install-redirect.js +95 -0
  682. package/config/router/navigation-guards/load-initial-settings.js +15 -0
  683. package/config/router/navigation-guards/page-title.js +12 -0
  684. package/config/router/navigation-guards/products.js +15 -0
  685. package/config/router/navigation-guards/record-last-route.js +24 -0
  686. package/config/router/navigation-guards/runtime-extension-route.js +31 -0
  687. package/config/router/navigation-guards/server-upgrade-growl.js +19 -0
  688. package/config/router/routes.js +496 -0
  689. package/config/schema.js +32 -0
  690. package/config/secret.js +14 -0
  691. package/config/settings.ts +258 -0
  692. package/config/store.js +188 -0
  693. package/config/system-namespaces.js +18 -0
  694. package/config/table-headers.js +1116 -0
  695. package/config/types.js +353 -0
  696. package/config/uiplugins.js +276 -0
  697. package/config/version.js +33 -0
  698. package/config/workload.ts +1 -0
  699. package/core/plugin-helpers.ts +220 -0
  700. package/core/plugin-routes.ts +34 -0
  701. package/core/plugin.ts +367 -0
  702. package/core/plugins-loader.js +31 -0
  703. package/core/plugins.js +471 -0
  704. package/core/types-provisioning.ts +361 -0
  705. package/core/types.ts +682 -0
  706. package/detail/__tests__/autoscaling.horizontalpodautoscaler.test.ts +196 -0
  707. package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +119 -0
  708. package/detail/__tests__/service.test.ts +62 -0
  709. package/detail/autoscaling.horizontalpodautoscaler/index.vue +264 -0
  710. package/detail/catalog.cattle.io.app.vue +181 -0
  711. package/detail/catalog.cattle.io.clusterrepo.vue +35 -0
  712. package/detail/cis.cattle.io.clusterscan.vue +372 -0
  713. package/detail/configmap.vue +81 -0
  714. package/detail/constraints.gatekeeper.sh.constraint.vue +66 -0
  715. package/detail/fleet.cattle.io.bundle.vue +63 -0
  716. package/detail/fleet.cattle.io.cluster.vue +99 -0
  717. package/detail/fleet.cattle.io.clustergroup.vue +76 -0
  718. package/detail/fleet.cattle.io.gitrepo.vue +148 -0
  719. package/detail/harvesterhci.io.management.cluster.vue +104 -0
  720. package/detail/helm.cattle.io.projecthelmchart.vue +249 -0
  721. package/detail/management.cattle.io.fleetworkspace.vue +100 -0
  722. package/detail/management.cattle.io.globalrole.vue +8 -0
  723. package/detail/management.cattle.io.roletemplate.vue +11 -0
  724. package/detail/management.cattle.io.user.vue +312 -0
  725. package/detail/namespace.vue +269 -0
  726. package/detail/networking.k8s.io.ingress.vue +74 -0
  727. package/detail/node.vue +330 -0
  728. package/detail/pod.vue +255 -0
  729. package/detail/provisioning.cattle.io.cluster.vue +1200 -0
  730. package/detail/rbac.authorization.k8s.io.clusterrole.vue +8 -0
  731. package/detail/rbac.authorization.k8s.io.role.vue +8 -0
  732. package/detail/secret.vue +313 -0
  733. package/detail/service.vue +202 -0
  734. package/detail/workload/index.vue +541 -0
  735. package/dialog/AddClusterMemberDialog.vue +86 -0
  736. package/dialog/AddCustomBadgeDialog.vue +466 -0
  737. package/dialog/AddProjectMemberDialog.vue +181 -0
  738. package/dialog/AddonConfigConfirmationDialog.vue +101 -0
  739. package/dialog/DeactivateDriverDialog.vue +139 -0
  740. package/dialog/DiagnosticTimingsDialog.vue +141 -0
  741. package/dialog/DrainNode.vue +247 -0
  742. package/dialog/ForceMachineRemoveDialog.vue +134 -0
  743. package/dialog/GenericPrompt.vue +135 -0
  744. package/dialog/GitRepoForceUpdateDialog.vue +132 -0
  745. package/dialog/RollbackWorkloadDialog.vue +308 -0
  746. package/dialog/RotateCertificatesDialog.vue +205 -0
  747. package/dialog/RotateEncryptionKeyDialog.vue +191 -0
  748. package/dialog/SaveAsRKETemplateDialog.vue +139 -0
  749. package/dialog/ScaleMachineDownDialog.vue +156 -0
  750. package/dialog/ScalePoolDownDialog.vue +121 -0
  751. package/dialog/SloDialog.vue +97 -0
  752. package/directives/clean-html.js +15 -0
  753. package/directives/clean-tooltip.js +32 -0
  754. package/directives/focus.js +47 -0
  755. package/directives/int-number.js +21 -0
  756. package/directives/positive-int-number.js +19 -0
  757. package/directives/strip-html-aria-label.js +19 -0
  758. package/directives/trim-whitespace.js +19 -0
  759. package/edit/__tests__/cis.cattle.io.clusterscan.test.ts +87 -0
  760. package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +246 -0
  761. package/edit/__tests__/kontainerDriver.test.ts +110 -0
  762. package/edit/__tests__/management.cattle.io.clusterroletemplatebinding.test.ts +71 -0
  763. package/edit/__tests__/management.cattle.io.setting.test.ts +109 -0
  764. package/edit/__tests__/monitoring.coreos.com.prometheusrule.test.ts +70 -0
  765. package/edit/__tests__/namespace.test.ts +49 -0
  766. package/edit/__tests__/nodeDriver.test.ts +89 -0
  767. package/edit/__tests__/service.test.ts +100 -0
  768. package/edit/__tests__/ui.cattle.io.navlink.test.ts +114 -0
  769. package/edit/auth/AuthProviderWarningBanners.vue +34 -0
  770. package/edit/auth/__tests__/AuthProviderWarningBanners.test.ts +19 -0
  771. package/edit/auth/__tests__/azuread.test.ts +238 -0
  772. package/edit/auth/__tests__/oidc.test.ts +225 -0
  773. package/edit/auth/azuread.vue +538 -0
  774. package/edit/auth/github.vue +269 -0
  775. package/edit/auth/googleoauth.vue +260 -0
  776. package/edit/auth/ldap/__tests__/config.test.ts +44 -0
  777. package/edit/auth/ldap/config.vue +379 -0
  778. package/edit/auth/ldap/index.vue +156 -0
  779. package/edit/auth/oidc.vue +445 -0
  780. package/edit/auth/saml.vue +432 -0
  781. package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +58 -0
  782. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +130 -0
  783. package/edit/autoscaling.horizontalpodautoscaler/index.vue +343 -0
  784. package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +82 -0
  785. package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +60 -0
  786. package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +220 -0
  787. package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +198 -0
  788. package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +71 -0
  789. package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +58 -0
  790. package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +65 -0
  791. package/edit/catalog.cattle.io.clusterrepo.vue +336 -0
  792. package/edit/cis.cattle.io.clusterscan.vue +377 -0
  793. package/edit/cis.cattle.io.clusterscanbenchmark.vue +153 -0
  794. package/edit/cis.cattle.io.clusterscanprofile.vue +150 -0
  795. package/edit/cloudcredential.vue +334 -0
  796. package/edit/configmap.vue +163 -0
  797. package/edit/constraints.gatekeeper.sh.constraint/MatchKinds.vue +72 -0
  798. package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +78 -0
  799. package/edit/constraints.gatekeeper.sh.constraint/Scope.vue +52 -0
  800. package/edit/constraints.gatekeeper.sh.constraint/index.vue +368 -0
  801. package/edit/fleet.cattle.io.cluster.vue +105 -0
  802. package/edit/fleet.cattle.io.clustergroup.vue +189 -0
  803. package/edit/fleet.cattle.io.gitrepo.vue +912 -0
  804. package/edit/group.principal.vue +65 -0
  805. package/edit/helm.cattle.io.projecthelmchart.vue +163 -0
  806. package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +94 -0
  807. package/edit/kontainerDriver.vue +67 -0
  808. package/edit/logging-flow/Match.vue +142 -0
  809. package/edit/logging-flow/index.vue +549 -0
  810. package/edit/logging.banzaicloud.io.clusterflow.vue +7 -0
  811. package/edit/logging.banzaicloud.io.clusteroutput.vue +12 -0
  812. package/edit/logging.banzaicloud.io.flow.vue +7 -0
  813. package/edit/logging.banzaicloud.io.output/__tests__/logging.banzaicloud.io.output.test.ts +310 -0
  814. package/edit/logging.banzaicloud.io.output/index.vue +386 -0
  815. package/edit/logging.banzaicloud.io.output/providers/__tests__/loki.test.ts +13 -0
  816. package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +77 -0
  817. package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +94 -0
  818. package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +112 -0
  819. package/edit/logging.banzaicloud.io.output/providers/datadog.vue +95 -0
  820. package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +234 -0
  821. package/edit/logging.banzaicloud.io.output/providers/file.vue +47 -0
  822. package/edit/logging.banzaicloud.io.output/providers/forward.vue +152 -0
  823. package/edit/logging.banzaicloud.io.output/providers/gcs.vue +102 -0
  824. package/edit/logging.banzaicloud.io.output/providers/gelf.vue +167 -0
  825. package/edit/logging.banzaicloud.io.output/providers/kafka.vue +166 -0
  826. package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +76 -0
  827. package/edit/logging.banzaicloud.io.output/providers/logdna.vue +72 -0
  828. package/edit/logging.banzaicloud.io.output/providers/logz.vue +107 -0
  829. package/edit/logging.banzaicloud.io.output/providers/loki.vue +172 -0
  830. package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +71 -0
  831. package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +225 -0
  832. package/edit/logging.banzaicloud.io.output/providers/redis.vue +142 -0
  833. package/edit/logging.banzaicloud.io.output/providers/s3.vue +122 -0
  834. package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +180 -0
  835. package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +59 -0
  836. package/edit/logging.banzaicloud.io.output/providers/syslog.vue +234 -0
  837. package/edit/logging.banzaicloud.io.output/providers/utils.js +27 -0
  838. package/edit/management.cattle.io.clusterroletemplatebinding.vue +71 -0
  839. package/edit/management.cattle.io.fleetworkspace.vue +245 -0
  840. package/edit/management.cattle.io.globalrole.vue +8 -0
  841. package/edit/management.cattle.io.node.vue +72 -0
  842. package/edit/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +111 -0
  843. package/edit/management.cattle.io.project.vue +255 -0
  844. package/edit/management.cattle.io.projectroletemplatebinding.vue +96 -0
  845. package/edit/management.cattle.io.roletemplate.vue +11 -0
  846. package/edit/management.cattle.io.setting.vue +264 -0
  847. package/edit/management.cattle.io.user.vue +289 -0
  848. package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +324 -0
  849. package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +287 -0
  850. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +423 -0
  851. package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +176 -0
  852. package/edit/monitoring.coreos.com.alertmanagerconfig/tls.vue +272 -0
  853. package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +175 -0
  854. package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +282 -0
  855. package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +203 -0
  856. package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +140 -0
  857. package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +230 -0
  858. package/edit/monitoring.coreos.com.prometheusrule/AlertingRule.vue +534 -0
  859. package/edit/monitoring.coreos.com.prometheusrule/GroupRules.vue +229 -0
  860. package/edit/monitoring.coreos.com.prometheusrule/RecordingRule.vue +112 -0
  861. package/edit/monitoring.coreos.com.prometheusrule/index.vue +223 -0
  862. package/edit/monitoring.coreos.com.receiver/auth.vue +142 -0
  863. package/edit/monitoring.coreos.com.receiver/index.vue +357 -0
  864. package/edit/monitoring.coreos.com.receiver/tls.vue +72 -0
  865. package/edit/monitoring.coreos.com.receiver/types/__tests__/email.test.ts +57 -0
  866. package/edit/monitoring.coreos.com.receiver/types/email.vue +130 -0
  867. package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +237 -0
  868. package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +97 -0
  869. package/edit/monitoring.coreos.com.receiver/types/slack.vue +88 -0
  870. package/edit/monitoring.coreos.com.receiver/types/webhook.add.vue +65 -0
  871. package/edit/monitoring.coreos.com.receiver/types/webhook.banner.vue +28 -0
  872. package/edit/monitoring.coreos.com.receiver/types/webhook.vue +93 -0
  873. package/edit/monitoring.coreos.com.route.vue +237 -0
  874. package/edit/namespace.vue +281 -0
  875. package/edit/networking.istio.io.destinationrule/LoadBalancer.vue +194 -0
  876. package/edit/networking.istio.io.destinationrule/index.vue +237 -0
  877. package/edit/networking.k8s.io.ingress/Certificate.vue +134 -0
  878. package/edit/networking.k8s.io.ingress/Certificates.vue +111 -0
  879. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +145 -0
  880. package/edit/networking.k8s.io.ingress/IngressClass.vue +69 -0
  881. package/edit/networking.k8s.io.ingress/Rule.vue +188 -0
  882. package/edit/networking.k8s.io.ingress/RulePath.vue +224 -0
  883. package/edit/networking.k8s.io.ingress/Rules.vue +155 -0
  884. package/edit/networking.k8s.io.ingress/__tests__/IngressClass.test.ts +58 -0
  885. package/edit/networking.k8s.io.ingress/index.vue +300 -0
  886. package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +108 -0
  887. package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +50 -0
  888. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +401 -0
  889. package/edit/networking.k8s.io.networkpolicy/PolicyRules.vue +93 -0
  890. package/edit/networking.k8s.io.networkpolicy/__tests__/PolicyRuleTarget.test.ts +180 -0
  891. package/edit/networking.k8s.io.networkpolicy/__tests__/utils/mock.json +158 -0
  892. package/edit/networking.k8s.io.networkpolicy/__tests__/utils/selectors.test.ts +45 -0
  893. package/edit/networking.k8s.io.networkpolicy/index.vue +299 -0
  894. package/edit/node.vue +82 -0
  895. package/edit/nodeDriver.vue +72 -0
  896. package/edit/persistentvolume/__tests__/persistentvolume.test.ts +105 -0
  897. package/edit/persistentvolume/index.vue +380 -0
  898. package/edit/persistentvolume/plugins/awsElasticBlockStore.vue +90 -0
  899. package/edit/persistentvolume/plugins/azureDisk.vue +136 -0
  900. package/edit/persistentvolume/plugins/azureFile.vue +78 -0
  901. package/edit/persistentvolume/plugins/cephfs.vue +109 -0
  902. package/edit/persistentvolume/plugins/cinder.vue +89 -0
  903. package/edit/persistentvolume/plugins/csi.vue +209 -0
  904. package/edit/persistentvolume/plugins/fc.vue +101 -0
  905. package/edit/persistentvolume/plugins/flexVolume.vue +102 -0
  906. package/edit/persistentvolume/plugins/flocker.vue +45 -0
  907. package/edit/persistentvolume/plugins/gcePersistentDisk.vue +90 -0
  908. package/edit/persistentvolume/plugins/glusterfs.vue +70 -0
  909. package/edit/persistentvolume/plugins/hostPath.vue +82 -0
  910. package/edit/persistentvolume/plugins/iscsi.vue +170 -0
  911. package/edit/persistentvolume/plugins/local.vue +37 -0
  912. package/edit/persistentvolume/plugins/longhorn.vue +99 -0
  913. package/edit/persistentvolume/plugins/nfs.vue +70 -0
  914. package/edit/persistentvolume/plugins/photonPersistentDisk.vue +58 -0
  915. package/edit/persistentvolume/plugins/portworxVolume.vue +71 -0
  916. package/edit/persistentvolume/plugins/quobyte.vue +88 -0
  917. package/edit/persistentvolume/plugins/rbd.vue +127 -0
  918. package/edit/persistentvolume/plugins/scaleIO.vue +146 -0
  919. package/edit/persistentvolume/plugins/storageos.vue +98 -0
  920. package/edit/persistentvolume/plugins/vsphereVolume.vue +63 -0
  921. package/edit/persistentvolumeclaim.vue +395 -0
  922. package/edit/pod.vue +27 -0
  923. package/edit/policy.poddisruptionbudget.vue +152 -0
  924. package/edit/provisioning.cattle.io.cluster/AgentEnv.vue +40 -0
  925. package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +306 -0
  926. package/edit/provisioning.cattle.io.cluster/Labels.vue +46 -0
  927. package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +341 -0
  928. package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +304 -0
  929. package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +564 -0
  930. package/edit/provisioning.cattle.io.cluster/__tests__/CustomCommand.test.ts +129 -0
  931. package/edit/provisioning.cattle.io.cluster/__tests__/DirectoryConfig.test.ts +182 -0
  932. package/edit/provisioning.cattle.io.cluster/__tests__/DrainOptions.test.ts +54 -0
  933. package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +72 -0
  934. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +546 -0
  935. package/edit/provisioning.cattle.io.cluster/__tests__/utils/cluster.ts +391 -0
  936. package/edit/provisioning.cattle.io.cluster/index.vue +733 -0
  937. package/edit/provisioning.cattle.io.cluster/rke2.vue +2538 -0
  938. package/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest.vue +49 -0
  939. package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +112 -0
  940. package/edit/provisioning.cattle.io.cluster/tabs/Advanced.vue +224 -0
  941. package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +340 -0
  942. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +700 -0
  943. package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +219 -0
  944. package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +405 -0
  945. package/edit/provisioning.cattle.io.cluster/tabs/MemberRoles.vue +40 -0
  946. package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +153 -0
  947. package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +138 -0
  948. package/edit/provisioning.cattle.io.cluster/tabs/networking/ACE.vue +73 -0
  949. package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +214 -0
  950. package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +211 -0
  951. package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryMirrors.vue +138 -0
  952. package/edit/provisioning.cattle.io.cluster/tabs/registries/__tests__/RegistryConfigs.test.ts +66 -0
  953. package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +149 -0
  954. package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +155 -0
  955. package/edit/provisioning.cattle.io.cluster/tabs/upgrade/index.vue +76 -0
  956. package/edit/rbac.authorization.k8s.io.clusterrole.vue +8 -0
  957. package/edit/rbac.authorization.k8s.io.role.vue +8 -0
  958. package/edit/resources.cattle.io.backup.vue +454 -0
  959. package/edit/resources.cattle.io.restore.vue +326 -0
  960. package/edit/secret/__tests__/ssh.test.ts +79 -0
  961. package/edit/secret/basic.vue +64 -0
  962. package/edit/secret/generic.vue +64 -0
  963. package/edit/secret/index.vue +407 -0
  964. package/edit/secret/registry.vue +145 -0
  965. package/edit/secret/ssh.vue +106 -0
  966. package/edit/secret/tls.vue +94 -0
  967. package/edit/service.vue +546 -0
  968. package/edit/serviceaccount.vue +193 -0
  969. package/edit/storage.k8s.io.storageclass/index.vue +307 -0
  970. package/edit/storage.k8s.io.storageclass/provisioners/custom.vue +25 -0
  971. package/edit/storage.k8s.io.storageclass/provisioners/driver.harvesterhci.io.vue +114 -0
  972. package/edit/storage.k8s.io.storageclass/provisioners/driver.longhorn.io.vue +40 -0
  973. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +180 -0
  974. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/azure-disk.vue +75 -0
  975. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/azure-file.vue +47 -0
  976. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/cinder.vue +69 -0
  977. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +117 -0
  978. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/glusterfs.vue +99 -0
  979. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/no-provisioner.vue +21 -0
  980. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/portworx-volume.vue +83 -0
  981. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/quobyte.vue +91 -0
  982. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/rbd.vue +117 -0
  983. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/scaleio.vue +116 -0
  984. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/storageos.vue +65 -0
  985. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +97 -0
  986. package/edit/token.vue +337 -0
  987. package/edit/ui.cattle.io.navlink.vue +461 -0
  988. package/edit/workload/Job.vue +339 -0
  989. package/edit/workload/Upgrading.vue +372 -0
  990. package/edit/workload/VolumeClaimTemplate.vue +136 -0
  991. package/edit/workload/__tests__/Job.test.ts +71 -0
  992. package/edit/workload/__tests__/Upgrading.test.ts +61 -0
  993. package/edit/workload/__tests__/index.test.ts +103 -0
  994. package/edit/workload/index.vue +677 -0
  995. package/edit/workload/mixins/workload.js +1067 -0
  996. package/edit/workload/storage/ContainerMountPaths.vue +171 -0
  997. package/edit/workload/storage/Mount.vue +157 -0
  998. package/edit/workload/storage/__tests__/Mount.test.ts +102 -0
  999. package/edit/workload/storage/__tests__/Storage.test.ts +106 -0
  1000. package/edit/workload/storage/awsElasticBlockStore.vue +73 -0
  1001. package/edit/workload/storage/azureDisk.vue +104 -0
  1002. package/edit/workload/storage/azureFile.vue +74 -0
  1003. package/edit/workload/storage/csi/driver.longhorn.io.vue +48 -0
  1004. package/edit/workload/storage/csi/index.vue +122 -0
  1005. package/edit/workload/storage/emptyDir.vue +88 -0
  1006. package/edit/workload/storage/ephemeralVolume/index.vue +108 -0
  1007. package/edit/workload/storage/gcePersistentDisk.vue +73 -0
  1008. package/edit/workload/storage/hostPath.vue +115 -0
  1009. package/edit/workload/storage/index.vue +339 -0
  1010. package/edit/workload/storage/nfs.vue +78 -0
  1011. package/edit/workload/storage/persistentVolumeClaim/__tests__/persistentvolumeclaim.test.ts +38 -0
  1012. package/edit/workload/storage/persistentVolumeClaim/index.vue +154 -0
  1013. package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +256 -0
  1014. package/edit/workload/storage/secret.vue +186 -0
  1015. package/edit/workload/storage/vsphereVolume.vue +73 -0
  1016. package/initialize/App.vue +70 -0
  1017. package/initialize/app-extended.js +112 -0
  1018. package/initialize/entry-helpers.js +147 -0
  1019. package/initialize/entry.js +33 -0
  1020. package/initialize/install-components.js +11 -0
  1021. package/initialize/install-directives.js +61 -0
  1022. package/initialize/install-plugins.js +129 -0
  1023. package/list/__tests__/workload.test.ts +55 -0
  1024. package/list/catalog.cattle.io.app.vue +76 -0
  1025. package/list/catalog.cattle.io.clusterrepo.vue +83 -0
  1026. package/list/cis.cattle.io.clusterscan.vue +76 -0
  1027. package/list/fleet.cattle.io.bundle.vue +127 -0
  1028. package/list/fleet.cattle.io.cluster.vue +95 -0
  1029. package/list/fleet.cattle.io.clustergroup.vue +88 -0
  1030. package/list/fleet.cattle.io.clusterregistrationtoken.vue +94 -0
  1031. package/list/fleet.cattle.io.gitrepo.vue +108 -0
  1032. package/list/group.principal.vue +153 -0
  1033. package/list/harvesterhci.io.management.cluster.vue +247 -0
  1034. package/list/helm.cattle.io.projecthelmchart.vue +157 -0
  1035. package/list/logging.banzaicloud.io.clusterflow.vue +44 -0
  1036. package/list/logging.banzaicloud.io.flow.vue +45 -0
  1037. package/list/management.cattle.io.cluster.vue +54 -0
  1038. package/list/management.cattle.io.feature.vue +368 -0
  1039. package/list/management.cattle.io.fleetworkspace.vue +44 -0
  1040. package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +51 -0
  1041. package/list/management.cattle.io.setting.vue +117 -0
  1042. package/list/management.cattle.io.user.vue +178 -0
  1043. package/list/monitoring.coreos.com.alertmanagerconfig.vue +83 -0
  1044. package/list/namespace.vue +81 -0
  1045. package/list/networking.k8s.io.ingress.vue +39 -0
  1046. package/list/node.vue +418 -0
  1047. package/list/persistentvolume.vue +89 -0
  1048. package/list/persistentvolumeclaim.vue +32 -0
  1049. package/list/provisioning.cattle.io.cluster.vue +326 -0
  1050. package/list/rbac.authorization.k8s.io.clusterrolebinding.vue +47 -0
  1051. package/list/service.vue +48 -0
  1052. package/list/ui.cattle.io.navlink.vue +72 -0
  1053. package/list/workload.vue +188 -0
  1054. package/machine-config/__tests__/vmwarevsphere.test.ts +302 -0
  1055. package/machine-config/amazonec2.vue +702 -0
  1056. package/machine-config/azure.vue +913 -0
  1057. package/machine-config/digitalocean.vue +231 -0
  1058. package/machine-config/generic.vue +103 -0
  1059. package/machine-config/linode.vue +189 -0
  1060. package/machine-config/pnap.vue +288 -0
  1061. package/machine-config/vmwarevsphere-config.ts +17 -0
  1062. package/machine-config/vmwarevsphere.vue +1268 -0
  1063. package/mixins/__tests__/auth-config.test.ts +74 -0
  1064. package/mixins/__tests__/chart.test.ts +104 -0
  1065. package/mixins/__tests__/create-edit-view.test.ts +56 -0
  1066. package/mixins/auth-config.js +332 -0
  1067. package/mixins/back-link.js +15 -0
  1068. package/mixins/brand.js +211 -0
  1069. package/mixins/browser-tab-visibility.js +31 -0
  1070. package/mixins/chart.js +557 -0
  1071. package/mixins/child-hook.js +82 -0
  1072. package/mixins/closeable.js +47 -0
  1073. package/mixins/compact-input.ts +25 -0
  1074. package/mixins/create-edit-view/impl.js +201 -0
  1075. package/mixins/create-edit-view/index.js +48 -0
  1076. package/mixins/fetch.client.js +90 -0
  1077. package/mixins/form-validation.js +197 -0
  1078. package/mixins/labeled-form-element.ts +225 -0
  1079. package/mixins/login.js +31 -0
  1080. package/mixins/metric-poller.js +19 -0
  1081. package/mixins/page-actions.js +36 -0
  1082. package/mixins/resource-fetch-api-pagination.js +339 -0
  1083. package/mixins/resource-fetch-namespaced.js +90 -0
  1084. package/mixins/resource-fetch.js +291 -0
  1085. package/mixins/resource-manager.js +109 -0
  1086. package/mixins/vue-select-overrides.js +102 -0
  1087. package/models/__tests__/apps.deployment.test.ts +93 -0
  1088. package/models/__tests__/batch.cronjob.test.ts +88 -0
  1089. package/models/__tests__/catalog.cattle.io.app.test.ts +148 -0
  1090. package/models/__tests__/cluster.test.ts +44 -0
  1091. package/models/__tests__/fleet.cattle.io.cluster.test.ts +36 -0
  1092. package/models/__tests__/fleet.cattle.io.gitrepo.test.ts +157 -0
  1093. package/models/__tests__/logging.banzaicloud.io.flow.test.ts +88 -0
  1094. package/models/__tests__/management.cattle.io.cluster.test.ts +23 -0
  1095. package/models/__tests__/management.cattle.io.node.ts +181 -0
  1096. package/models/__tests__/management.cattle.io.nodepool.ts +83 -0
  1097. package/models/__tests__/namespace.test.ts +189 -0
  1098. package/models/__tests__/node.test.ts +74 -0
  1099. package/models/__tests__/provisioning.cattle.io.cluster.test.ts +155 -0
  1100. package/models/__tests__/schema.tests.ts +24 -0
  1101. package/models/__tests__/secret.test.ts +80 -0
  1102. package/models/__tests__/steve-schema.test.ts +73 -0
  1103. package/models/__tests__/storage.k8s.io.storageclass.test.ts +22 -0
  1104. package/models/__tests__/workload.test.ts +91 -0
  1105. package/models/app.js +25 -0
  1106. package/models/apps.controllerrevision.js +7 -0
  1107. package/models/apps.daemonset.js +22 -0
  1108. package/models/apps.deployment.js +71 -0
  1109. package/models/apps.replicaset.js +11 -0
  1110. package/models/apps.statefulset.js +49 -0
  1111. package/models/autoscaling.horizontalpodautoscaler.js +44 -0
  1112. package/models/batch.cronjob.js +85 -0
  1113. package/models/batch.job.js +19 -0
  1114. package/models/catalog.cattle.io.app.js +488 -0
  1115. package/models/catalog.cattle.io.clusterrepo.js +223 -0
  1116. package/models/catalog.cattle.io.operation.js +43 -0
  1117. package/models/catalog.cattle.io.repo.js +4 -0
  1118. package/models/catalog.cattle.io.uiplugin.js +37 -0
  1119. package/models/chart.js +50 -0
  1120. package/models/chartinstallaction.js +17 -0
  1121. package/models/chartupgradeaction.js +12 -0
  1122. package/models/cis.cattle.io.clusterscan.js +179 -0
  1123. package/models/cis.cattle.io.clusterscanbenchmark.js +18 -0
  1124. package/models/cis.cattle.io.clusterscanprofile.js +31 -0
  1125. package/models/cis.cattle.io.clusterscanreport.js +62 -0
  1126. package/models/cloudcredential.js +341 -0
  1127. package/models/cluster/node.js +487 -0
  1128. package/models/cluster/schema.js +6 -0
  1129. package/models/cluster.js +44 -0
  1130. package/models/cluster.x-k8s.io.machine.js +272 -0
  1131. package/models/cluster.x-k8s.io.machinedeployment.js +228 -0
  1132. package/models/cluster.x-k8s.io.machineset.js +23 -0
  1133. package/models/clusterroletemplatebinding.js +31 -0
  1134. package/models/configmap.js +20 -0
  1135. package/models/constraints.gatekeeper.sh.constraint.js +121 -0
  1136. package/models/driver.js +63 -0
  1137. package/models/etcdbackup.js +45 -0
  1138. package/models/event.js +34 -0
  1139. package/models/fleet.cattle.io.bundle.js +168 -0
  1140. package/models/fleet.cattle.io.cluster.js +221 -0
  1141. package/models/fleet.cattle.io.clustergroup.js +62 -0
  1142. package/models/fleet.cattle.io.clusterregistrationtoken.js +14 -0
  1143. package/models/fleet.cattle.io.gitrepo.js +548 -0
  1144. package/models/group.principal.js +71 -0
  1145. package/models/helm.cattle.io.projecthelmchart.js +38 -0
  1146. package/models/k8s.cni.cncf.io.networkattachmentdefinition.js +88 -0
  1147. package/models/kontainerdriver.js +88 -0
  1148. package/models/logging.banzaicloud.io.clusterflow.js +36 -0
  1149. package/models/logging.banzaicloud.io.clusteroutput.js +4 -0
  1150. package/models/logging.banzaicloud.io.flow.js +115 -0
  1151. package/models/logging.banzaicloud.io.output.js +173 -0
  1152. package/models/management/schema.js +6 -0
  1153. package/models/management.cattle.io.authconfig.js +70 -0
  1154. package/models/management.cattle.io.cluster.js +501 -0
  1155. package/models/management.cattle.io.clusterroletemplatebinding.js +143 -0
  1156. package/models/management.cattle.io.feature.js +56 -0
  1157. package/models/management.cattle.io.fleetworkspace.js +90 -0
  1158. package/models/management.cattle.io.gitreporestriction.js +5 -0
  1159. package/models/management.cattle.io.globalrole.js +172 -0
  1160. package/models/management.cattle.io.globalrolebinding.js +59 -0
  1161. package/models/management.cattle.io.kontainerdriver.js +90 -0
  1162. package/models/management.cattle.io.node.js +179 -0
  1163. package/models/management.cattle.io.nodepool.js +185 -0
  1164. package/models/management.cattle.io.nodetemplate.js +139 -0
  1165. package/models/management.cattle.io.podsecurityadmissionconfigurationtemplate.js +3 -0
  1166. package/models/management.cattle.io.project.js +182 -0
  1167. package/models/management.cattle.io.projectroletemplatebinding.js +150 -0
  1168. package/models/management.cattle.io.roletemplate.js +216 -0
  1169. package/models/management.cattle.io.setting.js +72 -0
  1170. package/models/management.cattle.io.user.js +302 -0
  1171. package/models/metrics.k8s.io.nodemetrics.js +41 -0
  1172. package/models/monitoring.coreos.com.alertmanagerconfig.js +126 -0
  1173. package/models/monitoring.coreos.com.podmonitor.js +23 -0
  1174. package/models/monitoring.coreos.com.prometheusrule.js +38 -0
  1175. package/models/monitoring.coreos.com.receiver.js +197 -0
  1176. package/models/monitoring.coreos.com.route.js +162 -0
  1177. package/models/monitoring.coreos.com.servicemonitor.js +23 -0
  1178. package/models/namespace.js +261 -0
  1179. package/models/networking.istio.io.destinationrule.js +19 -0
  1180. package/models/networking.k8s.io.ingress.js +209 -0
  1181. package/models/nodedriver.js +96 -0
  1182. package/models/persistentvolume.js +43 -0
  1183. package/models/persistentvolumeclaim.js +63 -0
  1184. package/models/pod.js +279 -0
  1185. package/models/principal.js +42 -0
  1186. package/models/projectroletemplatebinding.js +35 -0
  1187. package/models/provisioning.cattle.io.cluster.js +1091 -0
  1188. package/models/rbac.authorization.k8s.io.clusterrole.js +17 -0
  1189. package/models/rbac.authorization.k8s.io.clusterrolebinding.js +16 -0
  1190. package/models/rbac.authorization.k8s.io.role.js +52 -0
  1191. package/models/rbac.authorization.k8s.io.rolebinding.js +16 -0
  1192. package/models/replicationcontroller.js +4 -0
  1193. package/models/resources.cattle.io.backup.js +29 -0
  1194. package/models/resources.cattle.io.restore.js +33 -0
  1195. package/models/rke-machine-config.cattle.io.harvesterconfig.js +19 -0
  1196. package/models/rke-machine.cattle.io.amazonec2machinetemplate.js +15 -0
  1197. package/models/rke-machine.cattle.io.azuremachinetemplate.js +15 -0
  1198. package/models/rke-machine.cattle.io.digitaloceanmachinetemplate.js +15 -0
  1199. package/models/rke-machine.cattle.io.linodemachinetemplate.js +15 -0
  1200. package/models/rke-machine.cattle.io.machinetemplate.js +22 -0
  1201. package/models/rke-machine.cattle.io.pnapmachinetemplate.js +15 -0
  1202. package/models/rke-machine.cattle.io.vmwarevspheremachinetemplate.js +14 -0
  1203. package/models/rke.cattle.io.etcdsnapshot.js +76 -0
  1204. package/models/schema.js +38 -0
  1205. package/models/secret.js +473 -0
  1206. package/models/service.js +193 -0
  1207. package/models/steve-schema.ts +254 -0
  1208. package/models/storage.k8s.io.storageclass.js +164 -0
  1209. package/models/templates.gatekeeper.sh.constrainttemplate.js +23 -0
  1210. package/models/token.js +19 -0
  1211. package/models/ui.cattle.io.navlink.js +38 -0
  1212. package/models/workload.js +691 -0
  1213. package/models/workload.service.js +341 -0
  1214. package/package.json +173 -0
  1215. package/pages/404.vue +15 -0
  1216. package/pages/__tests__/prefs.test.ts +96 -0
  1217. package/pages/about.vue +311 -0
  1218. package/pages/account/create-key.vue +16 -0
  1219. package/pages/account/index.vue +308 -0
  1220. package/pages/account/pri.vue +229 -0
  1221. package/pages/auth/login.vue +742 -0
  1222. package/pages/auth/logout.vue +47 -0
  1223. package/pages/auth/setup.vue +646 -0
  1224. package/pages/auth/verify.vue +203 -0
  1225. package/pages/auth copy/login.vue +595 -0
  1226. package/pages/auth copy/logout.vue +47 -0
  1227. package/pages/auth copy/setup.vue +523 -0
  1228. package/pages/auth copy/verify.vue +203 -0
  1229. package/pages/c/_cluster/_product/_resource/_id.vue +12 -0
  1230. package/pages/c/_cluster/_product/_resource/_namespace/_id.vue +12 -0
  1231. package/pages/c/_cluster/_product/_resource/create.vue +12 -0
  1232. package/pages/c/_cluster/_product/_resource/index.vue +12 -0
  1233. package/pages/c/_cluster/_product/index.vue +15 -0
  1234. package/pages/c/_cluster/_product/members/index.vue +8 -0
  1235. package/pages/c/_cluster/_product/namespaces.vue +77 -0
  1236. package/pages/c/_cluster/_product/projectsnamespaces.vue +6 -0
  1237. package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +18 -0
  1238. package/pages/c/_cluster/apps/charts/chart.vue +452 -0
  1239. package/pages/c/_cluster/apps/charts/index.vue +718 -0
  1240. package/pages/c/_cluster/apps/charts/install.helpers.js +15 -0
  1241. package/pages/c/_cluster/apps/charts/install.vue +2050 -0
  1242. package/pages/c/_cluster/auth/config/_id.vue +35 -0
  1243. package/pages/c/_cluster/auth/config/index.vue +114 -0
  1244. package/pages/c/_cluster/auth/group.principal/assign-edit.vue +138 -0
  1245. package/pages/c/_cluster/auth/roles/_resource/_id.vue +12 -0
  1246. package/pages/c/_cluster/auth/roles/_resource/create.vue +12 -0
  1247. package/pages/c/_cluster/auth/roles/index.vue +215 -0
  1248. package/pages/c/_cluster/auth/user.retention/index.vue +323 -0
  1249. package/pages/c/_cluster/ecm/index.vue +14 -0
  1250. package/pages/c/_cluster/explorer/ConfigBadge.vue +64 -0
  1251. package/pages/c/_cluster/explorer/EventsTable.vue +126 -0
  1252. package/pages/c/_cluster/explorer/__tests__/index.test.ts +264 -0
  1253. package/pages/c/_cluster/explorer/explorer-utils.js +17 -0
  1254. package/pages/c/_cluster/explorer/index.vue +1004 -0
  1255. package/pages/c/_cluster/explorer/tools/__tests__/index.test.ts +71 -0
  1256. package/pages/c/_cluster/explorer/tools/index.vue +397 -0
  1257. package/pages/c/_cluster/explorer/tools/pages/_page.vue +29 -0
  1258. package/pages/c/_cluster/fleet/GitRepoGraphConfig.js +249 -0
  1259. package/pages/c/_cluster/fleet/index.vue +506 -0
  1260. package/pages/c/_cluster/gatekeeper/constraints/index.vue +90 -0
  1261. package/pages/c/_cluster/gatekeeper/index.vue +78 -0
  1262. package/pages/c/_cluster/istio/index.vue +149 -0
  1263. package/pages/c/_cluster/legacy/pages/_page.vue +29 -0
  1264. package/pages/c/_cluster/legacy/project/_page.vue +57 -0
  1265. package/pages/c/_cluster/legacy/project/index.vue +32 -0
  1266. package/pages/c/_cluster/legacy/project/pipelines.vue +96 -0
  1267. package/pages/c/_cluster/logging/index.vue +94 -0
  1268. package/pages/c/_cluster/longhorn/__tests__/longhorn.index.test.ts +92 -0
  1269. package/pages/c/_cluster/longhorn/index.vue +107 -0
  1270. package/pages/c/_cluster/manager/cloudCredential/_id.vue +15 -0
  1271. package/pages/c/_cluster/manager/cloudCredential/create.vue +15 -0
  1272. package/pages/c/_cluster/manager/cloudCredential/index.vue +158 -0
  1273. package/pages/c/_cluster/manager/drivers/kontainerDriver/_id.vue +12 -0
  1274. package/pages/c/_cluster/manager/drivers/kontainerDriver/create.vue +15 -0
  1275. package/pages/c/_cluster/manager/drivers/kontainerDriver/index.vue +91 -0
  1276. package/pages/c/_cluster/manager/drivers/nodeDriver/_id.vue +12 -0
  1277. package/pages/c/_cluster/manager/drivers/nodeDriver/create.vue +15 -0
  1278. package/pages/c/_cluster/manager/drivers/nodeDriver/index.vue +60 -0
  1279. package/pages/c/_cluster/manager/jwt.authentication/index.vue +244 -0
  1280. package/pages/c/_cluster/manager/pages/_page.vue +22 -0
  1281. package/pages/c/_cluster/mcapps/pages/_page.vue +22 -0
  1282. package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/index.vue +12 -0
  1283. package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/receiver.vue +320 -0
  1284. package/pages/c/_cluster/monitoring/alertmanagerconfig/index.vue +24 -0
  1285. package/pages/c/_cluster/monitoring/index.vue +202 -0
  1286. package/pages/c/_cluster/monitoring/monitor/_namespace/_id.vue +21 -0
  1287. package/pages/c/_cluster/monitoring/monitor/create.vue +29 -0
  1288. package/pages/c/_cluster/monitoring/monitor/index.vue +99 -0
  1289. package/pages/c/_cluster/monitoring/route-receiver/_id.vue +29 -0
  1290. package/pages/c/_cluster/monitoring/route-receiver/create.vue +22 -0
  1291. package/pages/c/_cluster/monitoring/route-receiver/index.vue +133 -0
  1292. package/pages/c/_cluster/navlinks/_group.vue +42 -0
  1293. package/pages/c/_cluster/neuvector/index.vue +75 -0
  1294. package/pages/c/_cluster/settings/DefaultLinksEditor.vue +128 -0
  1295. package/pages/c/_cluster/settings/banners.vue +361 -0
  1296. package/pages/c/_cluster/settings/brand.vue +648 -0
  1297. package/pages/c/_cluster/settings/index.vue +20 -0
  1298. package/pages/c/_cluster/settings/links.vue +167 -0
  1299. package/pages/c/_cluster/settings/performance.vue +515 -0
  1300. package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +175 -0
  1301. package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +551 -0
  1302. package/pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue +193 -0
  1303. package/pages/c/_cluster/uiplugins/CatalogList/index.vue +132 -0
  1304. package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +261 -0
  1305. package/pages/c/_cluster/uiplugins/InstallDialog.vue +366 -0
  1306. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +503 -0
  1307. package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +83 -0
  1308. package/pages/c/_cluster/uiplugins/UninstallDialog.vue +152 -0
  1309. package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +76 -0
  1310. package/pages/c/_cluster/uiplugins/__tests__/SetupUIPlugins.test.ts +77 -0
  1311. package/pages/c/_cluster/uiplugins/index.vue +1288 -0
  1312. package/pages/clusters/index.vue +21 -0
  1313. package/pages/diagnostic.vue +580 -0
  1314. package/pages/fail-whale.vue +203 -0
  1315. package/pages/home.vue +854 -0
  1316. package/pages/index.vue +54 -0
  1317. package/pages/prefs.vue +369 -0
  1318. package/pages/support/index.vue +266 -0
  1319. package/pkg/auto-import.js +118 -0
  1320. package/pkg/babel.config.js +8 -0
  1321. package/pkg/dynamic-importer.lib.js +82 -0
  1322. package/pkg/dynamic-plugin-loader.js +28 -0
  1323. package/pkg/import.js +10 -0
  1324. package/pkg/model-loader-require.lib.js +3 -0
  1325. package/pkg/tsconfig.json +65 -0
  1326. package/pkg/vue.config.js +146 -0
  1327. package/plugins/axios.js +31 -0
  1328. package/plugins/clean-html.js +103 -0
  1329. package/plugins/codemirror-loader.js +5 -0
  1330. package/plugins/codemirror.js +359 -0
  1331. package/plugins/dashboard-store/__tests__/actions.test.ts +250 -0
  1332. package/plugins/dashboard-store/__tests__/getters.test.ts +100 -0
  1333. package/plugins/dashboard-store/__tests__/mutations.test.ts +391 -0
  1334. package/plugins/dashboard-store/__tests__/resource-class.test.ts +49 -0
  1335. package/plugins/dashboard-store/__tests__/utils/store-mocks.ts +7 -0
  1336. package/plugins/dashboard-store/actions.js +784 -0
  1337. package/plugins/dashboard-store/classify.js +18 -0
  1338. package/plugins/dashboard-store/getters.js +457 -0
  1339. package/plugins/dashboard-store/index.js +53 -0
  1340. package/plugins/dashboard-store/model-loader-require.js +12 -0
  1341. package/plugins/dashboard-store/model-loader.js +76 -0
  1342. package/plugins/dashboard-store/mutations.js +548 -0
  1343. package/plugins/dashboard-store/normalize.js +50 -0
  1344. package/plugins/dashboard-store/resource-class.js +1904 -0
  1345. package/plugins/ember-cookie.js +13 -0
  1346. package/plugins/extend-router.js +80 -0
  1347. package/plugins/floating-vue.js +1 -0
  1348. package/plugins/formatters.js +15 -0
  1349. package/plugins/global-formatters.js +20 -0
  1350. package/plugins/i18n.js +136 -0
  1351. package/plugins/internal-api/index.ts +37 -0
  1352. package/plugins/internal-api/shared/base-api.ts +13 -0
  1353. package/plugins/internal-api/shell/shell.api.ts +108 -0
  1354. package/plugins/js-yaml.js +4 -0
  1355. package/plugins/nuxt-client-init.js +3 -0
  1356. package/plugins/plugin.js +93 -0
  1357. package/plugins/replaceall.js +19 -0
  1358. package/plugins/shortkey.js +282 -0
  1359. package/plugins/steve/__tests__/getters.test.ts +214 -0
  1360. package/plugins/steve/__tests__/header-warnings.test.ts +238 -0
  1361. package/plugins/steve/__tests__/mutations.test.ts +50 -0
  1362. package/plugins/steve/__tests__/resource-utils.test.ts +159 -0
  1363. package/plugins/steve/__tests__/steve-class.test.ts +59 -0
  1364. package/plugins/steve/__tests__/subscribe.spec.ts +109 -0
  1365. package/plugins/steve/__tests__/utils/mutation.test.helpers.ts +105 -0
  1366. package/plugins/steve/__tests__/utils/steve-mocks.ts +31 -0
  1367. package/plugins/steve/accept-or-reject-socket-message.ts +103 -0
  1368. package/plugins/steve/actions.js +386 -0
  1369. package/plugins/steve/caches/resourceCache.js +60 -0
  1370. package/plugins/steve/getters.js +342 -0
  1371. package/plugins/steve/header-warnings.ts +91 -0
  1372. package/plugins/steve/hybrid-class.js +102 -0
  1373. package/plugins/steve/index.js +76 -0
  1374. package/plugins/steve/mutations.js +210 -0
  1375. package/plugins/steve/norman-class.js +198 -0
  1376. package/plugins/steve/performanceTesting.js +128 -0
  1377. package/plugins/steve/projectAndNamespaceFiltering.utils.ts +80 -0
  1378. package/plugins/steve/resource-utils.ts +38 -0
  1379. package/plugins/steve/resourceWatcher.js +251 -0
  1380. package/plugins/steve/schema.d.ts +22 -0
  1381. package/plugins/steve/schema.utils.js +25 -0
  1382. package/plugins/steve/steve-class.js +61 -0
  1383. package/plugins/steve/steve-description-class.js +36 -0
  1384. package/plugins/steve/steve-pagination-utils.ts +513 -0
  1385. package/plugins/steve/subscribe.js +1092 -0
  1386. package/plugins/steve/worker/index.js +24 -0
  1387. package/plugins/steve/worker/web-worker.advanced.js +320 -0
  1388. package/plugins/steve/worker/web-worker.basic.js +116 -0
  1389. package/plugins/steve-create-worker.js +14 -0
  1390. package/plugins/version.js +11 -0
  1391. package/promptRemove/management.cattle.io.fleetworkspace.vue +98 -0
  1392. package/promptRemove/management.cattle.io.globalrole.vue +49 -0
  1393. package/promptRemove/management.cattle.io.project.vue +131 -0
  1394. package/promptRemove/management.cattle.io.roletemplate.vue +51 -0
  1395. package/promptRemove/mixin/roleDeletionCheck.js +105 -0
  1396. package/promptRemove/pod.vue +132 -0
  1397. package/public/index.html +75 -0
  1398. package/rancher-components/Accordion/Accordion.test.ts +45 -0
  1399. package/rancher-components/Accordion/Accordion.vue +86 -0
  1400. package/rancher-components/Accordion/index.ts +1 -0
  1401. package/rancher-components/BadgeState/BadgeState.test.ts +12 -0
  1402. package/rancher-components/BadgeState/BadgeState.vue +122 -0
  1403. package/rancher-components/BadgeState/index.ts +1 -0
  1404. package/rancher-components/Banner/Banner.test.ts +59 -0
  1405. package/rancher-components/Banner/Banner.vue +261 -0
  1406. package/rancher-components/Banner/index.ts +1 -0
  1407. package/rancher-components/Card/Card.test.ts +37 -0
  1408. package/rancher-components/Card/Card.vue +189 -0
  1409. package/rancher-components/Card/index.ts +1 -0
  1410. package/rancher-components/Form/Checkbox/Checkbox.test.ts +68 -0
  1411. package/rancher-components/Form/Checkbox/Checkbox.vue +507 -0
  1412. package/rancher-components/Form/Checkbox/index.ts +1 -0
  1413. package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +57 -0
  1414. package/rancher-components/Form/LabeledInput/LabeledInput.vue +512 -0
  1415. package/rancher-components/Form/LabeledInput/index.ts +1 -0
  1416. package/rancher-components/Form/Radio/RadioButton.test.ts +33 -0
  1417. package/rancher-components/Form/Radio/RadioButton.vue +328 -0
  1418. package/rancher-components/Form/Radio/RadioGroup.test.ts +27 -0
  1419. package/rancher-components/Form/Radio/RadioGroup.vue +305 -0
  1420. package/rancher-components/Form/Radio/index.ts +2 -0
  1421. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +199 -0
  1422. package/rancher-components/Form/TextArea/index.ts +1 -0
  1423. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +111 -0
  1424. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +197 -0
  1425. package/rancher-components/Form/ToggleSwitch/index.ts +1 -0
  1426. package/rancher-components/Form/index.ts +5 -0
  1427. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +152 -0
  1428. package/rancher-components/LabeledTooltip/index.ts +1 -0
  1429. package/rancher-components/RcButton/RcButton.test.ts +97 -0
  1430. package/rancher-components/RcButton/RcButton.vue +96 -0
  1431. package/rancher-components/RcButton/index.ts +2 -0
  1432. package/rancher-components/RcButton/types.ts +18 -0
  1433. package/rancher-components/RcDropdown/RcDropdown.vue +163 -0
  1434. package/rancher-components/RcDropdown/RcDropdownItem.vue +122 -0
  1435. package/rancher-components/RcDropdown/RcDropdownMenu.vue +71 -0
  1436. package/rancher-components/RcDropdown/RcDropdownSeparator.vue +6 -0
  1437. package/rancher-components/RcDropdown/RcDropdownTrigger.vue +52 -0
  1438. package/rancher-components/RcDropdown/index.ts +5 -0
  1439. package/rancher-components/RcDropdown/types.ts +49 -0
  1440. package/rancher-components/RcDropdown/useDropdownCollection.ts +54 -0
  1441. package/rancher-components/RcDropdown/useDropdownContext.ts +119 -0
  1442. package/rancher-components/StringList/StringList.test.ts +754 -0
  1443. package/rancher-components/StringList/StringList.vue +645 -0
  1444. package/rancher-components/StringList/index.ts +1 -0
  1445. package/scripts/.gitlab/workflows/build-extension-catalog.gitlab-ci.yml +69 -0
  1446. package/scripts/build-pkg.sh +102 -0
  1447. package/scripts/clean +6 -0
  1448. package/scripts/drone-build-pkg.sh +31 -0
  1449. package/scripts/extension/bundle +106 -0
  1450. package/scripts/extension/helm/charts/ui-plugin-server/.helmignore +23 -0
  1451. package/scripts/extension/helm/charts/ui-plugin-server/Chart.yaml +18 -0
  1452. package/scripts/extension/helm/charts/ui-plugin-server/templates/_helpers.tpl +63 -0
  1453. package/scripts/extension/helm/charts/ui-plugin-server/templates/cr.yaml +15 -0
  1454. package/scripts/extension/helm/charts/ui-plugin-server/values.yaml +10 -0
  1455. package/scripts/extension/helm/package/Dockerfile +27 -0
  1456. package/scripts/extension/helm/package/nginx.conf +17 -0
  1457. package/scripts/extension/helm/scripts/package +31 -0
  1458. package/scripts/extension/helm/scripts/patch +128 -0
  1459. package/scripts/extension/helm/scripts/version +31 -0
  1460. package/scripts/extension/helmpatch +80 -0
  1461. package/scripts/extension/parse-tag-name +39 -0
  1462. package/scripts/extension/publish +476 -0
  1463. package/scripts/pkgfile.js +23 -0
  1464. package/scripts/publish-pkg.sh +18 -0
  1465. package/scripts/publish-shell.sh +119 -0
  1466. package/scripts/record-deps.js +37 -0
  1467. package/scripts/serve-pkgs +71 -0
  1468. package/scripts/sync-shell-deps +37 -0
  1469. package/scripts/test-plugins-build.sh +246 -0
  1470. package/scripts/typegen.sh +101 -0
  1471. package/scripts/vue-migrate.js +686 -0
  1472. package/server/har-file.js +205 -0
  1473. package/server/server-middleware.js +11 -0
  1474. package/server/server.crt +22 -0
  1475. package/server/server.csr +16 -0
  1476. package/server/server.key +27 -0
  1477. package/server/v3.ext +8 -0
  1478. package/static/favicon.ico +0 -0
  1479. package/static/favicon.png +0 -0
  1480. package/static/loading-indicator.html +39 -0
  1481. package/store/__tests__/auth.test.ts +120 -0
  1482. package/store/__tests__/catalog.test.ts +207 -0
  1483. package/store/__tests__/index.test.ts +110 -0
  1484. package/store/__tests__/type-map.test.ts +1122 -0
  1485. package/store/action-menu.js +240 -0
  1486. package/store/auth.js +409 -0
  1487. package/store/aws.js +263 -0
  1488. package/store/catalog.js +666 -0
  1489. package/store/cru-resource.ts +26 -0
  1490. package/store/customisation.js +35 -0
  1491. package/store/digitalocean.js +198 -0
  1492. package/store/features.js +74 -0
  1493. package/store/github.js +109 -0
  1494. package/store/gitlab.js +159 -0
  1495. package/store/growl.js +98 -0
  1496. package/store/i18n.js +356 -0
  1497. package/store/index.js +1290 -0
  1498. package/store/linode.js +142 -0
  1499. package/store/modal.ts +71 -0
  1500. package/store/plugins.js +210 -0
  1501. package/store/pnap.js +128 -0
  1502. package/store/prefs.js +531 -0
  1503. package/store/resource-fetch.js +44 -0
  1504. package/store/slideInPanel.ts +47 -0
  1505. package/store/store-types.js +7 -0
  1506. package/store/type-map.js +2085 -0
  1507. package/store/type-map.utils.ts +243 -0
  1508. package/store/uiplugins.ts +67 -0
  1509. package/store/wm.js +95 -0
  1510. package/tsconfig.json +48 -0
  1511. package/tsconfig.paths.json +21 -0
  1512. package/types/api.d.ts +1 -0
  1513. package/types/components/labeledSelect.ts +50 -0
  1514. package/types/components/paginatedResourceTable.ts +25 -0
  1515. package/types/components/resourceLabeledSelect.ts +48 -0
  1516. package/types/fleet.d.ts +1 -0
  1517. package/types/form.ts +1 -0
  1518. package/types/generic.ts +2 -0
  1519. package/types/global-vue.d.ts +5 -0
  1520. package/types/internal-api/shell/growl.d.ts +25 -0
  1521. package/types/internal-api/shell/modal.d.ts +77 -0
  1522. package/types/internal-api/shell/slideIn.d.ts +15 -0
  1523. package/types/rancher/index.d.ts +9 -0
  1524. package/types/resources/fleet.d.ts +57 -0
  1525. package/types/resources/pod-security-admission.ts +36 -0
  1526. package/types/resources/settings.d.ts +93 -0
  1527. package/types/resources/userPreferences.d.ts +13 -0
  1528. package/types/shell/index.d.ts +4694 -0
  1529. package/types/store/dashboard-store.types.ts +46 -0
  1530. package/types/store/pagination.types.ts +470 -0
  1531. package/types/store/type-map.ts +30 -0
  1532. package/types/store/vuex.d.ts +17 -0
  1533. package/types/t.ts +1 -0
  1534. package/types/vue-shim.d.ts +23 -0
  1535. package/utils/__mocks__/socket.js +21 -0
  1536. package/utils/__tests__/array.test.ts +514 -0
  1537. package/utils/__tests__/cluster.test.ts +57 -0
  1538. package/utils/__tests__/create-yaml.test.ts +490 -0
  1539. package/utils/__tests__/formatter.test.ts +77 -0
  1540. package/utils/__tests__/grafana.test.ts +44 -0
  1541. package/utils/__tests__/kontainer.test.ts +180 -0
  1542. package/utils/__tests__/object.test.ts +443 -0
  1543. package/utils/__tests__/pod-security-admission.test.ts +61 -0
  1544. package/utils/__tests__/selector.test.ts +444 -0
  1545. package/utils/__tests__/sort.test.ts +61 -0
  1546. package/utils/__tests__/string.test.ts +91 -0
  1547. package/utils/__tests__/version.test.ts +18 -0
  1548. package/utils/alertmanagerconfig.js +181 -0
  1549. package/utils/array.ts +256 -0
  1550. package/utils/async.ts +38 -0
  1551. package/utils/auth.js +335 -0
  1552. package/utils/aws.js +0 -0
  1553. package/utils/axios.js +171 -0
  1554. package/utils/azure.js +24 -0
  1555. package/utils/banners.js +58 -0
  1556. package/utils/clipboard.js +5 -0
  1557. package/utils/cluster.js +333 -0
  1558. package/utils/color.js +148 -0
  1559. package/utils/computed.js +45 -0
  1560. package/utils/config.js +4 -0
  1561. package/utils/cookie-universal.js +10 -0
  1562. package/utils/create-yaml.js +518 -0
  1563. package/utils/crypto/LICENSE.txt +15 -0
  1564. package/utils/crypto/browserHashUtils.js +51 -0
  1565. package/utils/crypto/browserMd5.js +183 -0
  1566. package/utils/crypto/browserSha1.js +149 -0
  1567. package/utils/crypto/browserSha256.js +237 -0
  1568. package/utils/crypto/index.js +181 -0
  1569. package/utils/custom-validators.js +32 -0
  1570. package/utils/dom.js +15 -0
  1571. package/utils/download.js +35 -0
  1572. package/utils/duration.js +43 -0
  1573. package/utils/dynamic-importer.js +134 -0
  1574. package/utils/ember-page.js +30 -0
  1575. package/utils/error.js +211 -0
  1576. package/utils/errorTranslate.json +1336 -0
  1577. package/utils/favicon.js +49 -0
  1578. package/utils/fleet.ts +191 -0
  1579. package/utils/formatter.js +13 -0
  1580. package/utils/gatekeeper/util.js +35 -0
  1581. package/utils/gc/gc-interval.ts +40 -0
  1582. package/utils/gc/gc-root-store.js +76 -0
  1583. package/utils/gc/gc-route-changed.ts +44 -0
  1584. package/utils/gc/gc-types.ts +21 -0
  1585. package/utils/gc/gc.ts +282 -0
  1586. package/utils/git.ts +92 -0
  1587. package/utils/grafana.js +114 -0
  1588. package/utils/ingress.ts +64 -0
  1589. package/utils/kontainer.ts +190 -0
  1590. package/utils/kube.js +9 -0
  1591. package/utils/monitoring.js +63 -0
  1592. package/utils/namespace-filter.js +43 -0
  1593. package/utils/object.js +541 -0
  1594. package/utils/pagination-utils.ts +176 -0
  1595. package/utils/pagination-wrapper.ts +70 -0
  1596. package/utils/parse-externalid.js +139 -0
  1597. package/utils/platform.js +64 -0
  1598. package/utils/pod-security-admission.ts +39 -0
  1599. package/utils/poller-sequential.js +53 -0
  1600. package/utils/poller.js +39 -0
  1601. package/utils/position.js +172 -0
  1602. package/utils/promise.js +115 -0
  1603. package/utils/queue.js +70 -0
  1604. package/utils/router.js +140 -0
  1605. package/utils/select.js +88 -0
  1606. package/utils/selector.js +229 -0
  1607. package/utils/settings.ts +108 -0
  1608. package/utils/socket.js +409 -0
  1609. package/utils/sort.js +225 -0
  1610. package/utils/stream.js +49 -0
  1611. package/utils/string.js +363 -0
  1612. package/utils/svg-filter.js +301 -0
  1613. package/utils/time.js +121 -0
  1614. package/utils/title.ts +3 -0
  1615. package/utils/type-helpers.ts +9 -0
  1616. package/utils/uiplugins.ts +319 -0
  1617. package/utils/unit-tests/ChildRenderingRouterLinkStub.ts +36 -0
  1618. package/utils/units.js +184 -0
  1619. package/utils/url.ts +171 -0
  1620. package/utils/v-sphere.ts +285 -0
  1621. package/utils/validators/__tests__/cidr.test.ts +33 -0
  1622. package/utils/validators/cidr.js +14 -0
  1623. package/utils/validators/cluster-name.js +12 -0
  1624. package/utils/validators/container-images.js +24 -0
  1625. package/utils/validators/cron-schedule.js +14 -0
  1626. package/utils/validators/flow-output.js +15 -0
  1627. package/utils/validators/formRules/__tests__/index.test.ts +1218 -0
  1628. package/utils/validators/formRules/index.ts +535 -0
  1629. package/utils/validators/index.js +244 -0
  1630. package/utils/validators/kubernetes-name.js +39 -0
  1631. package/utils/validators/logging-outputs.js +11 -0
  1632. package/utils/validators/machine-pool.ts +20 -0
  1633. package/utils/validators/monitoring-route.js +13 -0
  1634. package/utils/validators/pod-affinity.js +128 -0
  1635. package/utils/validators/prometheusrule.js +76 -0
  1636. package/utils/validators/role-template.js +27 -0
  1637. package/utils/validators/service.js +136 -0
  1638. package/utils/validators/setting.js +9 -0
  1639. package/utils/version.js +128 -0
  1640. package/utils/versions.ts +39 -0
  1641. package/utils/width.js +39 -0
  1642. package/utils/window.js +46 -0
  1643. package/vue-config-helper.js +135 -0
  1644. package/vue.config.js +645 -0
@@ -0,0 +1,2538 @@
1
+ <script>
2
+ import difference from 'lodash/difference';
3
+ import throttle from 'lodash/throttle';
4
+ import isArray from 'lodash/isArray';
5
+ import merge from 'lodash/merge';
6
+ import CreateEditView from '@shell/mixins/create-edit-view';
7
+ import FormValidation from '@shell/mixins/form-validation';
8
+ import { normalizeName } from '@shell/utils/kube';
9
+
10
+ import {
11
+ CAPI,
12
+ MANAGEMENT,
13
+ NAMESPACE,
14
+ NORMAN,
15
+ SCHEMA,
16
+ DEFAULT_WORKSPACE,
17
+ SECRET,
18
+ HCI,
19
+ } from '@shell/config/types';
20
+ import { _CREATE, _EDIT, _VIEW } from '@shell/config/query-params';
21
+
22
+ import { findBy, removeObject, clear } from '@shell/utils/array';
23
+ import { createYaml } from '@shell/utils/create-yaml';
24
+ import {
25
+ clone, diff, set, get, isEmpty, mergeWithReplace
26
+ } from '@shell/utils/object';
27
+ import { allHash } from '@shell/utils/promise';
28
+ import {
29
+ getAllOptionsAfterCurrentVersion, filterOutDeprecatedPatchVersions, isHarvesterSatisfiesVersion, labelForAddon, initSchedulingCustomization
30
+ } from '@shell/utils/cluster';
31
+
32
+ import { BadgeState } from '@components/BadgeState';
33
+ import { Banner } from '@components/Banner';
34
+ import CruResource, { CONTEXT_HOOK_EDIT_YAML } from '@shell/components/CruResource';
35
+ import Loading from '@shell/components/Loading';
36
+ import NameNsDescription from '@shell/components/form/NameNsDescription';
37
+ import Tab from '@shell/components/Tabbed/Tab';
38
+ import Tabbed from '@shell/components/Tabbed';
39
+
40
+ import { canViewClusterMembershipEditor } from '@shell/components/form/Members/ClusterMembershipEditor';
41
+ import semver from 'semver';
42
+
43
+ import { CLOUD_CREDENTIAL_OVERRIDE } from '@shell/models/nodedriver';
44
+ import { SETTING } from '@shell/config/settings';
45
+ import { base64Encode } from '@shell/utils/crypto';
46
+ import { CAPI as CAPI_ANNOTATIONS, CLUSTER_BADGE } from '@shell/config/labels-annotations';
47
+ import AgentEnv from '@shell/edit/provisioning.cattle.io.cluster/AgentEnv';
48
+ import Labels from '@shell/edit/provisioning.cattle.io.cluster/Labels';
49
+ import MachinePool from '@shell/edit/provisioning.cattle.io.cluster/tabs/MachinePool';
50
+ import SelectCredential from './SelectCredential';
51
+ import { ELEMENTAL_SCHEMA_IDS, KIND, ELEMENTAL_CLUSTER_PROVIDER } from '../../config/elemental-types';
52
+ import AgentConfiguration from '@shell/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue';
53
+ import { getApplicableExtensionEnhancements } from '@shell/core/plugin-helpers';
54
+ import { ExtensionPoint, TabLocation } from '@shell/core/types';
55
+ import MemberRoles from '@shell/edit/provisioning.cattle.io.cluster/tabs/MemberRoles';
56
+ import Basics from '@shell/edit/provisioning.cattle.io.cluster/tabs/Basics';
57
+ import Etcd from '@shell/edit/provisioning.cattle.io.cluster/tabs/etcd';
58
+ import Networking from '@shell/edit/provisioning.cattle.io.cluster/tabs/networking';
59
+ import Upgrade from '@shell/edit/provisioning.cattle.io.cluster/tabs/upgrade';
60
+ import Registries from '@shell/edit/provisioning.cattle.io.cluster/tabs/registries';
61
+ import AddOnConfig from '@shell/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig';
62
+ import Advanced from '@shell/edit/provisioning.cattle.io.cluster/tabs/Advanced';
63
+ import { DEFAULT_COMMON_BASE_PATH, DEFAULT_SUBDIRS } from '@shell/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig';
64
+ import ClusterAppearance from '@shell/components/form/ClusterAppearance';
65
+ import AddOnAdditionalManifest from '@shell/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest';
66
+ import VsphereUtils, { VMWARE_VSPHERE } from '@shell/utils/v-sphere';
67
+ import { mapGetters } from 'vuex';
68
+ const HARVESTER = 'harvester';
69
+ const HARVESTER_CLOUD_PROVIDER = 'harvester-cloud-provider';
70
+ const NETBIOS_TRUNCATION_LENGTH = 15;
71
+
72
+ /**
73
+ * Classes to be adopted by the node badges in Machine pools
74
+ */
75
+ const NODE_TOTAL = {
76
+ error: {
77
+ color: 'bg-error',
78
+ icon: 'icon-x',
79
+ },
80
+ warning: {
81
+ color: 'bg-warning',
82
+ icon: 'icon-warning',
83
+ },
84
+ success: {
85
+ color: 'bg-success',
86
+ icon: 'icon-checkmark'
87
+ }
88
+ };
89
+ const CLUSTER_AGENT_CUSTOMIZATION = 'clusterAgentDeploymentCustomization';
90
+ const FLEET_AGENT_CUSTOMIZATION = 'fleetAgentDeploymentCustomization';
91
+
92
+ const REGISTRIES_TAB_NAME = 'registry';
93
+
94
+ const isAzureK8sUnsupported = (version) => semver.gte(version, '1.30.0');
95
+
96
+ export default {
97
+ emits: ['update:value', 'input'],
98
+
99
+ components: {
100
+ AgentEnv,
101
+ BadgeState,
102
+ Banner,
103
+ AgentConfiguration,
104
+ CruResource,
105
+ Labels,
106
+ Loading,
107
+ MachinePool,
108
+ NameNsDescription,
109
+ SelectCredential,
110
+ Tab,
111
+ Tabbed,
112
+ MemberRoles,
113
+ Basics,
114
+ Etcd,
115
+ Networking,
116
+ Upgrade,
117
+ Registries,
118
+ AddOnConfig,
119
+ Advanced,
120
+ ClusterAppearance,
121
+ AddOnAdditionalManifest
122
+ },
123
+
124
+ mixins: [CreateEditView, FormValidation],
125
+
126
+ props: {
127
+ mode: {
128
+ type: String,
129
+ required: true,
130
+ },
131
+
132
+ value: {
133
+ type: Object,
134
+ required: true,
135
+ },
136
+
137
+ provider: {
138
+ type: String,
139
+ required: true,
140
+ },
141
+
142
+ providerConfig: {
143
+ type: Object,
144
+ default: () => null
145
+ }
146
+ },
147
+
148
+ async fetch() {
149
+ await this.fetchRke2Versions();
150
+ await this.initSpecs();
151
+ await this.initAddons();
152
+ await this.initRegistry();
153
+ const sc = await initSchedulingCustomization(this.value.spec, this.features, this.$store, this.mode);
154
+
155
+ this.clusterAgentDefaultPC = sc.clusterAgentDefaultPC;
156
+ this.clusterAgentDefaultPDB = sc.clusterAgentDefaultPDB;
157
+ this.schedulingCustomizationFeatureEnabled = sc.schedulingCustomizationFeatureEnabled;
158
+ this.schedulingCustomizationOriginallyEnabled = sc.schedulingCustomizationOriginallyEnabled;
159
+ this.errors = this.errors.concat(sc.errors);
160
+
161
+ Object.entries(this.chartValues).forEach(([name, value]) => {
162
+ const key = this.chartVersionKey(name);
163
+
164
+ this.userChartValues[key] = value;
165
+ });
166
+
167
+ this.setAgentConfiguration();
168
+ },
169
+
170
+ data() {
171
+ if (!this.value.spec.rkeConfig) {
172
+ this.value.spec.rkeConfig = {};
173
+ }
174
+
175
+ if (!this.value.spec.rkeConfig.chartValues) {
176
+ this.value.spec.rkeConfig.chartValues = {};
177
+ }
178
+
179
+ if (!this.value.spec.rkeConfig.upgradeStrategy) {
180
+ this.value.spec.rkeConfig.upgradeStrategy = {
181
+ controlPlaneConcurrency: '1',
182
+ controlPlaneDrainOptions: {},
183
+ workerConcurrency: '1',
184
+ workerDrainOptions: {},
185
+ };
186
+ }
187
+
188
+ // default for dataDirectories configuration obj
189
+ if (!this.value.spec.rkeConfig.dataDirectories) {
190
+ this.value.spec.rkeConfig.dataDirectories = {
191
+ systemAgent: '',
192
+ provisioning: '',
193
+ k8sDistro: '',
194
+ };
195
+ }
196
+
197
+ // default for dataDirectories configuration systemAgent config
198
+ if (!this.value.spec.rkeConfig.dataDirectories.systemAgent) {
199
+ this.value.spec.rkeConfig.dataDirectories.systemAgent = '';
200
+ }
201
+ // default for dataDirectories configuration provisioning config
202
+ if (!this.value.spec.rkeConfig.dataDirectories.provisioning) {
203
+ this.value.spec.rkeConfig.dataDirectories.provisioning = '';
204
+ }
205
+ // default for dataDirectories configuration k8sDistro config
206
+ if (!this.value.spec.rkeConfig.dataDirectories.k8sDistro) {
207
+ this.value.spec.rkeConfig.dataDirectories.k8sDistro = '';
208
+ }
209
+
210
+ if (!this.value.spec.rkeConfig.machineGlobalConfig) {
211
+ this.value.spec.rkeConfig.machineGlobalConfig = {};
212
+ }
213
+
214
+ if (!this.value.spec.rkeConfig.machineSelectorConfig?.length) {
215
+ this.value.spec.rkeConfig.machineSelectorConfig = [{ config: {} }];
216
+ }
217
+
218
+ const truncateLimit = this.value.defaultHostnameLengthLimit || 0;
219
+
220
+ return {
221
+ loadedOnce: false,
222
+ lastIdx: 0,
223
+ allPSAs: [],
224
+ credentialId: '',
225
+ credential: null,
226
+ machinePools: null,
227
+ rke2Versions: null,
228
+ k3sVersions: null,
229
+ defaultRke2: '',
230
+ defaultK3s: '',
231
+ s3Backup: false,
232
+ /**
233
+ * All info related to a specific version of the chart
234
+ *
235
+ * This includes chart itself, README and values
236
+ *
237
+ * { [chartName:string]: { chart: json, readme: string, values: json } }
238
+ */
239
+ versionInfo: {},
240
+ membershipUpdate: {},
241
+ showDeprecatedPatchVersions: false,
242
+ systemRegistry: null,
243
+ registryHost: null,
244
+ showCustomRegistryInput: false,
245
+ showCustomRegistryAdvancedInput: false,
246
+ registrySecret: null,
247
+ userChartValues: {},
248
+ userChartValuesTemp: {},
249
+ addonsRev: 0,
250
+ fvFormRuleSets: [{
251
+ path: 'metadata.name', rules: ['subDomain'], translationKey: 'nameNsDescription.name.label'
252
+ }],
253
+ harvesterVersionRange: {},
254
+ cisOverride: false,
255
+ truncateLimit,
256
+ busy: false,
257
+ machinePoolValidation: {}, // map of validation states for each machine pool
258
+ machinePoolErrors: {},
259
+ addonConfigValidation: {}, // validation state of each addon config (boolean of whether codemirror's yaml lint passed)
260
+ allNamespaces: [],
261
+ extensionTabs: getApplicableExtensionEnhancements(this, ExtensionPoint.TAB, TabLocation.CLUSTER_CREATE_RKE2, this.$route, this),
262
+ clusterAgentDeploymentCustomization: null,
263
+ schedulingCustomizationFeatureEnabled: false,
264
+ schedulingCustomizationOriginallyEnabled: false,
265
+ clusterAgentDefaultPC: null,
266
+ clusterAgentDefaultPDB: null,
267
+ activeTab: null,
268
+ REGISTRIES_TAB_NAME,
269
+ labelForAddon
270
+
271
+ };
272
+ },
273
+
274
+ computed: {
275
+ ...mapGetters({ features: 'features/get' }),
276
+ isActiveTabRegistries() {
277
+ return this.activeTab?.selectedName === REGISTRIES_TAB_NAME;
278
+ },
279
+ clusterName() {
280
+ return this.value.metadata?.name || '';
281
+ },
282
+ showClusterAppearance() {
283
+ return this.mode === _CREATE;
284
+ },
285
+ clusterBadgeAbbreviation() {
286
+ return this.$store.getters['customisation/getPreviewCluster'];
287
+ },
288
+ rkeConfig() {
289
+ return this.value.spec.rkeConfig;
290
+ },
291
+
292
+ isElementalCluster() {
293
+ return this.provider === ELEMENTAL_CLUSTER_PROVIDER || this.value?.machineProvider?.toLowerCase() === KIND.MACHINE_INV_SELECTOR_TEMPLATES.toLowerCase();
294
+ },
295
+
296
+ chartValues() {
297
+ return this.value.spec.rkeConfig.chartValues;
298
+ },
299
+
300
+ serverConfig() {
301
+ return this.value.spec.rkeConfig.machineGlobalConfig;
302
+ },
303
+
304
+ agentConfig() {
305
+ return this.value.agentConfig;
306
+ },
307
+
308
+ unsupportedSelectorConfig() {
309
+ let global = 0;
310
+ let kubeletOnly = 0;
311
+ let other = 0;
312
+
313
+ // The form supports one config that has no selector for all the main parts
314
+ // And one or more configs that have a selector and exactly only kubelet-args.
315
+ // If there are any other properties set, or multiple configs with no selector
316
+ // show a warning that you're editing only part of the config in the UI.
317
+
318
+ for (const conf of this.value.spec?.rkeConfig?.machineSelectorConfig) {
319
+ if (conf.machineLabelSelector) {
320
+ const keys = Object.keys(conf.config || {});
321
+
322
+ if (keys.length === 0 || (keys.length === 1 && keys[0] === 'kubelet-arg')) {
323
+ kubeletOnly++;
324
+ } else {
325
+ other++;
326
+ }
327
+ } else {
328
+ global++;
329
+ }
330
+ }
331
+
332
+ // eslint-disable-next-line no-console
333
+ console.log(`Global: ${ global }, Kubelet Only: ${ kubeletOnly }, Other: ${ other }`);
334
+
335
+ return (global > 1 || other > 0);
336
+ },
337
+
338
+ versionOptions() {
339
+ const cur = this.liveValue?.spec?.kubernetesVersion || '';
340
+ const existingRke2 = this.mode === _EDIT && cur.includes('rke2');
341
+ const existingK3s = this.mode === _EDIT && cur.includes('k3s');
342
+ const isAzure = this.agentConfig?.['cloud-provider-name'] === 'azure';
343
+
344
+ let allValidRke2Versions = getAllOptionsAfterCurrentVersion(this.$store, this.rke2Versions, (existingRke2 ? cur : null), this.defaultRke2);
345
+ let allValidK3sVersions = getAllOptionsAfterCurrentVersion(this.$store, this.k3sVersions, (existingK3s ? cur : null), this.defaultK3s);
346
+
347
+ if (!this.showDeprecatedPatchVersions) {
348
+ // Normally, we only want to show the most recent patch version
349
+ // for each Kubernetes minor version. However, if the user
350
+ // opts in to showing deprecated versions, we don't filter them.
351
+ allValidRke2Versions = filterOutDeprecatedPatchVersions(allValidRke2Versions, cur);
352
+ allValidK3sVersions = filterOutDeprecatedPatchVersions(allValidK3sVersions, cur);
353
+ }
354
+
355
+ if (isAzure) {
356
+ allValidRke2Versions = allValidRke2Versions.filter((v) => !isAzureK8sUnsupported(v.value));
357
+ allValidK3sVersions = allValidK3sVersions.filter((v) => !isAzureK8sUnsupported(v.value));
358
+ }
359
+
360
+ const showRke2 = allValidRke2Versions.length && !existingK3s;
361
+ const showK3s = allValidK3sVersions.length && !existingRke2;
362
+ const out = [];
363
+
364
+ if (showRke2) {
365
+ if (showK3s) {
366
+ out.push({ kind: 'group', label: this.t('cluster.provider.rke2') });
367
+ }
368
+
369
+ out.push(...allValidRke2Versions);
370
+ }
371
+
372
+ if (showK3s) {
373
+ if (showRke2) {
374
+ out.push({ kind: 'group', label: this.t('cluster.provider.k3s') });
375
+ }
376
+
377
+ out.push(...allValidK3sVersions);
378
+ }
379
+
380
+ if (cur) {
381
+ const existing = out.find((x) => x.value === cur);
382
+
383
+ if (existing) {
384
+ existing.disabled = false;
385
+ }
386
+ }
387
+
388
+ return out;
389
+ },
390
+
391
+ /**
392
+ * Kube Version
393
+ */
394
+ selectedVersion() {
395
+ const str = this.value.spec.kubernetesVersion;
396
+
397
+ if (!str) {
398
+ return;
399
+ }
400
+
401
+ const out = findBy(this.versionOptions, 'value', str);
402
+
403
+ // Adding the option 'none' to Container Network select (used in Basics component)
404
+ // https://github.com/rancher/dashboard/issues/10338
405
+ // there's an update loop on refresh that might include 'none'
406
+ // multiple times... Prevent that
407
+ if (out?.serverArgs?.cni?.options && !out.serverArgs?.cni?.options.includes('none')) {
408
+ out.serverArgs.cni.options.push('none');
409
+ }
410
+
411
+ return out;
412
+ },
413
+
414
+ haveArgInfo() {
415
+ return Boolean(this.selectedVersion?.serverArgs && this.selectedVersion?.agentArgs);
416
+ },
417
+
418
+ serverArgs() {
419
+ return this.selectedVersion?.serverArgs || {};
420
+ },
421
+
422
+ agentArgs() {
423
+ return this.selectedVersion?.agentArgs || {};
424
+ },
425
+
426
+ /**
427
+ * The addons (kube charts) applicable for the selected kube version
428
+ *
429
+ * { [chartName:string]: { repo: string, version: string } }
430
+ */
431
+ chartVersions() {
432
+ return this.selectedVersion?.charts || {};
433
+ },
434
+
435
+ needCredential() {
436
+ // Check non-provider specific config
437
+ if (
438
+ this.provider === 'custom' ||
439
+ this.provider === 'import' ||
440
+ this.isElementalCluster || // Elemental cluster can make use of `cloud-credential`: false
441
+ this.mode === _VIEW
442
+ ) {
443
+ return false;
444
+ }
445
+
446
+ // Check provider specific config
447
+ if (this.cloudCredentialsOverride === true || this.cloudCredentialsOverride === false) {
448
+ return this.cloudCredentialsOverride;
449
+ }
450
+
451
+ if (this.providerConfig?.spec?.builtin === false && this.providerConfig?.spec?.addCloudCredential === false) {
452
+ return false;
453
+ }
454
+
455
+ return true;
456
+ },
457
+
458
+ /**
459
+ * Override the native way of determining if cloud credentials are required (builtin ++ node driver spec.addCloudCredentials)
460
+ *
461
+ * 1) Override via extensions
462
+ * - `true` or actual component - return true
463
+ * - `false` - return false
464
+ * 2) Override via hardcoded setting
465
+ */
466
+ cloudCredentialsOverride() {
467
+ const cloudCredential = this.$plugin.getDynamic('cloud-credential', this.provider);
468
+
469
+ if (cloudCredential === undefined) {
470
+ return CLOUD_CREDENTIAL_OVERRIDE[this.provider];
471
+ }
472
+
473
+ return !!cloudCredential;
474
+ },
475
+
476
+ hasMachinePools() {
477
+ if (this.provider === 'custom' || this.provider === 'import') {
478
+ return false;
479
+ }
480
+
481
+ return true;
482
+ },
483
+
484
+ unremovedMachinePools() {
485
+ return (this.machinePools || []).filter((x) => !x.remove);
486
+ },
487
+
488
+ /**
489
+ * Extension provider where being provisioned by an extension
490
+ */
491
+ extensionProvider() {
492
+ const extClass = this.$plugin.getDynamic('provisioner', this.provider);
493
+
494
+ if (extClass) {
495
+ return new extClass({
496
+ dispatch: this.$store.dispatch,
497
+ getters: this.$store.getters,
498
+ axios: this.$store.$axios,
499
+ $plugin: this.$store.app.$plugin,
500
+ $t: this.t,
501
+ isCreate: this.isCreate
502
+ });
503
+ }
504
+
505
+ return undefined;
506
+ },
507
+
508
+ /**
509
+ * Is a namespace needed? Only supported for providers from extensions, otherwise default is no
510
+ */
511
+ needsNamespace() {
512
+ return this.extensionProvider ? !!this.extensionProvider.namespaced : false;
513
+ },
514
+
515
+ machineConfigSchema() {
516
+ let schema;
517
+
518
+ if (!this.hasMachinePools) {
519
+ return null;
520
+ } else if (this.isElementalCluster) {
521
+ schema = ELEMENTAL_SCHEMA_IDS.MACHINE_INV_SELECTOR_TEMPLATES;
522
+ } else {
523
+ schema = `${ CAPI.MACHINE_CONFIG_GROUP }.${ this.provider }config`;
524
+ }
525
+
526
+ // If this is an extension provider then the extension can provide the schema
527
+ const extensionSchema = this.extensionProvider?.machineConfigSchema;
528
+
529
+ if (extensionSchema) {
530
+ // machineConfigSchema can either be the schema name (string) or the schema itself (object)
531
+ if (typeof extensionSchema === 'object') {
532
+ return extensionSchema;
533
+ }
534
+
535
+ // Name of schema to use
536
+ schema = extensionSchema;
537
+ }
538
+
539
+ return this.$store.getters['management/schemaFor'](schema);
540
+ },
541
+
542
+ nodeTotals() {
543
+ const roles = ['etcd', 'controlPlane', 'worker'];
544
+ const counts = {};
545
+ const out = {
546
+ color: {},
547
+ label: {},
548
+ icon: {},
549
+ tooltip: {},
550
+ };
551
+
552
+ for (const role of roles) {
553
+ counts[role] = 0;
554
+ out.color[role] = NODE_TOTAL.success.color;
555
+ out.icon[role] = NODE_TOTAL.success.icon;
556
+ }
557
+
558
+ for (const row of this.machinePools || []) {
559
+ if (row.remove) {
560
+ continue;
561
+ }
562
+
563
+ const qty = parseInt(row.pool.quantity, 10);
564
+
565
+ if (isNaN(qty)) {
566
+ continue;
567
+ }
568
+
569
+ for (const role of roles) {
570
+ counts[role] = counts[role] + (row.pool[`${ role }Role`] ? qty : 0);
571
+ }
572
+ }
573
+
574
+ for (const role of roles) {
575
+ out.label[role] = this.t(`cluster.machinePool.nodeTotals.label.${ role }`, { count: counts[role] });
576
+ out.tooltip[role] = this.t(`cluster.machinePool.nodeTotals.tooltip.${ role }`, { count: counts[role] });
577
+ }
578
+
579
+ if (counts.etcd <= 0) {
580
+ out.color.etcd = NODE_TOTAL.error.color;
581
+ out.icon.etcd = NODE_TOTAL.error.icon;
582
+ } else if (counts.etcd === 1 || counts.etcd % 2 === 0 || counts.etcd > 7) {
583
+ out.color.etcd = NODE_TOTAL.warning.color;
584
+ out.icon.etcd = NODE_TOTAL.warning.icon;
585
+ }
586
+
587
+ if (counts.controlPlane <= 0) {
588
+ out.color.controlPlane = NODE_TOTAL.error.color;
589
+ out.icon.controlPlane = NODE_TOTAL.error.icon;
590
+ } else if (counts.controlPlane === 1) {
591
+ out.color.controlPlane = NODE_TOTAL.warning.color;
592
+ out.icon.controlPlane = NODE_TOTAL.warning.icon;
593
+ }
594
+
595
+ if (counts.worker <= 0) {
596
+ out.color.worker = NODE_TOTAL.error.color;
597
+ out.icon.worker = NODE_TOTAL.error.icon;
598
+ } else if (counts.worker === 1) {
599
+ out.color.worker = NODE_TOTAL.warning.color;
600
+ out.icon.worker = NODE_TOTAL.warning.icon;
601
+ }
602
+
603
+ return out;
604
+ },
605
+
606
+ showCni() {
607
+ return !!this.serverArgs.cni;
608
+ },
609
+
610
+ showCloudProvider() {
611
+ return !!this.agentArgs['cloud-provider-name'];
612
+ },
613
+
614
+ /**
615
+ * The chart names of the addons applicable to the current kube version and selected cloud provider
616
+ */
617
+ addonNames() {
618
+ const names = [];
619
+ const cni = this.serverConfig.cni;
620
+
621
+ if (typeof cni === 'string') {
622
+ names.push(...cni.split(',').map((x) => `rke2-${ x }`));
623
+ } else if (Array.isArray(cni)) {
624
+ names.push(...cni.map((x) => `rke2-${ x }`));
625
+ }
626
+
627
+ if (this.showCloudProvider) { // Shouldn't be removed such that changes to it will re-trigger this watch
628
+ if (this.agentConfig?.['cloud-provider-name'] === 'rancher-vsphere') {
629
+ names.push('rancher-vsphere-cpi', 'rancher-vsphere-csi');
630
+ }
631
+
632
+ if (this.agentConfig?.['cloud-provider-name'] === HARVESTER) {
633
+ names.push(HARVESTER_CLOUD_PROVIDER);
634
+ }
635
+ }
636
+
637
+ return names;
638
+ },
639
+
640
+ /**
641
+ * The charts of the addons applicable to the current kube version and selected cloud provider
642
+ *
643
+ * These are the charts themselves and do not include chart readme or values
644
+ */
645
+ addonVersions() {
646
+ const versions = this.addonNames.map((name) => this.versionInfo[name]?.chart);
647
+
648
+ return versions.filter((x) => !!x);
649
+ },
650
+
651
+ cloudProviderOptions() {
652
+ const out = [{
653
+ label: this.$store.getters['i18n/t']('cluster.rke2.cloudProvider.defaultValue.label'),
654
+ value: '',
655
+ disabled: this.canAzureMigrateOnEdit
656
+ }];
657
+
658
+ if (!!this.agentArgs['cloud-provider-name']?.options) {
659
+ const preferred = this.$store.getters['plugins/cloudProviderForDriver'](this.provider);
660
+
661
+ for (const opt of this.agentArgs['cloud-provider-name']?.options) {
662
+ // If we don't have a preferred provider... show all options
663
+ const showAllOptions = preferred === undefined;
664
+ // If we have a preferred provider... only show default, preferred and external
665
+ const isPreferred = opt === preferred;
666
+ const isExternal = opt === 'external';
667
+ const isAzure = opt === 'azure';
668
+
669
+ let disabled = false;
670
+
671
+ if ((this.isHarvesterExternalCredential || this.isHarvesterIncompatible) && isPreferred) {
672
+ disabled = true;
673
+ }
674
+
675
+ if (isAzure && isAzureK8sUnsupported(this.value.spec.kubernetesVersion)) {
676
+ disabled = true;
677
+ }
678
+
679
+ if (!isAzure && !isExternal && this.canAzureMigrateOnEdit) {
680
+ disabled = true;
681
+ }
682
+
683
+ if (showAllOptions || isPreferred || isExternal) {
684
+ out.push({
685
+ label: this.$store.getters['i18n/withFallback'](`cluster.cloudProvider."${ opt }".label`, null, opt),
686
+ value: opt,
687
+ disabled,
688
+ });
689
+ }
690
+ }
691
+ }
692
+
693
+ const cur = this.agentConfig?.['cloud-provider-name'];
694
+
695
+ if (cur && !out.find((x) => x.value === cur)) {
696
+ out.unshift({ label: `${ cur } (Current)`, value: cur });
697
+ }
698
+
699
+ return out;
700
+ },
701
+
702
+ isAzureProviderUnsupported() {
703
+ const isAzureAvailable = !!this.cloudProviderOptions.find((p) => p.value === 'azure');
704
+ const isAzureSelected = this.agentConfig['cloud-provider-name'] === 'azure';
705
+
706
+ return isAzureAvailable && (isAzureK8sUnsupported(this.value.spec.kubernetesVersion) || isAzureSelected);
707
+ },
708
+
709
+ canAzureMigrateOnEdit() {
710
+ if (!this.isEdit) {
711
+ return false;
712
+ }
713
+
714
+ const isAzureLiveProvider = this.liveValue.agentConfig['cloud-provider-name'] === 'azure';
715
+
716
+ return isAzureLiveProvider &&
717
+ semver.gte(this.liveValue?.spec?.kubernetesVersion, '1.27.0') &&
718
+ semver.lt(this.liveValue?.spec?.kubernetesVersion, '1.30.0');
719
+ },
720
+
721
+ canManageMembers() {
722
+ return canViewClusterMembershipEditor(this.$store);
723
+ },
724
+
725
+ isHarvesterDriver() {
726
+ return this.$route.query.type === HARVESTER;
727
+ },
728
+
729
+ defaultVersion() {
730
+ const all = this.versionOptions.filter((x) => !!x.value);
731
+ const first = all[0]?.value;
732
+ const preferred = all.find((x) => x.value === this.defaultRke2)?.value;
733
+
734
+ const rke2 = getAllOptionsAfterCurrentVersion(this.$store, this.rke2Versions, null);
735
+ const showRke2 = rke2.length;
736
+ let out;
737
+
738
+ if (this.isHarvesterDriver && showRke2) {
739
+ const satisfiesVersion = rke2.filter((v) => {
740
+ return isHarvesterSatisfiesVersion(v.value);
741
+ }) || [];
742
+
743
+ if (satisfiesVersion.length > 0) {
744
+ out = satisfiesVersion[0]?.value;
745
+ }
746
+ }
747
+
748
+ if (!out) {
749
+ out = preferred || first;
750
+ }
751
+
752
+ return out;
753
+ },
754
+
755
+ appsOSWarning() {
756
+ if (this.mode !== _EDIT) {
757
+ return null;
758
+ }
759
+ const { linuxWorkerCount, windowsWorkerCount } = this.value?.mgmt?.status || {};
760
+
761
+ if (!windowsWorkerCount) {
762
+ if (!!this.machinePools?.find((pool) => {
763
+ return pool?.config?.os === 'windows';
764
+ })) {
765
+ return this.t('cluster.banner.os', { newOS: 'Windows', existingOS: 'Linux' });
766
+ }
767
+ } else if (!linuxWorkerCount) {
768
+ if (this.machinePools.find((pool) => {
769
+ return pool?.config?.os === 'linux';
770
+ })) {
771
+ return this.t('cluster.banner.os', { newOS: 'Linux', existingOS: 'Windows' });
772
+ }
773
+ }
774
+
775
+ return null;
776
+ },
777
+
778
+ showForm() {
779
+ return !!this.credentialId || !this.needCredential;
780
+ },
781
+
782
+ isHarvesterExternalCredential() {
783
+ return this.credential?.harvestercredentialConfig?.clusterType === 'external';
784
+ },
785
+
786
+ isHarvesterIncompatible() {
787
+ let ccmRke2Version = (this.chartVersions['harvester-cloud-provider'] || {})['version'];
788
+ let csiRke2Version = (this.chartVersions['harvester-csi-driver'] || {})['version'];
789
+
790
+ const ccmVersion = this.harvesterVersionRange?.['harvester-cloud-provider'];
791
+ const csiVersion = this.harvesterVersionRange?.['harvester-csi-provider'];
792
+
793
+ if ((ccmRke2Version || '').endsWith('00')) {
794
+ ccmRke2Version = ccmRke2Version.slice(0, -2);
795
+ }
796
+
797
+ if ((csiRke2Version || '').endsWith('00')) {
798
+ csiRke2Version = csiRke2Version.slice(0, -2);
799
+ }
800
+
801
+ if (ccmVersion && csiVersion) {
802
+ if (semver.satisfies(ccmRke2Version, ccmVersion) &&
803
+ semver.satisfies(csiRke2Version, csiVersion)) {
804
+ return false;
805
+ } else {
806
+ return true;
807
+ }
808
+ } else {
809
+ return false;
810
+ }
811
+ },
812
+
813
+ validationPassed() {
814
+ const validRequiredPools = this.hasMachinePools ? this.hasRequiredNodes() : true;
815
+
816
+ let base = (this.provider === 'custom' || this.isElementalCluster || !!this.credentialId || !this.needCredential);
817
+
818
+ // and in all of the validation statuses for each machine pool
819
+ Object.values(this.machinePoolValidation).forEach((v) => (base = base && v));
820
+
821
+ const hasAddonConfigErrors = Object.values(this.addonConfigValidation).filter((v) => v === false).length > 0;
822
+
823
+ return validRequiredPools && base && !hasAddonConfigErrors;
824
+ },
825
+ currentCluster() {
826
+ if (this.mode === _EDIT) {
827
+ return { ...this.value };
828
+ } else {
829
+ return this.$store.getters['customisation/getPreviewCluster'];
830
+ }
831
+ },
832
+ localValue: {
833
+ get() {
834
+ return this.value;
835
+ },
836
+ set(newValue) {
837
+ this.$emit('update:value', newValue);
838
+ }
839
+ }
840
+ },
841
+
842
+ watch: {
843
+ clusterBadgeAbbreviation: {
844
+ immediate: true,
845
+ handler(neu) {
846
+ if (!neu) {
847
+ return;
848
+ }
849
+
850
+ if (Object.keys(neu.badge).length <= 0) {
851
+ return { ...this.value };
852
+ }
853
+
854
+ const obj = {
855
+ [CLUSTER_BADGE.ICON_TEXT]: neu.badge.iconText, [CLUSTER_BADGE.COLOR]: neu.badge.color, [CLUSTER_BADGE.TEXT]: neu.badge.text
856
+ };
857
+
858
+ this.value.metadata.annotations = {
859
+ ...this.value.metadata.annotations,
860
+ ...obj
861
+ };
862
+ }
863
+ },
864
+
865
+ credentialId(val) {
866
+ if (val) {
867
+ this.credential = this.$store.getters['rancher/byId'](NORMAN.CLOUD_CREDENTIAL, this.credentialId);
868
+
869
+ if (this.isHarvesterDriver) {
870
+ this.setHarvesterVersionRange();
871
+ }
872
+ } else {
873
+ this.credential = null;
874
+ }
875
+
876
+ this.value.spec.cloudCredentialSecretName = val;
877
+ },
878
+
879
+ addonNames(neu, old) {
880
+ // To catch the 'some addons' --> 'no addons' case also check array length (`difference([], [1,2,3]) === []`)
881
+ const diff = old.length !== neu.length || difference(neu, old).length;
882
+
883
+ if (diff) {
884
+ // Allow time for addonNames to update... then fetch any missing addons
885
+ this.$nextTick(() => this.initAddons());
886
+ }
887
+ },
888
+
889
+ selectedVersion() {
890
+ this.versionInfo = {}; // Invalidate cache such that version info relevent to selected kube version is updated
891
+
892
+ // Allow time for addonNames to update... then fetch any missing addons
893
+ this.$nextTick(() => this.initAddons());
894
+ if (this.mode === _CREATE) {
895
+ this.initServerAgentArgs();
896
+ }
897
+ },
898
+
899
+ showCni(neu) {
900
+ // Update `serverConfig.cni to recalculate addonNames...
901
+ // ... which will eventually update `value.spec.rkeConfig.chartValues`
902
+ if (neu) {
903
+ // Type supports CNI, assign default if we can
904
+ if (!this.serverConfig.cni) {
905
+ const def = this.serverArgs.cni.default;
906
+
907
+ this.serverConfig.cni = def;
908
+ }
909
+ } else {
910
+ // Type doesn't support cni, clear `cni`
911
+ this.serverConfig.cni = undefined;
912
+ }
913
+ },
914
+
915
+ showCloudProvider(neu) {
916
+ if (!neu) {
917
+ // No cloud provider available? Then clear cloud provider setting. This will recalculate addonNames...
918
+ // ... which will eventually update `value.spec.rkeConfig.chartValues`
919
+ this.agentConfig['cloud-provider-name'] = undefined;
920
+ }
921
+ },
922
+ },
923
+
924
+ created() {
925
+ this.registerBeforeHook(this.saveMachinePools, 'save-machine-pools', 1);
926
+ this.registerBeforeHook(this.setRegistryConfig, 'set-registry-config');
927
+ this.registerBeforeHook(this.handleVsphereCpiSecret, 'sync-vsphere-cpi');
928
+ this.registerBeforeHook(this.handleVsphereCsiSecret, 'sync-vsphere-csi');
929
+ this.registerAfterHook(this.cleanupMachinePools, 'cleanup-machine-pools');
930
+ this.registerAfterHook(this.saveRoleBindings, 'save-role-bindings');
931
+
932
+ // Register any hooks for this extension provider
933
+ if (this.extensionProvider?.registerSaveHooks) {
934
+ this.extensionProvider.registerSaveHooks(this.registerBeforeHook, this.registerAfterHook, this.value);
935
+ }
936
+ },
937
+
938
+ methods: {
939
+ set,
940
+
941
+ async handleVsphereCpiSecret() {
942
+ return VsphereUtils.handleVsphereCpiSecret(this);
943
+ },
944
+
945
+ async handleVsphereCsiSecret() {
946
+ return VsphereUtils.handleVsphereCsiSecret(this);
947
+ },
948
+
949
+ /**
950
+ * Initialize all the cluster specs
951
+ */
952
+ async initSpecs() {
953
+ if (!this.value.spec) {
954
+ this.value.spec = {};
955
+ }
956
+
957
+ if (!this.value.spec.machineSelectorConfig) {
958
+ this.value.spec.machineSelectorConfig = [];
959
+ }
960
+
961
+ if (!this.value.spec.machineSelectorConfig.find((x) => !x.machineLabelSelector)) {
962
+ this.value.spec.machineSelectorConfig.unshift({ config: {} });
963
+ }
964
+
965
+ if (this.value.spec.cloudCredentialSecretName) {
966
+ await this.$store.dispatch('rancher/findAll', { type: NORMAN.CLOUD_CREDENTIAL });
967
+ this.credentialId = `${ this.value.spec.cloudCredentialSecretName }`;
968
+ }
969
+
970
+ if (!this.value.spec.kubernetesVersion) {
971
+ this.value.spec.kubernetesVersion = this.defaultVersion;
972
+ }
973
+
974
+ if (this.rkeConfig.etcd?.s3?.bucket) {
975
+ this.s3Backup = true;
976
+ }
977
+
978
+ if (!this.rkeConfig.etcd) {
979
+ this.rkeConfig.etcd = {
980
+ disableSnapshots: false,
981
+ s3: null,
982
+ snapshotRetention: 5,
983
+ snapshotScheduleCron: '0 */5 * * *',
984
+ };
985
+ } else if (typeof this.rkeConfig.etcd.disableSnapshots === 'undefined') {
986
+ const disableSnapshots = !this.rkeConfig.etcd.snapshotRetention && !this.rkeConfig.etcd.snapshotScheduleCron;
987
+
988
+ this.rkeConfig.etcd.disableSnapshots = disableSnapshots;
989
+ }
990
+
991
+ // Namespaces if required - this is mainly for custom provisioners via extensions that want
992
+ // to allow creating their resources in a different namespace
993
+ if (this.needsNamespace) {
994
+ this.allNamespaces = await this.$store.dispatch('management/findAll', { type: NAMESPACE });
995
+ }
996
+
997
+ if (!this.machinePools) {
998
+ await this.initMachinePools(this.value.spec.rkeConfig.machinePools);
999
+ if (this.mode === _CREATE && !this.machinePools.length) {
1000
+ await this.addMachinePool();
1001
+ }
1002
+ }
1003
+
1004
+ if (this.value.spec.defaultPodSecurityAdmissionConfigurationTemplateName === undefined) {
1005
+ this.value.spec.defaultPodSecurityAdmissionConfigurationTemplateName = '';
1006
+ }
1007
+
1008
+ if ( isEmpty(this.value?.spec?.localClusterAuthEndpoint) ) {
1009
+ set(this.value, 'spec.localClusterAuthEndpoint', { enabled: false });
1010
+ }
1011
+ },
1012
+
1013
+ /**
1014
+ * Fetch RKE versions and their configurations to be mapped to the form
1015
+ */
1016
+ async fetchRke2Versions() {
1017
+ if (!this.rke2Versions) {
1018
+ const hash = {
1019
+ rke2Versions: this.$store.dispatch('management/request', { url: '/v1-rke2-release/releases' }),
1020
+ k3sVersions: this.$store.dispatch('management/request', { url: '/v1-k3s-release/releases' }),
1021
+ };
1022
+
1023
+ if (this.$store.getters['management/canList'](MANAGEMENT.PSA)) {
1024
+ hash.allPSAs = await this.$store.dispatch('management/findAll', { type: MANAGEMENT.PSA });
1025
+ }
1026
+
1027
+ // Get the latest versions from the global settings if possible
1028
+ const globalSettings = await this.$store.getters['management/all'](MANAGEMENT.SETTING) || [];
1029
+ const defaultRke2Setting = globalSettings.find((setting) => setting.id === 'rke2-default-version') || {};
1030
+ const defaultK3sSetting = globalSettings.find((setting) => setting.id === 'k3s-default-version') || {};
1031
+
1032
+ let defaultRke2 = defaultRke2Setting?.value || defaultRke2Setting?.default;
1033
+ let defaultK3s = defaultK3sSetting?.value || defaultK3sSetting?.default;
1034
+
1035
+ // RKE2: Use the channel if we can not get the version from the settings
1036
+ if (!defaultRke2) {
1037
+ hash.rke2Channels = this.$store.dispatch('management/request', { url: '/v1-rke2-release/channels' });
1038
+ }
1039
+
1040
+ // K3S: Use the channel if we can not get the version from the settings
1041
+ if (!defaultK3s) {
1042
+ hash.k3sChannels = this.$store.dispatch('management/request', { url: '/v1-k3s-release/channels' });
1043
+ }
1044
+
1045
+ const res = await allHash(hash);
1046
+
1047
+ this.allPSAs = res.allPSAs || [];
1048
+ this.rke2Versions = res.rke2Versions.data || [];
1049
+ this.k3sVersions = res.k3sVersions.data || [];
1050
+
1051
+ if (!defaultRke2) {
1052
+ const rke2Channels = res.rke2Channels.data || [];
1053
+
1054
+ defaultRke2 = rke2Channels.find((x) => x.id === 'default')?.latest;
1055
+ }
1056
+
1057
+ if (!defaultK3s) {
1058
+ const k3sChannels = res.k3sChannels.data || [];
1059
+
1060
+ defaultK3s = k3sChannels.find((x) => x.id === 'default')?.latest;
1061
+ }
1062
+
1063
+ if (!this.rke2Versions.length && !this.k3sVersions.length) {
1064
+ throw new Error('No version info found in KDM');
1065
+ }
1066
+
1067
+ // Store default versions
1068
+ this.defaultRke2 = defaultRke2;
1069
+ this.defaultK3s = defaultK3s;
1070
+ }
1071
+ },
1072
+
1073
+ setSchedulingCustomization(val) {
1074
+ if (val) {
1075
+ set(this.value, 'spec.clusterAgentDeploymentCustomization.schedulingCustomization', { priorityClass: this.clusterAgentDefaultPC, podDisruptionBudget: this.clusterAgentDefaultPDB });
1076
+ } else {
1077
+ delete this.value.spec.clusterAgentDeploymentCustomization.schedulingCustomization;
1078
+ }
1079
+ },
1080
+
1081
+ cleanAgentConfiguration(model, key) {
1082
+ if (!model || !model[key]) {
1083
+ return;
1084
+ }
1085
+
1086
+ const v = model[key];
1087
+
1088
+ if (Array.isArray(v) && v.length === 0) {
1089
+ delete model[key];
1090
+ } else if (v && typeof v === 'object') {
1091
+ Object.keys(v).forEach((k) => {
1092
+ // delete these auxiliary props used in podAffinity and nodeAffinity that shouldn't be sent to the server
1093
+ if (k === '_namespaceOption' || k === '_namespaces' || k === '_anti' || k === '_id') {
1094
+ delete v[k];
1095
+ }
1096
+
1097
+ // prevent cleanup of "namespaceSelector" when an empty object because it represents all namespaces in pod/node affinity
1098
+ // https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#podaffinityterm-v1-core
1099
+ if (k !== 'namespaceSelector') {
1100
+ this.cleanAgentConfiguration(v, k);
1101
+ }
1102
+ });
1103
+
1104
+ if (Object.keys(v).length === 0) {
1105
+ delete model[key];
1106
+ }
1107
+ }
1108
+ },
1109
+
1110
+ /**
1111
+ * Clean agent configuration objects, so we only send values when the user has configured something
1112
+ */
1113
+ agentConfigurationCleanup() {
1114
+ this.cleanAgentConfiguration(this.value.spec, CLUSTER_AGENT_CUSTOMIZATION);
1115
+ this.cleanAgentConfiguration(this.value.spec, FLEET_AGENT_CUSTOMIZATION);
1116
+ },
1117
+
1118
+ /**
1119
+ * Ensure we have empty models for the two agent configurations
1120
+ */
1121
+ setAgentConfiguration() {
1122
+ // Cluster Agent Configuration
1123
+ if (!this.value.spec[CLUSTER_AGENT_CUSTOMIZATION]) {
1124
+ this.value.spec[CLUSTER_AGENT_CUSTOMIZATION] = {};
1125
+ }
1126
+
1127
+ // Fleet Agent Configuration
1128
+ if (!this.value.spec[FLEET_AGENT_CUSTOMIZATION]) {
1129
+ this.value.spec[FLEET_AGENT_CUSTOMIZATION] = {};
1130
+ }
1131
+ },
1132
+
1133
+ /**
1134
+ * set instanceNameLimit to 15 to all pool machine if truncateHostnames checkbox is clicked
1135
+ */
1136
+ truncateHostname(neu) {
1137
+ if (neu) {
1138
+ this.value.defaultHostnameLengthLimit = NETBIOS_TRUNCATION_LENGTH;
1139
+ this.truncateLimit = NETBIOS_TRUNCATION_LENGTH;
1140
+ } else {
1141
+ this.truncateLimit = 0;
1142
+ this.value.removeDefaultHostnameLengthLimit();
1143
+ }
1144
+ },
1145
+
1146
+ enableLocalClusterAuthEndpoint(neu) {
1147
+ this.localValue.spec.localClusterAuthEndpoint.enabled = neu;
1148
+ if (!neu) {
1149
+ delete this.localValue.spec.localClusterAuthEndpoint.caCerts;
1150
+ delete this.localValue.spec.localClusterAuthEndpoint.fqdn;
1151
+ } else {
1152
+ this.localValue.spec.localClusterAuthEndpoint.caCerts = '';
1153
+ this.localValue.spec.localClusterAuthEndpoint.fqdn = '';
1154
+ }
1155
+ },
1156
+
1157
+ /**
1158
+ * Get machine pools from the cluster configuration
1159
+ * this.value.spec.rkeConfig.machinePools
1160
+ */
1161
+ async initMachinePools(existing) {
1162
+ const out = [];
1163
+
1164
+ if (existing?.length) {
1165
+ for (const pool of existing) {
1166
+ let type;
1167
+
1168
+ if (this.isElementalCluster) {
1169
+ type = ELEMENTAL_SCHEMA_IDS.MACHINE_INV_SELECTOR_TEMPLATES;
1170
+ } else {
1171
+ type = `${ CAPI.MACHINE_CONFIG_GROUP }.${ pool.machineConfigRef.kind.toLowerCase() }`;
1172
+ }
1173
+
1174
+ let config;
1175
+ let configMissing = false;
1176
+
1177
+ if (this.$store.getters['management/canList'](type)) {
1178
+ try {
1179
+ config = await this.$store.dispatch('management/find', {
1180
+ type,
1181
+ id: `${ this.value.metadata.namespace }/${ pool.machineConfigRef.name }`,
1182
+ });
1183
+ } catch (e) {
1184
+ // Some users can't see the config, that's ok.
1185
+ // we will display a banner for a 404 only for elemental
1186
+ if (e?.status === 404) {
1187
+ if (this.isElementalCluster) {
1188
+ configMissing = true;
1189
+ }
1190
+ }
1191
+ }
1192
+ }
1193
+
1194
+ // @TODO what if the pool is missing?
1195
+ const id = `pool${ ++this.lastIdx }`;
1196
+
1197
+ out.push({
1198
+ id,
1199
+ remove: false,
1200
+ create: false,
1201
+ update: true,
1202
+ pool: clone(pool),
1203
+ config: config ? await this.$store.dispatch('management/clone', { resource: config }) : null,
1204
+ configMissing
1205
+ });
1206
+ }
1207
+ }
1208
+
1209
+ this.machinePools = out;
1210
+ },
1211
+
1212
+ async addMachinePool(idx) {
1213
+ // this.machineConfigSchema is the schema for the Machine Pool's machine configuration for the given provider
1214
+ if (!this.machineConfigSchema) {
1215
+ return;
1216
+ }
1217
+
1218
+ const numCurrentPools = this.machinePools.length || 0;
1219
+
1220
+ let config;
1221
+
1222
+ if (this.extensionProvider?.createMachinePoolMachineConfig) {
1223
+ config = await this.extensionProvider.createMachinePoolMachineConfig(idx, this.machinePools, this.value);
1224
+ } else {
1225
+ // Default - use the schema
1226
+ config = await this.$store.dispatch('management/createPopulated', {
1227
+ type: this.machineConfigSchema.id,
1228
+ metadata: { namespace: DEFAULT_WORKSPACE }
1229
+ });
1230
+
1231
+ // If there is no specific model, the applyDefaults does nothing by default
1232
+ config.applyDefaults(idx, this.machinePools);
1233
+ }
1234
+
1235
+ const name = `pool${ ++this.lastIdx }`;
1236
+
1237
+ const pool = {
1238
+ id: name,
1239
+ config,
1240
+ remove: false,
1241
+ create: true,
1242
+ update: false,
1243
+ uid: name,
1244
+ pool: {
1245
+ name,
1246
+ etcdRole: numCurrentPools === 0,
1247
+ controlPlaneRole: numCurrentPools === 0,
1248
+ workerRole: true,
1249
+ hostnamePrefix: '',
1250
+ labels: {},
1251
+ quantity: 1,
1252
+ unhealthyNodeTimeout: '0m',
1253
+ machineConfigRef: {
1254
+ kind: this.machineConfigSchema.attributes?.kind,
1255
+ name: null,
1256
+ },
1257
+ drainBeforeDelete: true
1258
+ },
1259
+ };
1260
+
1261
+ if (this.provider === VMWARE_VSPHERE) {
1262
+ pool.pool.machineOS = 'linux';
1263
+ }
1264
+
1265
+ if (this.isElementalCluster) {
1266
+ pool.pool.machineConfigRef.apiVersion = `${ this.machineConfigSchema.attributes.group }/${ this.machineConfigSchema.attributes.version }`;
1267
+ }
1268
+
1269
+ this.machinePools.push(pool);
1270
+
1271
+ this.$nextTick(() => {
1272
+ if (this.$refs.pools?.select) {
1273
+ this.$refs.pools.select(name);
1274
+ }
1275
+ });
1276
+ },
1277
+
1278
+ removeMachinePool(idx) {
1279
+ const entry = this.machinePools[idx];
1280
+
1281
+ if (!entry) {
1282
+ return;
1283
+ }
1284
+
1285
+ if (entry.create) {
1286
+ // If this is a new pool that isn't saved yet, it can just be dropped
1287
+ removeObject(this.machinePools, entry);
1288
+ } else {
1289
+ // Mark for removal on save
1290
+ entry.remove = true;
1291
+ }
1292
+ },
1293
+
1294
+ async syncMachineConfigWithLatest(machinePool) {
1295
+ if (machinePool?.config?.id) {
1296
+ // Use management/request instead of management/find to avoid overwriting the current machine pool in the store
1297
+ const _latestConfig = await this.$store.dispatch('management/request', { url: `/v1/${ machinePool.config.type }s/${ machinePool.config.id }` });
1298
+ const latestConfig = await this.$store.dispatch('management/create', _latestConfig);
1299
+
1300
+ const clonedCurrentConfig = await this.$store.dispatch('management/clone', { resource: machinePool.config });
1301
+ const clonedLatestConfig = await this.$store.dispatch('management/clone', { resource: latestConfig });
1302
+
1303
+ // We don't allow the user to edit any of the fields in metadata from the UI so it's safe to override it with the
1304
+ // metadata defined by the latest backend value. This is primarily used to ensure the resourceVersion is up to date.
1305
+ delete clonedCurrentConfig.metadata;
1306
+
1307
+ if (this.provider === VMWARE_VSPHERE) {
1308
+ machinePool.config = mergeWithReplace(clonedLatestConfig, clonedCurrentConfig, { mutateOriginal: true });
1309
+ } else {
1310
+ machinePool.config = merge(clonedLatestConfig, clonedCurrentConfig);
1311
+ }
1312
+ }
1313
+ },
1314
+
1315
+ async saveMachinePools(hookContext) {
1316
+ if (hookContext === CONTEXT_HOOK_EDIT_YAML) {
1317
+ await new Promise((resolve, reject) => {
1318
+ this.$store.dispatch('cluster/promptModal', {
1319
+ component: 'GenericPrompt',
1320
+ componentProps: {
1321
+ title: this.t('cluster.rke2.modal.editYamlMachinePool.title'),
1322
+ body: this.t('cluster.rke2.modal.editYamlMachinePool.body'),
1323
+ applyMode: 'editAndContinue',
1324
+ confirm: async(confirmed) => {
1325
+ if (confirmed) {
1326
+ await this.validateMachinePool();
1327
+
1328
+ if (this.errors.length) {
1329
+ reject(new Error('Machine Pool validation errors'));
1330
+ }
1331
+
1332
+ resolve();
1333
+ } else {
1334
+ reject(new Error('User Cancelled'));
1335
+ }
1336
+ }
1337
+ },
1338
+ });
1339
+ });
1340
+ }
1341
+
1342
+ const finalPools = [];
1343
+
1344
+ // If the extension provider wants to do this, let them
1345
+ if (this.extensionProvider?.saveMachinePoolConfigs) {
1346
+ return await this.extensionProvider.saveMachinePoolConfigs(this.machinePools, this.value);
1347
+ }
1348
+
1349
+ for (const entry of this.machinePools) {
1350
+ if (entry.remove) {
1351
+ continue;
1352
+ }
1353
+
1354
+ await this.syncMachineConfigWithLatest(entry);
1355
+
1356
+ // Capitals and such aren't allowed;
1357
+ entry.pool.name = normalizeName(entry.pool.name) || 'pool';
1358
+
1359
+ const prefix = `${ this.value.metadata.name }-${ entry.pool.name }`.substr(0, 50).toLowerCase();
1360
+
1361
+ if (entry.create) {
1362
+ if (!entry.config.metadata?.name) {
1363
+ entry.config.metadata.generateName = `nc-${ prefix }-`;
1364
+ }
1365
+
1366
+ const neu = await entry.config.save();
1367
+
1368
+ entry.config = neu;
1369
+ entry.pool.machineConfigRef.name = neu.metadata.name;
1370
+ entry.create = false;
1371
+ entry.update = true;
1372
+ } else if (entry.update) {
1373
+ entry.config = await entry.config.save();
1374
+ }
1375
+
1376
+ // Ensure Elemental clusters have a hostname prefix
1377
+ if (this.isElementalCluster && !entry.pool.hostnamePrefix) {
1378
+ entry.pool.hostnamePrefix = `${ prefix }-`;
1379
+ }
1380
+
1381
+ finalPools.push(entry.pool);
1382
+ }
1383
+
1384
+ this.value.spec.rkeConfig.machinePools = finalPools;
1385
+ },
1386
+
1387
+ async cleanupMachinePools() {
1388
+ for (const entry of this.machinePools) {
1389
+ if (entry.remove && entry.config) {
1390
+ try {
1391
+ await entry.config.remove();
1392
+ } catch (e) { }
1393
+ }
1394
+ }
1395
+ },
1396
+
1397
+ async saveRoleBindings() {
1398
+ await this.value.waitForMgmt();
1399
+
1400
+ if (this.membershipUpdate.save) {
1401
+ await this.membershipUpdate.save(this.value.mgmt.id);
1402
+ }
1403
+ },
1404
+
1405
+ /**
1406
+ * Ensure that all the existing node roles pool are at least 1 each
1407
+ */
1408
+ hasRequiredNodes() {
1409
+ return this.nodeTotals?.color && Object.values(this.nodeTotals.color).every((color) => color !== NODE_TOTAL.error.color);
1410
+ },
1411
+
1412
+ cancelCredential() {
1413
+ if (this.$refs.cruresource) {
1414
+ this.$refs.cruresource.emitOrRoute();
1415
+ }
1416
+ },
1417
+
1418
+ done() {
1419
+ let routeName = 'c-cluster-product-resource';
1420
+
1421
+ if (this.mode === _CREATE && (this.provider === 'import' || this.provider === 'custom')) {
1422
+ // Go show the registration command
1423
+ routeName = 'c-cluster-product-resource-namespace-id';
1424
+ }
1425
+
1426
+ this.$router.push({
1427
+ name: routeName,
1428
+ params: {
1429
+ cluster: this.$route.params.cluster,
1430
+ product: this.$store.getters['productId'],
1431
+ resource: CAPI.RANCHER_CLUSTER,
1432
+ namespace: this.value.metadata.namespace,
1433
+ id: this.value.metadata.name,
1434
+ },
1435
+ });
1436
+ },
1437
+
1438
+ showAddonConfirmation() {
1439
+ return new Promise((resolve, reject) => {
1440
+ this.$store.dispatch('cluster/promptModal', {
1441
+ component: 'AddonConfigConfirmationDialog',
1442
+ resources: [(value) => resolve(value)]
1443
+ });
1444
+ });
1445
+ },
1446
+
1447
+ // Set busy before save and clear after save
1448
+ async saveOverride(btnCb) {
1449
+ this['busy'] = true;
1450
+
1451
+ // If the provider is from an extension, let it do the provision step
1452
+ if (this.extensionProvider?.provision) {
1453
+ const errors = await this.extensionProvider?.provision(this.value, this.machinePools);
1454
+ const okay = (errors || []).length === 0;
1455
+
1456
+ this.errors = errors;
1457
+ this['busy'] = false;
1458
+
1459
+ btnCb(okay);
1460
+
1461
+ if (okay) {
1462
+ // If saved okay, go to the done route
1463
+ return this.done();
1464
+ }
1465
+ }
1466
+
1467
+ // Default save
1468
+ return this._doSaveOverride((done) => {
1469
+ this['busy'] = false;
1470
+
1471
+ return btnCb(done);
1472
+ });
1473
+ },
1474
+
1475
+ async _doSaveOverride(btnCb) {
1476
+ // We cannot use the hook, because it is triggered on YAML toggle without restore initialized data
1477
+ this.agentConfigurationCleanup();
1478
+
1479
+ const isEditVersion = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
1480
+
1481
+ if (isEditVersion) {
1482
+ const shouldContinue = await this.showAddonConfirmation();
1483
+
1484
+ if (!shouldContinue) {
1485
+ return btnCb('cancelled');
1486
+ }
1487
+ }
1488
+
1489
+ this.validateClusterName();
1490
+
1491
+ await this.validateMachinePool();
1492
+
1493
+ if (this.errors.length) {
1494
+ btnCb(false);
1495
+
1496
+ return;
1497
+ }
1498
+
1499
+ try {
1500
+ const clusterId = get(this.credential, 'decodedData.clusterId') || '';
1501
+
1502
+ this.applyChartValues(this.value.spec.rkeConfig);
1503
+
1504
+ const isUpgrade = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
1505
+
1506
+ if (this.agentConfig?.['cloud-provider-name'] === HARVESTER && clusterId && (this.isCreate || isUpgrade)) {
1507
+ const namespace = this.machinePools?.[0]?.config?.vmNamespace;
1508
+
1509
+ const res = await this.$store.dispatch('management/request', {
1510
+ url: `/k8s/clusters/${ clusterId }/v1/harvester/kubeconfig`,
1511
+ method: 'POST',
1512
+ data: {
1513
+ csiClusterRoleName: 'harvesterhci.io:csi-driver',
1514
+ clusterRoleName: 'harvesterhci.io:cloudprovider',
1515
+ namespace,
1516
+ serviceAccountName: this.value.metadata.name,
1517
+ },
1518
+ });
1519
+
1520
+ const kubeconfig = res.data;
1521
+
1522
+ const harvesterKubeconfigSecret = await this.createKubeconfigSecret(kubeconfig);
1523
+
1524
+ this.agentConfig['cloud-provider-config'] = `secret://fleet-default:${ harvesterKubeconfigSecret?.metadata?.name }`;
1525
+
1526
+ if (this.isCreate) {
1527
+ set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.global.cattle.clusterName`, this.value.metadata.name);
1528
+ }
1529
+
1530
+ const distroSubdir = this.value?.spec?.kubernetesVersion?.includes('k3s') ? DEFAULT_SUBDIRS.K8S_DISTRO_K3S : DEFAULT_SUBDIRS.K8S_DISTRO_RKE2;
1531
+ const distroRoot = this.value?.spec?.rkeConfig?.dataDirectories?.k8sDistro?.length ? this.value?.spec?.rkeConfig?.dataDirectories?.k8sDistro : `${ DEFAULT_COMMON_BASE_PATH }/${ distroSubdir }`;
1532
+
1533
+ set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.cloudConfigPath`, `${ distroRoot }/etc/config-files/cloud-provider-config`);
1534
+ }
1535
+ } catch (err) {
1536
+ this.errors.push(err);
1537
+
1538
+ btnCb(false);
1539
+
1540
+ return;
1541
+ }
1542
+
1543
+ // Remove null profile on machineGlobalConfig - https://github.com/rancher/dashboard/issues/8480
1544
+ if (this.value.spec?.rkeConfig?.machineGlobalConfig?.profile === null) {
1545
+ delete this.value.spec.rkeConfig.machineGlobalConfig.profile;
1546
+ }
1547
+
1548
+ // Store the current data for fleet and cluster agent so that we can re-apply it later if the save fails
1549
+ // The cleanup occurs before save with agentConfigurationCleanup()
1550
+ const clusterAgentDeploymentCustomization = this.value.spec[CLUSTER_AGENT_CUSTOMIZATION] ? JSON.parse(JSON.stringify(this.value.spec[CLUSTER_AGENT_CUSTOMIZATION])) : null;
1551
+ const fleetAgentDeploymentCustomization = this.value.spec[FLEET_AGENT_CUSTOMIZATION] ? JSON.parse(JSON.stringify(this.value.spec[FLEET_AGENT_CUSTOMIZATION])) : null;
1552
+
1553
+ await this.save(btnCb);
1554
+
1555
+ // comes from createEditView mixin
1556
+ // if there are any errors saving, restore the agent config data
1557
+ if (this.errors?.length) {
1558
+ // Ensure the agent configuration is set back to the values before we changed (cleaned) it
1559
+ this.value.spec[CLUSTER_AGENT_CUSTOMIZATION] = clusterAgentDeploymentCustomization;
1560
+ this.value.spec[FLEET_AGENT_CUSTOMIZATION] = fleetAgentDeploymentCustomization;
1561
+ }
1562
+ },
1563
+
1564
+ async actuallySave(url) {
1565
+ if (this.extensionProvider?.saveCluster) {
1566
+ return await this.extensionProvider?.saveCluster(this.value, this.schema);
1567
+ }
1568
+
1569
+ if (this.isCreate) {
1570
+ url = url || this.schema.linkFor('collection');
1571
+ const res = await this.value.save({ url });
1572
+
1573
+ if (res) {
1574
+ Object.assign(this.value, res);
1575
+ }
1576
+ } else {
1577
+ await this.value.save();
1578
+ }
1579
+ },
1580
+
1581
+ // create a secret to reference the harvester cluster kubeconfig in rkeConfig
1582
+ async createKubeconfigSecret(kubeconfig = '') {
1583
+ const clusterName = this.value.metadata.name;
1584
+ const secret = await this.$store.dispatch('management/create', {
1585
+ type: SECRET,
1586
+ metadata: {
1587
+ namespace: 'fleet-default', generateName: 'harvesterconfig', annotations: { [CAPI_ANNOTATIONS.SECRET_AUTH]: clusterName, [CAPI_ANNOTATIONS.SECRET_WILL_DELETE]: 'true' }
1588
+ },
1589
+ data: { credential: base64Encode(kubeconfig) }
1590
+ });
1591
+
1592
+ return secret.save({ url: '/v1/secrets', method: 'POST' });
1593
+ },
1594
+
1595
+ cancel() {
1596
+ this.$router.push({
1597
+ name: 'c-cluster-product-resource',
1598
+ params: {
1599
+ cluster: this.$route.params.cluster,
1600
+ product: this.$store.getters['productId'],
1601
+ resource: CAPI.RANCHER_CLUSTER,
1602
+ },
1603
+ });
1604
+ },
1605
+
1606
+ /**
1607
+ * Ensure all chart information required to show addons is available
1608
+ *
1609
+ * This basically means
1610
+ * 1) That the full chart relating to the addon is fetched (which includes core chart, readme and values)
1611
+ * 2) We're ready to cache any values the user provides for each addon
1612
+ */
1613
+ async initAddons() {
1614
+ this.addonConfigValidation = {};
1615
+
1616
+ for (const chartName of this.addonNames) {
1617
+ const entry = this.chartVersions[chartName];
1618
+
1619
+ // prevent fetching of addon config for 'none' CNI option
1620
+ // https://github.com/rancher/dashboard/issues/10338
1621
+ if (this.versionInfo[chartName] || chartName.includes('none')) {
1622
+ continue;
1623
+ }
1624
+
1625
+ try {
1626
+ const res = await this.$store.dispatch('catalog/getVersionInfo', {
1627
+ repoType: 'cluster',
1628
+ repoName: entry.repo,
1629
+ chartName,
1630
+ versionName: entry.version,
1631
+ });
1632
+
1633
+ this.versionInfo[chartName] = res;
1634
+ const key = this.chartVersionKey(chartName);
1635
+
1636
+ if (!this.userChartValues[key]) {
1637
+ this.userChartValues[key] = {};
1638
+ }
1639
+ } catch (e) {
1640
+ console.error(`Failed to fetch or process chart info for ${ chartName }`); // eslint-disable-line no-console
1641
+ }
1642
+ }
1643
+ },
1644
+
1645
+ showAddons(key) {
1646
+ this.addonsRev++;
1647
+ this.addonNames.forEach((name) => {
1648
+ const chartValues = this.versionInfo[name]?.questions ? this.initYamlEditor(name) : {};
1649
+
1650
+ this.userChartValuesTemp[name] = chartValues;
1651
+ });
1652
+ this.refreshComponentWithYamls(key);
1653
+ },
1654
+ refreshComponentWithYamls(key) {
1655
+ const component = this.$refs[key];
1656
+
1657
+ if (Array.isArray(component) && component.length > 0) {
1658
+ this.refreshYamls(component[0].$refs);
1659
+ } else if (component) {
1660
+ this.refreshYamls(component.$refs);
1661
+ }
1662
+ },
1663
+
1664
+ refreshYamls(refs) {
1665
+ const keys = Object.keys(refs).filter((x) => x.startsWith('yaml'));
1666
+
1667
+ for (const k of keys) {
1668
+ const entry = refs[k];
1669
+ const list = isArray(entry) ? entry : [entry];
1670
+
1671
+ for (const component of list) {
1672
+ component?.refresh(); // `yaml` ref can be undefined on switching from Basic to Addon tab (Azure --> Amazon --> addon)
1673
+ }
1674
+ }
1675
+ },
1676
+
1677
+ updateValues(name, values) {
1678
+ this.userChartValuesTemp[name] = values;
1679
+ this.syncChartValues(name);
1680
+ },
1681
+
1682
+ syncChartValues: throttle(function(name) {
1683
+ const fromChart = this.versionInfo[name]?.values;
1684
+ const fromUser = this.userChartValuesTemp[name];
1685
+ const different = diff(fromChart, fromUser);
1686
+
1687
+ this.userChartValues[this.chartVersionKey(name)] = different;
1688
+ }, 250, { leading: true }),
1689
+
1690
+ initYamlEditor(name) {
1691
+ const defaultChartValue = this.versionInfo[name];
1692
+ const key = this.chartVersionKey(name);
1693
+
1694
+ return mergeWithReplace(defaultChartValue?.values, this.userChartValues[key]);
1695
+ },
1696
+
1697
+ initServerAgentArgs() {
1698
+ for (const k in this.serverArgs) {
1699
+ if (this.serverConfig[k] === undefined) {
1700
+ const def = this.serverArgs[k].default;
1701
+
1702
+ this.serverConfig[k] = (def !== undefined ? def : undefined);
1703
+ }
1704
+ }
1705
+
1706
+ for (const k in this.agentArgs) {
1707
+ if (this.agentConfig?.[k] === undefined) {
1708
+ const def = this.agentArgs[k].default;
1709
+
1710
+ this.agentConfig[k] = (def !== undefined ? def : undefined);
1711
+ }
1712
+ }
1713
+
1714
+ if (!this.serverConfig?.profile) {
1715
+ this.serverConfig.profile = null;
1716
+ }
1717
+ },
1718
+
1719
+ chartVersionKey(name) {
1720
+ const addonVersion = this.addonVersions.find((av) => av.name === name);
1721
+
1722
+ return addonVersion ? `${ name }-${ addonVersion.version }` : name;
1723
+ },
1724
+
1725
+ onMembershipUpdate(update) {
1726
+ this['membershipUpdate'] = update;
1727
+ },
1728
+
1729
+ async initRegistry() {
1730
+ // Check for an existing cluster scoped registry
1731
+ const clusterRegistry = this.agentConfig?.['system-default-registry'] || '';
1732
+
1733
+ // Check for the global registry
1734
+ this.systemRegistry = (await this.$store.dispatch('management/find', { type: MANAGEMENT.SETTING, id: SETTING.SYSTEM_DEFAULT_REGISTRY })).value || '';
1735
+
1736
+ // The order of precedence is to use the cluster scoped registry
1737
+ // if it exists, then use the global scoped registry as a fallback
1738
+ if (clusterRegistry) {
1739
+ this.registryHost = clusterRegistry;
1740
+ } else {
1741
+ this.registryHost = this.systemRegistry;
1742
+ }
1743
+
1744
+ let registrySecret = null;
1745
+ let regs = this.rkeConfig.registries;
1746
+
1747
+ if (!regs) {
1748
+ regs = {};
1749
+ this.rkeConfig.registries = regs;
1750
+ }
1751
+
1752
+ if (!regs.configs) {
1753
+ regs.configs = {};
1754
+ }
1755
+
1756
+ if (!regs.mirrors) {
1757
+ regs.mirrors = {};
1758
+ }
1759
+
1760
+ const config = regs.configs[this.registryHost];
1761
+
1762
+ if (config) {
1763
+ registrySecret = config.authConfigSecretName;
1764
+ }
1765
+
1766
+ this.registrySecret = registrySecret;
1767
+
1768
+ const hasMirrorsOrAuthConfig = Object.keys(regs.configs).length > 0 || Object.keys(regs.mirrors).length > 0;
1769
+
1770
+ if (this.registryHost || registrySecret || hasMirrorsOrAuthConfig) {
1771
+ this.showCustomRegistryInput = true;
1772
+
1773
+ if (hasMirrorsOrAuthConfig) {
1774
+ this.showCustomRegistryAdvancedInput = true;
1775
+ }
1776
+ }
1777
+ },
1778
+
1779
+ setRegistryConfig() {
1780
+ const hostname = (this.registryHost || '').trim();
1781
+
1782
+ if (this.systemRegistry) {
1783
+ // Empty string overrides the system default to nothing
1784
+ this.agentConfig['system-default-registry'] = '';
1785
+ } else {
1786
+ // No need to set anything
1787
+ this.agentConfig['system-default-registry'] = undefined;
1788
+ }
1789
+ if (!hostname || hostname === this.systemRegistry) {
1790
+ // Undefined removes the key which uses the global setting without hardcoding it into the config
1791
+ this.agentConfig['system-default-registry'] = undefined;
1792
+ } else {
1793
+ this.agentConfig['system-default-registry'] = hostname;
1794
+ }
1795
+
1796
+ if (hostname && this.registrySecret) {
1797
+ // For a registry with basic auth, but no mirrors,
1798
+ // add a single registry config with the basic auth secret.
1799
+ const basicAuthConfig = {
1800
+ [hostname]: {
1801
+ authConfigSecretName: this.registrySecret,
1802
+ caBundle: null,
1803
+ insecureSkipVerify: false,
1804
+ tlsSecretName: null,
1805
+ }
1806
+ };
1807
+
1808
+ const rkeConfig = this.value.spec.rkeConfig;
1809
+
1810
+ if (!rkeConfig) {
1811
+ this.value.spec.rkeConfig = { registries: { configs: basicAuthConfig } };
1812
+ } else if (rkeConfig.registries.configs && Object.keys(rkeConfig.registries.configs).length > 0) {
1813
+ // If some existing authentication secrets are already configured
1814
+ // for registry mirrors, the basic auth is added to the existing ones.
1815
+ const existingConfigs = rkeConfig.registries.configs;
1816
+
1817
+ this.value.spec.rkeConfig.registries.configs = { ...basicAuthConfig, ...existingConfigs };
1818
+ } else {
1819
+ const existingMirrorAndAuthConfig = this.value.spec.rkeConfig.registries;
1820
+
1821
+ this.value.spec.rkeConfig.registries = {
1822
+ ...existingMirrorAndAuthConfig,
1823
+ configs: basicAuthConfig
1824
+ };
1825
+ }
1826
+ }
1827
+ },
1828
+
1829
+ updateConfigs(configs) {
1830
+ // Update authentication configuration
1831
+ // for each mirror
1832
+ if (!this.value.spec?.rkeConfig) {
1833
+ this.value.spec.rkeConfig = { registries: {} };
1834
+ }
1835
+ this.value.spec.rkeConfig.registries.configs = configs;
1836
+ },
1837
+
1838
+ generateYaml() {
1839
+ const resource = this.value;
1840
+ const inStore = this.$store.getters['currentStore'](resource);
1841
+ const schemas = this.$store.getters[`${ inStore }/all`](SCHEMA);
1842
+ const clonedResource = clone(resource);
1843
+
1844
+ this.applyChartValues(clonedResource.spec.rkeConfig);
1845
+
1846
+ const out = createYaml(schemas, resource.type, clonedResource);
1847
+
1848
+ return out;
1849
+ },
1850
+
1851
+ applyChartValues(rkeConfig) {
1852
+ rkeConfig.chartValues = {};
1853
+ this.addonNames.forEach((name) => {
1854
+ const key = this.chartVersionKey(name);
1855
+ const userValues = this.userChartValues[key];
1856
+
1857
+ if (userValues) {
1858
+ rkeConfig.chartValues[name] = userValues;
1859
+ }
1860
+ });
1861
+ },
1862
+ get,
1863
+
1864
+ setHarvesterDefaultCloudProvider() {
1865
+ if (this.isHarvesterDriver &&
1866
+ this.mode === _CREATE &&
1867
+ this.agentConfig &&
1868
+ !this.agentConfig['cloud-provider-name'] &&
1869
+ !this.isHarvesterExternalCredential &&
1870
+ !this.isHarvesterIncompatible
1871
+ ) {
1872
+ this.agentConfig['cloud-provider-name'] = HARVESTER;
1873
+ } else {
1874
+ this.agentConfig['cloud-provider-name'] = '';
1875
+ }
1876
+ },
1877
+
1878
+ async setHarvesterVersionRange() {
1879
+ const clusterId = this.credential?.decodedData?.clusterId;
1880
+ const clusterType = this.credential?.decodedData?.clusterType;
1881
+
1882
+ if (clusterId && clusterType === 'imported') {
1883
+ const url = `/k8s/clusters/${ clusterId }/v1`;
1884
+ const res = await this.$store.dispatch('cluster/request', { url: `${ url }/${ HCI.SETTING }s` });
1885
+
1886
+ const version = (res?.data || []).find((s) => s.id === 'harvester-csi-ccm-versions');
1887
+
1888
+ if (version) {
1889
+ this.harvesterVersionRange = JSON.parse(version.value || version.default || '{}');
1890
+ } else {
1891
+ this.harvesterVersionRange = {};
1892
+ }
1893
+ }
1894
+ this.setHarvesterDefaultCloudProvider();
1895
+ },
1896
+ toggleCustomRegistry(neu) {
1897
+ this.showCustomRegistryInput = neu;
1898
+ if (this.registryHost) {
1899
+ this.registryHost = null;
1900
+ this.registrySecret = null;
1901
+ } else {
1902
+ this.initRegistry();
1903
+ }
1904
+ },
1905
+
1906
+ /**
1907
+ * Reset PSA on several input changes for given conditions
1908
+ */
1909
+ togglePsaDefault() {
1910
+ // This option is created from the server and is guaranteed to exist #8032
1911
+ const hardcodedTemplate = 'rancher-restricted';
1912
+ const cisValue = this.agentConfig?.profile || this.serverConfig?.profile;
1913
+
1914
+ if (!this.cisOverride) {
1915
+ if (cisValue) {
1916
+ this.value.spec.defaultPodSecurityAdmissionConfigurationTemplateName = hardcodedTemplate;
1917
+ }
1918
+ }
1919
+ },
1920
+
1921
+ handleCisChange() {
1922
+ this.togglePsaDefault();
1923
+ this.updateCisProfile();
1924
+ },
1925
+
1926
+ updateCisProfile() {
1927
+ // If the user selects any Worker CIS Profile,
1928
+ // protect-kernel-defaults should be set to false
1929
+ // in the RKE2 worker/agent config.
1930
+ const selectedCisProfile = this.agentConfig?.profile;
1931
+
1932
+ if (selectedCisProfile) {
1933
+ this.agentConfig['protect-kernel-defaults'] = true;
1934
+ } else {
1935
+ this.agentConfig['protect-kernel-defaults'] = false;
1936
+ }
1937
+ },
1938
+ updateAdditionalManifest(neu) {
1939
+ this.value.spec.rkeConfig.additionalManifest = neu;
1940
+ },
1941
+
1942
+ /**
1943
+ * Handle k8s changes side effects, like PSA resets
1944
+ */
1945
+ handleKubernetesChange(value, old) {
1946
+ if (value) {
1947
+ this.togglePsaDefault();
1948
+
1949
+ // If Harvester driver, reset cloud provider if not compatible
1950
+ if (this.isHarvesterDriver && this.mode === _CREATE && this.isHarvesterIncompatible) {
1951
+ this.setHarvesterDefaultCloudProvider();
1952
+ }
1953
+ }
1954
+ },
1955
+
1956
+ handleShowDeprecatedPatchVersionsChanged(value) {
1957
+ this.showDeprecatedPatchVersions = value;
1958
+ },
1959
+ /**
1960
+ * Track Machine Pool validation status
1961
+ */
1962
+ machinePoolValidationChanged(id, value) {
1963
+ if (value === undefined) {
1964
+ delete this.machinePoolValidation[id];
1965
+ } else {
1966
+ this.machinePoolValidation[id] = value;
1967
+ }
1968
+ },
1969
+ handleEnabledSystemServicesChanged(val) {
1970
+ this.serverConfig.disable = val;
1971
+ },
1972
+
1973
+ handleCiliumValuesChanged(neu) {
1974
+ if (neu === undefined) {
1975
+ return;
1976
+ }
1977
+
1978
+ const name = this.chartVersionKey('rke2-cilium');
1979
+
1980
+ this.userChartValues = {
1981
+ ...this.userChartValues,
1982
+ [name]: { ...neu }
1983
+ };
1984
+ },
1985
+
1986
+ handleCisChanged() {
1987
+ this.handleCisChange();
1988
+ },
1989
+
1990
+ handlePsaDefaultChanged() {
1991
+ this.cisOverride = !this.cisOverride;
1992
+ this.togglePsaDefault();
1993
+ },
1994
+
1995
+ handleMachinePoolError(error) {
1996
+ this.machinePoolErrors = merge(this.machinePoolErrors, error);
1997
+
1998
+ const errors = Object.entries(this.machinePoolErrors)
1999
+ .map((x) => {
2000
+ if (!x[1].length) {
2001
+ return;
2002
+ }
2003
+
2004
+ const formattedFields = (() => {
2005
+ switch (x[1].length) {
2006
+ case 1:
2007
+ return x[1][0];
2008
+ case 2:
2009
+ return `${ x[1][0] } and ${ x[1][1] }`;
2010
+ default: {
2011
+ const [head, ...rest] = x[1];
2012
+
2013
+ return `${ rest.join(', ') }, and ${ head }`;
2014
+ }
2015
+ }
2016
+ })();
2017
+
2018
+ return this.t('cluster.banner.machinePoolError', {
2019
+ count: x[1].length, pool_name: x[0], fields: formattedFields
2020
+ }, true);
2021
+ })
2022
+ .filter((x) => x);
2023
+
2024
+ if (!errors) {
2025
+ return;
2026
+ }
2027
+
2028
+ this.errors = errors;
2029
+ },
2030
+ handleS3BackupChanged(neu) {
2031
+ this.s3Backup = neu;
2032
+ if (neu) {
2033
+ // We need to make sure that s3 doesn't already have an existing value otherwise when editing a cluster with s3 defined this will clear s3.
2034
+ if (isEmpty(this.rkeConfig.etcd?.s3)) {
2035
+ this.rkeConfig.etcd.s3 = {};
2036
+ }
2037
+ } else {
2038
+ this.rkeConfig.etcd.s3 = null;
2039
+ }
2040
+ },
2041
+ handleConfigEtcdExposeMetricsChanged(neu) {
2042
+ this.serverConfig['etcd-expose-metrics'] = neu;
2043
+ },
2044
+ handleRegistryHostChanged(neu) {
2045
+ this.registryHost = neu;
2046
+ },
2047
+ handleRegistrySecretChanged(neu) {
2048
+ this.registrySecret = neu;
2049
+ },
2050
+ validateClusterName() {
2051
+ if (!this.value.metadata.name && this.agentConfig?.['cloud-provider-name'] === HARVESTER) {
2052
+ this.errors.push(this.t('validation.required', { key: this.t('cluster.name.label') }, true));
2053
+ }
2054
+ },
2055
+ async validateMachinePool() {
2056
+ if (this.errors) {
2057
+ clear(this.errors);
2058
+ }
2059
+ if (this.value.cloudProvider === 'aws') {
2060
+ const missingProfileName = this.machinePools.some((mp) => !mp.config.iamInstanceProfile);
2061
+
2062
+ if (missingProfileName) {
2063
+ this.errors.push(this.t('cluster.validation.iamInstanceProfileName', {}, true));
2064
+ }
2065
+ }
2066
+
2067
+ for (const [index] of this.machinePools.entries()) { // validator machine config
2068
+ if (typeof this.$refs.pool[index]?.test === 'function') {
2069
+ try {
2070
+ const res = await this.$refs.pool[index].test();
2071
+
2072
+ if (Array.isArray(res) && res.length > 0) {
2073
+ this.errors.push(...res);
2074
+ }
2075
+ } catch (e) {
2076
+ this.errors.push(e);
2077
+ }
2078
+ }
2079
+ }
2080
+ },
2081
+
2082
+ addonConfigValidationChanged(configName, isValid) {
2083
+ this.addonConfigValidation[configName] = isValid;
2084
+ },
2085
+
2086
+ handleTabChange(data) {
2087
+ this.activeTab = data;
2088
+ }
2089
+ }
2090
+ };
2091
+ </script>
2092
+
2093
+ <template>
2094
+ <Loading v-if="$fetchState.pending && !loadedOnce" />
2095
+ <Banner
2096
+ v-else-if="$fetchState.error"
2097
+ color="error"
2098
+ :label="$fetchState.error"
2099
+ />
2100
+ <CruResource
2101
+ v-else
2102
+ ref="cruresource"
2103
+ :mode="mode"
2104
+ :validation-passed="validationPassed && fvFormIsValid"
2105
+ :resource="value"
2106
+ :errors="errors"
2107
+ :cancel-event="true"
2108
+ :done-route="doneRoute"
2109
+ :apply-hooks="applyHooks"
2110
+ :generate-yaml="generateYaml"
2111
+ class="rke2"
2112
+ component-testid="rke2-custom-create"
2113
+ @done="done"
2114
+ @finish="saveOverride"
2115
+ @cancel="cancel"
2116
+ @error="e => errors = e"
2117
+ >
2118
+ <div class="header-warnings">
2119
+ <Banner
2120
+ v-if="isEdit"
2121
+ color="warning"
2122
+ data-testid="edit-cluster-reprovisioning-documentation"
2123
+ >
2124
+ <span v-clean-html="t('cluster.banner.rke2-k3-reprovisioning', {}, true)" />
2125
+ </Banner>
2126
+ </div>
2127
+ <SelectCredential
2128
+ v-if="needCredential"
2129
+ v-model:value="credentialId"
2130
+ :mode="mode"
2131
+ :provider="provider"
2132
+ :cancel="cancelCredential"
2133
+ :showing-form="showForm"
2134
+ :default-on-cancel="true"
2135
+ data-testid="select-credential"
2136
+ class="mt-20"
2137
+ />
2138
+
2139
+ <div
2140
+ v-if="showForm"
2141
+ data-testid="form"
2142
+ class="mt-20"
2143
+ >
2144
+ <NameNsDescription
2145
+ v-if="!isView"
2146
+ v-model:value="localValue"
2147
+ :mode="mode"
2148
+ :namespaced="needsNamespace"
2149
+ :namespace-options="allNamespaces"
2150
+ name-label="cluster.name.label"
2151
+ name-placeholder="cluster.name.placeholder"
2152
+ description-label="cluster.description.label"
2153
+ description-placeholder="cluster.description.placeholder"
2154
+ :rules="{ name: fvGetAndReportPathRules('metadata.name') }"
2155
+ @update:value="$emit('input', $event)"
2156
+ >
2157
+ <template #customize>
2158
+ <ClusterAppearance
2159
+ :name="clusterName"
2160
+ :currentCluster="currentCluster"
2161
+ :mode="mode"
2162
+ />
2163
+ </template>
2164
+ </NameNsDescription>
2165
+
2166
+ <Banner
2167
+ v-if="appsOSWarning"
2168
+ color="error"
2169
+ >
2170
+ {{ appsOSWarning }}
2171
+ </Banner>
2172
+
2173
+ <!-- Pools Extras -->
2174
+ <template v-if="hasMachinePools">
2175
+ <div class="clearfix">
2176
+ <h2
2177
+ v-t="'cluster.tabs.machinePools'"
2178
+ class="pull-left"
2179
+ />
2180
+ <div
2181
+ v-if="!isView"
2182
+ class="pull-right"
2183
+ >
2184
+ <BadgeState
2185
+ v-clean-tooltip="nodeTotals.tooltip.etcd"
2186
+ :color="nodeTotals.color.etcd"
2187
+ :icon="nodeTotals.icon.etcd"
2188
+ :label="nodeTotals.label.etcd"
2189
+ class="mr-10"
2190
+ />
2191
+ <BadgeState
2192
+ v-clean-tooltip="nodeTotals.tooltip.controlPlane"
2193
+ :color="nodeTotals.color.controlPlane"
2194
+ :icon="nodeTotals.icon.controlPlane"
2195
+ :label="nodeTotals.label.controlPlane"
2196
+ class="mr-10"
2197
+ />
2198
+ <BadgeState
2199
+ v-clean-tooltip="nodeTotals.tooltip.worker"
2200
+ :color="nodeTotals.color.worker"
2201
+ :icon="nodeTotals.icon.worker"
2202
+ :label="nodeTotals.label.worker"
2203
+ />
2204
+ </div>
2205
+ </div>
2206
+
2207
+ <!-- Extra Tabs for Machine Pool -->
2208
+ <Tabbed
2209
+ ref="pools"
2210
+ :side-tabs="true"
2211
+ :show-tabs-add-remove="!isView"
2212
+ @addTab="addMachinePool($event)"
2213
+ @removeTab="removeMachinePool($event)"
2214
+ >
2215
+ <template
2216
+ v-for="(obj, idx) in machinePools"
2217
+ :key="idx"
2218
+ >
2219
+ <Tab
2220
+ v-if="!obj.remove"
2221
+ :key="obj.id"
2222
+ :name="obj.id"
2223
+ :label="obj.pool.name || '(Not Named)'"
2224
+ :show-header="false"
2225
+ :error="!machinePoolValidation[obj.id]"
2226
+ >
2227
+ <MachinePool
2228
+ ref="pool"
2229
+ :value="obj"
2230
+ :cluster="value"
2231
+ :mode="mode"
2232
+ :provider="provider"
2233
+ :credential-id="credentialId"
2234
+ :idx="idx"
2235
+ :machine-pools="machinePools"
2236
+ :busy="busy"
2237
+ :pool-id="obj.id"
2238
+ :pool-create-mode="obj.create"
2239
+ @error="handleMachinePoolError"
2240
+ @validationChanged="v => machinePoolValidationChanged(obj.id, v)"
2241
+ />
2242
+ </Tab>
2243
+ </template>
2244
+ <div v-if="!unremovedMachinePools.length">
2245
+ {{ t('cluster.machinePool.noPoolsDisclaimer') }}
2246
+ </div>
2247
+ </Tabbed>
2248
+ <div class="spacer" />
2249
+ </template>
2250
+
2251
+ <!-- Cluster Tabs -->
2252
+ <h2 v-t="'cluster.tabs.cluster'" />
2253
+ <Tabbed
2254
+ :side-tabs="true"
2255
+ class="min-height"
2256
+ @changed="handleTabChange"
2257
+ >
2258
+ <Tab
2259
+ name="basic"
2260
+ label-key="cluster.tabs.basic"
2261
+ :weight="11"
2262
+ @active="refreshComponentWithYamls('tab-Basics')"
2263
+ >
2264
+ <!-- Basic -->
2265
+ <Basics
2266
+ ref="tab-Basics"
2267
+ v-model:value="localValue"
2268
+ :live-value="liveValue"
2269
+ :mode="mode"
2270
+ :provider="provider"
2271
+ :user-chart-values="userChartValues"
2272
+ :credential="credential"
2273
+ :cis-override="cisOverride"
2274
+ :all-psas="allPSAs"
2275
+ :addon-versions="addonVersions"
2276
+ :show-deprecated-patch-versions="showDeprecatedPatchVersions"
2277
+ :selected-version="selectedVersion"
2278
+ :is-harvester-driver="isHarvesterDriver"
2279
+ :is-harvester-incompatible="isHarvesterIncompatible"
2280
+ :version-options="versionOptions"
2281
+ :is-elemental-cluster="isElementalCluster"
2282
+ :have-arg-info="haveArgInfo"
2283
+ :show-cni="showCni"
2284
+ :show-cloud-provider="showCloudProvider"
2285
+ :cloud-provider-options="cloudProviderOptions"
2286
+ :is-azure-provider-unsupported="isAzureProviderUnsupported"
2287
+ :can-azure-migrate-on-edit="canAzureMigrateOnEdit"
2288
+ @update:value="$emit('input', $event)"
2289
+ @cilium-values-changed="handleCiliumValuesChanged"
2290
+ @enabled-system-services-changed="handleEnabledSystemServicesChanged"
2291
+ @kubernetes-changed="handleKubernetesChange"
2292
+ @cis-changed="handleCisChanged"
2293
+ @psa-default-changed="handlePsaDefaultChanged"
2294
+ @show-deprecated-patch-versions-changed="handleShowDeprecatedPatchVersionsChanged"
2295
+ />
2296
+ </Tab>
2297
+
2298
+ <!-- Member Roles -->
2299
+ <Tab
2300
+ v-if="canManageMembers"
2301
+ name="memberRoles"
2302
+ label-key="cluster.tabs.memberRoles"
2303
+ :weight="10"
2304
+ >
2305
+ <MemberRoles
2306
+ v-model:value="localValue"
2307
+ :mode="mode"
2308
+ :on-membership-update="onMembershipUpdate"
2309
+ @update:value="$emit('input', $event)"
2310
+ />
2311
+ </Tab>
2312
+ <!-- etcd -->
2313
+ <Tab
2314
+ name="etcd"
2315
+ label-key="cluster.tabs.etcd"
2316
+ >
2317
+ <Etcd
2318
+ v-model:value="localValue"
2319
+ :mode="mode"
2320
+ :s3-backup="s3Backup"
2321
+ :register-before-hook="registerBeforeHook"
2322
+ :selected-version="selectedVersion"
2323
+ @update:value="$emit('input', $event)"
2324
+ @s3-backup-changed="handleS3BackupChanged"
2325
+ @config-etcd-expose-metrics-changed="handleConfigEtcdExposeMetricsChanged"
2326
+ />
2327
+ </Tab>
2328
+
2329
+ <!-- Networking -->
2330
+ <Tab
2331
+ v-if="haveArgInfo"
2332
+ name="networking"
2333
+ label-key="cluster.tabs.networking"
2334
+ >
2335
+ <Networking
2336
+ v-model:value="localValue"
2337
+ :mode="mode"
2338
+ :selected-version="selectedVersion"
2339
+ :truncate-limit="truncateLimit"
2340
+ @truncate-hostname-changed="truncateHostname"
2341
+ @cluster-cidr-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['cluster-cidr'] = val"
2342
+ @service-cidr-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['service-cidr'] = val"
2343
+ @cluster-domain-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['cluster-domain'] = val"
2344
+ @cluster-dns-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['cluster-dns'] = val"
2345
+ @service-node-port-range-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['service-node-port-range'] = val"
2346
+ @tls-san-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['tls-san'] = val"
2347
+ @local-cluster-auth-endpoint-changed="enableLocalClusterAuthEndpoint"
2348
+ @ca-certs-changed="(val)=>localValue.spec.localClusterAuthEndpoint.caCerts = val"
2349
+ @fqdn-changed="(val)=>localValue.spec.localClusterAuthEndpoint.fqdn = val"
2350
+ />
2351
+ </Tab>
2352
+
2353
+ <!-- Upgrade -->
2354
+ <Tab
2355
+ name="upgrade"
2356
+ label-key="cluster.tabs.upgrade"
2357
+ >
2358
+ <Upgrade
2359
+ v-model:value="localValue"
2360
+ :mode="mode"
2361
+ @update:value="$emit('input', $event)"
2362
+ />
2363
+ </Tab>
2364
+
2365
+ <!-- Registries -->
2366
+ <Tab
2367
+ :name="REGISTRIES_TAB_NAME"
2368
+ label-key="cluster.tabs.registry"
2369
+ >
2370
+ <Registries
2371
+ v-if="isActiveTabRegistries"
2372
+ v-model:value="localValue"
2373
+ :mode="mode"
2374
+ :register-before-hook="registerBeforeHook"
2375
+ :show-custom-registry-input="showCustomRegistryInput"
2376
+ :registry-host="registryHost"
2377
+ :registry-secret="registrySecret"
2378
+ :show-custom-registry-advanced-input="showCustomRegistryAdvancedInput"
2379
+ @update:value="$emit('input', $event)"
2380
+ @update-configs-changed="updateConfigs"
2381
+ @custom-registry-changed="toggleCustomRegistry"
2382
+ @registry-host-changed="handleRegistryHostChanged"
2383
+ @registry-secret-changed="handleRegistrySecretChanged"
2384
+ />
2385
+ </Tab>
2386
+
2387
+ <!-- Add-on Configs -->
2388
+ <Tab
2389
+ v-for="v in addonVersions"
2390
+ :key="v.name"
2391
+ :name="v.name"
2392
+ :label="labelForAddon($store, v.name, false)"
2393
+ :weight="9"
2394
+ :showHeader="false"
2395
+ :error="addonConfigValidation[v.name]===false"
2396
+ @active="showAddons(v.name)"
2397
+ >
2398
+ <AddOnConfig
2399
+ :ref="v.name"
2400
+ v-model:value="localValue"
2401
+ :mode="mode"
2402
+ :version-info="versionInfo"
2403
+ :addon-version="v"
2404
+ :addons-rev="addonsRev"
2405
+ :user-chart-values-temp="userChartValuesTemp"
2406
+ :init-yaml-editor="initYamlEditor"
2407
+ @update:value="$emit('input', $event)"
2408
+ @update-questions="syncChartValues"
2409
+ @update-values="updateValues"
2410
+ @validationChanged="e => addonConfigValidationChanged(v.name, e)"
2411
+ />
2412
+ </Tab>
2413
+
2414
+ <!-- Add-on Additional Manifest -->
2415
+ <Tab
2416
+ name="additionalmanifest"
2417
+ label-key="cluster.tabs.addOnAdditionalManifest"
2418
+ :showHeader="false"
2419
+ @active="refreshComponentWithYamls('additionalmanifest')"
2420
+ >
2421
+ <AddOnAdditionalManifest
2422
+ ref="additionalmanifest"
2423
+ :value="value"
2424
+ :mode="mode"
2425
+ @additional-manifest-changed="updateAdditionalManifest"
2426
+ />
2427
+ </Tab>
2428
+
2429
+ <!-- Cluster Agent Configuration -->
2430
+ <Tab
2431
+ v-if="value.spec.clusterAgentDeploymentCustomization"
2432
+ name="clusteragentconfig"
2433
+ label-key="cluster.agentConfig.tabs.cluster"
2434
+ >
2435
+ <AgentConfiguration
2436
+ v-model:value="value.spec.clusterAgentDeploymentCustomization"
2437
+ data-testid="rke2-cluster-agent-config"
2438
+ type="cluster"
2439
+ :mode="mode"
2440
+ :scheduling-customization-feature-enabled="schedulingCustomizationFeatureEnabled"
2441
+ :default-p-c="clusterAgentDefaultPC"
2442
+ :default-p-d-b="clusterAgentDefaultPDB"
2443
+ :scheduling-customization-originally-enabled="schedulingCustomizationOriginallyEnabled"
2444
+ @scheduling-customization-changed="setSchedulingCustomization"
2445
+ />
2446
+ </Tab>
2447
+
2448
+ <!-- Fleet Agent Configuration -->
2449
+ <Tab
2450
+ name="fleetagentconfig"
2451
+ label-key="cluster.agentConfig.tabs.fleet"
2452
+ >
2453
+ <AgentConfiguration
2454
+ v-if="value.spec.fleetAgentDeploymentCustomization"
2455
+ v-model:value="value.spec.fleetAgentDeploymentCustomization"
2456
+ data-testid="rke2-fleet-agent-config"
2457
+ type="fleet"
2458
+ :mode="mode"
2459
+ />
2460
+ </Tab>
2461
+
2462
+ <!-- Advanced -->
2463
+ <Tab
2464
+ v-if="haveArgInfo || agentArgs['protect-kernel-defaults']"
2465
+ name="advanced"
2466
+ label-key="cluster.tabs.advanced"
2467
+ :weight="-1"
2468
+ >
2469
+ <Advanced
2470
+ v-model:value="localValue"
2471
+ :mode="mode"
2472
+ :have-arg-info="haveArgInfo"
2473
+ :selected-version="selectedVersion"
2474
+ @update:value="$emit('input', $event)"
2475
+ />
2476
+ </Tab>
2477
+
2478
+ <AgentEnv
2479
+ v-model:value="localValue"
2480
+ :mode="mode"
2481
+ @update:value="$emit('input', $event)"
2482
+ />
2483
+ <Labels
2484
+ v-model:value="localValue"
2485
+ :mode="mode"
2486
+ @update:value="$emit('input', $event)"
2487
+ />
2488
+
2489
+ <!-- Extension tabs -->
2490
+ <Tab
2491
+ v-for="tab, i in extensionTabs"
2492
+ :key="`${tab.name}${i}`"
2493
+ :name="tab.name"
2494
+ :label="tab.label"
2495
+ :label-key="tab.labelKey"
2496
+ :weight="tab.weight"
2497
+ :tooltip="tab.tooltip"
2498
+ :show-header="tab.showHeader"
2499
+ :display-alert-icon="tab.displayAlertIcon"
2500
+ :error="tab.error"
2501
+ :badge="tab.badge"
2502
+ >
2503
+ <component
2504
+ :is="tab.component"
2505
+ :resource="value"
2506
+ />
2507
+ </Tab>
2508
+ </Tabbed>
2509
+ </div>
2510
+
2511
+ <Banner
2512
+ v-if="unsupportedSelectorConfig"
2513
+ color="warning"
2514
+ :label="t('cluster.banner.warning')"
2515
+ />
2516
+
2517
+ <template
2518
+ v-if="needCredential && !credentialId"
2519
+ #form-footer
2520
+ >
2521
+ <div><!-- Hide the outer footer --></div>
2522
+ </template>
2523
+ </CruResource>
2524
+ </template>
2525
+
2526
+ <style lang="scss" scoped>
2527
+ .min-height {
2528
+ min-height: 40em;
2529
+ }
2530
+
2531
+ .patch-version {
2532
+ margin-top: 5px;
2533
+ }
2534
+
2535
+ .header-warnings .banner {
2536
+ margin-bottom: 0;
2537
+ }
2538
+ </style>