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
@@ -3,6 +3,7 @@ import Favorite from '@shell/components/nav/Favorite';
3
3
  import { TYPE_MODES } from '@shell/store/type-map';
4
4
 
5
5
  import TabTitle from '@shell/components/TabTitle';
6
+ import { menuRouteMap } from '@shell/config/menuRouteMap';
6
7
 
7
8
  const showFavoritesFor = [TYPE_MODES.FAVORITE, TYPE_MODES.USED];
8
9
 
@@ -61,6 +62,13 @@ export default {
61
62
  const pageFullPath = this.$route.fullPath?.toLowerCase().split('#')[0]; // Ignore the shebang when comparing routes
62
63
  const routeMetaNav = this.$route.meta?.nav;
63
64
 
65
+ const resource = this.$route?.params?.resource || ''
66
+
67
+ // 菜单选中动态映射逻辑
68
+ if (menuRouteMap[this.type.name] && menuRouteMap[this.type.name].includes(resource)) {
69
+ return true;
70
+ }
71
+
64
72
  // If the route explicitly declares the nav path that should be highlighted, then use that
65
73
  if (routeMetaNav) {
66
74
  const cluster = this.$route.params?.cluster;
@@ -112,6 +120,7 @@ export default {
112
120
  </script>
113
121
 
114
122
  <template>
123
+ <!-- 当 type 有 route 时,渲染一个 Vue Router 自定义链接 -->
115
124
  <router-link
116
125
  v-if="type.route"
117
126
  :key="type.name"
@@ -119,60 +128,78 @@ export default {
119
128
  custom
120
129
  :to="type.route"
121
130
  >
131
+
132
+ <!-- 导航项容器 -->
122
133
  <li
123
134
  class="child nav-type"
124
135
  :class="{'root': isRoot, [`depth-${depth}`]: true, 'router-link-active': isActive, 'router-link-exact-active': isExactActive}"
125
136
  @click="navigate"
126
137
  @keypress.enter="navigate"
127
138
  >
139
+
140
+ <!-- 如果是精确匹配激活状态,则显示 TabTitle 组件 -->
128
141
  <TabTitle
129
142
  v-if="isExactActive"
130
143
  :show-child="false"
131
144
  >
132
145
  {{ type.labelKey ? t(type.labelKey) : (type.labelDisplay || type.label) }}
133
146
  </TabTitle>
147
+
148
+ <!-- 链接主体 -->
134
149
  <a
135
150
  role="link"
136
151
  :aria-label="type.labelKey ? t(type.labelKey) : (type.labelDisplay || type.label)"
137
- :href="href"
152
+ :href="href.replace(/harvester/g, 'cloud')"
138
153
  class="type-link"
139
154
  :aria-current="isActive ? 'page' : undefined"
140
155
  @click="selectType(); navigate($event);"
141
156
  @mouseenter="setNear(true)"
142
157
  @mouseleave="setNear(false)"
143
158
  >
159
+ <!-- 文本标签:优先使用多语言 key -->
144
160
  <span
145
161
  v-if="type.labelKey"
146
162
  class="label"
147
163
  ><t :k="type.labelKey" /></span>
148
- <span
149
- v-else
150
- v-clean-html="type.labelDisplay || type.label"
151
- class="label"
152
- :class="{'no-icon': !type.icon}"
153
- />
154
- <span
164
+
165
+ <!-- 没有 labelKey 时,直接使用 HTML 文本 -->
166
+ <div v-else style="display: flex; align-items: center;" class="labelKey_menu">
167
+ <i v-if="!type.labelDisplay || (type.labelDisplay && type.labelDisplay.indexOf('</i>') === -1)" class="icon icon-fw icon-globe" style="color: var(--muted);width: 32px;text-align: left;"></i>
168
+ <span
169
+ v-clean-html="type.labelDisplay || type.label"
170
+ class="label"
171
+ :class="{'no-icon': !type.icon}"
172
+ />
173
+ </div>
174
+
175
+ <!-- 右侧附加信息(收藏按钮 / 命名空间图标 / 计数) -->
176
+ <!-- <span
155
177
  v-if="showFavorite || namespaceIcon || showCount"
156
178
  class="count"
157
179
  >
180
+
158
181
  <Favorite
159
182
  v-if="showFavorite"
160
183
  :resource="type.name"
161
184
  />
185
+
162
186
  <i
163
187
  v-if="namespaceIcon"
164
188
  class="icon icon-namespace"
165
189
  :class="{'ns-and-icon': showCount}"
166
190
  data-testid="type-namespaced"
167
191
  />
192
+
168
193
  <span
169
194
  v-if="showCount"
170
195
  data-testid="type-count"
171
196
  >{{ count }}</span>
172
- </span>
197
+ </span> -->
173
198
  </a>
174
199
  </li>
175
200
  </router-link>
201
+
202
+ <!-- 当 type 没有 route 但有外部 link 时 -->
176
203
  <li
177
204
  v-else-if="type.link"
178
205
  class="child nav-type nav-link"
@@ -180,7 +207,7 @@ export default {
180
207
  >
181
208
  <a
182
209
  role="link"
183
- :href="type.link"
210
+ :href="type.link.replace(/harvester/g, 'cloud')"
184
211
  :target="type.target"
185
212
  rel="noopener noreferrer nofollow"
186
213
  :aria-label="type.label"
@@ -188,6 +215,8 @@ export default {
188
215
  <span class="label">{{ type.label }}&nbsp;<i class="icon icon-external-link" /></span>
189
216
  </a>
190
217
  </li>
218
+
219
+ <!-- 兜底情况:既没有 route,也没有 link -->
191
220
  <li v-else>
192
221
  {{ type }}?
193
222
  </li>
@@ -214,6 +243,7 @@ export default {
214
243
  .label {
215
244
  align-items: center;
216
245
  grid-area: label;
246
+ display: flex;
217
247
  overflow: hidden;
218
248
  text-overflow: ellipsis;
219
249
 
@@ -221,13 +251,13 @@ export default {
221
251
  padding-left: 3px;
222
252
  }
223
253
 
224
- :deep() .highlight {
254
+ ::v-deep .highlight {
225
255
  background: var(--diff-ins-bg);
226
256
  color: var(--body-text);
227
257
  padding: 2px;
228
258
  }
229
259
 
230
- :deep() .icon {
260
+ ::v-deep .icon {
231
261
  position: relative;
232
262
  color: var(--muted);
233
263
  }
@@ -236,24 +266,28 @@ export default {
236
266
  A {
237
267
  display: grid;
238
268
  grid-template-areas: "label count";
239
- grid-template-columns: auto auto;
269
+ grid-template-columns: auto 20px;
240
270
  grid-column-gap: 5px;
241
271
  font-size: 14px;
242
272
  line-height: 24px;
243
- padding: 7.5px 7px 7.5px 10px;
273
+ /* padding: 7.5px 7px 7.5px 10px; */
274
+ padding: 0px 16px 0px 30px;
275
+ height: 50px;
244
276
  margin: 0 0 0 -3px;
245
277
  overflow: hidden;
246
278
  text-overflow: ellipsis;
247
279
  white-space: nowrap;
248
280
  color: var(--body-text);
249
- height: 33px;
250
281
 
251
282
  &:hover {
252
- background: var(--nav-hover);
283
+ background: var(--nav-active) !important;
284
+ color: var(--nav-hover-color);
285
+ /* background: var(--nav-hover); */
253
286
  text-decoration: none;
254
287
 
255
- :deep() .icon {
256
- color: var(--body-text);
288
+ ::v-deep .icon {
289
+ /* color: var(--body-text); */
290
+ color: var(--nav-hover-color);
257
291
  }
258
292
  }
259
293
  }
@@ -262,46 +296,42 @@ export default {
262
296
  grid-area: favorite;
263
297
  font-size: 12px;
264
298
  position: relative;
265
- vertical-align: middle;
266
- margin-right: 4px;
267
299
  }
268
300
 
269
301
  .count {
302
+ grid-area: count;
270
303
  font-size: 12px;
304
+ text-align: right;
271
305
  justify-items: center;
272
- padding-right: 4px;
273
- display: flex;
274
- align-items: center;
275
- }
276
-
277
- &.nav-type.nav-link {
278
- a .label {
279
- display: flex;
280
- }
306
+ line-height: 50px;
281
307
  }
282
308
 
283
309
  &.nav-type:not(.depth-0) {
284
310
  A {
285
- padding-left: 16px;
311
+ font-size: 13px;
312
+ padding: 5.5px 7px 5.5px 40px;
286
313
  }
287
314
 
288
- :deep() .label I {
315
+ ::v-deep .label I {
289
316
  padding-right: 2px;
290
317
  }
291
318
  }
319
+ }
292
320
 
293
- &.nav-type:is(.depth-1) {
294
- A {
295
- font-size: 13px;
296
- padding-left: 23px;
297
- }
298
- }
299
-
300
- &.nav-type:not(.depth-0):not(.depth-1) {
301
- A {
302
- padding-left: 14px;
303
- }
321
+ .labelKey_menu{
322
+ display: flex;
323
+ align-items: center;
324
+ }
325
+ .labelKey_menu:hover{
326
+ i{
327
+ color: var(--nav-hover-color) !important;
328
+ }
329
+ }
330
+ .router-link-active{
331
+ .labelKey_menu{
332
+ i{
333
+ color: var(--nav-hover-color) !important;
304
334
  }
305
335
  }
306
-
336
+ }
307
337
  </style>
@@ -76,6 +76,6 @@ export const useClickOutside = <T extends OnClickOutsideOptions>(
76
76
 
77
77
  onBeforeUnmount(() => {
78
78
  window.removeEventListener('click', listener as any);
79
- window.removeEventListener('pointerDown', setShouldListen);
79
+ window.removeEventListener('pointerdown', setShouldListen);
80
80
  });
81
81
  };
@@ -0,0 +1,10 @@
1
+ // menuRouteMap.js
2
+ export const menuRouteMap = {
3
+ 'projects-namespaces': [
4
+ 'management.cattle.io.project', // 创建项目
5
+ 'namespace',
6
+ ],
7
+ 'cluster-members': [
8
+ 'management.cattle.io.clusterroletemplatebinding'
9
+ ]
10
+ };
@@ -58,17 +58,20 @@ export function matches(pl) {
58
58
  }
59
59
 
60
60
  export function getVendor() {
61
- if ( vendor === SETTING.PL_RANCHER_VALUE ) {
62
- // Custom vendor override based on brand
63
- if (brand && CUSTOM_VENDOR[brand]) {
64
- return CUSTOM_VENDOR[brand];
65
- }
61
+ return '云翼云管平台';
62
+ }
63
+ // export function getVendor() {
64
+ // if ( vendor === SETTING.PL_RANCHER_VALUE ) {
65
+ // // Custom vendor override based on brand
66
+ // if (brand && CUSTOM_VENDOR[brand]) {
67
+ // return CUSTOM_VENDOR[brand];
68
+ // }
66
69
 
67
- return STANDARD_VENDOR;
68
- }
70
+ // return STANDARD_VENDOR;
71
+ // }
69
72
 
70
- return vendor;
71
- }
73
+ // return vendor;
74
+ // }
72
75
 
73
76
  export function getProduct() {
74
77
  return product;
@@ -80,13 +83,13 @@ export function setTitle() {
80
83
  if (v === 'Harvester') {
81
84
  const ico = require(`~shell/assets/images/pl/harvester.png`);
82
85
 
83
- document.title = 'Harvester';
86
+ document.title = '云翼云管平台';
84
87
  const link = document.createElement('link');
85
88
 
86
89
  link.hid = 'icon';
87
90
  link.rel = 'icon';
88
91
  link.type = 'image/x-icon';
89
- link.hrefv = ico;
92
+ link.href = ico;
90
93
  const head = document.getElementsByTagName('head')[0];
91
94
 
92
95
  head.appendChild(link);
@@ -191,13 +191,23 @@ export function init(store) {
191
191
  componentForType(`${ MANAGEMENT.AUTH_CONFIG }/genericoidc`, 'auth/oidc');
192
192
  componentForType(`${ MANAGEMENT.AUTH_CONFIG }/cognito`, 'auth/oidc');
193
193
 
194
- basicType([
195
- 'config',
196
- USERS_VIRTUAL_TYPE,
197
- NORMAN.SPOOFED.GROUP_PRINCIPAL,
198
- ROLES_VIRTUAL_TYPE,
199
- MANAGEMENT.OIDC_CLIENT
200
- ]);
194
+ const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS')
195
+
196
+ if (topLevelPermissions && topLevelPermissions === 'superadmin') {
197
+ basicType([
198
+ 'config',
199
+ USERS_VIRTUAL_TYPE,
200
+ NORMAN.SPOOFED.GROUP_PRINCIPAL,
201
+ ROLES_VIRTUAL_TYPE,
202
+ MANAGEMENT.OIDC_CLIENT
203
+ ]);
204
+ } else {
205
+ basicType([
206
+ USERS_VIRTUAL_TYPE,
207
+ ROLES_VIRTUAL_TYPE
208
+ ]);
209
+ }
210
+
201
211
 
202
212
  headers(NORMAN.SPOOFED.GROUP_PRINCIPAL, [
203
213
  GROUP_NAME,
@@ -67,16 +67,37 @@ export function init(store) {
67
67
  }
68
68
  });
69
69
 
70
+ const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS')
71
+
70
72
  basicType(['cluster-dashboard', 'cluster-tools']);
71
- basicType([
72
- 'cluster-dashboard',
73
- 'projects-namespaces',
74
- 'namespaces',
75
- NODE,
76
- VIRTUAL_TYPES.CLUSTER_MEMBERS,
77
- EVENT,
78
- 'c-cluster-explorer-tools'
79
- ], 'cluster');
73
+
74
+ if (topLevelPermissions && topLevelPermissions === 'superadmin') {
75
+ basicType([
76
+ 'cluster-dashboard',
77
+ 'projects-namespaces',
78
+ 'namespaces',
79
+ 'namespace',
80
+ NODE,
81
+ VIRTUAL_TYPES.CLUSTER_MEMBERS,
82
+ EVENT,
83
+ 'c-cluster-explorer-tools',
84
+ 'management.cattle.io.project',
85
+ 'management.cattle.io.clusterroletemplatebinding'
86
+ ], 'cluster');
87
+ } else {
88
+ basicType([
89
+ 'cluster-dashboard',
90
+ 'projects-namespaces',
91
+ 'namespaces',
92
+ 'namespace',
93
+ NODE,
94
+ VIRTUAL_TYPES.CLUSTER_MEMBERS,
95
+ EVENT,
96
+ 'management.cattle.io.project',
97
+ 'management.cattle.io.clusterroletemplatebinding'
98
+ ], 'cluster');
99
+ }
100
+
80
101
  basicType([
81
102
  LIMIT_RANGE,
82
103
  NETWORK_POLICY,
@@ -95,6 +116,7 @@ export function init(store) {
95
116
  STORAGE_CLASS,
96
117
  SECRET,
97
118
  VIRTUAL_TYPES.PROJECT_SECRETS,
119
+ VIRTUAL_TYPES.NAMESPACES,
98
120
  CONFIG_MAP
99
121
  ], 'storage');
100
122
  basicType([
@@ -633,7 +655,7 @@ export function init(store) {
633
655
  virtualType({
634
656
  label: store.getters['i18n/t'](`typeLabel.${ VIRTUAL_TYPES.PROJECT_SECRETS }`, { count: 2 }),
635
657
  group: 'storage',
636
- icon: 'globe',
658
+ icon: 'default',
637
659
  namespaced: false,
638
660
  ifRancherCluster: true,
639
661
  name: VIRTUAL_TYPES.PROJECT_SECRETS,
@@ -13,6 +13,7 @@ import { DSL } from '@shell/store/type-map';
13
13
  import { BLANK_CLUSTER } from '@shell/store/store-types.js';
14
14
 
15
15
  export const NAME = 'manager';
16
+ const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS')
16
17
 
17
18
  export function init(store) {
18
19
  const {
@@ -60,11 +61,17 @@ export function init(store) {
60
61
  route: { name: 'c-cluster-manager-cloudCredential' },
61
62
  });
62
63
 
63
- basicType([
64
- CAPI.RANCHER_CLUSTER,
65
- 'cloud-credentials',
66
- 'drivers',
67
- ]);
64
+ if (topLevelPermissions && topLevelPermissions === 'superadmin') {
65
+ basicType([
66
+ CAPI.RANCHER_CLUSTER,
67
+ 'cloud-credentials',
68
+ 'drivers',
69
+ ]);
70
+ } else {
71
+ basicType([
72
+ CAPI.RANCHER_CLUSTER,
73
+ ]);
74
+ }
68
75
 
69
76
  configureType(SNAPSHOT, { depaginate: true });
70
77
 
@@ -111,10 +118,12 @@ export function init(store) {
111
118
  exact: true
112
119
  });
113
120
 
114
- basicType([
115
- 'rke-kontainer-drivers',
116
- 'rke-node-drivers',
117
- ], 'drivers');
121
+ if (topLevelPermissions && topLevelPermissions === 'superadmin') {
122
+ basicType([
123
+ 'rke-kontainer-drivers',
124
+ 'rke-node-drivers',
125
+ ], 'drivers');
126
+ }
118
127
 
119
128
  weightType(CAPI.MACHINE_DEPLOYMENT, 4, true);
120
129
  weightType(CAPI.MACHINE_SET, 3, true);
@@ -123,14 +132,16 @@ export function init(store) {
123
132
  weightType(MANAGEMENT.PSA, 5, true);
124
133
  weightType(VIRTUAL_TYPES.JWT_AUTHENTICATION, 0, true);
125
134
 
126
- basicType([
127
- CAPI.MACHINE_DEPLOYMENT,
128
- CAPI.MACHINE_SET,
129
- CAPI.MACHINE,
130
- CATALOG.CLUSTER_REPO,
131
- MANAGEMENT.PSA,
132
- VIRTUAL_TYPES.JWT_AUTHENTICATION
133
- ], 'advanced');
135
+ if (topLevelPermissions && topLevelPermissions === 'superadmin') {
136
+ basicType([
137
+ CAPI.MACHINE_DEPLOYMENT,
138
+ CAPI.MACHINE_SET,
139
+ CAPI.MACHINE,
140
+ CATALOG.CLUSTER_REPO,
141
+ MANAGEMENT.PSA,
142
+ VIRTUAL_TYPES.JWT_AUTHENTICATION
143
+ ], 'advanced');
144
+ }
134
145
 
135
146
  weightGroup('advanced', -1, true);
136
147
 
@@ -112,15 +112,25 @@ export function init(store) {
112
112
  route: { name: 'c-cluster-settings-fleet' }
113
113
  });
114
114
 
115
- basicType([
116
- 'settings',
117
- 'features',
118
- 'brand',
119
- 'banners',
120
- 'performance',
121
- 'links',
122
- 'fleet-settings'
123
- ]);
115
+ const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS')
116
+
117
+ if (topLevelPermissions && topLevelPermissions === 'superadmin') {
118
+ basicType([
119
+ 'settings',
120
+ 'features',
121
+ 'brand',
122
+ 'banners',
123
+ 'performance',
124
+ 'links',
125
+ 'fleet-settings'
126
+ ]);
127
+ } else {
128
+ basicType([
129
+ 'settings',
130
+ 'brand',
131
+ ]);
132
+ }
133
+
124
134
 
125
135
  configureType(MANAGEMENT.SETTING, {
126
136
  isCreatable: false,
@@ -5,14 +5,17 @@ export const NAME = 'uiplugins';
5
5
  export function init(store) {
6
6
  const { product } = DSL(store, NAME);
7
7
 
8
- // Add a product for UI Plugins - will appear in the top-level menu
9
- product({
10
- ifHave: IF_HAVE.ADMIN, // Only admins can see the UI Plugin Custom Resource by default
11
- inStore: 'management',
12
- icon: 'extension',
13
- removable: false,
14
- showClusterSwitcher: false,
15
- category: 'configuration',
16
- weight: 50,
17
- });
8
+ if (sessionStorage.getItem('TOPLEVELPERMISSIONS') && sessionStorage.getItem('TOPLEVELPERMISSIONS') === 'superadmin') {
9
+ // Add a product for UI Plugins - will appear in the top-level menu
10
+ product({
11
+ ifHave: IF_HAVE.ADMIN, // Only admins can see the UI Plugin Custom Resource by default
12
+ inStore: 'management',
13
+ icon: 'extension',
14
+ removable: false,
15
+ showClusterSwitcher: false,
16
+ category: 'configuration',
17
+ weight: 50,
18
+ });
19
+ }
20
+
18
21
  }
@@ -11,13 +11,71 @@ import { install as installPageTitle } from '@shell/config/router/navigation-gua
11
11
  import { install as installServerUpgradeGrowl } from '@shell/config/router/navigation-guards/server-upgrade-growl';
12
12
 
13
13
  /**
14
- * Install our router navigation guards. i.e. router.beforeEach(), router.afterEach()
14
+ * Install router navigation guards
15
+ * 1. 保留原有导航守卫顺序
16
+ * 2. 不在 beforeEach 改 params,只在 push/replace & afterEach 改 URL
15
17
  */
16
18
  export function installNavigationGuards(router, context) {
17
- // NOTE: the order of the installation matters.
18
- // Be intentional when adding, removing or modifying the guards that are installed.
19
+ // 最早执行:保证进入逻辑时 params 始终是 harvester
20
+ router.beforeEach((to, from, next) => {
21
+ let changed = false;
22
+ const params = { ...to.params };
23
+
24
+ if (params?.product?.includes('cloud')) {
25
+ params.product = params.product.replace(/cloud/g, 'harvester');
26
+ changed = true;
27
+ }
28
+
29
+ if (params?.cluster?.includes('cloud')) {
30
+ params.cluster = params.cluster.replace(/cloud/g, 'harvester');
31
+ changed = true;
32
+ }
33
+
34
+ if (params?.resource?.includes('cloud')) {
35
+ params.resource = params.resource.replace(/cloud/g, 'harvester');
36
+ changed = true;
37
+ }
38
+
39
+ if (changed) {
40
+ // 触发路由重定向
41
+ return next({ ...to, params });
42
+ }
43
+
44
+ next();
45
+ });
46
+
19
47
 
20
48
  const navigationGuardInstallers = [installLoadInitialSettings, installAttemptFirstLogin, installAuthentication, installProducts, installClusters, installRuntimeExtensionRoute, installI18N, installHandleInstallRedirect, installPageTitle, installRecordLastRoute, installServerUpgradeGrowl];
21
49
 
22
50
  navigationGuardInstallers.forEach((installer) => installer(router, context));
51
+
52
+ // 🔹 最后执行:只改地址栏,不改内部
53
+ router.afterEach((to) => {
54
+ const base = router.options.history?.base || '';
55
+ const pathParts = to.path.split('/');
56
+
57
+ const newPathParts = pathParts.map((part) => {
58
+ // 只替换 cluster/product/resource 对应的 segment
59
+ for (const key of ['cluster', 'product', 'resource']) {
60
+ if (to.params[key] && to.params[key] === part) {
61
+ return part.replace(/harvester/g, 'cloud');
62
+ }
63
+ }
64
+ return part;
65
+ });
66
+
67
+ let cloudPath = newPathParts.join('/');
68
+ if (!cloudPath.startsWith(base)) {
69
+ cloudPath = base + cloudPath;
70
+ }
71
+
72
+ const currentLocation = window.location.pathname + window.location.search + window.location.hash;
73
+
74
+ if (cloudPath !== currentLocation) {
75
+ console.info('[URL Replace] Updating address bar:', currentLocation, '→', cloudPath);
76
+ window.history.replaceState({}, '', cloudPath);
77
+ }
78
+ });
79
+
23
80
  }
81
+
@@ -112,6 +112,34 @@ export const SETTING = {
112
112
  CLUSTER_AGENT_DEFAULT_POD_DISTRIBUTION_BUDGET: 'cluster-agent-default-pod-disruption-budget'
113
113
  } as const;
114
114
 
115
+ export const ALLOWED_SETTINGS_NEW: GlobalSetting = {
116
+ [SETTING.CA_CERTS]: { kind: 'multiline', readOnly: true },
117
+ [SETTING.PASSWORD_MIN_LENGTH]: {
118
+ kind: 'integer',
119
+ ruleSet: [
120
+ {
121
+ name: 'betweenValues',
122
+ key: 'Password',
123
+ factoryArg: [2, 256]
124
+ },
125
+ {
126
+ name: 'isInteger',
127
+ key: 'Password',
128
+ },
129
+ {
130
+ name: 'isPositive',
131
+ key: 'Password',
132
+ },
133
+ {
134
+ name: 'isOctal',
135
+ key: 'Password',
136
+ }
137
+ ],
138
+ },
139
+ [SETTING.AUTH_USER_SESSION_TTL_MINUTES]: {},
140
+ [SETTING.AUTH_TOKEN_MAX_TTL_MINUTES]: {},
141
+ }
142
+
115
143
  // These are the settings that are allowed to be edited via the UI
116
144
  export const ALLOWED_SETTINGS: GlobalSetting = {
117
145
  [SETTING.CA_CERTS]: { kind: 'multiline', readOnly: true },