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
@@ -1,5 +1,7 @@
1
1
  <script>
2
2
  import Type from '@shell/components/nav/Type';
3
+ import { menuRouteMap } from '@shell/config/menuRouteMap';
4
+
3
5
  export default {
4
6
  name: 'Group',
5
7
 
@@ -8,6 +10,11 @@ export default {
8
10
  emits: ['expand', 'close'],
9
11
 
10
12
  props: {
13
+ loginName: {
14
+ type: String,
15
+ default: '',
16
+ },
17
+
11
18
  depth: {
12
19
  type: Number,
13
20
  default: 0,
@@ -46,8 +53,17 @@ export default {
46
53
 
47
54
  data() {
48
55
  const id = (this.idPrefix || '') + this.group.name;
56
+ const icons = {
57
+ '虚拟机管理': 'icon-backupandsnapshot',
58
+ '网络管理': 'icon-networks',
59
+ '镜像管理': 'icon-imagelist',
60
+ '资源管理': 'icon-sorcetype',
61
+ '运维管理': 'icon-monitoringandlogging',
62
+ '日志管理': 'icon-new-Logging'
63
+ }
64
+
49
65
 
50
- return { id, expanded: false };
66
+ return { id, expanded: false, icons };
51
67
  },
52
68
 
53
69
  computed: {
@@ -165,6 +181,7 @@ export default {
165
181
 
166
182
  let parentPath = '';
167
183
  const cluster = this.$route.params?.cluster;
184
+ const resource = this.$route?.params?.resource || ''
168
185
 
169
186
  // Where we use nested route configuration, consider the parent route when trying to identify the nav location
170
187
  if (this.$route.matched.length > 1) {
@@ -188,6 +205,9 @@ export default {
188
205
  return true;
189
206
  } else if (parentPath && itemFullPath === parentPath) {
190
207
  return true;
208
+ // === 新增映射逻辑 ===
209
+ } else if (menuRouteMap[item.name] && menuRouteMap[item.name].includes(resource)) {
210
+ return true;
191
211
  }
192
212
  }
193
213
  }
@@ -224,41 +244,51 @@ export default {
224
244
  <template>
225
245
  <div
226
246
  class="accordion"
227
- :class="{[`depth-${depth}`]: true, 'expanded': isExpanded, 'has-children': hasChildren, 'group-highlight': isGroupActive }"
247
+ :class="{[`depth-${depth}`]: true, 'expanded': isExpanded, 'has-children': hasChildren, 'group-highlight': isGroupActive}"
228
248
  >
249
+ <!-- 分组标题区 -->
229
250
  <div
230
- v-if="showHeader || (!onlyHasOverview && canCollapse)"
231
- class="accordion-item"
251
+ v-if="showHeader"
252
+ class="header"
253
+ :class="{'active': isOverview, 'noHover': !canCollapse}"
254
+ role="button"
255
+ tabindex="0"
256
+ :aria-label="group.labelDisplay || group.label || ''"
257
+ @click="groupSelected()"
258
+ @keyup.enter="groupSelected()"
259
+ @keyup.space="groupSelected()"
232
260
  >
233
- <div
234
- v-if="showHeader"
235
- class="header"
236
- :class="{'active': isOverview, 'noHover': !canCollapse || fixedOpen}"
237
- role="button"
238
- :tabindex="fixedOpen ? -1 : 0"
239
- :aria-label="group.labelDisplay || group.label || ''"
240
- @click="groupSelected()"
241
- @keyup.enter="groupSelected()"
242
- @keyup.space="groupSelected()"
243
- >
244
- <slot name="header">
261
+
262
+ <!-- 具名插槽 header,允许外部自定义标题内容 -->
263
+ <slot name="header">
264
+
265
+ <!-- 如果分组有概览页(overview) 跳转到第一个子路由 -->
266
+ <h6 v-if="hasOverview">
245
267
  <router-link
246
- v-if="hasOverview"
268
+ class="menuRouterLink"
247
269
  :to="group.children[0].route"
248
270
  :exact="group.children[0].exact"
249
271
  :tabindex="-1"
250
272
  >
251
- <h6>
252
- <span v-clean-html="group.labelDisplay || group.label" />
253
- </h6>
254
- </router-link>
255
- <h6
256
- v-else
257
- >
273
+ <i v-if="!group.labelDisplay || (group.labelDisplay && group.labelDisplay.indexOf('</i>') === -1)" class="icon" :class="icons[group.label] ? icons[group.label] + ' init_icon' : 'icon-globe'" style="color: var(--muted);width: 32px;" />
258
274
  <span v-clean-html="group.labelDisplay || group.label" />
259
- </h6>
260
- </slot>
261
- </div>
275
+ </router-link>
276
+ </h6>
277
+ <!-- 虚拟机管理:icon-backupandsnapshot -->
278
+ <!-- 网络管理:icon-networks -->
279
+ <!-- 镜像管理:icon-imagelist -->
280
+ <!-- 资源管理:icon-sorcetype -->
281
+ <!-- 运维管理:icon-monitoringandlogging -->
282
+ <!-- 没有概览页的情况 -->
283
+ <h6
284
+ v-else
285
+ >
286
+ <i v-if="!group.labelDisplay || (group.labelDisplay && group.labelDisplay.indexOf('</i>') === -1)" class="icon" :class="icons[group.label] ? icons[group.label] + ' init_icon' : 'icon-globe'" style="color: var(--muted);width: 32px;" />
287
+ <span v-clean-html="group.labelDisplay || group.label" />
288
+ </h6>
289
+ </slot>
290
+
291
+ <!-- 折叠/展开图标 -->
262
292
  <i
263
293
  v-if="!onlyHasOverview && canCollapse"
264
294
  class="icon toggle toggle-accordion"
@@ -271,6 +301,8 @@ export default {
271
301
  @keyup.space="peek($event, true)"
272
302
  />
273
303
  </div>
304
+
305
+ <!-- 子列表(Accordion 内容) -->
274
306
  <ul
275
307
  v-if="isExpanded"
276
308
  class="list-unstyled body"
@@ -280,6 +312,7 @@ export default {
280
312
  v-for="(child, idx) in group[childrenKey]"
281
313
  :key="idx"
282
314
  >
315
+ <!-- <template v-if="!(loginName && loginName !== 'admin' && child.label === '资源大盘')"></template> -->
283
316
  <li
284
317
  v-if="child.divider"
285
318
  :key="idx"
@@ -325,21 +358,20 @@ export default {
325
358
  position: relative;
326
359
  cursor: pointer;
327
360
  color: var(--body-text);
328
- height: 33px;
329
- outline: none;
361
+ height: 50px;
330
362
 
331
363
  H6 {
332
364
  color: var(--body-text);
333
365
  user-select: none;
334
366
  text-transform: none;
335
367
  font-size: 14px;
336
- }
337
-
338
- > H6 {
368
+ .menuRouterLink {
369
+ color: var(--body-text);
370
+ user-select: none;
339
371
  text-transform: none;
340
- height: 100%;
341
- padding: 8px 0 8px 16px;
372
+ font-size: 14px;
342
373
  }
374
+ }
343
375
 
344
376
  > A {
345
377
  display: block;
@@ -359,19 +391,6 @@ export default {
359
391
  }
360
392
 
361
393
  .accordion {
362
- .accordion-item {
363
- position: relative;
364
- cursor: pointer;
365
- color: var(--body-text);
366
- height: 33px;
367
- outline: none;
368
-
369
- .toggle-accordion:focus-visible {
370
- @include focus-outline;
371
- outline-offset: -6px;
372
- }
373
- }
374
-
375
394
  .header {
376
395
  &:focus-visible {
377
396
  h6 span {
@@ -379,30 +398,40 @@ export default {
379
398
  outline-offset: 2px;
380
399
  }
381
400
  }
401
+ .toggle-accordion:focus-visible {
402
+ @include focus-outline;
403
+ outline-offset: -6px;
404
+ }
382
405
 
383
406
  &.active {
384
- color: var(--primary-hover-text);
385
- background-color: var(--primary-hover-bg);
407
+ color: var(--nav-hover-color);
408
+ background-color: var(--nav-active);
386
409
 
387
410
  h6 {
388
- padding: 8px 0 8px 16px;
389
- font-weight: bold;
390
- color: var(--primary-hover-text);
411
+ /* padding: 8px 0 8px 16px;
412
+ font-weight: bold; */
413
+ color: var(--nav-hover-color);
414
+ .menuRouterLink {
415
+ color: var(--nav-hover-color);
416
+ }
391
417
  }
392
-
393
- &:hover {
394
- background-color: var(--primary-hover-bg);
418
+ I{
419
+ color: var(--nav-hover-color);
395
420
  }
396
421
 
397
- ~ I {
398
- color: var(--primary-hover-text);
399
- }
422
+ /* &:hover {
423
+ background-color: var(--primary-hover-bg);
424
+ } */
400
425
  }
401
426
  &:hover:not(.active) {
402
- background-color: var(--nav-hover);
403
- }
404
- &:hover:not(.active).noHover {
405
- background-color: inherit;
427
+ background-color: var(--nav-active);
428
+ color: var(--nav-hover-color);
429
+ h6{
430
+ color: var(--nav-hover-color);
431
+ .menuRouterLink {
432
+ color: var(--nav-hover-color);
433
+ }
434
+ }
406
435
  }
407
436
  }
408
437
  }
@@ -410,83 +439,92 @@ export default {
410
439
  .accordion {
411
440
  &.depth-0 {
412
441
  > .header {
442
+ /* padding: 8px 0; */
443
+ padding: 0px 0px 0px 20px;
444
+ height: 50px;
413
445
 
414
446
  &.noHover {
415
447
  cursor: default;
416
448
  }
417
449
 
418
450
  > H6 {
451
+ font-size: 14px;
419
452
  text-transform: none;
420
- padding: 8px 0 8px 16px;
453
+ line-height: 50px;
454
+ display: flex;
455
+ align-items: center;
421
456
  }
422
- }
423
457
 
424
- .accordion-item > I {
425
- position: absolute;
426
- right: 0;
427
- top: 0;
428
- padding: 10px 10px 9px 7px;
429
- user-select: none;
458
+ > I {
459
+ position: absolute;
460
+ right: 0;
461
+ top: 0;
462
+ padding: 0px 20px 0px 0px;
463
+ user-select: none;
464
+ line-height: 50px;
465
+ }
430
466
  }
431
467
 
432
468
  > .body {
433
469
  margin-left: 0;
434
470
  }
435
-
436
- &.group-highlight {
437
- background: var(--nav-active);
438
- }
439
471
  }
440
472
 
441
473
  &.depth-1 {
442
474
  > .header {
443
- padding-left: 20px;
475
+ line-height: 50px;
444
476
  > H6 {
445
- line-height: 18px;
477
+ font-size: 13px;
478
+ line-height: 16px;
446
479
  padding: 8px 0 7px 5px !important;
447
480
  }
448
-
449
- }
450
-
451
- .accordion-item > I {
452
- padding: 10px 7px 9px 7px !important;
481
+ > I {
482
+ padding: 9px 7px 8px 7px !important;
483
+ }
453
484
  }
454
485
 
455
- &:deep() .type-link > .label {
456
- padding-left: 10px;
457
- }
458
486
  }
459
487
 
460
488
  &:not(.depth-0) {
461
489
  > .header {
490
+ padding-left: 30px;
491
+ line-height: 50px;
462
492
  > H6 {
463
493
  // Child groups that aren't linked themselves
464
494
  display: inline-block;
465
495
  padding: 5px 0 5px 5px;
466
496
  }
467
- }
468
497
 
469
- .accordion-item > I {
470
- position: absolute;
471
- right: 0;
472
- top: 0;
473
- padding: 6px 8px 6px 8px;
498
+ > I {
499
+ position: absolute;
500
+ right: 0;
501
+ top: 0;
502
+ padding: 0px 20px 0px 0px !important;
503
+ user-select: none;
504
+ line-height: 50px;
505
+ }
474
506
  }
475
507
  }
476
508
  }
477
509
 
478
510
  .body :deep() > .child.router-link-active,
479
- .accordion-item :deep() > .child.router-link-exact-active {
511
+ .header :deep() > .child.router-link-exact-active {
480
512
  padding: 0;
481
513
 
482
514
  A, A I {
483
- color: var(--primary-hover-text);
515
+ /* color: var(--primary-hover-text); */
516
+ color: var(--nav-hover-color);
517
+ .menuRouterLink {
518
+ color: var(--nav-hover-color);
519
+ }
484
520
  }
485
521
 
486
522
  A {
487
- color: var(--primary-hover-text);
488
- background-color: var(--primary-hover-bg);
489
- font-weight: bold;
523
+ background-color: var(--nav-active);
524
+ ::v-deep .icon {
525
+ /* color: var(--body-text); */
526
+ color: var(--nav-hover-color);
527
+ }
490
528
  }
491
529
  }
492
530
 
@@ -495,9 +533,6 @@ export default {
495
533
  border-left: solid 5px transparent;
496
534
  line-height: 16px;
497
535
  font-size: 14px;
498
- padding-left: 24px;
499
- display: flex;
500
- justify-content: space-between;
501
536
  }
502
537
 
503
538
  A:focus {
@@ -507,8 +542,13 @@ export default {
507
542
  &.root {
508
543
  background: transparent;
509
544
  A {
510
- padding-left: 14px;
545
+ padding-left: 19px;
511
546
  }
512
547
  }
513
548
  }
549
+
550
+ .init_icon{
551
+ font-size: 32px;
552
+ padding-left: 0px;
553
+ }
514
554
  </style>