dashboard-shell-shell 3.0.5-test.14 → 3.0.5-test.17

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.
@@ -671,7 +671,7 @@ buttonLabel:
671
671
  Errors:
672
672
  changePassword:
673
673
  Password must be at least 12 characters: 密码至少为12个字符
674
- invalid current password: 当前的密码输入错误
674
+ "invalid current password": 当前的密码输入错误
675
675
 
676
676
 
677
677
  asyncButton:
@@ -3,7 +3,7 @@ import Drawer from '@shell/components/Drawer/Chrome.vue';
3
3
  import { useI18n } from '@shell/composables/useI18n';
4
4
  import { useStore } from 'vuex';
5
5
  import Tabbed from '@shell/components/Tabbed/index.vue';
6
- import YamlTab, { Props as YamlProps } from '@shell/components/Drawer/ResourceDetailDrawer/YamlTab.vue';
6
+ // import YamlTab, { Props as YamlProps } from '@shell/components/Drawer/ResourceDetailDrawer/YamlTab.vue';
7
7
  import { useDefaultConfigTabProps, useDefaultYamlTabProps } from '@shell/components/Drawer/ResourceDetailDrawer/composables';
8
8
  import ConfigTab from '@shell/components/Drawer/ResourceDetailDrawer/ConfigTab.vue';
9
9
  import { computed, ref } from 'vue';
