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
@@ -21,7 +21,7 @@ export default {
21
21
 
22
22
  closeText: {
23
23
  type: String,
24
- default: 'Close'
24
+ default: '关闭'
25
25
  },
26
26
 
27
27
  saveText: {
@@ -66,8 +66,16 @@ export default {
66
66
  class="modal"
67
67
  data-testid="mvc__card"
68
68
  :trigger-focus-trap="true"
69
- @close="$emit('finish', $event)"
69
+ @close="$emit('close', $event)"
70
70
  >
71
+ <!-- <slot name="closeicon">
72
+ <button
73
+ class="btn btn-sm role-link hide-icon-dialog-close"
74
+ @click.prevent="hide"
75
+ >
76
+ <i class="icon icon-x" />
77
+ </button>
78
+ </slot> -->
71
79
  <Card
72
80
  class="modal"
73
81
  :show-highlight-border="false"
@@ -118,7 +126,7 @@ export default {
118
126
  .footer {
119
127
  width: 100%;
120
128
  display: flex;
121
- justify-content: center;
129
+ justify-content: flex-end;
122
130
  }
123
131
 
124
132
  .banner {
@@ -133,6 +141,7 @@ export default {
133
141
 
134
142
  &.card-container {
135
143
  box-shadow: none;
144
+ padding: 24px;
136
145
  }
137
146
  }
138
147
  </style>
@@ -216,9 +216,9 @@ export default defineComponent({
216
216
  <div
217
217
  v-for="(psaControl, level, i) in psaControls"
218
218
  :key="i"
219
- class="row row--y-center mb-20"
219
+ class="row row--y-center"
220
220
  >
221
- <span class="col span-2">
221
+ <span class="col span-1">
222
222
  <Checkbox
223
223
  v-if="!labelsAlwaysActive"
224
224
  v-model:value="psaControl.active"
@@ -42,7 +42,7 @@ export default {
42
42
  },
43
43
  modalWidth() {
44
44
  // property set from workload.js to overwrite modal default width of 600px, with fallback value as well
45
- return this.modalData?.modalWidth || '600px';
45
+ return this.modalData?.modalWidth || '610px';
46
46
  },
47
47
  customClass() {
48
48
  return this.modalData?.customClass || undefined;
@@ -12,6 +12,7 @@ import { CATALOG as CATALOG_ANNOTATIONS } from '@shell/config/labels-annotations
12
12
  import { CATALOG } from '@shell/config/types';
13
13
  import { LabeledInput } from '@components/Form/LabeledInput';
14
14
  import AppModal from '@shell/components/AppModal.vue';
15
+ import { translateError } from '@shell/utils/error';
15
16
 
16
17
  export default {
17
18
  name: 'PromptRemove',
@@ -82,6 +83,22 @@ export default {
82
83
  return this.$store.getters['type-map/labelFor'](schema, this.toRemove.length);
83
84
  },
84
85
 
86
+ typeZh() {
87
+ const typeLabel = this.type
88
+
89
+ const lowerKey = typeLabel.toLowerCase();
90
+ const i18nKey = `promptRemoveText.${lowerKey}`;
91
+
92
+ console.log(i18nKey, ' i18nKey-------------------------');
93
+
94
+
95
+ if (this.t(i18nKey)) {
96
+ return this.t(i18nKey);
97
+ }
98
+
99
+ return typeLabel;
100
+ },
101
+
85
102
  selfLinks() {
86
103
  return this.toRemove.map((resource) => {
87
104
  return get(resource, 'links.self');
@@ -214,6 +231,7 @@ export default {
214
231
  },
215
232
 
216
233
  methods: {
234
+ translateError,
217
235
  resourceNames,
218
236
  escapeHtml,
219
237
  close() {
@@ -294,6 +312,12 @@ export default {
294
312
  this.done();
295
313
  } catch (err) {
296
314
  this.error = err.message || err;
315
+ if (this.error.includes('not supported')) {
316
+ this.$store.dispatch('growl/error', {
317
+ title: '权限不足',
318
+ message: '当前用户不允许删除集群'
319
+ }, { root: true });
320
+ }
297
321
  btnCB(false);
298
322
  }
299
323
  },
@@ -340,7 +364,7 @@ export default {
340
364
  v-if="showModal"
341
365
  custom-class="remove-modal"
342
366
  name="promptRemove"
343
- :width="400"
367
+ :width="460"
344
368
  height="auto"
345
369
  styles="max-height: 100vh;"
346
370
  :trigger-focus-trap="true"
@@ -352,6 +376,11 @@ export default {
352
376
  >
353
377
  <template #title>
354
378
  <h4 class="text-default-text">
379
+ <img
380
+ src="@shell/assets/images/promp-yellow.svg"
381
+ class="img-span"
382
+ alt=""
383
+ >
355
384
  {{ t('promptRemove.title') }}
356
385
  </h4>
357
386
  </template>
@@ -373,7 +402,7 @@ export default {
373
402
  :needs-confirm="needsConfirm"
374
403
  :value="toRemove"
375
404
  :names="names"
376
- :type="type"
405
+ :type="typeZh"
377
406
  :done-location="doneLocation"
378
407
  @errors="e => error = e"
379
408
  @done="done"
@@ -383,7 +412,7 @@ export default {
383
412
  class="mt-10"
384
413
  >
385
414
  <span
386
- v-clean-html="t('promptRemove.confirmName', { nameToMatch: escapeHtml(nameToMatch) }, true)"
415
+ v-clean-html="t('promptRemove.confirmName', { nameToMatch: escapeHtml(nameToMatch) })"
387
416
  />
388
417
  </div>
389
418
  </div>
@@ -400,14 +429,14 @@ export default {
400
429
  {{ warning }}
401
430
  </div>
402
431
  <div class="text-error mb-10 mt-10">
403
- {{ error }}
432
+ {{ translateError(error) }}
404
433
  </div>
405
- <div
434
+ <!-- <div
406
435
  v-if="!needsConfirm"
407
436
  class="text-info mt-20"
408
437
  >
409
438
  {{ protip }}
410
- </div>
439
+ </div> -->
411
440
  </LabeledInput>
412
441
  <div v-else-if="!hasCustomRemove">
413
442
  <div
@@ -420,7 +449,7 @@ export default {
420
449
  v-if="error"
421
450
  class="text-error mb-10 mt-10"
422
451
  >
423
- {{ error }}
452
+ {{ translateError(error) }}
424
453
  </div>
425
454
  </div>
426
455
  <Checkbox
@@ -441,7 +470,7 @@ export default {
441
470
  <div class="spacer" />
442
471
  <AsyncButton
443
472
  mode="delete"
444
- class="btn bg-error ml-10"
473
+ class="btn ml-10"
445
474
  :disabled="deleteDisabled"
446
475
  :data-testid="componentTestid + '-confirm-button'"
447
476
  @click="remove"
@@ -457,20 +486,32 @@ export default {
457
486
  box-shadow: none;
458
487
  }
459
488
  #confirm {
460
- width: 90%;
461
- margin-left: 3px;
489
+ width: 100%;
490
+ // margin-left: 3px;
462
491
  }
463
492
 
464
493
  .actions {
465
494
  text-align: right;
466
495
  }
467
496
 
468
- .card-actions {
497
+ /* .card-actions {
469
498
  display: flex;
470
499
 
471
500
  .spacer {
472
501
  flex: 1;
473
502
  }
474
- }
503
+ } */
475
504
  }
476
505
  </style>
506
+
507
+ <style scoped>
508
+ .text-default-text{
509
+ line-height: 20px;
510
+ margin: 0px;
511
+ display: flex;
512
+ align-items: center;
513
+ }
514
+ .img-span{
515
+ margin-right: 8px;
516
+ }
517
+ </style>
@@ -175,5 +175,8 @@ export default {
175
175
  <template #cell:state="{row}">
176
176
  <BadgeState :value="row" />
177
177
  </template>
178
+ <template #cell:name="{row}">
179
+ <span>{{ row.name }}</span>
180
+ </template>
178
181
  </ResourceTable>
179
182
  </template>
@@ -89,12 +89,10 @@ const getRowValueId = (row:Row): string => `value-${ row.label }:${ row.value }`
89
89
  flex-direction: column;
90
90
 
91
91
  .row {
92
- margin-bottom: 8px;
93
-
92
+ min-height: 40px;
94
93
  .value {
95
94
  display: flex;
96
95
  flex-direction: row;
97
- align-items: center;
98
96
 
99
97
  &, & * {
100
98
  max-width: 100%;
@@ -53,13 +53,13 @@ const showConfigurationMoreFocusSelector = computed(() => `[data-testid="${ show
53
53
 
54
54
  <template>
55
55
  <div class="key-value">
56
- <div class="heading">
56
+ <div class="heading h40">
57
57
  <span class="title text-deemphasized">{{ propertyName }}</span>
58
58
  <span class="count">{{ rows.length }}</span>
59
59
  </div>
60
60
  <div
61
61
  v-if="visibleRows.length === 0"
62
- class="empty mmt-2 text-deemphasized"
62
+ class="empty text-deemphasized"
63
63
  >
64
64
  <div class="no-rows">
65
65
  {{ i18n.t('component.resource.detail.metadata.keyValue.noRows', {propertyName: lowercasePropertyName}) }}
@@ -78,7 +78,7 @@ const showConfigurationMoreFocusSelector = computed(() => `[data-testid="${ show
78
78
  <div
79
79
  v-for="row in visibleRows"
80
80
  :key="displayValue(row)"
81
- class="row"
81
+ class="row h40"
82
82
  >
83
83
  <Rectangle
84
84
  v-clean-tooltip="displayValue(row)"
@@ -104,18 +104,22 @@ const showConfigurationMoreFocusSelector = computed(() => `[data-testid="${ show
104
104
  display: flex;
105
105
  flex-direction: column;
106
106
  align-items: flex-start;
107
+
108
+ .h40 {
109
+ min-height: 40px;
110
+ }
107
111
 
108
112
  .count {
109
113
  margin-left: 24px;
110
114
  }
111
115
 
112
116
  .heading {
113
- margin-bottom: 8px;
114
117
  }
115
118
 
116
119
  .row {
117
120
  display: block;
118
121
  width: 100%;
122
+ line-height: 40px;
119
123
 
120
124
  &:not(:nth-child(2)) {
121
125
  margin-top: 4px;
@@ -31,10 +31,12 @@ const showBothEmpty = computed(() => labels.length === 0 && annotations.length =
31
31
 
32
32
  <template>
33
33
  <SpacedRow
34
- class="metadata ppb-3"
34
+ v-if="false"
35
+ class="metadata ppb-5"
35
36
  v-bind="$attrs"
36
37
  >
37
38
  <div
39
+ v-if="identifyingInformation?.length > 0"
38
40
  class="identifying-info"
39
41
  >
40
42
  <IdentifyingInformation :rows="identifyingInformation" />
@@ -1,14 +1,15 @@
1
1
  <template>
2
- <h1 class="title">
2
+ <div class="title">
3
3
  <slot name="default" />
4
- </h1>
4
+ </div>
5
5
  </template>
6
6
 
7
7
  <style lang="scss" scoped>
8
- h1.title {
8
+ .title {
9
9
  display: inline-block;
10
10
  align-items: center;
11
11
  display: flex;
12
12
  flex-direction: row;
13
+ font-size: 14px;
13
14
  }
14
15
  </style>
@@ -10,5 +10,7 @@
10
10
  flex-direction: row;
11
11
  justify-content: space-between;
12
12
  align-items: center;
13
+ height: 50px;
14
+ margin-bottom: 20px;
13
15
  }
14
16
  </style>
@@ -14,7 +14,22 @@ export const useDefaultTitleBarProps = (resource: any, resourceSubtype?: Ref<str
14
14
  const resourceSubtypeValue = toValue(resourceSubtype);
15
15
  const currentStore = store.getters['currentStore'](resourceValue.type);
16
16
  const schema = store.getters[`${ currentStore }/schemaFor`](resourceValue.type);
17
- const resourceTypeLabel = resourceValue.parentNameOverride || store.getters['type-map/labelFor'](schema);
17
+ let resourceTypeLabel = resourceValue.parentNameOverride || store.getters['type-map/labelFor'](schema);
18
+
19
+ // 转换为中文
20
+ const displayName_zh_hans: Record<string, string> = {
21
+ 'GlobalRole': '全局角色',
22
+ 'RoleTemplate': '集群角色',
23
+ }
24
+
25
+ if (displayName_zh_hans[resourceTypeLabel]) {
26
+ resourceTypeLabel = displayName_zh_hans[resourceTypeLabel]
27
+ }
28
+
29
+ if (resourceTypeLabel == '集群角色' && (route.query?.roleContext == 'NAMESPACE' || resource?.parentLocationOverride?.hash == '#NAMESPACE')) {
30
+ resourceTypeLabel = '项目或资源组角色'
31
+ }
32
+
18
33
  const resourceName = resourceSubtypeValue ? `${ resourceSubtypeValue } - ${ resourceValue.nameDisplay }` : resourceValue.nameDisplay;
19
34
  const resourceTo = resourceValue.listLocation || {
20
35
  name: 'c-cluster-product-resource',
@@ -13,6 +13,8 @@ import { _CONFIG, _GRAPH, AS } from '@shell/config/query-params';
13
13
  import ButtonGroup from '@shell/components/ButtonGroup';
14
14
  import { ExtensionPoint, PanelLocation } from '@shell/core/types';
15
15
  import ExtensionPanel from '@shell/components/ExtensionPanel.vue';
16
+ import breadcrumb from '@shell/components/breadcrumb/index.vue'
17
+ import { useDefaultConfigTabProps } from '@shell/components/Drawer/ResourceDetailDrawer/composables';
16
18
 
17
19
  export interface Badge {
18
20
  color: 'bg-success' | 'bg-error' | 'bg-warning' | 'bg-info';
@@ -36,6 +38,7 @@ export interface TitleBarProps {
36
38
  showViewOptions?: boolean;
37
39
 
38
40
  onShowConfiguration?: (returnFocusSelector: string) => void;
41
+ parentRouteOverride?: string;
39
42
  }
40
43
 
41
44
  const showConfigurationIcon = require(`@shell/assets/images/icons/document.svg`);
@@ -43,9 +46,10 @@ const showConfigurationIcon = require(`@shell/assets/images/icons/document.svg`)
43
46
 
44
47
  <script setup lang="ts">
45
48
  const {
46
- resource, resourceTypeLabel, resourceTo, resourceName, description, badge, showViewOptions, onShowConfiguration,
49
+ parentRouteOverride, resource, resourceTypeLabel, resourceTo, resourceName, description, badge, showViewOptions, onShowConfiguration,
47
50
  } = defineProps<TitleBarProps>();
48
51
 
52
+
49
53
  const store = useStore();
50
54
  const i18n = useI18n(store);
51
55
  const router = useRouter();
@@ -54,6 +58,10 @@ const emit = defineEmits(['show-configuration']);
54
58
  const showConfigurationDataTestId = 'show-configuration-cta';
55
59
  const showConfigurationReturnFocusSelector = computed(() => `[data-testid="${ showConfigurationDataTestId }"]`);
56
60
 
61
+
62
+ const configTabProps = useDefaultConfigTabProps(resource);
63
+
64
+
57
65
  const currentView = ref(router?.currentRoute?.value?.query?.as || _CONFIG);
58
66
  const viewOptions = computed(() => {
59
67
  if (!showViewOptions) {
@@ -72,6 +80,45 @@ const viewOptions = computed(() => {
72
80
  ];
73
81
  });
74
82
 
83
+ const Svg = require('~shell/assets/images/API.svg')
84
+
85
+ const parent = computed(() => {
86
+
87
+ const product = store.getters['currentProduct'].name;
88
+
89
+ const defaultLocation = {
90
+ name: 'c-cluster-product-resource',
91
+ params: {
92
+ resource,
93
+ product,
94
+ }
95
+ };
96
+
97
+ const location = resource?.parentLocationOverride || defaultLocation;
98
+
99
+ if (parentRouteOverride) {
100
+ location.name = parentRouteOverride;
101
+ }
102
+
103
+ return { location };
104
+ });
105
+
106
+ const menuIcon = computed(() => {
107
+ const product = store.getters['productId'];
108
+ const resources = parent.value.location?.params?.resource || '';
109
+ return store.getters['type-map/groupsForVirTypes'](product, resources) || 'default menuIcon';
110
+ });
111
+
112
+ const hiddenTypes = [
113
+ 'harvesterhci.io.virtualmachinebackup',
114
+ ];
115
+
116
+ const shouldShowConfiguration = computed(() =>
117
+ onShowConfiguration &&
118
+ configTabProps &&
119
+ !hiddenTypes.includes(resource?.type)
120
+ );
121
+
75
122
  watch(
76
123
  () => currentView.value,
77
124
  () => {
@@ -82,33 +129,58 @@ watch(
82
129
 
83
130
  <template>
84
131
  <div class="title-bar">
132
+ <breadcrumb :resourceTypeLabel="resourceTypeLabel" :resource="resource"/>
85
133
  <Top>
86
134
  <Title class="title">
135
+ <span class="detailIcon-span">
136
+ <img
137
+ v-if="parentRouteOverride === 'account' && resource=== 'token'"
138
+ :src="Svg"
139
+ style="margin-top: 4px; margin-left: 5px;"
140
+ >
141
+ <i
142
+ v-else
143
+ :class="'icon-'+ menuIcon + ' detailIcon'"
144
+ />
145
+ </span>
146
+ <div class="resourceTypeLabelCls">
147
+ {{ resourceTypeLabel }}名称:
148
+ </div>
149
+ <span class="resource-name masthead-resource-title">
150
+ {{ resourceName }}
151
+ </span>
152
+ <BadgeState
153
+ v-if="badge"
154
+ class="badge-state"
155
+ :color="badge.color"
156
+ :label="badge.label"
157
+ />
158
+ <span
159
+ class="valid"
160
+ >|</span>
87
161
  <TabTitle :show-child="false">
88
- {{ resourceTypeLabel }}
162
+ 返回
89
163
  </TabTitle>
90
164
  <router-link
91
165
  v-if="resourceTo"
92
166
  :to="resourceTo"
93
167
  class="resource-link"
94
168
  >
95
- {{ resourceTypeLabel }}:
169
+ 返回
96
170
  </router-link>
97
171
  <span
98
172
  v-else
99
173
  class="resource-text"
100
174
  >
101
- {{ resourceTypeLabel }}:
102
- </span>
103
- <span class="resource-name masthead-resource-title">
104
- {{ resourceName }}
175
+ 返回
105
176
  </span>
106
- <BadgeState
107
- v-if="badge"
108
- class="badge-state"
109
- :color="badge.color"
110
- :label="badge.label"
111
- />
177
+ <div
178
+ v-if="description"
179
+ style="font-size: 12px;margin-left: 16px;"
180
+ class="bottom description text-deemphasized"
181
+ >
182
+ ( {{ description }} )
183
+ </div>
112
184
  </Title>
113
185
  <div class="actions">
114
186
  <!-- Please don't expand this pattern, this was a quick fix to resolve a conflict between the new masthead and fleet. -->
@@ -118,22 +190,23 @@ watch(
118
190
  :options="viewOptions"
119
191
  />
120
192
  <RcButton
121
- v-if="onShowConfiguration"
193
+ v-if="shouldShowConfiguration"
122
194
  :data-testid="showConfigurationDataTestId"
123
195
  class="show-configuration"
124
196
  :primary="true"
125
197
  :aria-label="i18n.t('component.resource.detail.titleBar.ariaLabel.showConfiguration', { resource: resourceName })"
126
198
  @click="() => emit('show-configuration', showConfigurationReturnFocusSelector)"
127
199
  >
128
- <img
200
+ <!-- <img
129
201
  :src="showConfigurationIcon"
130
202
  class="mmr-3"
131
203
  aria-hidden="true"
132
- >
204
+ > -->
133
205
  {{ i18n.t('component.resource.detail.titleBar.showConfiguration') }}
134
206
  </RcButton>
135
207
  <ActionMenu
136
208
  v-if="actionMenuResource"
209
+ :showIcon="true"
137
210
  button-role="multiAction"
138
211
  :resource="actionMenuResource"
139
212
  data-testid="masthead-action-menu"
@@ -141,12 +214,6 @@ watch(
141
214
  />
142
215
  </div>
143
216
  </Top>
144
- <div
145
- v-if="description"
146
- class="bottom description text-deemphasized"
147
- >
148
- {{ description }}
149
- </div>
150
217
  <ExtensionPanel
151
218
  :resource="resource"
152
219
  :type="ExtensionPoint.PANEL"
@@ -156,12 +223,39 @@ watch(
156
223
  </template>
157
224
 
158
225
  <style lang="scss" scoped>
226
+
227
+ .detailIcon-span{
228
+ width: 24px;
229
+ height: 24px;
230
+ display: inline-block;
231
+ position: relative;
232
+ background: var(--primary);
233
+ margin-right: 10px;
234
+ }
235
+ .detailIcon{
236
+ position: absolute;
237
+ color: #fff;
238
+ font-size: 38px;
239
+ left: 4px;
240
+ top: -2px;
241
+ }
242
+
243
+ .detailIcon-span-title{
244
+ font-weight: bold;
245
+ }
246
+ .resourceTypeLabelCls {
247
+ font-weight: 700;
248
+ }
249
+ .valid{
250
+ color: #d7d7d7;
251
+ margin: 0px 10px;
252
+ }
159
253
  .title-bar {
160
254
  min-width: 740px;
161
255
 
162
256
  .badge-state {
163
257
  font-size: 16px;
164
- margin-left: 12px;
258
+ margin-left: 5px;
165
259
  position: relative;
166
260
  }
167
261
 
@@ -170,15 +264,19 @@ watch(
170
264
  }
171
265
 
172
266
  &:deep() button[data-testid="masthead-action-menu"] {
173
- border-radius: 4px;
174
- width: 35px;
175
- height: 40px;
176
- margin-left: 16px;
267
+ border-radius: 2px;
268
+ width: 32px;
269
+ height: 32px;
270
+ margin-left: 10px;
177
271
 
178
272
  display: inline-flex;
179
273
  flex-direction: row;
180
274
  justify-content: center;
181
275
  align-items: center;
276
+
277
+ a{
278
+ color: #fff;
279
+ }
182
280
  }
183
281
 
184
282
  .description {
@@ -60,6 +60,6 @@ const showLatestMasthead = computed(() => isNewDetailPageEnabled.value && isView
60
60
  <style lang="scss" scoped>
61
61
  .new.state-banner {
62
62
  margin: 0;
63
- margin-top: 16px;
63
+ margin-bottom: 20px;
64
64
  }
65
65
  </style>
@@ -39,6 +39,6 @@ const bannerProps = useResourceDetailBannerProps(props.value);
39
39
  <style lang="scss" scoped>
40
40
  .new.state-banner {
41
41
  margin: 0;
42
- margin-top: 16px;
42
+ margin-bottom: 20px;
43
43
  }
44
44
  </style>