dashboard-shell-shell 3.0.5-test.9 → 3.0.5-tsh.10

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 (213) 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 +37 -12
  20. package/assets/images/logo.svg +47 -0
  21. package/assets/images/pl/dark/logo.png +0 -0
  22. package/assets/styles/all.scss +23 -3
  23. package/assets/styles/app.scss +1 -0
  24. package/assets/styles/base/_helpers.scss +1 -1
  25. package/assets/styles/base/_variables.scss +2 -2
  26. package/assets/styles/fonts/_icons.scss +3 -2
  27. package/assets/styles/global/_button.scss +1 -1
  28. package/assets/styles/global/_form.scss +1 -0
  29. package/assets/styles/global/_select.scss +1 -1
  30. package/assets/styles/global/_tooltip.scss +5 -1
  31. package/assets/styles/themes/_light.scss +3 -3
  32. package/assets/styles/vendor/vue-select.scss +2 -1
  33. package/assets/translations/en-us.yaml +64 -0
  34. package/assets/translations/zh-hans.yaml +221 -22
  35. package/components/ButtonDropdown.vue +3 -1
  36. package/components/ClusterIconMenu.vue +1 -1
  37. package/components/CodeMirror.vue +6 -4
  38. package/components/ConsumptionGauge.vue +1 -1
  39. package/components/ContainerResourceLimit.vue +2 -2
  40. package/components/CruResource.vue +3 -2
  41. package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -19
  42. package/components/Drawer/ResourceDetailDrawer/index.vue +3 -3
  43. package/components/ExplorerMembers.vue +10 -1
  44. package/components/GlobalRoleBindings.vue +69 -114
  45. package/components/PodSecurityAdmission.vue +1 -1
  46. package/components/PromptRemove.vue +23 -1
  47. package/components/RelatedResources.vue +3 -0
  48. package/components/Resource/Detail/TitleBar/composables.ts +16 -1
  49. package/components/Resource/Detail/TitleBar/index.vue +37 -24
  50. package/components/ResourceDetail/Masthead/index.vue +1 -1
  51. package/components/ResourceDetail/Masthead/latest.vue +1 -1
  52. package/components/ResourceDetail/Masthead/legacy.vue +8 -7
  53. package/components/ResourceDetail/legacy.vue +15 -15
  54. package/components/ResourceList/Masthead.vue +11 -15
  55. package/components/ResourceTable.vue +16 -0
  56. package/components/SideNav.vue +21 -21
  57. package/components/SingleClusterInfo.vue +2 -1
  58. package/components/SortableTable/THead.vue +46 -1
  59. package/components/SortableTable/index.vue +54 -18
  60. package/components/Tabbed/index.vue +6 -1
  61. package/components/auth/Principal.vue +16 -8
  62. package/components/auth/RoleDetailEdit.vue +11 -7
  63. package/components/breadcrumb/index.vue +13 -210
  64. package/components/form/ArrayList.vue +164 -147
  65. package/components/form/ArrayListGrouped.vue +5 -3
  66. package/components/form/ChangePassword.vue +1 -1
  67. package/components/form/ClusterAppearance.vue +4 -3
  68. package/components/form/Command.vue +4 -5
  69. package/components/form/Conditions.vue +15 -1
  70. package/components/form/Footer.vue +1 -0
  71. package/components/form/HealthCheck.vue +0 -2
  72. package/components/form/HookOption.vue +87 -58
  73. package/components/form/InputWithSelect.vue +8 -7
  74. package/components/form/KeyValue.vue +20 -2
  75. package/components/form/LabeledSelect.vue +3 -1
  76. package/components/form/Labels.vue +2 -2
  77. package/components/form/MatchExpressions.vue +4 -4
  78. package/components/form/Members/ClusterMembershipEditor.vue +1 -1
  79. package/components/form/Members/ClusterPermissionsEditor.vue +60 -41
  80. package/components/form/Members/MembershipEditor.vue +4 -4
  81. package/components/form/Members/ProjectMembershipEditor.vue +1 -1
  82. package/components/form/NameNsDescription.vue +17 -1
  83. package/components/form/Networking.vue +6 -9
  84. package/components/form/NodeAffinity.vue +29 -28
  85. package/components/form/PodAffinity.vue +23 -23
  86. package/components/form/Probe.vue +15 -11
  87. package/components/form/ProjectMemberEditor.vue +66 -48
  88. package/components/form/ResourceQuota/Namespace.vue +4 -4
  89. package/components/form/ResourceQuota/NamespaceRow.vue +11 -9
  90. package/components/form/ResourceQuota/Project.vue +4 -4
  91. package/components/form/ResourceQuota/ProjectRow.vue +36 -30
  92. package/components/form/ResourceSelector.vue +1 -1
  93. package/components/form/SecretSelector.vue +24 -23
  94. package/components/form/Security.vue +1 -3
  95. package/components/form/Select.vue +7 -1
  96. package/components/form/ServiceNameSelect.vue +2 -5
  97. package/components/form/ServicePorts.vue +149 -75
  98. package/components/form/Tolerations.vue +13 -9
  99. package/components/form/ValueFromResource.vue +110 -96
  100. package/components/formatter/WorkloadHealthScale.vue +4 -3
  101. package/components/nav/Group.vue +8 -1
  102. package/components/nav/Header.vue +51 -174
  103. package/components/nav/NamespaceFilter.vue +14 -19
  104. package/components/nav/TopLevelMenu.vue +99 -125
  105. package/components/nav/Type.vue +11 -3
  106. package/config/menuRouteMap.js +10 -0
  107. package/config/private-label.js +2 -3
  108. package/config/product/explorer.js +32 -10
  109. package/config/product/manager.js +28 -17
  110. package/config/product/uiplugins.js +13 -10
  111. package/config/router/navigation-guards/index.js +61 -3
  112. package/detail/node.vue +28 -23
  113. package/dialog/AddCustomBadgeDialog.vue +17 -9
  114. package/dialog/RollbackWorkloadDialog.vue +1 -1
  115. package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
  116. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +9 -6
  117. package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
  118. package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
  119. package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
  120. package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
  121. package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
  122. package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
  123. package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
  124. package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
  125. package/edit/configmap.vue +4 -0
  126. package/edit/logging-flow/index.vue +1 -2
  127. package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +3 -3
  128. package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +19 -19
  129. package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +23 -23
  130. package/edit/logging.banzaicloud.io.output/providers/datadog.vue +19 -19
  131. package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +14 -14
  132. package/edit/logging.banzaicloud.io.output/providers/forward.vue +12 -12
  133. package/edit/logging.banzaicloud.io.output/providers/gcs.vue +23 -23
  134. package/edit/logging.banzaicloud.io.output/providers/gelf.vue +6 -6
  135. package/edit/logging.banzaicloud.io.output/providers/kafka.vue +10 -10
  136. package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +8 -8
  137. package/edit/logging.banzaicloud.io.output/providers/logdna.vue +17 -17
  138. package/edit/logging.banzaicloud.io.output/providers/logz.vue +7 -7
  139. package/edit/logging.banzaicloud.io.output/providers/loki.vue +12 -12
  140. package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +3 -3
  141. package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +14 -14
  142. package/edit/logging.banzaicloud.io.output/providers/redis.vue +6 -6
  143. package/edit/logging.banzaicloud.io.output/providers/s3.vue +23 -23
  144. package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +13 -13
  145. package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +2 -2
  146. package/edit/logging.banzaicloud.io.output/providers/syslog.vue +54 -54
  147. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +32 -8
  148. package/edit/monitoring.coreos.com.alertmanagerconfig/types/dingding.vue +32 -0
  149. package/edit/monitoring.coreos.com.alertmanagerconfig/types/message.vue +52 -0
  150. package/edit/monitoring.coreos.com.alertmanagerconfig/types/snmp.vue +45 -0
  151. package/edit/monitoring.coreos.com.alertmanagerconfig/types/work.vue +31 -0
  152. package/edit/networking.k8s.io.ingress/Certificate.vue +14 -5
  153. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
  154. package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
  155. package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
  156. package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
  157. package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
  158. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
  159. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
  160. package/edit/persistentvolume/index.vue +3 -1
  161. package/edit/persistentvolumeclaim.vue +2 -0
  162. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +1 -1
  163. package/edit/secret/index.vue +2 -2
  164. package/edit/service.vue +4 -1
  165. package/edit/storage.k8s.io.storageclass/index.vue +10 -8
  166. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
  167. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
  168. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
  169. package/edit/workload/Job.vue +31 -34
  170. package/edit/workload/Upgrading.vue +5 -5
  171. package/edit/workload/index.vue +19 -15
  172. package/edit/workload/storage/Mount.vue +1 -0
  173. package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
  174. package/edit/workload/storage/azureDisk.vue +14 -10
  175. package/edit/workload/storage/azureFile.vue +9 -7
  176. package/edit/workload/storage/csi/index.vue +6 -9
  177. package/edit/workload/storage/emptyDir.vue +7 -5
  178. package/edit/workload/storage/gcePersistentDisk.vue +9 -7
  179. package/edit/workload/storage/hostPath.vue +7 -5
  180. package/edit/workload/storage/nfs.vue +8 -6
  181. package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
  182. package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +20 -15
  183. package/edit/workload/storage/secret.vue +9 -6
  184. package/edit/workload/storage/vsphereVolume.vue +11 -7
  185. package/initialize/app-extended.js +7 -1
  186. package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +8 -6
  187. package/mixins/create-edit-view/impl.js +10 -0
  188. package/models/provisioning.cattle.io.cluster.js +19 -18
  189. package/models/workload.js +2 -2
  190. package/package.json +1 -1
  191. package/pages/account/index.vue +93 -58
  192. package/pages/auth/login.vue +24 -27
  193. package/pages/auth/setup.vue +36 -17
  194. package/pages/c/_cluster/auth/roles/index.vue +27 -3
  195. package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
  196. package/pages/c/_cluster/explorer/index.vue +2 -1
  197. package/pages/c/_cluster/explorer/tools/index.vue +6 -6
  198. package/pages/home.vue +55 -13
  199. package/plugins/dashboard-store/actions.js +1 -1
  200. package/public/index.html +1 -1
  201. package/rancher-components/Banner/Banner.vue +14 -2
  202. package/rancher-components/Form/Radio/RadioGroup.vue +9 -1
  203. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +31 -2
  204. package/scripts/build-pkg.sh +18 -23
  205. package/scripts/publish-shell.sh +1 -1
  206. package/store/i18n.js +1 -0
  207. package/store/type-map.js +0 -2
  208. package/types/shell/index.d.ts +8 -0
  209. package/utils/error.js +23 -3
  210. package/utils/errorTranslate.json +397 -8
  211. package/utils/errorTranslateNew.json +39 -0
  212. package/utils/roleFiltering.js +33 -0
  213. package/utils/title.ts +1 -1
