dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.60

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 (348) 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 +19 -0
  43. package/assets/images/logo.png +0 -0
  44. package/assets/images/pl/dark/logo.png +0 -0
  45. package/assets/images/pl/half-logo.svg +2 -23
  46. package/assets/images/pl/harvester.png +0 -0
  47. package/assets/images/pl/logo.png +0 -0
  48. package/assets/images/promp-yellow.svg +5 -0
  49. package/assets/images/user.png +0 -0
  50. package/assets/styles/all.scss +83 -0
  51. package/assets/styles/app.scss +5 -0
  52. package/assets/styles/base/_basic.scss +2 -2
  53. package/assets/styles/base/_helpers.scss +1 -1
  54. package/assets/styles/base/_mixins.scss +1 -1
  55. package/assets/styles/base/_typography.scss +2 -1
  56. package/assets/styles/base/_variables.scss +14 -7
  57. package/assets/styles/fonts/_icons.scss +3 -2
  58. package/assets/styles/global/_button.scss +44 -26
  59. package/assets/styles/global/_columns.scss +3 -1
  60. package/assets/styles/global/_form.scss +46 -13
  61. package/assets/styles/global/_labeled-input.scss +54 -26
  62. package/assets/styles/global/_layout.scss +8 -3
  63. package/assets/styles/global/_select.scss +25 -17
  64. package/assets/styles/global/_table.scss +7 -1
  65. package/assets/styles/global/_tooltip.scss +60 -8
  66. package/assets/styles/themes/_dark.scss +3 -0
  67. package/assets/styles/themes/_light.scss +69 -46
  68. package/assets/styles/vendor/vue-select.scss +24 -10
  69. package/assets/translations/en-us.yaml +92 -4
  70. package/assets/translations/zh-hans.yaml +656 -206
  71. package/components/ActionDropdown.vue +2 -1
  72. package/components/ActionMenu.vue +2 -2
  73. package/components/ActionMenuShell.vue +2 -0
  74. package/components/AppModal.vue +46 -5
  75. package/components/BrandImage.vue +1 -0
  76. package/components/ButtonDropdown.vue +28 -4
  77. package/components/ButtonMultiAction.vue +1 -0
  78. package/components/ClusterIconMenu.vue +2 -2
  79. package/components/CodeMirror.vue +26 -10
  80. package/components/ConsumptionGauge.vue +24 -5
  81. package/components/ContainerResourceLimit.vue +2 -2
  82. package/components/CopyToClipboard.vue +15 -0
  83. package/components/CruResource.vue +12 -10
  84. package/components/CruResourceFooter.vue +2 -2
  85. package/components/DashboardOptions.vue +29 -17
  86. package/components/DotState.vue +84 -0
  87. package/components/Drawer/Chrome.vue +2 -2
  88. package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +30 -27
  89. package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
  90. package/components/Drawer/ResourceDetailDrawer/index.vue +5 -4
  91. package/components/ExplorerMembers.vue +28 -4
  92. package/components/ExplorerProjectsNamespaces.vue +19 -5
  93. package/components/GlobalRoleBindings.vue +23 -4
  94. package/components/GrafanaDashboard.vue +4 -4
  95. package/components/GrowlManager.vue +3 -1
  96. package/components/HardwareResourceGauge.vue +39 -3
  97. package/components/IndentedPanel.vue +4 -10
  98. package/components/InfoBox.vue +3 -3
  99. package/components/InputOrDisplay.vue +28 -2
  100. package/components/LabelValue.vue +20 -1
  101. package/components/ModalWithCard.vue +12 -3
  102. package/components/PodSecurityAdmission.vue +2 -2
  103. package/components/PromptModal.vue +1 -1
  104. package/components/PromptRemove.vue +53 -12
  105. package/components/RelatedResources.vue +3 -0
  106. package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +1 -3
  107. package/components/Resource/Detail/Metadata/KeyValue.vue +8 -4
  108. package/components/Resource/Detail/Metadata/index.vue +3 -1
  109. package/components/Resource/Detail/TitleBar/Title.vue +4 -3
  110. package/components/Resource/Detail/TitleBar/Top.vue +2 -0
  111. package/components/Resource/Detail/TitleBar/composables.ts +16 -1
  112. package/components/Resource/Detail/TitleBar/index.vue +125 -27
  113. package/components/ResourceDetail/Masthead/index.vue +1 -1
  114. package/components/ResourceDetail/Masthead/latest.vue +1 -1
  115. package/components/ResourceDetail/Masthead/legacy.vue +183 -39
  116. package/components/ResourceDetail/legacy.vue +47 -29
  117. package/components/ResourceList/Masthead.vue +222 -54
  118. package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
  119. package/components/ResourceTable.vue +40 -2
  120. package/components/SideNav.vue +74 -20
  121. package/components/SingleClusterInfo.vue +2 -1
  122. package/components/SortableTable/THead.vue +79 -4
  123. package/components/SortableTable/index.vue +1053 -464
  124. package/components/SortableTable/paging.js +26 -16
  125. package/components/SortableTable/selection.js +2 -2
  126. package/components/Tabbed/Tab.vue +3 -3
  127. package/components/Tabbed/index.vue +53 -30
  128. package/components/YamlEditor.vue +0 -1
  129. package/components/auth/Principal.vue +51 -19
  130. package/components/auth/RoleDetailEdit.vue +69 -14
  131. package/components/auth/SelectPrincipal.vue +1 -0
  132. package/components/breadcrumb/index.vue +119 -0
  133. package/components/form/ArrayList.vue +177 -152
  134. package/components/form/ArrayListGrouped.vue +13 -3
  135. package/components/form/ArrayListSelect.vue +1 -1
  136. package/components/form/BannerSettings.vue +64 -59
  137. package/components/form/ChangePassword.vue +5 -5
  138. package/components/form/ClusterAppearance.vue +4 -3
  139. package/components/form/ColorInput.vue +32 -8
  140. package/components/form/Command.vue +4 -5
  141. package/components/form/Conditions.vue +15 -1
  142. package/components/form/Footer.vue +12 -8
  143. package/components/form/HealthCheck.vue +0 -2
  144. package/components/form/HookOption.vue +87 -58
  145. package/components/form/InputWithSelect.vue +8 -4
  146. package/components/form/KeyValue.vue +66 -8
  147. package/components/form/LabeledSelect.vue +216 -242
  148. package/components/form/Labels.vue +4 -4
  149. package/components/form/MatchExpressions.vue +28 -11
  150. package/components/form/Members/ClusterMembershipEditor.vue +1 -1
  151. package/components/form/Members/ClusterPermissionsEditor.vue +61 -43
  152. package/components/form/Members/MembershipEditor.vue +4 -4
  153. package/components/form/Members/ProjectMembershipEditor.vue +1 -1
  154. package/components/form/NameNsDescription.vue +76 -21
  155. package/components/form/Networking.vue +6 -9
  156. package/components/form/NodeAffinity.vue +29 -28
  157. package/components/form/Password.vue +16 -7
  158. package/components/form/PodAffinity.vue +24 -25
  159. package/components/form/Probe.vue +15 -11
  160. package/components/form/ProjectMemberEditor.vue +66 -48
  161. package/components/form/ResourceQuota/Namespace.vue +4 -4
  162. package/components/form/ResourceQuota/NamespaceRow.vue +26 -23
  163. package/components/form/ResourceQuota/Project.vue +4 -4
  164. package/components/form/ResourceQuota/ProjectRow.vue +38 -35
  165. package/components/form/ResourceSelector.vue +1 -1
  166. package/components/form/SecretSelector.vue +24 -23
  167. package/components/form/Security.vue +1 -3
  168. package/components/form/Select.vue +12 -3
  169. package/components/form/ServiceNameSelect.vue +2 -5
  170. package/components/form/ServicePorts.vue +149 -75
  171. package/components/form/SimpleSecretSelector.vue +29 -9
  172. package/components/form/Taints.vue +2 -1
  173. package/components/form/Tolerations.vue +13 -9
  174. package/components/form/UnitInput.vue +8 -3
  175. package/components/form/ValueFromResource.vue +110 -96
  176. package/components/form/WorkloadPorts.vue +143 -123
  177. package/components/formatter/BadgeStateFormatter.vue +8 -5
  178. package/components/formatter/LiveDate.vue +3 -3
  179. package/components/formatter/WorkloadHealthScale.vue +4 -3
  180. package/components/nav/Favorite.vue +5 -1
  181. package/components/nav/Group.vue +139 -99
  182. package/components/nav/Header.vue +127 -150
  183. package/components/nav/HeaderPageActionMenu.vue +1 -0
  184. package/components/nav/NamespaceFilter.vue +34 -36
  185. package/components/nav/TopLevelMenu.vue +62 -25
  186. package/components/nav/Type.vue +73 -43
  187. package/composables/useClickOutside.ts +1 -1
  188. package/config/menuRouteMap.js +10 -0
  189. package/config/private-label.js +15 -11
  190. package/config/product/auth.js +17 -7
  191. package/config/product/explorer.js +32 -10
  192. package/config/product/manager.js +28 -17
  193. package/config/product/settings.js +19 -9
  194. package/config/product/uiplugins.js +13 -10
  195. package/config/router/navigation-guards/index.js +61 -3
  196. package/config/settings.ts +28 -0
  197. package/config/table-headers.js +3 -2
  198. package/detail/node.vue +28 -23
  199. package/dialog/AddCustomBadgeDialog.vue +17 -9
  200. package/dialog/ForceMachineRemoveDialog.vue +2 -2
  201. package/dialog/RollbackWorkloadDialog.vue +1 -1
  202. package/dialog/ScalePoolDownDialog.vue +2 -2
  203. package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
  204. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +9 -6
  205. package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
  206. package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
  207. package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
  208. package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
  209. package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
  210. package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
  211. package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
  212. package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
  213. package/edit/configmap.vue +4 -0
  214. package/edit/logging-flow/index.vue +1 -2
  215. package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +3 -3
  216. package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +19 -19
  217. package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +23 -23
  218. package/edit/logging.banzaicloud.io.output/providers/datadog.vue +19 -19
  219. package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +14 -14
  220. package/edit/logging.banzaicloud.io.output/providers/forward.vue +12 -12
  221. package/edit/logging.banzaicloud.io.output/providers/gcs.vue +23 -23
  222. package/edit/logging.banzaicloud.io.output/providers/gelf.vue +6 -6
  223. package/edit/logging.banzaicloud.io.output/providers/kafka.vue +10 -10
  224. package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +8 -8
  225. package/edit/logging.banzaicloud.io.output/providers/logdna.vue +17 -17
  226. package/edit/logging.banzaicloud.io.output/providers/logz.vue +7 -7
  227. package/edit/logging.banzaicloud.io.output/providers/loki.vue +12 -12
  228. package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +3 -3
  229. package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +14 -14
  230. package/edit/logging.banzaicloud.io.output/providers/redis.vue +6 -6
  231. package/edit/logging.banzaicloud.io.output/providers/s3.vue +23 -23
  232. package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +13 -13
  233. package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +2 -2
  234. package/edit/logging.banzaicloud.io.output/providers/syslog.vue +54 -54
  235. package/edit/management.cattle.io.user.vue +17 -4
  236. package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
  237. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +31 -31
  238. package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +36 -12
  239. package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
  240. package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
  241. package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
  242. package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
  243. package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
  244. package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
  245. package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
  246. package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
  247. package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
  248. package/edit/namespace.vue +1 -2
  249. package/edit/networking.k8s.io.ingress/Certificate.vue +14 -5
  250. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
  251. package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
  252. package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
  253. package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
  254. package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
  255. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
  256. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
  257. package/edit/persistentvolume/index.vue +3 -1
  258. package/edit/persistentvolumeclaim.vue +2 -0
  259. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +1 -1
  260. package/edit/secret/index.vue +2 -2
  261. package/edit/service.vue +4 -1
  262. package/edit/storage.k8s.io.storageclass/index.vue +10 -8
  263. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
  264. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
  265. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
  266. package/edit/token.vue +31 -12
  267. package/edit/workload/Job.vue +31 -34
  268. package/edit/workload/Upgrading.vue +5 -5
  269. package/edit/workload/index.vue +22 -18
  270. package/edit/workload/storage/Mount.vue +1 -0
  271. package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
  272. package/edit/workload/storage/azureDisk.vue +14 -10
  273. package/edit/workload/storage/azureFile.vue +9 -7
  274. package/edit/workload/storage/csi/index.vue +6 -9
  275. package/edit/workload/storage/emptyDir.vue +7 -5
  276. package/edit/workload/storage/gcePersistentDisk.vue +9 -7
  277. package/edit/workload/storage/hostPath.vue +7 -5
  278. package/edit/workload/storage/nfs.vue +8 -6
  279. package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
  280. package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +20 -15
  281. package/edit/workload/storage/secret.vue +9 -6
  282. package/edit/workload/storage/vsphereVolume.vue +11 -7
  283. package/initialize/app-extended.js +7 -1
  284. package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +8 -6
  285. package/list/management.cattle.io.setting.vue +22 -13
  286. package/list/management.cattle.io.user.vue +7 -3
  287. package/list/namespace.vue +3 -0
  288. package/list/provisioning.cattle.io.cluster.vue +6 -7
  289. package/mixins/brand.js +17 -0
  290. package/mixins/create-edit-view/impl.js +10 -0
  291. package/models/provisioning.cattle.io.cluster.js +19 -18
  292. package/models/workload.js +2 -2
  293. package/package.json +1 -1
  294. package/pages/account/index.vue +93 -58
  295. package/pages/account/pri.vue +229 -0
  296. package/pages/auth/login.vue +220 -52
  297. package/pages/auth/setup.vue +175 -33
  298. package/pages/c/_cluster/_product/namespaces.vue +5 -5
  299. package/pages/c/_cluster/auth/roles/index.vue +83 -8
  300. package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
  301. package/pages/c/_cluster/explorer/index.vue +2 -1
  302. package/pages/c/_cluster/explorer/tools/index.vue +6 -6
  303. package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
  304. package/pages/c/_cluster/settings/banners.vue +174 -102
  305. package/pages/c/_cluster/settings/brand.vue +350 -302
  306. package/pages/c/_cluster/settings/performance.vue +61 -38
  307. package/pages/home.vue +119 -37
  308. package/pages/prefs.vue +27 -25
  309. package/pkg/tsconfig.json +9 -9
  310. package/pkg/vue.config.js +1 -1
  311. package/plugins/dashboard-store/actions.js +1 -1
  312. package/plugins/dashboard-store/resource-class.js +28 -27
  313. package/promptRemove/mixin/roleDeletionCheck.js +2 -2
  314. package/public/index.html +4 -4
  315. package/rancher-components/BadgeState/BadgeState.vue +38 -55
  316. package/rancher-components/Banner/Banner.vue +25 -9
  317. package/rancher-components/Card/Card.vue +7 -8
  318. package/rancher-components/Form/Checkbox/Checkbox.vue +4 -0
  319. package/rancher-components/Form/LabeledInput/LabeledInput.vue +42 -3
  320. package/rancher-components/Form/Radio/RadioButton.vue +35 -11
  321. package/rancher-components/Form/Radio/RadioGroup.vue +22 -6
  322. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
  323. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -0
  324. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +41 -4
  325. package/rancher-components/RcDropdown/RcDropdown.vue +35 -7
  326. package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
  327. package/rancher-components/RcDropdown/RcDropdownMenu.vue +12 -6
  328. package/rancher-components/RcDropdown/types.ts +1 -0
  329. package/rancher-components/StringList/StringList.vue +1 -1
  330. package/scripts/build-pkg.sh +18 -23
  331. package/scripts/publish-shell.sh +1 -1
  332. package/static/favicon.ico +0 -0
  333. package/static/favicon.png +0 -0
  334. package/static/loading-indicator.html +3 -3
  335. package/store/i18n.js +6 -2
  336. package/store/modal.ts +3 -3
  337. package/store/prefs.js +11 -4
  338. package/store/type-map.js +30 -2
  339. package/types/shell/index.d.ts +86 -97
  340. package/utils/error.js +109 -8
  341. package/utils/errorTranslate.json +1740 -0
  342. package/utils/errorTranslateNew.json +39 -0
  343. package/utils/roleFiltering.js +33 -0
  344. package/utils/router.js +21 -0
  345. package/utils/select.js +26 -3
  346. package/utils/string.js +8 -5
  347. package/utils/title.ts +1 -1
  348. package/vue.config.js +1 -1
