dashboard-shell-shell 3.0.5-test.9 → 3.0.5-tsh.10

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 (213) hide show
  1. package/assets/brand/csp/favicon.png +0 -0
  2. package/assets/icons/iconfont.css +4 -1
  3. package/assets/iconsNew/demo.css +539 -0
  4. package/assets/iconsNew/demo.css:Zone.Identifier +0 -0
  5. package/assets/iconsNew/demo_index.html +303 -0
  6. package/assets/iconsNew/demo_index.html:Zone.Identifier +0 -0
  7. package/assets/iconsNew/iconfont.css +43 -0
  8. package/assets/iconsNew/iconfont.css:Zone.Identifier +0 -0
  9. package/assets/iconsNew/iconfont.js +1 -0
  10. package/assets/iconsNew/iconfont.js:Zone.Identifier +0 -0
  11. package/assets/iconsNew/iconfont.json +44 -0
  12. package/assets/iconsNew/iconfont.json:Zone.Identifier +0 -0
  13. package/assets/iconsNew/iconfont.ttf +0 -0
  14. package/assets/iconsNew/iconfont.ttf:Zone.Identifier +0 -0
  15. package/assets/iconsNew/iconfont.woff +0 -0
  16. package/assets/iconsNew/iconfont.woff2 +0 -0
  17. package/assets/iconsNew/iconfont.woff2:Zone.Identifier +0 -0
  18. package/assets/iconsNew/iconfont.woff:Zone.Identifier +0 -0
  19. package/assets/images/login-logo.svg +37 -12
  20. package/assets/images/logo.svg +47 -0
  21. package/assets/images/pl/dark/logo.png +0 -0
  22. package/assets/styles/all.scss +23 -3
  23. package/assets/styles/app.scss +1 -0
  24. package/assets/styles/base/_helpers.scss +1 -1
  25. package/assets/styles/base/_variables.scss +2 -2
  26. package/assets/styles/fonts/_icons.scss +3 -2
  27. package/assets/styles/global/_button.scss +1 -1
  28. package/assets/styles/global/_form.scss +1 -0
  29. package/assets/styles/global/_select.scss +1 -1
  30. package/assets/styles/global/_tooltip.scss +5 -1
  31. package/assets/styles/themes/_light.scss +3 -3
  32. package/assets/styles/vendor/vue-select.scss +2 -1
  33. package/assets/translations/en-us.yaml +64 -0
  34. package/assets/translations/zh-hans.yaml +221 -22
  35. package/components/ButtonDropdown.vue +3 -1
  36. package/components/ClusterIconMenu.vue +1 -1
  37. package/components/CodeMirror.vue +6 -4
  38. package/components/ConsumptionGauge.vue +1 -1
  39. package/components/ContainerResourceLimit.vue +2 -2
  40. package/components/CruResource.vue +3 -2
  41. package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -19
  42. package/components/Drawer/ResourceDetailDrawer/index.vue +3 -3
  43. package/components/ExplorerMembers.vue +10 -1
  44. package/components/GlobalRoleBindings.vue +69 -114
  45. package/components/PodSecurityAdmission.vue +1 -1
  46. package/components/PromptRemove.vue +23 -1
  47. package/components/RelatedResources.vue +3 -0
  48. package/components/Resource/Detail/TitleBar/composables.ts +16 -1
  49. package/components/Resource/Detail/TitleBar/index.vue +37 -24
  50. package/components/ResourceDetail/Masthead/index.vue +1 -1
  51. package/components/ResourceDetail/Masthead/latest.vue +1 -1
  52. package/components/ResourceDetail/Masthead/legacy.vue +8 -7
  53. package/components/ResourceDetail/legacy.vue +15 -15
  54. package/components/ResourceList/Masthead.vue +11 -15
  55. package/components/ResourceTable.vue +16 -0
  56. package/components/SideNav.vue +21 -21
  57. package/components/SingleClusterInfo.vue +2 -1
  58. package/components/SortableTable/THead.vue +46 -1
  59. package/components/SortableTable/index.vue +54 -18
  60. package/components/Tabbed/index.vue +6 -1
  61. package/components/auth/Principal.vue +16 -8
  62. package/components/auth/RoleDetailEdit.vue +11 -7
  63. package/components/breadcrumb/index.vue +13 -210
  64. package/components/form/ArrayList.vue +164 -147
  65. package/components/form/ArrayListGrouped.vue +5 -3
  66. package/components/form/ChangePassword.vue +1 -1
  67. package/components/form/ClusterAppearance.vue +4 -3
  68. package/components/form/Command.vue +4 -5
  69. package/components/form/Conditions.vue +15 -1
  70. package/components/form/Footer.vue +1 -0
  71. package/components/form/HealthCheck.vue +0 -2
  72. package/components/form/HookOption.vue +87 -58
  73. package/components/form/InputWithSelect.vue +8 -7
  74. package/components/form/KeyValue.vue +20 -2
  75. package/components/form/LabeledSelect.vue +3 -1
  76. package/components/form/Labels.vue +2 -2
  77. package/components/form/MatchExpressions.vue +4 -4
  78. package/components/form/Members/ClusterMembershipEditor.vue +1 -1
  79. package/components/form/Members/ClusterPermissionsEditor.vue +60 -41
  80. package/components/form/Members/MembershipEditor.vue +4 -4
  81. package/components/form/Members/ProjectMembershipEditor.vue +1 -1
  82. package/components/form/NameNsDescription.vue +17 -1
  83. package/components/form/Networking.vue +6 -9
  84. package/components/form/NodeAffinity.vue +29 -28
  85. package/components/form/PodAffinity.vue +23 -23
  86. package/components/form/Probe.vue +15 -11
  87. package/components/form/ProjectMemberEditor.vue +66 -48
  88. package/components/form/ResourceQuota/Namespace.vue +4 -4
  89. package/components/form/ResourceQuota/NamespaceRow.vue +11 -9
  90. package/components/form/ResourceQuota/Project.vue +4 -4
  91. package/components/form/ResourceQuota/ProjectRow.vue +36 -30
  92. package/components/form/ResourceSelector.vue +1 -1
  93. package/components/form/SecretSelector.vue +24 -23
  94. package/components/form/Security.vue +1 -3
  95. package/components/form/Select.vue +7 -1
  96. package/components/form/ServiceNameSelect.vue +2 -5
  97. package/components/form/ServicePorts.vue +149 -75
  98. package/components/form/Tolerations.vue +13 -9
  99. package/components/form/ValueFromResource.vue +110 -96
  100. package/components/formatter/WorkloadHealthScale.vue +4 -3
  101. package/components/nav/Group.vue +8 -1
  102. package/components/nav/Header.vue +51 -174
  103. package/components/nav/NamespaceFilter.vue +14 -19
  104. package/components/nav/TopLevelMenu.vue +99 -125
  105. package/components/nav/Type.vue +11 -3
  106. package/config/menuRouteMap.js +10 -0
  107. package/config/private-label.js +2 -3
  108. package/config/product/explorer.js +32 -10
  109. package/config/product/manager.js +28 -17
  110. package/config/product/uiplugins.js +13 -10
  111. package/config/router/navigation-guards/index.js +61 -3
  112. package/detail/node.vue +28 -23
  113. package/dialog/AddCustomBadgeDialog.vue +17 -9
  114. package/dialog/RollbackWorkloadDialog.vue +1 -1
  115. package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
  116. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +9 -6
  117. package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
  118. package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
  119. package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
  120. package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
  121. package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
  122. package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
  123. package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
  124. package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
  125. package/edit/configmap.vue +4 -0
  126. package/edit/logging-flow/index.vue +1 -2
  127. package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +3 -3
  128. package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +19 -19
  129. package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +23 -23
  130. package/edit/logging.banzaicloud.io.output/providers/datadog.vue +19 -19
  131. package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +14 -14
  132. package/edit/logging.banzaicloud.io.output/providers/forward.vue +12 -12
  133. package/edit/logging.banzaicloud.io.output/providers/gcs.vue +23 -23
  134. package/edit/logging.banzaicloud.io.output/providers/gelf.vue +6 -6
  135. package/edit/logging.banzaicloud.io.output/providers/kafka.vue +10 -10
  136. package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +8 -8
  137. package/edit/logging.banzaicloud.io.output/providers/logdna.vue +17 -17
  138. package/edit/logging.banzaicloud.io.output/providers/logz.vue +7 -7
  139. package/edit/logging.banzaicloud.io.output/providers/loki.vue +12 -12
  140. package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +3 -3
  141. package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +14 -14
  142. package/edit/logging.banzaicloud.io.output/providers/redis.vue +6 -6
  143. package/edit/logging.banzaicloud.io.output/providers/s3.vue +23 -23
  144. package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +13 -13
  145. package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +2 -2
  146. package/edit/logging.banzaicloud.io.output/providers/syslog.vue +54 -54
  147. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +32 -8
  148. package/edit/monitoring.coreos.com.alertmanagerconfig/types/dingding.vue +32 -0
  149. package/edit/monitoring.coreos.com.alertmanagerconfig/types/message.vue +52 -0
  150. package/edit/monitoring.coreos.com.alertmanagerconfig/types/snmp.vue +45 -0
  151. package/edit/monitoring.coreos.com.alertmanagerconfig/types/work.vue +31 -0
  152. package/edit/networking.k8s.io.ingress/Certificate.vue +14 -5
  153. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
  154. package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
  155. package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
  156. package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
  157. package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
  158. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
  159. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
  160. package/edit/persistentvolume/index.vue +3 -1
  161. package/edit/persistentvolumeclaim.vue +2 -0
  162. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +1 -1
  163. package/edit/secret/index.vue +2 -2
  164. package/edit/service.vue +4 -1
  165. package/edit/storage.k8s.io.storageclass/index.vue +10 -8
  166. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
  167. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
  168. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
  169. package/edit/workload/Job.vue +31 -34
  170. package/edit/workload/Upgrading.vue +5 -5
  171. package/edit/workload/index.vue +19 -15
  172. package/edit/workload/storage/Mount.vue +1 -0
  173. package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
  174. package/edit/workload/storage/azureDisk.vue +14 -10
  175. package/edit/workload/storage/azureFile.vue +9 -7
  176. package/edit/workload/storage/csi/index.vue +6 -9
  177. package/edit/workload/storage/emptyDir.vue +7 -5
  178. package/edit/workload/storage/gcePersistentDisk.vue +9 -7
  179. package/edit/workload/storage/hostPath.vue +7 -5
  180. package/edit/workload/storage/nfs.vue +8 -6
  181. package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
  182. package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +20 -15
  183. package/edit/workload/storage/secret.vue +9 -6
  184. package/edit/workload/storage/vsphereVolume.vue +11 -7
  185. package/initialize/app-extended.js +7 -1
  186. package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +8 -6
  187. package/mixins/create-edit-view/impl.js +10 -0
  188. package/models/provisioning.cattle.io.cluster.js +19 -18
  189. package/models/workload.js +2 -2
  190. package/package.json +1 -1
  191. package/pages/account/index.vue +93 -58
  192. package/pages/auth/login.vue +24 -27
  193. package/pages/auth/setup.vue +36 -17
  194. package/pages/c/_cluster/auth/roles/index.vue +27 -3
  195. package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
  196. package/pages/c/_cluster/explorer/index.vue +2 -1
  197. package/pages/c/_cluster/explorer/tools/index.vue +6 -6
  198. package/pages/home.vue +55 -13
  199. package/plugins/dashboard-store/actions.js +1 -1
  200. package/public/index.html +1 -1
  201. package/rancher-components/Banner/Banner.vue +14 -2
  202. package/rancher-components/Form/Radio/RadioGroup.vue +9 -1
  203. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +31 -2
  204. package/scripts/build-pkg.sh +18 -23
  205. package/scripts/publish-shell.sh +1 -1
  206. package/store/i18n.js +1 -0
  207. package/store/type-map.js +0 -2
  208. package/types/shell/index.d.ts +8 -0
  209. package/utils/error.js +23 -3
  210. package/utils/errorTranslate.json +397 -8
  211. package/utils/errorTranslateNew.json +39 -0
  212. package/utils/roleFiltering.js +33 -0
  213. package/utils/title.ts +1 -1
