dashboard-shell-shell 3.0.5-test.8 → 3.0.5-test.80

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 (220) hide show
  1. package/assets/brand/csp/favicon.png +0 -0
  2. package/assets/icons/iconfont.css +4 -1
  3. package/assets/iconsNew/demo.css +539 -0
  4. package/assets/iconsNew/demo.css:Zone.Identifier +0 -0
  5. package/assets/iconsNew/demo_index.html +303 -0
  6. package/assets/iconsNew/demo_index.html:Zone.Identifier +0 -0
  7. package/assets/iconsNew/iconfont.css +43 -0
  8. package/assets/iconsNew/iconfont.css:Zone.Identifier +0 -0
  9. package/assets/iconsNew/iconfont.js +1 -0
  10. package/assets/iconsNew/iconfont.js:Zone.Identifier +0 -0
  11. package/assets/iconsNew/iconfont.json +44 -0
  12. package/assets/iconsNew/iconfont.json:Zone.Identifier +0 -0
  13. package/assets/iconsNew/iconfont.ttf +0 -0
  14. package/assets/iconsNew/iconfont.ttf:Zone.Identifier +0 -0
  15. package/assets/iconsNew/iconfont.woff +0 -0
  16. package/assets/iconsNew/iconfont.woff2 +0 -0
  17. package/assets/iconsNew/iconfont.woff2:Zone.Identifier +0 -0
  18. package/assets/iconsNew/iconfont.woff:Zone.Identifier +0 -0
  19. package/assets/images/login-logo.svg +110 -12
  20. package/assets/images/logo.svg +129 -0
  21. package/assets/images/pl/dark/logo.svg +129 -0
  22. package/assets/images/pl/logo.svg +129 -0
  23. package/assets/styles/all.scss +23 -3
  24. package/assets/styles/app.scss +1 -0
  25. package/assets/styles/base/_helpers.scss +1 -1
  26. package/assets/styles/base/_variables.scss +2 -2
  27. package/assets/styles/fonts/_icons.scss +3 -2
  28. package/assets/styles/global/_button.scss +1 -1
  29. package/assets/styles/global/_form.scss +1 -0
  30. package/assets/styles/global/_select.scss +1 -1
  31. package/assets/styles/global/_tooltip.scss +5 -1
  32. package/assets/styles/themes/_light.scss +3 -3
  33. package/assets/styles/vendor/vue-select.scss +2 -1
  34. package/assets/translations/en-us.yaml +67 -0
  35. package/assets/translations/zh-hans.yaml +226 -24
  36. package/components/ButtonDropdown.vue +3 -1
  37. package/components/ClusterIconMenu.vue +1 -1
  38. package/components/CodeMirror.vue +6 -4
  39. package/components/ConsumptionGauge.vue +1 -1
  40. package/components/ContainerResourceLimit.vue +2 -2
  41. package/components/CruResource.vue +3 -2
  42. package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -19
  43. package/components/Drawer/ResourceDetailDrawer/index.vue +3 -3
  44. package/components/ExplorerMembers.vue +10 -1
  45. package/components/GlobalRoleBindings.vue +69 -114
  46. package/components/PodSecurityAdmission.vue +1 -1
  47. package/components/PromptRemove.vue +23 -1
  48. package/components/RelatedResources.vue +3 -0
  49. package/components/Resource/Detail/TitleBar/composables.ts +16 -1
  50. package/components/Resource/Detail/TitleBar/index.vue +37 -24
  51. package/components/ResourceDetail/Masthead/index.vue +1 -1
  52. package/components/ResourceDetail/Masthead/latest.vue +1 -1
  53. package/components/ResourceDetail/Masthead/legacy.vue +8 -7
  54. package/components/ResourceDetail/legacy.vue +15 -15
  55. package/components/ResourceList/Masthead.vue +16 -15
  56. package/components/ResourceTable.vue +16 -0
  57. package/components/SideNav.vue +21 -21
  58. package/components/SingleClusterInfo.vue +2 -1
  59. package/components/SortableTable/THead.vue +46 -1
  60. package/components/SortableTable/index.vue +54 -18
  61. package/components/Tabbed/index.vue +6 -1
  62. package/components/actionButton/index.vue +649 -0
  63. package/components/auth/Principal.vue +16 -8
  64. package/components/auth/RoleDetailEdit.vue +11 -7
  65. package/components/breadcrumb/index.vue +13 -210
  66. package/components/form/ArrayList.vue +164 -147
  67. package/components/form/ArrayListGrouped.vue +5 -3
  68. package/components/form/ChangePassword.vue +1 -1
  69. package/components/form/ClusterAppearance.vue +4 -3
  70. package/components/form/Command.vue +4 -5
  71. package/components/form/Conditions.vue +15 -1
  72. package/components/form/Footer.vue +1 -0
  73. package/components/form/HealthCheck.vue +0 -2
  74. package/components/form/HookOption.vue +87 -58
  75. package/components/form/InputWithSelect.vue +8 -7
  76. package/components/form/KeyValue.vue +20 -2
  77. package/components/form/LabeledSelect.vue +3 -1
  78. package/components/form/Labels.vue +2 -2
  79. package/components/form/MatchExpressions.vue +4 -4
  80. package/components/form/Members/ClusterMembershipEditor.vue +1 -1
  81. package/components/form/Members/ClusterPermissionsEditor.vue +60 -41
  82. package/components/form/Members/MembershipEditor.vue +4 -4
  83. package/components/form/Members/ProjectMembershipEditor.vue +1 -1
  84. package/components/form/NameNsDescription.vue +3 -2
  85. package/components/form/Networking.vue +6 -9
  86. package/components/form/NodeAffinity.vue +29 -28
  87. package/components/form/PodAffinity.vue +23 -23
  88. package/components/form/Probe.vue +15 -11
  89. package/components/form/ProjectMemberEditor.vue +66 -48
  90. package/components/form/ResourceQuota/Namespace.vue +4 -4
  91. package/components/form/ResourceQuota/NamespaceRow.vue +11 -9
  92. package/components/form/ResourceQuota/Project.vue +4 -4
  93. package/components/form/ResourceQuota/ProjectRow.vue +36 -30
  94. package/components/form/ResourceSelector.vue +1 -1
  95. package/components/form/SecretSelector.vue +24 -23
  96. package/components/form/Security.vue +1 -3
  97. package/components/form/Select.vue +7 -1
  98. package/components/form/ServiceNameSelect.vue +2 -5
  99. package/components/form/ServicePorts.vue +149 -75
  100. package/components/form/Tolerations.vue +13 -9
  101. package/components/form/ValueFromResource.vue +110 -96
  102. package/components/formatter/WorkloadHealthScale.vue +4 -3
  103. package/components/nav/Group.vue +8 -1
  104. package/components/nav/Header.vue +51 -174
  105. package/components/nav/NamespaceFilter.vue +14 -19
  106. package/components/nav/TopLevelMenu.vue +100 -126
  107. package/components/nav/Type.vue +11 -3
  108. package/config/menuRouteMap.js +10 -0
  109. package/config/private-label.js +2 -3
  110. package/config/product/explorer.js +32 -10
  111. package/config/product/manager.js +28 -17
  112. package/config/product/uiplugins.js +13 -10
  113. package/config/router/navigation-guards/index.js +61 -3
  114. package/detail/node.vue +28 -23
  115. package/dialog/AddCustomBadgeDialog.vue +17 -9
  116. package/dialog/RollbackWorkloadDialog.vue +1 -1
  117. package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
  118. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +9 -6
  119. package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
  120. package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
  121. package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
  122. package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
  123. package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
  124. package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
  125. package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
  126. package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
  127. package/edit/configmap.vue +4 -0
  128. package/edit/logging-flow/index.vue +1 -2
  129. package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +3 -3
  130. package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +19 -19
  131. package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +23 -23
  132. package/edit/logging.banzaicloud.io.output/providers/datadog.vue +19 -19
  133. package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +14 -14
  134. package/edit/logging.banzaicloud.io.output/providers/forward.vue +12 -12
  135. package/edit/logging.banzaicloud.io.output/providers/gcs.vue +23 -23
  136. package/edit/logging.banzaicloud.io.output/providers/gelf.vue +6 -6
  137. package/edit/logging.banzaicloud.io.output/providers/kafka.vue +10 -10
  138. package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +8 -8
  139. package/edit/logging.banzaicloud.io.output/providers/logdna.vue +17 -17
  140. package/edit/logging.banzaicloud.io.output/providers/logz.vue +7 -7
  141. package/edit/logging.banzaicloud.io.output/providers/loki.vue +12 -12
  142. package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +3 -3
  143. package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +14 -14
  144. package/edit/logging.banzaicloud.io.output/providers/redis.vue +6 -6
  145. package/edit/logging.banzaicloud.io.output/providers/s3.vue +23 -23
  146. package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +13 -13
  147. package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +2 -2
  148. package/edit/logging.banzaicloud.io.output/providers/syslog.vue +54 -54
  149. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +32 -8
  150. package/edit/monitoring.coreos.com.alertmanagerconfig/types/dingding.vue +32 -0
  151. package/edit/monitoring.coreos.com.alertmanagerconfig/types/message.vue +52 -0
  152. package/edit/monitoring.coreos.com.alertmanagerconfig/types/snmp.vue +45 -0
  153. package/edit/monitoring.coreos.com.alertmanagerconfig/types/work.vue +31 -0
  154. package/edit/networking.k8s.io.ingress/Certificate.vue +14 -5
  155. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
  156. package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
  157. package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
  158. package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
  159. package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
  160. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
  161. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
  162. package/edit/persistentvolume/index.vue +3 -1
  163. package/edit/persistentvolumeclaim.vue +2 -0
  164. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +1 -1
  165. package/edit/secret/index.vue +2 -2
  166. package/edit/service.vue +4 -1
  167. package/edit/storage.k8s.io.storageclass/index.vue +10 -8
  168. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
  169. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
  170. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
  171. package/edit/workload/Job.vue +31 -34
  172. package/edit/workload/Upgrading.vue +5 -5
  173. package/edit/workload/index.vue +19 -15
  174. package/edit/workload/storage/Mount.vue +1 -0
  175. package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
  176. package/edit/workload/storage/azureDisk.vue +14 -10
  177. package/edit/workload/storage/azureFile.vue +9 -7
  178. package/edit/workload/storage/csi/index.vue +6 -9
  179. package/edit/workload/storage/emptyDir.vue +7 -5
  180. package/edit/workload/storage/gcePersistentDisk.vue +9 -7
  181. package/edit/workload/storage/hostPath.vue +7 -5
  182. package/edit/workload/storage/nfs.vue +8 -6
  183. package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
  184. package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +20 -15
  185. package/edit/workload/storage/secret.vue +9 -6
  186. package/edit/workload/storage/vsphereVolume.vue +11 -7
  187. package/initialize/app-extended.js +7 -1
  188. package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +8 -6
  189. package/mixins/create-edit-view/impl.js +10 -0
  190. package/models/provisioning.cattle.io.cluster.js +19 -18
  191. package/models/workload.js +2 -2
  192. package/package.json +1 -1
  193. package/pages/account/index.vue +93 -58
  194. package/pages/auth/login.vue +25 -28
  195. package/pages/auth/setup.vue +36 -17
  196. package/pages/c/_cluster/auth/roles/index.vue +27 -3
  197. package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
  198. package/pages/c/_cluster/explorer/index.vue +2 -1
  199. package/pages/c/_cluster/explorer/tools/index.vue +6 -6
  200. package/pages/home.vue +55 -13
  201. package/pkg/tsconfig.json +9 -9
  202. package/pkg/vue.config.js +1 -1
  203. package/plugins/dashboard-store/actions.js +1 -1
  204. package/public/index.html +1 -1
  205. package/rancher-components/Banner/Banner.vue +14 -2
  206. package/rancher-components/Form/Radio/RadioGroup.vue +9 -1
  207. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +31 -2
  208. package/scripts/build-pkg.sh +18 -23
  209. package/scripts/publish-shell.sh +1 -1
  210. package/store/i18n.js +1 -0
  211. package/store/index.js +4 -4
  212. package/store/type-map.js +0 -2
  213. package/types/shell/index.d.ts +8 -0
  214. package/utils/error.js +23 -3
  215. package/utils/errorTranslate.json +402 -8
  216. package/utils/errorTranslateNew.json +39 -0
  217. package/utils/roleFiltering.js +33 -0
  218. package/utils/title.ts +1 -1
  219. package/vue.config.js +1 -1
  220. /package/assets/images/{logo.png → pl/dark/logo.png} +0 -0