@@ -115,25 +115,26 @@ export default class ProvCluster extends SteveModel {
115
115
  const actions = [
116
116
  // Note: Actions are not supported in the Steve API, so we check
117
117
  // available actions for RKE1 clusters, but not RKE2 clusters.
118
+ // {
119
+ // action: 'openShell',
120
+ // label: this.$rootGetters['i18n/t']('nav.shell'),
121
+ // icon: 'icon icon-terminal',
122
+ // enabled: !!this.mgmt?.links.shell && ready,
123
+ // }, {
124
+ // action: 'downloadKubeConfig',
125
+ // bulkAction: 'downloadKubeConfigBulk',
126
+ // label: this.$rootGetters['i18n/t']('nav.kubeconfig.download'),
127
+ // icon: 'icon icon-download',
128
+ // bulkable: true,
129
+ // enabled: this.mgmt?.hasAction('generateKubeconfig'),
130
+ // }, {
131
+ // action: 'copyKubeConfig',
132
+ // label: this.t('cluster.copyConfig'),
133
+ // bulkable: false,
134
+ // enabled: this.mgmt?.hasAction('generateKubeconfig'),
135
+ // icon: 'icon icon-copy',
136
+ // },
118
137
  {
119
- action: 'openShell',
120
- label: this.$rootGetters['i18n/t']('nav.shell'),
121
- icon: 'icon icon-terminal',
122
- enabled: !!this.mgmt?.links.shell && ready,
123
- }, {
124
- action: 'downloadKubeConfig',
125
- bulkAction: 'downloadKubeConfigBulk',
126
- label: this.$rootGetters['i18n/t']('nav.kubeconfig.download'),
127
- icon: 'icon icon-download',
128
- bulkable: true,
129
- enabled: this.mgmt?.hasAction('generateKubeconfig'),
130
- }, {
131
- action: 'copyKubeConfig',
132
- label: this.t('cluster.copyConfig'),
133
- bulkable: false,
134
- enabled: this.mgmt?.hasAction('generateKubeconfig'),
135
- icon: 'icon icon-copy',
136
- }, {
137
138
  action: 'snapshotAction',
138
139
  label: this.$rootGetters['i18n/t']('nav.takeSnapshot'),
139
140
  icon: 'icon icon-snapshot',
@@ -199,8 +199,8 @@ export default class Workload extends WorkloadService {
199
199
  }
200
200
 
201
201
  this.$dispatch('growl/error', {
202
- title: 'Unavailable',
203
- message: 'There are no running pods to execute a shell in.'
202
+ title: '不可用',
203
+ message: '没有正在运行的 Pod 可用来执行 Shell。'
204
204
  }, { root: true });
205
205
  }
206
206
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dashboard-shell-shell",
3
- "version": "3.0.5-test.6",
3
+ "version": "3.0.5-test.60",
4
4
  "description": "Rancher Dashboard Shell",
5
5
  "repository": "https://github.com/rancherlabs/dashboard",
6
6
  "license": "Apache-2.0",
@@ -151,48 +151,40 @@ export default {
151
151
  <template>
152
152
  <Loading v-if="$fetchState.pending" />
153
153
  <div v-else>
154
- <BackLink :link="backLink" />
155
- <h1>
156
- <TabTitle breadcrumb="vendor-only">
157
- {{ t('accountAndKeys.title') }}
158
- </TabTitle>
159
- </h1>
160
-
161
- <h2 v-t="'accountAndKeys.account.title'" />
162
- <div class="account">
163
- <Principal
164
- :value="principal.id"
165
- :use-muted="false"
166
- :show-labels="true"
167
- />
168
- <div>
169
- <button
170
- v-if="canChangePassword"
171
- role="button"
172
- :aria-label="t('accountAndKeys.account.change')"
173
- type="button"
174
- class="btn role-primary"
175
- data-testid="account_change_password"
176
- @click="showChangePasswordDialog"
177
- >
178
- {{ t("accountAndKeys.account.change") }}
179
- </button>
154
+ <div style="display: flex;align-items: center;margin-bottom: 20px;">
155
+ <!-- <BackLink class="backLinkCls" :link="backLink" /> -->
156
+ <div style="font-size: 26px;">
157
+ <TabTitle breadcrumb="vendor-only">
158
+ {{ t('accountAndKeys.title') }}
159
+ </TabTitle>
180
160
  </div>
181
161
  </div>
182
162
 
183
- <hr role="none">
184
- <div class="keys-header">
185
- <div>
186
- <h2 v-t="'accountAndKeys.apiKeys.title'" />
187
- <div class="api-url">
188
- <span>{{ t("accountAndKeys.apiKeys.apiEndpoint") }}</span>
189
- <CopyToClipboardText
190
- :aria-label="t('accountAndKeys.apiKeys.copyApiEnpoint')"
191
- :text="apiUrl"
192
- />
163
+ <div class="account_card mb-20">
164
+ <h5 v-t="'accountAndKeys.account.title'" />
165
+ <div class="account">
166
+ <Principal
167
+ :userLogo="true"
168
+ :userLogoSize="79"
169
+ :value="principal.id"
170
+ :use-muted="false"
171
+ :show-labels="true"
172
+ />
173
+ <div>
174
+ <button
175
+ v-if="canChangePassword"
176
+ role="button"
177
+ :aria-label="t('accountAndKeys.account.change')"
178
+ type="button"
179
+ class="btn role-primary"
180
+ data-testid="account_change_password"
181
+ @click="showChangePasswordDialog"
182
+ >
183
+ {{ t("accountAndKeys.account.change") }}
184
+ </button>
193
185
  </div>
194
186
  </div>
195
- <button
187
+ <!-- <button
196
188
  v-if="apiKeySchema"
197
189
  role="button"
198
190
  :aria-label="t('accountAndKeys.apiKeys.add.label')"
@@ -201,33 +193,71 @@ export default {
201
193
  @click="addKey"
202
194
  >
203
195
  {{ t('accountAndKeys.apiKeys.add.label') }}
204
- </button>
205
- </div>
206
- <div
207
- v-if="apiKeySchema"
208
- class="keys"
209
- >
210
- <ResourceTable
211
- :schema="apiKeySchema"
212
- :rows="apiKeys"
213
- :headers="apiKeyheaders"
214
- key-field="id"
215
- data-testid="api_keys_list"
216
- :search="true"
217
- :row-actions="true"
218
- :table-actions="true"
219
- />
196
+ </button> -->
220
197
  </div>
221
- <div v-else>
222
- <Banner
223
- color="warning"
224
- :label="t('accountAndKeys.apiKeys.notAllowed')"
225
- />
198
+
199
+ <div class="account_card mb-20">
200
+ <div class="keys-header">
201
+ <div>
202
+ <h5 v-t="'accountAndKeys.apiKeys.title'" />
203
+ <div class="api-url">
204
+ <span>{{ t("accountAndKeys.apiKeys.apiEndpoint") }}</span>
205
+ <CopyToClipboardText
206
+ :aria-label="t('accountAndKeys.apiKeys.copyApiEnpoint')"
207
+ :text="apiUrl"
208
+ />
209
+ </div>
210
+ </div>
211
+ </div>
212
+ <div
213
+ v-if="apiKeySchema"
214
+ class="keys"
215
+ >
216
+ <ResourceTable
217
+ :schema="apiKeySchema"
218
+ :rows="apiKeys"
219
+ :headers="apiKeyheaders"
220
+ key-field="id"
221
+ data-testid="api_keys_list"
222
+ :search="true"
223
+ :row-actions="true"
224
+ :table-actions="true"
225
+ >
226
+ <template #header-right>
227
+ <button
228
+ style="margin-right: 10px;"
229
+ v-if="apiKeySchema"
230
+ role="button"
231
+ :aria-label="t('accountAndKeys.apiKeys.add.label')"
232
+ class="btn role-primary add"
233
+ data-testid="account_create_api_keys"
234
+ @click="addKey"
235
+ >
236
+ {{ t('accountAndKeys.apiKeys.add.label') }}
237
+ </button>
238
+ </template>
239
+ </ResourceTable>
240
+ </div>
241
+ <div v-else>
242
+ <Banner
243
+ color="warning"
244
+ :label="t('accountAndKeys.apiKeys.notAllowed')"
245
+ />
246
+ </div>
226
247
  </div>
227
248
  </div>
228
249
  </template>
229
250
 
230
251
  <style lang='scss' scoped>
252
+ .account_card {
253
+ border: 1px solid #d7d7d7;
254
+ padding: 20px;
255
+ box-sizing: border-box;
256
+ }
257
+ :deep() .back-link {
258
+ font-size: 26px;
259
+ margin: 0 20px 0 0 !important;
260
+ }
231
261
  hr {
232
262
  margin: 20px 0;
233
263
  }
@@ -237,6 +267,10 @@ export default {
237
267
  justify-content: space-between
238
268
  }
239
269
 
270
+ .principal .avatar {
271
+ width: 287px !important;
272
+ }
273
+
240
274
  .keys-header {
241
275
  display: flex;
242
276
  div {
@@ -254,6 +288,7 @@ export default {
254
288
 
255
289
  .api-url {
256
290
  display: flex;
291
+ margin: 20px 0;
257
292
 
258
293
  > span {
259
294
  margin-right: 6px;
@@ -0,0 +1,229 @@
1
+ <script>
2
+ import { NORMAN } from '@shell/config/types';
3
+
4
+ export default {
5
+ props: {
6
+ value: {
7
+ type: String,
8
+ required: true,
9
+ },
10
+
11
+ useMuted: {
12
+ type: Boolean,
13
+ default: true,
14
+ },
15
+
16
+ showLabels: {
17
+ type: Boolean,
18
+ default: false,
19
+ },
20
+ isShowPass: {
21
+ type: Boolean,
22
+ default: false,
23
+ }
24
+ },
25
+
26
+ async fetch() {
27
+ this.principal = this.$store.getters['rancher/byId'](NORMAN.PRINCIPAL, this.value);
28
+
29
+ if ( this.principal ) {
30
+ return;
31
+ }
32
+
33
+ const principalId = escape(this.value).replace(/\//g, '%2F');
34
+
35
+ try {
36
+ this.principal = await this.$store.dispatch('rancher/find', {
37
+ type: NORMAN.PRINCIPAL,
38
+ id: this.value,
39
+ opt: { url: `/v3/principals/${ principalId }` }
40
+ });
41
+ } catch (e) {
42
+ console.error('Failed to fetch principal', this.value, principalId); // eslint-disable-line no-console
43
+ }
44
+ },
45
+
46
+ data() {
47
+ // Load from cache immediately if possible
48
+ return { principal: null };
49
+ },
50
+
51
+ computed: {
52
+ showBoth() {
53
+ const p = this.principal;
54
+
55
+ return p.name && p.loginName && p.name.trim().toLowerCase() !== p.loginName.trim().toLowerCase();
56
+ }
57
+ },
58
+ };
59
+ </script>
60
+
61
+ <template>
62
+ <div
63
+ class="principal"
64
+ :class="{'showLabels': showLabels}"
65
+ >
66
+ <template v-if="!principal && $fetchState.pending">
67
+ <div class="avatar">
68
+ <div class="empty">
69
+ <i class="icon icon-spinner icon-lg" />
70
+ </div>
71
+ </div>
72
+ <div
73
+ v-clean-html="t('principal.loading', null, true)"
74
+ class="name"
75
+ :class="{'text-muted': useMuted}"
76
+ />
77
+ <div class="description" />
78
+ </template>
79
+
80
+ <template v-else-if="principal">
81
+ <div class="avatar">
82
+ <img
83
+ src="@shell/assets/images/user.png"
84
+ >
85
+ </div>
86
+ <div
87
+ v-if="showLabels"
88
+ class="name"
89
+ >
90
+ <table>
91
+ <tr class="mb-10">
92
+ <td>{{ t('principal.name') }}: </td><td>{{ principal.name || principal.loginName }}</td>
93
+ </tr>
94
+ <tr class="mb-10">
95
+ <td>{{ t('principal.loginName') }}: </td><td>{{ principal.loginName }}</td>
96
+ </tr>
97
+ <tr
98
+ v-if="isShowPass"
99
+ class="mb-10"
100
+ >
101
+ <td>修改密码: </td><td>****** <slot name="edit" /></td>
102
+ </tr>
103
+ <tr><td>{{ t('principal.type') }}: </td><td>{{ principal.displayType }}</td></tr>
104
+ </table>
105
+ </div>
106
+ <template v-else>
107
+ <div class="name">
108
+ <template v-if="showBoth">
109
+ {{ principal.name }}
110
+ <span
111
+ v-if="principal.loginName"
112
+ :class="{'text-muted': useMuted}"
113
+ >({{ principal.loginName }})</span>
114
+ </template>
115
+ <template v-else-if="principal.name">
116
+ {{ principal.name }}
117
+ </template>
118
+ <template v-else>
119
+ {{ principal.loginName }}
120
+ </template>
121
+ </div>
122
+ <div
123
+ class="description"
124
+ :class="{'text-muted': useMuted}"
125
+ >
126
+ {{ principal.displayType }}
127
+ </div>
128
+ </template>
129
+ </template>
130
+
131
+ <template v-else>
132
+ <div class="avatar">
133
+ <div
134
+ class="empty"
135
+ :class="{'text-muted': useMuted}"
136
+ >
137
+ <i class="icon icon-warning icon-lg" />
138
+ </div>
139
+ </div>
140
+ <div
141
+ v-t="'principal.error'"
142
+ class="name text-error"
143
+ />
144
+ <div
145
+ class="description"
146
+ :class="{'text-muted': useMuted}"
147
+ >
148
+ {{ value }}
149
+ </div>
150
+ </template>
151
+ </div>
152
+ </template>
153
+
154
+ <style lang="scss" scoped>
155
+ $size: 79px;
156
+
157
+ .principal {
158
+ display: grid;
159
+ grid-template-areas:
160
+ "avatar name"
161
+ "avatar description";
162
+ grid-template-columns: $size auto;
163
+ grid-template-rows: auto math.div($size, 2);
164
+ column-gap: 10px;
165
+
166
+ th {
167
+ text-align: left;
168
+ font-weight: normal;
169
+ padding-right: 10px;
170
+ }
171
+
172
+ &.showLabels {
173
+ /* grid-template-areas:
174
+ "avatar name";
175
+ grid-template-columns: 60px auto;
176
+ grid-template-rows: 60px;
177
+ column-gap: 0; */
178
+ display: flex;
179
+ column-gap:0;
180
+ .name {
181
+ display: flex;
182
+ line-height: unset;
183
+ }
184
+ table tr {
185
+ display: block;
186
+ }
187
+ table tr td:not(:first-of-type) {
188
+ padding-left: 10px;
189
+ }
190
+ table tr td:not(:last-of-type) {
191
+ width: 100px;
192
+ }
193
+ }
194
+
195
+ .avatar {
196
+ /* grid-area: avatar;
197
+ text-align: center; */
198
+ width: 287px;
199
+ display: flex;
200
+ justify-content: center;
201
+ align-items: center;
202
+
203
+ DIV.empty {
204
+ border: 1px solid var(--border);
205
+ line-height: $size;
206
+ }
207
+
208
+ IMG {
209
+ width: $size;
210
+ height: $size;
211
+ }
212
+
213
+ DIV.round, IMG.round {
214
+ border-radius: 50%;
215
+ }
216
+ }
217
+
218
+ .name {
219
+ grid-area: name;
220
+ line-height: math.div($size, 2);
221
+ overflow-wrap: anywhere;
222
+ }
223
+
224
+ .description {
225
+ grid-area: description;
226
+ line-height: math.div($size, 2);
227
+ }
228
+ }
229
+ </style>