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
@@ -2,7 +2,8 @@
2
2
  import { KUBERNETES, PROJECT } from '@shell/config/labels-annotations';
3
3
  import { FLEET, NAMESPACE, MANAGEMENT, HELM } from '@shell/config/types';
4
4
  import ButtonGroup from '@shell/components/ButtonGroup';
5
- import { BadgeState } from '@components/BadgeState';
5
+ // import { BadgeState } from '@components/BadgeState';
6
+ import DotState from '@shell/components/DotState.vue';
6
7
  import { Banner } from '@components/Banner';
7
8
  import { get } from '@shell/utils/object';
8
9
  import { NAME as FLEET_NAME } from '@shell/config/product/fleet';
@@ -29,7 +30,8 @@ export default {
29
30
  name: 'MastheadResourceDetail',
30
31
 
31
32
  components: {
32
- BadgeState,
33
+ // BadgeState,
34
+ DotState,
33
35
  Banner,
34
36
  ButtonGroup,
35
37
  ExtensionPanel,
@@ -44,6 +46,11 @@ export default {
44
46
  }
45
47
  },
46
48
 
49
+ isManuallyHide: {
50
+ type: Boolean,
51
+ default: true
52
+ },
53
+
47
54
  mode: {
48
55
  type: String,
49
56
  default: 'create'
@@ -112,6 +119,7 @@ export default {
112
119
  DETAIL_VIEW: _DETAIL,
113
120
  extensionType: ExtensionPoint.PANEL,
114
121
  extensionLocation: PanelLocation.DETAILS_MASTHEAD,
122
+ Svg: require('~shell/assets/images/API.svg')
115
123
  };
116
124
  },
117
125
 
@@ -246,7 +254,7 @@ export default {
246
254
  },
247
255
 
248
256
  parent() {
249
- const displayName = this.value?.parentNameOverride || this.$store.getters['type-map/labelFor'](this.schema);
257
+ let displayName = this.value?.parentNameOverride || this.$store.getters['type-map/labelFor'](this.schema);
250
258
  const product = this.$store.getters['currentProduct'].name;
251
259
 
252
260
  const defaultLocation = {
@@ -264,6 +272,20 @@ export default {
264
272
  }
265
273
 
266
274
  const typeOptions = this.$store.getters[`type-map/optionsFor`]( this.resource );
275
+
276
+ // 转换为中文
277
+ const displayName_zh_hans = {
278
+ 'GlobalRole': '全局角色',
279
+ 'RoleTemplate': '集群角色',
280
+ }
281
+ if (displayName_zh_hans[displayName]) {
282
+ displayName = displayName_zh_hans[displayName]
283
+ }
284
+
285
+ if (displayName == '集群角色' && (this.$route.query?.roleContext == 'NAMESPACE' || location.hash == '#NAMESPACE')) {
286
+ displayName = '项目或资源组角色'
287
+ }
288
+
267
289
  const out = {
268
290
  displayName, location, ...typeOptions
269
291
  };
@@ -314,12 +336,12 @@ export default {
314
336
  });
315
337
  }
316
338
 
317
- if ( this.canViewYaml ) {
318
- out.push({
319
- labelKey: 'resourceDetail.masthead.yaml',
320
- value: _YAML,
321
- });
322
- }
339
+ // if ( this.canViewYaml ) {
340
+ // out.push({
341
+ // labelKey: 'resourceDetail.masthead.yaml',
342
+ // value: _YAML,
343
+ // });
344
+ // }
323
345
 
324
346
  if ( out.length < 2 ) {
325
347
  return null;
@@ -393,6 +415,38 @@ export default {
393
415
  return this.shouldHifenize ? ` - ${ displayName }` : displayName;
394
416
  },
395
417
 
418
+ demoDisplay() {
419
+ const product = this.$store.getters['productId'];
420
+
421
+ const resources = this.location?.params?.resource || this.$route.params?.resource || ''
422
+
423
+ const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], resources);
424
+
425
+ if (productId === undefined) {
426
+ return '';
427
+ }
428
+ const parts = productId?.split('::') || [];
429
+ const newString = 'root';
430
+
431
+ if (!parts?.includes(newString)) {
432
+ parts.unshift(newString); // 将字符串添加到数组第一位
433
+ }
434
+
435
+ const partsEn = parts.map((item) => {
436
+ return this.$store.getters['i18n/t'](`typeLabel."${ item.toLowerCase() }"`);
437
+ });
438
+
439
+ return partsEn;
440
+ },
441
+ menuIcon() {
442
+ const product = this.$store.getters['productId'];
443
+
444
+ const resources = this.location?.params?.resource || this.$route.params?.resource || ''
445
+
446
+
447
+ return this.$store.getters['type-map/groupsForVirTypes'](product, resources) || 'default menuIcon';
448
+ },
449
+
396
450
  location() {
397
451
  const { parent } = this;
398
452
 
@@ -439,10 +493,81 @@ export default {
439
493
 
440
494
  <template>
441
495
  <div class="masthead">
496
+ <div class="title">
497
+ <!-- 创建api密钥不需要面包屑 -->
498
+ <div
499
+ v-if="!(parentRouteOverride === 'account' && resource=== 'token')"
500
+ class="excram-list"
501
+ >
502
+ <span
503
+ v-for="(item,index) in demoDisplay"
504
+ :key="index"
505
+ >
506
+ <span>{{ item }}</span>
507
+ <span>/</span>
508
+ </span>
509
+ <span class="excram-last-name">
510
+ {{ (realMode === 'view'? '查看': realMode === 'edit' ? '编辑':'创建') + parent?.displayName }}
511
+ </span>
512
+ </div>
442
513
  <header>
443
514
  <div class="title">
444
515
  <div class="primaryheader">
445
- <h1>
516
+ <span class="primary-title">
517
+ <!-- <nuxt-link
518
+ v-if="location"
519
+ :to="location"
520
+ >
521
+ {{ parent.displayName }}:
522
+ </nuxt-link> -->
523
+ <span class="detailIcon-span">
524
+ <img
525
+ v-if="parentRouteOverride === 'account' && resource=== 'token'"
526
+ :src="Svg"
527
+ style="margin-top: 4px; margin-left: 5px;"
528
+ >
529
+ <i
530
+ v-else
531
+ :class="'icon-'+ menuIcon + ' detailIcon'"
532
+ />
533
+ </span>
534
+ <span class="detailIcon-span-title">{{ realMode=== 'create'? '创建': '' }}{{ parent?.displayName }}{{ realMode=== 'create'? '': '名称:' }}</span>
535
+ <span v-if="realMode !== 'create'">
536
+ <span v-if="value.detailPageHeaderActionOverride && value.detailPageHeaderActionOverride(realMode)">{{ value.detailPageHeaderActionOverride(realMode) }}</span>
537
+ <t
538
+ v-else
539
+ :k="'resourceDetail.header.' + realMode"
540
+ :subtype="resourceSubtype"
541
+ :name="displayName"
542
+ :escapehtml="false"
543
+ />
544
+ </span>
545
+ <DotState
546
+ v-if="!isCreate && parent.showState"
547
+ class="masthead-state"
548
+ :value="value"
549
+ />
550
+ <span
551
+ v-if="!isCreate && value.injectionEnabled"
552
+ class="masthead-istio"
553
+ >
554
+ <i
555
+ v-clean-tooltip="t('projectNamespaces.isIstioInjectionEnabled')"
556
+ class="icon icon-sm icon-istio"
557
+ />
558
+ </span>
559
+ </span>
560
+ <span
561
+ v-if="location"
562
+ class="valid"
563
+ >|</span>
564
+ <router-link
565
+ v-if="location"
566
+ :to="location"
567
+ >
568
+ 返回
569
+ </router-link>
570
+ <!-- <h1>
446
571
  <TabTitle
447
572
  v-if="isCreate"
448
573
  :showChild="false"
@@ -498,9 +623,9 @@ export default {
498
623
  >
499
624
  <i class="icon icon-external-link" />
500
625
  </a>
501
- </h1>
626
+ </h1> -->
502
627
  </div>
503
- <div
628
+ <!-- <div
504
629
  v-if="!isCreate"
505
630
  class="subheader"
506
631
  >
@@ -545,7 +670,8 @@ export default {
545
670
  {{ value.createdBy.displayName }}
546
671
  </span>
547
672
  </span>
548
- </div>
673
+ <span v-if="value.showPodRestarts">{{ t("resourceDetail.masthead.restartCount") }}:<span class="live-data"> {{ value.restartCount }}</span></span>
674
+ </div> -->
549
675
  </div>
550
676
  <slot name="right">
551
677
  <div class="actions-container align-start">
@@ -623,42 +749,30 @@ export default {
623
749
  />
624
750
 
625
751
  <slot />
752
+ </div>
626
753
  </div>
627
754
  </template>
628
755
 
629
756
  <style lang='scss' scoped>
630
757
  .masthead {
631
758
  padding-bottom: 10px;
632
- border-bottom: 1px solid var(--border);
759
+ /* border-bottom: 1px solid var(--border); */
633
760
  margin-bottom: 10px;
634
761
  }
635
762
 
636
763
  HEADER {
637
764
  margin: 0;
638
- grid-template-columns: minmax(0, 1fr) auto;
639
765
  }
640
766
 
641
767
  .primaryheader {
642
768
  display: flex;
643
769
  flex-direction: row;
644
770
  align-items: center;
771
+ font-size:14px;
772
+ height: 50px;
645
773
 
646
774
  h1 {
647
- margin: 0 0 0 -5px;
648
- display: flex;
649
- flex-direction: row;
650
- align-items: center;
651
- overflow: hidden;
652
-
653
- .masthead-resource-title {
654
- text-overflow: ellipsis;
655
- overflow: hidden;
656
- white-space: nowrap;
657
- }
658
-
659
- .masthead-resource-list-link {
660
- margin: 5px;
661
- }
775
+ margin: 0;
662
776
  }
663
777
  }
664
778
 
@@ -671,8 +785,7 @@ export default {
671
785
  }
672
786
 
673
787
  .live-data {
674
- color: var(--body-text);
675
- margin-left: 3px;
788
+ color: var(--body-text)
676
789
  }
677
790
  }
678
791
 
@@ -681,8 +794,12 @@ export default {
681
794
  }
682
795
 
683
796
  .masthead-state {
684
- margin-left: 8px;
685
797
  font-size: initial;
798
+ display: inline-block;
799
+ position: relative;
800
+ /* top: -2px; */
801
+ font-size: 12px;
802
+ margin-left: 5px;
686
803
  }
687
804
 
688
805
  .masthead-istio {
@@ -705,13 +822,40 @@ export default {
705
822
  }
706
823
  }
707
824
 
708
- div.actions-container > div.actions {
709
- display: flex;
710
- flex-direction: row;
711
- justify-content: flex-end;
712
- }
713
-
714
825
  .resource-external {
715
826
  font-size: 18px;
716
827
  }
828
+ .excram-list{
829
+ font-size: 14px;
830
+ margin-bottom: 20px;
831
+ }
832
+ .excram-last-name{
833
+ color: var(--link);
834
+ }
835
+ .valid{
836
+ color: #d7d7d7;
837
+ margin: 0px 10px;
838
+ }
839
+ .detailIcon-span{
840
+ width: 24px;
841
+ height: 24px;
842
+ display: inline-block;
843
+ position: relative;
844
+ background: var(--primary);
845
+ margin-right: 10px;
846
+ }
847
+ .detailIcon{
848
+ position: absolute;
849
+ color: #fff;
850
+ font-size: 38px;
851
+ left: 4px;
852
+ top: -2px;
853
+ }
854
+ .primary-title{
855
+ display: flex;
856
+ align-items: center;
857
+ }
858
+ .detailIcon-span-title{
859
+ font-weight: bold;
860
+ }
717
861
  </style>
@@ -6,13 +6,14 @@ import {
6
6
  _VIEW, _EDIT, _CLONE, _IMPORT, _STAGE, _CREATE,
7
7
  AS, _YAML, _DETAIL, _CONFIG, _GRAPH, PREVIEW, MODE,
8
8
  } from '@shell/config/query-params';
9
- import { SCHEMA } from '@shell/config/types';
9
+ import { FLEET, SCHEMA } from '@shell/config/types';
10
10
  import { createYaml } from '@shell/utils/create-yaml';
11
11
  import Masthead from '@shell/components/ResourceDetail/Masthead';
12
12
  import DetailTop from '@shell/components/DetailTop';
13
13
  import { clone, diff } from '@shell/utils/object';
14
14
  import IconMessage from '@shell/components/IconMessage';
15
15
  import ForceDirectedTreeChart from '@shell/components/ForceDirectedTreeChart';
16
+ import { checkSchemasForFindAllHash } from '@shell/utils/auth';
16
17
  import { stringify } from '@shell/utils/error';
17
18
  import { Banner } from '@components/Banner';
18
19
 
@@ -171,6 +172,28 @@ export default {
171
172
  yaml = createYaml(schemas, resourceType, data);
172
173
  }
173
174
  } else {
175
+ if ( as === _GRAPH ) {
176
+ const graphSchema = await checkSchemasForFindAllHash({
177
+ cluster: {
178
+ inStoreType: 'management',
179
+ type: FLEET.CLUSTER
180
+ },
181
+ bundle: {
182
+ inStoreType: 'management',
183
+ type: FLEET.BUNDLE,
184
+ opt: { excludeFields: ['metadata.managedFields', 'spec.resources'] },
185
+ },
186
+
187
+ bundleDeployment: {
188
+ inStoreType: 'management',
189
+ type: FLEET.BUNDLE_DEPLOYMENT
190
+ }
191
+
192
+ }, this.$store);
193
+
194
+ this.canViewChart = graphSchema.cluster && graphSchema.bundle && graphSchema.bundleDeployment;
195
+ }
196
+
174
197
  let fqid = id;
175
198
 
176
199
  if ( schema.attributes?.namespaced && namespace ) {
@@ -273,6 +296,7 @@ export default {
273
296
  value: null,
274
297
  model: null,
275
298
  notFound: null,
299
+ canViewChart: true,
276
300
  canViewYaml: null,
277
301
  errors: []
278
302
  };
@@ -440,7 +464,7 @@ export default {
440
464
 
441
465
  <template>
442
466
  <Loading v-if="$fetchState.pending || notFound" />
443
- <div v-else>
467
+ <div style="padding: 20px;height: 100%;" v-else>
444
468
  <Masthead
445
469
  v-if="showMasthead"
446
470
  :resource="resourceType"
@@ -451,15 +475,16 @@ export default {
451
475
  :has-graph="hasGraph"
452
476
  :has-detail="hasCustomDetail"
453
477
  :has-edit="hasCustomEdit"
454
- :can-view-yaml="canViewYaml"
455
478
  :resource-subtype="resourceSubtype"
456
479
  :parent-route-override="parentRouteOverride"
457
480
  :store-override="storeOverride"
481
+
482
+ :isManuallyHide="false"
458
483
  >
459
- <DetailTop
484
+ <!-- <DetailTop
460
485
  v-if="isView && isDetail"
461
486
  :value="liveModel"
462
- />
487
+ /> -->
463
488
  </Masthead>
464
489
  <div
465
490
  v-if="hasErrors"
@@ -479,7 +504,7 @@ export default {
479
504
  </div>
480
505
 
481
506
  <ForceDirectedTreeChart
482
- v-if="isGraph"
507
+ v-if="isGraph && canViewChart"
483
508
  :data="chartData"
484
509
  :fdc-config="getGraphConfig"
485
510
  />
@@ -493,27 +518,26 @@ export default {
493
518
  :offer-preview="offerPreview"
494
519
  :done-route="doneRoute"
495
520
  :done-override="value ? value.doneOverride : null"
496
- :show-errors="false"
497
521
  @update:value="$emit('input', $event)"
498
- @error="onYamlError"
522
+ @error="e=>errors.push(e)"
499
523
  />
500
524
 
501
525
  <component
502
- :is="showComponent"
503
- v-else
504
- ref="comp"
505
- v-model:value="value"
506
- v-bind="$data"
507
- :done-params="doneParams"
508
- :done-route="doneRoute"
509
- :mode="mode"
510
- :initial-value="initialModel"
511
- :live-value="liveModel"
512
- :real-mode="realMode"
513
- :class="{'flex-content': flexContent}"
514
- @update:value="$emit('input', $event)"
515
- @update:mode="setMode"
516
- @set-subtype="setSubtype"
526
+ :is="showComponent"
527
+ v-else
528
+ ref="comp"
529
+ v-model:value="value"
530
+ v-bind="$data"
531
+ :done-params="doneParams"
532
+ :done-route="doneRoute"
533
+ :mode="mode"
534
+ :initial-value="initialModel"
535
+ :live-value="liveModel"
536
+ :real-mode="realMode"
537
+ :class="{'flex-content': flexContent}"
538
+ @update:value="$emit('input', $event)"
539
+ @update:mode="setMode"
540
+ @set-subtype="setSubtype"
517
541
  />
518
542
 
519
543
  <button
@@ -553,10 +577,4 @@ export default {
553
577
  flex-direction: column;
554
578
  flex-grow: 1;
555
579
  }
556
- .cru__errors {
557
- position: sticky;
558
- top: 0;
559
- z-index: 1;
560
- background-color: var(--header-bg);
561
- }
562
580
  </style>