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.
Files changed (353) hide show
  1. package/assets/brand/csp/favicon.png +0 -0
  2. package/assets/brand/harvester/favicon.png +0 -0
  3. package/assets/brand/suse/favicon.png +0 -0
  4. package/assets/icons/demo.css +539 -0
  5. package/assets/icons/demo.css:Zone.Identifier +0 -0
  6. package/assets/icons/demo_index.html +1131 -0
  7. package/assets/icons/demo_index.html:Zone.Identifier +0 -0
  8. package/assets/icons/iconfont.css +219 -0
  9. package/assets/icons/iconfont.css:Zone.Identifier +0 -0
  10. package/assets/icons/iconfont.js +1 -0
  11. package/assets/icons/iconfont.js:Zone.Identifier +0 -0
  12. package/assets/icons/iconfont.json +324 -0
  13. package/assets/icons/iconfont.json:Zone.Identifier +0 -0
  14. package/assets/icons/iconfont.ttf +0 -0
  15. package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
  16. package/assets/icons/iconfont.woff +0 -0
  17. package/assets/icons/iconfont.woff2 +0 -0
  18. package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
  19. package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
  20. package/assets/iconsNew/demo.css +539 -0
  21. package/assets/iconsNew/demo.css:Zone.Identifier +0 -0
  22. package/assets/iconsNew/demo_index.html +303 -0
  23. package/assets/iconsNew/demo_index.html:Zone.Identifier +0 -0
  24. package/assets/iconsNew/iconfont.css +43 -0
  25. package/assets/iconsNew/iconfont.css:Zone.Identifier +0 -0
  26. package/assets/iconsNew/iconfont.js +1 -0
  27. package/assets/iconsNew/iconfont.js:Zone.Identifier +0 -0
  28. package/assets/iconsNew/iconfont.json +44 -0
  29. package/assets/iconsNew/iconfont.json:Zone.Identifier +0 -0
  30. package/assets/iconsNew/iconfont.ttf +0 -0
  31. package/assets/iconsNew/iconfont.ttf:Zone.Identifier +0 -0
  32. package/assets/iconsNew/iconfont.woff +0 -0
  33. package/assets/iconsNew/iconfont.woff2 +0 -0
  34. package/assets/iconsNew/iconfont.woff2:Zone.Identifier +0 -0
  35. package/assets/iconsNew/iconfont.woff:Zone.Identifier +0 -0
  36. package/assets/images/API.svg +3 -0
  37. package/assets/images/action.svg +6 -0
  38. package/assets/images/login/password.svg +20 -0
  39. package/assets/images/login/user.svg +6 -0
  40. package/assets/images/login-bg.png +0 -0
  41. package/assets/images/login-left.png +0 -0
  42. package/assets/images/login-logo.svg +44 -0
  43. package/assets/images/logo.png +0 -0
  44. package/assets/images/logo.svg +47 -0
  45. package/assets/images/pl/dark/logo.png +0 -0
  46. package/assets/images/pl/half-logo.svg +2 -23
  47. package/assets/images/pl/harvester.png +0 -0
  48. package/assets/images/pl/logo.png +0 -0
  49. package/assets/images/promp-yellow.svg +5 -0
  50. package/assets/images/user.png +0 -0
  51. package/assets/styles/all.scss +83 -0
  52. package/assets/styles/app.scss +5 -0
  53. package/assets/styles/base/_basic.scss +2 -2
  54. package/assets/styles/base/_helpers.scss +1 -1
  55. package/assets/styles/base/_mixins.scss +1 -1
  56. package/assets/styles/base/_typography.scss +2 -1
  57. package/assets/styles/base/_variables.scss +14 -7
  58. package/assets/styles/fonts/_icons.scss +3 -2
  59. package/assets/styles/global/_button.scss +44 -26
  60. package/assets/styles/global/_columns.scss +3 -1
  61. package/assets/styles/global/_form.scss +46 -13
  62. package/assets/styles/global/_labeled-input.scss +54 -26
  63. package/assets/styles/global/_layout.scss +8 -3
  64. package/assets/styles/global/_select.scss +25 -17
  65. package/assets/styles/global/_table.scss +7 -1
  66. package/assets/styles/global/_tooltip.scss +60 -8
  67. package/assets/styles/themes/_dark.scss +3 -0
  68. package/assets/styles/themes/_light.scss +69 -46
  69. package/assets/styles/vendor/vue-select.scss +24 -10
  70. package/assets/translations/en-us.yaml +92 -4
  71. package/assets/translations/zh-hans.yaml +668 -206
  72. package/components/ActionDropdown.vue +2 -1
  73. package/components/ActionMenu.vue +2 -2
  74. package/components/ActionMenuShell.vue +2 -0
  75. package/components/AppModal.vue +46 -5
  76. package/components/BrandImage.vue +1 -0
  77. package/components/ButtonDropdown.vue +28 -4
  78. package/components/ButtonMultiAction.vue +1 -0
  79. package/components/ClusterIconMenu.vue +2 -2
  80. package/components/CodeMirror.vue +26 -10
  81. package/components/ConsumptionGauge.vue +24 -5
  82. package/components/ContainerResourceLimit.vue +2 -2
  83. package/components/CopyToClipboard.vue +15 -0
  84. package/components/CruResource.vue +12 -10
  85. package/components/CruResourceFooter.vue +2 -2
  86. package/components/DashboardOptions.vue +29 -17
  87. package/components/DotState.vue +84 -0
  88. package/components/Drawer/Chrome.vue +2 -2
  89. package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +30 -27
  90. package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
  91. package/components/Drawer/ResourceDetailDrawer/index.vue +5 -4
  92. package/components/ExplorerMembers.vue +28 -4
  93. package/components/ExplorerProjectsNamespaces.vue +19 -5
  94. package/components/GlobalRoleBindings.vue +23 -4
  95. package/components/GrafanaDashboard.vue +4 -4
  96. package/components/GrowlManager.vue +3 -1
  97. package/components/HardwareResourceGauge.vue +39 -3
  98. package/components/IndentedPanel.vue +4 -10
  99. package/components/InfoBox.vue +3 -3
  100. package/components/InputOrDisplay.vue +28 -2
  101. package/components/LabelValue.vue +20 -1
  102. package/components/ModalWithCard.vue +12 -3
  103. package/components/PodSecurityAdmission.vue +2 -2
  104. package/components/PromptModal.vue +1 -1
  105. package/components/PromptRemove.vue +53 -12
  106. package/components/RelatedResources.vue +3 -0
  107. package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +1 -3
  108. package/components/Resource/Detail/Metadata/KeyValue.vue +8 -4
  109. package/components/Resource/Detail/Metadata/index.vue +3 -1
  110. package/components/Resource/Detail/TitleBar/Title.vue +4 -3
  111. package/components/Resource/Detail/TitleBar/Top.vue +2 -0
  112. package/components/Resource/Detail/TitleBar/composables.ts +16 -1
  113. package/components/Resource/Detail/TitleBar/index.vue +125 -27
  114. package/components/ResourceDetail/Masthead/index.vue +1 -1
  115. package/components/ResourceDetail/Masthead/latest.vue +1 -1
  116. package/components/ResourceDetail/Masthead/legacy.vue +183 -39
  117. package/components/ResourceDetail/legacy.vue +47 -29
  118. package/components/ResourceList/Masthead.vue +222 -54
  119. package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
  120. package/components/ResourceTable.vue +40 -2
  121. package/components/SideNav.vue +74 -20
  122. package/components/SingleClusterInfo.vue +2 -1
  123. package/components/SortableTable/THead.vue +79 -4
  124. package/components/SortableTable/index.vue +1053 -464
  125. package/components/SortableTable/paging.js +26 -16
  126. package/components/SortableTable/selection.js +2 -2
  127. package/components/Tabbed/Tab.vue +3 -3
  128. package/components/Tabbed/index.vue +53 -30
  129. package/components/YamlEditor.vue +0 -1
  130. package/components/auth/Principal.vue +51 -19
  131. package/components/auth/RoleDetailEdit.vue +69 -14
  132. package/components/auth/SelectPrincipal.vue +1 -0
  133. package/components/breadcrumb/index.vue +119 -0
  134. package/components/form/ArrayList.vue +177 -152
  135. package/components/form/ArrayListGrouped.vue +13 -3
  136. package/components/form/ArrayListSelect.vue +1 -1
  137. package/components/form/BannerSettings.vue +64 -59
  138. package/components/form/ChangePassword.vue +5 -5
  139. package/components/form/ClusterAppearance.vue +4 -3
  140. package/components/form/ColorInput.vue +32 -8
  141. package/components/form/Command.vue +4 -5
  142. package/components/form/Conditions.vue +15 -1
  143. package/components/form/Footer.vue +12 -8
  144. package/components/form/HealthCheck.vue +0 -2
  145. package/components/form/HookOption.vue +87 -58
  146. package/components/form/InputWithSelect.vue +8 -4
  147. package/components/form/KeyValue.vue +66 -8
  148. package/components/form/LabeledSelect.vue +216 -242
  149. package/components/form/Labels.vue +4 -4
  150. package/components/form/MatchExpressions.vue +28 -11
  151. package/components/form/Members/ClusterMembershipEditor.vue +1 -1
  152. package/components/form/Members/ClusterPermissionsEditor.vue +61 -43
  153. package/components/form/Members/MembershipEditor.vue +4 -4
  154. package/components/form/Members/ProjectMembershipEditor.vue +1 -1
  155. package/components/form/NameNsDescription.vue +62 -22
  156. package/components/form/Networking.vue +6 -9
  157. package/components/form/NodeAffinity.vue +29 -28
  158. package/components/form/Password.vue +16 -7
  159. package/components/form/PodAffinity.vue +24 -25
  160. package/components/form/Probe.vue +15 -11
  161. package/components/form/ProjectMemberEditor.vue +66 -48
  162. package/components/form/ResourceQuota/Namespace.vue +4 -4
  163. package/components/form/ResourceQuota/NamespaceRow.vue +26 -23
  164. package/components/form/ResourceQuota/Project.vue +4 -4
  165. package/components/form/ResourceQuota/ProjectRow.vue +38 -35
  166. package/components/form/ResourceSelector.vue +1 -1
  167. package/components/form/SecretSelector.vue +24 -23
  168. package/components/form/Security.vue +1 -3
  169. package/components/form/Select.vue +12 -3
  170. package/components/form/ServiceNameSelect.vue +2 -5
  171. package/components/form/ServicePorts.vue +149 -75
  172. package/components/form/SimpleSecretSelector.vue +29 -9
  173. package/components/form/Taints.vue +2 -1
  174. package/components/form/Tolerations.vue +13 -9
  175. package/components/form/UnitInput.vue +8 -3
  176. package/components/form/ValueFromResource.vue +110 -96
  177. package/components/form/WorkloadPorts.vue +143 -123
  178. package/components/formatter/BadgeStateFormatter.vue +8 -5
  179. package/components/formatter/LiveDate.vue +3 -3
  180. package/components/formatter/WorkloadHealthScale.vue +4 -3
  181. package/components/nav/Favorite.vue +5 -1
  182. package/components/nav/Group.vue +139 -99
  183. package/components/nav/Header.vue +138 -164
  184. package/components/nav/HeaderPageActionMenu.vue +1 -0
  185. package/components/nav/NamespaceFilter.vue +34 -36
  186. package/components/nav/TopLevelMenu.vue +62 -25
  187. package/components/nav/Type.vue +73 -43
  188. package/composables/useClickOutside.ts +1 -1
  189. package/config/menuRouteMap.js +10 -0
  190. package/config/private-label.js +14 -11
  191. package/config/product/auth.js +17 -7
  192. package/config/product/explorer.js +32 -10
  193. package/config/product/manager.js +28 -17
  194. package/config/product/settings.js +19 -9
  195. package/config/product/uiplugins.js +13 -10
  196. package/config/router/navigation-guards/index.js +61 -3
  197. package/config/settings.ts +28 -0
  198. package/config/table-headers.js +3 -2
  199. package/detail/node.vue +28 -23
  200. package/dialog/AddCustomBadgeDialog.vue +17 -9
  201. package/dialog/ForceMachineRemoveDialog.vue +2 -2
  202. package/dialog/RollbackWorkloadDialog.vue +1 -1
  203. package/dialog/ScalePoolDownDialog.vue +2 -2
  204. package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
  205. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +9 -6
  206. package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
  207. package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
  208. package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
  209. package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
  210. package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
  211. package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
  212. package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
  213. package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
  214. package/edit/configmap.vue +4 -0
  215. package/edit/logging-flow/index.vue +1 -2
  216. package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +3 -3
  217. package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +19 -19
  218. package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +23 -23
  219. package/edit/logging.banzaicloud.io.output/providers/datadog.vue +19 -19
  220. package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +14 -14
  221. package/edit/logging.banzaicloud.io.output/providers/forward.vue +12 -12
  222. package/edit/logging.banzaicloud.io.output/providers/gcs.vue +23 -23
  223. package/edit/logging.banzaicloud.io.output/providers/gelf.vue +6 -6
  224. package/edit/logging.banzaicloud.io.output/providers/kafka.vue +10 -10
  225. package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +8 -8
  226. package/edit/logging.banzaicloud.io.output/providers/logdna.vue +17 -17
  227. package/edit/logging.banzaicloud.io.output/providers/logz.vue +7 -7
  228. package/edit/logging.banzaicloud.io.output/providers/loki.vue +12 -12
  229. package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +3 -3
  230. package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +14 -14
  231. package/edit/logging.banzaicloud.io.output/providers/redis.vue +6 -6
  232. package/edit/logging.banzaicloud.io.output/providers/s3.vue +23 -23
  233. package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +13 -13
  234. package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +2 -2
  235. package/edit/logging.banzaicloud.io.output/providers/syslog.vue +54 -54
  236. package/edit/management.cattle.io.user.vue +17 -4
  237. package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
  238. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +50 -26
  239. package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +36 -12
  240. package/edit/monitoring.coreos.com.alertmanagerconfig/types/dingding.vue +32 -0
  241. package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
  242. package/edit/monitoring.coreos.com.alertmanagerconfig/types/message.vue +52 -0
  243. package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
  244. package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
  245. package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
  246. package/edit/monitoring.coreos.com.alertmanagerconfig/types/snmp.vue +45 -0
  247. package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
  248. package/edit/monitoring.coreos.com.alertmanagerconfig/types/work.vue +31 -0
  249. package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
  250. package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
  251. package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
  252. package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
  253. package/edit/namespace.vue +1 -2
  254. package/edit/networking.k8s.io.ingress/Certificate.vue +14 -5
  255. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
  256. package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
  257. package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
  258. package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
  259. package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
  260. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
  261. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
  262. package/edit/persistentvolume/index.vue +3 -1
  263. package/edit/persistentvolumeclaim.vue +2 -0
  264. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +1 -1
  265. package/edit/secret/index.vue +2 -2
  266. package/edit/service.vue +4 -1
  267. package/edit/storage.k8s.io.storageclass/index.vue +10 -8
  268. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
  269. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
  270. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
  271. package/edit/token.vue +31 -12
  272. package/edit/workload/Job.vue +31 -34
  273. package/edit/workload/Upgrading.vue +5 -5
  274. package/edit/workload/index.vue +22 -18
  275. package/edit/workload/storage/Mount.vue +1 -0
  276. package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
  277. package/edit/workload/storage/azureDisk.vue +14 -10
  278. package/edit/workload/storage/azureFile.vue +9 -7
  279. package/edit/workload/storage/csi/index.vue +6 -9
  280. package/edit/workload/storage/emptyDir.vue +7 -5
  281. package/edit/workload/storage/gcePersistentDisk.vue +9 -7
  282. package/edit/workload/storage/hostPath.vue +7 -5
  283. package/edit/workload/storage/nfs.vue +8 -6
  284. package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
  285. package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +20 -15
  286. package/edit/workload/storage/secret.vue +9 -6
  287. package/edit/workload/storage/vsphereVolume.vue +11 -7
  288. package/initialize/app-extended.js +7 -1
  289. package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +8 -6
  290. package/list/management.cattle.io.setting.vue +22 -13
  291. package/list/management.cattle.io.user.vue +7 -3
  292. package/list/namespace.vue +3 -0
  293. package/list/provisioning.cattle.io.cluster.vue +6 -7
  294. package/mixins/brand.js +17 -0
  295. package/mixins/create-edit-view/impl.js +10 -0
  296. package/models/provisioning.cattle.io.cluster.js +19 -18
  297. package/models/workload.js +2 -2
  298. package/package.json +1 -1
  299. package/pages/account/index.vue +93 -58
  300. package/pages/account/pri.vue +229 -0
  301. package/pages/auth/login.vue +216 -51
  302. package/pages/auth/setup.vue +175 -33
  303. package/pages/c/_cluster/_product/namespaces.vue +5 -5
  304. package/pages/c/_cluster/auth/roles/index.vue +83 -8
  305. package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
  306. package/pages/c/_cluster/explorer/index.vue +2 -1
  307. package/pages/c/_cluster/explorer/tools/index.vue +6 -6
  308. package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
  309. package/pages/c/_cluster/settings/banners.vue +174 -102
  310. package/pages/c/_cluster/settings/brand.vue +350 -302
  311. package/pages/c/_cluster/settings/performance.vue +61 -38
  312. package/pages/home.vue +119 -37
  313. package/pages/prefs.vue +27 -25
  314. package/pkg/tsconfig.json +9 -9
  315. package/pkg/vue.config.js +1 -1
  316. package/plugins/dashboard-store/actions.js +1 -1
  317. package/plugins/dashboard-store/resource-class.js +28 -27
  318. package/promptRemove/mixin/roleDeletionCheck.js +2 -2
  319. package/public/index.html +4 -4
  320. package/rancher-components/BadgeState/BadgeState.vue +38 -55
  321. package/rancher-components/Banner/Banner.vue +25 -9
  322. package/rancher-components/Card/Card.vue +7 -8
  323. package/rancher-components/Form/Checkbox/Checkbox.vue +4 -0
  324. package/rancher-components/Form/LabeledInput/LabeledInput.vue +42 -3
  325. package/rancher-components/Form/Radio/RadioButton.vue +35 -11
  326. package/rancher-components/Form/Radio/RadioGroup.vue +22 -6
  327. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
  328. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -0
  329. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +41 -4
  330. package/rancher-components/RcDropdown/RcDropdown.vue +35 -7
  331. package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
  332. package/rancher-components/RcDropdown/RcDropdownMenu.vue +12 -6
  333. package/rancher-components/RcDropdown/types.ts +1 -0
  334. package/rancher-components/StringList/StringList.vue +1 -1
  335. package/scripts/build-pkg.sh +18 -23
  336. package/scripts/publish-shell.sh +1 -1
  337. package/static/favicon.ico +0 -0
  338. package/static/favicon.png +0 -0
  339. package/static/loading-indicator.html +3 -3
  340. package/store/i18n.js +6 -2
  341. package/store/modal.ts +3 -3
  342. package/store/prefs.js +11 -4
  343. package/store/type-map.js +30 -2
  344. package/types/shell/index.d.ts +86 -97
  345. package/utils/error.js +109 -8
  346. package/utils/errorTranslate.json +1740 -0
  347. package/utils/errorTranslateNew.json +39 -0
  348. package/utils/roleFiltering.js +33 -0
  349. package/utils/router.js +21 -0
  350. package/utils/select.js +26 -3
  351. package/utils/string.js +8 -5
  352. package/utils/title.ts +1 -1
  353. 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