@@ -26,8 +26,8 @@ export default {
26
26
 
27
27
  <template>
28
28
  <div>
29
- <div class="row mb-10">
30
- <div class="col span-6">
29
+ <div class="row">
30
+ <div class="col mr-10">
31
31
  <LabeledInput
32
32
  v-model:value="value.name"
33
33
  :required="true"
@@ -35,7 +35,7 @@ export default {
35
35
  :label="t('workload.storage.volumeName')"
36
36
  />
37
37
  </div>
38
- <div class="col span-6">
38
+ <div class="col" style="display: flex;align-items: center;">
39
39
  <Checkbox
40
40
  v-model:value="value.gcePersistentDisk.readOnly"
41
41
  :mode="mode"
@@ -43,8 +43,8 @@ export default {
43
43
  />
44
44
  </div>
45
45
  </div>
46
- <div class="row mb-10">
47
- <div class="col span-6">
46
+ <div class="row">
47
+ <div class="col">
48
48
  <LabeledInput
49
49
  v-model:value="value.gcePersistentDisk.pdName"
50
50
  :mode="mode"
@@ -52,7 +52,9 @@ export default {
52
52
  :required="true"
53
53
  />
54
54
  </div>
55
- <div class="col span-6">
55
+ </div>
56
+ <div class="row">
57
+ <div class="col">
56
58
  <LabeledInput
57
59
  v-model:value.number="value.gcePersistentDisk.partition"
58
60
  :mode="mode"
@@ -61,7 +63,7 @@ export default {
61
63
  </div>
62
64
  </div>
63
65
  <div class="row">
64
- <div class="col span-6">
66
+ <div class="col">
65
67
  <LabeledInput
66
68
  v-model:value="value.gcePersistentDisk.fsType"
67
69
  :mode="mode"
@@ -82,8 +82,8 @@ export default {
82
82
  <template>
83
83
  <div>
84
84
  <div>
85
- <div class="row mb-10">
86
- <div class="col span-6">
85
+ <div class="row">
86
+ <div class="col">
87
87
  <LabeledInput
88
88
  v-model:value="value.name"
89
89
  :required="true"
@@ -92,8 +92,8 @@ export default {
92
92
  />
93
93
  </div>
94
94
  </div>
95
- <div class="row mb-10">
96
- <div class="col span-6">
95
+ <div class="row">
96
+ <div class="col">
97
97
  <LabeledInput
98
98
  v-model:value="value.hostPath.path"
99
99
  :required="true"
@@ -101,7 +101,9 @@ export default {
101
101
  :label="t('workload.storage.nodePath')"
102
102
  />
103
103
  </div>
104
- <div class="col span-6">
104
+ </div>
105
+ <div class="row">
106
+ <div class="col">
105
107
  <LabeledSelect
106
108
  v-model:value="value.hostPath.type"
107
109
  :mode="mode"
@@ -38,8 +38,8 @@ export default {
38
38
  <template>
39
39
  <div>
40
40
  <div>
41
- <div class="row mb-10">
42
- <div class="col span-6">
41
+ <div class="row">
42
+ <div class="col mr-10">
43
43
  <LabeledInput
44
44
  v-model:value="value.name"
45
45
  :required="true"
@@ -47,7 +47,7 @@ export default {
47
47
  :label="t('workload.storage.volumeName')"
48
48
  />
49
49
  </div>
50
- <div class="col span-6">
50
+ <div class="col" style="display: flex;align-items: center;">
51
51
  <Checkbox
52
52
  v-model:value="value.nfs.readOnly"
53
53
  :mode="mode"
@@ -55,8 +55,8 @@ export default {
55
55
  />
56
56
  </div>
57
57
  </div>
58
- <div class="row mb-10">
59
- <div class="col span-6">
58
+ <div class="row">
59
+ <div class="col">
60
60
  <LabeledInput
61
61
  v-model:value="value.nfs.path"
62
62
  :required="true"
@@ -64,7 +64,9 @@ export default {
64
64
  :label="t('workload.storage.path')"
65
65
  />
66
66
  </div>
67
- <div class="col span-6">
67
+ </div>
68
+ <div class="row">
69
+ <div class="col">
68
70
  <LabeledInput
69
71
  v-model:value="value.nfs.server"
70
72
  :required="true"
@@ -121,8 +121,8 @@ export default {
121
121
  @removePvcForm="removePvcForm"
122
122
  />
123
123
  </div>
124
- <div class="row mb-10">
125
- <div class="col span-6">
124
+ <div class="row">
125
+ <div class="col mr-10">
126
126
  <LabeledInput
127
127
  v-model:value="value.name"
128
128
  :required="true"
@@ -130,7 +130,16 @@ export default {
130
130
  :label="t('workload.storage.volumeName')"
131
131
  />
132
132
  </div>
133
- <div class="col span-6">
133
+ <div class="col" style="display: flex;align-items: center;">
134
+ <Checkbox
135
+ v-model:value="value.persistentVolumeClaim.readOnly"
136
+ :mode="mode"
137
+ :label="t('workload.storage.readOnly')"
138
+ />
139
+ </div>
140
+ </div>
141
+ <div class="row">
142
+ <div class="col">
134
143
  <LabeledSelect
135
144
  v-if="!createNew"
136
145
  v-model:value="value.persistentVolumeClaim.claimName"
@@ -142,13 +151,6 @@ export default {
142
151
  />
143
152
  </div>
144
153
  </div>
145
- <div class="row">
146
- <Checkbox
147
- v-model:value="value.persistentVolumeClaim.readOnly"
148
- :mode="mode"
149
- :label="t('workload.storage.readOnly')"
150
- />
151
- </div>
152
154
  </div>
153
155
  </div>
154
156
  </template>
@@ -156,8 +156,8 @@ export default {
156
156
 
157
157
  <template>
158
158
  <div>
159
- <div class="row mb-10">
160
- <div class="col span-6">
159
+ <div class="row">
160
+ <div class="col">
161
161
  <LabeledInput
162
162
  v-model:value="value.metadata.name"
163
163
  :mode="mode"
@@ -167,8 +167,9 @@ export default {
167
167
  />
168
168
  </div>
169
169
  </div>
170
- <div class="row mb-10">
171
- <div class="col span-6">
170
+ <div class="row">
171
+ <div style="width: 160px;"></div>
172
+ <div class="col">
172
173
  <RadioGroup
173
174
  v-model:value="isCreatePV"
174
175
  name="isCreatePV"
@@ -177,7 +178,9 @@ export default {
177
178
  :mode="mode"
178
179
  />
179
180
  </div>
180
- <div class="col span-6">
181
+ </div>
182
+ <div class="row">
183
+ <div class="col">
181
184
  <LabeledSelect
182
185
  v-if="isCreatePV"
183
186
  v-model:value="spec.storageClassName"
@@ -200,16 +203,16 @@ export default {
200
203
  </div>
201
204
  </div>
202
205
 
203
- <div class="row mb-10">
204
- <div class="col span-6">
205
- <div class="access-modes">
206
- <t
207
- class="text-label"
208
- k="persistentVolumeClaim.accessModes"
209
- />
210
- <span class="text-error">*</span>
211
- </div>
206
+ <div class="row">
207
+ <div class="col">
212
208
  <div class="access-modes">
209
+ <div style="width: 160px;">
210
+ <t
211
+ class="text-label"
212
+ k="persistentVolumeClaim.accessModes"
213
+ />
214
+ <span class="text-error">*</span>
215
+ </div>
213
216
  <Checkbox
214
217
  :mode="mode"
215
218
  :value="value.spec.accessModes.includes('ReadWriteOnce')"
@@ -230,9 +233,11 @@ export default {
230
233
  />
231
234
  </div>
232
235
  </div>
236
+ </div>
237
+ <div class="row">
233
238
  <div
234
239
  v-if="isCreatePV"
235
- class="col span-6"
240
+ class="col"
236
241
  >
237
242
  <UnitInput
238
243
  v-model:value="spec.resources.requests.storage"
@@ -130,8 +130,8 @@ export default {
130
130
  <template>
131
131
  <div>
132
132
  <div>
133
- <div class="row mb-10">
134
- <div class="col span-6">
133
+ <div class="row">
134
+ <div class="col">
135
135
  <LabeledInput
136
136
  v-model:value="value.name"
137
137
  :required="true"
@@ -139,8 +139,9 @@ export default {
139
139
  :label="t('workload.storage.volumeName')"
140
140
  />
141
141
  </div>
142
-
143
- <div class="col span-6">
142
+ </div>
143
+ <div class="row">
144
+ <div class="col">
144
145
  <LabeledInput
145
146
  v-model:value="defaultMode"
146
147
  :mode="mode"
@@ -149,7 +150,7 @@ export default {
149
150
  </div>
150
151
  </div>
151
152
  <div class="row">
152
- <div class="col span-6">
153
+ <div class="col">
153
154
  <LabeledSelect
154
155
  v-if="type==='secret'"
155
156
  v-model:value="value[type].secretName"
@@ -169,7 +170,9 @@ export default {
169
170
  :loading="loading"
170
171
  />
171
172
  </div>
172
- <div class="col span-6">
173
+ </div>
174
+ <div class="row">
175
+ <div class="col">
173
176
  <RadioGroup
174
177
  v-model:value="optional"
175
178
  :mode="mode"
@@ -25,8 +25,8 @@ export default {
25
25
 
26
26
  <template>
27
27
  <div>
28
- <div class="row mb-10">
29
- <div class="col span-6">
28
+ <div class="row">
29
+ <div class="col">
30
30
  <LabeledInput
31
31
  v-model:value="value.name"
32
32
  :required="true"
@@ -35,8 +35,8 @@ export default {
35
35
  />
36
36
  </div>
37
37
  </div>
38
- <div class="row mb-10">
39
- <div class="col span-6">
38
+ <div class="row">
39
+ <div class="col">
40
40
  <LabeledInput
41
41
  v-model:value="value.vsphereVolume.storagePolicyID"
42
42
  :mode="mode"
@@ -44,7 +44,9 @@ export default {
44
44
  :required="true"
45
45
  />
46
46
  </div>
47
- <div class="col span-6">
47
+ </div>
48
+ <div class="row">
49
+ <div class="col">
48
50
  <LabeledInput
49
51
  v-model:value.number="value.vsphereVolume.storagePolicyName"
50
52
  :mode="mode"
@@ -53,7 +55,7 @@ export default {
53
55
  </div>
54
56
  </div>
55
57
  <div class="row">
56
- <div class="col span-6">
58
+ <div class="col">
57
59
  <LabeledInput
58
60
  v-model:value="value.vsphereVolume.volumePath"
59
61
  :mode="mode"
@@ -61,7 +63,9 @@ export default {
61
63
  :required="true"
62
64
  />
63
65
  </div>
64
- <div class="col span-6">
66
+ </div>
67
+ <div class="row">
68
+ <div class="col">
65
69
  <LabeledInput
66
70
  v-model:value="value.vsphereVolume.fsType"
67
71
  :mode="mode"
@@ -55,7 +55,13 @@ async function extendApp(vueApp) {
55
55
  const next = (location) => appPartials.router.push(location);
56
56
  // Resolve route
57
57
 
58
- const path = getLocation(router.options.base, router.options.mode);
58
+ let path = getLocation(router.options.base, router.options.mode);
59
+
60
+ // 🔹 增加 rewrite,不改变原逻辑
61
+ if (path.includes('/cloud/')) {
62
+ path = path.replace(/cloud/g, 'harvester');
63
+ }
64
+
59
65
  const route = router.resolve(path);
60
66
 
61
67
  // Set context to app.context
@@ -37,15 +37,17 @@ export default {
37
37
 
38
38
  <template>
39
39
  <div>
40
- <Banner
41
- color="info"
42
- :label="t('podSecurityAdmission.banner.modifications')"
43
- />
44
-
45
40
  <ResourceTable
46
41
  :loading="loading"
47
42
  :schema="schema"
48
43
  :rows="rows"
49
- />
44
+ >
45
+ <template #banner>
46
+ <Banner
47
+ color="info"
48
+ :label="t('podSecurityAdmission.banner.modifications')"
49
+ />
50
+ </template>
51
+ </ResourceTable>
50
52
  </div>
51
53
  </template>
@@ -170,6 +170,16 @@ export default {
170
170
  } catch (err) {
171
171
  // This exception handles errors from the `request` action when it receives a failed http request. The `err` object could be from the action's error handler (raw http response object containing `status`) or thrown later on given the response of the action (a massaged object containing `_status`). TBD why one 409 triggers the error handler and another does not.
172
172
  const IS_ERR_409 = err.status === 409 || err._status === 409;
173
+
174
+ const IS_ERR_403 = err.status === 403 || err._status === 403;
175
+
176
+ if (err.message === '' && err.fieldName && err.code) {
177
+ err.message = err.code + ' ' + err.fieldName
178
+ }
179
+
180
+ if (IS_ERR_403) {
181
+ err.message = '权限不足'
182
+ }
173
183
 
174
184
  // Conflict, the resource being edited has changed since starting editing
175
185
  if (IS_ERR_409 && depth === 0 && this.isEdit) {
@@ -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.8",
3
+ "version": "3.0.5-test.80",
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;