@@ -87,10 +87,10 @@ const canEdit = computed(() => {
87
87
  v-if="configTabProps"
88
88
  v-bind="configTabProps"
89
89
  />
90
- <YamlTab
90
+ <!-- <YamlTab
91
91
  v-if="yamlTabProps"
92
92
  v-bind="yamlTabProps"
93
- />
93
+ /> -->
94
94
  </Tabbed>
95
95
  </template>
96
96
  <template #additional-actions>
@@ -108,12 +108,7 @@ export default {
108
108
  } catch (e) { }
109
109
  },
110
110
  data() {
111
-
112
- const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS') || ''
113
-
114
111
  return {
115
- topLevelPermissions,
116
-
117
112
  // This not only identifies global roles but the order here is the order we want to display them in the UI
118
113
  globalPermissions: [
119
114
  'admin',
@@ -333,62 +328,60 @@ export default {
333
328
 
334
329
  <div v-else>
335
330
  <form v-if="selectedRoles">
336
- <template>
337
- <div
338
- v-for="(sortedRole, roleType) in sortedRoles"
339
- :key="roleType"
340
- class="role-group mb-10"
331
+ <div
332
+ v-for="(sortedRole, roleType) in sortedRoles"
333
+ :key="roleType"
334
+ class="role-group mb-10"
335
+ >
336
+ <Card
337
+ v-if="Object.keys(sortedRole).length"
338
+ :show-highlight-border="false"
339
+ :show-actions="false"
341
340
  >
342
- <Card
343
- v-if="Object.keys(sortedRole).length"
344
- :show-highlight-border="false"
345
- :show-actions="false"
346
- >
347
- <template v-slot:title>
348
- <div class="type-title">
349
- <h3>{{ t(`rbac.globalRoles.types.${roleType}.label`) }}</h3>
350
- <div class="type-description">
351
- {{ t(`rbac.globalRoles.types.${roleType}.description`, { isUser }) }}
352
- </div>
341
+ <template v-slot:title>
342
+ <div class="type-title">
343
+ <h3>{{ t(`rbac.globalRoles.types.${roleType}.label`) }}</h3>
344
+ <div class="type-description">
345
+ {{ t(`rbac.globalRoles.types.${roleType}.description`, { isUser }) }}
353
346
  </div>
354
- </template>
355
- <template v-slot:body>
347
+ </div>
348
+ </template>
349
+ <template v-slot:body>
350
+ <div
351
+ class="checkbox-section"
352
+ :class="'checkbox-section--' + roleType"
353
+ >
356
354
  <div
357
- class="checkbox-section"
358
- :class="'checkbox-section--' + roleType"
355
+ v-for="(role, i) in sortedRoles[roleType]"
356
+ :key="i"
357
+ class="checkbox mb-10 mr-10"
359
358
  >
360
- <div
361
- v-for="(role, i) in sortedRoles[roleType]"
362
- :key="i"
363
- class="checkbox mb-10 mr-10"
359
+ <Checkbox
360
+ v-model:value="selectedRoles"
361
+ :value-when-true="role.id"
362
+ :disabled="!!assignOnlyRoles[role.id]"
363
+ :label="role.nameDisplay"
364
+ :description="role.descriptionDisplay"
365
+ :mode="mode"
366
+ :data-testId="'grb-checkbox-' + role.id"
367
+ @update:value="checkboxChanged"
364
368
  >
365
- <Checkbox
366
- v-model:value="selectedRoles"
367
- :value-when-true="role.id"
368
- :disabled="!!assignOnlyRoles[role.id]"
369
- :label="role.nameDisplay"
370
- :description="role.descriptionDisplay"
371
- :mode="mode"
372
- :data-testId="'grb-checkbox-' + role.id"
373
- @update:value="checkboxChanged"
374
- >
375
- <template #label>
376
- <div class="checkbox-label-slot">
377
- <span class="checkbox-label">{{ role.nameDisplay }}</span>
378
- <i
379
- v-if="!!assignOnlyRoles[role.id]"
380
- v-clean-tooltip="t('rbac.globalRoles.assignOnlyRole')"
381
- class="checkbox-info icon icon-info icon-lg"
382
- />
383
- </div>
384
- </template>
385
- </Checkbox>
386
- </div>
369
+ <template #label>
370
+ <div class="checkbox-label-slot">
371
+ <span class="checkbox-label">{{ role.nameDisplay }}</span>
372
+ <i
373
+ v-if="!!assignOnlyRoles[role.id]"
374
+ v-clean-tooltip="t('rbac.globalRoles.assignOnlyRole')"
375
+ class="checkbox-info icon icon-info icon-lg"
376
+ />
377
+ </div>
378
+ </template>
379
+ </Checkbox>
387
380
  </div>
388
- </template>
389
- </Card>
390
- </div>
391
- </template>
381
+ </div>
382
+ </template>
383
+ </Card>
384
+ </div>
392
385
  </form>
393
386
  </div>
394
387
  </template>
@@ -265,7 +265,7 @@ export default {
265
265
  >
266
266
 
267
267
  <div class="row">
268
- <div class="col">
268
+ <div style="width: 100%;" class="col">
269
269
  <div
270
270
  v-if="title"
271
271
  class="clearfix"
@@ -289,7 +289,7 @@ export default {
289
289
  </slot>
290
290
  </div>
291
291
  </div>
292
- <div class="col">
292
+ <div style="width: 100%;" class="col">
293
293
  <div>
294
294
  <template v-if="rows.length">
295
295
  <div
@@ -432,7 +432,7 @@ export default {
432
432
  }
433
433
 
434
434
  &.create, &.edit {
435
- height: 185px;
435
+ height: 160px;
436
436
  .form {
437
437
  .fields {
438
438
  display: flex;
@@ -392,10 +392,10 @@ export default {
392
392
 
393
393
  rows = rows.map((item) => {
394
394
  if (item.key.includes('harvester')) {
395
- item.key = item.key.replace('harvester', 'cloud');
395
+ item.key = item.key?.replace('harvester', 'cloud');
396
396
  }
397
397
  if (item.value.includes('harvester')) {
398
- item.value = item.value.replace('harvester', 'cloud');
398
+ item.value = item.value?.replace('harvester', 'cloud');
399
399
  }
400
400
 
401
401
  return item;
@@ -411,8 +411,8 @@ export default {
411
411
  [this.valueName]: value,
412
412
  };
413
413
 
414
- obj.key = obj.key.replace('harvester', 'cloud');
415
- obj.value = obj.value.replace('harvester', 'cloud');
414
+ obj.key = obj.key?.replace('harvester', 'cloud');
415
+ obj.value = obj.value?.replace('harvester', 'cloud');
416
416
  obj.binary = false;
417
417
  obj.canEncode = this.handleBase64;
418
418
  obj.supported = true;
@@ -494,8 +494,8 @@ export default {
494
494
  // let value = (row[valueName] || '');
495
495
  // const key = (row[keyName] || '').trim();
496
496
 
497
- const key = (row[keyName].replace('cloud', 'harvester') || '').trim();
498
- let value = (row[valueName].replace('cloud', 'harvester') || '').trim();
497
+ const key = (row[keyName]?.replace('cloud', 'harvester') || '').trim();
498
+ let value = (row[valueName]?.replace('cloud', 'harvester') || '').trim();
499
499
 
500
500
  if (value && typeOf(value) === 'object') {
501
501
  out[key] = JSON.parse(JSON.stringify(value));
@@ -56,6 +56,6 @@ export default {
56
56
  :type="NORMAN.CLUSTER_ROLE_TEMPLATE_BINDING"
57
57
  :mode="mode"
58
58
  parent-key="clusterId"
59
- :parent-id="parentId"
59
+ :parent-id="parentId"
60
60
  />
61
61
  </template>
@@ -161,11 +161,11 @@ export default {
161
161
  value: 'member'
162
162
  },
163
163
  ...customRoles,
164
- {
165
- label: this.t('members.clusterPermissions.custom.label'),
166
- description: this.t('members.clusterPermissions.custom.description'),
167
- value: 'custom'
168
- }
164
+ // {
165
+ // label: this.t('members.clusterPermissions.custom.label'),
166
+ // description: this.t('members.clusterPermissions.custom.description'),
167
+ // value: 'custom'
168
+ // }
169
169
  ];
170
170
  },
171
171
  principal() {
@@ -170,7 +170,7 @@ export default {
170
170
  >
171
171
  <template #column-headers>
172
172
  <div class="box mb-0">
173
- <div class="column-headers row" style="width: 95%;">
173
+ <div class="column-headers row" style="width: calc(100% - 100px);">
174
174
  <div class="col span-6">
175
175
  <label class="text-label">{{ t('membershipEditor.user') }}</label>
176
176
  </div>
@@ -181,7 +181,7 @@ export default {
181
181
  </div>
182
182
  </template>
183
183
  <template #columns="{row, i}">
184
- <div class="columns row">
184
+ <div style="width: 100%;" class="columns row">
185
185
  <div class="col span-6">
186
186
  <Principal
187
187
  :value="row.value.principalId"
@@ -72,13 +72,13 @@ export default {
72
72
  <template>
73
73
  <div>
74
74
  <div class="headers mb-10">
75
- <div style="width: 400px;">
75
+ <div style="width: 450px;">
76
76
  <label>{{ t('resourceQuota.headers.resourceType') }}</label>
77
77
  </div>
78
- <div style="width: 400px;">
78
+ <div style="width: 450px;">
79
79
  <label>{{ t('resourceQuota.headers.projectResourceAvailability') }}</label>
80
80
  </div>
81
- <div style="width: 500px;">
81
+ <div style="width: 450px;">
82
82
  <label>{{ t('resourceQuota.headers.limit') }}</label>
83
83
  </div>
84
84
  </div>
@@ -101,7 +101,7 @@ export default {
101
101
  .headers {
102
102
  display: flex;
103
103
  flex-direction: row;
104
- justify-content: space-between;
104
+ justify-content: left;
105
105
  align-items: center;
106
106
  border-bottom: 1px solid var(--border);
107
107
  height: 30px;
@@ -175,13 +175,15 @@ export default {
175
175
  v-if="typeOption"
176
176
  class="rowNew"
177
177
  >
178
- <Select
179
- :mode="mode"
180
- :value="type"
181
- :disabled="true"
182
- :options="types"
183
- />
184
- <div class="resource-availability">
178
+ <div style="width: 450px;">
179
+ <Select
180
+ :mode="mode"
181
+ :value="type"
182
+ :disabled="true"
183
+ :options="types"
184
+ />
185
+ </div>
186
+ <div style="width: 450px;" class="resource-availability">
185
187
  <PercentageBar
186
188
  v-clean-tooltip="tooltip"
187
189
  class="percentage-bar"
@@ -190,7 +192,7 @@ export default {
190
192
  :color-stops="{'100': '--primary'}"
191
193
  />
192
194
  </div>
193
- <div style="width: 500px;">
195
+ <div style="width: 450px;">
194
196
  <UnitInput
195
197
  :value="value.limit[type]"
196
198
  :mode="mode"
@@ -212,7 +214,7 @@ export default {
212
214
  .rowNew {
213
215
  margin-bottom: 10px;
214
216
  display: flex;
215
- justify-content: space-between !important;
217
+ justify-content: left;
216
218
 
217
219
  & > * {
218
220
  width: 400px;
@@ -57,14 +57,14 @@ export default {
57
57
  </script>
58
58
  <template>
59
59
  <div>
60
- <div style="justify-content: space-between;" class="headers mb-10">
61
- <div style="width: 400px;">
60
+ <div style="justify-content: left;" class="headers mb-10">
61
+ <div style="width: 450px;">
62
62
  <label>{{ t('resourceQuota.headers.resourceType') }}</label>
63
63
  </div>
64
- <div style="width: 400px;">
64
+ <div style="width: 450px;">
65
65
  <label>{{ t('resourceQuota.headers.projectLimit') }}</label>
66
66
  </div>
67
- <div style="width: 400px;">
67
+ <div style="width: 450px;">
68
68
  <label>{{ t('resourceQuota.headers.namespaceDefaultLimit') }}</label>
69
69
  </div>
70
70
  </div>
@@ -72,41 +72,47 @@ export default {
72
72
  v-if="typeOption"
73
73
  class="rowNew"
74
74
  >
75
- <Select
76
- :value="type"
77
- :mode="mode"
78
- :options="types"
79
- data-testid="projectrow-type-input"
80
- @update:value="updateType($event)"
81
- />
82
- <UnitInput
83
- :value="resourceQuotaLimit[type]"
84
- :mode="mode"
85
- :placeholder="typeOption.placeholder"
86
- :increment="typeOption.increment"
87
- :input-exponent="typeOption.inputExponent"
88
- :base-unit="typeOption.baseUnit"
89
- :output-modifier="true"
90
- data-testid="projectrow-project-quota-input"
91
- @update:value="updateQuotaLimit('resourceQuota', type, $event)"
92
- />
93
- <UnitInput
94
- :value="namespaceDefaultResourceQuotaLimit[type]"
95
- :mode="mode"
96
- :placeholder="typeOption.placeholder"
97
- :increment="typeOption.increment"
98
- :input-exponent="typeOption.inputExponent"
99
- :base-unit="typeOption.baseUnit"
100
- :output-modifier="true"
101
- data-testid="projectrow-namespace-quota-input"
102
- @update:value="updateQuotaLimit('namespaceDefaultResourceQuota', type, $event)"
103
- />
75
+ <div style="width: 450px;">
76
+ <Select
77
+ :value="type"
78
+ :mode="mode"
79
+ :options="types"
80
+ data-testid="projectrow-type-input"
81
+ @update:value="updateType($event)"
82
+ />
83
+ </div>
84
+ <div style="width: 450px;">
85
+ <UnitInput
86
+ :value="resourceQuotaLimit[type]"
87
+ :mode="mode"
88
+ :placeholder="typeOption.placeholder"
89
+ :increment="typeOption.increment"
90
+ :input-exponent="typeOption.inputExponent"
91
+ :base-unit="typeOption.baseUnit"
92
+ :output-modifier="true"
93
+ data-testid="projectrow-project-quota-input"
94
+ @update:value="updateQuotaLimit('resourceQuota', type, $event)"
95
+ />
96
+ </div>
97
+ <div style="width: 450px;">
98
+ <UnitInput
99
+ :value="namespaceDefaultResourceQuotaLimit[type]"
100
+ :mode="mode"
101
+ :placeholder="typeOption.placeholder"
102
+ :increment="typeOption.increment"
103
+ :input-exponent="typeOption.inputExponent"
104
+ :base-unit="typeOption.baseUnit"
105
+ :output-modifier="true"
106
+ data-testid="projectrow-namespace-quota-input"
107
+ @update:value="updateQuotaLimit('namespaceDefaultResourceQuota', type, $event)"
108
+ />
109
+ </div>
104
110
  </div>
105
111
  </template>
106
112
 
107
113
  <style lang='scss' scoped>
108
114
  .rowNew {
109
115
  display: flex;
110
- justify-content: space-between !important;
116
+ justify-content: left;
111
117
  }
112
118
  </style>
@@ -867,6 +867,7 @@ export default {
867
867
  @click="hide()"
868
868
  >
869
869
  <router-link
870
+ v-if="a.value !== 'fleet'"
870
871
  class="option"
871
872
  :class="{'active-menu-link': a.isMenuActive }"
872
873
  :to="a.to"
@@ -923,7 +924,7 @@ export default {
923
924
  <div
924
925
  class="footer"
925
926
  >
926
- <div
927
+ <!-- <div
927
928
  v-if="canEditSettings"
928
929
  class="support"
929
930
  @click="hide()"
@@ -948,7 +949,7 @@ export default {
948
949
  >
949
950
  {{ aboutText }}
950
951
  </router-link>
951
- </div>
952
+ </div> -->
952
953
  </div>
953
954
  </div>
954
955
  </transition>
@@ -141,7 +141,7 @@ export default {
141
141
  <a
142
142
  role="link"
143
143
  :aria-label="type.labelKey ? t(type.labelKey) : (type.labelDisplay || type.label)"
144
- :href="href"
144
+ :href="href.replace(/harvester/g, 'cloud')"
145
145
  class="type-link"
146
146
  :aria-current="isActive ? 'page' : undefined"
147
147
  @click="selectType(); navigate($event);"
@@ -158,7 +158,7 @@ export default {
158
158
  <div v-else style="display: flex; align-items: center;" class="labelKey_menu">
159
159
  <i v-if="!type.labelDisplay || (type.labelDisplay && type.labelDisplay.indexOf('</i>') === -1)" class="icon icon-fw icon-globe" style="color: var(--muted);width: 32px;text-align: left;"></i>
160
160
  <span
161
- v-clean-html="type.labelDisplay.replace('设置', '基础设置') || type.label"
161
+ v-clean-html="type.labelDisplay || type.label"
162
162
  class="label"
163
163
  :class="{'no-icon': !type.icon}"
164
164
  />
@@ -199,7 +199,7 @@ export default {
199
199
  >
200
200
  <a
201
201
  role="link"
202
- :href="type.link"
202
+ :href="type.link.replace(/harvester/g, 'cloud')"
203
203
  :target="type.target"
204
204
  rel="noopener noreferrer nofollow"
205
205
  :aria-label="type.label"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dashboard-shell-shell",
3
- "version": "3.0.5-test.14",
3
+ "version": "3.0.5-test.17",
4
4
  "description": "Rancher Dashboard Shell",
5
5
  "repository": "https://github.com/rancherlabs/dashboard",
6
6
  "license": "Apache-2.0",
@@ -183,7 +183,7 @@ export default {
183
183
  </button>
184
184
  </div>
185
185
  </div>
186
- <button
186
+ <!-- <button
187
187
  v-if="apiKeySchema"
188
188
  role="button"
189
189
  :aria-label="t('accountAndKeys.apiKeys.add.label')"
@@ -192,7 +192,7 @@ export default {
192
192
  @click="addKey"
193
193
  >
194
194
  {{ t('accountAndKeys.apiKeys.add.label') }}
195
- </button>
195
+ </button> -->
196
196
  </div>
197
197
 
198
198
  <div class="account_card mb-20">
@@ -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);
@@ -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;
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  # 执行命令示例:
4
- # TAG=shell-pkg-v3.0.5-test.8 ./shell/scripts/publish-shell.sh
4
+ # TAG=shell-pkg-v3.0.5-test.17 ./shell/scripts/publish-shell.sh
5
5
 
6
6
  set -euo pipefail
7
7