@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
package/edit/secret/index.vue
CHANGED
|
@@ -141,9 +141,9 @@ export default {
|
|
|
141
141
|
// Cloud credentials
|
|
142
142
|
if ( this.isCloud ) {
|
|
143
143
|
const machineTypes = uniq(this.nodeDrivers
|
|
144
|
-
.filter(x => x.spec.active)
|
|
145
|
-
.map(x => x.spec.displayName || x.id)
|
|
146
|
-
.map(x => this.$store.getters['plugins/credentialDriverFor'](x))
|
|
144
|
+
.filter((x) => x.spec.active)
|
|
145
|
+
.map((x) => x.spec.displayName || x.id)
|
|
146
|
+
.map((x) => this.$store.getters['plugins/credentialDriverFor'](x))
|
|
147
147
|
);
|
|
148
148
|
|
|
149
149
|
for ( const id of machineTypes ) {
|
package/edit/service.vue
CHANGED
|
@@ -26,7 +26,6 @@ import { HARVESTER_NAME as HARVESTER } from '@shell/config/features';
|
|
|
26
26
|
import { allHash } from '@shell/utils/promise';
|
|
27
27
|
import { isHarvesterSatisfiesVersion } from '@shell/utils/cluster';
|
|
28
28
|
import { Port } from '@shell/utils/validators/formRules';
|
|
29
|
-
import { HCI as HCI_LABELS_ANNOTATIONS } from '@shell/config/labels-annotations';
|
|
30
29
|
|
|
31
30
|
const SESSION_AFFINITY_ACTION_VALUES = {
|
|
32
31
|
NONE: 'None',
|
|
@@ -90,7 +89,7 @@ export default {
|
|
|
90
89
|
defaultServiceTypes: DEFAULT_SERVICE_TYPES,
|
|
91
90
|
saving: false,
|
|
92
91
|
sessionAffinityActionLabels: Object.values(SESSION_AFFINITY_ACTION_LABELS)
|
|
93
|
-
.map(v => this.$store.getters['i18n/t'](v))
|
|
92
|
+
.map((v) => this.$store.getters['i18n/t'](v))
|
|
94
93
|
.map(ucFirst),
|
|
95
94
|
sessionAffinityActionOptions: Object.values(
|
|
96
95
|
SESSION_AFFINITY_ACTION_VALUES
|
|
@@ -192,7 +191,7 @@ export default {
|
|
|
192
191
|
},
|
|
193
192
|
|
|
194
193
|
provisioningCluster() {
|
|
195
|
-
const out = this.$store.getters['management/all'](CAPI.RANCHER_CLUSTER).find(c => c?.status?.clusterName === this.currentCluster.metadata.name);
|
|
194
|
+
const out = this.$store.getters['management/all'](CAPI.RANCHER_CLUSTER).find((c) => c?.status?.clusterName === this.currentCluster.metadata.name);
|
|
196
195
|
|
|
197
196
|
return out;
|
|
198
197
|
},
|
|
@@ -243,7 +242,7 @@ export default {
|
|
|
243
242
|
methods: {
|
|
244
243
|
updateMatchingPods: throttle(function() {
|
|
245
244
|
const { value: { spec: { selector = { } } } } = this;
|
|
246
|
-
const allInNamespace = this.allPods.filter(pod => pod.metadata.namespace === this.value?.metadata?.namespace);
|
|
245
|
+
const allInNamespace = this.allPods.filter((pod) => pod.metadata.namespace === this.value?.metadata?.namespace);
|
|
247
246
|
|
|
248
247
|
if (isEmpty(selector)) {
|
|
249
248
|
this.matchingPods = {
|
|
@@ -315,23 +314,6 @@ export default {
|
|
|
315
314
|
if (ports && ports.length > 0) {
|
|
316
315
|
this.value.spec.ports = this.targetPortsStrOrInt(this.value.spec.ports);
|
|
317
316
|
}
|
|
318
|
-
|
|
319
|
-
if (this.showHarvesterAddOnConfig) {
|
|
320
|
-
const clusters = this.$store.getters['management/all'](CAPI.RANCHER_CLUSTER);
|
|
321
|
-
const configs = this.$store.getters['management/all'](HCI.HARVESTER_CONFIG);
|
|
322
|
-
const cluster = clusters.find(c => c.status.clusterName === this.currentCluster.id);
|
|
323
|
-
|
|
324
|
-
const machinePools = cluster?.spec?.rkeConfig?.machinePools || [];
|
|
325
|
-
const machineConfigName = machinePools[0]?.machineConfigRef?.name;
|
|
326
|
-
const config = configs.find(c => c.id === `fleet-default/${ machineConfigName }`);
|
|
327
|
-
|
|
328
|
-
if (config) {
|
|
329
|
-
const { vmNamespace, networkName } = config;
|
|
330
|
-
|
|
331
|
-
this.value.metadata.annotations[HCI_LABELS_ANNOTATIONS.CLOUD_PROVIDER_NAMESPACE] = vmNamespace;
|
|
332
|
-
this.value.metadata.annotations[HCI_LABELS_ANNOTATIONS.CLOUD_PROVIDER_NETWORK] = networkName;
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
317
|
},
|
|
336
318
|
},
|
|
337
319
|
};
|
package/edit/serviceaccount.vue
CHANGED
|
@@ -50,7 +50,7 @@ export default {
|
|
|
50
50
|
namespacedSecrets() {
|
|
51
51
|
const namespace = this.value?.metadata?.namespace;
|
|
52
52
|
|
|
53
|
-
return this.allSecrets.filter(secret => secret.metadata.namespace === namespace && (secret._type === SECRET_TYPES.DOCKER || secret._type === SECRET_TYPES.DOCKER_JSON));
|
|
53
|
+
return this.allSecrets.filter((secret) => secret.metadata.namespace === namespace && (secret._type === SECRET_TYPES.DOCKER || secret._type === SECRET_TYPES.DOCKER_JSON));
|
|
54
54
|
},
|
|
55
55
|
|
|
56
56
|
imagePullSecrets: {
|
|
@@ -60,7 +60,7 @@ export default {
|
|
|
60
60
|
}
|
|
61
61
|
const { imagePullSecrets } = this.value;
|
|
62
62
|
|
|
63
|
-
return imagePullSecrets.map(each => each.name);
|
|
63
|
+
return imagePullSecrets.map((each) => each.name);
|
|
64
64
|
},
|
|
65
65
|
set(neu) {
|
|
66
66
|
if (this.value.imagePullSecrets.length < 1) {
|
|
@@ -138,13 +138,13 @@ export default {
|
|
|
138
138
|
},
|
|
139
139
|
|
|
140
140
|
provisionerIsDeprecated() {
|
|
141
|
-
const provisionerOpt = PROVISIONER_OPTIONS.find(opt => opt.value === this.value.provisioner);
|
|
141
|
+
const provisionerOpt = PROVISIONER_OPTIONS.find((opt) => opt.value === this.value.provisioner);
|
|
142
142
|
|
|
143
143
|
return provisionerOpt && provisionerOpt.deprecated !== undefined;
|
|
144
144
|
},
|
|
145
145
|
|
|
146
146
|
provisionerIsHideCustomize() {
|
|
147
|
-
const provisionerOpt = PROVISIONER_OPTIONS.find(opt => opt.value === this.value.provisioner);
|
|
147
|
+
const provisionerOpt = PROVISIONER_OPTIONS.find((opt) => opt.value === this.value.provisioner);
|
|
148
148
|
|
|
149
149
|
return provisionerOpt && provisionerOpt.hideCustomize !== undefined;
|
|
150
150
|
},
|
|
@@ -162,7 +162,7 @@ export default {
|
|
|
162
162
|
|
|
163
163
|
methods: {
|
|
164
164
|
getComponent(name) {
|
|
165
|
-
const isCustom = !PROVISIONER_OPTIONS.find(o => o.value === name);
|
|
165
|
+
const isCustom = !PROVISIONER_OPTIONS.find((o) => o.value === name);
|
|
166
166
|
const provisioner = isCustom ? 'custom' : name;
|
|
167
167
|
|
|
168
168
|
return require(`./provisioners/${ provisioner }`).default;
|
|
@@ -182,7 +182,7 @@ export default {
|
|
|
182
182
|
});
|
|
183
183
|
},
|
|
184
184
|
provisionerLabel(provisioner) {
|
|
185
|
-
const provisionerOpt = PROVISIONER_OPTIONS.find(opt => opt.value === provisioner);
|
|
185
|
+
const provisionerOpt = PROVISIONER_OPTIONS.find((opt) => opt.value === provisioner);
|
|
186
186
|
|
|
187
187
|
return provisionerOpt?.labelKey ? this.t(provisionerOpt.labelKey) : provisioner;
|
|
188
188
|
},
|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
const kubernetesVersionExtension = this.currentCluster.kubernetesVersionExtension;
|
|
50
50
|
|
|
51
51
|
if (kubernetesVersionExtension.startsWith('+rke2')) {
|
|
52
|
-
const charts = ((this.rke2Versions?.data || []).find(v => v.id === kubernetesVersion) || {}).charts;
|
|
52
|
+
const charts = ((this.rke2Versions?.data || []).find((v) => v.id === kubernetesVersion) || {}).charts;
|
|
53
53
|
let csiVersion = charts?.['harvester-csi-driver']?.version || '';
|
|
54
54
|
|
|
55
55
|
if (csiVersion.endsWith('00')) {
|
package/edit/token.vue
CHANGED
|
@@ -57,8 +57,8 @@ export default {
|
|
|
57
57
|
...mapGetters({ t: 'i18n/t' }),
|
|
58
58
|
scopes() {
|
|
59
59
|
const all = this.$store.getters['management/all'](MANAGEMENT.CLUSTER);
|
|
60
|
-
const kubeClusters = filterHiddenLocalCluster(filterOnlyKubernetesClusters(all), this.$store);
|
|
61
|
-
let out = kubeClusters.map(opt => ({ value: opt.id, label: opt.nameDisplay }));
|
|
60
|
+
const kubeClusters = filterHiddenLocalCluster(filterOnlyKubernetesClusters(all, this.$store), this.$store);
|
|
61
|
+
let out = kubeClusters.map((opt) => ({ value: opt.id, label: opt.nameDisplay }));
|
|
62
62
|
|
|
63
63
|
out = sortBy(out, ['label']);
|
|
64
64
|
out.unshift( { value: '', label: this.t('accountAndKeys.apiKeys.add.noScope') } );
|
|
@@ -68,7 +68,7 @@ export default {
|
|
|
68
68
|
|
|
69
69
|
expiryOptions() {
|
|
70
70
|
const options = ['never', 'day', 'month', 'year', 'custom'];
|
|
71
|
-
let opts = options.map(opt => ({ value: opt, label: this.t(`accountAndKeys.apiKeys.add.expiry.options.${ opt }`) }));
|
|
71
|
+
let opts = options.map((opt) => ({ value: opt, label: this.t(`accountAndKeys.apiKeys.add.expiry.options.${ opt }`) }));
|
|
72
72
|
|
|
73
73
|
// When the TTL is anything other than 0, present only two options
|
|
74
74
|
// (1) The maximum allowed
|
|
@@ -78,7 +78,7 @@ export default {
|
|
|
78
78
|
const expiry = now.add(this.maxTTL, 'minute');
|
|
79
79
|
const max = diffFrom(expiry, now, this.t);
|
|
80
80
|
|
|
81
|
-
opts = opts.filter(opt => opt.value === 'custom');
|
|
81
|
+
opts = opts.filter((opt) => opt.value === 'custom');
|
|
82
82
|
opts.unshift({ value: 'max', label: this.t('accountAndKeys.apiKeys.add.expiry.options.maximum', { value: max.string }) });
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -88,7 +88,7 @@ export default {
|
|
|
88
88
|
const options = ['minute', 'hour', 'day', 'month', 'year'];
|
|
89
89
|
const filtered = this.filterOptionsForTTL(options);
|
|
90
90
|
|
|
91
|
-
return filtered.map(opt => ({ value: opt, label: this.t(`accountAndKeys.apiKeys.add.customExpiry.options.${ opt }`) }));
|
|
91
|
+
return filtered.map((opt) => ({ value: opt, label: this.t(`accountAndKeys.apiKeys.add.customExpiry.options.${ opt }`) }));
|
|
92
92
|
},
|
|
93
93
|
},
|
|
94
94
|
|
package/edit/workload/index.vue
CHANGED
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
const key = this.idKey;
|
|
26
26
|
|
|
27
27
|
this.selectedName = tab.selectedName;
|
|
28
|
-
const container = this.containerOptions.find( c => c[key] === tab.selectedName);
|
|
28
|
+
const container = this.containerOptions.find( (c) => c[key] === tab.selectedName);
|
|
29
29
|
|
|
30
30
|
if ( container ) {
|
|
31
31
|
this.selectContainer(container);
|
|
@@ -284,7 +284,7 @@ export default {
|
|
|
284
284
|
|
|
285
285
|
defaultTab() {
|
|
286
286
|
if (!!this.$route.query.sidecar || this.$route.query.init || this.mode === _CREATE) {
|
|
287
|
-
const container = this.allContainers.find(c => c.__active);
|
|
287
|
+
const container = this.allContainers.find((c) => c.__active);
|
|
288
288
|
|
|
289
289
|
return container?.name ?? 'container-0';
|
|
290
290
|
}
|
|
@@ -485,7 +485,7 @@ export default {
|
|
|
485
485
|
|
|
486
486
|
const { imagePullSecrets } = this.podTemplateSpec;
|
|
487
487
|
|
|
488
|
-
return imagePullSecrets.map(each => each.name);
|
|
488
|
+
return imagePullSecrets.map((each) => each.name);
|
|
489
489
|
},
|
|
490
490
|
set(neu) {
|
|
491
491
|
this.podTemplateSpec.imagePullSecrets = neu.map((secret) => {
|
|
@@ -615,7 +615,7 @@ export default {
|
|
|
615
615
|
{
|
|
616
616
|
var: 'imagePullNamespacedSecrets',
|
|
617
617
|
parsingFunc: (data) => {
|
|
618
|
-
return data.filter(secret => (secret._type === SECRET_TYPES.DOCKER || secret._type === SECRET_TYPES.DOCKER_JSON));
|
|
618
|
+
return data.filter((secret) => (secret._type === SECRET_TYPES.DOCKER || secret._type === SECRET_TYPES.DOCKER_JSON));
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
621
|
]
|
|
@@ -626,7 +626,7 @@ export default {
|
|
|
626
626
|
{
|
|
627
627
|
var: 'allNodes',
|
|
628
628
|
parsingFunc: (data) => {
|
|
629
|
-
return data.map(node => node.id);
|
|
629
|
+
return data.map((node) => node.id);
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
632
|
]
|
|
@@ -637,7 +637,7 @@ export default {
|
|
|
637
637
|
{
|
|
638
638
|
var: 'headlessServices',
|
|
639
639
|
parsingFunc: (data) => {
|
|
640
|
-
return data.filter(service => service.spec.clusterIP === 'None');
|
|
640
|
+
return data.filter((service) => service.spec.clusterIP === 'None');
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
643
|
]
|
|
@@ -661,7 +661,7 @@ export default {
|
|
|
661
661
|
|
|
662
662
|
return typeDisplay
|
|
663
663
|
.split('')
|
|
664
|
-
.filter(letter => letter.match(/[A-Z]/))
|
|
664
|
+
.filter((letter) => letter.match(/[A-Z]/))
|
|
665
665
|
.join('');
|
|
666
666
|
},
|
|
667
667
|
|
|
@@ -695,7 +695,7 @@ export default {
|
|
|
695
695
|
}
|
|
696
696
|
|
|
697
697
|
return Promise.all([
|
|
698
|
-
...toSave.map(svc => svc.save()),
|
|
698
|
+
...toSave.map((svc) => svc.save()),
|
|
699
699
|
...toRemove.map((svc) => {
|
|
700
700
|
const ui = svc?.metadata?.annotations[UI_MANAGED];
|
|
701
701
|
|
|
@@ -808,7 +808,7 @@ export default {
|
|
|
808
808
|
|
|
809
809
|
total.push(
|
|
810
810
|
...containerPorts.filter(
|
|
811
|
-
port => port._serviceType && port._serviceType !== ''
|
|
811
|
+
(port) => port._serviceType && port._serviceType !== ''
|
|
812
812
|
)
|
|
813
813
|
);
|
|
814
814
|
|
|
@@ -49,9 +49,9 @@ export default {
|
|
|
49
49
|
},
|
|
50
50
|
|
|
51
51
|
availableVolumeOptions() {
|
|
52
|
-
const containerVolumes = this.container.volumeMounts.map(item => item.name);
|
|
52
|
+
const containerVolumes = this.container.volumeMounts.map((item) => item.name);
|
|
53
53
|
|
|
54
|
-
return this.value.volumes.filter(vol => !containerVolumes.includes(vol.name)).map((item) => {
|
|
54
|
+
return this.value.volumes.filter((vol) => !containerVolumes.includes(vol.name)).map((item) => {
|
|
55
55
|
return {
|
|
56
56
|
label: `${ item.name } (${ this.headerFor(item) })`,
|
|
57
57
|
action: this.selectVolume,
|
|
@@ -74,15 +74,15 @@ export default {
|
|
|
74
74
|
return all;
|
|
75
75
|
}, []);
|
|
76
76
|
|
|
77
|
-
this.container.volumeMounts = this.container.volumeMounts.filter(mount => names.includes(mount.name));
|
|
77
|
+
this.container.volumeMounts = this.container.volumeMounts.filter((mount) => names.includes(mount.name));
|
|
78
78
|
},
|
|
79
79
|
|
|
80
80
|
selectedContainerVolumes(neu, old) {
|
|
81
81
|
// removeObjects(this.value.volumes, old);
|
|
82
82
|
// addObjects(this.value.volumes, neu);
|
|
83
|
-
const names = neu.map(item => item.name);
|
|
83
|
+
const names = neu.map((item) => item.name);
|
|
84
84
|
|
|
85
|
-
this.container.volumeMounts = this.container.volumeMounts.filter(mount => names.includes(mount.name));
|
|
85
|
+
this.container.volumeMounts = this.container.volumeMounts.filter((mount) => names.includes(mount.name));
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
},
|
|
@@ -109,7 +109,7 @@ export default {
|
|
|
109
109
|
const names = volumeMounts.map(({ name }) => name);
|
|
110
110
|
|
|
111
111
|
// Extract storage volumes to allow mutation, if matches mount map
|
|
112
|
-
return this.value.volumes.filter(volume => names.includes(volume.name));
|
|
112
|
+
return this.value.volumes.filter((volume) => names.includes(volume.name));
|
|
113
113
|
},
|
|
114
114
|
|
|
115
115
|
getSelectedContainerVolumes() {
|
|
@@ -118,7 +118,7 @@ export default {
|
|
|
118
118
|
const names = volumeMounts.map(({ name }) => name);
|
|
119
119
|
|
|
120
120
|
// Extract storage volumes to allow mutation, if matches mount map
|
|
121
|
-
return this.value.volumes.filter(volume => names.includes(volume.name));
|
|
121
|
+
return this.value.volumes.filter((volume) => names.includes(volume.name));
|
|
122
122
|
},
|
|
123
123
|
|
|
124
124
|
/**
|
|
@@ -131,7 +131,7 @@ export default {
|
|
|
131
131
|
},
|
|
132
132
|
|
|
133
133
|
selectVolume(event) {
|
|
134
|
-
const selectedVolume = this.value.volumes.find(vol => vol.name === event.value);
|
|
134
|
+
const selectedVolume = this.value.volumes.find((vol) => vol.name === event.value);
|
|
135
135
|
|
|
136
136
|
this.selectedContainerVolumes.push(selectedVolume);
|
|
137
137
|
|
|
@@ -168,7 +168,7 @@ export default {
|
|
|
168
168
|
|
|
169
169
|
headerFor(value) {
|
|
170
170
|
const type = Object.keys(value).filter(
|
|
171
|
-
key => typeof value[key] === 'object'
|
|
171
|
+
(key) => typeof value[key] === 'object'
|
|
172
172
|
)[0];
|
|
173
173
|
|
|
174
174
|
if (
|
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
},
|
|
26
26
|
|
|
27
27
|
data() {
|
|
28
|
-
const volumeMounts = (this.container.volumeMounts || []).filter(mount => mount.name === this.name);
|
|
28
|
+
const volumeMounts = (this.container.volumeMounts || []).filter((mount) => mount.name === this.name);
|
|
29
29
|
|
|
30
30
|
return { volumeMounts };
|
|
31
31
|
},
|
|
@@ -34,7 +34,7 @@ export default {
|
|
|
34
34
|
|
|
35
35
|
watch: {
|
|
36
36
|
volumeMounts(neu) {
|
|
37
|
-
this.container.volumeMounts = (this.container.volumeMounts || []).filter(mount => mount.name && (mount.name !== this.name));
|
|
37
|
+
this.container.volumeMounts = (this.container.volumeMounts || []).filter((mount) => mount.name && (mount.name !== this.name));
|
|
38
38
|
this.container.volumeMounts.push(...neu);
|
|
39
39
|
},
|
|
40
40
|
|
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
},
|
|
40
40
|
|
|
41
41
|
driverOpts() {
|
|
42
|
-
return require.context('@shell/edit/workload/storage/csi', true, /^.*\.vue$/).keys().map(path => path.replace(/(\.\/)|(.vue)/g, '')).filter(file => file !== 'index');
|
|
42
|
+
return require.context('@shell/edit/workload/storage/csi', true, /^.*\.vue$/).keys().map((path) => path.replace(/(\.\/)|(.vue)/g, '')).filter((file) => file !== 'index');
|
|
43
43
|
},
|
|
44
44
|
|
|
45
45
|
...mapGetters({ t: 'i18n/t' })
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
},
|
|
39
39
|
|
|
40
40
|
driverOpts() {
|
|
41
|
-
return require.context('@shell/edit/workload/storage/ephemeralVolume', true, /^.*\.vue$/).keys().map(path => path.replace(/(\.\/)|(.vue)/g, '')).filter(file => file !== 'index');
|
|
41
|
+
return require.context('@shell/edit/workload/storage/ephemeralVolume', true, /^.*\.vue$/).keys().map((path) => path.replace(/(\.\/)|(.vue)/g, '')).filter((file) => file !== 'index');
|
|
42
42
|
},
|
|
43
43
|
|
|
44
44
|
...mapGetters({ t: 'i18n/t' })
|
|
@@ -89,15 +89,15 @@ export default {
|
|
|
89
89
|
const customVolumeTypes = require
|
|
90
90
|
.context('@shell/edit/workload/storage', false, /^.*\.vue$/)
|
|
91
91
|
.keys()
|
|
92
|
-
.map(path => path.replace(/(\.\/)|(.vue)/g, ''))
|
|
93
|
-
.filter(file => !excludedFiles.includes(file));
|
|
92
|
+
.map((path) => path.replace(/(\.\/)|(.vue)/g, ''))
|
|
93
|
+
.filter((file) => !excludedFiles.includes(file));
|
|
94
94
|
|
|
95
95
|
return [
|
|
96
96
|
...customVolumeTypes,
|
|
97
97
|
...defaultVolumeTypes
|
|
98
98
|
]
|
|
99
99
|
.sort()
|
|
100
|
-
.map(volumeType => ({
|
|
100
|
+
.map((volumeType) => ({
|
|
101
101
|
label: this.t(`workload.storage.subtypes.${ volumeType }`),
|
|
102
102
|
action: this.addVolume,
|
|
103
103
|
value: volumeType,
|
|
@@ -105,7 +105,7 @@ export default {
|
|
|
105
105
|
},
|
|
106
106
|
|
|
107
107
|
pvcNames() {
|
|
108
|
-
return this.namespacedPvcs.map(pvc => pvc.metadata.name);
|
|
108
|
+
return this.namespacedPvcs.map((pvc) => pvc.metadata.name);
|
|
109
109
|
},
|
|
110
110
|
},
|
|
111
111
|
|
|
@@ -176,7 +176,7 @@ export default {
|
|
|
176
176
|
|
|
177
177
|
volumeType(vol) {
|
|
178
178
|
const type = Object.keys(vol).filter(
|
|
179
|
-
key => typeof vol[key] === 'object'
|
|
179
|
+
(key) => typeof vol[key] === 'object'
|
|
180
180
|
)[0];
|
|
181
181
|
|
|
182
182
|
return type;
|
|
@@ -235,7 +235,7 @@ export default {
|
|
|
235
235
|
// codemirror needs to refresh if it is in a tab that wasn't visible on page load
|
|
236
236
|
refresh() {
|
|
237
237
|
if (this.$refs.cm) {
|
|
238
|
-
this.$refs.cm.forEach(component => component.refresh());
|
|
238
|
+
this.$refs.cm.forEach((component) => component.refresh());
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
241
|
|
|
@@ -70,7 +70,7 @@ export default {
|
|
|
70
70
|
|
|
71
71
|
computed: {
|
|
72
72
|
storageClassNames() {
|
|
73
|
-
return this.storageClasses.map(sc => sc.metadata.name);
|
|
73
|
+
return this.storageClasses.map((sc) => sc.metadata.name);
|
|
74
74
|
},
|
|
75
75
|
|
|
76
76
|
availablePVs() {
|
|
@@ -84,7 +84,7 @@ export default {
|
|
|
84
84
|
},
|
|
85
85
|
|
|
86
86
|
persistentVolumeNames() {
|
|
87
|
-
return this.availablePVs.map(pv => pv.metadata.name);
|
|
87
|
+
return this.availablePVs.map((pv) => pv.metadata.name);
|
|
88
88
|
},
|
|
89
89
|
|
|
90
90
|
...mapGetters({ t: 'i18n/t' })
|
package/initialize/client.js
CHANGED
|
@@ -57,7 +57,7 @@ if (logs.length > 0) {
|
|
|
57
57
|
const ssrLogStyle = 'background: #2E495E;border-radius: 0.5em;color: white;font-weight: bold;padding: 2px 0.5em;';
|
|
58
58
|
|
|
59
59
|
console.group && console.group('%cNuxt SSR', ssrLogStyle); // eslint-disable-line no-console
|
|
60
|
-
logs.forEach(logObj => (console[logObj.type] || console.log)(...logObj.args)); // eslint-disable-line no-console
|
|
60
|
+
logs.forEach((logObj) => (console[logObj.type] || console.log)(...logObj.args)); // eslint-disable-line no-console
|
|
61
61
|
delete NUXT.logs;
|
|
62
62
|
console.groupEnd && console.groupEnd(); // eslint-disable-line no-console
|
|
63
63
|
}
|
|
@@ -79,7 +79,7 @@ if (!Vue.config.$nuxt) {
|
|
|
79
79
|
|
|
80
80
|
if (vm && vm.$root) {
|
|
81
81
|
const nuxtApp = Object.keys(Vue.config.$nuxt)
|
|
82
|
-
.find(nuxtInstance => vm.$root[nuxtInstance]);
|
|
82
|
+
.find((nuxtInstance) => vm.$root[nuxtInstance]);
|
|
83
83
|
|
|
84
84
|
// Show Nuxt Error Page
|
|
85
85
|
if (nuxtApp && vm.$root[nuxtApp].error && info !== 'render function') {
|
|
@@ -152,7 +152,7 @@ function mapTransitions(toComponents, to, from) {
|
|
|
152
152
|
|
|
153
153
|
// Combine transitions & prefer `leave` properties of "from" route
|
|
154
154
|
Object.keys(toTransitions)
|
|
155
|
-
.filter(key => typeof toTransitions[key] !== 'undefined' && !key.toLowerCase().includes('leave'))
|
|
155
|
+
.filter((key) => typeof toTransitions[key] !== 'undefined' && !key.toLowerCase().includes('leave'))
|
|
156
156
|
.forEach((key) => {
|
|
157
157
|
transitions[key] = toTransitions[key];
|
|
158
158
|
});
|
|
@@ -188,7 +188,7 @@ async function loadAsyncComponents(to, from, next) {
|
|
|
188
188
|
return true;
|
|
189
189
|
}
|
|
190
190
|
if (Array.isArray(watchQuery)) {
|
|
191
|
-
return watchQuery.some(key => this._diffQuery[key]);
|
|
191
|
+
return watchQuery.some((key) => this._diffQuery[key]);
|
|
192
192
|
}
|
|
193
193
|
if (typeof watchQuery === 'function') {
|
|
194
194
|
return watchQuery.apply(instance, [to.query, from.query]);
|
|
@@ -452,7 +452,7 @@ async function render(to, from, next) {
|
|
|
452
452
|
if (watchQuery === true) {
|
|
453
453
|
Component._dataRefresh = true;
|
|
454
454
|
} else if (Array.isArray(watchQuery)) {
|
|
455
|
-
Component._dataRefresh = watchQuery.some(key => this._diffQuery[key]);
|
|
455
|
+
Component._dataRefresh = watchQuery.some((key) => this._diffQuery[key]);
|
|
456
456
|
} else if (typeof watchQuery === 'function') {
|
|
457
457
|
if (!instances) {
|
|
458
458
|
instances = getMatchedComponentsInstances(to);
|
|
@@ -652,7 +652,7 @@ const noopFetch = () => {};
|
|
|
652
652
|
// Special hot reload with asyncData(context)
|
|
653
653
|
function getNuxtChildComponents($parent, $components = []) {
|
|
654
654
|
$parent.$children.forEach(($child) => {
|
|
655
|
-
if ($child.$vnode && $child.$vnode.data.nuxtChild && !$components.find(c => (c.$options.__file === $child.$options.__file))) {
|
|
655
|
+
if ($child.$vnode && $child.$vnode.data.nuxtChild && !$components.find((c) => (c.$options.__file === $child.$options.__file))) {
|
|
656
656
|
$components.push($child);
|
|
657
657
|
}
|
|
658
658
|
if ($child.$children && $child.$children.length) {
|
|
@@ -806,7 +806,7 @@ async function mountApp(__app) {
|
|
|
806
806
|
_app.setTransitions = _app.$options.nuxt.setTransitions.bind(_app);
|
|
807
807
|
if (Components.length) {
|
|
808
808
|
_app.setTransitions(mapTransitions(Components, router.currentRoute));
|
|
809
|
-
_lastPaths = router.currentRoute.matched.map(route => compile(route.path)(router.currentRoute.params));
|
|
809
|
+
_lastPaths = router.currentRoute.matched.map((route) => compile(route.path)(router.currentRoute.params));
|
|
810
810
|
}
|
|
811
811
|
|
|
812
812
|
// Initialize error handler
|
|
@@ -837,7 +837,7 @@ async function mountApp(__app) {
|
|
|
837
837
|
};
|
|
838
838
|
|
|
839
839
|
// fix: force next tick to avoid having same timestamp when an error happen on spa fallback
|
|
840
|
-
await new Promise(resolve => setTimeout(resolve, 0));
|
|
840
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
841
841
|
render.call(_app, router.currentRoute, router.currentRoute, (path) => {
|
|
842
842
|
// If not redirected
|
|
843
843
|
if (!path) {
|
package/initialize/index.js
CHANGED
|
@@ -110,9 +110,6 @@ async function createApp(ssrContext, config = {}) {
|
|
|
110
110
|
meta: [{ charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, {
|
|
111
111
|
hid: 'description', name: 'description', content: 'Rancher Dashboard'
|
|
112
112
|
}],
|
|
113
|
-
link: [{
|
|
114
|
-
hid: 'icon', rel: 'icon', type: 'image\u002Fx-icon', href: '\u002Ffavicon.png'
|
|
115
|
-
}],
|
|
116
113
|
style: [],
|
|
117
114
|
script: []
|
|
118
115
|
},
|
|
@@ -169,7 +166,7 @@ async function createApp(ssrContext, config = {}) {
|
|
|
169
166
|
// Make app available into store via this.app
|
|
170
167
|
store.app = app;
|
|
171
168
|
|
|
172
|
-
const next = ssrContext ? ssrContext.next : location => app.router.push(location);
|
|
169
|
+
const next = ssrContext ? ssrContext.next : (location) => app.router.push(location);
|
|
173
170
|
// Resolve route
|
|
174
171
|
let route;
|
|
175
172
|
|
package/layouts/default.vue
CHANGED
|
@@ -23,7 +23,7 @@ import AwsComplianceBanner from '@shell/components/AwsComplianceBanner';
|
|
|
23
23
|
import AzureWarning from '@shell/components/auth/AzureWarning';
|
|
24
24
|
import DraggableZone from '@shell/components/DraggableZone';
|
|
25
25
|
import {
|
|
26
|
-
COUNT, SCHEMA, MANAGEMENT, UI, CATALOG
|
|
26
|
+
COUNT, SCHEMA, MANAGEMENT, UI, CATALOG, HCI
|
|
27
27
|
} from '@shell/config/types';
|
|
28
28
|
import { BASIC, FAVORITE, USED } from '@shell/store/type-map';
|
|
29
29
|
import { addObjects, replaceWith, clear, addObject } from '@shell/utils/array';
|
|
@@ -83,7 +83,7 @@ export default {
|
|
|
83
83
|
|
|
84
84
|
computed: {
|
|
85
85
|
...mapState(['managementReady', 'clusterReady']),
|
|
86
|
-
...mapGetters(['productId', 'clusterId', 'namespaceMode', 'isExplorer', 'currentProduct', 'isSingleProduct']),
|
|
86
|
+
...mapGetters(['productId', 'clusterId', 'namespaceMode', 'isExplorer', 'currentProduct', 'isSingleProduct', 'isRancherInHarvester', 'isVirtualCluster']),
|
|
87
87
|
...mapGetters({ locale: 'i18n/selectedLocaleLabel', availableLocales: 'i18n/availableLocales' }),
|
|
88
88
|
...mapGetters('type-map', ['activeProducts']),
|
|
89
89
|
|
|
@@ -105,7 +105,7 @@ export default {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
// Only show for Cluster Explorer or Global Apps (not configuration)
|
|
108
|
-
const canSetAsHome = product.inStore === 'cluster' || (product.inStore === 'management' && product.category !== 'configuration');
|
|
108
|
+
const canSetAsHome = product.inStore === 'cluster' || (product.inStore === 'management' && product.category !== 'configuration') || this.isRancherInHarvester;
|
|
109
109
|
|
|
110
110
|
if (canSetAsHome) {
|
|
111
111
|
pageActions.push({
|
|
@@ -166,12 +166,19 @@ export default {
|
|
|
166
166
|
if (this.isSingleProduct?.getVersionInfo) {
|
|
167
167
|
return this.isSingleProduct?.getVersionInfo(this.$store);
|
|
168
168
|
}
|
|
169
|
-
|
|
170
169
|
const { displayVersion } = getVersionInfo(this.$store);
|
|
171
170
|
|
|
172
171
|
return displayVersion;
|
|
173
172
|
},
|
|
174
173
|
|
|
174
|
+
singleProductAbout() {
|
|
175
|
+
return this.isSingleProduct?.aboutPage;
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
harvesterVersion() {
|
|
179
|
+
return this.$store.getters['cluster/byId'](HCI.SETTING, 'server-version')?.value || 'unknown';
|
|
180
|
+
},
|
|
181
|
+
|
|
175
182
|
showProductFooter() {
|
|
176
183
|
if (this.isVirtualProduct) {
|
|
177
184
|
return true;
|
|
@@ -203,9 +210,11 @@ export default {
|
|
|
203
210
|
* Prevent rendering "outlet" until the route changes to avoid re-rendering old route content after its cluster is unloaded
|
|
204
211
|
*/
|
|
205
212
|
clusterAndRouteReady() {
|
|
213
|
+
const targetRoute = this.$store.getters['targetRoute'];
|
|
214
|
+
const routeReady = targetRoute ? this.currentProduct?.name === getProductFromRoute(this.$route) && this.currentProduct?.name === getProductFromRoute(targetRoute) : this.currentProduct?.name === getProductFromRoute(this.$route);
|
|
215
|
+
|
|
206
216
|
return this.clusterReady &&
|
|
207
|
-
this.clusterId === getClusterFromRoute(this.$route) &&
|
|
208
|
-
this.currentProduct?.name === getProductFromRoute(this.$route);
|
|
217
|
+
this.clusterId === getClusterFromRoute(this.$route) && routeReady;
|
|
209
218
|
},
|
|
210
219
|
|
|
211
220
|
pinClass() {
|
|
@@ -396,8 +405,8 @@ export default {
|
|
|
396
405
|
if ( productId === EXPLORER || !this.isExplorer ) {
|
|
397
406
|
addObjects(out, more);
|
|
398
407
|
} else {
|
|
399
|
-
const root = more.find(x => x.name === 'root');
|
|
400
|
-
const other = more.filter(x => x.name !== 'root');
|
|
408
|
+
const root = more.find((x) => x.name === 'root');
|
|
409
|
+
const other = more.filter((x) => x.name !== 'root');
|
|
401
410
|
|
|
402
411
|
const group = {
|
|
403
412
|
name: productId,
|
|
@@ -580,7 +589,7 @@ export default {
|
|
|
580
589
|
// Only expand one group - so after the first has been expanded, no more will
|
|
581
590
|
// This prevents the 'More Resources' group being expanded in addition to the normal group
|
|
582
591
|
let canExpand = true;
|
|
583
|
-
const expanded = refs.filter(grp => grp.isExpanded)[0];
|
|
592
|
+
const expanded = refs.filter((grp) => grp.isExpanded)[0];
|
|
584
593
|
|
|
585
594
|
if (expanded && expanded.hasActiveRoute()) {
|
|
586
595
|
this.$nextTick(() => expanded.syncNav());
|
|
@@ -706,9 +715,24 @@ export default {
|
|
|
706
715
|
</div>
|
|
707
716
|
<div
|
|
708
717
|
v-else
|
|
709
|
-
class="version text-muted"
|
|
718
|
+
class="version text-muted flex"
|
|
710
719
|
>
|
|
711
|
-
|
|
720
|
+
<nuxt-link
|
|
721
|
+
v-if="singleProductAbout"
|
|
722
|
+
:to="singleProductAbout"
|
|
723
|
+
>
|
|
724
|
+
{{ displayVersion }}
|
|
725
|
+
</nuxt-link>
|
|
726
|
+
<template v-else>
|
|
727
|
+
<span>{{ displayVersion }}</span>
|
|
728
|
+
<span
|
|
729
|
+
v-if="isVirtualCluster && isExplorer"
|
|
730
|
+
v-tooltip="{content: harvesterVersion, placement: 'top'}"
|
|
731
|
+
class="clip text-muted ml-5"
|
|
732
|
+
>
|
|
733
|
+
(Harvester-{{ harvesterVersion }})
|
|
734
|
+
</span>
|
|
735
|
+
</template>
|
|
712
736
|
</div>
|
|
713
737
|
</nav>
|
|
714
738
|
<main
|
|
@@ -781,6 +805,9 @@ export default {
|
|
|
781
805
|
}
|
|
782
806
|
}
|
|
783
807
|
|
|
808
|
+
.flex {
|
|
809
|
+
display: flex;
|
|
810
|
+
}
|
|
784
811
|
</style>
|
|
785
812
|
<style lang="scss">
|
|
786
813
|
.dashboard-root {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
3
|
+
import { CATALOG as CATALOG_ANNOTATIONS } from '@shell/config/labels-annotations';
|
|
4
|
+
|
|
3
5
|
export default {
|
|
4
6
|
name: 'ListClusterReposApps',
|
|
5
7
|
components: { ResourceTable },
|
|
@@ -24,6 +26,12 @@ export default {
|
|
|
24
26
|
type: Boolean,
|
|
25
27
|
default: false
|
|
26
28
|
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
computed: {
|
|
32
|
+
filterHideRows() {
|
|
33
|
+
return this.rows.filter((repo) => !(repo?.metadata?.annotations?.[CATALOG_ANNOTATIONS.HIDDEN_REPO] === 'true'));
|
|
34
|
+
}
|
|
27
35
|
}
|
|
28
36
|
};
|
|
29
37
|
</script>
|
|
@@ -32,7 +40,7 @@ export default {
|
|
|
32
40
|
<div>
|
|
33
41
|
<ResourceTable
|
|
34
42
|
:schema="schema"
|
|
35
|
-
:rows="
|
|
43
|
+
:rows="filterHideRows"
|
|
36
44
|
:loading="loading"
|
|
37
45
|
:use-query-params-for-simple-filtering="useQueryParamsForSimpleFiltering"
|
|
38
46
|
data-testid="app-cluster-repo-list"
|