dashboard-shell-shell 3.0.5-test.4 → 3.0.5-test.6
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.
- package/assets/brand/harvester/favicon.png +0 -0
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/images/pl/half-logo.svg +23 -2
- package/assets/images/pl/harvester.png +0 -0
- package/assets/styles/app.scss +0 -4
- package/assets/styles/base/_basic.scss +2 -2
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/base/_typography.scss +1 -2
- package/assets/styles/base/_variables.scss +4 -11
- package/assets/styles/global/_button.scss +27 -45
- package/assets/styles/global/_columns.scss +1 -3
- package/assets/styles/global/_form.scss +13 -45
- package/assets/styles/global/_labeled-input.scss +26 -54
- package/assets/styles/global/_layout.scss +3 -8
- package/assets/styles/global/_select.scss +17 -25
- package/assets/styles/global/_table.scss +1 -7
- package/assets/styles/global/_tooltip.scss +6 -54
- package/assets/styles/themes/_dark.scss +0 -3
- package/assets/styles/themes/_light.scss +42 -63
- package/assets/styles/vendor/vue-select.scss +9 -22
- package/assets/translations/en-us.yaml +4 -28
- package/assets/translations/zh-hans.yaml +189 -376
- package/components/ActionDropdown.vue +1 -2
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +0 -2
- package/components/AppModal.vue +5 -46
- package/components/BrandImage.vue +0 -1
- package/components/ButtonDropdown.vue +4 -26
- package/components/ButtonMultiAction.vue +0 -1
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +6 -20
- package/components/ConsumptionGauge.vue +5 -24
- package/components/CruResource.vue +8 -9
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +17 -29
- package/components/ExplorerProjectsNamespaces.vue +5 -19
- package/components/GlobalRoleBindings.vue +48 -112
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +1 -3
- package/components/HardwareResourceGauge.vue +3 -39
- package/components/IndentedPanel.vue +10 -4
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +2 -28
- package/components/LabelValue.vue +1 -20
- package/components/ModalWithCard.vue +3 -12
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +11 -30
- package/components/ResourceDetail/Masthead/legacy.vue +38 -181
- package/components/ResourceDetail/legacy.vue +13 -29
- package/components/ResourceList/Masthead.vue +54 -226
- package/components/ResourceList/ResourceLoadingIndicator.vue +2 -5
- package/components/ResourceTable.vue +2 -24
- package/components/SideNav.vue +20 -74
- package/components/SortableTable/THead.vue +3 -33
- package/components/SortableTable/index.vue +464 -1017
- package/components/SortableTable/paging.js +16 -26
- package/components/SortableTable/selection.js +2 -2
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +29 -47
- package/components/YamlEditor.vue +1 -0
- package/components/auth/Principal.vue +12 -36
- package/components/auth/RoleDetailEdit.vue +7 -58
- package/components/auth/SelectPrincipal.vue +0 -1
- package/components/form/ArrayList.vue +33 -41
- package/components/form/ArrayListGrouped.vue +2 -10
- package/components/form/ArrayListSelect.vue +1 -1
- package/components/form/BannerSettings.vue +59 -64
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +8 -32
- package/components/form/Footer.vue +8 -11
- package/components/form/InputWithSelect.vue +5 -8
- package/components/form/KeyValue.vue +7 -47
- package/components/form/LabeledSelect.vue +241 -212
- package/components/form/Labels.vue +3 -3
- package/components/form/MatchExpressions.vue +7 -24
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -1
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +20 -59
- package/components/form/Password.vue +7 -16
- package/components/form/PodAffinity.vue +5 -4
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +17 -18
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +6 -3
- package/components/form/Select.vue +2 -5
- package/components/form/SimpleSecretSelector.vue +9 -29
- package/components/form/UnitInput.vue +3 -8
- package/components/formatter/BadgeStateFormatter.vue +5 -8
- package/components/formatter/LiveDate.vue +3 -3
- package/components/nav/Favorite.vue +1 -5
- package/components/nav/Group.vue +99 -132
- package/components/nav/Header.vue +27 -124
- package/components/nav/HeaderPageActionMenu.vue +0 -1
- package/components/nav/NamespaceFilter.vue +15 -19
- package/components/nav/TopLevelMenu.vue +119 -182
- package/components/nav/Type.vue +41 -63
- package/composables/useClickOutside.ts +1 -1
- package/config/private-label.js +11 -15
- package/config/product/auth.js +7 -17
- package/config/product/settings.js +9 -19
- package/config/settings.ts +0 -28
- package/config/table-headers.js +2 -3
- package/dialog/ForceMachineRemoveDialog.vue +2 -2
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/management.cattle.io.user.vue +4 -17
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +31 -31
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +12 -36
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
- package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
- package/edit/namespace.vue +2 -1
- package/edit/token.vue +12 -31
- package/edit/workload/index.vue +1 -1
- package/list/management.cattle.io.setting.vue +13 -22
- package/list/management.cattle.io.user.vue +3 -7
- package/list/namespace.vue +0 -3
- package/list/provisioning.cattle.io.cluster.vue +7 -6
- package/mixins/brand.js +0 -17
- package/package.json +1 -1
- package/pages/account/index.vue +12 -74
- package/pages/auth/login.vue +51 -214
- package/pages/auth/setup.vue +19 -142
- package/pages/c/_cluster/_product/namespaces.vue +4 -4
- package/pages/c/_cluster/auth/roles/index.vue +1 -19
- package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
- package/pages/c/_cluster/settings/banners.vue +102 -174
- package/pages/c/_cluster/settings/brand.vue +302 -350
- package/pages/c/_cluster/settings/performance.vue +38 -61
- package/pages/home.vue +30 -70
- package/pages/prefs.vue +25 -27
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/public/index.html +4 -4
- package/rancher-components/BadgeState/BadgeState.vue +4 -6
- package/rancher-components/Banner/Banner.vue +8 -12
- package/rancher-components/Card/Card.vue +8 -7
- package/rancher-components/Form/Checkbox/Checkbox.vue +0 -4
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +3 -42
- package/rancher-components/Form/Radio/RadioButton.vue +11 -35
- package/rancher-components/Form/Radio/RadioGroup.vue +5 -13
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +0 -1
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +4 -12
- package/rancher-components/RcDropdown/RcDropdown.vue +7 -35
- package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +4 -9
- package/rancher-components/RcDropdown/types.ts +0 -1
- package/rancher-components/StringList/StringList.vue +1 -1
- package/static/favicon.ico +0 -0
- package/static/favicon.png +0 -0
- package/static/loading-indicator.html +3 -3
- package/store/i18n.js +2 -2
- package/store/modal.ts +3 -3
- package/store/prefs.js +4 -11
- package/store/type-map.js +2 -32
- package/types/shell/index.d.ts +67 -74
- package/utils/error.js +8 -87
- package/utils/router.js +0 -21
- package/utils/select.js +3 -26
- package/utils/string.js +5 -8
- package/utils/title.ts +1 -1
- package/assets/icons/demo.css +0 -539
- package/assets/icons/demo.css:Zone.Identifier +0 -0
- package/assets/icons/demo_index.html +0 -1131
- package/assets/icons/demo_index.html:Zone.Identifier +0 -0
- package/assets/icons/iconfont.css +0 -216
- package/assets/icons/iconfont.css:Zone.Identifier +0 -0
- package/assets/icons/iconfont.js +0 -1
- package/assets/icons/iconfont.js:Zone.Identifier +0 -0
- package/assets/icons/iconfont.json +0 -324
- package/assets/icons/iconfont.json:Zone.Identifier +0 -0
- package/assets/icons/iconfont.ttf +0 -0
- package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff +0 -0
- package/assets/icons/iconfont.woff2 +0 -0
- package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
- package/assets/images/API.svg +0 -3
- package/assets/images/action.svg +0 -6
- package/assets/images/login/password.svg +0 -20
- package/assets/images/login/user.svg +0 -6
- package/assets/images/login-bg.png +0 -0
- package/assets/images/login-left.png +0 -0
- package/assets/images/login-logo.svg +0 -19
- package/assets/images/logo.png +0 -0
- package/assets/images/pl/logo.png +0 -0
- package/assets/images/promp-yellow.svg +0 -5
- package/assets/images/user.png +0 -0
- package/assets/styles/all.scss +0 -63
- package/components/DotState.vue +0 -84
- package/utils/errorTranslate.json +0 -1336
|
@@ -142,10 +142,9 @@ export default {
|
|
|
142
142
|
:to="{ name: 'c-cluster-auth-user.retention'}"
|
|
143
143
|
class="btn role-link btn-sm btn-user-retention"
|
|
144
144
|
data-testid="router-link-user-retention"
|
|
145
|
-
style="text-align: left;min-width: auto !important;width: auto;"
|
|
146
145
|
>
|
|
147
|
-
|
|
148
|
-
{{ t('user.retention.button.label') }}
|
|
146
|
+
<i class="icon icon-gear" />
|
|
147
|
+
{{ t('user.retention.button.label') }}
|
|
149
148
|
</router-link>
|
|
150
149
|
</template>
|
|
151
150
|
</Masthead>
|
|
@@ -172,11 +171,8 @@ export default {
|
|
|
172
171
|
|
|
173
172
|
<style lang="scss">
|
|
174
173
|
.btn-user-retention {
|
|
175
|
-
display:
|
|
174
|
+
display: flex;
|
|
176
175
|
gap: 0.25rem;
|
|
177
176
|
padding: 0;
|
|
178
177
|
}
|
|
179
|
-
.btn-user-retention:hover {
|
|
180
|
-
color: #333 !important;
|
|
181
|
-
}
|
|
182
178
|
</style>
|
package/list/namespace.vue
CHANGED
|
@@ -42,9 +42,6 @@ export default {
|
|
|
42
42
|
headers() {
|
|
43
43
|
const headersFromSchema = this.$store.getters['type-map/headersFor'](this.schema);
|
|
44
44
|
|
|
45
|
-
[headersFromSchema[0], headersFromSchema[1]] = [headersFromSchema[1], headersFromSchema[0]];
|
|
46
|
-
headersFromSchema[0].width = '200px';
|
|
47
|
-
headersFromSchema[1].width = '100px';
|
|
48
45
|
// harvester is reusing this namespace.js to render ns page, we need to make sure harvester backend support quota schema to show this column.
|
|
49
46
|
if (this.hasHarvesterResourceQuotaSchema && Array.isArray(headersFromSchema) && headersFromSchema.length > 1) {
|
|
50
47
|
const columnIdx = headersFromSchema.length - 1;
|
|
@@ -307,18 +307,19 @@ export default {
|
|
|
307
307
|
<router-link
|
|
308
308
|
v-if="row.mgmt && row.mgmt.isReady && !row.hasError"
|
|
309
309
|
data-testid="cluster-manager-list-explore-management"
|
|
310
|
+
class="btn btn-sm role-secondary"
|
|
310
311
|
:to="{name: 'c-cluster', params: {cluster: row.mgmt.id}}"
|
|
311
312
|
>
|
|
312
|
-
|
|
313
|
-
{{ t('cluster.explore') }}
|
|
314
|
-
</a>
|
|
313
|
+
{{ t('cluster.explore') }}
|
|
315
314
|
</router-link>
|
|
316
|
-
<
|
|
317
|
-
data-testid="cluster-manager-list-explore"
|
|
315
|
+
<button
|
|
318
316
|
v-else
|
|
317
|
+
data-testid="cluster-manager-list-explore"
|
|
318
|
+
:disabled="true"
|
|
319
|
+
class="btn btn-sm role-secondary"
|
|
319
320
|
>
|
|
320
321
|
{{ t('cluster.explore') }}
|
|
321
|
-
</
|
|
322
|
+
</button>
|
|
322
323
|
</template>
|
|
323
324
|
</ResourceTable>
|
|
324
325
|
</div>
|
package/mixins/brand.js
CHANGED
|
@@ -175,24 +175,7 @@ export default {
|
|
|
175
175
|
const vars = createCssVars(color, this.theme, name);
|
|
176
176
|
|
|
177
177
|
for (const prop in vars) {
|
|
178
|
-
|
|
179
178
|
document.body.style.setProperty(prop, vars[prop]);
|
|
180
|
-
|
|
181
|
-
// 主色调hover值动态
|
|
182
|
-
if (prop === '--primary-hover-bg') {
|
|
183
|
-
// 如果是你要设置透明度的变量,比如 hover
|
|
184
|
-
let value = '#E8F4FF';
|
|
185
|
-
if (vars[prop]) {
|
|
186
|
-
const match = vars[prop].match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
|
|
187
|
-
if (match) {
|
|
188
|
-
const [_, r, g, b] = match;
|
|
189
|
-
value = `rgba(${r}, ${g}, ${b}, 0.15)`;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
document.body.style.setProperty('--nav-hover-color', vars[prop]);
|
|
194
|
-
document.body.style.setProperty('--nav-active', value);
|
|
195
|
-
}
|
|
196
179
|
}
|
|
197
180
|
},
|
|
198
181
|
|
package/package.json
CHANGED
package/pages/account/index.vue
CHANGED
|
@@ -151,37 +151,21 @@ export default {
|
|
|
151
151
|
<template>
|
|
152
152
|
<Loading v-if="$fetchState.pending" />
|
|
153
153
|
<div v-else>
|
|
154
|
-
|
|
154
|
+
<BackLink :link="backLink" />
|
|
155
155
|
<h1>
|
|
156
156
|
<TabTitle breadcrumb="vendor-only">
|
|
157
157
|
{{ t('accountAndKeys.title') }}
|
|
158
158
|
</TabTitle>
|
|
159
|
-
</h1>
|
|
160
|
-
<div class="api-key-title mb-20">
|
|
161
|
-
{{ t('accountAndKeys.title') }}
|
|
162
|
-
</div>
|
|
159
|
+
</h1>
|
|
163
160
|
|
|
164
|
-
|
|
161
|
+
<h2 v-t="'accountAndKeys.account.title'" />
|
|
165
162
|
<div class="account">
|
|
166
|
-
<div class="account-title">
|
|
167
|
-
{{ t('accountAndKeys.account.title') }}
|
|
168
|
-
</div>
|
|
169
163
|
<Principal
|
|
170
164
|
:value="principal.id"
|
|
171
165
|
:use-muted="false"
|
|
172
166
|
:show-labels="true"
|
|
173
|
-
|
|
174
|
-
>
|
|
175
|
-
<template #edit>
|
|
176
|
-
<span
|
|
177
|
-
v-if="canChangePassword"
|
|
178
|
-
class="edit-pass-txt"
|
|
179
|
-
@click="$refs.promptChangePassword.show(true)"
|
|
180
|
-
>修改
|
|
181
|
-
</span>
|
|
182
|
-
</template>
|
|
183
|
-
</Principal>
|
|
184
|
-
<!-- <div>
|
|
167
|
+
/>
|
|
168
|
+
<div>
|
|
185
169
|
<button
|
|
186
170
|
v-if="canChangePassword"
|
|
187
171
|
role="button"
|
|
@@ -193,20 +177,13 @@ export default {
|
|
|
193
177
|
>
|
|
194
178
|
{{ t("accountAndKeys.account.change") }}
|
|
195
179
|
</button>
|
|
196
|
-
</div>
|
|
180
|
+
</div>
|
|
197
181
|
</div>
|
|
198
182
|
|
|
199
|
-
|
|
200
|
-
<div
|
|
201
|
-
style=" border: 1px solid #d7d7d7;padding: 20px 20px 0px 20px;"
|
|
202
|
-
class="mt-20">
|
|
183
|
+
<hr role="none">
|
|
203
184
|
<div class="keys-header">
|
|
204
185
|
<div>
|
|
205
|
-
|
|
206
|
-
<div
|
|
207
|
-
v-t="'accountAndKeys.apiKeys.title'"
|
|
208
|
-
class="account-title mb-20"
|
|
209
|
-
/>
|
|
186
|
+
<h2 v-t="'accountAndKeys.apiKeys.title'" />
|
|
210
187
|
<div class="api-url">
|
|
211
188
|
<span>{{ t("accountAndKeys.apiKeys.apiEndpoint") }}</span>
|
|
212
189
|
<CopyToClipboardText
|
|
@@ -228,7 +205,7 @@ export default {
|
|
|
228
205
|
</div>
|
|
229
206
|
<div
|
|
230
207
|
v-if="apiKeySchema"
|
|
231
|
-
class="keys
|
|
208
|
+
class="keys"
|
|
232
209
|
>
|
|
233
210
|
<ResourceTable
|
|
234
211
|
:schema="apiKeySchema"
|
|
@@ -239,20 +216,7 @@ export default {
|
|
|
239
216
|
:search="true"
|
|
240
217
|
:row-actions="true"
|
|
241
218
|
:table-actions="true"
|
|
242
|
-
|
|
243
|
-
<template #header-right>
|
|
244
|
-
<button
|
|
245
|
-
v-if="apiKeySchema"
|
|
246
|
-
role="button"
|
|
247
|
-
:aria-label="t('accountAndKeys.apiKeys.add.label')"
|
|
248
|
-
class="btn role-primary add mb-20"
|
|
249
|
-
data-testid="account_create_api_keys"
|
|
250
|
-
@click="addKey"
|
|
251
|
-
>
|
|
252
|
-
{{ t('accountAndKeys.apiKeys.add.label') }}
|
|
253
|
-
</button>
|
|
254
|
-
</template>
|
|
255
|
-
</ResourceTable>
|
|
219
|
+
/>
|
|
256
220
|
</div>
|
|
257
221
|
<div v-else>
|
|
258
222
|
<Banner
|
|
@@ -261,7 +225,6 @@ export default {
|
|
|
261
225
|
/>
|
|
262
226
|
</div>
|
|
263
227
|
</div>
|
|
264
|
-
</div>
|
|
265
228
|
</template>
|
|
266
229
|
|
|
267
230
|
<style lang='scss' scoped>
|
|
@@ -270,12 +233,8 @@ export default {
|
|
|
270
233
|
}
|
|
271
234
|
|
|
272
235
|
.account {
|
|
273
|
-
|
|
274
|
-
justify-content: space-between
|
|
275
|
-
border: 1px solid #D7D7D7;
|
|
276
|
-
padding: 20px;
|
|
277
|
-
box-sizing: border-box;
|
|
278
|
-
|
|
236
|
+
display: flex;
|
|
237
|
+
justify-content: space-between
|
|
279
238
|
}
|
|
280
239
|
|
|
281
240
|
.keys-header {
|
|
@@ -288,10 +247,8 @@ export default {
|
|
|
288
247
|
.keys {
|
|
289
248
|
display: flex;
|
|
290
249
|
flex-direction: column;
|
|
291
|
-
margin-top: 20px;
|
|
292
250
|
.add {
|
|
293
251
|
align-self: flex-end;
|
|
294
|
-
margin-left: 10px
|
|
295
252
|
}
|
|
296
253
|
}
|
|
297
254
|
|
|
@@ -302,23 +259,4 @@ export default {
|
|
|
302
259
|
margin-right: 6px;
|
|
303
260
|
}
|
|
304
261
|
}
|
|
305
|
-
.api-key-title{
|
|
306
|
-
font-size: 26px;
|
|
307
|
-
/* line-height: 20px; */
|
|
308
|
-
font-weight: 400;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.edit-pass-txt{
|
|
312
|
-
cursor: pointer;
|
|
313
|
-
color: var(--primary);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
.table-account{
|
|
317
|
-
border: 1px solid #d7d7d7;
|
|
318
|
-
}
|
|
319
|
-
.account-title{
|
|
320
|
-
font-size: 14px;
|
|
321
|
-
line-height: 19px;
|
|
322
|
-
margin-bottom: 16px;
|
|
323
|
-
}
|
|
324
262
|
</style>
|
package/pages/auth/login.vue
CHANGED
|
@@ -58,8 +58,7 @@ export default {
|
|
|
58
58
|
providerComponents: [],
|
|
59
59
|
customLoginError: {},
|
|
60
60
|
firstLogin: false,
|
|
61
|
-
vendor: getVendor()
|
|
62
|
-
imgLeft: require('~shell/assets/images/login-left.png')
|
|
61
|
+
vendor: getVendor()
|
|
63
62
|
};
|
|
64
63
|
},
|
|
65
64
|
|
|
@@ -255,13 +254,6 @@ export default {
|
|
|
255
254
|
|
|
256
255
|
async loginLocal(buttonCb) {
|
|
257
256
|
try {
|
|
258
|
-
// 临时 superadmin 处理
|
|
259
|
-
if (this.username === 'super#Admin') {
|
|
260
|
-
sessionStorage.setItem('TOPLEVELPERMISSIONS', 'superadmin')
|
|
261
|
-
this.username = 'admin'
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// 登录
|
|
265
257
|
await this.$store.dispatch('auth/login', {
|
|
266
258
|
provider: 'local',
|
|
267
259
|
body: {
|
|
@@ -270,7 +262,6 @@ export default {
|
|
|
270
262
|
}
|
|
271
263
|
});
|
|
272
264
|
|
|
273
|
-
// 获取当前用户信息
|
|
274
265
|
const user = await this.$store.dispatch('rancher/findAll', {
|
|
275
266
|
type: NORMAN.USER,
|
|
276
267
|
opt: { url: '/v3/users?me=true', load: _MULTI }
|
|
@@ -301,17 +292,13 @@ export default {
|
|
|
301
292
|
$plugin: this.$store.$plugin
|
|
302
293
|
});
|
|
303
294
|
|
|
304
|
-
|
|
305
|
-
// 登录跳转
|
|
306
295
|
if (this.firstLogin || user[0]?.mustChangePassword) {
|
|
307
296
|
this.$store.dispatch('auth/setInitialPass', this.password);
|
|
308
297
|
this.$router.push({ name: 'auth-setup' });
|
|
309
298
|
} else {
|
|
310
299
|
this.$router.push({ name: 'index' });
|
|
311
300
|
}
|
|
312
|
-
|
|
313
301
|
} catch (err) {
|
|
314
|
-
// 登录失败处理
|
|
315
302
|
this.err = err;
|
|
316
303
|
this.timedOut = null;
|
|
317
304
|
this.loggedOut = null;
|
|
@@ -332,22 +319,20 @@ export default {
|
|
|
332
319
|
v-else
|
|
333
320
|
class="main-layout login"
|
|
334
321
|
>
|
|
335
|
-
|
|
322
|
+
<TabTitle
|
|
336
323
|
:show-child="false"
|
|
337
324
|
:breadcrumb="false"
|
|
338
325
|
>
|
|
339
326
|
{{ `${vendor} - ${t('login.login')}` }}
|
|
340
|
-
</TabTitle>
|
|
327
|
+
</TabTitle>
|
|
341
328
|
<div class="row gutless mb-20">
|
|
342
|
-
<div class="col span-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
/>
|
|
350
|
-
</div>
|
|
329
|
+
<div class="col span-6 p-20">
|
|
330
|
+
<p class="text-center">
|
|
331
|
+
{{ t('login.howdy') }}
|
|
332
|
+
</p>
|
|
333
|
+
<h1 class="text-center login-welcome">
|
|
334
|
+
{{ t('login.welcome', {vendor}) }}
|
|
335
|
+
</h1>
|
|
351
336
|
<div
|
|
352
337
|
class="login-messages"
|
|
353
338
|
data-testid="login__messages"
|
|
@@ -358,10 +343,23 @@ export default {
|
|
|
358
343
|
:label="errorToDisplay"
|
|
359
344
|
color="error"
|
|
360
345
|
/>
|
|
346
|
+
<h4
|
|
347
|
+
v-else-if="loggedOut"
|
|
348
|
+
class="text-success text-center"
|
|
349
|
+
>
|
|
350
|
+
{{ loggedOutSuccessMsg }}
|
|
351
|
+
</h4>
|
|
352
|
+
<h4
|
|
353
|
+
v-else-if="timedOut"
|
|
354
|
+
class="text-error text-center"
|
|
355
|
+
>
|
|
356
|
+
{{ t('login.loginAgain') }}
|
|
357
|
+
</h4>
|
|
361
358
|
</div>
|
|
362
359
|
<div
|
|
363
360
|
v-if="firstLogin"
|
|
364
361
|
class="first-login-message pl-10 pr-10"
|
|
362
|
+
:class="{'mt-30': !hasLoginMessage}"
|
|
365
363
|
data-testid="first-login-message"
|
|
366
364
|
>
|
|
367
365
|
<t
|
|
@@ -383,7 +381,7 @@ export default {
|
|
|
383
381
|
/>
|
|
384
382
|
</li>
|
|
385
383
|
<li>
|
|
386
|
-
<CopyCode
|
|
384
|
+
<CopyCode>
|
|
387
385
|
docker logs <u>container-id</u> 2>&1 | grep "Bootstrap Password:"
|
|
388
386
|
</CopyCode>
|
|
389
387
|
</li>
|
|
@@ -403,7 +401,7 @@ export default {
|
|
|
403
401
|
/>
|
|
404
402
|
</div>
|
|
405
403
|
<br>
|
|
406
|
-
<CopyCode
|
|
404
|
+
<CopyCode>
|
|
407
405
|
{{ kubectlCmd }}
|
|
408
406
|
</CopyCode>
|
|
409
407
|
<br>
|
|
@@ -417,6 +415,7 @@ export default {
|
|
|
417
415
|
|
|
418
416
|
<div
|
|
419
417
|
v-if="(!hasLocal || (hasLocal && !showLocal)) && providers.length"
|
|
418
|
+
:class="{'mt-30': !hasLoginMessage}"
|
|
420
419
|
>
|
|
421
420
|
<component
|
|
422
421
|
:is="providerComponents[idx]"
|
|
@@ -433,35 +432,23 @@ export default {
|
|
|
433
432
|
<template v-if="hasLocal">
|
|
434
433
|
<form
|
|
435
434
|
v-if="showLocal"
|
|
435
|
+
:class="{'mt-30': !hasLoginMessage}"
|
|
436
436
|
@submit.prevent
|
|
437
437
|
>
|
|
438
|
-
<div class="
|
|
439
|
-
<div class="mb-20
|
|
440
|
-
<img
|
|
441
|
-
class="login-svg"
|
|
442
|
-
v-if="!firstLogin"
|
|
443
|
-
src="../../assets/images/login/user.svg"
|
|
444
|
-
alt=""
|
|
445
|
-
>
|
|
438
|
+
<div class="span-6 offset-3">
|
|
439
|
+
<div class="mb-20">
|
|
446
440
|
<LabeledInput
|
|
447
441
|
v-if="!firstLogin"
|
|
448
442
|
ref="username"
|
|
449
|
-
:placeholder="'请输入用户名'"
|
|
450
443
|
v-model:value.trim="username"
|
|
451
444
|
data-testid="local-login-username"
|
|
452
445
|
:label="t('login.username')"
|
|
453
446
|
autocomplete="username"
|
|
454
447
|
/>
|
|
455
448
|
</div>
|
|
456
|
-
<div class="
|
|
457
|
-
<img
|
|
458
|
-
class="login-svg"
|
|
459
|
-
src="../../assets/images/login/password.svg"
|
|
460
|
-
alt=""
|
|
461
|
-
>
|
|
449
|
+
<div class="">
|
|
462
450
|
<Password
|
|
463
451
|
ref="password"
|
|
464
|
-
:placeholder="'请输入密码'"
|
|
465
452
|
v-model:value="password"
|
|
466
453
|
data-testid="local-login-password"
|
|
467
454
|
:label="t('login.password')"
|
|
@@ -469,21 +456,8 @@ export default {
|
|
|
469
456
|
/>
|
|
470
457
|
</div>
|
|
471
458
|
</div>
|
|
472
|
-
<div
|
|
473
|
-
v-if="!firstLogin"
|
|
474
|
-
class="mt-20 remeber-login"
|
|
475
|
-
>
|
|
476
|
-
<div class="checkbox-login">
|
|
477
|
-
<Checkbox
|
|
478
|
-
v-model:value="remember"
|
|
479
|
-
:label="t('login.remember.label')"
|
|
480
|
-
type="checkbox"
|
|
481
|
-
/>
|
|
482
|
-
</div>
|
|
483
|
-
</div>
|
|
484
459
|
<div class="mt-20">
|
|
485
460
|
<div class="col span-12 text-center">
|
|
486
|
-
|
|
487
461
|
<AsyncButton
|
|
488
462
|
id="submit"
|
|
489
463
|
data-testid="login-submit"
|
|
@@ -494,7 +468,16 @@ export default {
|
|
|
494
468
|
:error-label="t('asyncButton.default.error')"
|
|
495
469
|
@click="loginLocal"
|
|
496
470
|
/>
|
|
497
|
-
|
|
471
|
+
<div
|
|
472
|
+
v-if="!firstLogin"
|
|
473
|
+
class="mt-20"
|
|
474
|
+
>
|
|
475
|
+
<Checkbox
|
|
476
|
+
v-model:value="remember"
|
|
477
|
+
:label="t('login.remember.label')"
|
|
478
|
+
type="checkbox"
|
|
479
|
+
/>
|
|
480
|
+
</div>
|
|
498
481
|
</div>
|
|
499
482
|
</div>
|
|
500
483
|
</form>
|
|
@@ -527,23 +510,24 @@ export default {
|
|
|
527
510
|
v-if="showLocaleSelector && hasMultipleLocales && !isHarvester"
|
|
528
511
|
class="locale-selector"
|
|
529
512
|
>
|
|
530
|
-
|
|
513
|
+
<LocaleSelector
|
|
531
514
|
mode="login"
|
|
532
|
-
/>
|
|
515
|
+
/>
|
|
533
516
|
</div>
|
|
534
|
-
<div class="copyright">Copyright 2019-2025 HCI</div>
|
|
535
517
|
</div>
|
|
518
|
+
<BrandImage
|
|
519
|
+
class="col span-6 landscape"
|
|
520
|
+
data-testid="login-landscape__img"
|
|
521
|
+
file-name="login-landscape.svg"
|
|
522
|
+
:alt="t('login.landscapeAlt')"
|
|
523
|
+
/>
|
|
536
524
|
</div>
|
|
537
525
|
</div>
|
|
538
526
|
</template>
|
|
539
527
|
|
|
540
528
|
<style lang="scss" scoped>
|
|
541
|
-
.login-username {
|
|
542
|
-
|
|
543
|
-
}
|
|
544
529
|
.login {
|
|
545
530
|
overflow: hidden;
|
|
546
|
-
padding: 0px 10%;
|
|
547
531
|
position: relative; // Used to keep the locale selector positioned correctly
|
|
548
532
|
|
|
549
533
|
.row {
|
|
@@ -566,33 +550,21 @@ export default {
|
|
|
566
550
|
align-items: center;
|
|
567
551
|
|
|
568
552
|
.banner {
|
|
569
|
-
|
|
570
|
-
|
|
553
|
+
margin: 5px;
|
|
571
554
|
}
|
|
572
555
|
h4 {
|
|
573
556
|
margin: 0;
|
|
574
557
|
}
|
|
575
558
|
&--hasContent {
|
|
576
|
-
|
|
577
|
-
/* margin-left: 20px; */
|
|
559
|
+
min-height: 70px;
|
|
578
560
|
}
|
|
579
561
|
|
|
580
562
|
.text-error, .banner {
|
|
581
|
-
max-width:
|
|
582
|
-
justify-content: center;
|
|
563
|
+
max-width: 80%;
|
|
583
564
|
}
|
|
584
565
|
}
|
|
585
566
|
|
|
586
567
|
.first-login-message {
|
|
587
|
-
background-color: rgba(160, 160, 160, 0.17);
|
|
588
|
-
color: #fff;
|
|
589
|
-
box-sizing: border-box;
|
|
590
|
-
padding: 10px 0;
|
|
591
|
-
margin: 0 auto;
|
|
592
|
-
margin-top: -20px;
|
|
593
|
-
width: 400px;
|
|
594
|
-
height: 40%;
|
|
595
|
-
overflow-y: scroll;
|
|
596
568
|
.banner {
|
|
597
569
|
margin-bottom: 0;
|
|
598
570
|
border-left: 0;
|
|
@@ -602,12 +574,6 @@ export default {
|
|
|
602
574
|
padding: 0;
|
|
603
575
|
}
|
|
604
576
|
}
|
|
605
|
-
ul {
|
|
606
|
-
list-style: none;
|
|
607
|
-
li{
|
|
608
|
-
margin-bottom: 10px;
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
577
|
}
|
|
612
578
|
}
|
|
613
579
|
|
|
@@ -620,138 +586,9 @@ export default {
|
|
|
620
586
|
height: 100%;
|
|
621
587
|
place-content: center;
|
|
622
588
|
}
|
|
623
|
-
&>.span-5{
|
|
624
|
-
height: 53%;
|
|
625
|
-
background-color: rgba(68, 68, 68, 0.17);
|
|
626
|
-
position: relative;
|
|
627
|
-
}
|
|
628
589
|
}
|
|
629
590
|
.locale-selector {
|
|
630
591
|
position: absolute;
|
|
631
592
|
bottom: 30px;
|
|
632
593
|
}
|
|
633
|
-
|
|
634
|
-
.login::before {
|
|
635
|
-
content: "";
|
|
636
|
-
position: absolute;
|
|
637
|
-
top: 0;
|
|
638
|
-
left: 0;
|
|
639
|
-
width: 100%;
|
|
640
|
-
height: 100%;
|
|
641
|
-
background-image:url('../../assets/images/login-bg.png');
|
|
642
|
-
background-size: cover;
|
|
643
|
-
background-position: 100%;
|
|
644
|
-
z-index: -2;
|
|
645
|
-
}
|
|
646
|
-
.img-left{
|
|
647
|
-
height: 53%;
|
|
648
|
-
position: relative;
|
|
649
|
-
}
|
|
650
|
-
.img-left::before{
|
|
651
|
-
content: "";
|
|
652
|
-
position: absolute;
|
|
653
|
-
top: 0;
|
|
654
|
-
left: 0;
|
|
655
|
-
width: 100%;
|
|
656
|
-
height: 100%;
|
|
657
|
-
background-image:url('../../assets/images/login-left.png');
|
|
658
|
-
background-size: cover;
|
|
659
|
-
background-position: 50%;
|
|
660
|
-
z-index: -1;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
.login-form-display-label {
|
|
666
|
-
display: flex;
|
|
667
|
-
flex-direction: column;
|
|
668
|
-
align-items: center;
|
|
669
|
-
&:deep() label{
|
|
670
|
-
display: none;
|
|
671
|
-
width: 0px;
|
|
672
|
-
}
|
|
673
|
-
&:deep() .addon{
|
|
674
|
-
position: absolute;
|
|
675
|
-
top: 16px !important;
|
|
676
|
-
right: 24px;
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
.login-input-all {
|
|
682
|
-
&:deep() .labeled-input{
|
|
683
|
-
background-color: #fff;
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
.login-input-all-svg{
|
|
688
|
-
position: relative;
|
|
689
|
-
&:deep() INPUT{
|
|
690
|
-
height: 50px;
|
|
691
|
-
padding-left: 50px;
|
|
692
|
-
font-size: 14px;
|
|
693
|
-
color: #333;
|
|
694
|
-
background-color: #fff;
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
.login-input-all-svg{
|
|
698
|
-
&:deep() .addon {
|
|
699
|
-
top: 15px !important;
|
|
700
|
-
right: 12px !important;
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
.login-svg{
|
|
704
|
-
position: absolute;
|
|
705
|
-
top: 12px;
|
|
706
|
-
left: 15px;
|
|
707
|
-
width: 24px;
|
|
708
|
-
z-index: 1;
|
|
709
|
-
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
.remeber-login{
|
|
713
|
-
display: flex;
|
|
714
|
-
justify-content: center
|
|
715
|
-
|
|
716
|
-
}
|
|
717
|
-
.checkbox-login{
|
|
718
|
-
width: 400px;
|
|
719
|
-
display: flex;
|
|
720
|
-
justify-content: flex-end;
|
|
721
|
-
}
|
|
722
|
-
.gutless {
|
|
723
|
-
&:deep() button{
|
|
724
|
-
width: 400px;
|
|
725
|
-
height: 50px !important;
|
|
726
|
-
border-radius: 4px;
|
|
727
|
-
font-size: 14px;
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
:deep() .checkbox-label{
|
|
731
|
-
color: #fff;
|
|
732
|
-
}
|
|
733
|
-
.copyright{
|
|
734
|
-
color: #fff;
|
|
735
|
-
/* font-size: 14px; */
|
|
736
|
-
line-height: 15px;
|
|
737
|
-
position: absolute;
|
|
738
|
-
left: 36%;
|
|
739
|
-
width: 100%;
|
|
740
|
-
bottom: 10px;
|
|
741
|
-
}
|
|
742
|
-
.logo-login{
|
|
743
|
-
display: flex;
|
|
744
|
-
justify-content: center;
|
|
745
|
-
margin-top: 30px;
|
|
746
|
-
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
@media only screen and (max-width: 1439px) {
|
|
750
|
-
.logo-login{
|
|
751
|
-
display: flex;
|
|
752
|
-
justify-content: center;
|
|
753
|
-
margin-top: 0px;
|
|
754
|
-
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
594
|
</style>
|