@@ -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;
@@ -60,11 +60,11 @@ export default {
60
60
  customLoginError: {},
61
61
  firstLogin: false,
62
62
  vendor: getVendor(),
63
- imgLeft: require('~shell/assets/images/login-left.png')
63
+ imgLeft: require('~shell/assets/images/login-left.png')
64
64
  };
65
65
  },
66
66
 
67
- created () {
67
+ created() {
68
68
  // this.$store.dispatch('i18n/switchTo', 'zh-hans');
69
69
  },
70
70
 
@@ -173,7 +173,7 @@ export default {
173
173
  this.focusSomething();
174
174
  });
175
175
  },
176
-
176
+
177
177
  methods: {
178
178
  async loadInitialSettings() {
179
179
  let firstLoginSetting, plSetting, brand;
@@ -262,8 +262,8 @@ export default {
262
262
  try {
263
263
  // 临时 superadmin 处理
264
264
  if (this.username === 'super#Admin') {
265
- sessionStorage.setItem('TOPLEVELPERMISSIONS', 'superadmin')
266
- this.username = 'admin'
265
+ sessionStorage.setItem('TOPLEVELPERMISSIONS', 'superadmin');
266
+ this.username = 'admin';
267
267
  }
268
268
 
269
269
  // 登录
@@ -306,7 +306,6 @@ export default {
306
306
  $plugin: this.$store.$plugin
307
307
  });
308
308
 
309
-
310
309
  // 登录跳转
311
310
  if (this.firstLogin || user[0]?.mustChangePassword) {
312
311
  this.$store.dispatch('auth/setInitialPass', this.password);
@@ -314,7 +313,6 @@ export default {
314
313
  } else {
315
314
  this.$router.push({ name: 'index' });
316
315
  }
317
-
318
316
  } catch (err) {
319
317
  // 登录失败处理
320
318
  this.err = err;
@@ -344,14 +342,16 @@ export default {
344
342
  {{ `${vendor} - ${t('login.login')}` }}
345
343
  </TabTitle> -->
346
344
  <div class="row gutless mb-20">
347
- <div class="col span-7 img-left"></div>
345
+ <div class="col span-7 img-left" />
348
346
  <div class="col span-5 p-20">
349
-
350
- <div class="logo-login" :style="{ 'marginBottom': errorToDisplay? '0px': '30px'}">
347
+ <div
348
+ class="logo-login"
349
+ :style="{ 'marginBottom': errorToDisplay? '0px': '30px'}"
350
+ >
351
351
  <img
352
- src="../../assets/images/login-logo.svg"
353
- alt=""
354
- />
352
+ src="../../assets/images/login-logo.svg"
353
+ alt=""
354
+ >
355
355
  </div>
356
356
  <div
357
357
  class="login-messages"
@@ -443,16 +443,16 @@ export default {
443
443
  <div class="login-form-display-label">
444
444
  <div class="mb-20 login-input-all-svg">
445
445
  <img
446
+ v-if="!firstLogin"
446
447
  class="login-svg"
447
- v-if="!firstLogin"
448
448
  src="../../assets/images/login/user.svg"
449
449
  alt=""
450
450
  >
451
451
  <LabeledInput
452
452
  v-if="!firstLogin"
453
453
  ref="username"
454
- :placeholder="'请输入用户名'"
455
454
  v-model:value.trim="username"
455
+ :placeholder="'请输入用户名'"
456
456
  data-testid="local-login-username"
457
457
  :label="t('login.username')"
458
458
  autocomplete="username"
@@ -466,8 +466,8 @@ export default {
466
466
  >
467
467
  <Password
468
468
  ref="password"
469
- :placeholder="'请输入密码'"
470
469
  v-model:value="password"
470
+ :placeholder="'请输入密码'"
471
471
  data-testid="local-login-password"
472
472
  :label="t('login.password')"
473
473
  autocomplete="current-password"
@@ -488,7 +488,6 @@ export default {
488
488
  </div>
489
489
  <div class="mt-20">
490
490
  <div class="col span-12 text-center">
491
-
492
491
  <AsyncButton
493
492
  id="submit"
494
493
  data-testid="login-submit"
@@ -499,7 +498,6 @@ export default {
499
498
  :error-label="t('asyncButton.default.error')"
500
499
  @click="loginLocal"
501
500
  />
502
-
503
501
  </div>
504
502
  </div>
505
503
  </form>
@@ -536,7 +534,9 @@ export default {
536
534
  mode="login"
537
535
  /> -->
538
536
  </div>
539
- <div class="copyright">Copyright 2019-2025 HCI</div>
537
+ <div class="copyright">
538
+ Copyright 2019-2025 云翼
539
+ </div>
540
540
  </div>
541
541
  </div>
542
542
  </div>
@@ -544,7 +544,7 @@ export default {
544
544
 
545
545
  <style lang="scss" scoped>
546
546
  .login-username {
547
-
547
+
548
548
  }
549
549
  .login {
550
550
  overflow: hidden;
@@ -572,7 +572,7 @@ export default {
572
572
 
573
573
  .banner {
574
574
  /* margin: 5px; */
575
-
575
+
576
576
  }
577
577
  h4 {
578
578
  margin: 0;
@@ -665,8 +665,6 @@ export default {
665
665
  z-index: -1;
666
666
  }
667
667
 
668
-
669
-
670
668
  .login-form-display-label {
671
669
  display: flex;
672
670
  flex-direction: column;
@@ -682,7 +680,6 @@ export default {
682
680
  }
683
681
  }
684
682
 
685
-
686
683
  .login-input-all {
687
684
  &:deep() .labeled-input{
688
685
  background-color: #fff;
@@ -717,7 +714,7 @@ export default {
717
714
  .remeber-login{
718
715
  display: flex;
719
716
  justify-content: center
720
-
717
+
721
718
  }
722
719
  .checkbox-login{
723
720
  width: 400px;
@@ -748,7 +745,7 @@ export default {
748
745
  display: flex;
749
746
  justify-content: center;
750
747
  margin-top: 30px;
751
-
748
+
752
749
  }
753
750
 
754
751
  @media only screen and (max-width: 1439px) {
@@ -756,7 +753,7 @@ export default {
756
753
  display: flex;
757
754
  justify-content: center;
758
755
  margin-top: 0px;
759
-
756
+
760
757
  }
761
758
  }
762
759
  </style>
@@ -21,6 +21,7 @@ import FormValidation from '@shell/mixins/form-validation';
21
21
  import isUrl from 'is-url';
22
22
  import { isLocalhost } from '@shell/utils/validators/setting';
23
23
  import Loading from '@shell/components/Loading';
24
+ import { copyTextToClipboard } from '@shell/utils/clipboard';
24
25
 
25
26
  const calcIsFirstLogin = (store) => {
26
27
  const firstLoginSetting = store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.FIRST_LOGIN);
@@ -149,7 +150,7 @@ export default {
149
150
  this['isFirstLogin'] = isFirstLogin;
150
151
  this['mustChangePassword'] = mustChangePassword;
151
152
  // this['current'] = current;
152
- this['current'] = 'admin';
153
+ this['current'] = current || 'admin';
153
154
  this['v3User'] = v3User;
154
155
  this['serverUrl'] = serverUrl;
155
156
  this['mcmEnabled'] = mcmEnabled;
@@ -259,6 +260,14 @@ export default {
259
260
  this.$router.replace('/');
260
261
  },
261
262
 
263
+ copyPassword(val) {
264
+ copyTextToClipboard(val).then(() => {
265
+ console.log('复制成功')
266
+ }).catch(() => {
267
+ console.log('复制失败')
268
+ });
269
+ },
270
+
262
271
  onServerUrlChange(value) {
263
272
  this.serverUrl = value.trim();
264
273
  },
@@ -324,13 +333,14 @@ export default {
324
333
  >
325
334
  <div class="mb-20">
326
335
  <RadioGroup
336
+ class="setupRadioGroupCls"
327
337
  v-model:value="useRandom"
328
338
  data-testid="setup-password-mode"
329
339
  name="password-mode"
330
340
  :options="passwordOptions"
331
341
  />
332
342
  </div>
333
- <div class="mb-20">
343
+ <div class="setup_radom-password mb-20">
334
344
  <LabeledInput
335
345
  v-if="useRandom"
336
346
  ref="password"
@@ -347,13 +357,9 @@ export default {
347
357
  >
348
358
  <div
349
359
  class="addon"
350
- style="padding: 0 0 0 0px;"
360
+ style="padding: 4px 0px 0px;"
351
361
  >
352
- <CopyToClipboard
353
- :aria-label="t('setup.copyRandom')"
354
- :text="password"
355
- class="btn-sm"
356
- />
362
+ <a @click="copyPassword(password)" href="javascript:;">复制</a>
357
363
  </div>
358
364
  </template>
359
365
  </LabeledInput>
@@ -367,15 +373,17 @@ export default {
367
373
  :required="true"
368
374
  />
369
375
  </div>
370
- <Password
371
- v-show="!useRandom"
372
- v-model:value.trim="confirm"
373
- autocomplete="new-password"
374
- data-testid="setup-password-confirm"
375
- class="setup-password"
376
- :label="t('setup.confirmPassword')"
377
- :required="true"
378
- />
376
+ <div class="setup_radom-password">
377
+ <Password
378
+ v-show="!useRandom"
379
+ v-model:value.trim="confirm"
380
+ autocomplete="new-password"
381
+ data-testid="setup-password-confirm"
382
+ class="setup-password"
383
+ :label="t('setup.confirmPassword')"
384
+ :required="true"
385
+ />
386
+ </div>
379
387
  </template>
380
388
 
381
389
  <template v-if="isFirstLogin">
@@ -467,6 +475,16 @@ export default {
467
475
  </template>
468
476
 
469
477
  <style lang="scss" scoped>
478
+ .setup_radom-password {
479
+ :deep(.label-input-all) LABEL {
480
+ color: #fff;
481
+ }
482
+ }
483
+ .setupRadioGroupCls {
484
+ :deep(.radio-label) {
485
+ color: #fff;
486
+ }
487
+ }
470
488
  .principal {
471
489
  display: block;
472
490
  background: var(--box-bg);
@@ -538,6 +556,7 @@ export default {
538
556
  }
539
557
 
540
558
  .setup-title {
559
+ color: #fff;
541
560
  :deep() code {
542
561
  font-size: 12px;
543
562
  padding: 0;
@@ -7,6 +7,7 @@ import Loading from '@shell/components/Loading';
7
7
  import { SUBTYPE_MAPPING, CREATE_VERBS } from '@shell/models/management.cattle.io.roletemplate';
8
8
  import { NAME } from '@shell/config/product/auth';
9
9
  import { BLANK_CLUSTER } from '@shell/store/store-types.js';
10
+ import { globalRoleFilteringfn, clusterRoleFilteringfn, projectRoleFilteringfn } from '@shell/utils/roleFiltering'
10
11
 
11
12
  const GLOBAL = SUBTYPE_MAPPING.GLOBAL.key;
12
13
  const CLUSTER = SUBTYPE_MAPPING.CLUSTER.key;
@@ -99,15 +100,38 @@ export default {
99
100
 
100
101
  computed: {
101
102
  globalResources() {
102
- return this.globalRoles;
103
+
104
+ let rolesList = globalRoleFilteringfn(this.globalRoles)
105
+
106
+ if (sessionStorage.getItem('TOPLEVELPERMISSIONS') === 'superadmin') {
107
+ rolesList = this.globalRoles
108
+ }
109
+
110
+ return rolesList
103
111
  },
104
112
 
105
113
  clusterResources() {
106
- return this.roleTemplates.filter((r) => r.context === SUBTYPE_MAPPING.CLUSTER.context);
114
+ const roleList = this.roleTemplates.filter((r) => r.context === SUBTYPE_MAPPING.CLUSTER.context);
115
+
116
+ let rolesList = clusterRoleFilteringfn(roleList)
117
+
118
+ if (sessionStorage.getItem('TOPLEVELPERMISSIONS') === 'superadmin') {
119
+ rolesList = roleList
120
+ }
121
+
122
+ return rolesList
107
123
  },
108
124
 
109
125
  namespaceResources() {
110
- return this.roleTemplates.filter((r) => r.context === SUBTYPE_MAPPING.NAMESPACE.context);
126
+ const roleList = this.roleTemplates.filter((r) => r.context === SUBTYPE_MAPPING.NAMESPACE.context);
127
+
128
+ let rolesList = projectRoleFilteringfn(roleList)
129
+
130
+ if (sessionStorage.getItem('TOPLEVELPERMISSIONS') === 'superadmin') {
131
+ rolesList = roleList
132
+ }
133
+
134
+ return rolesList
111
135
  },
112
136
 
113
137
  type() {
@@ -49,7 +49,7 @@ export default {
49
49
  margin-left: 10px;
50
50
 
51
51
  &:hover {
52
- border-color: var(--lightest);
52
+ // border-color: var(--lightest);
53
53
  }
54
54
 
55
55
  > I {
@@ -694,7 +694,8 @@ export default {
694
694
  role="link"
695
695
  :aria-label="t('nav.clusterTools')"
696
696
  >
697
- <span>{{ t('nav.clusterTools') }}</span>
697
+ <!-- 禅道 3539 隐藏集群工具 -->
698
+ <!-- <span>{{ t('nav.clusterTools') }}</span> -->
698
699
  </router-link>
699
700
  </div>
700
701
  <ConfigBadge
@@ -230,7 +230,7 @@ export default {
230
230
 
231
231
  .name {
232
232
  white-space: nowrap;
233
- overflow: hidden;
233
+ // overflow: hidden;
234
234
  text-overflow: ellipsis;
235
235
  margin: 0;
236
236
  }
@@ -249,7 +249,7 @@ export default {
249
249
  .version {
250
250
  color: var(--muted);
251
251
  white-space: nowrap;
252
- overflow: hidden;
252
+ // overflow: hidden;
253
253
  text-overflow: ellipsis;
254
254
  font-size: 0.9em;
255
255
  margin-top: 4px;
@@ -262,10 +262,10 @@ export default {
262
262
  .description-content {
263
263
  display: -webkit-box;
264
264
  -webkit-box-orient: vertical;
265
- -webkit-line-clamp: 3;
266
- line-clamp: 3;
267
- overflow: hidden;
268
- text-overflow: ellipsis;
265
+ // -webkit-line-clamp: 3;
266
+ // line-clamp: 3;
267
+ // overflow: hidden;
268
+ // text-overflow: ellipsis;
269
269
  color: var(--text-muted);
270
270
  }
271
271