@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.
- package/assets/styles/global/_labeled-input.scss +22 -11
- package/assets/styles/global/_layout.scss +4 -4
- package/assets/styles/global/_tooltip.scss +4 -3
- package/assets/translations/en-us.yaml +44 -8
- package/chart/__tests__/S3.test.ts +21 -14
- package/chart/example.vue +1 -1
- package/chart/gatekeeper.vue +4 -4
- package/chart/istio.vue +11 -11
- package/chart/logging/index.vue +8 -8
- package/chart/monitoring/ClusterSelector.vue +13 -13
- package/chart/monitoring/alerting/index.vue +6 -6
- package/chart/monitoring/grafana/index.vue +14 -14
- package/chart/monitoring/index.vue +122 -108
- package/chart/monitoring/prometheus/index.vue +18 -18
- package/chart/rancher-backup/S3.vue +11 -11
- package/chart/rancher-backup/index.vue +68 -60
- package/cloud-credential/__tests__/azure.test.ts +7 -17
- package/cloud-credential/__tests__/harvester.test.ts +2 -2
- package/cloud-credential/aws.vue +3 -3
- package/cloud-credential/azure.vue +4 -4
- package/cloud-credential/digitalocean.vue +1 -1
- package/cloud-credential/gcp.vue +1 -1
- package/cloud-credential/generic.vue +1 -1
- package/cloud-credential/harvester.vue +1 -1
- package/cloud-credential/linode.vue +1 -1
- package/cloud-credential/pnap.vue +2 -2
- package/cloud-credential/s3.vue +8 -8
- package/cloud-credential/vmwarevsphere.vue +4 -4
- package/components/ActionDropdown.vue +3 -3
- package/components/ActionMenu.vue +1 -1
- package/components/AlertTable.vue +18 -8
- package/components/AppModal.vue +20 -9
- package/components/AssignTo.vue +38 -37
- package/components/AsyncButton.vue +4 -7
- package/components/ButtonDropdown.vue +14 -13
- package/components/ButtonGroup.vue +1 -1
- package/components/Carousel.vue +1 -1
- package/components/Certificates.vue +1 -1
- package/components/ChartReadme.vue +7 -7
- package/components/CodeMirror.vue +2 -2
- package/components/CommunityLinks.vue +2 -2
- package/components/ConsumptionGauge.vue +1 -1
- package/components/ContainerResourceLimit.vue +11 -11
- package/components/CountGauge.vue +1 -1
- package/components/CreateDriver.vue +4 -4
- package/components/CruResource.vue +34 -20
- package/components/DashboardMetrics.vue +3 -3
- package/components/DashboardOptions.vue +3 -3
- package/components/DetailTop.vue +3 -3
- package/components/DisableAuthProviderModal.vue +7 -8
- package/components/EmberPage.vue +1 -1
- package/components/EtcdInfoBanner.vue +1 -1
- package/components/ExplorerMembers.vue +8 -9
- package/components/ExplorerProjectsNamespaces.vue +6 -7
- package/components/FileDiff.vue +1 -1
- package/components/FixedBanner.vue +1 -0
- package/components/GlobalRoleBindings.vue +5 -6
- package/components/GradientBox.vue +1 -2
- package/components/GrafanaDashboard.vue +13 -11
- package/components/GrowlManager.vue +1 -1
- package/components/HarvesterServiceAddOnConfig.vue +2 -2
- package/components/IconOrSvg.vue +1 -2
- package/components/Import.vue +4 -3
- package/components/Inactivity.vue +2 -2
- package/components/IndentedPanel.vue +0 -1
- package/components/InputOrDisplay.vue +3 -2
- package/components/KeyValueView.vue +4 -3
- package/components/LandingPagePreference.vue +3 -2
- package/components/LazyImage.vue +1 -1
- package/components/Loading.vue +1 -1
- package/components/LocaleSelector.vue +4 -4
- package/components/Markdown.vue +1 -1
- package/components/ModalWithCard.vue +1 -4
- package/components/MoveModal.vue +10 -11
- package/components/PercentageBar.vue +7 -7
- package/components/PodSecurityAdmission.vue +13 -13
- package/components/PromptChangePassword.vue +9 -9
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +35 -37
- package/components/PromptRestore.vue +68 -69
- package/components/Questions/Array.vue +3 -4
- package/components/Questions/Boolean.vue +1 -1
- package/components/Questions/CloudCredential.vue +1 -1
- package/components/Questions/Enum.vue +1 -1
- package/components/Questions/Float.vue +1 -1
- package/components/Questions/Int.vue +1 -1
- package/components/Questions/Question.js +1 -1
- package/components/Questions/QuestionMap.vue +3 -4
- package/components/Questions/Radio.vue +1 -1
- package/components/Questions/Reference.vue +2 -2
- package/components/Questions/String.vue +1 -1
- package/components/Questions/Yaml.vue +1 -1
- package/components/Questions/__tests__/Boolean.test.ts +26 -13
- package/components/Questions/__tests__/Float.test.ts +26 -13
- package/components/Questions/__tests__/Int.test.ts +26 -13
- package/components/Questions/__tests__/String.test.ts +26 -13
- package/components/Questions/__tests__/Yaml.test.ts +26 -14
- package/components/Questions/index.vue +10 -10
- package/components/Random.vue +1 -1
- package/components/ResourceDetail/Masthead.vue +7 -2
- package/components/ResourceDetail/index.vue +6 -3
- package/components/ResourceList/Masthead.vue +4 -0
- package/components/ResourceList/index.vue +10 -4
- package/components/ResourceSummary.vue +1 -1
- package/components/ResourceTable.vue +4 -5
- package/components/ResourceYaml.vue +1 -2
- package/components/RoleBindings.vue +3 -3
- package/components/SideNav.vue +8 -6
- package/components/SimpleBox.vue +0 -1
- package/components/SortableTable/THead.vue +5 -5
- package/components/SortableTable/index.vue +21 -20
- package/components/SortableTable/sortable-config.ts +4 -0
- package/components/StatusTable.vue +1 -1
- package/components/TabTitle.vue +3 -9
- package/components/Tabbed/Tab.vue +1 -1
- package/components/Tabbed/index.vue +2 -4
- package/components/Wizard.vue +8 -3
- package/components/YamlEditor.vue +4 -4
- package/components/__tests__/AppModal.test.ts +33 -25
- package/components/__tests__/ApplicationCard.test.ts +1 -1
- package/components/__tests__/AsyncButton.test.ts +42 -34
- package/components/__tests__/BackLink.test.ts +3 -3
- package/components/__tests__/ButtonGroup.test.ts +5 -5
- package/components/__tests__/Carousel.test.ts +2 -2
- package/components/__tests__/Certificates.test.ts +10 -8
- package/components/__tests__/ClusterBadge.test.ts +2 -2
- package/components/__tests__/CodeMirror.test.ts +94 -85
- package/components/__tests__/Collapse.test.ts +3 -3
- package/components/__tests__/CollapsibleCard.test.ts +6 -6
- package/components/__tests__/ConsumptionGauge.test.ts +6 -6
- package/components/__tests__/CruResource.test.ts +67 -56
- package/components/__tests__/EtcdInfoBanner.test.ts +11 -9
- package/components/__tests__/FixedBanner.test.ts +8 -8
- package/components/__tests__/GrowlManager.test.ts +24 -25
- package/components/__tests__/NamespaceFilter.test.ts +48 -34
- package/components/__tests__/PercentageBar.test.ts +10 -10
- package/components/__tests__/PodSecurityAdmission.test.ts +80 -38
- package/components/__tests__/ProjectRow.test.ts +1 -5
- package/components/__tests__/PromptRestore.test.ts +15 -18
- package/components/__tests__/TabTitle.test.ts +21 -14
- package/components/auth/AllowedPrincipals.vue +4 -5
- package/components/auth/RoleDetailEdit.vue +31 -29
- package/components/auth/SelectPrincipal.vue +2 -4
- package/components/auth/__tests__/RoleDetailEdit.test.ts +18 -14
- package/components/auth/login/ldap.vue +2 -2
- package/components/fleet/FleetClusters.vue +0 -1
- package/components/fleet/FleetRepos.vue +0 -1
- package/components/fleet/FleetStatus.vue +3 -3
- package/components/fleet/__tests__/FleetSummary.test.ts +8 -2
- package/components/form/ArrayList.vue +5 -6
- package/components/form/ArrayListGrouped.vue +2 -2
- package/components/form/ArrayListSelect.vue +4 -4
- package/components/form/BannerSettings.vue +10 -10
- package/components/form/ChangePassword.vue +9 -9
- package/components/form/ColorInput.vue +2 -2
- package/components/form/Command.vue +13 -15
- package/components/form/EnvVars.vue +7 -7
- package/components/form/FileImageSelector.vue +1 -1
- package/components/form/GitPicker.vue +7 -7
- package/components/form/HealthCheck.vue +4 -4
- package/components/form/HookOption.vue +13 -13
- package/components/form/InputWithSelect.vue +19 -13
- package/components/form/KeyValue.vue +14 -14
- package/components/form/LabeledSelect.vue +45 -35
- package/components/form/Labels.vue +3 -3
- package/components/form/LifecycleHooks.vue +5 -7
- package/components/form/MatchExpressions.vue +7 -7
- package/components/form/Members/ClusterMembershipEditor.vue +1 -2
- package/components/form/Members/ClusterPermissionsEditor.vue +9 -9
- package/components/form/Members/MembershipEditor.vue +4 -5
- package/components/form/Members/ProjectMembershipEditor.vue +1 -2
- package/components/form/NameNsDescription.vue +12 -13
- package/components/form/Networking.vue +17 -17
- package/components/form/NodeAffinity.vue +9 -10
- package/components/form/NodeScheduling.vue +7 -7
- package/components/form/NotificationSettings.vue +2 -2
- package/components/form/Password.vue +2 -2
- package/components/form/PodAffinity.vue +21 -23
- package/components/form/PodSecurity.vue +6 -6
- package/components/form/Ports.vue +5 -5
- package/components/form/Probe.vue +20 -20
- package/components/form/ProjectMemberEditor.vue +9 -9
- package/components/form/ResourceLabeledSelect.vue +11 -4
- package/components/form/ResourceQuota/Namespace.vue +3 -3
- package/components/form/ResourceQuota/NamespaceRow.vue +3 -3
- package/components/form/ResourceQuota/Project.vue +7 -6
- package/components/form/ResourceQuota/ProjectRow.vue +113 -114
- package/components/form/ResourceSelector.vue +3 -3
- package/components/form/ResourceTabs/index.vue +1 -1
- package/components/form/RuleSelector.vue +7 -6
- package/components/form/SecretSelector.vue +5 -6
- package/components/form/Security.vue +14 -14
- package/components/form/Select.vue +21 -11
- package/components/form/SelectOrCreateAuthSecret.vue +30 -27
- package/components/form/ServiceNameSelect.vue +8 -5
- package/components/form/ServicePorts.vue +4 -4
- package/components/form/ShellInput.vue +3 -3
- package/components/form/SimpleSecretSelector.vue +2 -2
- package/components/form/Taints.vue +18 -11
- package/components/form/Tolerations.vue +12 -12
- package/components/form/UnitInput.vue +1 -1
- package/components/form/ValueFromResource.vue +17 -17
- package/components/form/WorkloadPorts.vue +21 -21
- package/components/form/__tests__/ArrayList.test.ts +14 -11
- package/components/form/__tests__/ArrayListGrouped.test.ts +4 -4
- package/components/form/__tests__/BannerSettings.test.ts +6 -5
- package/components/form/__tests__/Command.test.ts +12 -12
- package/components/form/__tests__/Error.test.ts +5 -5
- package/components/form/__tests__/FileImageSelector.test.ts +5 -5
- package/components/form/__tests__/FileSelector.test.ts +9 -9
- package/components/form/__tests__/InputWithSelect.test.ts +42 -0
- package/components/form/__tests__/KeyValue.test.ts +28 -18
- package/components/form/__tests__/LabeledSelect.test.ts +9 -9
- package/components/form/__tests__/MatchExpressions.test.ts +10 -10
- package/components/form/__tests__/NameNsDescription.test.ts +28 -25
- package/components/form/__tests__/NodeAffinity.test.ts +4 -3
- package/components/form/__tests__/PodAffinity.test.ts +4 -3
- package/components/form/__tests__/Probe.test.ts +6 -6
- package/components/form/__tests__/Security.test.ts +6 -6
- package/components/form/__tests__/Select.test.ts +30 -0
- package/components/form/__tests__/ServiceNameSelect.test.ts +42 -0
- package/components/form/__tests__/Taints.test.ts +71 -0
- package/components/form/__tests__/UnitInput.test.ts +20 -24
- package/components/form/labeled-select-utils/labeled-select.utils.ts +1 -1
- package/components/formatter/AppSummaryGraph.vue +4 -4
- package/components/formatter/ClusterLink.vue +1 -1
- package/components/formatter/Endpoints.vue +4 -1
- package/components/formatter/FleetSummaryGraph.vue +4 -4
- package/components/formatter/ListLink.vue +1 -1
- package/components/formatter/ListLinkDetail.vue +2 -2
- package/components/formatter/LiveExpiryBadgeState.vue +18 -5
- package/components/formatter/LiveExpiryDate.vue +1 -1
- package/components/formatter/MachineSummaryGraph.vue +4 -4
- package/components/formatter/PercentageBar.vue +1 -1
- package/components/formatter/Principal.vue +0 -1
- package/components/formatter/PrincipalGroupBindings.vue +5 -5
- package/components/formatter/ReceiverIcons.vue +5 -3
- package/components/formatter/Scale.vue +4 -4
- package/components/formatter/ServiceTargets.vue +1 -1
- package/components/formatter/VirtualServiceGateways.vue +1 -1
- package/components/formatter/Weight.vue +2 -2
- package/components/formatter/WorkloadDetailEndpoints.vue +4 -1
- package/components/formatter/WorkloadHealthScale.vue +5 -6
- package/components/formatter/__tests__/Checked.test.ts +2 -2
- package/components/formatter/__tests__/ClusterLink.test.ts +3 -3
- package/components/formatter/__tests__/Date.test.ts +8 -8
- package/components/formatter/__tests__/LinkDetail.test.ts +10 -10
- package/components/formatter/__tests__/LiveDate.test.ts +21 -15
- package/components/formatter/__tests__/PodsUsage.test.ts +5 -5
- package/components/formatter/__tests__/Si.test.ts +3 -3
- package/components/formatter/__tests__/WorkloadDetailEndpoints.test.ts +5 -5
- package/components/graph/LinePlot.vue +1 -2
- package/components/nav/Group.vue +11 -6
- package/components/nav/Header.vue +162 -128
- package/components/nav/Jump.vue +1 -1
- package/components/nav/NamespaceFilter.vue +1 -1
- package/components/nav/TopLevelMenu.vue +15 -18
- package/components/nav/Type.vue +7 -7
- package/components/nav/WindowManager/ContainerLogs.vue +53 -38
- package/components/nav/WindowManager/ContainerShell.vue +38 -37
- package/components/nav/WindowManager/Window.vue +1 -1
- package/components/nav/WindowManager/__tests__/ContainerLogs.test.ts +192 -184
- package/components/nav/WindowManager/__tests__/ContainerShell.test.ts +21 -17
- package/components/nav/WindowManager/index.vue +4 -4
- package/components/nav/WorkspaceSwitcher.vue +16 -16
- package/components/nav/__tests__/TopLevelMenu.test.ts +354 -308
- package/components/nav/__tests__/Type.test.ts +194 -111
- package/components/nuxt/nuxt-build-indicator.vue +79 -52
- package/components/nuxt/nuxt-child.js +24 -25
- package/components/nuxt/nuxt-error.vue +48 -18
- package/components/nuxt/nuxt-link.client.js +4 -3
- package/components/nuxt/nuxt-loading.vue +96 -85
- package/components/templates/blank.vue +0 -1
- package/components/templates/default.vue +0 -4
- package/components/templates/home.vue +4 -4
- package/components/templates/plain.vue +3 -2
- package/composables/useI18n.ts +1 -1
- package/composables/useLabeledFormElement.ts +12 -1
- package/composables/useUserRetentionValidation.test.ts +178 -0
- package/composables/useUserRetentionValidation.ts +201 -0
- package/config/__test__/home-links.test.ts +2 -7
- package/config/pagination-table-headers.js +5 -4
- package/config/product/auth.js +1 -1
- package/config/query-params.js +1 -0
- package/config/roles.ts +34 -19
- package/config/router/index.js +10 -7
- package/config/router/navigation-guards/attempt-first-login.js +1 -1
- package/config/router/navigation-guards/authentication.js +2 -1
- package/{middleware/authenticated.js → config/router/navigation-guards/clusters.js} +28 -86
- package/config/router/navigation-guards/history.js +13 -0
- package/config/router/navigation-guards/i18n.js +13 -0
- package/config/router/navigation-guards/index.js +9 -1
- package/config/router/navigation-guards/install-redirect.js +95 -0
- package/config/router/navigation-guards/load-initial-settings.js +1 -1
- package/config/router/navigation-guards/page-title.js +12 -0
- package/config/router/navigation-guards/products.js +15 -0
- package/config/router/navigation-guards/runtime-extension-route.js +31 -0
- package/config/router/navigation-guards/server-upgrade-growl.js +19 -0
- package/config/router/routes.js +49 -23
- package/config/settings.ts +1 -1
- package/config/store.js +2 -5
- package/config/types.js +18 -0
- package/config/uiplugins.js +2 -2
- package/core/plugin-routes.ts +11 -14
- package/core/plugin.ts +10 -10
- package/core/plugins-loader.js +1 -3
- package/core/plugins.js +7 -1
- package/core/types.ts +7 -7
- package/detail/__tests__/autoscaling.horizontalpodautoscaler.test.ts +3 -3
- package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +46 -4
- package/detail/__tests__/service.test.ts +6 -6
- package/detail/autoscaling.horizontalpodautoscaler/index.vue +6 -5
- package/detail/catalog.cattle.io.app.vue +2 -2
- package/detail/cis.cattle.io.clusterscan.vue +3 -3
- package/detail/configmap.vue +4 -1
- package/detail/fleet.cattle.io.cluster.vue +2 -1
- package/detail/fleet.cattle.io.clustergroup.vue +2 -1
- package/detail/fleet.cattle.io.gitrepo.vue +2 -1
- package/detail/harvesterhci.io.management.cluster.vue +2 -1
- package/detail/helm.cattle.io.projecthelmchart.vue +3 -3
- package/detail/management.cattle.io.user.vue +2 -1
- package/detail/namespace.vue +2 -1
- package/detail/networking.k8s.io.ingress.vue +4 -2
- package/detail/node.vue +2 -1
- package/detail/provisioning.cattle.io.cluster.vue +10 -11
- package/detail/secret.vue +3 -2
- package/detail/service.vue +2 -1
- package/detail/workload/index.vue +1 -19
- package/dialog/AddClusterMemberDialog.vue +30 -31
- package/dialog/AddCustomBadgeDialog.vue +101 -104
- package/dialog/AddProjectMemberDialog.vue +45 -46
- package/dialog/AddonConfigConfirmationDialog.vue +22 -24
- package/dialog/DeactivateDriverDialog.vue +35 -17
- package/dialog/DiagnosticTimingsDialog.vue +29 -29
- package/dialog/DrainNode.vue +245 -249
- package/dialog/ForceMachineRemoveDialog.vue +32 -34
- package/dialog/GenericPrompt.vue +23 -25
- package/dialog/RollbackWorkloadDialog.vue +68 -71
- package/dialog/RotateCertificatesDialog.vue +17 -18
- package/dialog/RotateEncryptionKeyDialog.vue +46 -47
- package/dialog/SaveAsRKETemplateDialog.vue +46 -47
- package/dialog/ScaleMachineDownDialog.vue +3 -3
- package/dialog/ScalePoolDownDialog.vue +22 -24
- package/dialog/SloDialog.vue +95 -0
- package/directives/clean-html.js +3 -3
- package/directives/clean-tooltip.js +1 -1
- package/directives/focus.js +17 -11
- package/directives/int-number.js +2 -2
- package/directives/positive-int-number.js +2 -2
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +7 -13
- package/edit/__tests__/kontainerDriver.test.ts +23 -20
- package/edit/__tests__/management.cattle.io.clusterroletemplatebinding.test.ts +31 -29
- package/edit/__tests__/management.cattle.io.setting.test.ts +20 -18
- package/edit/__tests__/monitoring.coreos.com.prometheusrule.test.ts +17 -15
- package/edit/__tests__/namespace.test.ts +29 -26
- package/edit/__tests__/nodeDriver.test.ts +35 -53
- package/edit/__tests__/service.test.ts +20 -17
- package/edit/__tests__/ui.cattle.io.navlink.test.ts +22 -20
- package/edit/auth/__tests__/AuthProviderWarningBanners.test.ts +2 -2
- package/edit/auth/__tests__/azuread.test.ts +43 -45
- package/edit/auth/__tests__/oidc.test.ts +38 -41
- package/edit/auth/azuread.vue +16 -23
- package/edit/auth/github.vue +6 -6
- package/edit/auth/googleoauth.vue +7 -7
- package/edit/auth/ldap/config.vue +29 -29
- package/edit/auth/ldap/index.vue +5 -5
- package/edit/auth/oidc.vue +18 -18
- package/edit/auth/saml.vue +94 -24
- package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +7 -7
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +18 -16
- package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +3 -3
- package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +3 -3
- package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +12 -12
- package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +5 -5
- package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +3 -3
- package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
- package/edit/catalog.cattle.io.clusterrepo.vue +31 -32
- package/edit/cis.cattle.io.clusterscan.vue +9 -9
- package/edit/cis.cattle.io.clusterscanbenchmark.vue +7 -7
- package/edit/cis.cattle.io.clusterscanprofile.vue +3 -3
- package/edit/cloudcredential.vue +13 -8
- package/edit/configmap.vue +7 -7
- package/edit/constraints.gatekeeper.sh.constraint/MatchKinds.vue +3 -3
- package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +1 -1
- package/edit/constraints.gatekeeper.sh.constraint/Scope.vue +1 -1
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +21 -22
- package/edit/fleet.cattle.io.cluster.vue +2 -1
- package/edit/fleet.cattle.io.clustergroup.vue +3 -2
- package/edit/fleet.cattle.io.gitrepo.vue +18 -18
- package/edit/helm.cattle.io.projecthelmchart.vue +4 -4
- package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +3 -2
- package/edit/logging-flow/Match.vue +4 -4
- package/edit/logging-flow/index.vue +11 -10
- package/edit/logging.banzaicloud.io.output/__tests__/logging.banzaicloud.io.output.test.ts +79 -73
- package/edit/logging.banzaicloud.io.output/index.vue +4 -4
- package/edit/logging.banzaicloud.io.output/providers/__tests__/loki.test.ts +1 -1
- package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +5 -5
- package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +6 -6
- package/edit/logging.banzaicloud.io.output/providers/datadog.vue +4 -4
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +16 -16
- package/edit/logging.banzaicloud.io.output/providers/file.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/forward.vue +9 -9
- package/edit/logging.banzaicloud.io.output/providers/gcs.vue +5 -5
- package/edit/logging.banzaicloud.io.output/providers/gelf.vue +14 -14
- package/edit/logging.banzaicloud.io.output/providers/kafka.vue +10 -10
- package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/logdna.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/logz.vue +5 -5
- package/edit/logging.banzaicloud.io.output/providers/loki.vue +10 -10
- package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +15 -15
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +5 -5
- package/edit/logging.banzaicloud.io.output/providers/s3.vue +7 -7
- package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +12 -12
- package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +2 -2
- package/edit/logging.banzaicloud.io.output/providers/syslog.vue +19 -19
- package/edit/management.cattle.io.clusterroletemplatebinding.vue +1 -1
- package/edit/management.cattle.io.fleetworkspace.vue +6 -4
- package/edit/management.cattle.io.node.vue +1 -1
- package/edit/management.cattle.io.project.vue +13 -10
- package/edit/management.cattle.io.projectroletemplatebinding.vue +3 -3
- package/edit/management.cattle.io.setting.vue +6 -6
- package/edit/management.cattle.io.user.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +2 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +5 -5
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +11 -11
- package/edit/monitoring.coreos.com.alertmanagerconfig/tls.vue +2 -2
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +10 -9
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +5 -5
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +5 -5
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +9 -9
- package/edit/monitoring.coreos.com.prometheusrule/AlertingRule.vue +36 -36
- package/edit/monitoring.coreos.com.prometheusrule/RecordingRule.vue +4 -4
- package/edit/monitoring.coreos.com.prometheusrule/index.vue +9 -9
- package/edit/monitoring.coreos.com.receiver/auth.vue +9 -9
- package/edit/monitoring.coreos.com.receiver/index.vue +8 -8
- package/edit/monitoring.coreos.com.receiver/tls.vue +4 -4
- package/edit/monitoring.coreos.com.receiver/types/__tests__/email.test.ts +20 -16
- package/edit/monitoring.coreos.com.receiver/types/email.vue +12 -11
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +11 -11
- package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +6 -6
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +6 -6
- package/edit/monitoring.coreos.com.receiver/types/webhook.vue +7 -7
- package/edit/monitoring.coreos.com.route.vue +10 -10
- package/edit/namespace.vue +7 -7
- package/edit/networking.istio.io.destinationrule/LoadBalancer.vue +12 -12
- package/edit/networking.istio.io.destinationrule/index.vue +15 -15
- package/edit/networking.k8s.io.ingress/Certificate.vue +5 -5
- package/edit/networking.k8s.io.ingress/Certificates.vue +2 -2
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +18 -18
- package/edit/networking.k8s.io.ingress/IngressClass.vue +1 -1
- package/edit/networking.k8s.io.ingress/Rule.vue +9 -7
- package/edit/networking.k8s.io.ingress/RulePath.vue +10 -10
- package/edit/networking.k8s.io.ingress/Rules.vue +3 -3
- package/edit/networking.k8s.io.ingress/index.vue +12 -8
- package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +4 -4
- package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +1 -1
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +47 -32
- package/edit/networking.k8s.io.networkpolicy/PolicyRules.vue +3 -3
- package/edit/networking.k8s.io.networkpolicy/__tests__/PolicyRuleTarget.test.ts +27 -26
- package/edit/networking.k8s.io.networkpolicy/index.vue +16 -14
- package/edit/node.vue +3 -2
- package/edit/nodeDriver.vue +6 -1
- package/edit/persistentvolume/__tests__/persistentvolume.test.ts +56 -50
- package/edit/persistentvolume/index.vue +23 -23
- package/edit/persistentvolume/plugins/awsElasticBlockStore.vue +8 -8
- package/edit/persistentvolume/plugins/azureDisk.vue +10 -10
- package/edit/persistentvolume/plugins/azureFile.vue +6 -6
- package/edit/persistentvolume/plugins/cephfs.vue +10 -10
- package/edit/persistentvolume/plugins/cinder.vue +8 -8
- package/edit/persistentvolume/plugins/csi.vue +18 -18
- package/edit/persistentvolume/plugins/fc.vue +9 -9
- package/edit/persistentvolume/plugins/flexVolume.vue +9 -9
- package/edit/persistentvolume/plugins/flocker.vue +3 -3
- package/edit/persistentvolume/plugins/gcePersistentDisk.vue +8 -8
- package/edit/persistentvolume/plugins/glusterfs.vue +5 -5
- package/edit/persistentvolume/plugins/hostPath.vue +4 -4
- package/edit/persistentvolume/plugins/iscsi.vue +18 -18
- package/edit/persistentvolume/plugins/local.vue +2 -2
- package/edit/persistentvolume/plugins/longhorn.vue +8 -8
- package/edit/persistentvolume/plugins/nfs.vue +5 -5
- package/edit/persistentvolume/plugins/photonPersistentDisk.vue +5 -5
- package/edit/persistentvolume/plugins/portworxVolume.vue +6 -6
- package/edit/persistentvolume/plugins/quobyte.vue +7 -7
- package/edit/persistentvolume/plugins/rbd.vue +12 -12
- package/edit/persistentvolume/plugins/scaleIO.vue +15 -15
- package/edit/persistentvolume/plugins/storageos.vue +9 -9
- package/edit/persistentvolume/plugins/vsphereVolume.vue +5 -5
- package/edit/persistentvolumeclaim.vue +26 -25
- package/edit/policy.poddisruptionbudget.vue +12 -11
- package/edit/provisioning.cattle.io.cluster/AgentEnv.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +10 -10
- package/edit/provisioning.cattle.io.cluster/Labels.vue +12 -1
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +5 -5
- package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +40 -36
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +170 -78
- package/edit/provisioning.cattle.io.cluster/__tests__/CustomCommand.test.ts +16 -14
- package/edit/provisioning.cattle.io.cluster/__tests__/DirectoryConfig.test.ts +38 -8
- package/edit/provisioning.cattle.io.cluster/__tests__/DrainOptions.test.ts +14 -12
- package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +18 -19
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +285 -84
- package/edit/provisioning.cattle.io.cluster/import.vue +7 -4
- package/edit/provisioning.cattle.io.cluster/index.vue +32 -13
- package/edit/provisioning.cattle.io.cluster/rke2.vue +149 -78
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +5 -5
- package/edit/provisioning.cattle.io.cluster/tabs/Advanced.vue +10 -11
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +12 -11
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +62 -24
- package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +9 -9
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +12 -12
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +15 -15
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +6 -6
- package/edit/provisioning.cattle.io.cluster/tabs/networking/ACE.vue +3 -3
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +18 -9
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +16 -12
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryMirrors.vue +4 -4
- package/edit/provisioning.cattle.io.cluster/tabs/registries/__tests__/RegistryConfigs.test.ts +64 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +8 -6
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +15 -15
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/index.vue +4 -4
- package/edit/resources.cattle.io.backup.vue +9 -9
- package/edit/resources.cattle.io.restore.vue +11 -11
- package/edit/secret/basic.vue +2 -2
- package/edit/secret/generic.vue +1 -1
- package/edit/secret/index.vue +12 -10
- package/edit/secret/registry.vue +4 -4
- package/edit/secret/ssh.vue +2 -2
- package/edit/secret/tls.vue +2 -2
- package/edit/service.vue +23 -23
- package/edit/serviceaccount.vue +4 -4
- package/edit/storage.k8s.io.storageclass/index.vue +13 -13
- package/edit/storage.k8s.io.storageclass/provisioners/custom.vue +1 -1
- package/edit/storage.k8s.io.storageclass/provisioners/driver.harvesterhci.io.vue +2 -2
- package/edit/storage.k8s.io.storageclass/provisioners/driver.longhorn.io.vue +4 -4
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +12 -12
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/azure-disk.vue +3 -3
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/azure-file.vue +3 -3
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/cinder.vue +4 -4
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +6 -6
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/glusterfs.vue +9 -9
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/portworx-volume.vue +7 -7
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/quobyte.vue +8 -8
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/rbd.vue +11 -11
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/scaleio.vue +8 -8
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/storageos.vue +5 -5
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +7 -7
- package/edit/token.vue +6 -5
- package/edit/ui.cattle.io.navlink.vue +28 -27
- package/edit/workload/Job.vue +16 -16
- package/edit/workload/Upgrading.vue +16 -16
- package/edit/workload/VolumeClaimTemplate.vue +3 -3
- package/edit/workload/__tests__/Job.test.ts +8 -8
- package/edit/workload/__tests__/index.test.ts +32 -29
- package/edit/workload/index.vue +29 -28
- package/edit/workload/mixins/workload.js +30 -30
- package/edit/workload/storage/ContainerMountPaths.vue +3 -4
- package/edit/workload/storage/Mount.vue +3 -3
- package/edit/workload/storage/__tests__/Mount.test.ts +13 -13
- package/edit/workload/storage/__tests__/Storage.test.ts +26 -20
- package/edit/workload/storage/awsElasticBlockStore.vue +4 -4
- package/edit/workload/storage/azureDisk.vue +7 -7
- package/edit/workload/storage/azureFile.vue +5 -5
- package/edit/workload/storage/csi/driver.longhorn.io.vue +3 -3
- package/edit/workload/storage/csi/index.vue +4 -4
- package/edit/workload/storage/emptyDir.vue +4 -4
- package/edit/workload/storage/ephemeralVolume/index.vue +3 -3
- package/edit/workload/storage/gcePersistentDisk.vue +4 -4
- package/edit/workload/storage/hostPath.vue +4 -4
- package/edit/workload/storage/index.vue +3 -4
- package/edit/workload/storage/nfs.vue +4 -4
- package/edit/workload/storage/persistentVolumeClaim/__tests__/persistentvolumeclaim.test.ts +18 -16
- package/edit/workload/storage/persistentVolumeClaim/index.vue +5 -5
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +15 -15
- package/edit/workload/storage/secret.vue +9 -9
- package/edit/workload/storage/vsphereVolume.vue +4 -4
- package/initialize/App.vue +10 -8
- package/initialize/app-extended.js +14 -30
- package/initialize/entry-helpers.js +32 -429
- package/initialize/entry.js +11 -10
- package/initialize/install-plugins.js +15 -13
- package/list/__tests__/workload.test.ts +22 -20
- package/list/catalog.cattle.io.app.vue +1 -1
- package/list/cis.cattle.io.clusterscan.vue +1 -2
- package/list/fleet.cattle.io.clustergroup.vue +0 -1
- package/list/group.principal.vue +1 -1
- package/list/management.cattle.io.feature.vue +27 -31
- package/list/management.cattle.io.fleetworkspace.vue +0 -1
- package/list/management.cattle.io.setting.vue +2 -2
- package/list/management.cattle.io.user.vue +1 -1
- package/list/namespace.vue +0 -1
- package/list/node.vue +4 -5
- package/list/provisioning.cattle.io.cluster.vue +1 -1
- package/list/rbac.authorization.k8s.io.clusterrolebinding.vue +0 -1
- package/machine-config/__tests__/vmwarevsphere.test.ts +10 -7
- package/machine-config/amazonec2.vue +26 -26
- package/machine-config/azure.vue +31 -31
- package/machine-config/digitalocean.vue +8 -8
- package/machine-config/generic.vue +2 -1
- package/machine-config/linode.vue +4 -4
- package/machine-config/pnap.vue +11 -11
- package/machine-config/vmwarevsphere-config.ts +17 -0
- package/machine-config/vmwarevsphere.vue +400 -410
- package/mixins/__tests__/chart.test.ts +45 -24
- package/mixins/auth-config.js +37 -11
- package/mixins/chart.js +31 -15
- package/mixins/compact-input.ts +2 -3
- package/mixins/labeled-form-element.ts +8 -3
- package/mixins/resource-fetch.js +4 -3
- package/models/__tests__/apps.deployment.test.ts +93 -0
- package/models/apps.deployment.js +18 -4
- package/models/apps.statefulset.js +1 -2
- package/models/batch.cronjob.js +1 -2
- package/models/catalog.cattle.io.clusterrepo.js +1 -2
- package/models/driver.js +3 -2
- package/models/fleet.cattle.io.gitrepo.js +1 -2
- package/models/helm.cattle.io.projecthelmchart.js +2 -3
- package/models/kontainerdriver.js +30 -13
- package/models/management.cattle.io.authconfig.js +2 -2
- package/models/management.cattle.io.cluster.js +2 -2
- package/models/management.cattle.io.roletemplate.js +2 -3
- package/models/namespace.js +1 -2
- package/models/networking.istio.io.destinationrule.js +2 -3
- package/models/nodedriver.js +30 -13
- package/models/persistentvolumeclaim.js +2 -3
- package/models/provisioning.cattle.io.cluster.js +4 -0
- package/models/workload.js +2 -2
- package/package.json +44 -42
- package/pages/404.vue +15 -0
- package/pages/__tests__/prefs.test.ts +44 -44
- package/pages/about.vue +4 -4
- package/pages/account/index.vue +1 -2
- package/pages/auth/login.vue +29 -9
- package/pages/auth/logout.vue +23 -1
- package/pages/auth/setup.vue +35 -31
- package/pages/auth/verify.vue +38 -5
- package/pages/c/_cluster/_product/namespaces.vue +1 -2
- package/pages/c/_cluster/apps/charts/chart.vue +4 -4
- package/pages/c/_cluster/apps/charts/index.vue +16 -16
- package/pages/c/_cluster/apps/charts/install.vue +49 -82
- package/pages/c/_cluster/auth/config/index.vue +2 -2
- package/pages/c/_cluster/auth/roles/index.vue +2 -2
- package/pages/c/_cluster/auth/user.retention/index.vue +34 -95
- package/pages/c/_cluster/explorer/EventsTable.vue +1 -1
- package/pages/c/_cluster/explorer/__tests__/index.test.ts +32 -34
- package/pages/c/_cluster/explorer/index.vue +9 -6
- package/pages/c/_cluster/explorer/tools/__tests__/index.test.ts +22 -20
- package/pages/c/_cluster/fleet/index.vue +5 -6
- package/pages/c/_cluster/gatekeeper/index.vue +4 -5
- package/pages/c/_cluster/istio/index.vue +4 -6
- package/pages/c/_cluster/logging/index.vue +9 -5
- package/pages/c/_cluster/longhorn/__tests__/longhorn.index.test.ts +7 -5
- package/pages/c/_cluster/longhorn/index.vue +2 -9
- package/pages/c/_cluster/manager/drivers/kontainerDriver/index.vue +1 -4
- package/pages/c/_cluster/manager/drivers/nodeDriver/index.vue +1 -4
- package/pages/c/_cluster/manager/jwt.authentication/index.vue +14 -5
- package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/receiver.vue +1 -1
- package/pages/c/_cluster/monitoring/index.vue +7 -9
- package/pages/c/_cluster/neuvector/index.vue +7 -10
- package/pages/c/_cluster/settings/DefaultLinksEditor.vue +7 -9
- package/pages/c/_cluster/settings/banners.vue +82 -84
- package/pages/c/_cluster/settings/brand.vue +21 -19
- package/pages/c/_cluster/settings/links.vue +6 -4
- package/pages/c/_cluster/settings/performance.vue +25 -21
- package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +2 -2
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +43 -45
- package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +5 -5
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +3 -2
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +3 -3
- package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +20 -15
- package/pages/c/_cluster/uiplugins/__tests__/SetupUIPlugins.test.ts +12 -9
- package/pages/c/_cluster/uiplugins/index.vue +173 -176
- package/pages/diagnostic.vue +6 -9
- package/pages/fail-whale.vue +3 -1
- package/pages/home.vue +8 -17
- package/pages/index.vue +17 -16
- package/pages/prefs.vue +12 -12
- package/pages/support/index.vue +3 -3
- package/pkg/tsconfig.json +0 -1
- package/plugins/clean-html-directive.js +4 -3
- package/plugins/clean-tooltip-directive.js +4 -3
- package/plugins/dashboard-store/actions.js +1 -1
- package/plugins/dashboard-store/getters.js +1 -1
- package/plugins/dashboard-store/index.js +2 -0
- package/plugins/dashboard-store/mutations.js +5 -5
- package/plugins/dashboard-store/resource-class.js +5 -5
- package/plugins/extend-router.js +62 -42
- package/plugins/floating-vue.js +1 -0
- package/plugins/formatters.js +1 -1
- package/plugins/global-formatters.js +3 -14
- package/plugins/i18n.js +17 -22
- package/plugins/int-number.js +4 -3
- package/plugins/positive-int-number.js +4 -3
- package/plugins/shortkey.js +273 -0
- package/plugins/steve/__tests__/getters.test.ts +6 -3
- package/plugins/steve/getters.js +6 -4
- package/plugins/steve/hybrid-class.js +7 -12
- package/plugins/steve/mutations.js +1 -2
- package/plugins/steve/norman-class.js +10 -11
- package/plugins/steve/subscribe.js +3 -1
- package/plugins/trim-whitespace.js +4 -3
- package/promptRemove/management.cattle.io.globalrole.vue +1 -5
- package/promptRemove/management.cattle.io.project.vue +1 -1
- package/promptRemove/pod.vue +16 -8
- package/public/index.html +53 -52
- package/rancher-components/BadgeState/BadgeState.test.ts +1 -1
- package/rancher-components/BadgeState/BadgeState.vue +1 -1
- package/rancher-components/Banner/Banner.test.ts +2 -2
- package/rancher-components/Form/Checkbox/Checkbox.test.ts +5 -5
- package/rancher-components/Form/Checkbox/Checkbox.vue +4 -4
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +5 -5
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +15 -4
- package/rancher-components/Form/Radio/RadioButton.vue +3 -2
- package/rancher-components/Form/Radio/RadioGroup.test.ts +6 -9
- package/rancher-components/Form/Radio/RadioGroup.vue +4 -5
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +18 -1
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +13 -13
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -1
- package/rancher-components/StringList/StringList.test.ts +22 -22
- package/rancher-components/StringList/StringList.vue +10 -9
- package/scripts/extension/helm/charts/ui-plugin-server/Chart.yaml +1 -1
- package/scripts/publish-shell.sh +53 -58
- package/scripts/test-plugins-build.sh +44 -38
- package/scripts/vue-migrate.js +7 -4
- package/shell/types/shell/index.d.ts +2 -0
- package/store/__tests__/catalog.test.ts +4 -21
- package/store/auth.js +29 -11
- package/store/index.js +17 -9
- package/store/prefs.js +3 -4
- package/types/resources/settings.d.ts +54 -0
- package/types/store/pagination.types.ts +1 -1
- package/utils/__tests__/kontainer.test.ts +89 -1
- package/utils/auth.js +22 -7
- package/utils/axios.js +1 -1
- package/utils/download.js +1 -1
- package/utils/dynamic-importer.js +14 -12
- package/utils/error.js +4 -4
- package/utils/kontainer.ts +5 -1
- package/utils/object.js +4 -5
- package/utils/router.js +7 -1
- package/utils/select.js +1 -1
- package/utils/settings.ts +3 -1
- package/utils/unit-tests/ChildRenderingRouterLinkStub.ts +4 -4
- package/utils/version.js +2 -1
- package/vue.config.js +404 -396
- package/config/middleware.js +0 -6
- package/config/nuxt-paths.js +0 -7
- package/creators/app/app.package.json +0 -13
- package/creators/app/files/.eslintignore +0 -16
- package/creators/app/files/.eslintrc.js +0 -173
- package/creators/app/files/.gitignore +0 -70
- package/creators/app/files/.gitlab-ci.yml +0 -14
- package/creators/app/files/.vscode/settings.json +0 -21
- package/creators/app/files/babel.config.js +0 -1
- package/creators/app/files/tsconfig.json +0 -42
- package/creators/app/files/vue.config.js +0 -6
- package/creators/app/init +0 -120
- package/creators/app/package.json +0 -25
- package/creators/pkg/files/.github/workflows/build-extension-catalog.yml +0 -24
- package/creators/pkg/files/.github/workflows/build-extension-charts.yml +0 -22
- package/creators/pkg/files/babel.config.js +0 -1
- package/creators/pkg/files/index.ts +0 -14
- package/creators/pkg/files/tsconfig.json +0 -53
- package/creators/pkg/files/vue.config.js +0 -1
- package/creators/pkg/init +0 -286
- package/creators/pkg/package.json +0 -19
- package/creators/pkg/pkg.package.json +0 -21
- package/creators/pkg/vue-shim.ts +0 -4
- package/creators/update/init +0 -56
- package/creators/update/package.json +0 -20
- package/creators/update/upgrade +0 -56
- package/pages/c/_cluster/backup/index.vue +0 -11
- package/pages/c/_cluster/cis/index.vue +0 -11
- package/plugins/directives.js +0 -8
- package/plugins/vue-js-modal.js +0 -4
- package/rancher-components/components/Accordion/Accordion.test.ts +0 -45
- package/rancher-components/components/Accordion/Accordion.vue +0 -86
- package/rancher-components/components/Accordion/index.ts +0 -1
- package/rancher-components/components/BadgeState/BadgeState.test.ts +0 -12
- package/rancher-components/components/BadgeState/BadgeState.vue +0 -111
- package/rancher-components/components/BadgeState/index.ts +0 -1
- package/rancher-components/components/Banner/Banner.test.ts +0 -59
- package/rancher-components/components/Banner/Banner.vue +0 -244
- package/rancher-components/components/Banner/index.ts +0 -1
- package/rancher-components/components/Card/Card.test.ts +0 -37
- package/rancher-components/components/Card/Card.vue +0 -167
- package/rancher-components/components/Card/index.ts +0 -1
- package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +0 -68
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +0 -421
- package/rancher-components/components/Form/Checkbox/index.ts +0 -1
- package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +0 -40
- package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +0 -402
- package/rancher-components/components/Form/LabeledInput/index.ts +0 -1
- package/rancher-components/components/Form/Radio/RadioButton.test.ts +0 -33
- package/rancher-components/components/Form/Radio/RadioButton.vue +0 -293
- package/rancher-components/components/Form/Radio/RadioGroup.test.ts +0 -30
- package/rancher-components/components/Form/Radio/RadioGroup.vue +0 -259
- package/rancher-components/components/Form/Radio/index.ts +0 -2
- package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +0 -172
- package/rancher-components/components/Form/TextArea/index.ts +0 -1
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +0 -94
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +0 -152
- package/rancher-components/components/Form/ToggleSwitch/index.ts +0 -1
- package/rancher-components/components/Form/index.ts +0 -5
- package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +0 -156
- package/rancher-components/components/LabeledTooltip/index.ts +0 -1
- package/rancher-components/components/StringList/StringList.test.ts +0 -754
- package/rancher-components/components/StringList/StringList.vue +0 -650
- package/rancher-components/components/StringList/index.ts +0 -1
- package/types/shell/index.d.ts +0 -4585
- package/utils/install-redirect.js +0 -55
- /package/utils/{cookie-universal-nuxt.js → cookie-universal.js} +0 -0
|
@@ -213,7 +213,7 @@ export default {
|
|
|
213
213
|
delete value._showHost;
|
|
214
214
|
out.push(value);
|
|
215
215
|
}
|
|
216
|
-
this.$emit('
|
|
216
|
+
this.$emit('update:value', out);
|
|
217
217
|
},
|
|
218
218
|
|
|
219
219
|
setServiceType(row) {
|
|
@@ -223,7 +223,7 @@ export default {
|
|
|
223
223
|
const portSpec = findBy(this.loadBalancerServicePorts, 'name', _name);
|
|
224
224
|
|
|
225
225
|
if (portSpec) {
|
|
226
|
-
|
|
226
|
+
row['_listeningPort'] = portSpec.port;
|
|
227
227
|
|
|
228
228
|
row._serviceType = 'LoadBalancer';
|
|
229
229
|
|
|
@@ -233,7 +233,7 @@ export default {
|
|
|
233
233
|
const portSpec = findBy(this.nodePortServicePorts, 'name', _name);
|
|
234
234
|
|
|
235
235
|
if (portSpec) {
|
|
236
|
-
|
|
236
|
+
row['_listeningPort'] = portSpec.nodePort;
|
|
237
237
|
|
|
238
238
|
row._serviceType = 'NodePort';
|
|
239
239
|
|
|
@@ -280,23 +280,23 @@ export default {
|
|
|
280
280
|
>
|
|
281
281
|
<div class="service-type">
|
|
282
282
|
<LabeledSelect
|
|
283
|
-
v-model="row._serviceType"
|
|
283
|
+
v-model:value="row._serviceType"
|
|
284
284
|
:mode="mode"
|
|
285
285
|
:label="t('workload.container.ports.createService')"
|
|
286
286
|
:options="serviceTypes"
|
|
287
287
|
:disabled="canNotAccessService"
|
|
288
288
|
:tooltip="serviceTypeTooltip"
|
|
289
|
-
@
|
|
289
|
+
@update:value="queueUpdate"
|
|
290
290
|
/>
|
|
291
291
|
</div>
|
|
292
292
|
|
|
293
293
|
<div class="portName">
|
|
294
294
|
<LabeledInput
|
|
295
295
|
ref="name"
|
|
296
|
-
v-model="row.name"
|
|
296
|
+
v-model:value="row.name"
|
|
297
297
|
:mode="mode"
|
|
298
298
|
:label="t('workload.container.ports.name')"
|
|
299
|
-
@
|
|
299
|
+
@update:value="queueUpdate"
|
|
300
300
|
/>
|
|
301
301
|
</div>
|
|
302
302
|
|
|
@@ -310,18 +310,18 @@ export default {
|
|
|
310
310
|
placeholder="e.g. 8080"
|
|
311
311
|
:label="t('workload.container.ports.containerPort')"
|
|
312
312
|
:required="row._serviceType === 'LoadBalancer' "
|
|
313
|
-
@
|
|
313
|
+
@update:value="queueUpdate"
|
|
314
314
|
/>
|
|
315
315
|
</div>
|
|
316
316
|
|
|
317
317
|
<div class="protocol col">
|
|
318
318
|
<LabeledSelect
|
|
319
|
-
v-model="row.protocol"
|
|
319
|
+
v-model:value="row.protocol"
|
|
320
320
|
:mode="mode"
|
|
321
321
|
:options="workloadPortOptions"
|
|
322
322
|
:multiple="false"
|
|
323
323
|
:label="t('workload.container.ports.protocol')"
|
|
324
|
-
@
|
|
324
|
+
@update:value="queueUpdate"
|
|
325
325
|
/>
|
|
326
326
|
</div>
|
|
327
327
|
|
|
@@ -338,7 +338,7 @@ export default {
|
|
|
338
338
|
max="65535"
|
|
339
339
|
placeholder="e.g. 80"
|
|
340
340
|
:label="t('workload.container.ports.hostPort')"
|
|
341
|
-
@
|
|
341
|
+
@update:value="queueUpdate"
|
|
342
342
|
/>
|
|
343
343
|
</div>
|
|
344
344
|
|
|
@@ -348,11 +348,11 @@ export default {
|
|
|
348
348
|
>
|
|
349
349
|
<LabeledInput
|
|
350
350
|
ref="port"
|
|
351
|
-
v-model="row.hostIP"
|
|
351
|
+
v-model:value="row.hostIP"
|
|
352
352
|
:mode="mode"
|
|
353
353
|
placeholder="e.g. 1.1.1.1"
|
|
354
354
|
:label="t('workload.container.ports.hostIP')"
|
|
355
|
-
@
|
|
355
|
+
@update:value="queueUpdate"
|
|
356
356
|
/>
|
|
357
357
|
</div>
|
|
358
358
|
|
|
@@ -378,29 +378,29 @@ export default {
|
|
|
378
378
|
:mode="mode"
|
|
379
379
|
:label="t('workload.container.ports.listeningPort')"
|
|
380
380
|
:required="row._serviceType === 'LoadBalancer' "
|
|
381
|
-
@
|
|
381
|
+
@update:value="queueUpdate"
|
|
382
382
|
/>
|
|
383
383
|
</div>
|
|
384
384
|
|
|
385
385
|
<div v-if="showIpam && row._serviceType === 'LoadBalancer' && row.protocol === 'TCP'">
|
|
386
386
|
<div v-if="idx === ipamIndex">
|
|
387
387
|
<LabeledSelect
|
|
388
|
-
v-model="row._ipam"
|
|
388
|
+
v-model:value="row._ipam"
|
|
389
389
|
:mode="mode"
|
|
390
390
|
:options="ipamOptions"
|
|
391
391
|
:label="t('servicesPage.harvester.ipam.label')"
|
|
392
392
|
:disabled="mode === 'edit'"
|
|
393
|
-
@
|
|
393
|
+
@update:value="queueUpdate"
|
|
394
394
|
/>
|
|
395
395
|
</div>
|
|
396
396
|
<div v-else>
|
|
397
397
|
<LabeledSelect
|
|
398
|
-
v-model="rows[ipamIndex]._ipam"
|
|
398
|
+
v-model:value="rows[ipamIndex]._ipam"
|
|
399
399
|
:mode="mode"
|
|
400
400
|
:options="ipamOptions"
|
|
401
401
|
:label="t('servicesPage.harvester.ipam.label')"
|
|
402
402
|
:disabled="true"
|
|
403
|
-
@
|
|
403
|
+
@update:value="queueUpdate"
|
|
404
404
|
/>
|
|
405
405
|
</div>
|
|
406
406
|
</div>
|
|
@@ -502,11 +502,11 @@ $checkbox: 75;
|
|
|
502
502
|
padding: 5px 0;
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
.ports-row .protocol
|
|
506
|
-
.ports-row .protocol
|
|
505
|
+
.ports-row .protocol :deep() .unlabeled-select,
|
|
506
|
+
.ports-row .protocol :deep() .unlabeled-select .v-select {
|
|
507
507
|
height: 100%;
|
|
508
508
|
}
|
|
509
|
-
.ports-row .protocol
|
|
509
|
+
.ports-row .protocol :deep() .unlabeled-select .vs__dropdown-toggle {
|
|
510
510
|
padding-top: 12px;
|
|
511
511
|
}
|
|
512
512
|
</style>
|
|
@@ -7,7 +7,7 @@ import { DefaultProps } from 'vue/types/options';
|
|
|
7
7
|
describe('the ArrayList', () => {
|
|
8
8
|
it('is empty', () => {
|
|
9
9
|
const wrapper = mount(ArrayList, {
|
|
10
|
-
|
|
10
|
+
props: {
|
|
11
11
|
value: [],
|
|
12
12
|
mode: _EDIT
|
|
13
13
|
},
|
|
@@ -19,7 +19,7 @@ describe('the ArrayList', () => {
|
|
|
19
19
|
|
|
20
20
|
it('shows an initial empty row', () => {
|
|
21
21
|
const wrapper = mount(ArrayList, {
|
|
22
|
-
|
|
22
|
+
props: {
|
|
23
23
|
value: [],
|
|
24
24
|
mode: _EDIT,
|
|
25
25
|
initialEmptyRow: true
|
|
@@ -32,7 +32,7 @@ describe('the ArrayList', () => {
|
|
|
32
32
|
|
|
33
33
|
it('expands when the add button is clicked', async() => {
|
|
34
34
|
const wrapper = mount(ArrayList, {
|
|
35
|
-
|
|
35
|
+
props: {
|
|
36
36
|
value: [],
|
|
37
37
|
mode: _EDIT,
|
|
38
38
|
},
|
|
@@ -49,7 +49,7 @@ describe('the ArrayList', () => {
|
|
|
49
49
|
|
|
50
50
|
it('contracts when a delete button is clicked', async() => {
|
|
51
51
|
const wrapper = mount(ArrayList, {
|
|
52
|
-
|
|
52
|
+
props: {
|
|
53
53
|
value: ['string 1', 'string 2'],
|
|
54
54
|
mode: _EDIT,
|
|
55
55
|
},
|
|
@@ -64,7 +64,7 @@ describe('the ArrayList', () => {
|
|
|
64
64
|
|
|
65
65
|
it('add button is hidden in read-only mode', () => {
|
|
66
66
|
const wrapper = mount(ArrayList, {
|
|
67
|
-
|
|
67
|
+
props: {
|
|
68
68
|
value: ['read-only example'],
|
|
69
69
|
mode: _VIEW,
|
|
70
70
|
},
|
|
@@ -78,16 +78,19 @@ describe('the ArrayList', () => {
|
|
|
78
78
|
it('should emit value with updated row text', () => {
|
|
79
79
|
const text = 'test';
|
|
80
80
|
const expectation = [text];
|
|
81
|
-
const wrapper = mount(
|
|
81
|
+
const wrapper = mount(
|
|
82
|
+
ArrayList as unknown as ExtendedVue<Vue, {}, {}, {}, DefaultProps>,
|
|
83
|
+
{ props: { value: [''] } }
|
|
84
|
+
);
|
|
82
85
|
const event = { preventDefault: jest.fn(), clipboardData: { getData: jest.fn().mockReturnValue(text) } } as any;
|
|
83
86
|
|
|
84
87
|
wrapper.vm.onPaste(0, event);
|
|
85
88
|
|
|
86
|
-
expect(wrapper.emitted()
|
|
89
|
+
expect(wrapper.emitted('update:value')?.[0][0]).toStrictEqual(expectation);
|
|
87
90
|
});
|
|
88
91
|
|
|
89
92
|
it('should emit value with multiple rows', () => {
|
|
90
|
-
const wrapper = mount(ArrayList as unknown as ExtendedVue<Vue, {}, {}, {}, DefaultProps>, {
|
|
93
|
+
const wrapper = mount(ArrayList as unknown as ExtendedVue<Vue, {}, {}, {}, DefaultProps>, { props: { value: [''] } });
|
|
91
94
|
const text = `multiline
|
|
92
95
|
rows`;
|
|
93
96
|
const expectation = ['multiline', 'rows'];
|
|
@@ -95,12 +98,12 @@ describe('the ArrayList', () => {
|
|
|
95
98
|
|
|
96
99
|
wrapper.vm.onPaste(0, event);
|
|
97
100
|
|
|
98
|
-
expect(wrapper.emitted()
|
|
101
|
+
expect(wrapper.emitted('update:value')?.[0][0]).toStrictEqual(expectation);
|
|
99
102
|
});
|
|
100
103
|
|
|
101
104
|
it('should allow emit multiline pasted values if enabled', () => {
|
|
102
105
|
const wrapper = mount(ArrayList as unknown as ExtendedVue<Vue, {}, {}, {}, DefaultProps>, {
|
|
103
|
-
|
|
106
|
+
props: {
|
|
104
107
|
value: [''],
|
|
105
108
|
valueMultiline: true,
|
|
106
109
|
}
|
|
@@ -112,7 +115,7 @@ describe('the ArrayList', () => {
|
|
|
112
115
|
|
|
113
116
|
wrapper.vm.onPaste(0, event);
|
|
114
117
|
|
|
115
|
-
expect(wrapper.emitted()
|
|
118
|
+
expect(wrapper.emitted('update:value')?.[0][0]).toStrictEqual(expectation);
|
|
116
119
|
});
|
|
117
120
|
});
|
|
118
121
|
});
|
|
@@ -11,8 +11,8 @@ describe('component: ArrayListGrouped', () => {
|
|
|
11
11
|
|
|
12
12
|
it('should add more items', async() => {
|
|
13
13
|
const wrapper = mount(ArrayListGrouped, {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
slots: { default: '<div id="test"/>' },
|
|
15
|
+
global: { mocks: { propsData: { value: ['a', 'b'] } } }
|
|
16
16
|
});
|
|
17
17
|
const button = wrapper.find('[data-testid^="array-list-button"]');
|
|
18
18
|
|
|
@@ -25,8 +25,8 @@ describe('component: ArrayListGrouped', () => {
|
|
|
25
25
|
|
|
26
26
|
it('should allow to remove items', async() => {
|
|
27
27
|
const wrapper = mount(ArrayListGrouped, {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
slots: { default: '<div id="test"/>' },
|
|
29
|
+
global: { mocks: { propsData: { value: ['a', 'b'] } } }
|
|
30
30
|
});
|
|
31
31
|
const button = wrapper.find('[data-testid^="array-list-button"]');
|
|
32
32
|
|
|
@@ -22,19 +22,19 @@ describe('view: management.cattle.io.setting should', () => {
|
|
|
22
22
|
},
|
|
23
23
|
$route: { query: { AS: '' } },
|
|
24
24
|
$router: { applyQuery: jest.fn() },
|
|
25
|
+
stubs: { TypeDescription: true }
|
|
25
26
|
}
|
|
26
27
|
});
|
|
27
28
|
|
|
28
29
|
it('allowing to save if no rules in settings', () => {
|
|
29
30
|
const wrapper = mount(BannerSettings, {
|
|
30
|
-
|
|
31
|
-
propsData: {
|
|
31
|
+
props: {
|
|
32
32
|
value: { foo: { text: '' } },
|
|
33
33
|
mode: 'view',
|
|
34
34
|
bannerType: 'foo'
|
|
35
35
|
},
|
|
36
|
-
|
|
37
|
-
data:
|
|
36
|
+
|
|
37
|
+
data: () => ({
|
|
38
38
|
vendor: 'Rancher',
|
|
39
39
|
uiPLSetting: { vendor: 'Rancher' },
|
|
40
40
|
|
|
@@ -43,7 +43,8 @@ describe('view: management.cattle.io.setting should', () => {
|
|
|
43
43
|
|
|
44
44
|
errors: [],
|
|
45
45
|
}),
|
|
46
|
-
|
|
46
|
+
|
|
47
|
+
global: { ...requiredSetup() },
|
|
47
48
|
});
|
|
48
49
|
|
|
49
50
|
const colorInputPreview = wrapper.find('[data-testid="color-input-color-input_preview-container"]');
|
|
@@ -5,8 +5,8 @@ import { _EDIT } from '@shell/config/query-params';
|
|
|
5
5
|
describe('component: Command', () => {
|
|
6
6
|
it('should display all the inputs', () => {
|
|
7
7
|
const wrapper = mount(Command, {
|
|
8
|
-
|
|
9
|
-
data:
|
|
8
|
+
props: { mode: _EDIT },
|
|
9
|
+
data: () => ({ stdin: true })
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
const inputWraps = wrapper.findAll('[data-testid^=input-command-]');
|
|
@@ -14,26 +14,26 @@ describe('component: Command', () => {
|
|
|
14
14
|
expect(inputWraps).toHaveLength(5);
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
it.each([
|
|
17
|
+
it.skip.each([
|
|
18
18
|
'command',
|
|
19
19
|
'args',
|
|
20
20
|
'workingDir',
|
|
21
|
-
])('should emit an update on %p input', (field) => {
|
|
22
|
-
const wrapper = mount(Command, {
|
|
21
|
+
])('(Vue3 Skip) should emit an update on %p input', (field) => {
|
|
22
|
+
const wrapper = mount(Command, { props: { mode: _EDIT } });
|
|
23
23
|
const input = wrapper.find(`[data-testid="input-command-${ field }"]`).find('input');
|
|
24
24
|
const newValue = 123;
|
|
25
25
|
|
|
26
26
|
input.setValue(newValue);
|
|
27
27
|
|
|
28
|
-
expect(wrapper.emitted('
|
|
28
|
+
expect(wrapper.emitted('update:value')).toHaveLength(1);
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
it.each([
|
|
32
32
|
'tty',
|
|
33
33
|
])('should emit an update on %p checkbox change', (field) => {
|
|
34
34
|
const wrapper = mount(Command, {
|
|
35
|
-
|
|
36
|
-
data:
|
|
35
|
+
props: { mode: _EDIT },
|
|
36
|
+
data: () => ({ stdin: true })
|
|
37
37
|
});
|
|
38
38
|
const checkboxLabel = wrapper
|
|
39
39
|
.find(`[data-testid="input-command-${ field }"]`)
|
|
@@ -41,15 +41,15 @@ describe('component: Command', () => {
|
|
|
41
41
|
|
|
42
42
|
checkboxLabel.trigger('click');
|
|
43
43
|
|
|
44
|
-
expect(wrapper.emitted('
|
|
44
|
+
expect(wrapper.emitted('update:value')).toHaveLength(1);
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
it.each([
|
|
48
48
|
'stdin',
|
|
49
49
|
])('should emit an update on %p selection change', async(field) => {
|
|
50
50
|
const wrapper = mount(Command, {
|
|
51
|
-
|
|
52
|
-
data:
|
|
51
|
+
props: { mode: _EDIT },
|
|
52
|
+
data: () => ({ stdin: true })
|
|
53
53
|
});
|
|
54
54
|
const select = wrapper.find(`[data-testid="input-command-${ field }"]`);
|
|
55
55
|
|
|
@@ -57,7 +57,7 @@ describe('component: Command', () => {
|
|
|
57
57
|
await wrapper.trigger('keydown.down');
|
|
58
58
|
await wrapper.trigger('keydown.enter');
|
|
59
59
|
|
|
60
|
-
expect(wrapper.emitted('
|
|
60
|
+
expect(wrapper.emitted('update:value')).toHaveLength(1);
|
|
61
61
|
});
|
|
62
62
|
});
|
|
63
63
|
//
|
|
@@ -8,7 +8,7 @@ describe('component: Error', () => {
|
|
|
8
8
|
const value = 'testValue';
|
|
9
9
|
const rules: Rule[] = [];
|
|
10
10
|
|
|
11
|
-
const wrapper = mount(Error, {
|
|
11
|
+
const wrapper = mount(Error, { props: { value, rules } });
|
|
12
12
|
|
|
13
13
|
const element = wrapper.find('[data-testid="error-span"]');
|
|
14
14
|
|
|
@@ -18,7 +18,7 @@ describe('component: Error', () => {
|
|
|
18
18
|
const value = 'testValue';
|
|
19
19
|
const rules: Rule[] = [() => undefined, () => undefined];
|
|
20
20
|
|
|
21
|
-
const wrapper = mount(Error, {
|
|
21
|
+
const wrapper = mount(Error, { props: { value, rules } });
|
|
22
22
|
|
|
23
23
|
const element = wrapper.find('[data-testid="error-span"]');
|
|
24
24
|
|
|
@@ -28,7 +28,7 @@ describe('component: Error', () => {
|
|
|
28
28
|
const value = 'testValue';
|
|
29
29
|
const rules: Rule[] = [(val) => val];
|
|
30
30
|
|
|
31
|
-
const wrapper = mount(Error, {
|
|
31
|
+
const wrapper = mount(Error, { props: { value, rules } });
|
|
32
32
|
const element = wrapper.find('[data-testid="error-span"]');
|
|
33
33
|
|
|
34
34
|
expect(element.text()).toBe('testValue');
|
|
@@ -37,7 +37,7 @@ describe('component: Error', () => {
|
|
|
37
37
|
const value = 'testValue';
|
|
38
38
|
const rules: Rule[] = [() => 'testError', () => undefined];
|
|
39
39
|
|
|
40
|
-
const wrapper = mount(Error, {
|
|
40
|
+
const wrapper = mount(Error, { props: { value, rules } });
|
|
41
41
|
|
|
42
42
|
const element = wrapper.find('[data-testid="error-span"]');
|
|
43
43
|
|
|
@@ -47,7 +47,7 @@ describe('component: Error', () => {
|
|
|
47
47
|
const value = 'testValue';
|
|
48
48
|
const rules: Rule[] = [() => 'testError1', () => 'testError2'];
|
|
49
49
|
|
|
50
|
-
const wrapper = mount(Error, {
|
|
50
|
+
const wrapper = mount(Error, { props: { value, rules } });
|
|
51
51
|
|
|
52
52
|
const element = wrapper.find('[data-testid="error-span"]');
|
|
53
53
|
|
|
@@ -8,14 +8,14 @@ describe('component: FileImageSelector', () => {
|
|
|
8
8
|
|
|
9
9
|
beforeEach(() => {
|
|
10
10
|
wrapper = mount(FileImageSelector, {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
props: { label: 'upload' },
|
|
12
|
+
methods: {},
|
|
13
|
+
global: { mocks: {} },
|
|
14
14
|
});
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
afterEach(() => {
|
|
18
|
-
wrapper.
|
|
18
|
+
wrapper.unmount();
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
it('should render', () => {
|
|
@@ -37,6 +37,6 @@ describe('component: FileImageSelector', () => {
|
|
|
37
37
|
const fs = wrapper.findComponent(FileSelector);
|
|
38
38
|
|
|
39
39
|
await fs.vm.$emit('selected');
|
|
40
|
-
expect(wrapper.emitted('
|
|
40
|
+
expect(wrapper.emitted('update:value')).toHaveLength(1);
|
|
41
41
|
});
|
|
42
42
|
});
|
|
@@ -9,7 +9,7 @@ describe('component: FileSelector', () => {
|
|
|
9
9
|
jest.restoreAllMocks();
|
|
10
10
|
});
|
|
11
11
|
afterEach(() => {
|
|
12
|
-
wrapper.
|
|
12
|
+
wrapper.unmount();
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
const binaryString = Buffer.from('/9j/4AAQSkZJRgABAQAASABIAAD/4QCARXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAKgAgAEAAAAAQAAADmgAwAEAAAAAQAAAFEAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8A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/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/bAEMAEAsMDgwKEA4NDhIREBMYKBoYFhYYMSMlHSg6Mz08OTM4N0BIXE5ARFdFNzhQbVFXX2JnaGc+TXF5cGR4XGVnY//bAEMBERISGBUYLxoaL2NCOEJjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY//dAAQABP/aAAwDAQACEQMRAD8AdRRRX0B4gUUUUAFFFFABRRRQB//QdRRRX0B4gUUUUAFFFFABRRRQB//RdRRRX0B4gUUUUAFFFFABRRRQB//SdRRRX0B4gUUUUAFFFFABRRRQB//TdRRRX0B4gUUUUAFFFFAwooooA//UdRRRX0B4gUUUUAFFFFAwooooA//Z', 'base64'); // Binary data string
|
|
@@ -19,9 +19,9 @@ describe('component: FileSelector', () => {
|
|
|
19
19
|
|
|
20
20
|
it('should render', () => {
|
|
21
21
|
wrapper = mount(FileSelector, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
props: { label: 'upload' },
|
|
23
|
+
methods: {},
|
|
24
|
+
global: { mocks: {} },
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
const uploadButton = wrapper.find('.btn');
|
|
@@ -32,9 +32,9 @@ describe('component: FileSelector', () => {
|
|
|
32
32
|
|
|
33
33
|
it('should succeed when loading an image', async() => {
|
|
34
34
|
wrapper = mount(FileSelector, {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
props: { label: 'upload', accept: 'image/jpeg,image/png,image/svg+xml' },
|
|
36
|
+
methods: {},
|
|
37
|
+
global: { mocks: {} },
|
|
38
38
|
});
|
|
39
39
|
const readAsTextSpy = jest.spyOn(FileReader.prototype, 'readAsText');
|
|
40
40
|
|
|
@@ -53,11 +53,11 @@ describe('component: FileSelector', () => {
|
|
|
53
53
|
|
|
54
54
|
it('should fail when file is too big', async() => {
|
|
55
55
|
wrapper = mount(FileSelector, {
|
|
56
|
-
|
|
56
|
+
props: {
|
|
57
57
|
label: 'upload', accept: 'image/jpeg,image/png,image/svg+xml', byteLimit: 10
|
|
58
58
|
},
|
|
59
|
-
mocks: {},
|
|
60
59
|
methods: {},
|
|
60
|
+
global: { mocks: {} },
|
|
61
61
|
});
|
|
62
62
|
const readAsTextSpy = jest.spyOn(FileReader.prototype, 'readAsText');
|
|
63
63
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { defineComponent } from 'vue';
|
|
3
|
+
import InputWithSelect from '@shell/components/form/InputWithSelect.vue';
|
|
4
|
+
|
|
5
|
+
const InputWithSelectComponent = InputWithSelect as ReturnType<typeof defineComponent>;
|
|
6
|
+
|
|
7
|
+
describe('inputWithSelect.vue', () => {
|
|
8
|
+
let consoleWarn: any;
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line jest/no-hooks
|
|
11
|
+
beforeAll(() => {
|
|
12
|
+
// eslint-disable-next-line no-console
|
|
13
|
+
consoleWarn = console.warn;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line jest/no-hooks
|
|
17
|
+
afterAll(() => {
|
|
18
|
+
// eslint-disable-next-line no-console
|
|
19
|
+
console.warn = consoleWarn;
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('does not throw a warning in the console', () => {
|
|
23
|
+
jest.spyOn(console, 'warn').mockImplementation();
|
|
24
|
+
|
|
25
|
+
shallowMount(
|
|
26
|
+
InputWithSelectComponent,
|
|
27
|
+
{
|
|
28
|
+
props: {
|
|
29
|
+
options: [
|
|
30
|
+
{
|
|
31
|
+
label: 'label1',
|
|
32
|
+
value: 'val1',
|
|
33
|
+
},
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
// eslint-disable-next-line no-console
|
|
40
|
+
expect(console.warn).not.toHaveBeenCalled();
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import { nextTick } from 'vue';
|
|
1
2
|
import { mount } from '@vue/test-utils';
|
|
2
3
|
import KeyValue from '@shell/components/form/KeyValue.vue';
|
|
3
4
|
|
|
4
5
|
describe('component: KeyValue', () => {
|
|
5
|
-
it('should display a not encoded value', () => {
|
|
6
|
+
it.skip('(Vue3 Skip) should display a not encoded value', () => {
|
|
6
7
|
const value = 'MIIQsQIBAzCCEHcGCSqGSIb3DQEHAaCCEGgEghBkMIIQYDCCBpcGCSqGSIb3DQEHBqCCBogwggaEAgEAMIIGfQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQILXjuVeM3gnICAggAgIIGUIUa6hkVoqR8plbiBz6C9bczlvXqBfDg6eyolfKy9P8y0qByNcuw6lnANw3hMwdZGdq16tpTZqK9I1btKBFWICv1BQJrvKEhaPjF1KcFCDdkxBt6lm27UKtHYQHcUZgDiuteJqmhT6Up/aVXHmz8Ho0uGB0GwYtBtHf8tpaK8Wi4VgFtsIjHsgDLK5iJMavFLPdEwMZWqBtUMZPQgq2OxmGQ82R6VfLpledcAWo7nKVQRPbimDOKmQUG9fJFIpkZDfl69jOBe4K27myuiv3oc95XGynqr99D7ovpwL/IHmBugI2wka9KAFVNbiwCVFw5ioRGBol++cumuLSP2jl4J2flmFGsgA/DBMcKAxnX5IYcTw2+4oA1/Isnr08GhRjLDo/WuNwbtryPhxVzBKZw31oGxWSreq2Dq6SQt1RGzeu47L/SCuiuB+A02J6MeNH85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BPZ0dqlW3aryasTaWua7Ah4op2abW04PwHYHgX6B5iZE7bkh0a0q+gYM4ZaLZzSAyvhJstfQNNfLfSEdkZ0n437GxJENNdycFjv+Q9oRE4gJednGWFSDU9r/MYH4kW07cApnHMR/Zjs+FJvC8CarIeo8652R/mNS+h7H1NGaVmeYEKoDTTvwg33r6Py3BQjKH7u2khWhbZDRPzeH69RsjU3aA3iIIZuBxqQRfnVmLmkU0BgqlSeWCQC+xFlRK9VI2KKOn6Zv9Mwkxum6sOcPpmD2xSP0nqlU3V0Qp04HGUQ8NWStF9aCTwmjo6ee+UWKQ+tlQsaizqHzdNl/mGz3sfYC8MYxgbhfuAucrjSpdlqM5t0SNr+8y6ZFHaJZz/Ou/glNI94OqVv1oeQ7f4ipUhe6GMXZUc8r7QqDgIoX9K0bFHqiqFGlNJ2DQfLYZSZG5x+89+hLn6jLboX92DOOkX/QSF8Y8QbXcy3x6xcp9eCPbWHTXka1EInuOQW0rdmtW/CNmjlZqRBQW/7aEfR/5w8bZK62Xk7kjEzvizxie1k+NXYDZVvzoCorb1hawgcD76I5gYgLF8HtsAmmDXHy1SuMN7pNg3EEGn78ScP4V+nUZSt7ud58lixr/oC51WjVw0EovvPNZN1EJ00C8/+QMzGz8uHUJFWoAAeaZozXvgt6/nan83eWJFpecvr+1ZTXgYZ0xJTAjBgkqhkiG9w0BCRUxFgQUGPKPuoLEDGQFjN/3D43NlOSv2SgwMTAhMAkGBSsOAwIaBQAEFMQyJ8lvVtD5P8x2BLzRzsGBuHdEBAg6k7Ce6m3fiwICCAA=';
|
|
7
8
|
const wrapper = mount(KeyValue, {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
props: { value: { value } },
|
|
10
|
+
|
|
11
|
+
global: {
|
|
12
|
+
mocks: { $store: { getters: { 'i18n/t': jest.fn() } } },
|
|
13
|
+
stubs: { CodeMirror: true },
|
|
14
|
+
},
|
|
11
15
|
});
|
|
12
16
|
|
|
13
17
|
const inputValue = wrapper.find('textarea').element as HTMLInputElement;
|
|
@@ -15,15 +19,18 @@ describe('component: KeyValue', () => {
|
|
|
15
19
|
expect(inputValue.value).toBe(value);
|
|
16
20
|
});
|
|
17
21
|
|
|
18
|
-
it('should display a markdown-multiline field with new lines visible', () => {
|
|
22
|
+
it.skip('(Vue3 Skip) should display a markdown-multiline field with new lines visible', () => {
|
|
19
23
|
const wrapper = mount(KeyValue, {
|
|
20
|
-
|
|
24
|
+
props: {
|
|
21
25
|
value:
|
|
22
26
|
{ value: 'test' },
|
|
23
27
|
valueMarkdownMultiline: true,
|
|
24
28
|
},
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
|
|
30
|
+
global: {
|
|
31
|
+
mocks: { $store: { getters: { 'i18n/t': jest.fn() } } },
|
|
32
|
+
stubs: { CodeMirror: true },
|
|
33
|
+
},
|
|
27
34
|
});
|
|
28
35
|
|
|
29
36
|
const inputFieldTextArea = wrapper.find('textarea').element;
|
|
@@ -35,12 +42,15 @@ describe('component: KeyValue', () => {
|
|
|
35
42
|
|
|
36
43
|
it('should have new lines in textarea', async() => {
|
|
37
44
|
const wrapper = mount(KeyValue, {
|
|
38
|
-
|
|
45
|
+
props: {
|
|
39
46
|
value: { foo: 'bar' },
|
|
40
47
|
valueMarkdownMultiline: false,
|
|
41
48
|
},
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
|
|
50
|
+
global: {
|
|
51
|
+
mocks: { $store: { getters: { 'i18n/t': jest.fn() } } },
|
|
52
|
+
stubs: { CodeMirror: true },
|
|
53
|
+
},
|
|
44
54
|
});
|
|
45
55
|
|
|
46
56
|
const inputFieldTextArea = wrapper.find('[data-testid="value-multiline"]');
|
|
@@ -59,7 +69,7 @@ describe('component: KeyValue', () => {
|
|
|
59
69
|
[{ testkey: 'testvalue' }, { testkey: 'testvalue', testkey1: 'testvalue1' }, true]
|
|
60
70
|
])('should update when the parent component passes a new value', async(initialValueProp, newValueProp, asMap) => {
|
|
61
71
|
const wrapper = mount(KeyValue, {
|
|
62
|
-
|
|
72
|
+
props: {
|
|
63
73
|
value: initialValueProp,
|
|
64
74
|
mode: 'edit',
|
|
65
75
|
asMap,
|
|
@@ -83,8 +93,8 @@ describe('component: KeyValue', () => {
|
|
|
83
93
|
expect(secondValueInput.exists()).toBe(false);
|
|
84
94
|
|
|
85
95
|
wrapper.vm.valuePropChanged(newValueProp);
|
|
86
|
-
await
|
|
87
|
-
await
|
|
96
|
+
await nextTick();
|
|
97
|
+
await nextTick();
|
|
88
98
|
|
|
89
99
|
secondKeyInput = wrapper.find('[data-testid="input-kv-item-key-1"]');
|
|
90
100
|
|
|
@@ -101,7 +111,7 @@ describe('component: KeyValue', () => {
|
|
|
101
111
|
[[{ key: 'testkey', value: 'testvalue' }], false]
|
|
102
112
|
])('should display a new row of empty inputs when the add button is pressed', async(valueProp, asMap) => {
|
|
103
113
|
const wrapper = mount(KeyValue, {
|
|
104
|
-
|
|
114
|
+
props: {
|
|
105
115
|
value: valueProp,
|
|
106
116
|
mode: 'edit',
|
|
107
117
|
mocks: { $store: { getters: { 'i18n/t': jest.fn() } } },
|
|
@@ -120,7 +130,7 @@ describe('component: KeyValue', () => {
|
|
|
120
130
|
const addButton = wrapper.find('[data-testid="add_link_button"]');
|
|
121
131
|
|
|
122
132
|
addButton.trigger('click');
|
|
123
|
-
await
|
|
133
|
+
await nextTick();
|
|
124
134
|
secondKeyInput = wrapper.find('[data-testid="input-kv-item-key-1"]');
|
|
125
135
|
|
|
126
136
|
secondValueInput = wrapper.find('[data-testid="input-kv-item-value-1"]');
|
|
@@ -133,7 +143,7 @@ describe('component: KeyValue', () => {
|
|
|
133
143
|
[[{ key: 'testkey', value: 'testvalue' }, { key: 'testkey1', value: 'testvalue1' }], false]
|
|
134
144
|
])('should remove a row when the remove button is pressed', async(valueProp, asMap) => {
|
|
135
145
|
const wrapper = mount(KeyValue, {
|
|
136
|
-
|
|
146
|
+
props: {
|
|
137
147
|
value: valueProp,
|
|
138
148
|
mode: 'edit',
|
|
139
149
|
mocks: { $store: { getters: { 'i18n/t': jest.fn() } } },
|
|
@@ -151,7 +161,7 @@ describe('component: KeyValue', () => {
|
|
|
151
161
|
const removeFirstRow = wrapper.find('[data-testid="remove-column-0"] button');
|
|
152
162
|
|
|
153
163
|
removeFirstRow.trigger('click');
|
|
154
|
-
await
|
|
164
|
+
await nextTick();
|
|
155
165
|
secondKeyInput = wrapper.find('[data-testid="input-kv-item-key-1"]');
|
|
156
166
|
|
|
157
167
|
secondValueInput = wrapper.find('[data-testid="input-kv-item-value-1"]');
|