dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.61
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/brand/csp/favicon.png +0 -0
- package/assets/brand/harvester/favicon.png +0 -0
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/icons/demo.css +539 -0
- package/assets/icons/demo.css:Zone.Identifier +0 -0
- package/assets/icons/demo_index.html +1131 -0
- package/assets/icons/demo_index.html:Zone.Identifier +0 -0
- package/assets/icons/iconfont.css +219 -0
- package/assets/icons/iconfont.css:Zone.Identifier +0 -0
- package/assets/icons/iconfont.js +1 -0
- package/assets/icons/iconfont.js:Zone.Identifier +0 -0
- package/assets/icons/iconfont.json +324 -0
- package/assets/icons/iconfont.json:Zone.Identifier +0 -0
- package/assets/icons/iconfont.ttf +0 -0
- package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff +0 -0
- package/assets/icons/iconfont.woff2 +0 -0
- package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
- package/assets/iconsNew/demo.css +539 -0
- package/assets/iconsNew/demo.css:Zone.Identifier +0 -0
- package/assets/iconsNew/demo_index.html +303 -0
- package/assets/iconsNew/demo_index.html:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.css +43 -0
- package/assets/iconsNew/iconfont.css:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.js +1 -0
- package/assets/iconsNew/iconfont.js:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.json +44 -0
- package/assets/iconsNew/iconfont.json:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.ttf +0 -0
- package/assets/iconsNew/iconfont.ttf:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.woff +0 -0
- package/assets/iconsNew/iconfont.woff2 +0 -0
- package/assets/iconsNew/iconfont.woff2:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.woff:Zone.Identifier +0 -0
- package/assets/images/API.svg +3 -0
- package/assets/images/action.svg +6 -0
- package/assets/images/login/password.svg +20 -0
- package/assets/images/login/user.svg +6 -0
- package/assets/images/login-bg.png +0 -0
- package/assets/images/login-left.png +0 -0
- package/assets/images/login-logo.svg +44 -0
- package/assets/images/logo.png +0 -0
- package/assets/images/logo.svg +47 -0
- package/assets/images/pl/dark/logo.png +0 -0
- package/assets/images/pl/half-logo.svg +2 -23
- package/assets/images/pl/harvester.png +0 -0
- package/assets/images/pl/logo.png +0 -0
- package/assets/images/promp-yellow.svg +5 -0
- package/assets/images/user.png +0 -0
- package/assets/styles/all.scss +83 -0
- package/assets/styles/app.scss +5 -0
- package/assets/styles/base/_basic.scss +2 -2
- package/assets/styles/base/_helpers.scss +1 -1
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/base/_typography.scss +2 -1
- package/assets/styles/base/_variables.scss +14 -7
- package/assets/styles/fonts/_icons.scss +3 -2
- package/assets/styles/global/_button.scss +44 -26
- package/assets/styles/global/_columns.scss +3 -1
- package/assets/styles/global/_form.scss +46 -13
- package/assets/styles/global/_labeled-input.scss +54 -26
- package/assets/styles/global/_layout.scss +8 -3
- package/assets/styles/global/_select.scss +25 -17
- package/assets/styles/global/_table.scss +7 -1
- package/assets/styles/global/_tooltip.scss +60 -8
- package/assets/styles/themes/_dark.scss +3 -0
- package/assets/styles/themes/_light.scss +69 -46
- package/assets/styles/vendor/vue-select.scss +24 -10
- package/assets/translations/en-us.yaml +92 -4
- package/assets/translations/zh-hans.yaml +668 -206
- package/components/ActionDropdown.vue +2 -1
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +2 -0
- package/components/AppModal.vue +46 -5
- package/components/BrandImage.vue +1 -0
- package/components/ButtonDropdown.vue +28 -4
- package/components/ButtonMultiAction.vue +1 -0
- package/components/ClusterIconMenu.vue +2 -2
- package/components/CodeMirror.vue +26 -10
- package/components/ConsumptionGauge.vue +24 -5
- package/components/ContainerResourceLimit.vue +2 -2
- package/components/CopyToClipboard.vue +15 -0
- package/components/CruResource.vue +12 -10
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +29 -17
- package/components/DotState.vue +84 -0
- package/components/Drawer/Chrome.vue +2 -2
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +30 -27
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
- package/components/Drawer/ResourceDetailDrawer/index.vue +5 -4
- package/components/ExplorerMembers.vue +28 -4
- package/components/ExplorerProjectsNamespaces.vue +19 -5
- package/components/GlobalRoleBindings.vue +23 -4
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +3 -1
- package/components/HardwareResourceGauge.vue +39 -3
- package/components/IndentedPanel.vue +4 -10
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +28 -2
- package/components/LabelValue.vue +20 -1
- package/components/ModalWithCard.vue +12 -3
- package/components/PodSecurityAdmission.vue +2 -2
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +53 -12
- package/components/RelatedResources.vue +3 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +1 -3
- package/components/Resource/Detail/Metadata/KeyValue.vue +8 -4
- package/components/Resource/Detail/Metadata/index.vue +3 -1
- package/components/Resource/Detail/TitleBar/Title.vue +4 -3
- package/components/Resource/Detail/TitleBar/Top.vue +2 -0
- package/components/Resource/Detail/TitleBar/composables.ts +16 -1
- package/components/Resource/Detail/TitleBar/index.vue +125 -27
- package/components/ResourceDetail/Masthead/index.vue +1 -1
- package/components/ResourceDetail/Masthead/latest.vue +1 -1
- package/components/ResourceDetail/Masthead/legacy.vue +183 -39
- package/components/ResourceDetail/legacy.vue +47 -29
- package/components/ResourceList/Masthead.vue +222 -54
- package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
- package/components/ResourceTable.vue +40 -2
- package/components/SideNav.vue +74 -20
- package/components/SingleClusterInfo.vue +2 -1
- package/components/SortableTable/THead.vue +79 -4
- package/components/SortableTable/index.vue +1053 -464
- package/components/SortableTable/paging.js +26 -16
- package/components/SortableTable/selection.js +2 -2
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +53 -30
- package/components/YamlEditor.vue +0 -1
- package/components/auth/Principal.vue +51 -19
- package/components/auth/RoleDetailEdit.vue +69 -14
- package/components/auth/SelectPrincipal.vue +1 -0
- package/components/breadcrumb/index.vue +119 -0
- package/components/form/ArrayList.vue +177 -152
- package/components/form/ArrayListGrouped.vue +13 -3
- package/components/form/ArrayListSelect.vue +1 -1
- package/components/form/BannerSettings.vue +64 -59
- package/components/form/ChangePassword.vue +5 -5
- package/components/form/ClusterAppearance.vue +4 -3
- package/components/form/ColorInput.vue +32 -8
- package/components/form/Command.vue +4 -5
- package/components/form/Conditions.vue +15 -1
- package/components/form/Footer.vue +12 -8
- package/components/form/HealthCheck.vue +0 -2
- package/components/form/HookOption.vue +87 -58
- package/components/form/InputWithSelect.vue +8 -4
- package/components/form/KeyValue.vue +66 -8
- package/components/form/LabeledSelect.vue +216 -242
- package/components/form/Labels.vue +4 -4
- package/components/form/MatchExpressions.vue +28 -11
- package/components/form/Members/ClusterMembershipEditor.vue +1 -1
- package/components/form/Members/ClusterPermissionsEditor.vue +61 -43
- package/components/form/Members/MembershipEditor.vue +4 -4
- package/components/form/Members/ProjectMembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +62 -22
- package/components/form/Networking.vue +6 -9
- package/components/form/NodeAffinity.vue +29 -28
- package/components/form/Password.vue +16 -7
- package/components/form/PodAffinity.vue +24 -25
- package/components/form/Probe.vue +15 -11
- package/components/form/ProjectMemberEditor.vue +66 -48
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +26 -23
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +38 -35
- package/components/form/ResourceSelector.vue +1 -1
- package/components/form/SecretSelector.vue +24 -23
- package/components/form/Security.vue +1 -3
- package/components/form/Select.vue +12 -3
- package/components/form/ServiceNameSelect.vue +2 -5
- package/components/form/ServicePorts.vue +149 -75
- package/components/form/SimpleSecretSelector.vue +29 -9
- package/components/form/Taints.vue +2 -1
- package/components/form/Tolerations.vue +13 -9
- package/components/form/UnitInput.vue +8 -3
- package/components/form/ValueFromResource.vue +110 -96
- package/components/form/WorkloadPorts.vue +143 -123
- package/components/formatter/BadgeStateFormatter.vue +8 -5
- package/components/formatter/LiveDate.vue +3 -3
- package/components/formatter/WorkloadHealthScale.vue +4 -3
- package/components/nav/Favorite.vue +5 -1
- package/components/nav/Group.vue +139 -99
- package/components/nav/Header.vue +138 -164
- package/components/nav/HeaderPageActionMenu.vue +1 -0
- package/components/nav/NamespaceFilter.vue +34 -36
- package/components/nav/TopLevelMenu.vue +62 -25
- package/components/nav/Type.vue +73 -43
- package/composables/useClickOutside.ts +1 -1
- package/config/menuRouteMap.js +10 -0
- package/config/private-label.js +14 -11
- package/config/product/auth.js +17 -7
- package/config/product/explorer.js +32 -10
- package/config/product/manager.js +28 -17
- package/config/product/settings.js +19 -9
- package/config/product/uiplugins.js +13 -10
- package/config/router/navigation-guards/index.js +61 -3
- package/config/settings.ts +28 -0
- package/config/table-headers.js +3 -2
- package/detail/node.vue +28 -23
- package/dialog/AddCustomBadgeDialog.vue +17 -9
- package/dialog/ForceMachineRemoveDialog.vue +2 -2
- package/dialog/RollbackWorkloadDialog.vue +1 -1
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
- package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +9 -6
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
- package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
- package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
- package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
- package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
- package/edit/configmap.vue +4 -0
- package/edit/logging-flow/index.vue +1 -2
- package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +19 -19
- package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +23 -23
- package/edit/logging.banzaicloud.io.output/providers/datadog.vue +19 -19
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +14 -14
- package/edit/logging.banzaicloud.io.output/providers/forward.vue +12 -12
- package/edit/logging.banzaicloud.io.output/providers/gcs.vue +23 -23
- package/edit/logging.banzaicloud.io.output/providers/gelf.vue +6 -6
- package/edit/logging.banzaicloud.io.output/providers/kafka.vue +10 -10
- package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +8 -8
- package/edit/logging.banzaicloud.io.output/providers/logdna.vue +17 -17
- package/edit/logging.banzaicloud.io.output/providers/logz.vue +7 -7
- package/edit/logging.banzaicloud.io.output/providers/loki.vue +12 -12
- package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +14 -14
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +6 -6
- package/edit/logging.banzaicloud.io.output/providers/s3.vue +23 -23
- package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +13 -13
- package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +2 -2
- package/edit/logging.banzaicloud.io.output/providers/syslog.vue +54 -54
- package/edit/management.cattle.io.user.vue +17 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +50 -26
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +36 -12
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/dingding.vue +32 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/message.vue +52 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/snmp.vue +45 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/work.vue +31 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
- package/edit/namespace.vue +1 -2
- package/edit/networking.k8s.io.ingress/Certificate.vue +14 -5
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
- package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
- package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
- package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
- package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
- package/edit/persistentvolume/index.vue +3 -1
- package/edit/persistentvolumeclaim.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +1 -1
- package/edit/secret/index.vue +2 -2
- package/edit/service.vue +4 -1
- package/edit/storage.k8s.io.storageclass/index.vue +10 -8
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
- package/edit/token.vue +31 -12
- package/edit/workload/Job.vue +31 -34
- package/edit/workload/Upgrading.vue +5 -5
- package/edit/workload/index.vue +22 -18
- package/edit/workload/storage/Mount.vue +1 -0
- package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
- package/edit/workload/storage/azureDisk.vue +14 -10
- package/edit/workload/storage/azureFile.vue +9 -7
- package/edit/workload/storage/csi/index.vue +6 -9
- package/edit/workload/storage/emptyDir.vue +7 -5
- package/edit/workload/storage/gcePersistentDisk.vue +9 -7
- package/edit/workload/storage/hostPath.vue +7 -5
- package/edit/workload/storage/nfs.vue +8 -6
- package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +20 -15
- package/edit/workload/storage/secret.vue +9 -6
- package/edit/workload/storage/vsphereVolume.vue +11 -7
- package/initialize/app-extended.js +7 -1
- package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +8 -6
- package/list/management.cattle.io.setting.vue +22 -13
- package/list/management.cattle.io.user.vue +7 -3
- package/list/namespace.vue +3 -0
- package/list/provisioning.cattle.io.cluster.vue +6 -7
- package/mixins/brand.js +17 -0
- package/mixins/create-edit-view/impl.js +10 -0
- package/models/provisioning.cattle.io.cluster.js +19 -18
- package/models/workload.js +2 -2
- package/package.json +1 -1
- package/pages/account/index.vue +93 -58
- package/pages/account/pri.vue +229 -0
- package/pages/auth/login.vue +216 -51
- package/pages/auth/setup.vue +175 -33
- package/pages/c/_cluster/_product/namespaces.vue +5 -5
- package/pages/c/_cluster/auth/roles/index.vue +83 -8
- package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
- package/pages/c/_cluster/explorer/index.vue +2 -1
- package/pages/c/_cluster/explorer/tools/index.vue +6 -6
- package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
- package/pages/c/_cluster/settings/banners.vue +174 -102
- package/pages/c/_cluster/settings/brand.vue +350 -302
- package/pages/c/_cluster/settings/performance.vue +61 -38
- package/pages/home.vue +119 -37
- package/pages/prefs.vue +27 -25
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/plugins/dashboard-store/actions.js +1 -1
- package/plugins/dashboard-store/resource-class.js +28 -27
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/public/index.html +4 -4
- package/rancher-components/BadgeState/BadgeState.vue +38 -55
- package/rancher-components/Banner/Banner.vue +25 -9
- package/rancher-components/Card/Card.vue +7 -8
- package/rancher-components/Form/Checkbox/Checkbox.vue +4 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +42 -3
- package/rancher-components/Form/Radio/RadioButton.vue +35 -11
- package/rancher-components/Form/Radio/RadioGroup.vue +22 -6
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -0
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +41 -4
- package/rancher-components/RcDropdown/RcDropdown.vue +35 -7
- package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +12 -6
- package/rancher-components/RcDropdown/types.ts +1 -0
- package/rancher-components/StringList/StringList.vue +1 -1
- package/scripts/build-pkg.sh +18 -23
- package/scripts/publish-shell.sh +1 -1
- package/static/favicon.ico +0 -0
- package/static/favicon.png +0 -0
- package/static/loading-indicator.html +3 -3
- package/store/i18n.js +6 -2
- package/store/modal.ts +3 -3
- package/store/prefs.js +11 -4
- package/store/type-map.js +30 -2
- package/types/shell/index.d.ts +86 -97
- package/utils/error.js +109 -8
- package/utils/errorTranslate.json +1740 -0
- package/utils/errorTranslateNew.json +39 -0
- package/utils/roleFiltering.js +33 -0
- package/utils/router.js +21 -0
- package/utils/select.js +26 -3
- package/utils/string.js +8 -5
- package/utils/title.ts +1 -1
- package/vue.config.js +1 -1
|
@@ -77,7 +77,10 @@ export default {
|
|
|
77
77
|
LOGGED_OUT,
|
|
78
78
|
navHeaderRight: null,
|
|
79
79
|
extensionHeaderActions: getApplicableExtensionEnhancements(this, ExtensionPoint.ACTION, ActionLocation.HEADER, this.$route),
|
|
80
|
-
ctx: this
|
|
80
|
+
ctx: this,
|
|
81
|
+
showImportModal: false,
|
|
82
|
+
showSearchModal: false,
|
|
83
|
+
userIcon: require('@shell/assets/images/logo.svg'),
|
|
81
84
|
};
|
|
82
85
|
},
|
|
83
86
|
|
|
@@ -273,6 +276,18 @@ export default {
|
|
|
273
276
|
},
|
|
274
277
|
|
|
275
278
|
methods: {
|
|
279
|
+
|
|
280
|
+
LogOutfn(type) {
|
|
281
|
+
sessionStorage.removeItem('TOPLEVELPERMISSIONS');
|
|
282
|
+
if (type === '1') {
|
|
283
|
+
this.$router.push({ name: 'account' });
|
|
284
|
+
} else if (type === '2') {
|
|
285
|
+
this.showSloModal();
|
|
286
|
+
} else if (type === '3') {
|
|
287
|
+
this.$router.push(this.generateLogoutRoute);
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
|
|
276
291
|
showSloModal() {
|
|
277
292
|
this.$store.dispatch('management/promptModal', {
|
|
278
293
|
component: 'SloDialog',
|
|
@@ -398,152 +413,59 @@ export default {
|
|
|
398
413
|
</script>
|
|
399
414
|
|
|
400
415
|
<template>
|
|
416
|
+
<!-- 整个页面的顶部 header -->
|
|
401
417
|
<header
|
|
402
418
|
ref="header"
|
|
403
419
|
data-testid="header"
|
|
404
420
|
>
|
|
405
421
|
<div>
|
|
422
|
+
<!-- 顶部一级菜单(根据不同产品/集群条件决定是否显示) -->
|
|
406
423
|
<TopLevelMenu v-if="isRancherInHarvester || isMultiCluster || !isSingleProduct" />
|
|
407
424
|
</div>
|
|
408
425
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
>
|
|
426
|
+
<!-- ===== 左侧 logo 区域 ===== -->
|
|
427
|
+
<div class="menu-spacer">
|
|
428
|
+
<!-- 如果是单产品模式且不是 RancherInHarvester,就显示 logo 路由跳转 -->
|
|
413
429
|
<router-link
|
|
414
430
|
v-if="isSingleProduct && !isRancherInHarvester"
|
|
415
431
|
:to="singleProductLogoRoute"
|
|
416
|
-
role="link"
|
|
417
|
-
:alt="t('branding.logos.home')"
|
|
418
432
|
>
|
|
419
|
-
|
|
420
|
-
v-if="isSingleProduct.supportCustomLogo && isHarvester"
|
|
421
|
-
class="side-menu-logo"
|
|
422
|
-
file-name="harvester.svg"
|
|
423
|
-
:support-custom-logo="true"
|
|
424
|
-
:alt="t('branding.logos.label')"
|
|
425
|
-
/>
|
|
433
|
+
<!-- 显示用户头像或 logo 图片 -->
|
|
426
434
|
<img
|
|
427
|
-
|
|
428
|
-
class="side-menu-logo"
|
|
429
|
-
:src="isSingleProduct.logo"
|
|
430
|
-
:alt="t('branding.logos.label')"
|
|
435
|
+
:src="userIcon"
|
|
431
436
|
>
|
|
432
437
|
</router-link>
|
|
433
438
|
</div>
|
|
434
439
|
|
|
435
|
-
|
|
436
|
-
v-if="!simple"
|
|
437
|
-
ref="product"
|
|
438
|
-
class="product"
|
|
439
|
-
>
|
|
440
|
-
<div
|
|
441
|
-
v-if="currentProduct && currentProduct.showClusterSwitcher"
|
|
442
|
-
v-clean-tooltip="nameTooltip"
|
|
443
|
-
class="cluster cluster-clipped"
|
|
444
|
-
>
|
|
445
|
-
<div
|
|
446
|
-
v-if="isSingleProduct && !isRancherInHarvester"
|
|
447
|
-
class="product-name"
|
|
448
|
-
>
|
|
449
|
-
<template v-if="isSingleProduct.supportCustomLogo">
|
|
450
|
-
{{ vendor }}
|
|
451
|
-
</template>
|
|
452
|
-
<template v-else>
|
|
453
|
-
{{ t(isSingleProduct.productNameKey) }}
|
|
454
|
-
</template>
|
|
455
|
-
</div>
|
|
456
|
-
<template v-else>
|
|
457
|
-
<ClusterProviderIcon
|
|
458
|
-
v-if="currentCluster"
|
|
459
|
-
:cluster="currentCluster"
|
|
460
|
-
class="mr-10"
|
|
461
|
-
:alt="t('branding.logos.label')"
|
|
462
|
-
/>
|
|
463
|
-
<div
|
|
464
|
-
v-if="currentCluster"
|
|
465
|
-
ref="clusterName"
|
|
466
|
-
class="cluster-name"
|
|
467
|
-
>
|
|
468
|
-
{{ currentCluster.spec.displayName }}
|
|
469
|
-
</div>
|
|
470
|
-
<ClusterBadge
|
|
471
|
-
v-if="currentCluster"
|
|
472
|
-
:cluster="currentCluster"
|
|
473
|
-
class="ml-10"
|
|
474
|
-
:alt="t('branding.logos.label')"
|
|
475
|
-
/>
|
|
476
|
-
<div
|
|
477
|
-
v-if="!currentCluster"
|
|
478
|
-
class="simple-title"
|
|
479
|
-
>
|
|
480
|
-
<BrandImage
|
|
481
|
-
class="side-menu-logo-img"
|
|
482
|
-
file-name="rancher-logo.svg"
|
|
483
|
-
:alt="t('branding.logos.label')"
|
|
484
|
-
/>
|
|
485
|
-
</div>
|
|
486
|
-
</template>
|
|
487
|
-
</div>
|
|
488
|
-
<div
|
|
489
|
-
v-if="currentProduct && !currentProduct.showClusterSwitcher"
|
|
490
|
-
class="cluster"
|
|
491
|
-
>
|
|
492
|
-
<img
|
|
493
|
-
v-if="currentProduct.iconHeader"
|
|
494
|
-
v-bind="$attrs"
|
|
495
|
-
:src="currentProduct.iconHeader"
|
|
496
|
-
class="cluster-os-logo mr-10"
|
|
497
|
-
style="width: 44px; height: 36px;"
|
|
498
|
-
:alt="t('branding.logos.label')"
|
|
499
|
-
>
|
|
500
|
-
<div class="product-name">
|
|
501
|
-
{{ prod }}
|
|
502
|
-
</div>
|
|
503
|
-
</div>
|
|
504
|
-
</div>
|
|
505
|
-
|
|
506
|
-
<div
|
|
507
|
-
v-else
|
|
508
|
-
class="simple-title"
|
|
509
|
-
>
|
|
510
|
-
<div
|
|
511
|
-
v-if="isSingleProduct"
|
|
512
|
-
class="product-name"
|
|
513
|
-
>
|
|
514
|
-
{{ t(isSingleProduct.productNameKey) }}
|
|
515
|
-
</div>
|
|
516
|
-
|
|
517
|
-
<div
|
|
518
|
-
v-else
|
|
519
|
-
class="side-menu-logo"
|
|
520
|
-
>
|
|
521
|
-
<BrandImage
|
|
522
|
-
class="side-menu-logo-img"
|
|
523
|
-
data-testid="header__brand-img"
|
|
524
|
-
file-name="rancher-logo.svg"
|
|
525
|
-
:alt="t('branding.logos.label')"
|
|
526
|
-
/>
|
|
527
|
-
</div>
|
|
528
|
-
</div>
|
|
529
|
-
|
|
440
|
+
<!-- ===== 中间占位符(把左右内容分开) ===== -->
|
|
530
441
|
<div class="spacer" />
|
|
531
442
|
|
|
443
|
+
<!-- ===== 右侧功能区域 ===== -->
|
|
532
444
|
<div class="rd-header-right">
|
|
445
|
+
<!-- 动态插入右侧自定义组件(例如插件扩展的 header) -->
|
|
533
446
|
<component :is="navHeaderRight" />
|
|
447
|
+
|
|
448
|
+
<!-- ===== 集群/命名空间过滤器 ===== -->
|
|
534
449
|
<div
|
|
535
450
|
v-if="showFilter"
|
|
536
451
|
class="top"
|
|
537
452
|
>
|
|
453
|
+
<!-- 如果集群就绪 + 当前产品支持命名空间过滤器 或 Explorer 模式 -->
|
|
538
454
|
<NamespaceFilter v-if="clusterReady && currentProduct && (currentProduct.showNamespaceFilter || isExplorer)" />
|
|
539
|
-
|
|
455
|
+
|
|
456
|
+
<!-- 否则显示工作空间切换器 -->
|
|
457
|
+
<WorkspaceSwitcher v-else-if="clusterReady && currentProduct && currentProduct.showWorkspaceSwitcher" />
|
|
540
458
|
</div>
|
|
459
|
+
|
|
460
|
+
<!-- ===== 集群相关按钮(仅在有集群且不是 simple 模式下显示) ===== -->
|
|
541
461
|
<div
|
|
542
462
|
v-if="currentCluster && !simple"
|
|
543
463
|
class="header-buttons"
|
|
544
464
|
>
|
|
465
|
+
<!-- 如果当前产品支持集群切换器 -->
|
|
545
466
|
<template v-if="currentProduct && currentProduct.showClusterSwitcher">
|
|
546
|
-
|
|
467
|
+
<!-- 导入 YAML 按钮 -->
|
|
468
|
+
<!-- <button
|
|
547
469
|
v-if="showImportYaml"
|
|
548
470
|
v-clean-tooltip="t('nav.import')"
|
|
549
471
|
:disabled="!importEnabled"
|
|
@@ -556,9 +478,9 @@ export default {
|
|
|
556
478
|
@click="openImport()"
|
|
557
479
|
>
|
|
558
480
|
<i class="icon icon-upload icon-lg" />
|
|
559
|
-
</button>
|
|
481
|
+
</button> -->
|
|
560
482
|
|
|
561
|
-
<button
|
|
483
|
+
<!-- <button
|
|
562
484
|
v-if="showKubeShell"
|
|
563
485
|
id="btn-kubectl"
|
|
564
486
|
v-clean-tooltip="t('nav.shellShortcut', {key: shellShortcut})"
|
|
@@ -573,9 +495,10 @@ export default {
|
|
|
573
495
|
@click="currentCluster.openShell()"
|
|
574
496
|
>
|
|
575
497
|
<i class="icon icon-terminal icon-lg" />
|
|
576
|
-
</button>
|
|
498
|
+
</button> -->
|
|
577
499
|
|
|
578
|
-
|
|
500
|
+
<!-- 下载 kubeconfig 按钮 -->
|
|
501
|
+
<!-- <button
|
|
579
502
|
v-if="showKubeConfig"
|
|
580
503
|
v-clean-tooltip="t('nav.kubeconfig.download')"
|
|
581
504
|
:disabled="!kubeConfigEnabled"
|
|
@@ -588,9 +511,10 @@ export default {
|
|
|
588
511
|
@click="currentCluster.downloadKubeConfig()"
|
|
589
512
|
>
|
|
590
513
|
<i class="icon icon-file icon-lg" />
|
|
591
|
-
</button>
|
|
514
|
+
</button> -->
|
|
592
515
|
|
|
593
|
-
|
|
516
|
+
<!-- 复制 kubeconfig 按钮 -->
|
|
517
|
+
<!-- <button
|
|
594
518
|
v-if="showCopyConfig"
|
|
595
519
|
v-clean-tooltip="t('nav.kubeconfig.copy')"
|
|
596
520
|
:disabled="!kubeConfigEnabled"
|
|
@@ -602,18 +526,22 @@ export default {
|
|
|
602
526
|
:aria-label="t('nav.kubeconfig.copy')"
|
|
603
527
|
@click="copyKubeConfig($event)"
|
|
604
528
|
>
|
|
529
|
+
|
|
605
530
|
<i
|
|
606
531
|
v-if="kubeConfigCopying"
|
|
607
532
|
class="icon icon-checkmark icon-lg"
|
|
608
533
|
/>
|
|
534
|
+
|
|
609
535
|
<i
|
|
610
536
|
v-else
|
|
611
537
|
class="icon icon-copy icon-lg"
|
|
612
538
|
/>
|
|
613
|
-
</button>
|
|
539
|
+
</button> -->
|
|
614
540
|
</template>
|
|
615
541
|
|
|
616
|
-
|
|
542
|
+
<!-- 资源搜索按钮 -->
|
|
543
|
+
<!-- 2025/9/30 隐藏 -->
|
|
544
|
+
<!-- <button
|
|
617
545
|
v-if="showSearch"
|
|
618
546
|
id="header-btn-search"
|
|
619
547
|
v-clean-tooltip="t('nav.resourceSearch.toolTip', {key: searchShortcut})"
|
|
@@ -628,53 +556,71 @@ export default {
|
|
|
628
556
|
@click="openSearch()"
|
|
629
557
|
>
|
|
630
558
|
<i class="icon icon-search icon-lg" />
|
|
631
|
-
</button>
|
|
559
|
+
</button> -->
|
|
560
|
+
|
|
561
|
+
<!-- 搜索弹窗 -->
|
|
562
|
+
<app-modal
|
|
563
|
+
v-if="showSearch && showSearchModal"
|
|
564
|
+
class="search-modal"
|
|
565
|
+
name="searchModal"
|
|
566
|
+
width="50%"
|
|
567
|
+
height="auto"
|
|
568
|
+
:trigger-focus-trap="true"
|
|
569
|
+
return-focus-selector="#header-btn-search"
|
|
570
|
+
@close="hideSearch()"
|
|
571
|
+
/>
|
|
632
572
|
</div>
|
|
633
573
|
|
|
634
|
-
<!--
|
|
574
|
+
<!-- ===== 插件扩展按钮区 ===== -->
|
|
635
575
|
<div
|
|
636
576
|
v-if="extensionHeaderActions.length"
|
|
637
577
|
class="header-buttons"
|
|
638
578
|
>
|
|
639
|
-
<
|
|
579
|
+
<template
|
|
640
580
|
v-for="action, i in extensionHeaderActions"
|
|
641
581
|
:key="`${action.label}${i}`"
|
|
642
|
-
v-clean-tooltip="handleExtensionTooltip(action)"
|
|
643
|
-
v-shortkey="action.shortcutKey"
|
|
644
|
-
:disabled="action.enabled ? !action.enabled(ctx) : false"
|
|
645
|
-
type="button"
|
|
646
|
-
class="btn header-btn role-tertiary"
|
|
647
|
-
:data-testid="`extension-header-action-${ action.labelKey || action.label }`"
|
|
648
|
-
role="button"
|
|
649
|
-
tabindex="0"
|
|
650
|
-
:aria-label="action.labelKey ? t(action.labelKey) : action.label"
|
|
651
|
-
@shortkey="handleExtensionAction(action, $event)"
|
|
652
|
-
@click="handleExtensionAction(action, $event)"
|
|
653
582
|
>
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
583
|
+
<!-- kubectl-explain.action | 2025/9/30隐藏 -->
|
|
584
|
+
<button
|
|
585
|
+
v-if="action.labelKey !== 'kubectl-explain.action'"
|
|
586
|
+
v-clean-tooltip="handleExtensionTooltip(action)"
|
|
587
|
+
v-shortkey="action.shortcutKey"
|
|
588
|
+
:disabled="action.enabled ? !action.enabled(ctx) : false"
|
|
589
|
+
type="button"
|
|
590
|
+
class="btn header-btn role-tertiary"
|
|
591
|
+
:data-testid="`extension-header-action-${ action.labelKey || action.label }`"
|
|
592
|
+
role="button"
|
|
593
|
+
tabindex="0"
|
|
594
|
+
:aria-label="action.label"
|
|
595
|
+
@shortkey="handleExtensionAction(action, $event)"
|
|
596
|
+
@click="handleExtensionAction(action, $event)"
|
|
597
|
+
>
|
|
598
|
+
<IconOrSvg
|
|
599
|
+
class="icon icon-lg"
|
|
600
|
+
:icon="action.icon"
|
|
601
|
+
:src="action.svg"
|
|
602
|
+
color="header"
|
|
603
|
+
/>
|
|
604
|
+
</button>
|
|
605
|
+
</template>
|
|
662
606
|
</div>
|
|
663
607
|
|
|
608
|
+
<!-- ===== 用户菜单(右上角头像 + 下拉) ===== -->
|
|
664
609
|
<div class="center-self">
|
|
665
610
|
<header-page-action-menu v-if="showPageActions" />
|
|
666
|
-
|
|
611
|
+
|
|
667
612
|
<rc-dropdown
|
|
668
613
|
v-if="showUserMenu"
|
|
669
614
|
:aria-label="t('nav.userMenu.label')"
|
|
670
615
|
>
|
|
616
|
+
<!-- 头像触发按钮 -->
|
|
671
617
|
<rc-dropdown-trigger
|
|
672
618
|
ghost
|
|
673
619
|
small
|
|
674
620
|
data-testid="nav_header_showUserMenu"
|
|
675
621
|
:aria-label="t('nav.userMenu.button.label')"
|
|
676
622
|
>
|
|
677
|
-
<img
|
|
623
|
+
<!-- <img
|
|
678
624
|
v-if="principal && principal.avatarSrc"
|
|
679
625
|
:src="principal.avatarSrc"
|
|
680
626
|
:class="{'avatar-round': principal.roundAvatar}"
|
|
@@ -685,10 +631,17 @@ export default {
|
|
|
685
631
|
<i
|
|
686
632
|
v-else
|
|
687
633
|
class="icon icon-user icon-3x avatar"
|
|
634
|
+
/> -->
|
|
635
|
+
<i
|
|
636
|
+
class="icon icon-usericon"
|
|
637
|
+
style="padding-bottom: 5px;"
|
|
688
638
|
/>
|
|
639
|
+
<span class="login-name">{{ principal.loginName }}</span>
|
|
689
640
|
</rc-dropdown-trigger>
|
|
641
|
+
|
|
642
|
+
<!-- 下拉菜单内容 -->
|
|
690
643
|
<template #dropdownCollection>
|
|
691
|
-
<template v-if="authEnabled">
|
|
644
|
+
<!-- <template v-if="authEnabled">
|
|
692
645
|
<div class="user-info">
|
|
693
646
|
<div class="user-name">
|
|
694
647
|
<i class="icon icon-lg icon-user" /> {{ principal.loginName }}
|
|
@@ -700,28 +653,34 @@ export default {
|
|
|
700
653
|
</div>
|
|
701
654
|
</div>
|
|
702
655
|
<rc-dropdown-separator />
|
|
703
|
-
</template>
|
|
704
|
-
<rc-dropdown-item
|
|
656
|
+
</template> -->
|
|
657
|
+
<!-- <rc-dropdown-item
|
|
705
658
|
v-if="showPreferencesLink"
|
|
706
659
|
@click="$router.push({ name: 'prefs'})"
|
|
707
660
|
>
|
|
708
661
|
{{ t('nav.userMenu.preferences') }}
|
|
709
|
-
</rc-dropdown-item>
|
|
662
|
+
</rc-dropdown-item> -->
|
|
663
|
+
|
|
664
|
+
<!-- 退出登录(支持 SLO 弹窗) -->
|
|
710
665
|
<rc-dropdown-item
|
|
711
666
|
v-if="showAccountAndApiKeyLink"
|
|
712
|
-
@click="
|
|
667
|
+
@click="LogOutfn('1')"
|
|
713
668
|
>
|
|
714
669
|
{{ t('nav.userMenu.accountAndKeys', {}, true) }}
|
|
715
670
|
</rc-dropdown-item>
|
|
671
|
+
|
|
672
|
+
<!-- 普通退出登录 -->
|
|
716
673
|
<rc-dropdown-item
|
|
717
674
|
v-if="authEnabled && shouldShowSloLogoutModal"
|
|
718
|
-
@click="
|
|
675
|
+
@click="LogOutfn('2')"
|
|
719
676
|
>
|
|
720
677
|
{{ t('nav.userMenu.logOut') }}
|
|
721
678
|
</rc-dropdown-item>
|
|
679
|
+
|
|
680
|
+
<!-- 普通退出登录 -->
|
|
722
681
|
<rc-dropdown-item
|
|
723
682
|
v-else-if="authEnabled"
|
|
724
|
-
@click="
|
|
683
|
+
@click="LogOutfn('3')"
|
|
725
684
|
>
|
|
726
685
|
{{ t('nav.userMenu.logOut') }}
|
|
727
686
|
</rc-dropdown-item>
|
|
@@ -739,6 +698,7 @@ export default {
|
|
|
739
698
|
HEADER {
|
|
740
699
|
display: flex;
|
|
741
700
|
z-index: z-index('mainHeader');
|
|
701
|
+
box-shadow: 0px 3px 3px 1px rgba(0,0,0,0.12);
|
|
742
702
|
|
|
743
703
|
> .spacer {
|
|
744
704
|
flex: 1;
|
|
@@ -856,7 +816,7 @@ export default {
|
|
|
856
816
|
|
|
857
817
|
> * {
|
|
858
818
|
background-color: var(--header-bg);
|
|
859
|
-
border-bottom: var(--header-border-size) solid var(--header-border);
|
|
819
|
+
/* border-bottom: var(--header-border-size) solid var(--header-border); */
|
|
860
820
|
}
|
|
861
821
|
|
|
862
822
|
.rd-header-right {
|
|
@@ -869,7 +829,7 @@ export default {
|
|
|
869
829
|
}
|
|
870
830
|
|
|
871
831
|
> .top {
|
|
872
|
-
padding-top:
|
|
832
|
+
padding-top: 10px;
|
|
873
833
|
|
|
874
834
|
INPUT[type='search']::placeholder,
|
|
875
835
|
.vs__open-indicator,
|
|
@@ -906,6 +866,8 @@ export default {
|
|
|
906
866
|
// Spacing between header buttons
|
|
907
867
|
.btn:not(:last-of-type) {
|
|
908
868
|
margin-right: 10px;
|
|
869
|
+
width: 30px;
|
|
870
|
+
min-width: 30px;
|
|
909
871
|
}
|
|
910
872
|
|
|
911
873
|
.btn:focus {
|
|
@@ -927,6 +889,8 @@ export default {
|
|
|
927
889
|
|
|
928
890
|
.header-btn {
|
|
929
891
|
width: 40px;
|
|
892
|
+
display: flex;
|
|
893
|
+
align-items: center;
|
|
930
894
|
}
|
|
931
895
|
|
|
932
896
|
:deep() div .btn.role-tertiary {
|
|
@@ -934,19 +898,21 @@ export default {
|
|
|
934
898
|
border: none;
|
|
935
899
|
background: var(--header-btn-bg);
|
|
936
900
|
color: var(--header-btn-text);
|
|
937
|
-
padding: 0 10px;
|
|
901
|
+
padding: 0 10px 0 10px;
|
|
938
902
|
line-height: 32px;
|
|
939
903
|
min-height: 32px;
|
|
904
|
+
width: 30px;
|
|
905
|
+
min-width: 30px;
|
|
940
906
|
|
|
941
907
|
i {
|
|
942
908
|
// Ideally same height as the parent button, but this means tooltip needs adjusting (which is it's own can of worms)
|
|
943
909
|
line-height: 20px;
|
|
944
910
|
}
|
|
945
911
|
|
|
946
|
-
&:hover {
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
}
|
|
912
|
+
// &:hover {
|
|
913
|
+
// background: var(--primary);
|
|
914
|
+
// color: #fff;
|
|
915
|
+
// }
|
|
950
916
|
|
|
951
917
|
&[disabled=disabled] {
|
|
952
918
|
background-color: rgba(0,0,0,0.25) !important;
|
|
@@ -989,7 +955,7 @@ export default {
|
|
|
989
955
|
|
|
990
956
|
> .user {
|
|
991
957
|
outline: none;
|
|
992
|
-
width: var(--header-height);
|
|
958
|
+
/* width: var(--header-height); */
|
|
993
959
|
|
|
994
960
|
.v-popper {
|
|
995
961
|
display: flex;
|
|
@@ -1003,6 +969,10 @@ export default {
|
|
|
1003
969
|
.user-image {
|
|
1004
970
|
display: flex;
|
|
1005
971
|
align-items: center;
|
|
972
|
+
&:hover{
|
|
973
|
+
color: var(--primary);
|
|
974
|
+
}
|
|
975
|
+
|
|
1006
976
|
}
|
|
1007
977
|
|
|
1008
978
|
&:focus {
|
|
@@ -1025,7 +995,6 @@ export default {
|
|
|
1025
995
|
> .center-self {
|
|
1026
996
|
align-self: center;
|
|
1027
997
|
display: flex;
|
|
1028
|
-
gap: 1rem;
|
|
1029
998
|
align-items: center;
|
|
1030
999
|
padding-right: 1rem;
|
|
1031
1000
|
}
|
|
@@ -1131,5 +1100,10 @@ export default {
|
|
|
1131
1100
|
}
|
|
1132
1101
|
}
|
|
1133
1102
|
}
|
|
1134
|
-
|
|
1103
|
+
.login-name{
|
|
1104
|
+
font-size: 14px;
|
|
1105
|
+
margin-left: 5px;
|
|
1106
|
+
// margin-top: 5px;
|
|
1107
|
+
line-height: 20px;
|
|
1108
|
+
}
|
|
1135
1109
|
</style>
|