@rancher/shell 0.3.14 → 0.3.16
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/images/providers/nutanix.svg +1 -0
- package/assets/translations/en-us.yaml +84 -3
- package/assets/translations/zh-hans.yaml +68 -26
- package/chart/gatekeeper.vue +2 -2
- package/chart/monitoring/alerting/index.vue +3 -3
- package/chart/monitoring/index.vue +2 -2
- package/chart/monitoring/prometheus/index.vue +1 -1
- package/chart/rancher-backup/index.vue +2 -2
- package/cloud-credential/generic.vue +1 -1
- package/cloud-credential/harvester.vue +2 -2
- package/components/AssignTo.vue +1 -1
- package/components/AwsComplianceBanner.vue +1 -1
- package/components/BackLink.vue +7 -0
- package/components/BannerGraphic.vue +1 -0
- package/components/BrandImage.vue +3 -3
- package/components/ClusterProviderIcon.vue +1 -1
- package/components/CommunityLinks.vue +2 -2
- package/components/ConsumptionGauge.vue +17 -2
- package/components/CruResource.vue +3 -2
- package/components/DashboardMetrics.vue +8 -0
- package/components/DetailTop.vue +1 -1
- package/components/EmberPage.vue +1 -0
- package/components/ExplorerMembers.vue +8 -8
- package/components/ExplorerProjectsNamespaces.vue +9 -9
- package/components/FixedBanner.vue +1 -1
- package/components/GlobalRoleBindings.vue +11 -11
- package/components/GrafanaDashboard.vue +14 -2
- package/components/GrowlManager.vue +1 -1
- package/components/HarvesterServiceAddOnConfig.vue +4 -3
- package/components/IconOrSvg.vue +10 -3
- package/components/LandingPagePreference.vue +2 -2
- package/components/MoveModal.vue +1 -1
- package/components/PodSecurityAdmission.vue +3 -3
- package/components/ProgressBarMulti.vue +2 -2
- package/components/PromptRemove.vue +52 -28
- package/components/PromptRestore.vue +3 -3
- package/components/Questions/index.vue +5 -5
- package/components/RelatedWorkloadsTable.vue +1 -1
- package/components/ResourceList/Masthead.vue +1 -1
- package/components/ResourceTable.vue +3 -3
- package/components/ResourceYaml.vue +1 -1
- package/components/RoleBindings.vue +2 -2
- package/components/SimpleBox.vue +1 -0
- package/components/SingleClusterInfo.vue +1 -1
- package/components/SortableTable/actions.js +3 -3
- package/components/SortableTable/advanced-filtering.js +7 -7
- package/components/SortableTable/filtering.js +1 -1
- package/components/SortableTable/index.vue +14 -10
- package/components/SortableTable/selection.js +5 -5
- package/components/SortableTable/sorting.js +5 -5
- package/components/Tabbed/index.vue +7 -7
- package/components/TableSparkLine.vue +1 -1
- package/components/Wizard.vue +11 -23
- package/components/__tests__/Collapse.spec.ts +1 -1
- package/components/__tests__/CruResource.test.ts +74 -0
- package/components/__tests__/SimpleBox.spec.ts +1 -1
- package/components/auth/RoleDetailEdit.vue +7 -3
- package/components/auth/SelectPrincipal.vue +3 -3
- package/components/fleet/FleetResources.vue +1 -1
- package/components/fleet/FleetStatus.vue +4 -4
- package/components/fleet/FleetSummary.vue +1 -1
- package/components/fleet/ForceDirectedTreeChart/chartIcons.js +1 -1
- package/components/fleet/ForceDirectedTreeChart/index.vue +1 -1
- package/components/form/ArrayList.vue +11 -3
- package/components/form/ArrayListSelect.vue +2 -2
- package/components/form/FileSelector.vue +6 -0
- package/components/form/GitPicker.vue +528 -0
- package/components/form/KeyValue.vue +82 -41
- package/components/form/LabeledSelect.vue +2 -2
- package/components/form/MatchExpressions.vue +2 -2
- package/components/form/Members/ClusterMembershipEditor.vue +1 -2
- package/components/form/Members/ClusterPermissionsEditor.vue +6 -5
- package/components/form/Members/MembershipEditor.vue +4 -4
- package/components/form/Members/ProjectMembershipEditor.vue +1 -2
- package/components/form/NameNsDescription.vue +13 -6
- package/components/form/Networking.vue +2 -2
- package/components/form/NodeScheduling.vue +1 -1
- package/components/form/PodAffinity.vue +7 -2
- package/components/form/ProjectMemberEditor.vue +4 -4
- package/components/form/ResourceQuota/Namespace.vue +2 -2
- package/components/form/ResourceQuota/NamespaceRow.vue +2 -2
- package/components/form/ResourceQuota/Project.vue +1 -1
- package/components/form/ResourceQuota/shared.js +2 -2
- package/components/form/ResourceSelector.vue +1 -1
- package/components/form/ResourceTabs/index.vue +1 -1
- package/components/form/RuleSelector.vue +1 -1
- package/components/form/SecretSelector.vue +4 -4
- package/components/form/Select.vue +2 -2
- package/components/form/SelectOrCreateAuthSecret.vue +3 -3
- package/components/form/ServiceNameSelect.vue +1 -1
- package/components/form/ServicePorts.vue +1 -1
- package/components/form/ShellInput.vue +1 -1
- package/components/form/SimpleSecretSelector.vue +4 -4
- package/components/form/Taints.vue +1 -1
- package/components/form/ValueFromResource.vue +3 -3
- package/components/form/WorkloadPorts.vue +8 -7
- package/components/form/__tests__/Error.test.ts +1 -1
- package/components/form/__tests__/KeyValue.test.ts +21 -0
- package/components/formatter/ClusterLink.vue +1 -1
- package/components/formatter/ClusterProvider.vue +13 -2
- package/components/formatter/Endpoints.vue +1 -1
- package/components/formatter/FleetSummaryGraph.vue +2 -2
- package/components/formatter/IngressTarget.vue +2 -2
- package/components/formatter/PodImages.vue +1 -1
- package/components/formatter/PrincipalGroupBindings.vue +1 -1
- package/components/formatter/ReceiverIcons.vue +3 -3
- package/components/formatter/ServiceType.vue +1 -1
- package/components/formatter/WorkloadDetailEndpoints.vue +1 -1
- package/components/formatter/WorkloadHealthScale.vue +1 -1
- package/components/formatter/__tests__/LiveDate.test.ts +1 -1
- package/components/graph/Bar.vue +1 -1
- package/components/graph/LinePlot.vue +3 -3
- package/components/nav/Group.vue +2 -2
- package/components/nav/Header.vue +5 -5
- package/components/nav/NamespaceFilter.vue +14 -14
- package/components/nav/TopLevelMenu.vue +76 -11
- package/components/nav/WindowManager/ContainerLogs.vue +2 -2
- package/components/nav/WindowManager/ContainerShell.vue +1 -1
- package/components/nav/WorkspaceSwitcher.vue +1 -1
- package/config/home-links.js +4 -4
- package/config/labels-annotations.js +8 -9
- package/config/pod-security-admission.ts +1 -1
- package/config/product/auth.js +5 -5
- package/config/product/explorer.js +14 -0
- package/config/store.js +2 -0
- package/config/table-headers.js +13 -13
- package/config/uiplugins.js +8 -1
- package/core/plugin-routes.ts +3 -2
- package/core/plugin.ts +3 -3
- package/core/plugins.js +7 -7
- package/creators/pkg/files/index.ts +1 -1
- package/detail/catalog.cattle.io.clusterrepo.vue +8 -1
- package/detail/cis.cattle.io.clusterscan.vue +3 -3
- package/detail/fleet.cattle.io.bundle.vue +1 -1
- package/detail/helm.cattle.io.projecthelmchart.vue +16 -29
- package/detail/management.cattle.io.user.vue +12 -12
- package/detail/namespace.vue +4 -4
- package/detail/networking.k8s.io.ingress.vue +3 -3
- package/detail/node.vue +2 -2
- package/detail/provisioning.cattle.io.cluster.vue +9 -10
- package/detail/service.vue +1 -1
- package/detail/workload/index.vue +3 -3
- package/dialog/AddProjectMemberDialog.vue +2 -2
- package/dialog/DrainNode.vue +1 -1
- package/dialog/GenericPrompt.vue +9 -5
- package/dialog/RotateEncryptionKeyDialog.vue +2 -2
- package/dialog/ScaleMachineDownDialog.vue +2 -2
- package/edit/__tests__/monitoring.coreos.com.prometheusrule.test.ts +56 -0
- package/edit/auth/azuread.vue +3 -3
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +5 -5
- package/edit/cis.cattle.io.clusterscan.vue +5 -5
- package/edit/cloudcredential.vue +4 -4
- package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +1 -1
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +4 -4
- package/edit/fleet.cattle.io.gitrepo.vue +6 -6
- package/edit/helm.cattle.io.projecthelmchart.vue +3 -3
- package/edit/logging-flow/index.vue +4 -4
- package/edit/logging.banzaicloud.io.output/index.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/forward.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/logz.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +1 -1
- package/edit/management.cattle.io.clusterroletemplatebinding.vue +1 -1
- package/edit/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +1 -1
- package/edit/management.cattle.io.project.vue +3 -3
- package/edit/management.cattle.io.projectroletemplatebinding.vue +2 -2
- package/edit/management.cattle.io.setting.vue +1 -1
- package/edit/management.cattle.io.user.vue +2 -2
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +2 -2
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +3 -3
- package/edit/monitoring.coreos.com.prometheusrule/GroupRules.vue +5 -5
- package/edit/monitoring.coreos.com.prometheusrule/duration.js +1 -1
- package/edit/monitoring.coreos.com.prometheusrule/index.vue +8 -3
- package/edit/monitoring.coreos.com.receiver/auth.vue +2 -2
- package/edit/monitoring.coreos.com.receiver/tls.vue +3 -4
- package/edit/monitoring.coreos.com.receiver/types/__tests__/email.test.ts +53 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +2 -0
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +3 -3
- package/edit/monitoring.coreos.com.receiver/types/webhook.add.vue +1 -1
- package/edit/monitoring.coreos.com.route.vue +2 -2
- package/edit/namespace.vue +21 -13
- package/edit/networking.k8s.io.ingress/Certificate.vue +2 -2
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
- package/edit/networking.k8s.io.ingress/RulePath.vue +2 -2
- package/edit/networking.k8s.io.ingress/Rules.vue +2 -2
- package/edit/networking.k8s.io.ingress/index.vue +4 -4
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +3 -3
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
- package/edit/persistentvolume/index.vue +4 -4
- package/edit/persistentvolumeclaim.vue +3 -3
- package/edit/provisioning.cattle.io.cluster/RegistryMirrors.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/import.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/index.vue +7 -7
- package/edit/provisioning.cattle.io.cluster/rke2.vue +28 -29
- package/edit/resources.cattle.io.backup.vue +2 -2
- package/edit/resources.cattle.io.restore.vue +3 -3
- package/edit/secret/generic.vue +1 -1
- package/edit/secret/index.vue +3 -3
- package/edit/service.vue +3 -21
- package/edit/serviceaccount.vue +2 -2
- package/edit/storage.k8s.io.storageclass/index.vue +4 -4
- package/edit/storage.k8s.io.storageclass/provisioners/driver.harvesterhci.io.vue +1 -1
- package/edit/token.vue +5 -5
- package/edit/workload/index.vue +1 -1
- package/edit/workload/mixins/workload.js +8 -8
- package/edit/workload/storage/ContainerMountPaths.vue +9 -9
- package/edit/workload/storage/Mount.vue +2 -2
- package/edit/workload/storage/csi/index.vue +1 -1
- package/edit/workload/storage/ephemeralVolume/index.vue +1 -1
- package/edit/workload/storage/index.vue +6 -6
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +2 -2
- package/initialize/client.js +8 -8
- package/initialize/index.js +1 -4
- package/layouts/default.vue +38 -11
- package/list/catalog.cattle.io.clusterrepo.vue +9 -1
- package/list/cis.cattle.io.clusterscan.vue +1 -1
- package/list/fleet.cattle.io.cluster.vue +2 -2
- package/list/group.principal.vue +1 -1
- package/list/helm.cattle.io.projecthelmchart.vue +2 -2
- package/list/management.cattle.io.cluster.vue +1 -1
- package/list/management.cattle.io.feature.vue +1 -1
- package/list/management.cattle.io.user.vue +2 -2
- package/list/node.vue +5 -5
- package/list/provisioning.cattle.io.cluster.vue +4 -5
- package/machine-config/amazonec2.vue +2 -2
- package/machine-config/digitalocean.vue +4 -4
- package/machine-config/linode.vue +4 -4
- package/machine-config/vmwarevsphere.vue +12 -12
- package/middleware/authenticated.js +7 -6
- package/mixins/brand.js +1 -1
- package/mixins/chart.js +6 -6
- package/mixins/fetch.client.js +2 -2
- package/mixins/form-validation.js +7 -7
- package/mixins/resource-fetch-namespaced.js +1 -1
- package/mixins/resource-fetch.js +2 -2
- package/models/apps.statefulset.js +2 -2
- package/models/batch.cronjob.js +1 -1
- package/models/catalog.cattle.io.app.js +4 -4
- package/models/cis.cattle.io.clusterscan.js +1 -1
- package/models/cis.cattle.io.clusterscanbenchmark.js +1 -1
- package/models/cis.cattle.io.clusterscanreport.js +1 -1
- package/models/cloudcredential.js +1 -1
- package/models/cluster/node.js +5 -5
- package/models/cluster.x-k8s.io.machinedeployment.js +2 -2
- package/models/fleet.cattle.io.gitrepo.js +3 -3
- package/models/group.principal.js +4 -4
- package/models/helm.cattle.io.projecthelmchart.js +2 -2
- package/models/logging.banzaicloud.io.clusterflow.js +2 -2
- package/models/logging.banzaicloud.io.flow.js +5 -5
- package/models/logging.banzaicloud.io.output.js +2 -2
- package/models/management.cattle.io.cluster.js +10 -14
- package/models/management.cattle.io.globalrole.js +4 -4
- package/models/management.cattle.io.node.js +2 -2
- package/models/management.cattle.io.nodepool.js +3 -3
- package/models/management.cattle.io.nodetemplate.js +4 -4
- package/models/management.cattle.io.project.js +2 -2
- package/models/management.cattle.io.roletemplate.js +1 -1
- package/models/management.cattle.io.setting.js +1 -1
- package/models/management.cattle.io.user.js +5 -5
- package/models/monitoring.coreos.com.receiver.js +9 -9
- package/models/namespace.js +1 -1
- package/models/networking.k8s.io.ingress.js +5 -5
- package/models/persistentvolume.js +3 -3
- package/models/pod.js +3 -3
- package/models/provisioning.cattle.io.cluster.js +39 -27
- package/models/rbac.authorization.k8s.io.clusterrole.js +2 -2
- package/models/rbac.authorization.k8s.io.role.js +3 -3
- package/models/secret.js +1 -1
- package/models/service.js +2 -2
- package/models/storage.k8s.io.storageclass.js +2 -2
- package/models/token.js +1 -1
- package/models/workload.js +6 -6
- package/models/workload.service.js +5 -21
- package/package.json +3 -2
- package/pages/about.vue +9 -9
- package/pages/account/index.vue +2 -2
- package/pages/auth/login.vue +25 -12
- package/pages/auth/setup.vue +4 -0
- package/pages/auth/verify.vue +6 -0
- package/pages/c/_cluster/apps/charts/index.vue +4 -4
- package/pages/c/_cluster/apps/charts/install.vue +28 -20
- package/pages/c/_cluster/auth/roles/index.vue +10 -10
- package/pages/c/_cluster/explorer/index.vue +41 -16
- package/pages/c/_cluster/explorer/tools/index.vue +8 -8
- package/pages/c/_cluster/fleet/GitRepoGraphConfig.js +1 -1
- package/pages/c/_cluster/fleet/index.vue +11 -11
- package/pages/c/_cluster/monitoring/index.vue +1 -1
- package/pages/c/_cluster/settings/links.vue +3 -3
- package/pages/c/_cluster/settings/performance.vue +1 -1
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +6 -6
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +3 -3
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +3 -3
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +1 -1
- package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +3 -3
- package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +6 -6
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +4 -4
- package/pages/c/_cluster/uiplugins/index.vue +22 -19
- package/pages/diagnostic.vue +6 -6
- package/pages/home.vue +8 -3
- package/pages/prefs.vue +2 -2
- package/pages/rio/mesh.vue +3 -3
- package/pages/support/index.vue +10 -1
- package/pkg/auto-import.js +1 -1
- package/pkg/tsconfig.json +1 -0
- package/pkg/vue.config.js +1 -1
- package/plugins/axios.js +1 -1
- package/plugins/clean-html-directive.js +1 -1
- package/plugins/dashboard-store/__tests__/mutations.spec.js +4 -4
- package/plugins/dashboard-store/actions.js +4 -4
- package/plugins/dashboard-store/getters.js +1 -1
- package/plugins/dashboard-store/index.js +1 -1
- package/plugins/dashboard-store/mutations.js +2 -2
- package/plugins/dashboard-store/resource-class.js +8 -8
- package/plugins/i18n.js +1 -1
- package/plugins/plugin.js +5 -1
- package/plugins/steve/actions.js +25 -3
- package/plugins/steve/getters.js +3 -3
- package/plugins/steve/hybrid-class.js +1 -1
- package/plugins/steve/mutations.js +1 -1
- package/plugins/steve/performanceTesting.js +1 -1
- package/plugins/steve/resourceWatcher.js +1 -1
- package/plugins/steve/subscribe.js +6 -6
- package/plugins/steve/worker/web-worker.basic.js +1 -1
- package/promptRemove/management.cattle.io.project.vue +3 -3
- package/promptRemove/mixin/roleDeletionCheck.js +4 -4
- package/promptRemove/pod.vue +1 -1
- package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +2 -2
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +1 -1
- package/rancher-components/components/Form/Radio/RadioButton.test.ts +1 -1
- package/rancher-components/components/Form/Radio/RadioButton.vue +2 -2
- package/rancher-components/components/Form/Radio/RadioGroup.vue +2 -2
- package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +1 -0
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +1 -1
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +7 -7
- package/rancher-components/components/StringList/StringList.test.ts +10 -9
- package/rancher-components/components/StringList/StringList.vue +5 -5
- package/scripts/extension/helm/charts/ui-plugin-server/Chart.yaml +1 -1
- package/store/action-menu.js +4 -4
- package/store/auth.js +40 -7
- package/store/aws.js +1 -1
- package/store/catalog.js +12 -11
- package/store/digitalocean.js +4 -4
- package/store/features.js +1 -0
- package/store/github.js +70 -213
- package/store/gitlab.js +159 -0
- package/store/growl.js +1 -1
- package/store/i18n.js +7 -7
- package/store/index.js +63 -22
- package/store/linode.js +1 -1
- package/store/plugins.js +5 -5
- package/store/pnap.js +1 -1
- package/store/prefs.js +6 -6
- package/store/resource-fetch.js +3 -3
- package/store/type-map.js +61 -42
- package/store/uiplugins.ts +2 -1
- package/store/wm.js +5 -4
- package/tsconfig.default.json +10 -0
- package/tsconfig.json +2 -9
- package/types/shell/index.d.ts +10 -2
- package/utils/__tests__/version.test.ts +28 -0
- package/utils/alertmanagerconfig.js +4 -4
- package/utils/array.ts +4 -4
- package/utils/async.ts +1 -1
- package/utils/auth.js +3 -3
- package/utils/axios.js +5 -5
- package/utils/cluster.js +4 -3
- package/utils/color.js +10 -0
- package/utils/create-yaml.js +4 -4
- package/utils/crypto/browserHashUtils.js +1 -1
- package/utils/crypto/browserMd5.js +1 -1
- package/utils/crypto/browserSha1.js +1 -1
- package/utils/crypto/browserSha256.js +1 -1
- package/utils/crypto/index.js +3 -3
- package/utils/favicon.js +2 -3
- package/utils/gatekeeper/util.js +3 -3
- package/utils/gc/gc.ts +2 -2
- package/utils/git.ts +92 -0
- package/utils/grafana.js +4 -4
- package/utils/monitoring.js +2 -2
- package/utils/nuxt.js +2 -2
- package/utils/object.js +5 -5
- package/utils/pod-security-admission.ts +1 -1
- package/utils/projectAndNamespaceFiltering.utils.ts +1 -1
- package/utils/select.js +2 -2
- package/utils/selector.js +2 -2
- package/utils/settings.ts +17 -2
- package/utils/socket.js +30 -6
- package/utils/sort.js +1 -1
- package/utils/string.js +1 -1
- package/utils/url.ts +1 -1
- package/utils/validators/formRules/index.ts +3 -3
- package/utils/validators/role-template.js +4 -4
- package/utils/version.js +14 -1
- package/vue.config.js +19 -13
- package/components/form/GithubPicker.vue +0 -390
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
CAPI, MANAGEMENT, NORMAN, SNAPSHOT, HCI
|
|
3
|
+
} from '@shell/config/types';
|
|
2
4
|
import SteveModel from '@shell/plugins/steve/steve-class';
|
|
3
5
|
import { findBy } from '@shell/utils/array';
|
|
4
6
|
import { get, set } from '@shell/utils/object';
|
|
@@ -6,6 +8,7 @@ import { sortBy } from '@shell/utils/sort';
|
|
|
6
8
|
import { ucFirst } from '@shell/utils/string';
|
|
7
9
|
import { compare } from '@shell/utils/version';
|
|
8
10
|
import { AS, MODE, _VIEW, _YAML } from '@shell/config/query-params';
|
|
11
|
+
import { HARVESTER_NAME as HARVESTER } from '@shell/config/features';
|
|
9
12
|
|
|
10
13
|
/**
|
|
11
14
|
* Class representing Cluster resource.
|
|
@@ -34,7 +37,7 @@ export default class ProvCluster extends SteveModel {
|
|
|
34
37
|
label: this.t('cluster.detail.machines'),
|
|
35
38
|
content: this.desired,
|
|
36
39
|
},
|
|
37
|
-
].filter(x => !!x.content);
|
|
40
|
+
].filter((x) => !!x.content);
|
|
38
41
|
|
|
39
42
|
// RKE Template details
|
|
40
43
|
const rkeTemplate = this.rkeTemplate;
|
|
@@ -88,7 +91,7 @@ export default class ProvCluster extends SteveModel {
|
|
|
88
91
|
|
|
89
92
|
// Don't let the user delete the local cluster from the UI
|
|
90
93
|
if (isLocal) {
|
|
91
|
-
const remove = out.findIndex(a => a.action === 'promptRemove');
|
|
94
|
+
const remove = out.findIndex((a) => a.action === 'promptRemove');
|
|
92
95
|
|
|
93
96
|
if (remove > -1) {
|
|
94
97
|
out.splice(remove, 1);
|
|
@@ -185,6 +188,18 @@ export default class ProvCluster extends SteveModel {
|
|
|
185
188
|
this.currentRouter().push(location);
|
|
186
189
|
}
|
|
187
190
|
|
|
191
|
+
async goToHarvesterCluster() {
|
|
192
|
+
const harvesterCluster = await this.$dispatch('create', {
|
|
193
|
+
...this,
|
|
194
|
+
type: HCI.CLUSTER
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
try {
|
|
198
|
+
await harvesterCluster.goToCluster();
|
|
199
|
+
} catch {
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
188
203
|
goToViewYaml() {
|
|
189
204
|
let location;
|
|
190
205
|
|
|
@@ -317,7 +332,7 @@ export default class ProvCluster extends SteveModel {
|
|
|
317
332
|
get provisioner() {
|
|
318
333
|
if ( this.isRke2 ) {
|
|
319
334
|
const allKeys = Object.keys(this.spec);
|
|
320
|
-
const configKey = allKeys.find( k => k.endsWith('Config'));
|
|
335
|
+
const configKey = allKeys.find( (k) => k.endsWith('Config'));
|
|
321
336
|
|
|
322
337
|
if ( configKey === 'rkeConfig') {
|
|
323
338
|
return 'rke2';
|
|
@@ -346,6 +361,10 @@ export default class ProvCluster extends SteveModel {
|
|
|
346
361
|
return this.$rootGetters['i18n/withFallback'](`cluster.provider."${ provisioner }"`, null, ucFirst(provisioner));
|
|
347
362
|
}
|
|
348
363
|
|
|
364
|
+
get providerLogo() {
|
|
365
|
+
return this.mgmt?.providerLogo;
|
|
366
|
+
}
|
|
367
|
+
|
|
349
368
|
get kubernetesVersion() {
|
|
350
369
|
const unknown = this.$rootGetters['i18n/t']('generic.unknown');
|
|
351
370
|
|
|
@@ -362,7 +381,9 @@ export default class ProvCluster extends SteveModel {
|
|
|
362
381
|
}
|
|
363
382
|
|
|
364
383
|
get machineProvider() {
|
|
365
|
-
if (
|
|
384
|
+
if (this.isHarvester) {
|
|
385
|
+
return HARVESTER;
|
|
386
|
+
} else if ( this.isImported ) {
|
|
366
387
|
return null;
|
|
367
388
|
} else if ( this.isRke2 ) {
|
|
368
389
|
const kind = this.spec?.rkeConfig?.machinePools?.[0]?.machineConfigRef?.kind?.toLowerCase();
|
|
@@ -418,7 +439,7 @@ export default class ProvCluster extends SteveModel {
|
|
|
418
439
|
}
|
|
419
440
|
|
|
420
441
|
get nodes() {
|
|
421
|
-
return this.$rootGetters['management/all'](MANAGEMENT.NODE).filter(node => node.id.startsWith(this.mgmtClusterId));
|
|
442
|
+
return this.$rootGetters['management/all'](MANAGEMENT.NODE).filter((node) => node.id.startsWith(this.mgmtClusterId));
|
|
422
443
|
}
|
|
423
444
|
|
|
424
445
|
get machines() {
|
|
@@ -440,13 +461,13 @@ export default class ProvCluster extends SteveModel {
|
|
|
440
461
|
}
|
|
441
462
|
|
|
442
463
|
get pools() {
|
|
443
|
-
const deployments = this.$rootGetters['management/all'](CAPI.MACHINE_DEPLOYMENT).filter(pool => pool.spec?.clusterName === this.metadata.name);
|
|
464
|
+
const deployments = this.$rootGetters['management/all'](CAPI.MACHINE_DEPLOYMENT).filter((pool) => pool.spec?.clusterName === this.metadata.name);
|
|
444
465
|
|
|
445
466
|
if (!!deployments.length) {
|
|
446
467
|
return deployments;
|
|
447
468
|
}
|
|
448
469
|
|
|
449
|
-
return this.$rootGetters['management/all'](MANAGEMENT.NODE_POOL).filter(pool => pool.spec.clusterName === this.status?.clusterName);
|
|
470
|
+
return this.$rootGetters['management/all'](MANAGEMENT.NODE_POOL).filter((pool) => pool.spec.clusterName === this.status?.clusterName);
|
|
450
471
|
}
|
|
451
472
|
|
|
452
473
|
get desired() {
|
|
@@ -473,7 +494,7 @@ export default class ProvCluster extends SteveModel {
|
|
|
473
494
|
if (this.isReady) {
|
|
474
495
|
if (this.isRke1) {
|
|
475
496
|
const names = this.nodes.filter((node) => {
|
|
476
|
-
return node.status.conditions.find(c => c.error && c.type === 'Ready');
|
|
497
|
+
return node.status.conditions.find((c) => c.error && c.type === 'Ready');
|
|
477
498
|
}).map((node) => {
|
|
478
499
|
const name = node.status.nodeName || node.metadata.name;
|
|
479
500
|
|
|
@@ -483,7 +504,7 @@ export default class ProvCluster extends SteveModel {
|
|
|
483
504
|
return names.join('<br>');
|
|
484
505
|
} else {
|
|
485
506
|
const names = this.machines.filter((machine) => {
|
|
486
|
-
return machine.status?.conditions?.find(c => c.error && c.type === 'NodeHealthy');
|
|
507
|
+
return machine.status?.conditions?.find((c) => c.error && c.type === 'NodeHealthy');
|
|
487
508
|
}).map((machine) => {
|
|
488
509
|
if (machine.status?.nodeRef?.name) {
|
|
489
510
|
return this.t('cluster.availabilityWarnings.node', { name: machine.status.nodeRef.name });
|
|
@@ -529,7 +550,7 @@ export default class ProvCluster extends SteveModel {
|
|
|
529
550
|
value: this.ready,
|
|
530
551
|
sort: 4,
|
|
531
552
|
},
|
|
532
|
-
].filter(x => x.value > 0);
|
|
553
|
+
].filter((x) => x.value > 0);
|
|
533
554
|
|
|
534
555
|
return sortBy(out, 'sort:desc');
|
|
535
556
|
}
|
|
@@ -606,7 +627,7 @@ export default class ProvCluster extends SteveModel {
|
|
|
606
627
|
return row.takeSnapshot();
|
|
607
628
|
}));
|
|
608
629
|
|
|
609
|
-
const successful = res.filter( x => x.status === 'fulfilled').length;
|
|
630
|
+
const successful = res.filter( (x) => x.status === 'fulfilled').length;
|
|
610
631
|
|
|
611
632
|
if ( successful ) {
|
|
612
633
|
this.$dispatch('growl/success', {
|
|
@@ -649,7 +670,7 @@ export default class ProvCluster extends SteveModel {
|
|
|
649
670
|
const allSnapshots = this.$rootGetters['management/all']({ type: SNAPSHOT });
|
|
650
671
|
|
|
651
672
|
return allSnapshots
|
|
652
|
-
.filter(s => s.metadata.namespace === this.namespace && s.clusterName === this.name );
|
|
673
|
+
.filter((s) => s.metadata.namespace === this.namespace && s.clusterName === this.name );
|
|
653
674
|
}
|
|
654
675
|
|
|
655
676
|
restoreSnapshotAction(resource = this) {
|
|
@@ -679,15 +700,6 @@ export default class ProvCluster extends SteveModel {
|
|
|
679
700
|
}
|
|
680
701
|
|
|
681
702
|
get stateObj() {
|
|
682
|
-
if ( this.isHarvester) {
|
|
683
|
-
return {
|
|
684
|
-
error: true,
|
|
685
|
-
message: this.$rootGetters['i18n/t']('cluster.harvester.warning.label'),
|
|
686
|
-
name: this.$rootGetters['i18n/t']('cluster.harvester.warning.state'),
|
|
687
|
-
transitioning: false
|
|
688
|
-
};
|
|
689
|
-
}
|
|
690
|
-
|
|
691
703
|
return this._stateObj;
|
|
692
704
|
}
|
|
693
705
|
|
|
@@ -704,8 +716,8 @@ export default class ProvCluster extends SteveModel {
|
|
|
704
716
|
|
|
705
717
|
const clusterTemplateName = this.mgmt.spec.clusterTemplateName.replace(':', '/');
|
|
706
718
|
const clusterTemplateRevisionName = this.mgmt.spec.clusterTemplateRevisionName.replace(':', '/');
|
|
707
|
-
const template = this.$rootGetters['management/all'](MANAGEMENT.RKE_TEMPLATE).find(t => t.id === clusterTemplateName);
|
|
708
|
-
const revision = this.$rootGetters['management/all'](MANAGEMENT.RKE_TEMPLATE_REVISION).find(t => t.spec.enabled && t.id === clusterTemplateRevisionName);
|
|
719
|
+
const template = this.$rootGetters['management/all'](MANAGEMENT.RKE_TEMPLATE).find((t) => t.id === clusterTemplateName);
|
|
720
|
+
const revision = this.$rootGetters['management/all'](MANAGEMENT.RKE_TEMPLATE_REVISION).find((t) => t.spec.enabled && t.id === clusterTemplateRevisionName);
|
|
709
721
|
|
|
710
722
|
if (!template || !revision) {
|
|
711
723
|
return false;
|
|
@@ -733,7 +745,7 @@ export default class ProvCluster extends SteveModel {
|
|
|
733
745
|
const clusterTemplateRevisionName = this.mgmt.spec.clusterTemplateRevisionName.replace(':', '/');
|
|
734
746
|
|
|
735
747
|
// Get all of the template revisions for this template
|
|
736
|
-
const revisions = this.$rootGetters['management/all'](MANAGEMENT.RKE_TEMPLATE_REVISION).filter(t => t.spec.enabled && t.spec.clusterTemplateName === this.mgmt.spec.clusterTemplateName);
|
|
748
|
+
const revisions = this.$rootGetters['management/all'](MANAGEMENT.RKE_TEMPLATE_REVISION).filter((t) => t.spec.enabled && t.spec.clusterTemplateName === this.mgmt.spec.clusterTemplateName);
|
|
737
749
|
|
|
738
750
|
if (revisions.length <= 1) {
|
|
739
751
|
// Only one template revision
|
|
@@ -795,7 +807,7 @@ export default class ProvCluster extends SteveModel {
|
|
|
795
807
|
get agentConfig() {
|
|
796
808
|
// The one we want is the first one with no selector.
|
|
797
809
|
// If there are multiple with no selector, that will fall under the unsupported message below.
|
|
798
|
-
return this.spec.rkeConfig.machineSelectorConfig.find(x => !x.machineLabelSelector).config;
|
|
810
|
+
return this.spec.rkeConfig.machineSelectorConfig.find((x) => !x.machineLabelSelector).config;
|
|
799
811
|
}
|
|
800
812
|
|
|
801
813
|
get cloudProvider() {
|
|
@@ -849,6 +861,6 @@ export default class ProvCluster extends SteveModel {
|
|
|
849
861
|
}
|
|
850
862
|
|
|
851
863
|
get hasError() {
|
|
852
|
-
return this.status?.conditions?.some(condition => condition.error === true);
|
|
864
|
+
return this.status?.conditions?.some((condition) => condition.error === true);
|
|
853
865
|
}
|
|
854
866
|
}
|
|
@@ -8,10 +8,10 @@ export default class ClusterRole extends Role {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
get namespaceResources() {
|
|
11
|
-
return this.allResources.filter(r => r.attributes.namespaced && !r.attributes.group.includes(CATTLE_API_GROUP));
|
|
11
|
+
return this.allResources.filter((r) => r.attributes.namespaced && !r.attributes.group.includes(CATTLE_API_GROUP));
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
get resources() {
|
|
15
|
-
return uniq(this.namespaceResources.map(r => r.attributes?.kind)).sort();
|
|
15
|
+
return uniq(this.namespaceResources.map((r) => r.attributes?.kind)).sort();
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -31,15 +31,15 @@ export default class Role extends SteveModel {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
get allResources() {
|
|
34
|
-
return this.$getters['all'](SCHEMA).filter(r => r.attributes?.kind);
|
|
34
|
+
return this.$getters['all'](SCHEMA).filter((r) => r.attributes?.kind);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
get clusterResources() {
|
|
38
|
-
return this.allResources.filter(r => !r.attributes.namespaced && !r.attributes.group.includes(CATTLE_API_GROUP));
|
|
38
|
+
return this.allResources.filter((r) => !r.attributes.namespaced && !r.attributes.group.includes(CATTLE_API_GROUP));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
get resources() {
|
|
42
|
-
return uniq(this.clusterResources.map(r => r.attributes?.kind)).sort();
|
|
42
|
+
return uniq(this.clusterResources.map((r) => r.attributes?.kind)).sort();
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
set displayName(v) {
|
package/models/secret.js
CHANGED
|
@@ -293,7 +293,7 @@ export default class Secret extends SteveModel {
|
|
|
293
293
|
get unrepeatedSans() {
|
|
294
294
|
if (this._type === TYPES.TLS ) {
|
|
295
295
|
if (this.certInfo?.sans?.filter) {
|
|
296
|
-
const commonBases = this.certInfo?.sans.filter(name => name.indexOf('*.') === 0 || name.indexOf('www.') === 0).map(name => name.substr(name.indexOf('.')));
|
|
296
|
+
const commonBases = this.certInfo?.sans.filter((name) => name.indexOf('*.') === 0 || name.indexOf('www.') === 0).map((name) => name.substr(name.indexOf('.')));
|
|
297
297
|
const displaySans = removeObjects(this.certInfo?.sans, commonBases);
|
|
298
298
|
|
|
299
299
|
return displaySans;
|
package/models/service.js
CHANGED
|
@@ -99,7 +99,7 @@ export default class extends SteveModel {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
if (this.serviceType === 'LoadBalancer') {
|
|
102
|
-
const statusIps = this.status.loadBalancer?.ingress?.map(ingress => ingress.hostname || ingress.ip).join(', ');
|
|
102
|
+
const statusIps = this.status.loadBalancer?.ingress?.map((ingress) => ingress.hostname || ingress.ip).join(', ');
|
|
103
103
|
|
|
104
104
|
const loadbalancerInfo = loadBalancerIP || statusIps || '';
|
|
105
105
|
|
|
@@ -131,7 +131,7 @@ export default class extends SteveModel {
|
|
|
131
131
|
get podRelationship() {
|
|
132
132
|
const { metadata:{ relationships = [] } } = this;
|
|
133
133
|
|
|
134
|
-
return (relationships || []).filter(relationship => relationship.toType === POD)[0];
|
|
134
|
+
return (relationships || []).filter((relationship) => relationship.toType === POD)[0];
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
async fetchPods() {
|
|
@@ -83,7 +83,7 @@ export const PROVISIONER_OPTIONS = [
|
|
|
83
83
|
|
|
84
84
|
export default class extends SteveModel {
|
|
85
85
|
get provisionerDisplay() {
|
|
86
|
-
const option = PROVISIONER_OPTIONS.find(o => o.value === this.provisioner);
|
|
86
|
+
const option = PROVISIONER_OPTIONS.find((o) => o.value === this.provisioner);
|
|
87
87
|
const fallback = `${ this.provisioner } ${ this.t('persistentVolume.csi.drivers.suffix') }`;
|
|
88
88
|
|
|
89
89
|
return option ? this.t(option.labelKey) : this.$rootGetters['i18n/withFallback'](`persistentVolume.csi.drivers.${ this.provisioner.replaceAll('.', '-') }`, null, fallback);
|
|
@@ -115,7 +115,7 @@ export default class extends SteveModel {
|
|
|
115
115
|
setDefault() {
|
|
116
116
|
const allStorageClasses = this.$rootGetters['cluster/all'](STORAGE_CLASS) || [];
|
|
117
117
|
|
|
118
|
-
allStorageClasses.forEach(storageClass => storageClass.resetDefault());
|
|
118
|
+
allStorageClasses.forEach((storageClass) => storageClass.resetDefault());
|
|
119
119
|
this.updateDefault(true);
|
|
120
120
|
}
|
|
121
121
|
|
package/models/token.js
CHANGED
|
@@ -3,7 +3,7 @@ import NormanModel from '@shell/plugins/steve/norman-class';
|
|
|
3
3
|
|
|
4
4
|
export default class extends NormanModel {
|
|
5
5
|
get _availableActions() {
|
|
6
|
-
return super._availableActions.filter(a => ['viewInApi', 'promptRemove'].includes(a.action));
|
|
6
|
+
return super._availableActions.filter((a) => ['viewInApi', 'promptRemove'].includes(a.action));
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
get state() {
|
package/models/workload.js
CHANGED
|
@@ -452,8 +452,8 @@ export default class Workload extends WorkloadService {
|
|
|
452
452
|
async getPortsWithServiceType() {
|
|
453
453
|
const ports = [];
|
|
454
454
|
|
|
455
|
-
this.containers.forEach(container => ports.push(...(container.ports || [])));
|
|
456
|
-
(this.initContainers || []).forEach(container => ports.push(...(container.ports || [])));
|
|
455
|
+
this.containers.forEach((container) => ports.push(...(container.ports || [])));
|
|
456
|
+
(this.initContainers || []).forEach((container) => ports.push(...(container.ports || [])));
|
|
457
457
|
|
|
458
458
|
// Only get services owned if we can access the service resource
|
|
459
459
|
const canAccessServices = this.$getters['schemaFor'](SERVICE);
|
|
@@ -548,7 +548,7 @@ export default class Workload extends WorkloadService {
|
|
|
548
548
|
|
|
549
549
|
get pods() {
|
|
550
550
|
const relationships = this.metadata?.relationships || [];
|
|
551
|
-
const podRelationship = relationships.filter(relationship => relationship.toType === POD)[0];
|
|
551
|
+
const podRelationship = relationships.filter((relationship) => relationship.toType === POD)[0];
|
|
552
552
|
|
|
553
553
|
if (podRelationship) {
|
|
554
554
|
const pods = this.$getters['podsByNamespace'](this.metadata.namespace);
|
|
@@ -590,7 +590,7 @@ export default class Workload extends WorkloadService {
|
|
|
590
590
|
return undefined;
|
|
591
591
|
}
|
|
592
592
|
|
|
593
|
-
return (get(this, 'metadata.relationships') || []).filter(relationship => relationship.toType === WORKLOAD_TYPES.JOB);
|
|
593
|
+
return (get(this, 'metadata.relationships') || []).filter((relationship) => relationship.toType === WORKLOAD_TYPES.JOB);
|
|
594
594
|
}
|
|
595
595
|
|
|
596
596
|
get jobs() {
|
|
@@ -600,7 +600,7 @@ export default class Workload extends WorkloadService {
|
|
|
600
600
|
|
|
601
601
|
return this.jobRelationships.map((obj) => {
|
|
602
602
|
return this.$getters['byId'](WORKLOAD_TYPES.JOB, obj.toId );
|
|
603
|
-
}).filter(x => !!x);
|
|
603
|
+
}).filter((x) => !!x);
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
get jobGauges() {
|
|
@@ -643,7 +643,7 @@ export default class Workload extends WorkloadService {
|
|
|
643
643
|
|
|
644
644
|
async matchingPods() {
|
|
645
645
|
const all = await this.$dispatch('findAll', { type: POD });
|
|
646
|
-
const allInNamespace = all.filter(pod => pod.metadata.namespace === this.metadata.namespace);
|
|
646
|
+
const allInNamespace = all.filter((pod) => pod.metadata.namespace === this.metadata.namespace);
|
|
647
647
|
|
|
648
648
|
const selector = convertSelectorObj(this.spec.selector);
|
|
649
649
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { findBy } from '@shell/utils/array';
|
|
3
3
|
import { TARGET_WORKLOADS, UI_MANAGED, HCI as HCI_LABELS_ANNOTATIONS } from '@shell/config/labels-annotations';
|
|
4
|
-
import { WORKLOAD_TYPES, SERVICE
|
|
4
|
+
import { WORKLOAD_TYPES, SERVICE } from '@shell/config/types';
|
|
5
5
|
import { clone, get } from '@shell/utils/object';
|
|
6
6
|
import SteveModel from '@shell/plugins/steve/steve-class';
|
|
7
7
|
import { shortenedImage } from '@shell/utils/string';
|
|
@@ -10,8 +10,8 @@ export default class WorkloadService extends SteveModel {
|
|
|
10
10
|
async getPortsWithServiceType() {
|
|
11
11
|
const ports = [];
|
|
12
12
|
|
|
13
|
-
this.containers.forEach(container => ports.push(...(container.ports || [])));
|
|
14
|
-
(this.initContainers || []).forEach(container => ports.push(...(container.ports || [])));
|
|
13
|
+
this.containers.forEach((container) => ports.push(...(container.ports || [])));
|
|
14
|
+
(this.initContainers || []).forEach((container) => ports.push(...(container.ports || [])));
|
|
15
15
|
|
|
16
16
|
// Only get services owned if we can access the service resource
|
|
17
17
|
const canAccessServices = this.$getters['schemaFor'](SERVICE);
|
|
@@ -93,7 +93,7 @@ export default class WorkloadService extends SteveModel {
|
|
|
93
93
|
const steveSelectorValue = this.workloadSelector[selectorKey];
|
|
94
94
|
const allSvc = await this.$dispatch('cluster/findAll', { type: SERVICE, opt: { force } }, { root: true });
|
|
95
95
|
|
|
96
|
-
return (allSvc || []).filter(svc => (svc.spec?.selector || {})[selectorKey] === steveSelectorValue || (svc.spec?.selector || {})[selectorKey] === normanSelectorValue );
|
|
96
|
+
return (allSvc || []).filter((svc) => (svc.spec?.selector || {})[selectorKey] === steveSelectorValue || (svc.spec?.selector || {})[selectorKey] === normanSelectorValue );
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
get imageNames() {
|
|
@@ -307,26 +307,10 @@ export default class WorkloadService extends SteveModel {
|
|
|
307
307
|
loadBalancerProxy = await this.$dispatch(`cluster/create`, loadBalancer, { root: true });
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
const portsWithIpam = ports.filter(p => p._ipam) || [];
|
|
310
|
+
const portsWithIpam = ports.filter((p) => p._ipam) || [];
|
|
311
311
|
|
|
312
312
|
if (portsWithIpam.length > 0) {
|
|
313
313
|
loadBalancerProxy.metadata.annotations[HCI_LABELS_ANNOTATIONS.CLOUD_PROVIDER_IPAM] = portsWithIpam[0]._ipam;
|
|
314
|
-
|
|
315
|
-
const clusters = this.$rootGetters['management/all'](CAPI.RANCHER_CLUSTER);
|
|
316
|
-
const configs = this.$rootGetters['management/all'](HCI.HARVESTER_CONFIG);
|
|
317
|
-
const currentCluster = this.$rootGetters['currentCluster'];
|
|
318
|
-
const cluster = clusters.find(c => c.status.clusterName === currentCluster.id);
|
|
319
|
-
|
|
320
|
-
const machinePools = cluster?.spec?.rkeConfig?.machinePools || [];
|
|
321
|
-
const machineConfigName = machinePools[0]?.machineConfigRef?.name;
|
|
322
|
-
const config = configs.find(c => c.id === `fleet-default/${ machineConfigName }`);
|
|
323
|
-
|
|
324
|
-
if (config) {
|
|
325
|
-
const { vmNamespace, networkName } = config;
|
|
326
|
-
|
|
327
|
-
loadBalancerProxy.metadata.annotations[HCI_LABELS_ANNOTATIONS.CLOUD_PROVIDER_NAMESPACE] = vmNamespace;
|
|
328
|
-
loadBalancerProxy.metadata.annotations[HCI_LABELS_ANNOTATIONS.CLOUD_PROVIDER_NETWORK] = networkName;
|
|
329
|
-
}
|
|
330
314
|
}
|
|
331
315
|
|
|
332
316
|
toSave.push(loadBalancerProxy);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rancher/shell",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.16",
|
|
4
4
|
"description": "Rancher Dashboard Shell",
|
|
5
5
|
"repository": "https://github.com/rancherlabs/dashboard",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"@babel/preset-typescript": "7.16.7",
|
|
37
37
|
"@innologica/vue-dropdown-menu": "0.1.3",
|
|
38
38
|
"@novnc/novnc": "1.2.0",
|
|
39
|
+
"@nuxt/types": "2.14.6",
|
|
39
40
|
"@nuxt/typescript-build": "2.1.0",
|
|
40
41
|
"@nuxtjs/axios": "5.12.0",
|
|
41
42
|
"@nuxtjs/eslint-config-typescript": "6.0.1",
|
|
@@ -105,7 +106,7 @@
|
|
|
105
106
|
"nyc": "15.1.0",
|
|
106
107
|
"papaparse": "5.3.0",
|
|
107
108
|
"portal-vue": "2.1.7",
|
|
108
|
-
"rancher-icons": "rancher/icons#v2.0.
|
|
109
|
+
"rancher-icons": "rancher/icons#v2.0.16",
|
|
109
110
|
"require-extension-hooks": "0.3.3",
|
|
110
111
|
"require-extension-hooks-babel": "1.0.0",
|
|
111
112
|
"require-extension-hooks-vue": "3.0.0",
|
package/pages/about.vue
CHANGED
|
@@ -23,32 +23,32 @@ export default {
|
|
|
23
23
|
},
|
|
24
24
|
computed: {
|
|
25
25
|
rancherVersion() {
|
|
26
|
-
return this.settings.find(s => s.id === SETTING.VERSION_RANCHER);
|
|
26
|
+
return this.settings.find((s) => s.id === SETTING.VERSION_RANCHER);
|
|
27
27
|
},
|
|
28
28
|
appName() {
|
|
29
29
|
return getVendor();
|
|
30
30
|
},
|
|
31
31
|
cliVersion() {
|
|
32
|
-
return this.settings.find(s => s.id === SETTING.VERSION_CLI);
|
|
32
|
+
return this.settings.find((s) => s.id === SETTING.VERSION_CLI);
|
|
33
33
|
},
|
|
34
34
|
helmVersion() {
|
|
35
|
-
return this.settings.find(s => s.id === SETTING.VERSION_HELM);
|
|
35
|
+
return this.settings.find((s) => s.id === SETTING.VERSION_HELM);
|
|
36
36
|
},
|
|
37
37
|
dockerMachineVersion() {
|
|
38
|
-
return this.settings.find(s => s.id === SETTING.VERSION_MACHINE);
|
|
38
|
+
return this.settings.find((s) => s.id === SETTING.VERSION_MACHINE);
|
|
39
39
|
},
|
|
40
40
|
downloads() {
|
|
41
41
|
return [
|
|
42
|
-
this.createOSOption('about.os.mac', 'icon-apple', this.settings?.find(s => s.id === SETTING.CLI_URL.DARWIN)?.value, null),
|
|
43
|
-
this.createOSOption('about.os.linux', 'icon-linux', this.settings?.find(s => s.id === SETTING.CLI_URL.LINUX)?.value, this.downloadLinuxImages),
|
|
44
|
-
this.createOSOption('about.os.windows', 'icon-windows', this.settings?.find(s => s.id === SETTING.CLI_URL.WINDOWS)?.value, this.downloadWindowsImages)
|
|
42
|
+
this.createOSOption('about.os.mac', 'icon-apple', this.settings?.find((s) => s.id === SETTING.CLI_URL.DARWIN)?.value, null),
|
|
43
|
+
this.createOSOption('about.os.linux', 'icon-linux', this.settings?.find((s) => s.id === SETTING.CLI_URL.LINUX)?.value, this.downloadLinuxImages),
|
|
44
|
+
this.createOSOption('about.os.windows', 'icon-windows', this.settings?.find((s) => s.id === SETTING.CLI_URL.WINDOWS)?.value, this.downloadWindowsImages)
|
|
45
45
|
];
|
|
46
46
|
},
|
|
47
47
|
downloadImageList() {
|
|
48
|
-
return this.downloads.filter(d => !!d.imageList);
|
|
48
|
+
return this.downloads.filter((d) => !!d.imageList);
|
|
49
49
|
},
|
|
50
50
|
downloadCli() {
|
|
51
|
-
return this.downloads.filter(d => !!d.cliLink);
|
|
51
|
+
return this.downloads.filter((d) => !!d.cliLink);
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
methods: {
|
package/pages/account/index.vue
CHANGED
|
@@ -29,8 +29,8 @@ export default {
|
|
|
29
29
|
|
|
30
30
|
// Get all settings - the API host setting may not be set, so this avoids a 404 request if we look for the specific setting
|
|
31
31
|
const allSettings = await this.$store.dispatch('management/findAll', { type: MANAGEMENT.SETTING });
|
|
32
|
-
const apiHostSetting = allSettings.find(i => i.id === SETTING.API_HOST);
|
|
33
|
-
const serverUrlSetting = allSettings.find(i => i.id === SETTING.SERVER_URL);
|
|
32
|
+
const apiHostSetting = allSettings.find((i) => i.id === SETTING.API_HOST);
|
|
33
|
+
const serverUrlSetting = allSettings.find((i) => i.id === SETTING.SERVER_URL);
|
|
34
34
|
|
|
35
35
|
this.apiHostSetting = apiHostSetting?.value;
|
|
36
36
|
this.serverUrlSetting = serverUrlSetting?.value;
|
package/pages/auth/login.vue
CHANGED
|
@@ -14,7 +14,6 @@ import Password from '@shell/components/form/Password';
|
|
|
14
14
|
import { sortBy } from '@shell/utils/sort';
|
|
15
15
|
import { configType } from '@shell/models/management.cattle.io.authconfig';
|
|
16
16
|
import { mapGetters } from 'vuex';
|
|
17
|
-
import { importLogin } from '@shell/utils/dynamic-importer';
|
|
18
17
|
import { _ALL_IF_AUTHED, _MULTI } from '@shell/plugins/dashboard-store/actions';
|
|
19
18
|
import { MANAGEMENT, NORMAN } from '@shell/config/types';
|
|
20
19
|
import { SETTING } from '@shell/config/settings';
|
|
@@ -37,10 +36,10 @@ export default {
|
|
|
37
36
|
|
|
38
37
|
async asyncData({ route, redirect, store }) {
|
|
39
38
|
const drivers = await store.dispatch('auth/getAuthProviders');
|
|
40
|
-
const providers = sortBy(drivers.map(x => x.id), ['id']);
|
|
39
|
+
const providers = sortBy(drivers.map((x) => x.id), ['id']);
|
|
41
40
|
|
|
42
41
|
const hasLocal = providers.includes('local');
|
|
43
|
-
const hasOthers = hasLocal && !!providers.find(x => x !== 'local');
|
|
42
|
+
const hasOthers = hasLocal && !!providers.find((x) => x !== 'local');
|
|
44
43
|
|
|
45
44
|
if ( hasLocal ) {
|
|
46
45
|
// Local is special and handled here so that it can be toggled
|
|
@@ -99,13 +98,14 @@ export default {
|
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
return {
|
|
102
|
-
vendor:
|
|
101
|
+
vendor: getVendor(),
|
|
103
102
|
providers,
|
|
104
103
|
hasOthers,
|
|
105
104
|
hasLocal,
|
|
106
|
-
showLocal:
|
|
107
|
-
firstLogin:
|
|
108
|
-
singleProvider
|
|
105
|
+
showLocal: !hasOthers || (route.query[LOCAL] === _FLAGGED),
|
|
106
|
+
firstLogin: firstLoginSetting?.value === 'true',
|
|
107
|
+
singleProvider,
|
|
108
|
+
showLocaleSelector: !process.env.loginLocaleSelector || process.env.loginLocaleSelector === 'true'
|
|
109
109
|
};
|
|
110
110
|
},
|
|
111
111
|
|
|
@@ -176,7 +176,7 @@ export default {
|
|
|
176
176
|
|
|
177
177
|
created() {
|
|
178
178
|
this.providerComponents = this.providers.map((name) => {
|
|
179
|
-
return importLogin(configType[name]);
|
|
179
|
+
return this.$store.getters['type-map/importLogin'](configType[name] || name);
|
|
180
180
|
});
|
|
181
181
|
},
|
|
182
182
|
|
|
@@ -254,7 +254,7 @@ export default {
|
|
|
254
254
|
|
|
255
255
|
if ( this.remember ) {
|
|
256
256
|
this.$cookies.set(USERNAME, this.username, {
|
|
257
|
-
encode: x => x,
|
|
257
|
+
encode: (x) => x,
|
|
258
258
|
maxAge: 86400 * 365,
|
|
259
259
|
path: '/',
|
|
260
260
|
sameSite: true,
|
|
@@ -474,10 +474,13 @@ export default {
|
|
|
474
474
|
{{ nonLocalPrompt }}
|
|
475
475
|
</a>
|
|
476
476
|
</div>
|
|
477
|
-
<div class="locale-elector">
|
|
478
|
-
<LocaleSelector mode="login" />
|
|
479
|
-
</div>
|
|
480
477
|
</template>
|
|
478
|
+
<div
|
|
479
|
+
v-if="showLocaleSelector"
|
|
480
|
+
class="locale-elector"
|
|
481
|
+
>
|
|
482
|
+
<LocaleSelector mode="login" />
|
|
483
|
+
</div>
|
|
481
484
|
</div>
|
|
482
485
|
|
|
483
486
|
<BrandImage
|
|
@@ -539,6 +542,16 @@ export default {
|
|
|
539
542
|
}
|
|
540
543
|
}
|
|
541
544
|
|
|
545
|
+
.gutless {
|
|
546
|
+
height: 100vh;
|
|
547
|
+
.span-6 {
|
|
548
|
+
overflow-y: auto;
|
|
549
|
+
display: flex;
|
|
550
|
+
flex-direction: column;
|
|
551
|
+
height: 100%;
|
|
552
|
+
place-content: center;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
542
555
|
.locale-elector {
|
|
543
556
|
position: absolute;
|
|
544
557
|
bottom: 30px;
|
package/pages/auth/setup.vue
CHANGED
package/pages/auth/verify.vue
CHANGED
|
@@ -43,6 +43,12 @@ export default {
|
|
|
43
43
|
try {
|
|
44
44
|
parsed = JSON.parse(base64Decode((stateStr)));
|
|
45
45
|
} catch (err) {
|
|
46
|
+
const out = store.getters['i18n/t'](`login.error`);
|
|
47
|
+
|
|
48
|
+
console.error('Failed to parse nonce'); // eslint-disable-line no-console
|
|
49
|
+
|
|
50
|
+
redirect(`/auth/login?err=${ escape(out) }`);
|
|
51
|
+
|
|
46
52
|
return;
|
|
47
53
|
}
|
|
48
54
|
|
|
@@ -113,18 +113,18 @@ export default {
|
|
|
113
113
|
},
|
|
114
114
|
|
|
115
115
|
flattenedRepoNames() {
|
|
116
|
-
const allChecked = this.repoOptionsForDropdown.find(repo => repo.all && repo.enabled);
|
|
116
|
+
const allChecked = this.repoOptionsForDropdown.find((repo) => repo.all && repo.enabled);
|
|
117
117
|
|
|
118
118
|
if (allChecked) {
|
|
119
119
|
return allChecked.label;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
// None checked
|
|
123
|
-
if (!this.repoOptionsForDropdown.find(repo => repo.enabled)) {
|
|
123
|
+
if (!this.repoOptionsForDropdown.find((repo) => repo.enabled)) {
|
|
124
124
|
return this.t('generic.none');
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
const shownRepos = this.repoOptions.filter(repo => !this.hideRepos.includes(repo._key));
|
|
127
|
+
const shownRepos = this.repoOptions.filter((repo) => !this.hideRepos.includes(repo._key));
|
|
128
128
|
const reducedRepos = shownRepos.reduce((acc, c, i) => {
|
|
129
129
|
acc += c.label;
|
|
130
130
|
const length = shownRepos.length;
|
|
@@ -180,7 +180,7 @@ export default {
|
|
|
180
180
|
getFeaturedCharts() {
|
|
181
181
|
const allCharts = (this.filteredCharts || []);
|
|
182
182
|
|
|
183
|
-
const featuredCharts = allCharts.filter(value => value.featured).sort((a, b) => a.featured - b.featured);
|
|
183
|
+
const featuredCharts = allCharts.filter((value) => value.featured).sort((a, b) => a.featured - b.featured);
|
|
184
184
|
|
|
185
185
|
return featuredCharts.slice(0, 5);
|
|
186
186
|
},
|