@@ -748,7 +748,7 @@ export default {
748
748
  data-testid="namespaces-values-label"
749
749
  class="ns-values"
750
750
  >
751
- {{ value[0].label }}
751
+ {{ value[0].label.replace('harvester', 'cloud') }}
752
752
  </div>
753
753
 
754
754
  <!-- All the selected namespaces -->
@@ -774,20 +774,18 @@ export default {
774
774
  :data-testid="`namespaces-value-${j}`"
775
775
  class="ns-value"
776
776
  >
777
- <div>{{ ns.label }}</div>
777
+ <div>{{ ns.label.replace('harvester', 'cloud') }}</div>
778
778
  <!-- block user from removing the last selection if ns forced filtering is on -->
779
- <RcButton
779
+ <i
780
780
  v-if="!namespaceFilterMode || value.length > 1"
781
781
  small
782
782
  ghost
783
- class="ns-chip-button"
783
+ class="ns-chip-button icon icon-close"
784
784
  :data-testid="`namespaces-values-close-${j}`"
785
785
  @click="removeOption(ns, $event)"
786
786
  @keydown.enter.space.stop="removeOption(ns, $event)"
787
787
  @mousedown="handleValueMouseDown(ns, $event)"
788
- >
789
- <i class="icon icon-close" />
790
- </RcButton>
788
+ />
791
789
  </div>
792
790
  </div>
793
791
 
@@ -836,19 +834,15 @@ export default {
836
834
  @click="focusFilter"
837
835
  @keydown="inputKeyHandler($event)"
838
836
  >
839
- <RcButton
837
+ <i
840
838
  v-if="hasFilter"
841
839
  small
842
840
  ghost
843
- class="ns-filter-clear"
841
+ class="ns-filter-clear icon icon-close"
844
842
  :aria-label="t('namespaceFilter.button.clearFilter')"
845
843
  @click="clearFilter"
846
844
  @keydown.enter.stop="clearFilter"
847
- >
848
- <i
849
- class="icon icon-close"
850
- />
851
- </RcButton>
845
+ />
852
846
  </div>
853
847
  <div
854
848
  v-if="namespaceFilterMode"
@@ -859,7 +853,7 @@ export default {
859
853
  class="icon icon-info"
860
854
  />
861
855
  </div>
862
- <RcButton
856
+ <div
863
857
  v-else
864
858
  small
865
859
  ghost
@@ -871,8 +865,9 @@ export default {
871
865
  >
872
866
  <i
873
867
  class="icon icon-close"
868
+ @click="clear()"
874
869
  />
875
- </RcButton>
870
+ </div>
876
871
  </div>
877
872
  <div class="ns-divider mt-0" />
878
873
  <div
@@ -889,12 +884,12 @@ export default {
889
884
  v-for="(opt, i) in cachedFiltered"
890
885
  :key="opt.id"
891
886
  >
892
- <hr
887
+ <div
893
888
  v-if="opt.kind === NAMESPACE_FILTER_KINDS.DIVIDER"
894
889
  role="separator"
895
890
  aria-orientation="horizontal"
896
891
  class="ns-divider"
897
- >
892
+ />
898
893
  <div
899
894
  v-else
900
895
  :id="opt.elementId"
@@ -919,7 +914,7 @@ export default {
919
914
  v-if="opt.kind === NAMESPACE_FILTER_KINDS.NAMESPACE"
920
915
  class="icon icon-folder"
921
916
  />
922
- <div>{{ opt.label }}</div>
917
+ <div>{{ opt.label.replace('harvester', 'cloud') }}</div>
923
918
  <i
924
919
  v-if="opt.selected"
925
920
  class="icon icon-checkmark"
@@ -52,10 +52,7 @@ export default {
52
52
  helper.update(args);
53
53
  }
54
54
 
55
- const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS') || ''
56
-
57
55
  return {
58
- topLevelPermissions,
59
56
  shown: false,
60
57
  displayVersion,
61
58
  fullVersion,
@@ -523,7 +520,7 @@ export default {
523
520
  </div>
524
521
 
525
522
  <!-- 品牌Logo -->
526
- <div v-if="topLevelPermissions && topLevelPermissions === 'superadmin'" class="side-menu-logo">
523
+ <div class="side-menu-logo">
527
524
  <BrandImage
528
525
  data-testid="side-menu__brand-img"
529
526
  :alt="t('nav.alt.mainMenuRancherLogo')"
@@ -534,7 +531,7 @@ export default {
534
531
 
535
532
  <!-- ====================== 菜单内容区 ====================== -->
536
533
  <div class="body">
537
- <div v-if="topLevelPermissions && topLevelPermissions === 'superadmin'">
534
+ <div>
538
535
 
539
536
  <!-- 首页按钮 -->
540
537
  <div @click="hide()">
@@ -650,7 +647,7 @@ export default {
650
647
  </template>
651
648
 
652
649
  <!-- ====================== 集群列表 ====================== -->
653
- <template v-if="topLevelPermissions && topLevelPermissions === 'superadmin' && !!allClustersCount">
650
+ <template v-if="!!allClustersCount">
654
651
  <div
655
652
  ref="clusterList"
656
653
  class="clusters"
@@ -833,7 +830,7 @@ export default {
833
830
  </div>
834
831
  </div>
835
832
 
836
- <!-- 查看所有集群按钮 -->
833
+ <!-- See all clusters -->
837
834
  <router-link
838
835
  v-if="allClustersCount > maxClustersToShow"
839
836
  class="clusters-all"
@@ -853,129 +850,106 @@ export default {
853
850
  </template>
854
851
 
855
852
  <!-- ====================== 多集群应用区 ====================== -->
856
- <div :style="!(topLevelPermissions && topLevelPermissions === 'superadmin') ? { placeContent: 'flex-start', display: 'flex', flexDirection: 'column' } : {}" class="category">
853
+ <div class="category">
857
854
  <!-- 多集群应用 -->
858
855
  <template v-if="multiClusterApps.length">
859
- <template v-if="topLevelPermissions && topLevelPermissions === 'superadmin'">
860
- <div
861
- class="category-title"
856
+ <div
857
+ class="category-title"
858
+ >
859
+ <hr role="none">
860
+ <span>
861
+ {{ t('nav.categories.multiCluster') }}
862
+ </span>
863
+ </div>
864
+ <div
865
+ v-for="(a, i) in appBar.multiClusterApps"
866
+ :key="i"
867
+ @click="hide()"
868
+ >
869
+ <router-link
870
+ v-if="a.value !== 'fleet'"
871
+ class="option"
872
+ :class="{'active-menu-link': a.isMenuActive }"
873
+ :to="a.to"
874
+ role="link"
875
+ :aria-label="`${t('nav.ariaLabel.multiClusterApps')} ${ a.label }`"
862
876
  >
863
- <hr role="none">
864
- <span>
865
- {{ t('nav.categories.multiCluster') }}
866
- </span>
867
- </div>
868
- <template v-for="(a, i) in appBar.multiClusterApps" :key="i">
869
- <div
870
- v-if="a.value === 'harvesterManager'"
871
- @click="hide()"
872
- >
873
- <router-link
874
- class="option"
875
- :class="{'active-menu-link': a.isMenuActive }"
876
- :to="a.to"
877
- role="link"
878
- :aria-label="`${t('nav.ariaLabel.multiClusterApps')} ${ a.label }`"
879
- >
880
- <IconOrSvg
881
- v-clean-tooltip="getTooltipConfig(a.label)"
882
- class="app-icon"
883
- :icon="a.icon"
884
- :src="a.svg"
885
- />
886
- <span class="option-link">{{ a.label }}</span>
887
- </router-link>
888
- </div>
889
- </template>
890
- </template>
891
- <template v-else>
892
- <template v-for="(a, i) in appBar.multiClusterApps" :key="i">
893
- <div
894
- v-if="a.value === 'harvesterManager'"
895
- @click="hide()"
896
- >
897
- <router-link
898
- class="option"
899
- :class="{'active-menu-link': a.isMenuActive }"
900
- :to="a.to"
901
- role="link"
902
- :aria-label="`${t('nav.ariaLabel.multiClusterApps')} ${ a.label }`"
903
- >
904
- <IconOrSvg
905
- v-clean-tooltip="getTooltipConfig(a.label)"
906
- class="app-icon"
907
- :icon="a.icon"
908
- :src="a.svg"
909
- />
910
- <span class="option-link">{{ a.label }}</span>
911
- </router-link>
912
- </div>
913
- </template>
914
- </template>
877
+ <IconOrSvg
878
+ v-clean-tooltip="getTooltipConfig(a.label)"
879
+ class="app-icon"
880
+ :icon="a.icon"
881
+ :src="a.svg"
882
+ />
883
+ <span class="option-link">{{ a.label }}</span>
884
+ </router-link>
885
+ </div>
915
886
  </template>
916
887
 
917
- <!-- 配置类应用 -->
918
- <div>
919
- <template v-if="configurationApps.length">
920
- <template v-if="topLevelPermissions && topLevelPermissions === 'superadmin'">
921
- <div
922
- class="category-title"
923
- >
924
- <hr role="none">
925
- <span>
926
- {{ t('nav.categories.configuration') }}
927
- </span>
928
- </div>
929
- <div
930
- v-for="(a, i) in appBar.configurationApps"
931
- :key="i"
932
- @click="hide()"
933
- >
934
- <router-link
935
- class="option"
936
- :class="{'active-menu-link': a.isMenuActive }"
937
- :to="a.to"
938
- role="link"
939
- :aria-label="`${t('nav.ariaLabel.configurationApps')} ${ a.label }`"
940
- >
941
- <IconOrSvg
942
- v-clean-tooltip="getTooltipConfig(a.label)"
943
- class="app-icon"
944
- :icon="a.icon"
945
- :src="a.svg"
946
- />
947
- <div>{{ a.label }}</div>
948
- </router-link>
949
- </div>
950
- </template>
951
- <template v-else>
952
- <template v-for="(a, i) in appBar.configurationApps" :key="i">
953
- <div
954
- v-if="a.value === 'settings' || a.value === 'auth'"
955
- @click="hide()"
956
- >
957
- <router-link
958
- class="option"
959
- :class="{'active-menu-link': a.isMenuActive }"
960
- :to="a.to"
961
- role="link"
962
- :aria-label="`${t('nav.ariaLabel.configurationApps')} ${ a.label }`"
963
- >
964
- <IconOrSvg
965
- v-clean-tooltip="getTooltipConfig(a.label)"
966
- class="app-icon"
967
- :icon="a.icon"
968
- :src="a.svg"
969
- />
970
- <div>{{ a.label }}</div>
971
- </router-link>
972
- </div>
973
- </template>
974
- </template>
975
- <div style="height: 40px;"></div>
976
- </template>
977
- </div>
888
+ <!-- Configuration apps menu -->
889
+ <template v-if="configurationApps.length">
890
+ <div
891
+ class="category-title"
892
+ >
893
+ <hr role="none">
894
+ <span>
895
+ {{ t('nav.categories.configuration') }}
896
+ </span>
897
+ </div>
898
+ <div
899
+ v-for="(a, i) in appBar.configurationApps"
900
+ :key="i"
901
+ @click="hide()"
902
+ >
903
+ <router-link
904
+ class="option"
905
+ :class="{'active-menu-link': a.isMenuActive }"
906
+ :to="a.to"
907
+ role="link"
908
+ :aria-label="`${t('nav.ariaLabel.configurationApps')} ${ a.label }`"
909
+ >
910
+ <IconOrSvg
911
+ v-clean-tooltip="getTooltipConfig(a.label)"
912
+ class="app-icon"
913
+ :icon="a.icon"
914
+ :src="a.svg"
915
+ />
916
+ <div>{{ a.label }}</div>
917
+ </router-link>
918
+ </div>
919
+ </template>
920
+ </div>
921
+ </div>
922
+
923
+ <!-- Footer -->
924
+ <div
925
+ class="footer"
926
+ >
927
+ <!-- <div
928
+ v-if="canEditSettings"
929
+ class="support"
930
+ @click="hide()"
931
+ >
932
+ <router-link
933
+ :to="{name: 'support'}"
934
+ role="link"
935
+ :aria-label="t('nav.ariaLabel.support')"
936
+ >
937
+ {{ t('nav.support', {hasSupport}) }}
938
+ </router-link>
978
939
  </div>
940
+ <div
941
+ class="version"
942
+ :class="{'version-small': largeAboutText}"
943
+ @click="hide()"
944
+ >
945
+ <router-link
946
+ :to="{ name: 'about' }"
947
+ role="link"
948
+ :aria-label="t('nav.ariaLabel.about')"
949
+ >
950
+ {{ aboutText }}
951
+ </router-link>
952
+ </div> -->
979
953
  </div>
980
954
  </div>
981
955
  </transition>
@@ -1644,7 +1618,7 @@ export default {
1644
1618
  }
1645
1619
 
1646
1620
  :deep() .v-popper__arrow-container {
1647
- display: none;
1621
+ display: none !important;
1648
1622
  }
1649
1623
 
1650
1624
  :deep() .v-popper:focus {
@@ -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;
@@ -141,7 +149,7 @@ export default {
141
149
  <a
142
150
  role="link"
143
151
  :aria-label="type.labelKey ? t(type.labelKey) : (type.labelDisplay || type.label)"
144
- :href="href"
152
+ :href="href.replace(/harvester/g, 'cloud')"
145
153
  class="type-link"
146
154
  :aria-current="isActive ? 'page' : undefined"
147
155
  @click="selectType(); navigate($event);"
@@ -158,7 +166,7 @@ export default {
158
166
  <div v-else style="display: flex; align-items: center;" class="labelKey_menu">
159
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>
160
168
  <span
161
- v-clean-html="type.labelDisplay.replace('设置', '基础设置') || type.label"
169
+ v-clean-html="type.labelDisplay || type.label"
162
170
  class="label"
163
171
  :class="{'no-icon': !type.icon}"
164
172
  />
@@ -199,7 +207,7 @@ export default {
199
207
  >
200
208
  <a
201
209
  role="link"
202
- :href="type.link"
210
+ :href="type.link.replace(/harvester/g, 'cloud')"
203
211
  :target="type.target"
204
212
  rel="noopener noreferrer nofollow"
205
213
  :aria-label="type.label"
@@ -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,8 +58,7 @@ export function matches(pl) {
58
58
  }
59
59
 
60
60
  export function getVendor() {
61
-
62
- return 'HCI';
61
+ return '云翼云管平台';
63
62
  }
64
63
  // export function getVendor() {
65
64
  // if ( vendor === SETTING.PL_RANCHER_VALUE ) {
@@ -84,7 +83,7 @@ export function setTitle() {
84
83
  if (v === 'Harvester') {
85
84
  const ico = require(`~shell/assets/images/pl/harvester.png`);
86
85
 
87
- document.title = 'HCI';
86
+ document.title = '云翼云管平台';
88
87
  const link = document.createElement('link');
89
88
 
90
89
  link.hid = 'icon';
@@ -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
 
@@ -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
  }