@rancher/shell 2.0.0 → 3.0.0-rc.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 (816) hide show
  1. package/assets/styles/global/_labeled-input.scss +22 -11
  2. package/assets/styles/global/_layout.scss +4 -4
  3. package/assets/styles/global/_tooltip.scss +4 -3
  4. package/assets/translations/en-us.yaml +44 -8
  5. package/chart/__tests__/S3.test.ts +21 -14
  6. package/chart/example.vue +1 -1
  7. package/chart/gatekeeper.vue +4 -4
  8. package/chart/istio.vue +11 -11
  9. package/chart/logging/index.vue +8 -8
  10. package/chart/monitoring/ClusterSelector.vue +13 -13
  11. package/chart/monitoring/alerting/index.vue +6 -6
  12. package/chart/monitoring/grafana/index.vue +14 -14
  13. package/chart/monitoring/index.vue +122 -108
  14. package/chart/monitoring/prometheus/index.vue +18 -18
  15. package/chart/rancher-backup/S3.vue +11 -11
  16. package/chart/rancher-backup/index.vue +68 -60
  17. package/cloud-credential/__tests__/azure.test.ts +7 -17
  18. package/cloud-credential/__tests__/harvester.test.ts +2 -2
  19. package/cloud-credential/aws.vue +3 -3
  20. package/cloud-credential/azure.vue +4 -4
  21. package/cloud-credential/digitalocean.vue +1 -1
  22. package/cloud-credential/gcp.vue +1 -1
  23. package/cloud-credential/generic.vue +1 -1
  24. package/cloud-credential/harvester.vue +1 -1
  25. package/cloud-credential/linode.vue +1 -1
  26. package/cloud-credential/pnap.vue +2 -2
  27. package/cloud-credential/s3.vue +8 -8
  28. package/cloud-credential/vmwarevsphere.vue +4 -4
  29. package/components/ActionDropdown.vue +3 -3
  30. package/components/ActionMenu.vue +1 -1
  31. package/components/AlertTable.vue +18 -8
  32. package/components/AppModal.vue +20 -9
  33. package/components/AssignTo.vue +38 -37
  34. package/components/AsyncButton.vue +4 -7
  35. package/components/ButtonDropdown.vue +14 -13
  36. package/components/ButtonGroup.vue +1 -1
  37. package/components/Carousel.vue +1 -1
  38. package/components/Certificates.vue +1 -1
  39. package/components/ChartReadme.vue +7 -7
  40. package/components/CodeMirror.vue +2 -2
  41. package/components/CommunityLinks.vue +2 -2
  42. package/components/ConsumptionGauge.vue +1 -1
  43. package/components/ContainerResourceLimit.vue +11 -11
  44. package/components/CountGauge.vue +1 -1
  45. package/components/CreateDriver.vue +4 -4
  46. package/components/CruResource.vue +34 -20
  47. package/components/DashboardMetrics.vue +3 -3
  48. package/components/DashboardOptions.vue +3 -3
  49. package/components/DetailTop.vue +3 -3
  50. package/components/DisableAuthProviderModal.vue +7 -8
  51. package/components/EmberPage.vue +1 -1
  52. package/components/EtcdInfoBanner.vue +1 -1
  53. package/components/ExplorerMembers.vue +8 -9
  54. package/components/ExplorerProjectsNamespaces.vue +6 -7
  55. package/components/FileDiff.vue +1 -1
  56. package/components/FixedBanner.vue +1 -0
  57. package/components/GlobalRoleBindings.vue +5 -6
  58. package/components/GradientBox.vue +1 -2
  59. package/components/GrafanaDashboard.vue +13 -11
  60. package/components/GrowlManager.vue +1 -1
  61. package/components/HarvesterServiceAddOnConfig.vue +2 -2
  62. package/components/IconOrSvg.vue +1 -2
  63. package/components/Import.vue +4 -3
  64. package/components/Inactivity.vue +2 -2
  65. package/components/IndentedPanel.vue +0 -1
  66. package/components/InputOrDisplay.vue +3 -2
  67. package/components/KeyValueView.vue +4 -3
  68. package/components/LandingPagePreference.vue +3 -2
  69. package/components/LazyImage.vue +1 -1
  70. package/components/Loading.vue +1 -1
  71. package/components/LocaleSelector.vue +4 -4
  72. package/components/Markdown.vue +1 -1
  73. package/components/ModalWithCard.vue +1 -4
  74. package/components/MoveModal.vue +10 -11
  75. package/components/PercentageBar.vue +7 -7
  76. package/components/PodSecurityAdmission.vue +13 -13
  77. package/components/PromptChangePassword.vue +9 -9
  78. package/components/PromptModal.vue +1 -1
  79. package/components/PromptRemove.vue +35 -37
  80. package/components/PromptRestore.vue +68 -69
  81. package/components/Questions/Array.vue +3 -4
  82. package/components/Questions/Boolean.vue +1 -1
  83. package/components/Questions/CloudCredential.vue +1 -1
  84. package/components/Questions/Enum.vue +1 -1
  85. package/components/Questions/Float.vue +1 -1
  86. package/components/Questions/Int.vue +1 -1
  87. package/components/Questions/Question.js +1 -1
  88. package/components/Questions/QuestionMap.vue +3 -4
  89. package/components/Questions/Radio.vue +1 -1
  90. package/components/Questions/Reference.vue +2 -2
  91. package/components/Questions/String.vue +1 -1
  92. package/components/Questions/Yaml.vue +1 -1
  93. package/components/Questions/__tests__/Boolean.test.ts +26 -13
  94. package/components/Questions/__tests__/Float.test.ts +26 -13
  95. package/components/Questions/__tests__/Int.test.ts +26 -13
  96. package/components/Questions/__tests__/String.test.ts +26 -13
  97. package/components/Questions/__tests__/Yaml.test.ts +26 -14
  98. package/components/Questions/index.vue +10 -10
  99. package/components/Random.vue +1 -1
  100. package/components/ResourceDetail/Masthead.vue +7 -2
  101. package/components/ResourceDetail/index.vue +6 -3
  102. package/components/ResourceList/Masthead.vue +4 -0
  103. package/components/ResourceList/index.vue +10 -4
  104. package/components/ResourceSummary.vue +1 -1
  105. package/components/ResourceTable.vue +4 -5
  106. package/components/ResourceYaml.vue +1 -2
  107. package/components/RoleBindings.vue +3 -3
  108. package/components/SideNav.vue +8 -6
  109. package/components/SimpleBox.vue +0 -1
  110. package/components/SortableTable/THead.vue +5 -5
  111. package/components/SortableTable/index.vue +21 -20
  112. package/components/SortableTable/sortable-config.ts +4 -0
  113. package/components/StatusTable.vue +1 -1
  114. package/components/TabTitle.vue +3 -9
  115. package/components/Tabbed/Tab.vue +1 -1
  116. package/components/Tabbed/index.vue +2 -4
  117. package/components/Wizard.vue +8 -3
  118. package/components/YamlEditor.vue +4 -4
  119. package/components/__tests__/AppModal.test.ts +33 -25
  120. package/components/__tests__/ApplicationCard.test.ts +1 -1
  121. package/components/__tests__/AsyncButton.test.ts +42 -34
  122. package/components/__tests__/BackLink.test.ts +3 -3
  123. package/components/__tests__/ButtonGroup.test.ts +5 -5
  124. package/components/__tests__/Carousel.test.ts +2 -2
  125. package/components/__tests__/Certificates.test.ts +10 -8
  126. package/components/__tests__/ClusterBadge.test.ts +2 -2
  127. package/components/__tests__/CodeMirror.test.ts +94 -85
  128. package/components/__tests__/Collapse.test.ts +3 -3
  129. package/components/__tests__/CollapsibleCard.test.ts +6 -6
  130. package/components/__tests__/ConsumptionGauge.test.ts +6 -6
  131. package/components/__tests__/CruResource.test.ts +67 -56
  132. package/components/__tests__/EtcdInfoBanner.test.ts +11 -9
  133. package/components/__tests__/FixedBanner.test.ts +8 -8
  134. package/components/__tests__/GrowlManager.test.ts +24 -25
  135. package/components/__tests__/NamespaceFilter.test.ts +48 -34
  136. package/components/__tests__/PercentageBar.test.ts +10 -10
  137. package/components/__tests__/PodSecurityAdmission.test.ts +80 -38
  138. package/components/__tests__/ProjectRow.test.ts +1 -5
  139. package/components/__tests__/PromptRestore.test.ts +15 -18
  140. package/components/__tests__/TabTitle.test.ts +21 -14
  141. package/components/auth/AllowedPrincipals.vue +4 -5
  142. package/components/auth/RoleDetailEdit.vue +31 -29
  143. package/components/auth/SelectPrincipal.vue +2 -4
  144. package/components/auth/__tests__/RoleDetailEdit.test.ts +18 -14
  145. package/components/auth/login/ldap.vue +2 -2
  146. package/components/fleet/FleetClusters.vue +0 -1
  147. package/components/fleet/FleetRepos.vue +0 -1
  148. package/components/fleet/FleetStatus.vue +3 -3
  149. package/components/fleet/__tests__/FleetSummary.test.ts +8 -2
  150. package/components/form/ArrayList.vue +5 -6
  151. package/components/form/ArrayListGrouped.vue +2 -2
  152. package/components/form/ArrayListSelect.vue +4 -4
  153. package/components/form/BannerSettings.vue +10 -10
  154. package/components/form/ChangePassword.vue +9 -9
  155. package/components/form/ColorInput.vue +2 -2
  156. package/components/form/Command.vue +13 -15
  157. package/components/form/EnvVars.vue +7 -7
  158. package/components/form/FileImageSelector.vue +1 -1
  159. package/components/form/GitPicker.vue +7 -7
  160. package/components/form/HealthCheck.vue +4 -4
  161. package/components/form/HookOption.vue +13 -13
  162. package/components/form/InputWithSelect.vue +19 -13
  163. package/components/form/KeyValue.vue +14 -14
  164. package/components/form/LabeledSelect.vue +45 -35
  165. package/components/form/Labels.vue +3 -3
  166. package/components/form/LifecycleHooks.vue +5 -7
  167. package/components/form/MatchExpressions.vue +7 -7
  168. package/components/form/Members/ClusterMembershipEditor.vue +1 -2
  169. package/components/form/Members/ClusterPermissionsEditor.vue +9 -9
  170. package/components/form/Members/MembershipEditor.vue +4 -5
  171. package/components/form/Members/ProjectMembershipEditor.vue +1 -2
  172. package/components/form/NameNsDescription.vue +12 -13
  173. package/components/form/Networking.vue +17 -17
  174. package/components/form/NodeAffinity.vue +9 -10
  175. package/components/form/NodeScheduling.vue +7 -7
  176. package/components/form/NotificationSettings.vue +2 -2
  177. package/components/form/Password.vue +2 -2
  178. package/components/form/PodAffinity.vue +21 -23
  179. package/components/form/PodSecurity.vue +6 -6
  180. package/components/form/Ports.vue +5 -5
  181. package/components/form/Probe.vue +20 -20
  182. package/components/form/ProjectMemberEditor.vue +9 -9
  183. package/components/form/ResourceLabeledSelect.vue +11 -4
  184. package/components/form/ResourceQuota/Namespace.vue +3 -3
  185. package/components/form/ResourceQuota/NamespaceRow.vue +3 -3
  186. package/components/form/ResourceQuota/Project.vue +7 -6
  187. package/components/form/ResourceQuota/ProjectRow.vue +113 -114
  188. package/components/form/ResourceSelector.vue +3 -3
  189. package/components/form/ResourceTabs/index.vue +1 -1
  190. package/components/form/RuleSelector.vue +7 -6
  191. package/components/form/SecretSelector.vue +5 -6
  192. package/components/form/Security.vue +14 -14
  193. package/components/form/Select.vue +21 -11
  194. package/components/form/SelectOrCreateAuthSecret.vue +30 -27
  195. package/components/form/ServiceNameSelect.vue +8 -5
  196. package/components/form/ServicePorts.vue +4 -4
  197. package/components/form/ShellInput.vue +3 -3
  198. package/components/form/SimpleSecretSelector.vue +2 -2
  199. package/components/form/Taints.vue +18 -11
  200. package/components/form/Tolerations.vue +12 -12
  201. package/components/form/UnitInput.vue +1 -1
  202. package/components/form/ValueFromResource.vue +17 -17
  203. package/components/form/WorkloadPorts.vue +21 -21
  204. package/components/form/__tests__/ArrayList.test.ts +14 -11
  205. package/components/form/__tests__/ArrayListGrouped.test.ts +4 -4
  206. package/components/form/__tests__/BannerSettings.test.ts +6 -5
  207. package/components/form/__tests__/Command.test.ts +12 -12
  208. package/components/form/__tests__/Error.test.ts +5 -5
  209. package/components/form/__tests__/FileImageSelector.test.ts +5 -5
  210. package/components/form/__tests__/FileSelector.test.ts +9 -9
  211. package/components/form/__tests__/InputWithSelect.test.ts +42 -0
  212. package/components/form/__tests__/KeyValue.test.ts +28 -18
  213. package/components/form/__tests__/LabeledSelect.test.ts +9 -9
  214. package/components/form/__tests__/MatchExpressions.test.ts +10 -10
  215. package/components/form/__tests__/NameNsDescription.test.ts +28 -25
  216. package/components/form/__tests__/NodeAffinity.test.ts +4 -3
  217. package/components/form/__tests__/PodAffinity.test.ts +4 -3
  218. package/components/form/__tests__/Probe.test.ts +6 -6
  219. package/components/form/__tests__/Security.test.ts +6 -6
  220. package/components/form/__tests__/Select.test.ts +30 -0
  221. package/components/form/__tests__/ServiceNameSelect.test.ts +42 -0
  222. package/components/form/__tests__/Taints.test.ts +71 -0
  223. package/components/form/__tests__/UnitInput.test.ts +20 -24
  224. package/components/form/labeled-select-utils/labeled-select.utils.ts +1 -1
  225. package/components/formatter/AppSummaryGraph.vue +4 -4
  226. package/components/formatter/ClusterLink.vue +1 -1
  227. package/components/formatter/Endpoints.vue +4 -1
  228. package/components/formatter/FleetSummaryGraph.vue +4 -4
  229. package/components/formatter/ListLink.vue +1 -1
  230. package/components/formatter/ListLinkDetail.vue +2 -2
  231. package/components/formatter/LiveExpiryBadgeState.vue +18 -5
  232. package/components/formatter/LiveExpiryDate.vue +1 -1
  233. package/components/formatter/MachineSummaryGraph.vue +4 -4
  234. package/components/formatter/PercentageBar.vue +1 -1
  235. package/components/formatter/Principal.vue +0 -1
  236. package/components/formatter/PrincipalGroupBindings.vue +5 -5
  237. package/components/formatter/ReceiverIcons.vue +5 -3
  238. package/components/formatter/Scale.vue +4 -4
  239. package/components/formatter/ServiceTargets.vue +1 -1
  240. package/components/formatter/VirtualServiceGateways.vue +1 -1
  241. package/components/formatter/Weight.vue +2 -2
  242. package/components/formatter/WorkloadDetailEndpoints.vue +4 -1
  243. package/components/formatter/WorkloadHealthScale.vue +5 -6
  244. package/components/formatter/__tests__/Checked.test.ts +2 -2
  245. package/components/formatter/__tests__/ClusterLink.test.ts +3 -3
  246. package/components/formatter/__tests__/Date.test.ts +8 -8
  247. package/components/formatter/__tests__/LinkDetail.test.ts +10 -10
  248. package/components/formatter/__tests__/LiveDate.test.ts +21 -15
  249. package/components/formatter/__tests__/PodsUsage.test.ts +5 -5
  250. package/components/formatter/__tests__/Si.test.ts +3 -3
  251. package/components/formatter/__tests__/WorkloadDetailEndpoints.test.ts +5 -5
  252. package/components/graph/LinePlot.vue +1 -2
  253. package/components/nav/Group.vue +11 -6
  254. package/components/nav/Header.vue +162 -128
  255. package/components/nav/Jump.vue +1 -1
  256. package/components/nav/NamespaceFilter.vue +1 -1
  257. package/components/nav/TopLevelMenu.vue +15 -18
  258. package/components/nav/Type.vue +7 -7
  259. package/components/nav/WindowManager/ContainerLogs.vue +53 -38
  260. package/components/nav/WindowManager/ContainerShell.vue +38 -37
  261. package/components/nav/WindowManager/Window.vue +1 -1
  262. package/components/nav/WindowManager/__tests__/ContainerLogs.test.ts +192 -184
  263. package/components/nav/WindowManager/__tests__/ContainerShell.test.ts +21 -17
  264. package/components/nav/WindowManager/index.vue +4 -4
  265. package/components/nav/WorkspaceSwitcher.vue +16 -16
  266. package/components/nav/__tests__/TopLevelMenu.test.ts +354 -308
  267. package/components/nav/__tests__/Type.test.ts +194 -111
  268. package/components/nuxt/nuxt-build-indicator.vue +79 -52
  269. package/components/nuxt/nuxt-child.js +24 -25
  270. package/components/nuxt/nuxt-error.vue +48 -18
  271. package/components/nuxt/nuxt-link.client.js +4 -3
  272. package/components/nuxt/nuxt-loading.vue +96 -85
  273. package/components/templates/blank.vue +0 -1
  274. package/components/templates/default.vue +0 -4
  275. package/components/templates/home.vue +4 -4
  276. package/components/templates/plain.vue +3 -2
  277. package/composables/useI18n.ts +1 -1
  278. package/composables/useLabeledFormElement.ts +12 -1
  279. package/composables/useUserRetentionValidation.test.ts +178 -0
  280. package/composables/useUserRetentionValidation.ts +201 -0
  281. package/config/__test__/home-links.test.ts +2 -7
  282. package/config/pagination-table-headers.js +5 -4
  283. package/config/product/auth.js +1 -1
  284. package/config/query-params.js +1 -0
  285. package/config/roles.ts +34 -19
  286. package/config/router/index.js +10 -7
  287. package/config/router/navigation-guards/attempt-first-login.js +1 -1
  288. package/config/router/navigation-guards/authentication.js +2 -1
  289. package/{middleware/authenticated.js → config/router/navigation-guards/clusters.js} +28 -86
  290. package/config/router/navigation-guards/history.js +13 -0
  291. package/config/router/navigation-guards/i18n.js +13 -0
  292. package/config/router/navigation-guards/index.js +9 -1
  293. package/config/router/navigation-guards/install-redirect.js +95 -0
  294. package/config/router/navigation-guards/load-initial-settings.js +1 -1
  295. package/config/router/navigation-guards/page-title.js +12 -0
  296. package/config/router/navigation-guards/products.js +15 -0
  297. package/config/router/navigation-guards/runtime-extension-route.js +31 -0
  298. package/config/router/navigation-guards/server-upgrade-growl.js +19 -0
  299. package/config/router/routes.js +49 -23
  300. package/config/settings.ts +1 -1
  301. package/config/store.js +2 -5
  302. package/config/types.js +18 -0
  303. package/config/uiplugins.js +2 -2
  304. package/core/plugin-routes.ts +11 -14
  305. package/core/plugin.ts +10 -10
  306. package/core/plugins-loader.js +1 -3
  307. package/core/plugins.js +7 -1
  308. package/core/types.ts +7 -7
  309. package/detail/__tests__/autoscaling.horizontalpodautoscaler.test.ts +3 -3
  310. package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +46 -4
  311. package/detail/__tests__/service.test.ts +6 -6
  312. package/detail/autoscaling.horizontalpodautoscaler/index.vue +6 -5
  313. package/detail/catalog.cattle.io.app.vue +2 -2
  314. package/detail/cis.cattle.io.clusterscan.vue +3 -3
  315. package/detail/configmap.vue +4 -1
  316. package/detail/fleet.cattle.io.cluster.vue +2 -1
  317. package/detail/fleet.cattle.io.clustergroup.vue +2 -1
  318. package/detail/fleet.cattle.io.gitrepo.vue +2 -1
  319. package/detail/harvesterhci.io.management.cluster.vue +2 -1
  320. package/detail/helm.cattle.io.projecthelmchart.vue +3 -3
  321. package/detail/management.cattle.io.user.vue +2 -1
  322. package/detail/namespace.vue +2 -1
  323. package/detail/networking.k8s.io.ingress.vue +4 -2
  324. package/detail/node.vue +2 -1
  325. package/detail/provisioning.cattle.io.cluster.vue +10 -11
  326. package/detail/secret.vue +3 -2
  327. package/detail/service.vue +2 -1
  328. package/detail/workload/index.vue +1 -19
  329. package/dialog/AddClusterMemberDialog.vue +30 -31
  330. package/dialog/AddCustomBadgeDialog.vue +101 -104
  331. package/dialog/AddProjectMemberDialog.vue +45 -46
  332. package/dialog/AddonConfigConfirmationDialog.vue +22 -24
  333. package/dialog/DeactivateDriverDialog.vue +35 -17
  334. package/dialog/DiagnosticTimingsDialog.vue +29 -29
  335. package/dialog/DrainNode.vue +245 -249
  336. package/dialog/ForceMachineRemoveDialog.vue +32 -34
  337. package/dialog/GenericPrompt.vue +23 -25
  338. package/dialog/RollbackWorkloadDialog.vue +68 -71
  339. package/dialog/RotateCertificatesDialog.vue +17 -18
  340. package/dialog/RotateEncryptionKeyDialog.vue +46 -47
  341. package/dialog/SaveAsRKETemplateDialog.vue +46 -47
  342. package/dialog/ScaleMachineDownDialog.vue +3 -3
  343. package/dialog/ScalePoolDownDialog.vue +22 -24
  344. package/dialog/SloDialog.vue +95 -0
  345. package/directives/clean-html.js +3 -3
  346. package/directives/clean-tooltip.js +1 -1
  347. package/directives/focus.js +17 -11
  348. package/directives/int-number.js +2 -2
  349. package/directives/positive-int-number.js +2 -2
  350. package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +7 -13
  351. package/edit/__tests__/kontainerDriver.test.ts +23 -20
  352. package/edit/__tests__/management.cattle.io.clusterroletemplatebinding.test.ts +31 -29
  353. package/edit/__tests__/management.cattle.io.setting.test.ts +20 -18
  354. package/edit/__tests__/monitoring.coreos.com.prometheusrule.test.ts +17 -15
  355. package/edit/__tests__/namespace.test.ts +29 -26
  356. package/edit/__tests__/nodeDriver.test.ts +35 -53
  357. package/edit/__tests__/service.test.ts +20 -17
  358. package/edit/__tests__/ui.cattle.io.navlink.test.ts +22 -20
  359. package/edit/auth/__tests__/AuthProviderWarningBanners.test.ts +2 -2
  360. package/edit/auth/__tests__/azuread.test.ts +43 -45
  361. package/edit/auth/__tests__/oidc.test.ts +38 -41
  362. package/edit/auth/azuread.vue +16 -23
  363. package/edit/auth/github.vue +6 -6
  364. package/edit/auth/googleoauth.vue +7 -7
  365. package/edit/auth/ldap/config.vue +29 -29
  366. package/edit/auth/ldap/index.vue +5 -5
  367. package/edit/auth/oidc.vue +18 -18
  368. package/edit/auth/saml.vue +94 -24
  369. package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +2 -2
  370. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +7 -7
  371. package/edit/autoscaling.horizontalpodautoscaler/index.vue +18 -16
  372. package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +3 -3
  373. package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +3 -3
  374. package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +12 -12
  375. package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +5 -5
  376. package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +3 -3
  377. package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +2 -2
  378. package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
  379. package/edit/catalog.cattle.io.clusterrepo.vue +31 -32
  380. package/edit/cis.cattle.io.clusterscan.vue +9 -9
  381. package/edit/cis.cattle.io.clusterscanbenchmark.vue +7 -7
  382. package/edit/cis.cattle.io.clusterscanprofile.vue +3 -3
  383. package/edit/cloudcredential.vue +13 -8
  384. package/edit/configmap.vue +7 -7
  385. package/edit/constraints.gatekeeper.sh.constraint/MatchKinds.vue +3 -3
  386. package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +1 -1
  387. package/edit/constraints.gatekeeper.sh.constraint/Scope.vue +1 -1
  388. package/edit/constraints.gatekeeper.sh.constraint/index.vue +21 -22
  389. package/edit/fleet.cattle.io.cluster.vue +2 -1
  390. package/edit/fleet.cattle.io.clustergroup.vue +3 -2
  391. package/edit/fleet.cattle.io.gitrepo.vue +18 -18
  392. package/edit/helm.cattle.io.projecthelmchart.vue +4 -4
  393. package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +3 -2
  394. package/edit/logging-flow/Match.vue +4 -4
  395. package/edit/logging-flow/index.vue +11 -10
  396. package/edit/logging.banzaicloud.io.output/__tests__/logging.banzaicloud.io.output.test.ts +79 -73
  397. package/edit/logging.banzaicloud.io.output/index.vue +4 -4
  398. package/edit/logging.banzaicloud.io.output/providers/__tests__/loki.test.ts +1 -1
  399. package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +3 -3
  400. package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +5 -5
  401. package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +6 -6
  402. package/edit/logging.banzaicloud.io.output/providers/datadog.vue +4 -4
  403. package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +16 -16
  404. package/edit/logging.banzaicloud.io.output/providers/file.vue +1 -1
  405. package/edit/logging.banzaicloud.io.output/providers/forward.vue +9 -9
  406. package/edit/logging.banzaicloud.io.output/providers/gcs.vue +5 -5
  407. package/edit/logging.banzaicloud.io.output/providers/gelf.vue +14 -14
  408. package/edit/logging.banzaicloud.io.output/providers/kafka.vue +10 -10
  409. package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +3 -3
  410. package/edit/logging.banzaicloud.io.output/providers/logdna.vue +3 -3
  411. package/edit/logging.banzaicloud.io.output/providers/logz.vue +5 -5
  412. package/edit/logging.banzaicloud.io.output/providers/loki.vue +10 -10
  413. package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +3 -3
  414. package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +15 -15
  415. package/edit/logging.banzaicloud.io.output/providers/redis.vue +5 -5
  416. package/edit/logging.banzaicloud.io.output/providers/s3.vue +7 -7
  417. package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +12 -12
  418. package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +2 -2
  419. package/edit/logging.banzaicloud.io.output/providers/syslog.vue +19 -19
  420. package/edit/management.cattle.io.clusterroletemplatebinding.vue +1 -1
  421. package/edit/management.cattle.io.fleetworkspace.vue +6 -4
  422. package/edit/management.cattle.io.node.vue +1 -1
  423. package/edit/management.cattle.io.project.vue +13 -10
  424. package/edit/management.cattle.io.projectroletemplatebinding.vue +3 -3
  425. package/edit/management.cattle.io.setting.vue +6 -6
  426. package/edit/management.cattle.io.user.vue +4 -4
  427. package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +4 -4
  428. package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +2 -1
  429. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +5 -5
  430. package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +11 -11
  431. package/edit/monitoring.coreos.com.alertmanagerconfig/tls.vue +2 -2
  432. package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +10 -9
  433. package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
  434. package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +5 -5
  435. package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +5 -5
  436. package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +9 -9
  437. package/edit/monitoring.coreos.com.prometheusrule/AlertingRule.vue +36 -36
  438. package/edit/monitoring.coreos.com.prometheusrule/RecordingRule.vue +4 -4
  439. package/edit/monitoring.coreos.com.prometheusrule/index.vue +9 -9
  440. package/edit/monitoring.coreos.com.receiver/auth.vue +9 -9
  441. package/edit/monitoring.coreos.com.receiver/index.vue +8 -8
  442. package/edit/monitoring.coreos.com.receiver/tls.vue +4 -4
  443. package/edit/monitoring.coreos.com.receiver/types/__tests__/email.test.ts +20 -16
  444. package/edit/monitoring.coreos.com.receiver/types/email.vue +12 -11
  445. package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +11 -11
  446. package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +6 -6
  447. package/edit/monitoring.coreos.com.receiver/types/slack.vue +6 -6
  448. package/edit/monitoring.coreos.com.receiver/types/webhook.vue +7 -7
  449. package/edit/monitoring.coreos.com.route.vue +10 -10
  450. package/edit/namespace.vue +7 -7
  451. package/edit/networking.istio.io.destinationrule/LoadBalancer.vue +12 -12
  452. package/edit/networking.istio.io.destinationrule/index.vue +15 -15
  453. package/edit/networking.k8s.io.ingress/Certificate.vue +5 -5
  454. package/edit/networking.k8s.io.ingress/Certificates.vue +2 -2
  455. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +18 -18
  456. package/edit/networking.k8s.io.ingress/IngressClass.vue +1 -1
  457. package/edit/networking.k8s.io.ingress/Rule.vue +9 -7
  458. package/edit/networking.k8s.io.ingress/RulePath.vue +10 -10
  459. package/edit/networking.k8s.io.ingress/Rules.vue +3 -3
  460. package/edit/networking.k8s.io.ingress/index.vue +12 -8
  461. package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +4 -4
  462. package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +1 -1
  463. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +47 -32
  464. package/edit/networking.k8s.io.networkpolicy/PolicyRules.vue +3 -3
  465. package/edit/networking.k8s.io.networkpolicy/__tests__/PolicyRuleTarget.test.ts +27 -26
  466. package/edit/networking.k8s.io.networkpolicy/index.vue +16 -14
  467. package/edit/node.vue +3 -2
  468. package/edit/nodeDriver.vue +6 -1
  469. package/edit/persistentvolume/__tests__/persistentvolume.test.ts +56 -50
  470. package/edit/persistentvolume/index.vue +23 -23
  471. package/edit/persistentvolume/plugins/awsElasticBlockStore.vue +8 -8
  472. package/edit/persistentvolume/plugins/azureDisk.vue +10 -10
  473. package/edit/persistentvolume/plugins/azureFile.vue +6 -6
  474. package/edit/persistentvolume/plugins/cephfs.vue +10 -10
  475. package/edit/persistentvolume/plugins/cinder.vue +8 -8
  476. package/edit/persistentvolume/plugins/csi.vue +18 -18
  477. package/edit/persistentvolume/plugins/fc.vue +9 -9
  478. package/edit/persistentvolume/plugins/flexVolume.vue +9 -9
  479. package/edit/persistentvolume/plugins/flocker.vue +3 -3
  480. package/edit/persistentvolume/plugins/gcePersistentDisk.vue +8 -8
  481. package/edit/persistentvolume/plugins/glusterfs.vue +5 -5
  482. package/edit/persistentvolume/plugins/hostPath.vue +4 -4
  483. package/edit/persistentvolume/plugins/iscsi.vue +18 -18
  484. package/edit/persistentvolume/plugins/local.vue +2 -2
  485. package/edit/persistentvolume/plugins/longhorn.vue +8 -8
  486. package/edit/persistentvolume/plugins/nfs.vue +5 -5
  487. package/edit/persistentvolume/plugins/photonPersistentDisk.vue +5 -5
  488. package/edit/persistentvolume/plugins/portworxVolume.vue +6 -6
  489. package/edit/persistentvolume/plugins/quobyte.vue +7 -7
  490. package/edit/persistentvolume/plugins/rbd.vue +12 -12
  491. package/edit/persistentvolume/plugins/scaleIO.vue +15 -15
  492. package/edit/persistentvolume/plugins/storageos.vue +9 -9
  493. package/edit/persistentvolume/plugins/vsphereVolume.vue +5 -5
  494. package/edit/persistentvolumeclaim.vue +26 -25
  495. package/edit/policy.poddisruptionbudget.vue +12 -11
  496. package/edit/provisioning.cattle.io.cluster/AgentEnv.vue +1 -1
  497. package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +10 -10
  498. package/edit/provisioning.cattle.io.cluster/Labels.vue +12 -1
  499. package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +5 -5
  500. package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +40 -36
  501. package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +170 -78
  502. package/edit/provisioning.cattle.io.cluster/__tests__/CustomCommand.test.ts +16 -14
  503. package/edit/provisioning.cattle.io.cluster/__tests__/DirectoryConfig.test.ts +38 -8
  504. package/edit/provisioning.cattle.io.cluster/__tests__/DrainOptions.test.ts +14 -12
  505. package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +18 -19
  506. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +285 -84
  507. package/edit/provisioning.cattle.io.cluster/import.vue +7 -4
  508. package/edit/provisioning.cattle.io.cluster/index.vue +32 -13
  509. package/edit/provisioning.cattle.io.cluster/rke2.vue +149 -78
  510. package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +5 -5
  511. package/edit/provisioning.cattle.io.cluster/tabs/Advanced.vue +10 -11
  512. package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +12 -11
  513. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +62 -24
  514. package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +9 -9
  515. package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +12 -12
  516. package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +15 -15
  517. package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +6 -6
  518. package/edit/provisioning.cattle.io.cluster/tabs/networking/ACE.vue +3 -3
  519. package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +18 -9
  520. package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +16 -12
  521. package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryMirrors.vue +4 -4
  522. package/edit/provisioning.cattle.io.cluster/tabs/registries/__tests__/RegistryConfigs.test.ts +64 -0
  523. package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +8 -6
  524. package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +15 -15
  525. package/edit/provisioning.cattle.io.cluster/tabs/upgrade/index.vue +4 -4
  526. package/edit/resources.cattle.io.backup.vue +9 -9
  527. package/edit/resources.cattle.io.restore.vue +11 -11
  528. package/edit/secret/basic.vue +2 -2
  529. package/edit/secret/generic.vue +1 -1
  530. package/edit/secret/index.vue +12 -10
  531. package/edit/secret/registry.vue +4 -4
  532. package/edit/secret/ssh.vue +2 -2
  533. package/edit/secret/tls.vue +2 -2
  534. package/edit/service.vue +23 -23
  535. package/edit/serviceaccount.vue +4 -4
  536. package/edit/storage.k8s.io.storageclass/index.vue +13 -13
  537. package/edit/storage.k8s.io.storageclass/provisioners/custom.vue +1 -1
  538. package/edit/storage.k8s.io.storageclass/provisioners/driver.harvesterhci.io.vue +2 -2
  539. package/edit/storage.k8s.io.storageclass/provisioners/driver.longhorn.io.vue +4 -4
  540. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +12 -12
  541. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/azure-disk.vue +3 -3
  542. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/azure-file.vue +3 -3
  543. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/cinder.vue +4 -4
  544. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +6 -6
  545. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/glusterfs.vue +9 -9
  546. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/portworx-volume.vue +7 -7
  547. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/quobyte.vue +8 -8
  548. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/rbd.vue +11 -11
  549. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/scaleio.vue +8 -8
  550. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/storageos.vue +5 -5
  551. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +7 -7
  552. package/edit/token.vue +6 -5
  553. package/edit/ui.cattle.io.navlink.vue +28 -27
  554. package/edit/workload/Job.vue +16 -16
  555. package/edit/workload/Upgrading.vue +16 -16
  556. package/edit/workload/VolumeClaimTemplate.vue +3 -3
  557. package/edit/workload/__tests__/Job.test.ts +8 -8
  558. package/edit/workload/__tests__/index.test.ts +32 -29
  559. package/edit/workload/index.vue +29 -28
  560. package/edit/workload/mixins/workload.js +30 -30
  561. package/edit/workload/storage/ContainerMountPaths.vue +3 -4
  562. package/edit/workload/storage/Mount.vue +3 -3
  563. package/edit/workload/storage/__tests__/Mount.test.ts +13 -13
  564. package/edit/workload/storage/__tests__/Storage.test.ts +26 -20
  565. package/edit/workload/storage/awsElasticBlockStore.vue +4 -4
  566. package/edit/workload/storage/azureDisk.vue +7 -7
  567. package/edit/workload/storage/azureFile.vue +5 -5
  568. package/edit/workload/storage/csi/driver.longhorn.io.vue +3 -3
  569. package/edit/workload/storage/csi/index.vue +4 -4
  570. package/edit/workload/storage/emptyDir.vue +4 -4
  571. package/edit/workload/storage/ephemeralVolume/index.vue +3 -3
  572. package/edit/workload/storage/gcePersistentDisk.vue +4 -4
  573. package/edit/workload/storage/hostPath.vue +4 -4
  574. package/edit/workload/storage/index.vue +3 -4
  575. package/edit/workload/storage/nfs.vue +4 -4
  576. package/edit/workload/storage/persistentVolumeClaim/__tests__/persistentvolumeclaim.test.ts +18 -16
  577. package/edit/workload/storage/persistentVolumeClaim/index.vue +5 -5
  578. package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +15 -15
  579. package/edit/workload/storage/secret.vue +9 -9
  580. package/edit/workload/storage/vsphereVolume.vue +4 -4
  581. package/initialize/App.vue +10 -8
  582. package/initialize/app-extended.js +14 -30
  583. package/initialize/entry-helpers.js +32 -429
  584. package/initialize/entry.js +11 -10
  585. package/initialize/install-plugins.js +15 -13
  586. package/list/__tests__/workload.test.ts +22 -20
  587. package/list/catalog.cattle.io.app.vue +1 -1
  588. package/list/cis.cattle.io.clusterscan.vue +1 -2
  589. package/list/fleet.cattle.io.clustergroup.vue +0 -1
  590. package/list/group.principal.vue +1 -1
  591. package/list/management.cattle.io.feature.vue +27 -31
  592. package/list/management.cattle.io.fleetworkspace.vue +0 -1
  593. package/list/management.cattle.io.setting.vue +2 -2
  594. package/list/management.cattle.io.user.vue +1 -1
  595. package/list/namespace.vue +0 -1
  596. package/list/node.vue +4 -5
  597. package/list/provisioning.cattle.io.cluster.vue +1 -1
  598. package/list/rbac.authorization.k8s.io.clusterrolebinding.vue +0 -1
  599. package/machine-config/__tests__/vmwarevsphere.test.ts +10 -7
  600. package/machine-config/amazonec2.vue +26 -26
  601. package/machine-config/azure.vue +31 -31
  602. package/machine-config/digitalocean.vue +8 -8
  603. package/machine-config/generic.vue +2 -1
  604. package/machine-config/linode.vue +4 -4
  605. package/machine-config/pnap.vue +11 -11
  606. package/machine-config/vmwarevsphere-config.ts +17 -0
  607. package/machine-config/vmwarevsphere.vue +400 -410
  608. package/mixins/__tests__/chart.test.ts +45 -24
  609. package/mixins/auth-config.js +37 -11
  610. package/mixins/chart.js +31 -15
  611. package/mixins/compact-input.ts +2 -3
  612. package/mixins/labeled-form-element.ts +8 -3
  613. package/mixins/resource-fetch.js +4 -3
  614. package/models/__tests__/apps.deployment.test.ts +93 -0
  615. package/models/apps.deployment.js +18 -4
  616. package/models/apps.statefulset.js +1 -2
  617. package/models/batch.cronjob.js +1 -2
  618. package/models/catalog.cattle.io.clusterrepo.js +1 -2
  619. package/models/driver.js +3 -2
  620. package/models/fleet.cattle.io.gitrepo.js +1 -2
  621. package/models/helm.cattle.io.projecthelmchart.js +2 -3
  622. package/models/kontainerdriver.js +30 -13
  623. package/models/management.cattle.io.authconfig.js +2 -2
  624. package/models/management.cattle.io.cluster.js +2 -2
  625. package/models/management.cattle.io.roletemplate.js +2 -3
  626. package/models/namespace.js +1 -2
  627. package/models/networking.istio.io.destinationrule.js +2 -3
  628. package/models/nodedriver.js +30 -13
  629. package/models/persistentvolumeclaim.js +2 -3
  630. package/models/provisioning.cattle.io.cluster.js +4 -0
  631. package/models/workload.js +2 -2
  632. package/package.json +44 -42
  633. package/pages/404.vue +15 -0
  634. package/pages/__tests__/prefs.test.ts +44 -44
  635. package/pages/about.vue +4 -4
  636. package/pages/account/index.vue +1 -2
  637. package/pages/auth/login.vue +29 -9
  638. package/pages/auth/logout.vue +23 -1
  639. package/pages/auth/setup.vue +35 -31
  640. package/pages/auth/verify.vue +38 -5
  641. package/pages/c/_cluster/_product/namespaces.vue +1 -2
  642. package/pages/c/_cluster/apps/charts/chart.vue +4 -4
  643. package/pages/c/_cluster/apps/charts/index.vue +16 -16
  644. package/pages/c/_cluster/apps/charts/install.vue +49 -82
  645. package/pages/c/_cluster/auth/config/index.vue +2 -2
  646. package/pages/c/_cluster/auth/roles/index.vue +2 -2
  647. package/pages/c/_cluster/auth/user.retention/index.vue +34 -95
  648. package/pages/c/_cluster/explorer/EventsTable.vue +1 -1
  649. package/pages/c/_cluster/explorer/__tests__/index.test.ts +32 -34
  650. package/pages/c/_cluster/explorer/index.vue +9 -6
  651. package/pages/c/_cluster/explorer/tools/__tests__/index.test.ts +22 -20
  652. package/pages/c/_cluster/fleet/index.vue +5 -6
  653. package/pages/c/_cluster/gatekeeper/index.vue +4 -5
  654. package/pages/c/_cluster/istio/index.vue +4 -6
  655. package/pages/c/_cluster/logging/index.vue +9 -5
  656. package/pages/c/_cluster/longhorn/__tests__/longhorn.index.test.ts +7 -5
  657. package/pages/c/_cluster/longhorn/index.vue +2 -9
  658. package/pages/c/_cluster/manager/drivers/kontainerDriver/index.vue +1 -4
  659. package/pages/c/_cluster/manager/drivers/nodeDriver/index.vue +1 -4
  660. package/pages/c/_cluster/manager/jwt.authentication/index.vue +14 -5
  661. package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/receiver.vue +1 -1
  662. package/pages/c/_cluster/monitoring/index.vue +7 -9
  663. package/pages/c/_cluster/neuvector/index.vue +7 -10
  664. package/pages/c/_cluster/settings/DefaultLinksEditor.vue +7 -9
  665. package/pages/c/_cluster/settings/banners.vue +82 -84
  666. package/pages/c/_cluster/settings/brand.vue +21 -19
  667. package/pages/c/_cluster/settings/links.vue +6 -4
  668. package/pages/c/_cluster/settings/performance.vue +25 -21
  669. package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +2 -2
  670. package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +43 -45
  671. package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +5 -5
  672. package/pages/c/_cluster/uiplugins/InstallDialog.vue +3 -2
  673. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +3 -3
  674. package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +20 -15
  675. package/pages/c/_cluster/uiplugins/__tests__/SetupUIPlugins.test.ts +12 -9
  676. package/pages/c/_cluster/uiplugins/index.vue +173 -176
  677. package/pages/diagnostic.vue +6 -9
  678. package/pages/fail-whale.vue +3 -1
  679. package/pages/home.vue +8 -17
  680. package/pages/index.vue +17 -16
  681. package/pages/prefs.vue +12 -12
  682. package/pages/support/index.vue +3 -3
  683. package/pkg/tsconfig.json +0 -1
  684. package/plugins/clean-html-directive.js +4 -3
  685. package/plugins/clean-tooltip-directive.js +4 -3
  686. package/plugins/dashboard-store/actions.js +1 -1
  687. package/plugins/dashboard-store/getters.js +1 -1
  688. package/plugins/dashboard-store/index.js +2 -0
  689. package/plugins/dashboard-store/mutations.js +5 -5
  690. package/plugins/dashboard-store/resource-class.js +5 -5
  691. package/plugins/extend-router.js +62 -42
  692. package/plugins/floating-vue.js +1 -0
  693. package/plugins/formatters.js +1 -1
  694. package/plugins/global-formatters.js +3 -14
  695. package/plugins/i18n.js +17 -22
  696. package/plugins/int-number.js +4 -3
  697. package/plugins/positive-int-number.js +4 -3
  698. package/plugins/shortkey.js +273 -0
  699. package/plugins/steve/__tests__/getters.test.ts +6 -3
  700. package/plugins/steve/getters.js +6 -4
  701. package/plugins/steve/hybrid-class.js +7 -12
  702. package/plugins/steve/mutations.js +1 -2
  703. package/plugins/steve/norman-class.js +10 -11
  704. package/plugins/steve/subscribe.js +3 -1
  705. package/plugins/trim-whitespace.js +4 -3
  706. package/promptRemove/management.cattle.io.globalrole.vue +1 -5
  707. package/promptRemove/management.cattle.io.project.vue +1 -1
  708. package/promptRemove/pod.vue +16 -8
  709. package/public/index.html +53 -52
  710. package/rancher-components/BadgeState/BadgeState.test.ts +1 -1
  711. package/rancher-components/BadgeState/BadgeState.vue +1 -1
  712. package/rancher-components/Banner/Banner.test.ts +2 -2
  713. package/rancher-components/Form/Checkbox/Checkbox.test.ts +5 -5
  714. package/rancher-components/Form/Checkbox/Checkbox.vue +4 -4
  715. package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +5 -5
  716. package/rancher-components/Form/LabeledInput/LabeledInput.vue +15 -4
  717. package/rancher-components/Form/Radio/RadioButton.vue +3 -2
  718. package/rancher-components/Form/Radio/RadioGroup.test.ts +6 -9
  719. package/rancher-components/Form/Radio/RadioGroup.vue +4 -5
  720. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +18 -1
  721. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +13 -13
  722. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -1
  723. package/rancher-components/StringList/StringList.test.ts +22 -22
  724. package/rancher-components/StringList/StringList.vue +10 -9
  725. package/scripts/extension/helm/charts/ui-plugin-server/Chart.yaml +1 -1
  726. package/scripts/publish-shell.sh +53 -58
  727. package/scripts/test-plugins-build.sh +44 -38
  728. package/scripts/vue-migrate.js +7 -4
  729. package/shell/types/shell/index.d.ts +2 -0
  730. package/store/__tests__/catalog.test.ts +4 -21
  731. package/store/auth.js +29 -11
  732. package/store/index.js +17 -9
  733. package/store/prefs.js +3 -4
  734. package/types/resources/settings.d.ts +54 -0
  735. package/types/store/pagination.types.ts +1 -1
  736. package/utils/__tests__/kontainer.test.ts +89 -1
  737. package/utils/auth.js +22 -7
  738. package/utils/axios.js +1 -1
  739. package/utils/download.js +1 -1
  740. package/utils/dynamic-importer.js +14 -12
  741. package/utils/error.js +4 -4
  742. package/utils/kontainer.ts +5 -1
  743. package/utils/object.js +4 -5
  744. package/utils/router.js +7 -1
  745. package/utils/select.js +1 -1
  746. package/utils/settings.ts +3 -1
  747. package/utils/unit-tests/ChildRenderingRouterLinkStub.ts +4 -4
  748. package/utils/version.js +2 -1
  749. package/vue.config.js +404 -396
  750. package/config/middleware.js +0 -6
  751. package/config/nuxt-paths.js +0 -7
  752. package/creators/app/app.package.json +0 -13
  753. package/creators/app/files/.eslintignore +0 -16
  754. package/creators/app/files/.eslintrc.js +0 -173
  755. package/creators/app/files/.gitignore +0 -70
  756. package/creators/app/files/.gitlab-ci.yml +0 -14
  757. package/creators/app/files/.vscode/settings.json +0 -21
  758. package/creators/app/files/babel.config.js +0 -1
  759. package/creators/app/files/tsconfig.json +0 -42
  760. package/creators/app/files/vue.config.js +0 -6
  761. package/creators/app/init +0 -120
  762. package/creators/app/package.json +0 -25
  763. package/creators/pkg/files/.github/workflows/build-extension-catalog.yml +0 -24
  764. package/creators/pkg/files/.github/workflows/build-extension-charts.yml +0 -22
  765. package/creators/pkg/files/babel.config.js +0 -1
  766. package/creators/pkg/files/index.ts +0 -14
  767. package/creators/pkg/files/tsconfig.json +0 -53
  768. package/creators/pkg/files/vue.config.js +0 -1
  769. package/creators/pkg/init +0 -286
  770. package/creators/pkg/package.json +0 -19
  771. package/creators/pkg/pkg.package.json +0 -21
  772. package/creators/pkg/vue-shim.ts +0 -4
  773. package/creators/update/init +0 -56
  774. package/creators/update/package.json +0 -20
  775. package/creators/update/upgrade +0 -56
  776. package/pages/c/_cluster/backup/index.vue +0 -11
  777. package/pages/c/_cluster/cis/index.vue +0 -11
  778. package/plugins/directives.js +0 -8
  779. package/plugins/vue-js-modal.js +0 -4
  780. package/rancher-components/components/Accordion/Accordion.test.ts +0 -45
  781. package/rancher-components/components/Accordion/Accordion.vue +0 -86
  782. package/rancher-components/components/Accordion/index.ts +0 -1
  783. package/rancher-components/components/BadgeState/BadgeState.test.ts +0 -12
  784. package/rancher-components/components/BadgeState/BadgeState.vue +0 -111
  785. package/rancher-components/components/BadgeState/index.ts +0 -1
  786. package/rancher-components/components/Banner/Banner.test.ts +0 -59
  787. package/rancher-components/components/Banner/Banner.vue +0 -244
  788. package/rancher-components/components/Banner/index.ts +0 -1
  789. package/rancher-components/components/Card/Card.test.ts +0 -37
  790. package/rancher-components/components/Card/Card.vue +0 -167
  791. package/rancher-components/components/Card/index.ts +0 -1
  792. package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +0 -68
  793. package/rancher-components/components/Form/Checkbox/Checkbox.vue +0 -421
  794. package/rancher-components/components/Form/Checkbox/index.ts +0 -1
  795. package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +0 -40
  796. package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +0 -402
  797. package/rancher-components/components/Form/LabeledInput/index.ts +0 -1
  798. package/rancher-components/components/Form/Radio/RadioButton.test.ts +0 -33
  799. package/rancher-components/components/Form/Radio/RadioButton.vue +0 -293
  800. package/rancher-components/components/Form/Radio/RadioGroup.test.ts +0 -30
  801. package/rancher-components/components/Form/Radio/RadioGroup.vue +0 -259
  802. package/rancher-components/components/Form/Radio/index.ts +0 -2
  803. package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +0 -172
  804. package/rancher-components/components/Form/TextArea/index.ts +0 -1
  805. package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +0 -94
  806. package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +0 -152
  807. package/rancher-components/components/Form/ToggleSwitch/index.ts +0 -1
  808. package/rancher-components/components/Form/index.ts +0 -5
  809. package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +0 -156
  810. package/rancher-components/components/LabeledTooltip/index.ts +0 -1
  811. package/rancher-components/components/StringList/StringList.test.ts +0 -754
  812. package/rancher-components/components/StringList/StringList.vue +0 -650
  813. package/rancher-components/components/StringList/index.ts +0 -1
  814. package/types/shell/index.d.ts +0 -4585
  815. package/utils/install-redirect.js +0 -55
  816. /package/utils/{cookie-universal-nuxt.js → cookie-universal.js} +0 -0
