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