- <div
410
- class="menu-spacer"
411
- :class="{'isSingleProduct': isSingleProduct }"
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
- <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
- />
433
+ <!-- 显示用户头像或 logo 图片 -->
426
434
  <img
427
- v-else
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
- <div
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
- <WorkspaceSwitcher v-else-if="clusterReady && currentProduct && currentProduct.showWorkspaceSwitcher && showWorkspaceSwitcher" />
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
- <button
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
- <button
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
- <button
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
- <button
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
- <!-- Extension header actions -->
574
+ <!-- ===== 插件扩展按钮区 ===== -->
635
575
  <div
636
576
  v-if="extensionHeaderActions.length"
637
577
  class="header-buttons"
638
578
  >
639
- <button
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
- <IconOrSvg
655
- class="icon icon-lg"
656
- :icon="action.icon"
657
- :src="action.svg"
658
- :img-alt="action.tooltipKey ? t(action.tooltipKey) : action.labelKey ? t(action.labelKey) : action.label ? action.label : t('generic.imageAlt')"
659
- color="header"
660
- />
661
- </button>
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
- <NotificationCenter />
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="$router.push({ name: 'account'})"
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="showSloModal"
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="$router.push(generateLogoutRoute)"
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: 6px;
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
- background: var(--primary);
948
- color: #fff;
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>
@@ -17,6 +17,7 @@ const pageAction = (_event: Event, action: string) => {
17
17
  :dropdown-aria-label="t('nav.actionMenu.button.label')"
18
18
  data-testid="page-actions-menu-action-button"
19
19
  button-role="tertiary"
20
+ :showIcon="true"
20
21
  @select="pageAction"
21
22
  />
22
23
  </template>