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
@@ -0,0 +1,84 @@
1
+ <script lang="ts">
2
+ import Vue, { PropType, defineComponent } from 'vue';
3
+ import { mapGetters } from 'vuex';
4
+
5
+ interface Dot {
6
+ stateBackground: string;
7
+ stateDisplay: string;
8
+ }
9
+
10
+ export default defineComponent({
11
+
12
+ name: 'DotState',
13
+
14
+ props: {
15
+ value: {
16
+ type: Object as PropType<Dot>,
17
+ default: null
18
+ },
19
+ color: {
20
+ type: String,
21
+ default: null
22
+ },
23
+ label: {
24
+ type: String,
25
+ default: null
26
+ }
27
+ },
28
+
29
+ computed: {
30
+ ...mapGetters({ t: 'i18n/t' }),
31
+ bg(): string | null {
32
+ return this.value?.stateBackground || this.color;
33
+ },
34
+
35
+ msg(): string | null {
36
+ let text = this.value?.stateDisplay || this.label;
37
+ let zhText = this.t(`stateLabel.${ text }`)
38
+ return zhText ? zhText : text
39
+ }
40
+
41
+ }
42
+ });
43
+ </script>
44
+
45
+ <template>
46
+ <div style="display: flex;flex-direction: row;align-items: center;">
47
+ <div :class="{ [bg]: true }"></div>
48
+ <span style="margin-left: 5px;">{{ msg }}</span>
49
+
50
+ </div>
51
+
52
+ </template>
53
+ <style lang="scss" scoped>
54
+ .bg-error {
55
+ width: 10px; /* 圆点的宽度 */
56
+ height: 10px; /* 圆点的高度 */
57
+ background-color: #DD0C17; /* 圆点的颜色 */
58
+ border-radius: 50%; /* 设置为圆形 */
59
+ }
60
+ .bg-darker {
61
+ width: 10px; /* 圆点的宽度 */
62
+ height: 10px; /* 圆点的高度 */
63
+ background-color: #DD0C17; /* 圆点的颜色 */
64
+ border-radius: 50%; /* 设置为圆形 */
65
+ }
66
+ .bg-success {
67
+ width: 10px; /* 圆点的宽度 */
68
+ height: 10px; /* 圆点的高度 */
69
+ background-color: #95F204 !important; /* 圆点的颜色 */
70
+ border-radius: 50%; /* 设置为圆形 */
71
+ }
72
+ .bg-warning {
73
+ width: 10px; /* 圆点的宽度 */
74
+ height: 10px; /* 圆点的高度 */
75
+ background-color: #DAC342; /* 圆点的颜色 */
76
+ border-radius: 50%; /* 设置为圆形 */
77
+ }
78
+ .bg-info {
79
+ width: 10px; /* 圆点的宽度 */
80
+ height: 10px; /* 圆点的高度 */
81
+ background-color: #1890FF; /* 圆点的颜色 */
82
+ border-radius: 50%; /* 设置为圆形 */
83
+ }
84
+ </style>
@@ -35,7 +35,7 @@ const ariaLabel = computed(() => i18n.t('component.drawer.chrome.ariaLabel.close
35
35
  </div>
36
36
  </slot>
37
37
  </div>
38
- <div class="body pp-4">
38
+ <div class="body">
39
39
  <slot name="body" />
40
40
  </div>
41
41
  <div class="footer pp-4">
@@ -93,7 +93,7 @@ const ariaLabel = computed(() => i18n.t('component.drawer.chrome.ariaLabel.close
93
93
  }
94
94
 
95
95
  .body {
96
- background-color: var(--drawer-body-bg);
96
+ background-color: var(--body-bg);
97
97
  flex: 1;
98
98
  overflow-y: scroll;
99
99
  }
@@ -16,38 +16,41 @@ const store = useStore();
16
16
  const i18n = useI18n(store);
17
17
  </script>
18
18
  <template>
19
- <Tab
20
- class="config-tab"
21
- name="config-tab"
22
- :label="i18n.t('component.drawer.resourceDetailDrawer.configTab.title')"
23
- >
24
- <div class="container">
25
- <component
26
- :is="props.component"
27
- :value="props.resource"
28
- :liveValue="props.resource"
29
- :resourceType="props.resourceType"
30
- :mode="_VIEW"
31
- :real-mode="_VIEW"
32
- :initial-value="props.resource"
33
- :use-tabbed-hash="false /* Have to disable hashing on child components or it modifies the url and closes the drawer */"
34
- as="config"
35
- />
36
- </div>
37
- </Tab>
19
+ <div class="container">
20
+ <component
21
+ :is="props.component"
22
+ :value="props.resource"
23
+ :liveValue="props.resource"
24
+ :resourceType="props.resourceType"
25
+ :mode="_VIEW"
26
+ :real-mode="_VIEW"
27
+ :initial-value="props.resource"
28
+ :use-tabbed-hash="false /* Have to disable hashing on child components or it modifies the url and closes the drawer */"
29
+ as="config"
30
+ />
31
+ </div>
38
32
  </template>
39
33
 
40
34
  <style lang="scss" scoped>
41
- .config-tab {
42
- .container {
43
- background-color: var(--body-bg);
44
- border-radius: var(--border-radius-md);
45
- padding: 16px;
46
- max-width: 100%;
47
- width: 100%;
48
- position: relative;
35
+ .container {
36
+ background-color: var(--body-bg);
37
+ border-radius: var(--border-radius-md);
38
+ padding: 20px;
39
+ max-width: 100%;
40
+ width: 100%;
41
+ position: relative;
42
+ // Handle the loading indicator
43
+ :deep() .overlay-content-mode {
44
+ left: 0;
45
+ top: 0;
49
46
  }
50
47
 
48
+ :deep() .cru-resource-footer {
49
+ display: none;
50
+ }
51
+ }
52
+ .config-tab {
53
+
51
54
  // Handle the loading indicator
52
55
  :deep() .overlay-content-mode {
53
56
  left: 0;
@@ -38,7 +38,7 @@ const yamlComponent: any = useTemplateRef('yaml');
38
38
  :deep() .codemirror-container {
39
39
  background-color: var(--body-bg);
40
40
  border-radius: var(--border-radius-md);
41
- padding: 16px;
41
+ padding: 20px;
42
42
 
43
43
  .CodeMirror, .CodeMirror-gutter {
44
44
  background-color: var(--body-bg);
@@ -3,7 +3,7 @@ import Drawer from '@shell/components/Drawer/Chrome.vue';
3
3
  import { useI18n } from '@shell/composables/useI18n';
4
4
  import { useStore } from 'vuex';
5
5
  import Tabbed from '@shell/components/Tabbed/index.vue';
6
- import YamlTab, { Props as YamlProps } from '@shell/components/Drawer/ResourceDetailDrawer/YamlTab.vue';
6
+ // import YamlTab, { Props as YamlProps } from '@shell/components/Drawer/ResourceDetailDrawer/YamlTab.vue';
7
7
  import { useDefaultConfigTabProps, useDefaultYamlTabProps } from '@shell/components/Drawer/ResourceDetailDrawer/composables';
8
8
  import ConfigTab from '@shell/components/Drawer/ResourceDetailDrawer/ConfigTab.vue';
9
9
  import { computed, ref } from 'vue';
@@ -27,6 +27,8 @@ const i18n = useI18n(store);
27
27
  const yamlTabProps = ref<YamlProps | null>(null);
28
28
  const configTabProps = useDefaultConfigTabProps(props.resource);
29
29
 
30
+ console.log(configTabProps, ' configTabProps---------------------------------2');
31
+
30
32
  useDefaultYamlTabProps(props.resource).then((props) => {
31
33
  yamlTabProps.value = props;
32
34
  });
@@ -85,10 +87,10 @@ const canEdit = computed(() => {
85
87
  v-if="configTabProps"
86
88
  v-bind="configTabProps"
87
89
  />
88
- <YamlTab
90
+ <!-- <YamlTab
89
91
  v-if="yamlTabProps"
90
92
  v-bind="yamlTabProps"
91
- />
93
+ /> -->
92
94
  </Tabbed>
93
95
  </template>
94
96
  <template #additional-actions>
@@ -116,7 +118,6 @@ const canEdit = computed(() => {
116
118
  border: none;
117
119
  border-top: 1px solid var(--border);
118
120
  padding: 0;
119
- padding-top: 24px;
120
121
  }
121
122
  }
122
123
  }
@@ -115,6 +115,10 @@ export default {
115
115
  labelKey: 'tableHeaders.role',
116
116
  value: 'roleTemplate.nameDisplay'
117
117
  },
118
+ {
119
+ name: '操作',
120
+ labelKey: 'tableHeaders.action',
121
+ },
118
122
  ],
119
123
  loadingProjectBindings: true,
120
124
  loadingClusterBindings: true
@@ -293,6 +297,7 @@ export default {
293
297
  :create-button-label="t('members.createActionLabel')"
294
298
  :is-creatable="false"
295
299
  :type-display="t('members.clusterAndProject')"
300
+
296
301
  />
297
302
  <Banner
298
303
  v-if="isLocal"
@@ -304,7 +309,7 @@ export default {
304
309
  name="cluster-membership"
305
310
  :label="t('members.clusterMembership')"
306
311
  >
307
- <div
312
+ <!-- <div
308
313
  v-if="canEditClusterMembers"
309
314
  class="row mb-10 cluster-add"
310
315
  >
@@ -314,7 +319,7 @@ export default {
314
319
  >
315
320
  {{ t('members.createActionLabel') }}
316
321
  </router-link>
317
- </div>
322
+ </div> -->
318
323
  <ResourceTable
319
324
  :schema="schema"
320
325
  :headers="headers"
@@ -325,7 +330,21 @@ export default {
325
330
  :loading="$fetchState.pending || !currentCluster || loadingClusterBindings"
326
331
  sub-search="subSearch"
327
332
  :sub-fields="['nameDisplay']"
328
- />
333
+ >
334
+ <template #header-right>
335
+ <div
336
+ v-if="canEditClusterMembers"
337
+ class="row mb-10 mr-10 cluster-add"
338
+ >
339
+ <router-link
340
+ :to="createLocation"
341
+ class="btn role-primary pull-right"
342
+ >
343
+ {{ t('members.createActionLabel') }}
344
+ </router-link>
345
+ </div>
346
+ </template>
347
+ </ResourceTable>
329
348
  </Tab>
330
349
  <Tab
331
350
  v-if="canManageProjectMembers && !isHarvester"
@@ -346,12 +365,13 @@ export default {
346
365
  v-trim-whitespace
347
366
  class="group-tab"
348
367
  >
368
+
349
369
  <div
350
370
  v-clean-html="getProjectLabel(group)"
351
371
  class="project-name"
352
372
  />
353
373
  </div>
354
- <div class="right">
374
+ <div class="right" style="margin-right: 80px;">
355
375
  <button
356
376
  v-if="canEditProjectMembers"
357
377
  type="button"
@@ -445,8 +465,12 @@ export default {
445
465
  & :deep() .group-bar{
446
466
  display: flex;
447
467
  justify-content: space-between;
468
+ align-items: center;
448
469
  }
449
470
  }
471
+ .role-secondary.btn-sm:focus, .role-secondary.btn-sm.focused{
472
+ border: 1px solid #d7d7d7;
473
+ }
450
474
  .cluster-add {
451
475
  justify-content: flex-end;
452
476
  }
@@ -1,8 +1,8 @@
1
1
  <script>
2
2
  import { mapGetters, useStore } from 'vuex';
3
3
  import ResourceTable, { defaultTableSortGenerationFn } from '@shell/components/ResourceTable';
4
- import {
5
- STATE, AGE, NAME, NS_SNAPSHOT_QUOTA, DESCRIPTION
4
+ import {
5
+ STATE, AGE, NAME, NS_SNAPSHOT_QUOTA, DESCRIPTION
6
6
  } from '@shell/config/table-headers';
7
7
  import { uniq } from '@shell/utils/array';
8
8
  import { MANAGEMENT, NAMESPACE, VIRTUAL_TYPES, HCI } from '@shell/config/types';
@@ -494,19 +494,22 @@ export default {
494
494
  {{ projectDescription(group.group) }}
495
495
  </div>
496
496
  </div>
497
- <div class="right mr-10">
497
+ <div class="right">
498
498
  <router-link
499
499
  v-if="isNamespaceCreatable && (canSeeProjectlessNamespaces || group.group.key !== notInProjectKey)"
500
- class="create-namespace btn btn-sm role-secondary mr-5"
500
+ class="create-namespace"
501
+ style="margin-bottom: 3px;"
501
502
  :to="createNamespaceLocation(group.group)"
502
503
  >
503
504
  {{ t('projectNamespaces.createNamespace') }}
504
505
  </router-link>
506
+ <span v-if="showProjectActionButton(group.group)" style="margin-bottom: 3px;color: var(--link);margin-left: 20px;">|</span>
505
507
  <template v-if="featureDropdownMenu">
506
508
  <ActionMenu
507
509
  v-if="showProjectActionButton(group.group)"
508
510
  :resource="getProjectActions(group.group)"
509
511
  data-testid="action-button"
512
+ :showIcon="true"
510
513
  :button-aria-label="t('projectNamespaces.tableActionsLabel', { resource: projectResource(group.group) })"
511
514
  />
512
515
  <div
@@ -588,7 +591,7 @@ export default {
588
591
  <style lang="scss" scoped>
589
592
  .invisible {
590
593
  display: inline-block;
591
- min-width: 28px;
594
+ min-width: 58px;
592
595
  }
593
596
 
594
597
  .project-namespaces {
@@ -602,9 +605,20 @@ export default {
602
605
  }
603
606
 
604
607
  .project-bar {
608
+ padding-right: 20px;
605
609
  display: flex;
606
610
  flex-direction: row;
607
611
  justify-content: space-between;
612
+ background-color: var(--sortable-table-bg) !important;
613
+
614
+ .right {
615
+ display: flex;
616
+ align-items: center;
617
+ }
618
+
619
+ .create-namespace {
620
+ color: var(--link);
621
+ }
608
622
 
609
623
  .group-tab {
610
624
  max-width: calc(100% - 230px);
@@ -103,18 +103,36 @@ export default {
103
103
  this.sortedRoles.global.push(...remainingGlobalRoles);
104
104
  // End sort of global roles
105
105
 
106
+ if (!(sessionStorage.getItem('TOPLEVELPERMISSIONS') && sessionStorage.getItem('TOPLEVELPERMISSIONS') === 'superadmin')) {
107
+ delete this.sortedRoles.builtin
108
+ delete this.sortedRoles.custom
109
+ }
110
+
106
111
  this.update();
107
112
  }
108
113
  } catch (e) { }
109
114
  },
110
115
  data() {
111
- return {
112
- // This not only identifies global roles but the order here is the order we want to display them in the UI
113
- globalPermissions: [
116
+
117
+ let globalPermissions = [
118
+ 'admin',
119
+ 'safe-admin',
120
+ 'tenant',
121
+ ]
122
+
123
+ if (sessionStorage.getItem('TOPLEVELPERMISSIONS') === 'superadmin') {
124
+ globalPermissions = [
114
125
  'admin',
126
+ 'safe-admin',
115
127
  'user',
116
128
  'user-base',
117
- ],
129
+ 'tenant',
130
+ ]
131
+ }
132
+
133
+ return {
134
+ // This not only identifies global roles but the order here is the order we want to display them in the UI
135
+ globalPermissions,
118
136
  globalRoleBindings: null,
119
137
  sortedRoles: null,
120
138
  selectedRoles: [],
@@ -426,4 +444,5 @@ export default {
426
444
  }
427
445
  }
428
446
  }
447
+
429
448
  </style>
@@ -262,22 +262,22 @@ export default {
262
262
  <div v-if="loading">
263
263
  <Loading />
264
264
  </div>
265
- <div
265
+ <!-- <div
266
266
  v-if="!loading && !error"
267
267
  class="external-link"
268
- >
268
+ > -->
269
269
  <!-- https://github.com/harvester/harvester-installer/pull/512/files -->
270
270
  <!-- It is necessary to include the parameter referer when accessing the Grafana page. -->
271
271
  <!-- This parameter is required by the backend to identify the origin of the request from which cluster -->
272
272
  <!-- The matching mechanism as follows: -->
273
273
  <!-- ~.*/k8s/clusters/(c-m-.+)/.* -->
274
274
  <!-- ~.*/dashboard/harvester/c/(c-m-.+)/.* -->
275
- <a
275
+ <!-- <a
276
276
  :href="grafanaUrl"
277
277
  target="_blank"
278
278
  rel="noopener nofollow"
279
279
  >{{ t('grafanaDashboard.grafana') }} <i class="icon icon-external-link" /></a>
280
- </div>
280
+ </div> -->
281
281
  </div>
282
282
  </template>
283
283
 
@@ -1,5 +1,6 @@
1
1
  <script>
2
2
  import { mapState } from 'vuex';
3
+ import { translateError } from '@shell/utils/error'
3
4
 
4
5
  export default {
5
6
  data() {
@@ -25,6 +26,7 @@ export default {
25
26
  },
26
27
 
27
28
  methods: {
29
+ translateError,
28
30
  remove(growl) {
29
31
  this.$store.dispatch('growl/remove', growl.id);
30
32
  },
@@ -131,7 +133,7 @@ export default {
131
133
  :id="`growl-message-${ growl.id }`"
132
134
  :class="{ 'has-title': !!growl.title }"
133
135
  >
134
- {{ growl.message }}
136
+ {{ translateError(growl.message) }}
135
137
  </p>
136
138
  </div>
137
139
  </div>
@@ -85,8 +85,9 @@ export default {
85
85
  :capacity="reserved.total"
86
86
  :used="reserved.useful"
87
87
  :color-stops="colorStops"
88
+ :reserveText="`已分配`"
88
89
  >
89
- <template #title>
90
+ <!-- <template #title>
90
91
  <span>
91
92
  {{ reservedTitle ?? t('clusterIndexPage.hardwareResourceGauge.reserved') }}
92
93
  <span class="values text-muted">
@@ -108,6 +109,23 @@ export default {
108
109
  <span>
109
110
  {{ percentage(reserved) }}
110
111
  </span>
112
+ </template> -->
113
+ <template #content>
114
+ <span>
115
+ {{ percentage(reserved) }}(
116
+ 共 <span v-if="reserved.formattedTotal">
117
+ {{ reserved.formattedTotal }}
118
+ </span>
119
+ <span v-else>
120
+ {{ maxDecimalPlaces(reserved.total) }} {{ reserved.units }}
121
+ </span>,{{ reservedTitle === '分配'? '已分配': '预留' }} <span v-if="reserved.formattedUseful">
122
+ {{ reserved.formattedUseful }} {{ reserved.units }}
123
+ </span>
124
+ <span v-else>
125
+ {{ maxDecimalPlaces(reserved.useful) }} {{ reserved.units }}
126
+ </span>
127
+ )
128
+ </span>
111
129
  </template>
112
130
  </ConsumptionGauge>
113
131
  </div>
@@ -119,8 +137,26 @@ export default {
119
137
  :capacity="used.total"
120
138
  :used="used.useful"
121
139
  :color-stops="colorStops"
140
+ :reserveText="`已使用`"
122
141
  >
123
- <template #title>
142
+ <template #content>
143
+ <span>
144
+ {{ percentage(used) }}(
145
+ 共 <span v-if="used.formattedTotal">
146
+ {{ used.formattedTotal }}
147
+ </span>
148
+ <span v-else>
149
+ {{ maxDecimalPlaces(used.total) }} {{ used.units }}
150
+ </span>,已使用 <span v-if="used.formattedUseful">
151
+ {{ used.formattedUseful }} {{ used.units }}
152
+ </span>
153
+ <span v-else>
154
+ {{ maxDecimalPlaces(used.useful) }} {{ used.units }}
155
+ </span>
156
+ )
157
+ </span>
158
+ </template>
159
+ <!-- <template #title>
124
160
  <span>
125
161
  {{ usedTitle ?? t('clusterIndexPage.hardwareResourceGauge.used') }}
126
162
  <span class="values text-muted">
@@ -142,7 +178,7 @@ export default {
142
178
  <span>
143
179
  {{ percentage(used) }}
144
180
  </span>
145
- </template>
181
+ </template> -->
146
182
  </ConsumptionGauge>
147
183
  </div>
148
184
  </div>
@@ -4,23 +4,17 @@ export default {};
4
4
 
5
5
  <template>
6
6
  <div
7
- class="indented-panel"
7
+ class="indented-panels"
8
8
  >
9
9
  <slot />
10
10
  </div>
11
11
  </template>
12
12
 
13
13
  <style lang="scss">
14
- .indented-panel {
14
+ .indented-panels {
15
15
  height: 100%;
16
- width: 90%;
17
- margin-left: 5%;
16
+ width: 100%;
17
+ padding: 0 20px;
18
18
  }
19
19
 
20
- @media only screen and (max-width: map-get($breakpoints, '--viewport-9')) {
21
- .indented-panel {
22
- margin: 0 20px;
23
- width: initial;
24
- }
25
- }
26
20
  </style>
@@ -26,8 +26,8 @@ export default {
26
26
 
27
27
  <style lang="scss" scoped>
28
28
  .info-box {
29
- border: 2px solid var(--tabbed-border);
30
- padding: 10px;
29
+ border: 1px solid var(--tabbed-border);
30
+ padding: 20px;
31
31
  margin-bottom: 20px;
32
32
  border-radius: var(--border-radius);
33
33
  flex-grow: 1;
@@ -81,4 +81,4 @@ export default {
81
81
  }
82
82
  }
83
83
  }
84
- </style>
84
+ </style>
@@ -45,7 +45,9 @@ export default {
45
45
  </div>
46
46
  <div class="value">
47
47
  <slot name="value">
48
- {{ displayValue }}
48
+ <span v-clean-tooltip="displayValue">
49
+ {{ displayValue }}
50
+ </span>
49
51
  </slot>
50
52
  </div>
51
53
  </div>
@@ -53,7 +55,7 @@ export default {
53
55
  </template>
54
56
 
55
57
  <style lang="scss" scoped>
56
- .label {
58
+ /* .label {
57
59
  display: flex;
58
60
  flex-direction: column;
59
61
 
@@ -61,5 +63,29 @@ export default {
61
63
  font-size: 14px;
62
64
  line-height: $input-line-height;
63
65
  }
66
+ } */
67
+ .label {
68
+ display: flex;
69
+ /* align-items: center; */
70
+ /* flex-direction: column; */
71
+
72
+ .text-label{
73
+ width: 160px;
74
+ line-height: 32px;
75
+ }
76
+ .value {
77
+ /* font-size: 14px; */
78
+ /* line-height: $input-line-height; */
79
+ line-height: 32px;
80
+ flex: 1;
81
+ overflow: hidden;
82
+ text-overflow: ellipsis;
83
+ white-space: nowrap;
84
+
85
+ ul{
86
+ line-height: $input-line-height;
87
+ list-style:none;
88
+ }
89
+ }
64
90
  }
65
91
  </style>
@@ -30,7 +30,7 @@ export default {
30
30
  </template>
31
31
 
32
32
  <style lang="scss" scoped>
33
- .label {
33
+ /* .label {
34
34
  display: flex;
35
35
  flex-direction: column;
36
36
 
@@ -38,5 +38,24 @@ export default {
38
38
  font-size: 14px;
39
39
  line-height: $input-line-height;
40
40
  }
41
+ } */
42
+ .label {
43
+ display: flex;
44
+ /* flex-direction: column; */
45
+ /* align-items: center; */
46
+ .text-label{
47
+ width: 160px;
48
+ line-height: 32px;
49
+ }
50
+ .value {
51
+ line-height: $input-line-height;
52
+ overflow: hidden;
53
+ text-overflow: ellipsis;
54
+ white-space: nowrap;
55
+ line-height: 32px;
56
+ }
57
+ }
58
+ :deep() ul {
59
+ margin: 0px;
41
60
  }
42
61
  </style>