@@ -1,4 +1,5 @@
1
- import { shallowMount, RouterLinkStub, createLocalVue } from '@vue/test-utils';
1
+ import { nextTick } from 'vue';
2
+ import { shallowMount, RouterLinkStub } from '@vue/test-utils';
2
3
  import Type from '@shell/components/nav/Type.vue';
3
4
  import { createChildRenderingRouterLinkStub } from '@shell/utils/unit-tests/ChildRenderingRouterLinkStub';
4
5
  import { TYPE_MODES } from '@shell/store/type-map';
@@ -11,14 +12,9 @@ const favoriteClass = 'favorite';
11
12
 
12
13
  describe('component: Type', () => {
13
14
  describe('testing router-link type', () => {
14
- const localVue = createLocalVue();
15
-
16
- localVue.directive('cleanHtml', (identity) => identity);
17
-
18
15
  const defaultRouteTypeProp = {
19
16
  name: 'route-type',
20
17
  route: 'route',
21
- exact: true,
22
18
  mode: TYPE_MODES.FAVORITE
23
19
  };
24
20
 
@@ -33,24 +29,31 @@ describe('component: Type', () => {
33
29
  describe('should pass props correctly', () => {
34
30
  it('should forward Type props to router-link', () => {
35
31
  const wrapper = shallowMount(Type as any, {
36
- localVue,
37
- propsData: { type: defaultRouteTypeProp },
38
- stubs: { routerLink: RouterLinkStub },
32
+ props: { type: defaultRouteTypeProp },
33
+
34
+ global: {
35
+ directives: { cleanHtml: (identity) => identity },
36
+ mocks: { $store: storeMock },
37
+ stubs: { routerLink: RouterLinkStub },
38
+ },
39
39
  });
40
40
 
41
41
  const linkStub = wrapper.findComponent(RouterLinkStub);
42
42
 
43
43
  expect(linkStub.props().to).toBe(defaultRouteTypeProp.route);
44
- expect(linkStub.props().exact).toBe(defaultRouteTypeProp.exact);
45
44
  });
46
45
 
47
46
  it('should use router-link-slot href prop', () => {
48
47
  const fakeHref = 'fake-href';
49
48
  const wrapper = shallowMount(Type as any, {
50
- localVue,
51
- propsData: { type: defaultRouteTypeProp },
52
- stubs: { routerLink: createChildRenderingRouterLinkStub({ href: fakeHref }) },
53
- mocks: { $store: storeMock }
49
+ props: { type: defaultRouteTypeProp },
50
+
51
+ global: {
52
+ directives: { cleanHtml: (identity) => identity },
53
+
54
+ mocks: { $store: storeMock },
55
+ stubs: { routerLink: createChildRenderingRouterLinkStub({ href: fakeHref }) },
56
+ },
54
57
  });
55
58
 
56
59
  const elementWithSelector = wrapper.find(`a[href='${ fakeHref }']`);
@@ -61,10 +64,14 @@ describe('component: Type', () => {
61
64
  it('should use router-link-slot navigate prop', () => {
62
65
  const navigate = jest.fn();
63
66
  const wrapper = shallowMount(Type as any, {
64
- localVue,
65
- propsData: { type: defaultRouteTypeProp },
66
- stubs: { routerLink: createChildRenderingRouterLinkStub({ isActive: true, navigate }) },
67
- mocks: { $store: storeMock }
67
+ props: { type: defaultRouteTypeProp },
68
+
69
+ global: {
70
+ directives: { cleanHtml: (identity) => identity },
71
+
72
+ mocks: { $store: storeMock },
73
+ stubs: { routerLink: createChildRenderingRouterLinkStub({ isActive: true, navigate }) },
74
+ },
68
75
  });
69
76
 
70
77
  const elementWithSelector = wrapper.find(`.${ activeClass }`);
@@ -78,10 +85,14 @@ describe('component: Type', () => {
78
85
  describe('should not use classes if preconditions are not met', () => {
79
86
  it('should not use active class if the link is not active', () => {
80
87
  const wrapper = shallowMount(Type as any, {
81
- localVue,
82
- propsData: { type: defaultRouteTypeProp },
83
- stubs: { routerLink: createChildRenderingRouterLinkStub({ isActive: false }) },
84
- mocks: { $store: storeMock }
88
+ props: { type: defaultRouteTypeProp },
89
+
90
+ global: {
91
+ directives: { cleanHtml: (identity) => identity },
92
+
93
+ mocks: { $store: storeMock },
94
+ stubs: { routerLink: createChildRenderingRouterLinkStub({ isActive: false }) },
95
+ },
85
96
  });
86
97
 
87
98
  const elementWithSelector = wrapper.find(`.${ activeClass }`);
@@ -91,10 +102,14 @@ describe('component: Type', () => {
91
102
 
92
103
  it('should not use exact active class if the link is not active', () => {
93
104
  const wrapper = shallowMount(Type as any, {
94
- localVue,
95
- propsData: { type: defaultRouteTypeProp },
96
- stubs: { routerLink: createChildRenderingRouterLinkStub({ isExactActive: false }) },
97
- mocks: { $store: storeMock }
105
+ props: { type: defaultRouteTypeProp },
106
+
107
+ global: {
108
+ directives: { cleanHtml: (identity) => identity },
109
+
110
+ mocks: { $store: storeMock },
111
+ stubs: { routerLink: createChildRenderingRouterLinkStub({ isExactActive: false }) },
112
+ },
98
113
  });
99
114
 
100
115
  const elementWithSelector = wrapper.find(`.${ exactActiveClass }`);
@@ -104,10 +119,14 @@ describe('component: Type', () => {
104
119
 
105
120
  it('should not use root class if the isRoot prop is false', () => {
106
121
  const wrapper = shallowMount(Type as any, {
107
- localVue,
108
- propsData: { type: defaultRouteTypeProp, isRoot: false },
109
- stubs: { routerLink: createChildRenderingRouterLinkStub() },
110
- mocks: { $store: storeMock }
122
+ props: { type: defaultRouteTypeProp, isRoot: false },
123
+
124
+ global: {
125
+ directives: { cleanHtml: (identity) => identity },
126
+
127
+ mocks: { $store: storeMock },
128
+ stubs: { routerLink: createChildRenderingRouterLinkStub() },
129
+ },
111
130
  });
112
131
 
113
132
  const elementWithSelector = wrapper.find(`.${ rootClass }`);
@@ -119,10 +138,14 @@ describe('component: Type', () => {
119
138
  describe('should use classes if preconditions are met', () => {
120
139
  it('should use active class if the link is active', () => {
121
140
  const wrapper = shallowMount(Type as any, {
122
- localVue,
123
- propsData: { type: defaultRouteTypeProp },
124
- stubs: { routerLink: createChildRenderingRouterLinkStub({ isActive: true }) },
125
- mocks: { $store: storeMock }
141
+ props: { type: defaultRouteTypeProp },
142
+
143
+ global: {
144
+ directives: { cleanHtml: (identity) => identity },
145
+
146
+ mocks: { $store: storeMock },
147
+ stubs: { routerLink: createChildRenderingRouterLinkStub({ isActive: true }) },
148
+ },
126
149
  });
127
150
 
128
151
  const elementWithSelector = wrapper.find(`.${ activeClass }`);
@@ -132,10 +155,14 @@ describe('component: Type', () => {
132
155
 
133
156
  it('should use exact active class if the link is active', () => {
134
157
  const wrapper = shallowMount(Type as any, {
135
- localVue,
136
- propsData: { type: defaultRouteTypeProp },
137
- stubs: { routerLink: createChildRenderingRouterLinkStub({ isExactActive: true }) },
138
- mocks: { $store: storeMock }
158
+ props: { type: defaultRouteTypeProp },
159
+
160
+ global: {
161
+ directives: { cleanHtml: (identity) => identity },
162
+
163
+ mocks: { $store: storeMock },
164
+ stubs: { routerLink: createChildRenderingRouterLinkStub({ isExactActive: true }) },
165
+ },
139
166
  });
140
167
 
141
168
  const elementWithSelector = wrapper.find(`.${ exactActiveClass }`);
@@ -145,10 +172,14 @@ describe('component: Type', () => {
145
172
 
146
173
  it('should use root class if the isRoot prop is true', () => {
147
174
  const wrapper = shallowMount(Type as any, {
148
- localVue,
149
- propsData: { type: defaultRouteTypeProp, isRoot: true },
150
- stubs: { routerLink: createChildRenderingRouterLinkStub() },
151
- mocks: { $store: storeMock }
175
+ props: { type: defaultRouteTypeProp, isRoot: true },
176
+
177
+ global: {
178
+ directives: { cleanHtml: (identity) => identity },
179
+
180
+ mocks: { $store: storeMock },
181
+ stubs: { routerLink: createChildRenderingRouterLinkStub() },
182
+ },
152
183
  });
153
184
 
154
185
  const elementWithSelector = wrapper.find(`.${ rootClass }`);
@@ -158,10 +189,14 @@ describe('component: Type', () => {
158
189
 
159
190
  it('should show depth-0 class if depth prop is not defined', () => {
160
191
  const wrapper = shallowMount(Type as any, {
161
- localVue,
162
- propsData: { type: defaultRouteTypeProp },
163
- stubs: { routerLink: createChildRenderingRouterLinkStub() },
164
- mocks: { $store: storeMock }
192
+ props: { type: defaultRouteTypeProp },
193
+
194
+ global: {
195
+ directives: { cleanHtml: (identity) => identity },
196
+
197
+ mocks: { $store: storeMock },
198
+ stubs: { routerLink: createChildRenderingRouterLinkStub() },
199
+ },
165
200
  });
166
201
 
167
202
  const elementWithSelector = wrapper.find(`.depth-0`);
@@ -171,10 +206,14 @@ describe('component: Type', () => {
171
206
 
172
207
  it('should show depth-1 class if depth prop is defined as 1', () => {
173
208
  const wrapper = shallowMount(Type as any, {
174
- localVue,
175
- propsData: { type: defaultRouteTypeProp, depth: 1 },
176
- stubs: { routerLink: createChildRenderingRouterLinkStub() },
177
- mocks: { $store: storeMock }
209
+ props: { type: defaultRouteTypeProp, depth: 1 },
210
+
211
+ global: {
212
+ directives: { cleanHtml: (identity) => identity },
213
+
214
+ mocks: { $store: storeMock },
215
+ stubs: { routerLink: createChildRenderingRouterLinkStub() },
216
+ },
178
217
  });
179
218
 
180
219
  const elementWithSelector = wrapper.find(`.depth-1`);
@@ -186,19 +225,24 @@ describe('component: Type', () => {
186
225
  describe('should handle the favorite icon appropriately', () => {
187
226
  it('should show favorite icon if mouse is over and type is favorite', async() => {
188
227
  const wrapper = shallowMount(Type as any, {
189
- localVue,
190
- propsData: { type: defaultRouteTypeProp },
191
- stubs: {
192
- routerLink: createChildRenderingRouterLinkStub(),
193
- Favorite: { template: `<div class=${ favoriteClass } />` }
228
+ props: { type: defaultRouteTypeProp },
229
+
230
+ global: {
231
+ directives: { cleanHtml: (identity) => identity },
232
+
233
+ mocks: { $store: storeMock },
234
+
235
+ stubs: {
236
+ routerLink: createChildRenderingRouterLinkStub(),
237
+ Favorite: { template: `<div class=${ favoriteClass } />` }
238
+ },
194
239
  },
195
- mocks: { $store: storeMock }
196
240
  });
197
241
 
198
242
  const aElement = wrapper.find(`a`);
199
243
 
200
244
  aElement.trigger('mouseenter');
201
- await wrapper.vm.$nextTick();
245
+ await nextTick();
202
246
 
203
247
  const favoriteElement = wrapper.find(`.${ favoriteClass }`);
204
248
 
@@ -207,13 +251,18 @@ describe('component: Type', () => {
207
251
 
208
252
  it('should not show favorite icon if mouse is not over and type is favorite', async() => {
209
253
  const wrapper = shallowMount(Type as any, {
210
- localVue,
211
- propsData: { type: defaultRouteTypeProp },
212
- stubs: {
213
- routerLink: createChildRenderingRouterLinkStub(),
214
- Favorite: { template: `<div class=${ favoriteClass } />` }
254
+ props: { type: defaultRouteTypeProp },
255
+
256
+ global: {
257
+ directives: { cleanHtml: (identity) => identity },
258
+
259
+ mocks: { $store: storeMock },
260
+
261
+ stubs: {
262
+ routerLink: createChildRenderingRouterLinkStub(),
263
+ Favorite: { template: `<div class=${ favoriteClass } />` }
264
+ },
215
265
  },
216
- mocks: { $store: storeMock }
217
266
  });
218
267
 
219
268
  const favoriteElement = wrapper.find(`.${ favoriteClass }`);
@@ -223,19 +272,24 @@ describe('component: Type', () => {
223
272
 
224
273
  it('should not show favorite icon if mouse is over and type is not favorite', async() => {
225
274
  const wrapper = shallowMount(Type as any, {
226
- localVue,
227
- propsData: { type: { ...defaultRouteTypeProp, mode: null } },
228
- stubs: {
229
- routerLink: createChildRenderingRouterLinkStub(),
230
- Favorite: { template: `<div class=${ favoriteClass } />` }
275
+ props: { type: { ...defaultRouteTypeProp, mode: null } },
276
+
277
+ global: {
278
+ directives: { cleanHtml: (identity) => identity },
279
+
280
+ mocks: { $store: storeMock },
281
+
282
+ stubs: {
283
+ routerLink: createChildRenderingRouterLinkStub(),
284
+ Favorite: { template: `<div class=${ favoriteClass } />` }
285
+ },
231
286
  },
232
- mocks: { $store: storeMock }
233
287
  });
234
288
 
235
289
  const aElement = wrapper.find(`a`);
236
290
 
237
291
  aElement.trigger('mouseenter');
238
- await wrapper.vm.$nextTick();
292
+ await nextTick();
239
293
 
240
294
  const favoriteElement = wrapper.find(`.${ favoriteClass }`);
241
295
 
@@ -247,13 +301,18 @@ describe('component: Type', () => {
247
301
  it('should show count if on type', async() => {
248
302
  const count = 2;
249
303
  const wrapper = shallowMount(Type as any, {
250
- localVue,
251
- propsData: { type: { ...defaultRouteTypeProp, count } },
252
- stubs: {
253
- routerLink: createChildRenderingRouterLinkStub(),
254
- Favorite: { template: `<div class=${ favoriteClass } />` }
304
+ props: { type: { ...defaultRouteTypeProp, count } },
305
+
306
+ global: {
307
+ directives: { cleanHtml: (identity) => identity },
308
+
309
+ mocks: { $store: storeMock },
310
+
311
+ stubs: {
312
+ routerLink: createChildRenderingRouterLinkStub(),
313
+ Favorite: { template: `<div class=${ favoriteClass } />` }
314
+ },
255
315
  },
256
- mocks: { $store: storeMock }
257
316
  });
258
317
 
259
318
  const typeCount = wrapper.find(`span[data-testid="type-count"]`);
@@ -263,13 +322,18 @@ describe('component: Type', () => {
263
322
 
264
323
  it('should show count if in store', async() => {
265
324
  const wrapper = shallowMount(Type as any, {
266
- localVue,
267
- propsData: { type: defaultRouteTypeProp },
268
- stubs: {
269
- routerLink: createChildRenderingRouterLinkStub(),
270
- Favorite: { template: `<div class=${ favoriteClass } />` }
325
+ props: { type: defaultRouteTypeProp },
326
+
327
+ global: {
328
+ directives: { cleanHtml: (identity) => identity },
329
+
330
+ mocks: { $store: storeMock },
331
+
332
+ stubs: {
333
+ routerLink: createChildRenderingRouterLinkStub(),
334
+ Favorite: { template: `<div class=${ favoriteClass } />` }
335
+ },
271
336
  },
272
- mocks: { $store: storeMock }
273
337
  });
274
338
 
275
339
  const typeCount = wrapper.find(`span[data-testid="type-count"]`);
@@ -279,21 +343,26 @@ describe('component: Type', () => {
279
343
 
280
344
  it('should not show count if not in type or store', async() => {
281
345
  const wrapper = shallowMount(Type as any, {
282
- localVue,
283
- propsData: { type: defaultRouteTypeProp },
284
- stubs: {
285
- routerLink: createChildRenderingRouterLinkStub(),
286
- Favorite: { template: `<div class=${ favoriteClass } />` }
287
- },
288
- mocks: {
346
+ props: { type: defaultRouteTypeProp },
347
+
348
+ global: {
349
+ directives: { cleanHtml: (identity) => identity },
289
350
 
290
- $store: {
291
- getters: {
292
- currentStore: () => 'cluster',
293
- 'cluster/count': () => null,
351
+ mocks: {
352
+
353
+ $store: {
354
+ getters: {
355
+ currentStore: () => 'cluster',
356
+ 'cluster/count': () => null,
357
+ }
294
358
  }
295
- }
296
- }
359
+ },
360
+
361
+ stubs: {
362
+ routerLink: createChildRenderingRouterLinkStub(),
363
+ Favorite: { template: `<div class=${ favoriteClass } />` }
364
+ },
365
+ },
297
366
  });
298
367
 
299
368
  const typeCount = wrapper.find(`span[data-testid="type-count"]`);
@@ -305,13 +374,18 @@ describe('component: Type', () => {
305
374
  describe('should handle namespace appropriately', () => {
306
375
  it('should show namespace if on type', async() => {
307
376
  const wrapper = shallowMount(Type as any, {
308
- localVue,
309
- propsData: { type: { ...defaultRouteTypeProp, namespaced: true } },
310
- stubs: {
311
- routerLink: createChildRenderingRouterLinkStub(),
312
- Favorite: { template: `<div class=${ favoriteClass } />` }
377
+ props: { type: { ...defaultRouteTypeProp, namespaced: true } },
378
+
379
+ global: {
380
+ directives: { cleanHtml: (identity) => identity },
381
+
382
+ mocks: { $store: storeMock },
383
+
384
+ stubs: {
385
+ routerLink: createChildRenderingRouterLinkStub(),
386
+ Favorite: { template: `<div class=${ favoriteClass } />` }
387
+ },
313
388
  },
314
- mocks: { $store: storeMock }
315
389
  });
316
390
 
317
391
  const namespaced = wrapper.find(`i[data-testid="type-namespaced"]`);
@@ -321,13 +395,18 @@ describe('component: Type', () => {
321
395
 
322
396
  it('should not show namespace if not on type', async() => {
323
397
  const wrapper = shallowMount(Type as any, {
324
- localVue,
325
- propsData: { type: { ...defaultRouteTypeProp, namespaced: false } },
326
- stubs: {
327
- routerLink: createChildRenderingRouterLinkStub(),
328
- Favorite: { template: `<div class=${ favoriteClass } />` }
398
+ props: { type: { ...defaultRouteTypeProp, namespaced: false } },
399
+
400
+ global: {
401
+ directives: { cleanHtml: (identity) => identity },
402
+
403
+ mocks: { $store: storeMock },
404
+
405
+ stubs: {
406
+ routerLink: createChildRenderingRouterLinkStub(),
407
+ Favorite: { template: `<div class=${ favoriteClass } />` }
408
+ },
329
409
  },
330
- mocks: { $store: storeMock }
331
410
  });
332
411
 
333
412
  const namespaced = wrapper.find(`i[data-testid="type-namespaced"]`);
@@ -346,10 +425,14 @@ describe('component: Type', () => {
346
425
  };
347
426
 
348
427
  const wrapper = shallowMount(Type as any, {
349
- propsData: { type: defaultLinkTypeProp },
350
- stubs: {
351
- routerLink: createChildRenderingRouterLinkStub(),
352
- Favorite: { template: `<div class=${ favoriteClass } />` }
428
+ props: { type: defaultLinkTypeProp },
429
+ global: {
430
+ directives: { cleanHtml: (identity) => identity },
431
+
432
+ stubs: {
433
+ routerLink: createChildRenderingRouterLinkStub(),
434
+ Favorite: { template: `<div class=${ favoriteClass } />` }
435
+ },
353
436
  },
354
437
  });
355
438
 
@@ -1,12 +1,33 @@
1
1
  <template>
2
2
  <transition appear>
3
- <div v-if="building" class="nuxt__build_indicator" :style="indicatorStyle">
4
- <svg viewBox="0 0 96 72" version="1" xmlns="http://www.w3.org/2000/svg">
5
- <g fill="none" fill-rule="evenodd">
3
+ <div
4
+ v-if="building"
5
+ class="nuxt__build_indicator"
6
+ :style="indicatorStyle"
7
+ >
8
+ <svg
9
+ viewBox="0 0 96 72"
10
+ version="1"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ >
13
+ <g
14
+ fill="none"
15
+ fill-rule="evenodd"
16
+ >
6
17
  <path d="M6 66h23l1-3 21-37L40 6 6 66zM79 66h11L62 17l-5 9 22 37v3zM54 31L35 66h38z" />
7
- <path d="M29 69v-1-2H6L40 6l11 20 3-6L44 3s-2-3-4-3-3 1-5 3L1 63c0 1-2 3 0 6 0 1 2 2 5 2h28c-3 0-4-1-5-2z" fill="#00C58E" />
8
- <path d="M95 63L67 14c0-1-2-3-5-3-1 0-3 0-4 3l-4 6 3 6 5-9 28 49H79a5 5 0 0 1 0 3c-2 2-5 2-5 2h16c1 0 4 0 5-2 1-1 2-3 0-6z" fill="#00C58E" />
9
- <path d="M79 69v-1-2-3L57 26l-3-6-3 6-21 37-1 3a5 5 0 0 0 0 3c1 1 2 2 5 2h40s3 0 5-2zM54 31l19 35H35l19-35z" fill="#FFF" fill-rule="nonzero" />
18
+ <path
19
+ d="M29 69v-1-2H6L40 6l11 20 3-6L44 3s-2-3-4-3-3 1-5 3L1 63c0 1-2 3 0 6 0 1 2 2 5 2h28c-3 0-4-1-5-2z"
20
+ fill="#00C58E"
21
+ />
22
+ <path
23
+ d="M95 63L67 14c0-1-2-3-5-3-1 0-3 0-4 3l-4 6 3 6 5-9 28 49H79a5 5 0 0 1 0 3c-2 2-5 2-5 2h16c1 0 4 0 5-2 1-1 2-3 0-6z"
24
+ fill="#00C58E"
25
+ />
26
+ <path
27
+ d="M79 69v-1-2-3L57 26l-3-6-3 6-21 37-1 3a5 5 0 0 0 0 3c1 1 2 2 5 2h40s3 0 5-2zM54 31l19 35H35l19-35z"
28
+ fill="#FFF"
29
+ fill-rule="nonzero"
30
+ />
10
31
  </g>
11
32
  </svg>
12
33
  {{ animatedProgress }}%
@@ -17,97 +38,103 @@
17
38
  <script>
18
39
  export default {
19
40
  name: 'NuxtBuildIndicator',
20
- data () {
41
+ data() {
21
42
  return {
22
- building: false,
23
- progress: 0,
24
- animatedProgress: 0,
43
+ building: false,
44
+ progress: 0,
45
+ animatedProgress: 0,
25
46
  reconnectAttempts: 0
26
- }
47
+ };
27
48
  },
28
49
  computed: {
29
- options: () => ({"position":"bottom-right","backgroundColor":"#2E495E","color":"#00C48D"}),
30
- indicatorStyle () {
31
- const [d1, d2] = this.options.position.split('-')
50
+ options: () => ({
51
+ position: 'bottom-right', backgroundColor: '#2E495E', color: '#00C48D'
52
+ }),
53
+ indicatorStyle() {
54
+ const [d1, d2] = this.options.position.split('-');
55
+
32
56
  return {
33
- [d1]: '20px',
34
- [d2]: '20px',
57
+ [d1]: '20px',
58
+ [d2]: '20px',
35
59
  'background-color': this.options.backgroundColor,
36
- color: this.options.color
37
- }
60
+ color: this.options.color
61
+ };
38
62
  }
39
63
  },
40
64
  watch: {
41
- progress (val, oldVal) {
65
+ progress(val, oldVal) {
42
66
  // Average progress may decrease but ignore it!
43
67
  if (val < oldVal) {
44
- return
68
+ return;
45
69
  }
46
70
  // Cancel old animation
47
- clearInterval(this._progressAnimation)
71
+ clearInterval(this._progressAnimation);
48
72
  // Jump to edge immediately
49
73
  if (val < 10 || val > 90) {
50
- this.animatedProgress = val
51
- return
74
+ this.animatedProgress = val;
75
+
76
+ return;
52
77
  }
53
78
  // Animate to value
54
79
  this._progressAnimation = setInterval(() => {
55
- const diff = this.progress - this.animatedProgress
80
+ const diff = this.progress - this.animatedProgress;
81
+
56
82
  if (diff > 0) {
57
- this.animatedProgress++
83
+ this.animatedProgress++;
58
84
  } else {
59
- clearInterval(this._progressAnimation)
85
+ clearInterval(this._progressAnimation);
60
86
  }
61
- }, 50)
87
+ }, 50);
62
88
  }
63
89
  },
64
- mounted () {
90
+ mounted() {
65
91
  if (EventSource === undefined) {
66
- return // Unsupported
92
+ return; // Unsupported
67
93
  }
68
- this.sseConnect()
94
+ this.sseConnect();
69
95
  },
70
- beforeDestroy () {
71
- this.sseClose()
72
- clearInterval(this._progressAnimation)
96
+ beforeUnmount() {
97
+ this.sseClose();
98
+ clearInterval(this._progressAnimation);
73
99
  },
74
100
  methods: {
75
- sseConnect () {
101
+ sseConnect() {
76
102
  if (this._connecting) {
77
- return
103
+ return;
78
104
  }
79
- this._connecting = true
80
- this.sse = new EventSource('/_loading/sse')
81
- this.sse.addEventListener('message', event => this.onSseMessage(event))
105
+ this._connecting = true;
106
+ this.sse = new EventSource('/_loading/sse');
107
+ this.sse.addEventListener('message', (event) => this.onSseMessage(event));
82
108
  },
83
- onSseMessage (message) {
84
- const data = JSON.parse(message.data)
109
+ onSseMessage(message) {
110
+ const data = JSON.parse(message.data);
111
+
85
112
  if (!data.states) {
86
- return
113
+ return;
87
114
  }
88
115
 
89
- this.progress = Math.round(data.states.reduce((p, s) => p + s.progress, 0) / data.states.length)
116
+ this.progress = Math.round(data.states.reduce((p, s) => p + s.progress, 0) / data.states.length);
90
117
 
91
118
  if (!data.allDone) {
92
- this.building = true
119
+ this.building = true;
93
120
  } else {
94
121
  this.$nextTick(() => {
95
- this.building = false
96
- this.animatedProgress = 0
97
- this.progress = 0
98
- clearInterval(this._progressAnimation)
99
- })
122
+ this.building = false;
123
+ this.animatedProgress = 0;
124
+ this.progress = 0;
125
+ clearInterval(this._progressAnimation);
126
+ });
100
127
  }
101
128
  },
102
129
 
103
- sseClose () {
130
+ sseClose() {
104
131
  if (this.sse) {
105
- this.sse.close()
106
- delete this.sse
132
+ this.sse.close();
133
+ delete this.sse;
107
134
  }
108
135
  }
109
136
  }
110
- }
137
+ };
111
138
  </script>
112
139
 
113
140
  <style scoped>