dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.60
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 +19 -0
- package/assets/images/logo.png +0 -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 +656 -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 +76 -21
- 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 +127 -150
- 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 +15 -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 +31 -31
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +36 -12
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
- 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/webhook.vue +1 -1
- 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 +220 -52
- 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.png'),
|
|
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,66 @@ export default {
|
|
|
398
413
|
</script>
|
|
399
414
|
|
|
400
415
|
<template>
|
|
416
|
+
|
|
417
|
+
<!-- 整个页面的顶部 header -->
|
|
401
418
|
<header
|
|
402
419
|
ref="header"
|
|
403
420
|
data-testid="header"
|
|
404
421
|
>
|
|
405
422
|
<div>
|
|
423
|
+
|
|
424
|
+
<!-- 顶部一级菜单(根据不同产品/集群条件决定是否显示) -->
|
|
406
425
|
<TopLevelMenu v-if="isRancherInHarvester || isMultiCluster || !isSingleProduct" />
|
|
407
426
|
</div>
|
|
408
427
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
>
|
|
428
|
+
<!-- ===== 左侧 logo 区域 ===== -->
|
|
429
|
+
<div class="menu-spacer">
|
|
430
|
+
<!-- 如果是单产品模式且不是 RancherInHarvester,就显示 logo 路由跳转 -->
|
|
413
431
|
<router-link
|
|
414
432
|
v-if="isSingleProduct && !isRancherInHarvester"
|
|
415
433
|
:to="singleProductLogoRoute"
|
|
416
|
-
role="link"
|
|
417
|
-
:alt="t('branding.logos.home')"
|
|
418
434
|
>
|
|
419
|
-
<BrandImage
|
|
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
|
-
/>
|
|
426
|
-
<img
|
|
427
|
-
v-else
|
|
428
|
-
class="side-menu-logo"
|
|
429
|
-
:src="isSingleProduct.logo"
|
|
430
|
-
:alt="t('branding.logos.label')"
|
|
431
|
-
>
|
|
432
|
-
</router-link>
|
|
433
|
-
</div>
|
|
434
435
|
|
|
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
|
-
>
|
|
436
|
+
<!-- 显示用户头像或 logo 图片 -->
|
|
492
437
|
<img
|
|
493
|
-
|
|
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')"
|
|
438
|
+
:src="userIcon"
|
|
499
439
|
>
|
|
500
|
-
|
|
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>
|
|
440
|
+
</router-link>
|
|
528
441
|
</div>
|
|
529
|
-
|
|
442
|
+
|
|
443
|
+
<!-- ===== 中间占位符(把左右内容分开) ===== -->
|
|
530
444
|
<div class="spacer" />
|
|
531
445
|
|
|
446
|
+
<!-- ===== 右侧功能区域 ===== -->
|
|
532
447
|
<div class="rd-header-right">
|
|
448
|
+
|
|
449
|
+
<!-- 动态插入右侧自定义组件(例如插件扩展的 header) -->
|
|
533
450
|
<component :is="navHeaderRight" />
|
|
451
|
+
|
|
452
|
+
<!-- ===== 集群/命名空间过滤器 ===== -->
|
|
534
453
|
<div
|
|
535
454
|
v-if="showFilter"
|
|
536
455
|
class="top"
|
|
537
456
|
>
|
|
457
|
+
|
|
458
|
+
<!-- 如果集群就绪 + 当前产品支持命名空间过滤器 或 Explorer 模式 -->
|
|
538
459
|
<NamespaceFilter v-if="clusterReady && currentProduct && (currentProduct.showNamespaceFilter || isExplorer)" />
|
|
539
|
-
|
|
460
|
+
|
|
461
|
+
<!-- 否则显示工作空间切换器 -->
|
|
462
|
+
<WorkspaceSwitcher v-else-if="clusterReady && currentProduct && currentProduct.showWorkspaceSwitcher" />
|
|
540
463
|
</div>
|
|
464
|
+
|
|
465
|
+
<!-- ===== 集群相关按钮(仅在有集群且不是 simple 模式下显示) ===== -->
|
|
541
466
|
<div
|
|
542
467
|
v-if="currentCluster && !simple"
|
|
543
468
|
class="header-buttons"
|
|
544
469
|
>
|
|
470
|
+
|
|
471
|
+
<!-- 如果当前产品支持集群切换器 -->
|
|
545
472
|
<template v-if="currentProduct && currentProduct.showClusterSwitcher">
|
|
546
|
-
|
|
473
|
+
|
|
474
|
+
<!-- 导入 YAML 按钮 -->
|
|
475
|
+
<!-- <button
|
|
547
476
|
v-if="showImportYaml"
|
|
548
477
|
v-clean-tooltip="t('nav.import')"
|
|
549
478
|
:disabled="!importEnabled"
|
|
@@ -556,9 +485,9 @@ export default {
|
|
|
556
485
|
@click="openImport()"
|
|
557
486
|
>
|
|
558
487
|
<i class="icon icon-upload icon-lg" />
|
|
559
|
-
</button>
|
|
488
|
+
</button> -->
|
|
560
489
|
|
|
561
|
-
<button
|
|
490
|
+
<!-- <button
|
|
562
491
|
v-if="showKubeShell"
|
|
563
492
|
id="btn-kubectl"
|
|
564
493
|
v-clean-tooltip="t('nav.shellShortcut', {key: shellShortcut})"
|
|
@@ -573,9 +502,10 @@ export default {
|
|
|
573
502
|
@click="currentCluster.openShell()"
|
|
574
503
|
>
|
|
575
504
|
<i class="icon icon-terminal icon-lg" />
|
|
576
|
-
</button>
|
|
505
|
+
</button> -->
|
|
577
506
|
|
|
578
|
-
|
|
507
|
+
<!-- 下载 kubeconfig 按钮 -->
|
|
508
|
+
<!-- <button
|
|
579
509
|
v-if="showKubeConfig"
|
|
580
510
|
v-clean-tooltip="t('nav.kubeconfig.download')"
|
|
581
511
|
:disabled="!kubeConfigEnabled"
|
|
@@ -588,9 +518,10 @@ export default {
|
|
|
588
518
|
@click="currentCluster.downloadKubeConfig()"
|
|
589
519
|
>
|
|
590
520
|
<i class="icon icon-file icon-lg" />
|
|
591
|
-
</button>
|
|
521
|
+
</button> -->
|
|
592
522
|
|
|
593
|
-
|
|
523
|
+
<!-- 复制 kubeconfig 按钮 -->
|
|
524
|
+
<!-- <button
|
|
594
525
|
v-if="showCopyConfig"
|
|
595
526
|
v-clean-tooltip="t('nav.kubeconfig.copy')"
|
|
596
527
|
:disabled="!kubeConfigEnabled"
|
|
@@ -602,18 +533,22 @@ export default {
|
|
|
602
533
|
:aria-label="t('nav.kubeconfig.copy')"
|
|
603
534
|
@click="copyKubeConfig($event)"
|
|
604
535
|
>
|
|
536
|
+
|
|
605
537
|
<i
|
|
606
538
|
v-if="kubeConfigCopying"
|
|
607
539
|
class="icon icon-checkmark icon-lg"
|
|
608
540
|
/>
|
|
541
|
+
|
|
609
542
|
<i
|
|
610
543
|
v-else
|
|
611
544
|
class="icon icon-copy icon-lg"
|
|
612
545
|
/>
|
|
613
|
-
</button>
|
|
546
|
+
</button> -->
|
|
614
547
|
</template>
|
|
615
548
|
|
|
616
|
-
|
|
549
|
+
<!-- 资源搜索按钮 -->
|
|
550
|
+
<!-- 2025/9/30 隐藏 -->
|
|
551
|
+
<!-- <button
|
|
617
552
|
v-if="showSearch"
|
|
618
553
|
id="header-btn-search"
|
|
619
554
|
v-clean-tooltip="t('nav.resourceSearch.toolTip', {key: searchShortcut})"
|
|
@@ -628,17 +563,31 @@ export default {
|
|
|
628
563
|
@click="openSearch()"
|
|
629
564
|
>
|
|
630
565
|
<i class="icon icon-search icon-lg" />
|
|
631
|
-
</button>
|
|
566
|
+
</button> -->
|
|
567
|
+
|
|
568
|
+
<!-- 搜索弹窗 -->
|
|
569
|
+
<app-modal
|
|
570
|
+
v-if="showSearch && showSearchModal"
|
|
571
|
+
class="search-modal"
|
|
572
|
+
name="searchModal"
|
|
573
|
+
width="50%"
|
|
574
|
+
height="auto"
|
|
575
|
+
:trigger-focus-trap="true"
|
|
576
|
+
return-focus-selector="#header-btn-search"
|
|
577
|
+
@close="hideSearch()"
|
|
578
|
+
>
|
|
579
|
+
</app-modal>
|
|
632
580
|
</div>
|
|
633
581
|
|
|
634
|
-
<!--
|
|
582
|
+
<!-- ===== 插件扩展按钮区 ===== -->
|
|
635
583
|
<div
|
|
636
584
|
v-if="extensionHeaderActions.length"
|
|
637
585
|
class="header-buttons"
|
|
638
586
|
>
|
|
587
|
+
<template v-for="action, i in extensionHeaderActions" :key="`${action.label}${i}`">
|
|
588
|
+
<!-- kubectl-explain.action | 2025/9/30隐藏 -->
|
|
639
589
|
<button
|
|
640
|
-
v-
|
|
641
|
-
:key="`${action.label}${i}`"
|
|
590
|
+
v-if="action.labelKey !== 'kubectl-explain.action'"
|
|
642
591
|
v-clean-tooltip="handleExtensionTooltip(action)"
|
|
643
592
|
v-shortkey="action.shortcutKey"
|
|
644
593
|
:disabled="action.enabled ? !action.enabled(ctx) : false"
|
|
@@ -647,7 +596,7 @@ export default {
|
|
|
647
596
|
:data-testid="`extension-header-action-${ action.labelKey || action.label }`"
|
|
648
597
|
role="button"
|
|
649
598
|
tabindex="0"
|
|
650
|
-
:aria-label="action.
|
|
599
|
+
:aria-label="action.label"
|
|
651
600
|
@shortkey="handleExtensionAction(action, $event)"
|
|
652
601
|
@click="handleExtensionAction(action, $event)"
|
|
653
602
|
>
|
|
@@ -655,26 +604,29 @@ export default {
|
|
|
655
604
|
class="icon icon-lg"
|
|
656
605
|
:icon="action.icon"
|
|
657
606
|
:src="action.svg"
|
|
658
|
-
:img-alt="action.tooltipKey ? t(action.tooltipKey) : action.labelKey ? t(action.labelKey) : action.label ? action.label : t('generic.imageAlt')"
|
|
659
607
|
color="header"
|
|
660
608
|
/>
|
|
661
609
|
</button>
|
|
610
|
+
</template>
|
|
662
611
|
</div>
|
|
663
612
|
|
|
613
|
+
<!-- ===== 用户菜单(右上角头像 + 下拉) ===== -->
|
|
664
614
|
<div class="center-self">
|
|
665
615
|
<header-page-action-menu v-if="showPageActions" />
|
|
666
|
-
|
|
616
|
+
|
|
667
617
|
<rc-dropdown
|
|
668
618
|
v-if="showUserMenu"
|
|
669
619
|
:aria-label="t('nav.userMenu.label')"
|
|
670
620
|
>
|
|
621
|
+
|
|
622
|
+
<!-- 头像触发按钮 -->
|
|
671
623
|
<rc-dropdown-trigger
|
|
672
624
|
ghost
|
|
673
625
|
small
|
|
674
626
|
data-testid="nav_header_showUserMenu"
|
|
675
627
|
:aria-label="t('nav.userMenu.button.label')"
|
|
676
628
|
>
|
|
677
|
-
<img
|
|
629
|
+
<!-- <img
|
|
678
630
|
v-if="principal && principal.avatarSrc"
|
|
679
631
|
:src="principal.avatarSrc"
|
|
680
632
|
:class="{'avatar-round': principal.roundAvatar}"
|
|
@@ -685,10 +637,14 @@ export default {
|
|
|
685
637
|
<i
|
|
686
638
|
v-else
|
|
687
639
|
class="icon icon-user icon-3x avatar"
|
|
688
|
-
/>
|
|
640
|
+
/> -->
|
|
641
|
+
<i class="icon icon-usericon" style="padding-bottom: 5px;" />
|
|
642
|
+
<span class="login-name">{{ principal.loginName }}</span>
|
|
689
643
|
</rc-dropdown-trigger>
|
|
644
|
+
|
|
645
|
+
<!-- 下拉菜单内容 -->
|
|
690
646
|
<template #dropdownCollection>
|
|
691
|
-
<template v-if="authEnabled">
|
|
647
|
+
<!-- <template v-if="authEnabled">
|
|
692
648
|
<div class="user-info">
|
|
693
649
|
<div class="user-name">
|
|
694
650
|
<i class="icon icon-lg icon-user" /> {{ principal.loginName }}
|
|
@@ -700,28 +656,34 @@ export default {
|
|
|
700
656
|
</div>
|
|
701
657
|
</div>
|
|
702
658
|
<rc-dropdown-separator />
|
|
703
|
-
</template>
|
|
704
|
-
<rc-dropdown-item
|
|
659
|
+
</template> -->
|
|
660
|
+
<!-- <rc-dropdown-item
|
|
705
661
|
v-if="showPreferencesLink"
|
|
706
662
|
@click="$router.push({ name: 'prefs'})"
|
|
707
663
|
>
|
|
708
664
|
{{ t('nav.userMenu.preferences') }}
|
|
709
|
-
</rc-dropdown-item>
|
|
665
|
+
</rc-dropdown-item> -->
|
|
666
|
+
|
|
667
|
+
<!-- 退出登录(支持 SLO 弹窗) -->
|
|
710
668
|
<rc-dropdown-item
|
|
711
669
|
v-if="showAccountAndApiKeyLink"
|
|
712
|
-
@click="
|
|
670
|
+
@click="LogOutfn('1')"
|
|
713
671
|
>
|
|
714
672
|
{{ t('nav.userMenu.accountAndKeys', {}, true) }}
|
|
715
673
|
</rc-dropdown-item>
|
|
674
|
+
|
|
675
|
+
<!-- 普通退出登录 -->
|
|
716
676
|
<rc-dropdown-item
|
|
717
677
|
v-if="authEnabled && shouldShowSloLogoutModal"
|
|
718
|
-
@click="
|
|
678
|
+
@click="LogOutfn('2')"
|
|
719
679
|
>
|
|
720
680
|
{{ t('nav.userMenu.logOut') }}
|
|
721
681
|
</rc-dropdown-item>
|
|
682
|
+
|
|
683
|
+
<!-- 普通退出登录 -->
|
|
722
684
|
<rc-dropdown-item
|
|
723
685
|
v-else-if="authEnabled"
|
|
724
|
-
@click="
|
|
686
|
+
@click="LogOutfn('3')"
|
|
725
687
|
>
|
|
726
688
|
{{ t('nav.userMenu.logOut') }}
|
|
727
689
|
</rc-dropdown-item>
|
|
@@ -739,6 +701,7 @@ export default {
|
|
|
739
701
|
HEADER {
|
|
740
702
|
display: flex;
|
|
741
703
|
z-index: z-index('mainHeader');
|
|
704
|
+
box-shadow: 0px 3px 3px 1px rgba(0,0,0,0.12);
|
|
742
705
|
|
|
743
706
|
> .spacer {
|
|
744
707
|
flex: 1;
|
|
@@ -856,7 +819,7 @@ export default {
|
|
|
856
819
|
|
|
857
820
|
> * {
|
|
858
821
|
background-color: var(--header-bg);
|
|
859
|
-
border-bottom: var(--header-border-size) solid var(--header-border);
|
|
822
|
+
/* border-bottom: var(--header-border-size) solid var(--header-border); */
|
|
860
823
|
}
|
|
861
824
|
|
|
862
825
|
.rd-header-right {
|
|
@@ -869,7 +832,7 @@ export default {
|
|
|
869
832
|
}
|
|
870
833
|
|
|
871
834
|
> .top {
|
|
872
|
-
padding-top:
|
|
835
|
+
padding-top: 10px;
|
|
873
836
|
|
|
874
837
|
INPUT[type='search']::placeholder,
|
|
875
838
|
.vs__open-indicator,
|
|
@@ -906,6 +869,8 @@ export default {
|
|
|
906
869
|
// Spacing between header buttons
|
|
907
870
|
.btn:not(:last-of-type) {
|
|
908
871
|
margin-right: 10px;
|
|
872
|
+
width: 30px;
|
|
873
|
+
min-width: 30px;
|
|
909
874
|
}
|
|
910
875
|
|
|
911
876
|
.btn:focus {
|
|
@@ -927,6 +892,8 @@ export default {
|
|
|
927
892
|
|
|
928
893
|
.header-btn {
|
|
929
894
|
width: 40px;
|
|
895
|
+
display: flex;
|
|
896
|
+
align-items: center;
|
|
930
897
|
}
|
|
931
898
|
|
|
932
899
|
:deep() div .btn.role-tertiary {
|
|
@@ -934,19 +901,21 @@ export default {
|
|
|
934
901
|
border: none;
|
|
935
902
|
background: var(--header-btn-bg);
|
|
936
903
|
color: var(--header-btn-text);
|
|
937
|
-
padding: 0 10px;
|
|
904
|
+
padding: 0 10px 0 10px;
|
|
938
905
|
line-height: 32px;
|
|
939
906
|
min-height: 32px;
|
|
907
|
+
width: 30px;
|
|
908
|
+
min-width: 30px;
|
|
940
909
|
|
|
941
910
|
i {
|
|
942
911
|
// Ideally same height as the parent button, but this means tooltip needs adjusting (which is it's own can of worms)
|
|
943
912
|
line-height: 20px;
|
|
944
913
|
}
|
|
945
914
|
|
|
946
|
-
&:hover {
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
}
|
|
915
|
+
// &:hover {
|
|
916
|
+
// background: var(--primary);
|
|
917
|
+
// color: #fff;
|
|
918
|
+
// }
|
|
950
919
|
|
|
951
920
|
&[disabled=disabled] {
|
|
952
921
|
background-color: rgba(0,0,0,0.25) !important;
|
|
@@ -989,7 +958,7 @@ export default {
|
|
|
989
958
|
|
|
990
959
|
> .user {
|
|
991
960
|
outline: none;
|
|
992
|
-
width: var(--header-height);
|
|
961
|
+
/* width: var(--header-height); */
|
|
993
962
|
|
|
994
963
|
.v-popper {
|
|
995
964
|
display: flex;
|
|
@@ -1003,6 +972,10 @@ export default {
|
|
|
1003
972
|
.user-image {
|
|
1004
973
|
display: flex;
|
|
1005
974
|
align-items: center;
|
|
975
|
+
&:hover{
|
|
976
|
+
color: var(--primary);
|
|
977
|
+
}
|
|
978
|
+
|
|
1006
979
|
}
|
|
1007
980
|
|
|
1008
981
|
&:focus {
|
|
@@ -1025,7 +998,6 @@ export default {
|
|
|
1025
998
|
> .center-self {
|
|
1026
999
|
align-self: center;
|
|
1027
1000
|
display: flex;
|
|
1028
|
-
gap: 1rem;
|
|
1029
1001
|
align-items: center;
|
|
1030
1002
|
padding-right: 1rem;
|
|
1031
1003
|
}
|
|
@@ -1131,5 +1103,10 @@ export default {
|
|
|
1131
1103
|
}
|
|
1132
1104
|
}
|
|
1133
1105
|
}
|
|
1134
|
-
|
|
1106
|
+
.login-name{
|
|
1107
|
+
font-size: 14px;
|
|
1108
|
+
margin-left: 5px;
|
|
1109
|
+
// margin-top: 5px;
|
|
1110
|
+
line-height: 20px;
|
|
1111
|
+
}
|
|
1135
1112
|
</style>
|