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
@@ -15,7 +15,8 @@ export default {
15
15
  },
16
16
 
17
17
  indexTo() {
18
- return Math.min(this.totalRows, this.indexFrom + this.perPage - 1);
18
+ // return Math.min(this.totalRows, this.indexFrom + this.perPage - 1);
19
+ return Math.min(this.totalRows, this.indexFrom + Number(this.perPage) - 1);
19
20
  },
20
21
 
21
22
  totalPages() {
@@ -23,17 +24,18 @@ export default {
23
24
  },
24
25
 
25
26
  showPaging() {
26
- if (!this.paging) {
27
- return false;
28
- }
27
+ // if (!this.paging) {
28
+ // return false;
29
+ // }
29
30
 
30
- const havePages = this.totalPages > 1;
31
+ // const havePages = this.totalPages > 1;
31
32
 
32
- if (this.altLoading) {
33
- return havePages;
34
- }
33
+ // if (this.altLoading) {
34
+ // return havePages;
35
+ // }
35
36
 
36
- return !this.loading && havePages;
37
+ // return !this.loading && havePages;
38
+ return !this.loading && this.paging && this.totalPages >= 1;
37
39
  },
38
40
 
39
41
  pagingDisplay() {
@@ -76,7 +78,9 @@ export default {
76
78
  },
77
79
 
78
80
  data() {
79
- return { page: 1 };
81
+ // const perPage = this.getPerPage();
82
+
83
+ return { page: 1, perPage:10 };
80
84
  },
81
85
 
82
86
  watch: {
@@ -91,17 +95,23 @@ export default {
91
95
  }
92
96
  },
93
97
 
94
- page() {
95
- this.debouncedPaginationChanged();
96
- },
98
+ // page() {
99
+ // this.debouncedPaginationChanged();
100
+ // },
97
101
 
98
- perPage() {
99
- this.debouncedPaginationChanged();
100
- },
102
+ // perPage() {
103
+ // this.debouncedPaginationChanged();
104
+ // },
101
105
 
102
106
  },
103
107
 
104
108
  methods: {
109
+
110
+ setgetPerPage(num) {
111
+ this.setPage(1);
112
+ this.perPage = num;
113
+ },
114
+
105
115
  setPage(num) {
106
116
  if (this.page === num) {
107
117
  return;
@@ -10,7 +10,7 @@ export const NONE = 'none';
10
10
 
11
11
  export default {
12
12
  mounted() {
13
- const table = this.$el.querySelector('TABLE');
13
+ const table = this.$el && this.$el.querySelector('TABLE');
14
14
 
15
15
  this._onRowClickBound = this.onRowClick.bind(this);
16
16
  this._onRowMousedownBound = this.onRowMousedown.bind(this);
@@ -22,7 +22,7 @@ export default {
22
22
  },
23
23
 
24
24
  beforeUnmount() {
25
- const table = this.$el.querySelector('TABLE');
25
+ const table = this.$el && this.$el.querySelector('TABLE');
26
26
 
27
27
  table.removeEventListener('click', this._onRowClickBound);
28
28
  table.removeEventListener('mousedown', this._onRowMousedownBound);
@@ -100,14 +100,14 @@ export default {
100
100
  v-if="shouldShowHeader"
101
101
  class="tab-header"
102
102
  >
103
- <h2>
103
+ <!-- <h2>
104
104
  {{ labelDisplay }}
105
105
  <i
106
106
  v-if="tooltip"
107
107
  v-clean-tooltip="tooltip"
108
108
  class="icon icon-info icon-lg"
109
109
  />
110
- </h2>
110
+ </h2> -->
111
111
  <slot name="tab-header-right" />
112
112
  </div>
113
113
  <slot v-bind="{active}" />
@@ -118,7 +118,7 @@ export default {
118
118
  .tab-header {
119
119
  display: flex;
120
120
  justify-content: space-between;
121
- margin-bottom: 15px;
121
+ /* margin-bottom: 15px; */
122
122
  align-items: center;
123
123
 
124
124
  h2 {
@@ -285,15 +285,15 @@ export default {
285
285
  :data-testid="tab.name"
286
286
  :class="{tab: true, active: tab.active, disabled: tab.disabled, error: (tab.error)}"
287
287
  role="presentation"
288
+ @click.prevent="select(tab.name, $event)"
289
+ @keyup.enter.space="select(tab.name, $event)"
288
290
  >
289
291
  <a
290
292
  :data-testid="`btn-${tab.name}`"
291
293
  :aria-controls="tab.name"
292
294
  :aria-selected="tab.active"
293
295
  :aria-label="tab.labelDisplay || ''"
294
- role="tab"
295
- @click.prevent="select(tab.name, $event)"
296
- @keyup.enter.space="select(tab.name, $event)"
296
+ role="tab"
297
297
  >
298
298
  <span>{{ tab.labelDisplay }}</span>
299
299
  <span
@@ -382,23 +382,15 @@ export default {
382
382
  margin: 0;
383
383
  padding: 0;
384
384
 
385
- &:focus-visible {
386
- outline: none;
387
-
388
- .tab.active {
389
- @include focus-outline;
390
- outline-offset: -2px;
391
- }
392
- }
393
-
394
385
  &.horizontal {
395
386
  border: solid thin var(--border);
396
- border-bottom: 0;
387
+ // border-bottom: 0;
397
388
  display: flex;
398
389
  flex-direction: row;
399
390
 
400
391
  + .tab-container {
401
392
  border: solid thin var(--border);
393
+ border-top: 0px;
402
394
  }
403
395
 
404
396
  .tab.active {
@@ -406,8 +398,12 @@ export default {
406
398
  }
407
399
  }
408
400
 
409
- &:focus .tab.active a span {
410
- text-decoration: underline;
401
+ &:focus {
402
+ outline: none;
403
+
404
+ & .tab.active a span {
405
+ text-decoration: none;
406
+ }
411
407
  }
412
408
 
413
409
  .tab {
@@ -424,7 +420,7 @@ export default {
424
420
  &:hover {
425
421
  text-decoration: none;
426
422
  span {
427
- text-decoration: underline;
423
+ text-decoration: none;
428
424
  }
429
425
  }
430
426
  }
@@ -494,45 +490,70 @@ export default {
494
490
 
495
491
  .side-tabs {
496
492
  display: flex;
497
- box-shadow: 0 0 20px var(--shadow);
493
+ flex-direction: column;
494
+ /* box-shadow: 0 0 20px var(--shadow);
498
495
  border-radius: calc(var(--border-radius) * 2);
499
- background-color: var(--tabbed-sidebar-bg);
500
-
496
+ background-color: var(--tabbed-sidebar-bg); */
497
+ margin: 0px -20px;
501
498
  .tab-container {
502
499
  padding: 20px;
503
500
  }
504
501
 
505
502
  & .tabs {
506
- width: $sideways-tabs-width;
507
- min-width: $sideways-tabs-width;
503
+ /* width: $sideways-tabs-width; */
504
+ /* min-width: $sideways-tabs-width; */
508
505
  display: flex;
509
- flex: 1 0;
510
- flex-direction: column;
506
+ border-bottom:1px solid #d7d7d7;
507
+ padding: 0 0 0 20px;
508
+ // overflow: auto;
509
+ // overflow-y: hidden;
510
+ /* flex: 1 0; */
511
+ /* flex-direction: column; */
511
512
 
512
513
  // &.vertical {
513
514
  // .tab.active {
514
515
  // background-color: var(--tabbed-container-bg);
515
516
  // }
516
517
  // }
517
-
518
518
  & .tab {
519
- width: 100%;
520
- border-left: solid 5px transparent;
519
+ /* width: 100%; */
520
+ min-width: 120px;
521
+ height: 36px;
522
+ /* border-top: solid 5px transparent; */
523
+ display: flex;
524
+ justify-content: center;
525
+ padding: 8px 16px;
526
+ box-sizing: border-box;
527
+ border: 1px solid #d7d7d7;
528
+ border-bottom: 0px;
529
+ margin-right: 5px;
530
+ border-radius: 2px;
521
531
 
522
532
  &.toggle A {
523
533
  color: var(--primary);
534
+ padding: 0px;
524
535
  }
525
536
 
526
537
  A {
527
- color: var(--primary);
538
+ color: var(--input-label);
539
+ padding: 0px;
528
540
  }
529
541
 
530
542
  &.active {
531
543
  background-color: var(--body-bg);
532
- border-left: solid 5px var(--primary);
544
+ border-top: solid 2px var(--primary);
545
+ position: relative;
546
+ &.active::before{
547
+ position: absolute;
548
+ right: 0;
549
+ left: 0;
550
+ top: 34px;
551
+ border-bottom: 1px solid #fff;
552
+ content: '';
533
553
 
554
+ }
534
555
  & A {
535
- color: var(--input-label);
556
+ color: var(--primary);
536
557
  }
537
558
  }
538
559
 
@@ -553,6 +574,8 @@ export default {
553
574
  li {
554
575
  display: flex;
555
576
  flex: 1;
577
+ border-left: 1px solid var(--border);
578
+ border-right: 1px solid var(--border);
556
579
 
557
580
  .btn {
558
581
  flex: 1 1;
@@ -576,7 +599,7 @@ export default {
576
599
  &
577
600
 
578
601
  .tab-container {
579
- width: calc(100% - #{$sideways-tabs-width});
602
+ /* width: calc(100% - #{$sideways-tabs-width}); */
580
603
  flex-grow: 1;
581
604
  background-color: var(--body-bg);
582
605
  }
@@ -247,7 +247,6 @@ export default {
247
247
  @onInput="onInput"
248
248
  @onReady="onReady"
249
249
  @onChanges="onChanges"
250
- @validationChanged="$emit('validationChanged', $event)"
251
250
  />
252
251
  <FileDiff
253
252
  v-else
@@ -3,6 +3,10 @@ import { NORMAN } from '@shell/config/types';
3
3
 
4
4
  export default {
5
5
  props: {
6
+ userLogo: {
7
+ type: Boolean,
8
+ default: false,
9
+ },
6
10
  value: {
7
11
  type: String,
8
12
  required: true,
@@ -16,7 +20,15 @@ export default {
16
20
  showLabels: {
17
21
  type: Boolean,
18
22
  default: false,
19
- }
23
+ },
24
+ isShowPass: {
25
+ type: Boolean,
26
+ default: false,
27
+ },
28
+ userLogoSize: {
29
+ type: Number,
30
+ default: 20,
31
+ },
20
32
  },
21
33
 
22
34
  async fetch() {
@@ -86,9 +98,10 @@ export default {
86
98
  </template>
87
99
 
88
100
  <template v-else-if="principal">
89
- <div class="avatar">
101
+ <div v-if="userLogo" :style="userLogoSize === 79 ? { width: '287px' } : {}" class="avatar">
90
102
  <img
91
- :src="principal.avatarSrc"
103
+ :style="{ width: userLogoSize + 'px', height: userLogoSize + 'px', marginRight: '10px' }"
104
+ src="@shell/assets/images/user.png"
92
105
  :class="{'round': principal.roundAvatar}"
93
106
  :alt="t('principal.alt.avatar')"
94
107
  >
@@ -98,11 +111,19 @@ export default {
98
111
  class="name"
99
112
  >
100
113
  <table>
101
- <tbody>
102
- <tr><th>{{ t('principal.name') }}: </th><td>{{ principal.name || principal.loginName }}</td></tr>
103
- <tr><th>{{ t('principal.loginName') }}: </th><td>{{ principal.loginName }}</td></tr>
104
- <tr><th>{{ t('principal.type') }}: </th><td>{{ principal.displayType }}</td></tr>
105
- </tbody>
114
+ <tr class="mb-10">
115
+ <td>{{ t('principal.name') }}: </td><td>{{ principal.name || principal.loginName }}</td>
116
+ </tr>
117
+ <tr class="mb-10">
118
+ <td>{{ t('principal.loginName') }}: </td><td>{{ principal.loginName }}</td>
119
+ </tr>
120
+ <tr
121
+ v-if="isShowPass"
122
+ class="mb-10"
123
+ >
124
+ <td>修改密码: </td><td>****** <slot name="edit" /></td>
125
+ </tr>
126
+ <tr><td>{{ t('principal.type') }}: </td><td>{{ principal.displayType }}</td></tr>
106
127
  </table>
107
128
  </div>
108
129
  <template v-else>
@@ -154,16 +175,15 @@ export default {
154
175
  </template>
155
176
 
156
177
  <style lang="scss" scoped>
157
- $size: 40px;
178
+ $size: 24px;
158
179
 
159
180
  .principal {
160
181
  display: grid;
161
182
  grid-template-areas:
162
183
  "avatar name"
163
184
  "avatar description";
164
- grid-template-columns: $size auto;
165
- grid-template-rows: auto math.div($size, 2);
166
- column-gap: 10px;
185
+ grid-template-columns: min-content auto;
186
+ // grid-template-rows: auto math.div($size, 2);
167
187
 
168
188
  th {
169
189
  text-align: left;
@@ -172,23 +192,35 @@ export default {
172
192
  }
173
193
 
174
194
  &.showLabels {
175
- grid-template-areas:
195
+ /* grid-template-areas:
176
196
  "avatar name";
177
197
  grid-template-columns: 60px auto;
178
198
  grid-template-rows: 60px;
179
- column-gap: 0;
199
+ column-gap: 0; */
200
+ display: flex;
201
+ column-gap:0;
180
202
  .name {
203
+ display: flex;
181
204
  line-height: unset;
182
205
  }
183
-
206
+ table tr {
207
+ display: block;
208
+ }
184
209
  table tr td:not(:first-of-type) {
185
210
  padding-left: 10px;
186
211
  }
212
+ table tr td:not(:last-of-type) {
213
+ width: 100px;
214
+ }
187
215
  }
188
216
 
189
217
  .avatar {
190
- grid-area: avatar;
191
- text-align: center;
218
+ /* grid-area: avatar;
219
+ text-align: center; */
220
+ // width: 287px;
221
+ display: flex;
222
+ justify-content: center;
223
+ align-items: center;
192
224
 
193
225
  DIV.empty {
194
226
  border: 1px solid var(--border);
@@ -207,13 +239,13 @@ export default {
207
239
 
208
240
  .name {
209
241
  grid-area: name;
210
- line-height: math.div($size, 2);
242
+ line-height: 16px;
211
243
  overflow-wrap: anywhere;
212
244
  }
213
245
 
214
246
  .description {
215
247
  grid-area: description;
216
- line-height: math.div($size, 2);
248
+ line-height: 16px;
217
249
  }
218
250
  }
219
251
  </style>
@@ -152,7 +152,7 @@ export default {
152
152
  });
153
153
  }
154
154
 
155
- if (this.value?.metadata?.name && !this.value.displayName) {
155
+ if (this.value?.metadata?.name && !this.value?.displayName) {
156
156
  this.value['displayName'] = this.value.metadata.name;
157
157
  }
158
158
 
@@ -333,7 +333,7 @@ export default {
333
333
  return this.value.listLocation;
334
334
  },
335
335
  ruleClass() {
336
- return `col ${ this.isNamespaced ? 'span-4' : 'span-3' }`;
336
+ return `ruleCls col ${ this.isNamespaced ? 'span-3' : 'span-3' }`;
337
337
  },
338
338
  // Detail View
339
339
  rules() {
@@ -546,7 +546,11 @@ export default {
546
546
  </script>
547
547
 
548
548
  <template>
549
+
550
+ <!-- 加载状态下显示 Loading 组件 -->
549
551
  <Loading v-if="$fetchState.pending" />
552
+
553
+ <!-- 主表单容器,基于 CruResource 封装 -->
550
554
  <CruResource
551
555
  v-else
552
556
  class="receiver"
@@ -560,7 +564,10 @@ export default {
560
564
  @finish="save"
561
565
  @cancel="cancel"
562
566
  >
567
+ <!-- ========== 详情模式显示规则表 ========== -->
563
568
  <template v-if="isDetail">
569
+
570
+ <!-- 当前规则列表 -->
564
571
  <SortableTable
565
572
  key-field="index"
566
573
  :rows="rules"
@@ -611,7 +618,11 @@ export default {
611
618
  />
612
619
  </div>
613
620
  </template>
621
+
622
+ <!-- ========== 表单编辑/创建模式 ========== -->
614
623
  <template v-else>
624
+
625
+ <!-- 名称 & 命名空间 & 描述输入 -->
615
626
  <NameNsDescription
616
627
  :value="value"
617
628
  :namespaced="isNamespaced"
@@ -622,11 +633,15 @@ export default {
622
633
  :rules="{ name: fvGetAndReportPathRules('displayName') }"
623
634
  @update:value="$emit('input', $event)"
624
635
  />
636
+
637
+ <!-- Rancher 相关的默认选项设置 -->
625
638
  <div
626
639
  v-if="isRancherType"
627
640
  class="row"
628
641
  >
629
642
  <div class="col span-6">
643
+
644
+ <!-- 默认角色选项 -->
630
645
  <RadioGroup
631
646
  v-model:value="defaultValue"
632
647
  name="storageSource"
@@ -637,6 +652,8 @@ export default {
637
652
  :mode="mode"
638
653
  />
639
654
  </div>
655
+
656
+ <!-- 锁定角色模板选项 -->
640
657
  <div
641
658
  v-if="isRancherRoleTemplate"
642
659
  class="col span-6"
@@ -653,17 +670,25 @@ export default {
653
670
  </div>
654
671
  </div>
655
672
  <div class="spacer" />
673
+
674
+ <!-- ========== 选项卡容器 ========== -->
656
675
  <Tabbed :side-tabs="true">
676
+
677
+ <!-- ---------- 授权资源 Tab ---------- -->
657
678
  <Tab
658
679
  name="grant-resources"
659
680
  :label="t('rbac.roletemplate.tabs.grantResources.label')"
660
681
  :weight="1"
661
682
  >
683
+
684
+ <!-- 校验错误展示 -->
662
685
  <Error
663
686
  :value="value.rules"
664
687
  :rules="fvGetAndReportPathRules('rules')"
665
688
  as-banner
666
689
  />
690
+
691
+ <!-- 规则编辑列表 -->
667
692
  <ArrayList
668
693
  v-model:value="value.rules"
669
694
  label="Resources"
@@ -673,17 +698,19 @@ export default {
673
698
  :default-add-value="defaultRule"
674
699
  :initial-empty-row="true"
675
700
  :show-header="true"
676
- add-label="Add Resource"
701
+ add-label="添加资源"
677
702
  :mode="mode"
678
703
  >
704
+
705
+ <!-- 列表头部 -->
679
706
  <template #column-headers>
680
707
  <div class="column-headers row">
681
- <div :class="ruleClass">
708
+ <div class="arrayListCls" :class="ruleClass">
682
709
  <span class="text-label">{{ t('rbac.roletemplate.tabs.grantResources.tableHeaders.verbs') }}
683
710
  <span class="required">*</span>
684
711
  </span>
685
712
  </div>
686
- <div :class="ruleClass">
713
+ <div class="arrayListCls" :class="ruleClass">
687
714
  <span class="text-label">
688
715
  {{ t('rbac.roletemplate.tabs.grantResources.tableHeaders.resources') }}
689
716
  <i
@@ -696,7 +723,7 @@ export default {
696
723
  >*</span>
697
724
  </span>
698
725
  </div>
699
- <div :class="ruleClass">
726
+ <div class="arrayListCls" :class="ruleClass">
700
727
  <span class="text-label">{{ t('rbac.roletemplate.tabs.grantResources.tableHeaders.apiGroups') }}</span>
701
728
  </div>
702
729
  <div
@@ -707,9 +734,13 @@ export default {
707
734
  </div>
708
735
  </div>
709
736
  </template>
737
+
738
+ <!-- 列内容渲染 -->
710
739
  <template #columns="props">
711
740
  <div class="columns row mr-20">
712
- <div :class="ruleClass">
741
+
742
+ <!-- 动作(verbs)选择 -->
743
+ <div class="arrayListCls" :class="ruleClass">
713
744
  <!-- Select verbs -->
714
745
  <Select
715
746
  :value="props.row.value.verbs"
@@ -725,8 +756,11 @@ export default {
725
756
  @update:value="updateSelectValue(props.row.value, 'verbs', $event)"
726
757
  />
727
758
  </div>
728
- <div :class="ruleClass">
759
+
760
+ <!-- 资源(resources)选择 -->
761
+ <div class="arrayListCls" :class="ruleClass">
729
762
  <Select
763
+ style="width: auto;"
730
764
  :value="getRule('resources', props.row.value)"
731
765
  :disabled="isBuiltin"
732
766
  :options="resourceOptions"
@@ -740,7 +774,9 @@ export default {
740
774
  @createdListItem="setRule('resources', props.row.value, $event)"
741
775
  />
742
776
  </div>
743
- <div :class="ruleClass">
777
+
778
+ <!-- API Groups 输入 -->
779
+ <div class="arrayListCls" :class="ruleClass">
744
780
  <LabeledInput
745
781
  :value="getRule('apiGroups', props.row.value)"
746
782
  :disabled="isBuiltin"
@@ -749,7 +785,10 @@ export default {
749
785
  @input="setRule('apiGroups', props.row.value, $event.target.value)"
750
786
  />
751
787
  </div>
788
+
789
+ <!-- 非命名空间 URL 输入(仅非命名空间模式显示) -->
752
790
  <div
791
+ class="arrayListCls"
753
792
  v-if="!isNamespaced"
754
793
  :class="ruleClass"
755
794
  >
@@ -776,10 +815,12 @@ export default {
776
815
  </template>
777
816
  </ArrayList>
778
817
  </Tab>
818
+
819
+ <!-- ---------- 继承角色模板 Tab(仅 Rancher 角色模板可用) ---------- -->
779
820
  <Tab
780
821
  v-if="isRancherRoleTemplate"
781
822
  name="inherit-from"
782
- label="Inherit From"
823
+ label="继承表单"
783
824
  :weight="0"
784
825
  >
785
826
  <ArrayList
@@ -788,7 +829,7 @@ export default {
788
829
  :remove-allowed="!isBuiltin"
789
830
  :add-allowed="!isBuiltin"
790
831
  label="Resources"
791
- add-label="Add Resource"
832
+ add-label="添加资源"
792
833
  :mode="mode"
793
834
  >
794
835
  <template #columns="props">
@@ -819,13 +860,19 @@ export default {
819
860
  </template>
820
861
 
821
862
  <style lang="scss" scoped>
863
+ .arrayListCls {
864
+ min-width: 360px;
865
+ }
866
+ .ruleCls {
867
+ margin-right: 10px;
868
+ }
822
869
  .required {
823
870
  color: var(--error);
824
871
  }
825
872
 
826
873
  :deep() {
827
874
  .column-headers {
828
- margin-right: 75px;
875
+ margin-right: 95px;
829
876
  margin-bottom: 5px;
830
877
  }
831
878
 
@@ -835,7 +882,6 @@ export default {
835
882
  .remove {
836
883
  display: flex;
837
884
  flex-direction: column;
838
- justify-content: center;
839
885
  align-items: flex-end;
840
886
  }
841
887
  }
@@ -843,8 +889,17 @@ export default {
843
889
  .columns {
844
890
  .col > .unlabeled-select:not(.taggable) {
845
891
  // override the odd padding-top from shell/assets/styles/global/_select.scss
846
- padding: $unlabaled-select-padding
892
+ /* padding: $unlabaled-select-padding */
893
+ }
894
+ }
895
+ }
896
+
897
+ .columns {
898
+ :deep() {
899
+ .unlabeled-select {
900
+ width: auto;
847
901
  }
848
902
  }
903
+
849
904
  }
850
905
  </style>