@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
|
@@ -1,79 +1,40 @@
|
|
|
1
1
|
import { DEFAULT_WORKSPACE } from '@shell/config/types';
|
|
2
|
-
import { applyProducts } from '@shell/store/type-map';
|
|
3
2
|
import { ClusterNotFoundError, RedirectToError } from '@shell/utils/error';
|
|
4
3
|
import { get } from '@shell/utils/object';
|
|
5
|
-
import dynamicPluginLoader from '@shell/pkg/dynamic-plugin-loader';
|
|
6
4
|
import { AFTER_LOGIN_ROUTE, WORKSPACE } from '@shell/store/prefs';
|
|
7
|
-
import { BACK_TO } from '@shell/config/local-storage';
|
|
8
5
|
import { NAME as FLEET_NAME } from '@shell/config/product/fleet.js';
|
|
9
6
|
import { validateResource, setProduct } from '@shell/utils/auth';
|
|
10
|
-
import { getClusterFromRoute, getProductFromRoute, getPackageFromRoute } from '@shell/utils/router';
|
|
7
|
+
import { getClusterFromRoute, getProductFromRoute, getPackageFromRoute, routeRequiresAuthentication } from '@shell/utils/router';
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
route, store, redirect, from, $plugin, next
|
|
16
|
-
}) {
|
|
17
|
-
if ( store.getters['auth/enabled'] !== false && !store.getters['auth/loggedIn'] ) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const backTo = window.localStorage.getItem(BACK_TO);
|
|
22
|
-
|
|
23
|
-
if (backTo) {
|
|
24
|
-
window.localStorage.removeItem(BACK_TO);
|
|
25
|
-
|
|
26
|
-
window.location.href = backTo;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// GC should be notified of route change before any find/get request is made that might be used for that page
|
|
30
|
-
store.dispatch('gcRouteChanged', route);
|
|
31
|
-
|
|
32
|
-
// Load stuff
|
|
33
|
-
let localCheckResource = false;
|
|
34
|
-
|
|
35
|
-
await applyProducts(store, $plugin);
|
|
36
|
-
|
|
37
|
-
// Setup a beforeEach hook once to keep track of the current product
|
|
38
|
-
if ( !beforeEachSetup ) {
|
|
39
|
-
beforeEachSetup = true;
|
|
40
|
-
// This only needs to happen when beforeEach hook hasn't run (the initial load)
|
|
41
|
-
localCheckResource = true;
|
|
42
|
-
|
|
43
|
-
store.app.router.beforeEach((to, from, next) => {
|
|
44
|
-
// NOTE - This beforeEach runs AFTER this middleware. So anything in this middleware that requires it must set it manually
|
|
45
|
-
setProduct(store, to);
|
|
46
|
-
|
|
47
|
-
next();
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
// Call it for the initial pageload
|
|
51
|
-
setProduct(store, route);
|
|
9
|
+
export function install(router, context) {
|
|
10
|
+
router.beforeEach((to, from, next) => loadClusters(to, from, next, context));
|
|
11
|
+
}
|
|
52
12
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
window._popStateDetected = false;
|
|
57
|
-
}, 1);
|
|
58
|
-
});
|
|
13
|
+
export async function loadClusters(to, from, next, { store }) {
|
|
14
|
+
if (!routeRequiresAuthentication(to)) {
|
|
15
|
+
return next();
|
|
59
16
|
}
|
|
60
17
|
|
|
61
18
|
try {
|
|
62
|
-
let clusterId = get(
|
|
19
|
+
let clusterId = get(to, 'params.cluster');
|
|
63
20
|
|
|
64
21
|
// Route can provide cluster ID via metadata
|
|
65
|
-
if (!clusterId &&
|
|
66
|
-
clusterId = getClusterFromRoute(
|
|
22
|
+
if (!clusterId && to) {
|
|
23
|
+
clusterId = getClusterFromRoute(to);
|
|
67
24
|
}
|
|
68
25
|
|
|
69
|
-
const pkg = getPackageFromRoute(
|
|
70
|
-
const product = getProductFromRoute(
|
|
26
|
+
const pkg = getPackageFromRoute(to);
|
|
27
|
+
const product = getProductFromRoute(to);
|
|
71
28
|
|
|
72
29
|
const oldPkg = getPackageFromRoute(from);
|
|
73
30
|
const oldProduct = getProductFromRoute(from);
|
|
74
31
|
|
|
32
|
+
// TODO: Replace all references to store.$plugin.
|
|
33
|
+
// Unfortunately the initialization code has circular dependencies between creating
|
|
34
|
+
// the router and creating the store that will need to be untangled before this can be tackled.
|
|
35
|
+
|
|
75
36
|
// Leave an old pkg where we weren't before?
|
|
76
|
-
const oldPkgPlugin = oldPkg ? Object.values(
|
|
37
|
+
const oldPkgPlugin = oldPkg ? Object.values(store.$plugin.getPlugins()).find((p) => p.name === oldPkg) : null;
|
|
77
38
|
|
|
78
39
|
if (oldPkg && oldPkg !== pkg ) {
|
|
79
40
|
// Execute anything optional the plugin wants to. For example resetting it's store to remove data
|
|
@@ -91,10 +52,10 @@ export default async function({
|
|
|
91
52
|
];
|
|
92
53
|
|
|
93
54
|
// Entering a new package where we weren't before?
|
|
94
|
-
const newPkgPlugin = pkg ? Object.values(
|
|
55
|
+
const newPkgPlugin = pkg ? Object.values(store.$plugin.getPlugins()).find((p) => p.name === pkg) : null;
|
|
95
56
|
|
|
96
57
|
// Note - We can't block on oldPkg !== newPkg because on a fresh load the `from` route equals the `to` route
|
|
97
|
-
if (pkg && (oldPkg !== pkg || from.fullPath ===
|
|
58
|
+
if (pkg && (oldPkg !== pkg || from.fullPath === to.fullPath)) {
|
|
98
59
|
// Execute mandatory store actions
|
|
99
60
|
await Promise.all(always);
|
|
100
61
|
|
|
@@ -107,29 +68,11 @@ export default async function({
|
|
|
107
68
|
});
|
|
108
69
|
}
|
|
109
70
|
|
|
110
|
-
if (!route.matched?.length) {
|
|
111
|
-
// If there are no matching routes we could be trying to nav to a page belonging to a dynamic plugin which needs loading
|
|
112
|
-
await Promise.all([
|
|
113
|
-
...always,
|
|
114
|
-
]);
|
|
115
|
-
|
|
116
|
-
// If a plugin claims the route and is loaded correctly we'll get a route back
|
|
117
|
-
const newLocation = await dynamicPluginLoader.check({ route, store });
|
|
118
|
-
|
|
119
|
-
// If we have a new location, double check that it's actually valid
|
|
120
|
-
const resolvedRoute = newLocation ? store.app.router.resolve(newLocation) : null;
|
|
121
|
-
|
|
122
|
-
if (resolvedRoute?.route.matched.length) {
|
|
123
|
-
// Note - don't use `redirect` or `store.app.route` (breaks feature by failing to run middleware in default layout)
|
|
124
|
-
return next(newLocation);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
71
|
// Ensure that the activeNamespaceCache is updated given the change of context either from or to a place where it uses workspaces
|
|
129
72
|
// When fleet moves to it's own package this should be moved to pkg onEnter/onLeave
|
|
130
73
|
if ((oldProduct === FLEET_NAME || product === FLEET_NAME) && oldProduct !== product) {
|
|
131
74
|
// See note above for store.app.router.beforeEach, need to setProduct manually, for the moment do this in a targeted way
|
|
132
|
-
setProduct(store,
|
|
75
|
+
setProduct(store, to);
|
|
133
76
|
|
|
134
77
|
store.commit('updateWorkspace', {
|
|
135
78
|
value: store.getters['prefs/get'](WORKSPACE) || DEFAULT_WORKSPACE,
|
|
@@ -147,13 +90,11 @@ export default async function({
|
|
|
147
90
|
newPkg: newPkgPlugin,
|
|
148
91
|
product,
|
|
149
92
|
oldProduct,
|
|
150
|
-
targetRoute:
|
|
93
|
+
targetRoute: to
|
|
151
94
|
})
|
|
152
95
|
]);
|
|
153
96
|
|
|
154
|
-
|
|
155
|
-
validateResource(store, route, redirect);
|
|
156
|
-
}
|
|
97
|
+
validateResource(store, to);
|
|
157
98
|
|
|
158
99
|
if (!clusterId) {
|
|
159
100
|
clusterId = store.getters['defaultClusterId']; // This needs the cluster list, so no parallel
|
|
@@ -175,16 +116,17 @@ export default async function({
|
|
|
175
116
|
});
|
|
176
117
|
}
|
|
177
118
|
}
|
|
119
|
+
next();
|
|
178
120
|
} catch (e) {
|
|
179
|
-
if ( e.name === ClusterNotFoundError.
|
|
180
|
-
return
|
|
181
|
-
} if ( e.name === RedirectToError.
|
|
182
|
-
return
|
|
121
|
+
if ( e.name === ClusterNotFoundError.NAME ) {
|
|
122
|
+
return next('/home');
|
|
123
|
+
} if ( e.name === RedirectToError.NAME ) {
|
|
124
|
+
return next(e.url);
|
|
183
125
|
} else {
|
|
184
126
|
// Sets error 500 if lost connection to API
|
|
185
127
|
store.commit('setError', { error: e, locationError: new Error(store.getters['i18n/t']('nav.failWhale.authMiddleware')) });
|
|
186
128
|
|
|
187
|
-
return
|
|
129
|
+
return next('/fail-whale');
|
|
188
130
|
}
|
|
189
131
|
}
|
|
190
132
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function install(router, context) {
|
|
2
|
+
router.beforeEach((to, from, next) => loadHistory(to, from, next, context));
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export async function loadHistory(to, from, next) {
|
|
6
|
+
// Clear state used to record if back button was used for navigation
|
|
7
|
+
// TODO: Investigate if this can be removed. This is only used on the templates/error.vue page and seems hacky.
|
|
8
|
+
setTimeout(() => {
|
|
9
|
+
window._popStateDetected = false;
|
|
10
|
+
}, 1);
|
|
11
|
+
|
|
12
|
+
next();
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function install(router, context) {
|
|
2
|
+
router.beforeEach(async(to, from, next) => await loadI18n(to, from, next, context));
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export async function loadI18n(to, from, next, { store }) {
|
|
6
|
+
try {
|
|
7
|
+
await store.dispatch('i18n/init');
|
|
8
|
+
} catch (e) {
|
|
9
|
+
console.error('Failed to initialize i18n', e); // eslint-disable-line no-console
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
next();
|
|
13
|
+
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { install as installLoadInitialSettings } from '@shell/config/router/navigation-guards/load-initial-settings';
|
|
2
2
|
import { install as installAttemptFirstLogin } from '@shell/config/router/navigation-guards/attempt-first-login';
|
|
3
3
|
import { install as installAuthentication } from '@shell/config/router/navigation-guards/authentication';
|
|
4
|
+
import { install as installRuntimeExtensionRoute } from '@shell/config/router/navigation-guards/runtime-extension-route';
|
|
5
|
+
import { install as installI18N } from '@shell/config/router/navigation-guards/i18n';
|
|
6
|
+
import { install as installProducts } from '@shell/config/router/navigation-guards/products';
|
|
7
|
+
import { install as installHistory } from '@shell/config/router/navigation-guards/history';
|
|
8
|
+
import { install as installClusters } from '@shell/config/router/navigation-guards/clusters';
|
|
9
|
+
import { install as installHandleInstallRedirect } from '@shell/config/router/navigation-guards/install-redirect';
|
|
10
|
+
import { install as installPageTitle } from '@shell/config/router/navigation-guards/page-title';
|
|
11
|
+
import { install as installServerUpgradeGrowl } from '@shell/config/router/navigation-guards/server-upgrade-growl';
|
|
4
12
|
|
|
5
13
|
/**
|
|
6
14
|
* Install our router navigation guards. i.e. router.beforeEach(), router.afterEach()
|
|
@@ -9,7 +17,7 @@ export function installNavigationGuards(router, context) {
|
|
|
9
17
|
// NOTE: the order of the installation matters.
|
|
10
18
|
// Be intentional when adding, removing or modifying the guards that are installed.
|
|
11
19
|
|
|
12
|
-
const navigationGuardInstallers = [installLoadInitialSettings, installAttemptFirstLogin, installAuthentication];
|
|
20
|
+
const navigationGuardInstallers = [installLoadInitialSettings, installAttemptFirstLogin, installAuthentication, installProducts, installHistory, installClusters, installRuntimeExtensionRoute, installI18N, installHandleInstallRedirect, installPageTitle, installServerUpgradeGrowl];
|
|
13
21
|
|
|
14
22
|
navigationGuardInstallers.forEach((installer) => installer(router, context));
|
|
15
23
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { REPO_TYPE, REPO, CHART, VERSION } from '@shell/config/query-params';
|
|
2
|
+
import { routeRequiresInstallRedirect, findMeta } from '@shell/utils/router';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* All of this is related to the original install-redirect middleware we used previously. Since removing
|
|
6
|
+
* middleware this is the closest analog since middleware used to run in beforeeach.
|
|
7
|
+
*
|
|
8
|
+
* I originally tried using mixins but the pages wouldn't render if the product didn't exist due to the way our templates/default.vue
|
|
9
|
+
* determines if a cluster is ready before rendering the child route.
|
|
10
|
+
*
|
|
11
|
+
* I personally think that we should remove this concept entirely but I'm leaving it in for completeness sake while getting through the vue3 migration.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export const INSTALL_REDIRECT_META_KEY = 'installRedirect';
|
|
15
|
+
|
|
16
|
+
export function install(router, context) {
|
|
17
|
+
router.beforeEach(async(to, from, next) => await handleInstallRedirect(to, from, next, context));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async function handleInstallRedirect(to, from, next, { store }) {
|
|
21
|
+
if (!routeRequiresInstallRedirect(to)) {
|
|
22
|
+
return next();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
const installRedirectArguments = findMeta(to, INSTALL_REDIRECT_META_KEY);
|
|
27
|
+
|
|
28
|
+
await installRedirect(store, next, installRedirectArguments);
|
|
29
|
+
} catch (e) {
|
|
30
|
+
console.error('Failed to use install-redirect', e); // eslint-disable-line no-console
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
next();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Arguments here should be the same as the arguments from installRedirectImpl below
|
|
37
|
+
export function installRedirectRouteMeta(product, chartName, defaultResourceOrRoute, install = true) {
|
|
38
|
+
return { [INSTALL_REDIRECT_META_KEY]: [...arguments] };
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async function installRedirect(store, redirect, args) {
|
|
42
|
+
await installRedirectImpl(...args);
|
|
43
|
+
|
|
44
|
+
async function installRedirectImpl(product, chartName, defaultResourceOrRoute, install = true) {
|
|
45
|
+
const cluster = store.getters['currentCluster']?.id || 'local';
|
|
46
|
+
|
|
47
|
+
if ( store.getters['type-map/isProductActive'](product) ) {
|
|
48
|
+
// If the product is installed and there's a default resource, redirect there
|
|
49
|
+
|
|
50
|
+
if ( defaultResourceOrRoute ) {
|
|
51
|
+
if ( typeof defaultResourceOrRoute === 'object' ) {
|
|
52
|
+
return redirect(defaultResourceOrRoute);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return redirect({
|
|
56
|
+
name: 'c-cluster-product-resource',
|
|
57
|
+
params: {
|
|
58
|
+
cluster,
|
|
59
|
+
product,
|
|
60
|
+
resource: defaultResourceOrRoute
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Otherwise just let the middleware pass through
|
|
66
|
+
} else if (install) {
|
|
67
|
+
// The product is not installed, redirect to the details chart
|
|
68
|
+
|
|
69
|
+
await store.dispatch('catalog/load');
|
|
70
|
+
|
|
71
|
+
const chart = store.getters['catalog/chart']({ chartName });
|
|
72
|
+
|
|
73
|
+
if ( chart ) {
|
|
74
|
+
return redirect({
|
|
75
|
+
name: 'c-cluster-apps-charts-chart',
|
|
76
|
+
params: { cluster },
|
|
77
|
+
query: {
|
|
78
|
+
[REPO_TYPE]: chart.repoType,
|
|
79
|
+
[REPO]: chart.repoName,
|
|
80
|
+
[CHART]: chart.chartName,
|
|
81
|
+
[VERSION]: chart.versions[0].version
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
} else {
|
|
85
|
+
// The chart's not available
|
|
86
|
+
store.dispatch('loadingError', `Chart not found for ${ product }`);
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
return redirect({
|
|
90
|
+
name: 'c-cluster-explorer',
|
|
91
|
+
params: { cluster },
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fetchInitialSettings } from '@shell/utils/settings';
|
|
2
2
|
|
|
3
3
|
export function install(router, context) {
|
|
4
|
-
router.beforeEach((to, from, next) => loadInitialSettings(to, from, next, context));
|
|
4
|
+
router.beforeEach(async(to, from, next) => await loadInitialSettings(to, from, next, context));
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export async function loadInitialSettings(to, from, next, { store }) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { updatePageTitle } from '@shell/utils/title';
|
|
2
|
+
import { getVendor } from '@shell/config/private-label';
|
|
3
|
+
|
|
4
|
+
export function install(router) {
|
|
5
|
+
router.afterEach(updatePageTitleOnChange);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export async function updatePageTitleOnChange(to, from) {
|
|
9
|
+
if (from?.name !== to?.name) {
|
|
10
|
+
updatePageTitle(getVendor());
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { setProduct } from '@shell/utils/auth';
|
|
2
|
+
import { applyProducts } from '@shell/store/type-map';
|
|
3
|
+
|
|
4
|
+
export function install(router, context) {
|
|
5
|
+
router.beforeEach((to, from, next) => loadProducts(to, from, next, context));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export async function loadProducts(to, from, next, { store }) {
|
|
9
|
+
// GC should be notified of route change before any find/get request is made that might be used for that page
|
|
10
|
+
store.dispatch('gcRouteChanged', to);
|
|
11
|
+
|
|
12
|
+
await applyProducts(store, store.$plugin);
|
|
13
|
+
setProduct(store, to);
|
|
14
|
+
next();
|
|
15
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import dynamicPluginLoader from '@shell/pkg/dynamic-plugin-loader';
|
|
2
|
+
import { routeRequiresAuthentication } from '@shell/utils/router';
|
|
3
|
+
|
|
4
|
+
export function install(router, context) {
|
|
5
|
+
router.beforeEach((to, from, next) => runtimeExtensionRoute(to, from, next, context));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export async function runtimeExtensionRoute(to, from, next, { store }) {
|
|
9
|
+
if (!routeRequiresAuthentication(to) || to.name !== '404') {
|
|
10
|
+
return next();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
try {
|
|
14
|
+
// Handle the loading of dynamic plugins (Harvester) because we only want to attempt to load those plugins and routes if we first couldn't find a page.
|
|
15
|
+
// We should probably get rid of this concept entirely and just load plugins at the start.
|
|
16
|
+
await store.dispatch('loadManagement');
|
|
17
|
+
const newLocation = await dynamicPluginLoader.check({ route: { path: window.location.pathname }, store });
|
|
18
|
+
|
|
19
|
+
// If we have a new location, double check that it's actually valid
|
|
20
|
+
const resolvedRoute = newLocation?.path ? store.app.router.resolve({ path: newLocation.path.replace(/^\/{0,1}dashboard/, '') }) : null;
|
|
21
|
+
|
|
22
|
+
if (resolvedRoute?.route.matched.length) {
|
|
23
|
+
// Note - don't use `redirect` or `store.app.route` (breaks feature by failing to run middleware in default layout)
|
|
24
|
+
return next(resolvedRoute.resolved.path);
|
|
25
|
+
}
|
|
26
|
+
} catch (e) {
|
|
27
|
+
console.error('Failed to load harvester', e); // eslint-disable-line no-console
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
next();
|
|
31
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UPGRADED, _FLAGGED, _UNFLAG } from '@shell/config/query-params';
|
|
2
|
+
|
|
3
|
+
export function install(router, context) {
|
|
4
|
+
router.afterEach((to, from) => renderServerUpgradeGrowl(to, from, { router, ...context }));
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export async function renderServerUpgradeGrowl(to, from, { router, store }) {
|
|
8
|
+
const upgraded = to.query[UPGRADED] === _FLAGGED;
|
|
9
|
+
|
|
10
|
+
if ( upgraded ) {
|
|
11
|
+
router.applyQuery({ [UPGRADED]: _UNFLAG });
|
|
12
|
+
|
|
13
|
+
store.dispatch('growl/success', {
|
|
14
|
+
title: store.getters['i18n/t']('serverUpgrade.title'),
|
|
15
|
+
message: store.getters['i18n/t']('serverUpgrade.message'),
|
|
16
|
+
timeout: 0,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
package/config/router/routes.js
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import { NAME as APPS } from '@shell/config/product/apps';
|
|
2
2
|
import { NAME as EXPLORER } from '@shell/config/product/explorer';
|
|
3
3
|
import { NAME as MANAGER } from '@shell/config/product/manager';
|
|
4
|
-
import { CAPI, MANAGEMENT } from '@shell/config/types';
|
|
4
|
+
import { CAPI, MANAGEMENT, BACKUP_RESTORE, CIS } from '@shell/config/types';
|
|
5
5
|
import { NAME as MCAPPS, NAME as LEGACY } from '@shell/config/product/multi-cluster-apps';
|
|
6
6
|
import { NAME as AUTH } from '@shell/config/product/auth';
|
|
7
7
|
|
|
8
|
+
// All these imports are related to the install-redirect.js navigation guard.
|
|
9
|
+
import { installRedirectRouteMeta } from 'config/router/navigation-guards/install-redirect';
|
|
10
|
+
import { NAME as BACKUP_NAME, CHART_NAME as BACKUP_CHART_NAME } from '@shell/config/product/backup';
|
|
11
|
+
import { NAME as CIS_NAME, CHART_NAME as CIS_CHART_NAME } from '@shell/config/product/cis';
|
|
12
|
+
import { NAME as GATEKEEPER_NAME, CHART_NAME as GATEKEEPER_CHART_NAME } from '@shell/config/product/gatekeeper';
|
|
13
|
+
import { NAME as ISTIO_NAME, CHART_NAME as ISTIO_CHART_NAME } from '@shell/config/product/istio';
|
|
14
|
+
import { NAME as LOGGING_NAME, CHART_NAME as LOGGING_CHART_NAME } from '@shell/config/product/logging';
|
|
15
|
+
import { NAME as MONITORING_NAME, CHART_NAME as MONITORING_CHART_NAME } from '@shell/config/product/monitoring';
|
|
16
|
+
import { NAME as NEUVECTOR_NAME, CHART_NAME as NEUVECTOR_CHART_NAME } from '@shell/config/product/neuvector';
|
|
17
|
+
import { NAME as LONGHORN_NAME, CHART_NAME as LONGHORN_CHART_NAME } from '@shell/config/product/longhorn';
|
|
18
|
+
|
|
8
19
|
const interopDefault = (promise) => promise.then((page) => page.default || page);
|
|
9
20
|
|
|
10
21
|
/**
|
|
@@ -14,11 +25,12 @@ const interopDefault = (promise) => promise.then((page) => page.default || page)
|
|
|
14
25
|
export default [
|
|
15
26
|
{
|
|
16
27
|
path: '/',
|
|
17
|
-
component: () => interopDefault(import('@shell/
|
|
28
|
+
component: () => interopDefault(import('@shell/pages/index.vue')),
|
|
29
|
+
name: 'index',
|
|
18
30
|
meta: { requiresAuthentication: true },
|
|
19
31
|
children: [
|
|
20
32
|
{
|
|
21
|
-
path: '',
|
|
33
|
+
path: '/',
|
|
22
34
|
component: () => interopDefault(import('@shell/pages/index.vue')),
|
|
23
35
|
name: 'index'
|
|
24
36
|
},
|
|
@@ -30,7 +42,7 @@ export default [
|
|
|
30
42
|
name: 'fail-whale'
|
|
31
43
|
},
|
|
32
44
|
{
|
|
33
|
-
path: '',
|
|
45
|
+
path: '/',
|
|
34
46
|
component: () => interopDefault(import('@shell/components/templates/blank.vue')),
|
|
35
47
|
name: 'blank',
|
|
36
48
|
meta: { requiresAuthentication: true },
|
|
@@ -38,7 +50,7 @@ export default [
|
|
|
38
50
|
]
|
|
39
51
|
},
|
|
40
52
|
{
|
|
41
|
-
path: '',
|
|
53
|
+
path: '/',
|
|
42
54
|
component: () => interopDefault(import('@shell/components/templates/home.vue')),
|
|
43
55
|
meta: { requiresAuthentication: true },
|
|
44
56
|
children: [
|
|
@@ -55,7 +67,7 @@ export default [
|
|
|
55
67
|
]
|
|
56
68
|
},
|
|
57
69
|
{
|
|
58
|
-
path: '',
|
|
70
|
+
path: '/',
|
|
59
71
|
component: () => interopDefault(import('@shell/components/templates/plain.vue')),
|
|
60
72
|
name: 'plain',
|
|
61
73
|
meta: { requiresAuthentication: true },
|
|
@@ -118,14 +130,14 @@ export default [
|
|
|
118
130
|
]
|
|
119
131
|
},
|
|
120
132
|
{
|
|
121
|
-
path: '',
|
|
133
|
+
path: '/',
|
|
122
134
|
component: () => interopDefault(import('@shell/components/templates/standalone.vue')),
|
|
123
135
|
name: 'standalone',
|
|
124
136
|
children: [
|
|
125
137
|
]
|
|
126
138
|
},
|
|
127
139
|
{
|
|
128
|
-
path: '',
|
|
140
|
+
path: '/',
|
|
129
141
|
component: () => interopDefault(import('@shell/components/templates/unauthenticated.vue')),
|
|
130
142
|
name: 'unauthenticated',
|
|
131
143
|
children: [
|
|
@@ -151,7 +163,7 @@ export default [
|
|
|
151
163
|
]
|
|
152
164
|
},
|
|
153
165
|
{
|
|
154
|
-
path: '',
|
|
166
|
+
path: '/',
|
|
155
167
|
component: () => interopDefault(import('@shell/components/templates/default.vue')),
|
|
156
168
|
name: 'default',
|
|
157
169
|
meta: { requiresAuthentication: true },
|
|
@@ -192,25 +204,27 @@ export default [
|
|
|
192
204
|
component: () => interopDefault(import('@shell/pages/c/_cluster/explorer/index.vue')),
|
|
193
205
|
name: 'c-cluster-explorer'
|
|
194
206
|
}, {
|
|
195
|
-
path:
|
|
196
|
-
|
|
197
|
-
|
|
207
|
+
path: '/c/:cluster/backup',
|
|
208
|
+
name: 'c-cluster-backup',
|
|
209
|
+
meta: { ...installRedirectRouteMeta(BACKUP_NAME, BACKUP_CHART_NAME, BACKUP_RESTORE.BACKUP) }
|
|
198
210
|
}, {
|
|
199
|
-
path:
|
|
200
|
-
|
|
201
|
-
|
|
211
|
+
path: '/c/:cluster/cis',
|
|
212
|
+
name: 'c-cluster-cis',
|
|
213
|
+
meta: { ...installRedirectRouteMeta(CIS_NAME, CIS_CHART_NAME, CIS.CLUSTER_SCAN) }
|
|
202
214
|
}, {
|
|
203
215
|
path: '/c/:cluster/fleet',
|
|
204
216
|
component: () => interopDefault(import('@shell/pages/c/_cluster/fleet/index.vue')),
|
|
205
|
-
name: 'c-cluster-fleet'
|
|
217
|
+
name: 'c-cluster-fleet',
|
|
206
218
|
}, {
|
|
207
219
|
path: '/c/:cluster/gatekeeper',
|
|
208
220
|
component: () => interopDefault(import('@shell/pages/c/_cluster/gatekeeper/index.vue')),
|
|
209
|
-
name: 'c-cluster-gatekeeper'
|
|
221
|
+
name: 'c-cluster-gatekeeper',
|
|
222
|
+
meta: { ...installRedirectRouteMeta(GATEKEEPER_NAME, GATEKEEPER_CHART_NAME) }
|
|
210
223
|
}, {
|
|
211
224
|
path: '/c/:cluster/istio',
|
|
212
225
|
component: () => interopDefault(import('@shell/pages/c/_cluster/istio/index.vue')),
|
|
213
|
-
name: 'c-cluster-istio'
|
|
226
|
+
name: 'c-cluster-istio',
|
|
227
|
+
meta: { ...installRedirectRouteMeta(ISTIO_NAME, ISTIO_CHART_NAME) }
|
|
214
228
|
}, {
|
|
215
229
|
path: '/c/:cluster/legacy',
|
|
216
230
|
redirect(to) {
|
|
@@ -228,11 +242,13 @@ export default [
|
|
|
228
242
|
}, {
|
|
229
243
|
path: '/c/:cluster/logging',
|
|
230
244
|
component: () => interopDefault(import('@shell/pages/c/_cluster/logging/index.vue')),
|
|
231
|
-
name: 'c-cluster-logging'
|
|
245
|
+
name: 'c-cluster-logging',
|
|
246
|
+
meta: { ...installRedirectRouteMeta(LOGGING_NAME, LOGGING_CHART_NAME) }
|
|
232
247
|
}, {
|
|
233
248
|
path: '/c/:cluster/longhorn',
|
|
234
249
|
component: () => interopDefault(import('@shell/pages/c/_cluster/longhorn/index.vue')),
|
|
235
|
-
name: 'c-cluster-longhorn'
|
|
250
|
+
name: 'c-cluster-longhorn',
|
|
251
|
+
meta: { ...installRedirectRouteMeta(LONGHORN_NAME, LONGHORN_CHART_NAME) }
|
|
236
252
|
}, {
|
|
237
253
|
path: '/c/:cluster/manager',
|
|
238
254
|
redirect(to) {
|
|
@@ -262,7 +278,8 @@ export default [
|
|
|
262
278
|
}, {
|
|
263
279
|
path: '/c/:cluster/monitoring',
|
|
264
280
|
component: () => interopDefault(import('@shell/pages/c/_cluster/monitoring/index.vue')),
|
|
265
|
-
name: 'c-cluster-monitoring'
|
|
281
|
+
name: 'c-cluster-monitoring',
|
|
282
|
+
meta: { ...installRedirectRouteMeta(MONITORING_NAME, MONITORING_CHART_NAME) }
|
|
266
283
|
}, {
|
|
267
284
|
|
|
268
285
|
path: '/c/:cluster/manager/jwt.authentication',
|
|
@@ -272,7 +289,8 @@ export default [
|
|
|
272
289
|
|
|
273
290
|
path: '/c/:cluster/neuvector',
|
|
274
291
|
component: () => interopDefault(import('@shell/pages/c/_cluster/neuvector/index.vue')),
|
|
275
|
-
name: 'c-cluster-neuvector'
|
|
292
|
+
name: 'c-cluster-neuvector',
|
|
293
|
+
meta: { ...installRedirectRouteMeta(NEUVECTOR_NAME, NEUVECTOR_CHART_NAME, undefined, false) }
|
|
276
294
|
}, {
|
|
277
295
|
path: '/c/:cluster/apps/charts',
|
|
278
296
|
component: () => interopDefault(import('@shell/pages/c/_cluster/apps/charts/index.vue')),
|
|
@@ -484,4 +502,12 @@ export default [
|
|
|
484
502
|
component: () => interopDefault(import('@shell/pages/c/_cluster/_product/_resource/_namespace/_id.vue')),
|
|
485
503
|
name: 'c-cluster-product-resource-namespace-id'
|
|
486
504
|
}]
|
|
487
|
-
}
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
path: '/:catchAll(.*)*',
|
|
508
|
+
name: '404',
|
|
509
|
+
component: () => interopDefault(import('@shell/pages/404.vue')),
|
|
510
|
+
meta: { requiresAuthentication: true },
|
|
511
|
+
},
|
|
512
|
+
|
|
513
|
+
];
|
package/config/settings.ts
CHANGED
|
@@ -108,7 +108,7 @@ export const SETTING = {
|
|
|
108
108
|
USER_LAST_LOGIN_DEFAULT: 'user-last-login-default',
|
|
109
109
|
DISABLE_INACTIVE_USER_AFTER: 'disable-inactive-user-after',
|
|
110
110
|
DELETE_INACTIVE_USER_AFTER: 'delete-inactive-user-after',
|
|
111
|
-
};
|
|
111
|
+
} as const;
|
|
112
112
|
|
|
113
113
|
// These are the settings that are allowed to be edited via the UI
|
|
114
114
|
export const ALLOWED_SETTINGS: GlobalSetting = {
|
package/config/store.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Vuex from 'vuex';
|
|
3
|
-
|
|
4
|
-
Vue.use(Vuex);
|
|
1
|
+
import { createStore } from 'vuex';
|
|
5
2
|
|
|
6
3
|
const VUEX_PROPERTIES = ['state', 'getters', 'actions', 'mutations'];
|
|
7
4
|
|
|
@@ -77,7 +74,7 @@ let store = {};
|
|
|
77
74
|
|
|
78
75
|
// extendStore
|
|
79
76
|
export const extendStore = store instanceof Function ? store : () => {
|
|
80
|
-
return
|
|
77
|
+
return createStore(Object.assign({ strict: (process.env.NODE_ENV !== 'production') }, store));
|
|
81
78
|
};
|
|
82
79
|
|
|
83
80
|
function normalizeRoot(moduleData, filePath) {
|
package/config/types.js
CHANGED
|
@@ -93,6 +93,24 @@ export const WORKLOAD_TYPES = {
|
|
|
93
93
|
REPLICATION_CONTROLLER: 'replicationcontroller',
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
+
export const WORKLOAD_TYPE_TO_KIND_MAPPING = {
|
|
97
|
+
// Each deployment creates a replicaset and the metrics are published for a replicaset.
|
|
98
|
+
[WORKLOAD_TYPES.DEPLOYMENT]: 'ReplicaSet',
|
|
99
|
+
[WORKLOAD_TYPES.CRON_JOB]: 'CronJob',
|
|
100
|
+
[WORKLOAD_TYPES.DAEMON_SET]: 'DaemonSet',
|
|
101
|
+
[WORKLOAD_TYPES.JOB]: 'Job',
|
|
102
|
+
[WORKLOAD_TYPES.STATEFUL_SET]: 'StatefulSet',
|
|
103
|
+
[WORKLOAD_TYPES.REPLICA_SET]: 'ReplicaSet',
|
|
104
|
+
[WORKLOAD_TYPES.REPLICATION_CONTROLLER]: 'ReplicationController',
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export const METRICS_SUPPORTED_KINDS = [
|
|
108
|
+
WORKLOAD_TYPES.DAEMON_SET,
|
|
109
|
+
WORKLOAD_TYPES.REPLICA_SET,
|
|
110
|
+
WORKLOAD_TYPES.STATEFUL_SET,
|
|
111
|
+
WORKLOAD_TYPES.DEPLOYMENT
|
|
112
|
+
];
|
|
113
|
+
|
|
96
114
|
const {
|
|
97
115
|
DAEMON_SET, CRON_JOB, JOB, ...scalableWorkloads
|
|
98
116
|
} = WORKLOAD_TYPES;
|