bfg-common 1.5.684 → 1.5.686

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.
@@ -202,6 +202,7 @@
202
202
  "changeComputeResourceOnly": "Змяніць толькі вылічальны рэсурс",
203
203
  "changeIdentityProvider": "Змяніць пастаўшчыка пасведчанняў",
204
204
  "changePassword": "Змяніць пароль",
205
+ "setYourPassword": "Усталюйце пароль",
205
206
  "changePasswordError": "Няправільны пароль!",
206
207
  "changeProviderTooltipContent": "Сервер VCENTER Server падтрымлівае знешніх пастаўшчыкоў пасведчанняў для кіравання карыстальнікамі і групамі. Вы можаце перайсці ад выкарыстання убудаванага пастаўшчыка пасведчанняў VCENTER Server да знешняга пастаўшчыку пасведчанняў. Дадатковыя звесткі гл. у дакументацыі vSphere.",
207
208
  "changeRole": "Змяніць ролю",
@@ -201,6 +201,7 @@
201
201
  "changeComputeResourceOnly": "Change compute resource only",
202
202
  "changeIdentityProvider": "Change Identity Provider",
203
203
  "changePassword": "Change Password",
204
+ "setYourPassword": "Set Your Password",
204
205
  "changePasswordError": "Invalid password!",
205
206
  "changeProviderTooltipContent": "Sphere Zone supports external identity providers to manage your users and groups. You can migrate from using the embedded Sphere Zone identity provider to an external identity provider. For more information, see the vSphere documentation.",
206
207
  "changeRole": "Change Role",
@@ -201,6 +201,7 @@
201
201
  "changeComputeResourceOnly": "Փոխեք միայն հաշվողական ռեսուրսը",
202
202
  "changeIdentityProvider": "Փոխել ինքնության մատակարարին",
203
203
  "changePassword": "Փոխել գաղտնաբառը",
204
+ "setYourPassword": "Սահմանեք ձեր գաղտնաբառը",
204
205
  "changePasswordError": "Սխալ գաղտնաբառ!",
205
206
  "changeProviderTooltipContent": "VCenter Server-ն աջակցում է արտաքին ինքնության մատակարարներին ՝ Ձեր օգտվողներին և խմբերին կառավարելու համար: Դուք կարող եք անցնել Sphere Zone-ի ներկառուցված ինքնության մատակարարից դեպի արտաքին ինքնության մատակարար: Լրացուցիչ տեղեկությունների համար տես vSphere փաստաթղթերը:",
206
207
  "changeRole": "Փոխել դերը",
@@ -201,6 +201,7 @@
201
201
  "changeComputeResourceOnly": "Тек ресурсты өзгертіңіз",
202
202
  "changeIdentityProvider": "Идентификатор провайдерін өзгерту",
203
203
  "changePassword": "Құпия сөзді өзгерту",
204
+ "setYourPassword": "Құпиясөзді орнатыңыз",
204
205
  "changePasswordError": "Қате құпия сөз!",
205
206
  "changeProviderTooltipContent": "VCenter сервері пайдаланушылар мен топтарды басқару үшін сыртқы жеке куәлік жеткізушілерін қолдайды. Кірістірілген Sphere Zone жеке куәлік провайдерін пайдаланудан Сыртқы жеке куәлік провайдеріне өтуге болады. Қосымша ақпарат алу үшін vSphere құжаттамасын қараңыз.",
206
207
  "changeRole": "Рөлді өзгерту",
@@ -201,6 +201,7 @@
201
201
  "changeComputeResourceOnly": "Изменить только вычислительный ресурс",
202
202
  "changeIdentityProvider": "Изменить провайдера идентификации",
203
203
  "changePassword": "Изменить пароль",
204
+ "setYourPassword": "Установите пароль",
204
205
  "changePasswordError": "Неверный пароль!",
205
206
  "changeProviderTooltipContent": "Сервер Sphere Zone поддерживает внешних поставщиков удостоверений для управления вашими пользователями и группами. Вы можете перейти от использования встроенного поставщика удостоверений Sphere Zone к внешнему поставщику удостоверений. Дополнительные сведения см. в документации vSphere.",
206
207
  "changeRole": "Сменить роль",
@@ -201,6 +201,7 @@
201
201
  "changeComputeResourceOnly": "仅编辑计算资源",
202
202
  "changeIdentityProvider": "更改身份提供商",
203
203
  "changePassword": "更改密码",
204
+ "setYourPassword": "设置您的密码",
204
205
  "changePasswordError": "密码错误!",
205
206
  "changeProviderTooltipContent": "Sphere Zoneは、ユーザーとグループを管理するための外部idプロバイダをサポートしています。 組み込みのSphere Zone idプロバイダを使用してから外部idプロバイダに移行できます。 詳細については、vSphereのドキュメントを参照してください。",
206
207
  "changeRole": "改变角色",
@@ -169,7 +169,7 @@
169
169
  color: #000000;
170
170
  font-size: 32px;
171
171
  font-weight: 400;
172
- line-height: 38px;
172
+ line-height: 44px;
173
173
  margin-bottom: 48px;
174
174
  span {
175
175
  font-size: 32px;
@@ -180,8 +180,18 @@
180
180
  margin-bottom: 48px;
181
181
  }
182
182
  &__input {
183
+ &:before {
184
+ content: '';
185
+ position: absolute;
186
+ top: 0;
187
+ left: 0;
188
+ right: 0;
189
+ bottom: 0;
190
+ background-color: var(--input-bg);
191
+ border-radius: 8px;
192
+ }
183
193
  :deep(.ui-main-input) {
184
- background-color: #fafafa;
194
+ background-color: var(--input-bg);
185
195
  }
186
196
  :deep(input.ui-main-input:-internal-autofill-selected),
187
197
  :deep(input.ui-main-input:-internal-autofill-selected:hover),
@@ -189,7 +199,7 @@
189
199
  :deep(input.ui-main-input:-internal-autofill-selected:focus) {
190
200
  appearance: menulist-button;
191
201
  background-image: none !important;
192
- background-color: #fafafa !important;
202
+ background-color: var(--input-bg) !important;
193
203
  color: fieldtext !important;
194
204
  -webkit-background-clip: text;
195
205
  }
@@ -210,11 +220,11 @@
210
220
  }
211
221
  }
212
222
  &__checkbox {
213
- margin-top: 18px;
223
+ margin-top: 16px;
214
224
  }
215
225
  &__button {
216
226
  @include flex($just: center, $align: center);
217
- margin-top: 72px;
227
+ margin-top: 32px;
218
228
  height: 44px;
219
229
  border-radius: 8px;
220
230
  :deep(svg) {
@@ -1,93 +1,90 @@
1
- <template>
2
- <component
3
- :is="currentComponent"
4
- v-model="form"
5
- :subtitle="props.hostname"
6
- :project="props.project"
7
- :first-time="props.firstTime"
8
- @change-password="onChangePassword"
9
- @hide="onHideModal"
10
- />
11
- </template>
12
-
13
- <script setup lang="ts">
14
- import type { UI_I_Localization } from '~/lib/models/interfaces'
15
- import type { API_UI_I_Error } from '~/lib/models/store/interfaces'
16
- import type {
17
- UI_I_ChangePasswordBodyRequest, UI_I_ChangePasswordFirstTimeBodyRequest,
18
- UI_I_ChangePasswordForm,
19
- } from '~/components/common/layout/theHeader/userMenu/modals/changePassword/lib/models/interfaces'
20
- import type { UI_T_Project } from '~/lib/models/types'
21
- // import {} from '#build/components/common/layout/theHeader/userMenu/modals/changePassword/lib/models/interfaces'
22
-
23
- const props = withDefaults(
24
- defineProps<{
25
- hostname: string
26
- project: UI_T_Project
27
- firstTime?: boolean
28
- }>(),
29
- { firstTime: false }
30
- )
31
- const isShowModalLocal = defineModel<boolean>({ required: true })
32
-
33
- const localization = computed<UI_I_Localization>(() => useLocal())
34
- const { $store }: any = useNuxtApp()
35
-
36
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
37
- const currentComponent = computed(() =>
38
- isNewView.value
39
- ? defineAsyncComponent(() => import('./New.vue'))
40
- : defineAsyncComponent(() => import('./Old.vue'))
41
- )
42
-
43
- const form = ref<UI_I_ChangePasswordForm>({
44
- current_password: '',
45
- new_password: '',
46
- confirm_password: '',
47
- })
48
-
49
- const onChangePassword = async (): Promise<void> => {
50
- const { current_password, new_password } = form.value
51
-
52
- onHideModal()
53
-
54
- let sendData: UI_I_ChangePasswordBodyRequest | UI_I_ChangePasswordFirstTimeBodyRequest = {
55
- current_password,
56
- new_password,
57
- }
58
-
59
- let url = ''
60
- if (props.firstTime || props.project === 'sphere') {
61
- sendData = {
62
- password: new_password
63
- }
64
- url = 'ui/users/current/change_password'
65
- } else if (props.project === 'procurator') {
66
- url = '/ui/passwd'
67
- }
68
-
69
- const { error } = await useMyFetch<never, API_UI_I_Error>(url, {
70
- method: 'POST',
71
- body: sendData,
72
- key: Date.now().toString(),
73
- })
74
-
75
- if (error.value?.data && error.value.data.error_code !== 0) {
76
- const errorText = error.value.data?.error_message || error.value.data
77
-
78
- $store.dispatch('main/A_SHOW_NOTIFICATION', {
79
- status: 'error',
80
- headline: localization.value.common.operationFailed,
81
- messages: [
82
- {
83
- title: localization.value.common.error,
84
- descriptions: [errorText],
85
- },
86
- ],
87
- })
88
- }
89
- }
90
- const onHideModal = (): void => {
91
- isShowModalLocal.value = false
92
- }
93
- </script>
1
+ <template>
2
+ <component
3
+ :is="currentComponent"
4
+ v-model="form"
5
+ :subtitle="props.hostname"
6
+ :project="props.project"
7
+ @change-password="onChangePassword"
8
+ @hide="onHideModal"
9
+ />
10
+ </template>
11
+
12
+ <script setup lang="ts">
13
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
14
+ import type { API_UI_I_Error } from '~/lib/models/store/interfaces'
15
+ import type {
16
+ UI_I_ChangePasswordBodyRequest,
17
+ UI_I_ChangePasswordFirstTimeBodyRequest,
18
+ UI_I_ChangePasswordForm,
19
+ } from '~/components/common/layout/theHeader/userMenu/modals/changePassword/lib/models/interfaces'
20
+ import type { UI_T_Project } from '~/lib/models/types'
21
+
22
+ const props = defineProps<{
23
+ hostname: string
24
+ project: UI_T_Project
25
+ }>()
26
+ const isShowModalLocal = defineModel<boolean>({ required: true })
27
+
28
+ const localization = computed<UI_I_Localization>(() => useLocal())
29
+ const { $store }: any = useNuxtApp()
30
+
31
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
32
+ const currentComponent = computed(() =>
33
+ isNewView.value
34
+ ? defineAsyncComponent(() => import('./New.vue'))
35
+ : defineAsyncComponent(() => import('./Old.vue'))
36
+ )
37
+
38
+ const form = ref<UI_I_ChangePasswordForm>({
39
+ current_password: '',
40
+ new_password: '',
41
+ confirm_password: '',
42
+ })
43
+
44
+ const onChangePassword = async (): Promise<void> => {
45
+ const { current_password, new_password } = form.value
46
+
47
+ onHideModal()
48
+
49
+ let sendData:
50
+ | UI_I_ChangePasswordBodyRequest
51
+ | UI_I_ChangePasswordFirstTimeBodyRequest = {
52
+ current_password,
53
+ new_password,
54
+ }
55
+
56
+ let url = ''
57
+ if (props.project === 'sphere') {
58
+ sendData = {
59
+ password: new_password,
60
+ }
61
+ url = 'ui/users/current/change_password'
62
+ } else if (props.project === 'procurator') {
63
+ url = '/ui/passwd'
64
+ }
65
+
66
+ const { error } = await useMyFetch<never, API_UI_I_Error>(url, {
67
+ method: 'POST',
68
+ body: sendData,
69
+ key: Date.now().toString(),
70
+ })
71
+
72
+ if (error.value?.data && error.value.data.error_code !== 0) {
73
+ const errorText = error.value.data?.error_message || error.value.data
74
+
75
+ $store.dispatch('main/A_SHOW_NOTIFICATION', {
76
+ status: 'error',
77
+ headline: localization.value.common.operationFailed,
78
+ messages: [
79
+ {
80
+ title: localization.value.common.error,
81
+ descriptions: [errorText],
82
+ },
83
+ ],
84
+ })
85
+ }
86
+ }
87
+ const onHideModal = (): void => {
88
+ isShowModalLocal.value = false
89
+ }
90
+ </script>
@@ -1,193 +1,186 @@
1
- <template>
2
- <ui-modal
3
- :title="localization.common.changePassword"
4
- :texts="modalTexts"
5
- :subtitle="props.subtitle"
6
- width="560px"
7
- test-id="change-password-modal"
8
- show
9
- @submit="onSubmit"
10
- @hide="onHideModal"
11
- >
12
- <template #content>
13
- <ui-modal-block-standard>
14
- <ui-alert
15
- v-if="alertErrorText"
16
- :messages="[alertErrorText]"
17
- test-id="change-password-error-alert"
18
- type="error"
19
- class="change-password__alert"
20
- hide-close-button
21
- />
22
-
23
- <p class="change-password__description">
24
- {{ description }}
25
- </p>
26
-
27
- <div class="change-password__form">
28
- <ui-input
29
- v-model="modelLocal.current_password"
30
- :label="localization.common.currentPassword"
31
- :error="passwordErrorText"
32
- :autocomplete="'new-password'"
33
- type="password"
34
- test-id="change-password-password-field"
35
- />
36
-
37
- <ui-input
38
- v-model="modelLocal.new_password"
39
- :label="localization.common.newPassword"
40
- :error="newPasswordErrorText"
41
- test-id="change-password-new-password-field"
42
- type="password"
43
- />
44
-
45
- <ui-input
46
- v-model="modelLocal.confirm_password"
47
- :label="localization.common.confirmNewPassword"
48
- :error="confirmPasswordErrorText"
49
- test-id="change-password-confirm-password-field"
50
- type="password"
51
- />
52
- </div>
53
- </ui-modal-block-standard>
54
- </template>
55
-
56
- <template #footerLeftContent><span /></template>
57
- </ui-modal>
58
- </template>
59
-
60
- <script setup lang="ts">
61
- import type { UI_I_ModalTexts } from '~/node_modules/bfg-uikit/components/ui/modal/models/interfaces'
62
- import type { UI_I_Localization } from '~/lib/models/interfaces'
63
- import type { UI_I_ChangePasswordForm } from '~/components/common/layout/theHeader/userMenu/modals/changePassword/lib/models/interfaces'
64
- import type { UI_T_Project } from '~/lib/models/types'
65
- import type { UI_I_InitialValidationFields } from '~/components/common/layout/theHeader/userMenu/modals/changePassword/lib/models/interfaces'
66
- import {
67
- validateField,
68
- getPasswordMismatchError,
69
- } from '~/components/common/layout/theHeader/userMenu/modals/changePassword/lib/utils'
70
-
71
- const props = defineProps<{
72
- project: UI_T_Project
73
- subtitle: string
74
- firstTime: boolean
75
- }>()
76
- const emits = defineEmits<{
77
- (event: 'hide'): void
78
- (event: 'change-password'): void
79
- }>()
80
- const modelLocal = defineModel<UI_I_ChangePasswordForm>({ required: true })
81
-
82
- const localization = computed<UI_I_Localization>(() => useLocal())
83
-
84
- const description = ref<string>(props.firstTime
85
- ? localization.value.common.firstTimeChangePasswordDesc
86
- : localization.value.common.changePasswordDesc)
87
-
88
- const modalTexts = computed<UI_I_ModalTexts>(() => {
89
- return {
90
- button1: localization.value.common.cancel,
91
- button2: localization.value.common.save,
92
- }
93
- })
94
-
95
- const alertErrorText = ref<string>('')
96
- const initValidationFields = ref<UI_I_InitialValidationFields>({
97
- currentPassword: false,
98
- newPassword: false,
99
- confirmPassword: false,
100
- })
101
- const initValidation = (types: string[]): boolean => {
102
- types.forEach((type) => (initValidationFields.value[type] = true))
103
-
104
- return (
105
- !!passwordErrorText.value ||
106
- !!newPasswordErrorText.value ||
107
- !!confirmPasswordErrorText.value
108
- )
109
- }
110
-
111
- const passwordErrorText = computed<string>(() => {
112
- if (!initValidationFields.value.currentPassword) return ''
113
-
114
- return !modelLocal.value.current_password
115
- ? localization.value.common.fieldRequired
116
- : ''
117
- })
118
- const newPasswordErrorText = computed<string>(() => {
119
- if (!initValidationFields.value.newPassword) return ''
120
-
121
- const { new_password, confirm_password } = modelLocal.value
122
- return !new_password
123
- ? localization.value.common.fieldRequired
124
- : getPasswordMismatchError(
125
- localization.value,
126
- new_password,
127
- confirm_password
128
- )
129
- })
130
- const confirmPasswordErrorText = computed<string>(() => {
131
- if (!initValidationFields.value.confirmPassword) return ''
132
- const { new_password, confirm_password } = modelLocal.value
133
- return !confirm_password
134
- ? localization.value.common.fieldRequired
135
- : getPasswordMismatchError(
136
- localization.value,
137
- new_password,
138
- confirm_password
139
- )
140
- })
141
- const onSubmit = (): void => {
142
- const isFieldValid = initValidation([
143
- 'currentPassword',
144
- 'newPassword',
145
- 'confirmPassword',
146
- ])
147
-
148
- const { current_password, new_password } = modelLocal.value
149
-
150
- if (!isFieldValid) {
151
- alertErrorText.value = validateField(
152
- localization.value,
153
- current_password,
154
- new_password
155
- )
156
- }
157
-
158
- !isFieldValid && !alertErrorText.value && emits('change-password')
159
- }
160
- const onHideModal = (): void => {
161
- emits('hide')
162
- }
163
- </script>
164
-
165
- <style lang="scss" scoped>
166
- @import 'assets/scss/common/mixins.scss';
167
- .modal-container-standard {
168
- padding-top: 8px;
169
- padding-bottom: 8px;
170
-
171
- .change-password {
172
- &__description {
173
- color: #9da6ad;
174
- font-size: 12px;
175
- font-weight: 400;
176
- line-height: 14.52px;
177
- margin-bottom: 20px;
178
- }
179
- &__alert {
180
- padding: 10px 12px;
181
- margin-bottom: 12px;
182
- :deep(svg) {
183
- width: 16px;
184
- height: 16px;
185
- }
186
- }
187
- &__form {
188
- @include flex($dir: column);
189
- row-gap: 16px;
190
- }
191
- }
192
- }
193
- </style>
1
+ <template>
2
+ <ui-modal
3
+ :title="localization.common.changePassword"
4
+ :texts="modalTexts"
5
+ :subtitle="props.subtitle"
6
+ width="560px"
7
+ test-id="change-password-modal"
8
+ show
9
+ @submit="onSubmit"
10
+ @hide="onHideModal"
11
+ >
12
+ <template #content>
13
+ <ui-modal-block-standard>
14
+ <p class="change-password__description">
15
+ {{ description }}
16
+ </p>
17
+
18
+ <div class="change-password__form">
19
+ <ui-input
20
+ v-model="modelLocal.current_password"
21
+ :label="localization.common.currentPassword"
22
+ :error="passwordErrorText"
23
+ :autocomplete="'new-password'"
24
+ type="password"
25
+ test-id="change-password-password-field"
26
+ />
27
+
28
+ <ui-input
29
+ v-model="modelLocal.new_password"
30
+ :label="localization.common.newPassword"
31
+ :error="newPasswordErrorText"
32
+ test-id="change-password-new-password-field"
33
+ type="password"
34
+ />
35
+
36
+ <ui-input
37
+ v-model="modelLocal.confirm_password"
38
+ :label="localization.common.confirmNewPassword"
39
+ :error="confirmPasswordErrorText"
40
+ test-id="change-password-confirm-password-field"
41
+ type="password"
42
+ />
43
+ </div>
44
+ </ui-modal-block-standard>
45
+ </template>
46
+
47
+ <template #footerLeftContent><span /></template>
48
+ </ui-modal>
49
+ </template>
50
+
51
+ <script setup lang="ts">
52
+ import type { UI_I_ModalTexts } from '~/node_modules/bfg-uikit/components/ui/modal/models/interfaces'
53
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
54
+ import type { UI_I_ChangePasswordForm } from '~/components/common/layout/theHeader/userMenu/modals/changePassword/lib/models/interfaces'
55
+ import type { UI_T_Project } from '~/lib/models/types'
56
+ import type { UI_I_InitialValidationFields } from '~/components/common/layout/theHeader/userMenu/modals/changePassword/lib/models/interfaces'
57
+ import {
58
+ validateField,
59
+ getPasswordMismatchError,
60
+ } from '~/components/common/layout/theHeader/userMenu/modals/changePassword/lib/utils'
61
+
62
+ const props = defineProps<{
63
+ project: UI_T_Project
64
+ subtitle: string
65
+ }>()
66
+ const emits = defineEmits<{
67
+ (event: 'hide'): void
68
+ (event: 'change-password'): void
69
+ }>()
70
+ const modelLocal = defineModel<UI_I_ChangePasswordForm>({ required: true })
71
+
72
+ const localization = computed<UI_I_Localization>(() => useLocal())
73
+
74
+ const description = ref<string>(localization.value.common.changePasswordDesc)
75
+
76
+ const modalTexts = computed<UI_I_ModalTexts>(() => {
77
+ return {
78
+ button1: localization.value.common.cancel,
79
+ button2: localization.value.common.save,
80
+ }
81
+ })
82
+
83
+ const initValidationFields = ref<UI_I_InitialValidationFields>({
84
+ currentPassword: false,
85
+ newPassword: false,
86
+ confirmPassword: false,
87
+ })
88
+ const initValidation = (types: string[]): boolean => {
89
+ types.forEach((type) => (initValidationFields.value[type] = true))
90
+
91
+ return (
92
+ !!passwordErrorText.value ||
93
+ !!newPasswordErrorText.value ||
94
+ !!confirmPasswordErrorText.value
95
+ )
96
+ }
97
+
98
+ const passwordErrorText = computed<string>(() => {
99
+ if (!initValidationFields.value.currentPassword) return ''
100
+
101
+ if (!modelLocal.value.current_password) {
102
+ return localization.value.common.fieldRequired
103
+ } else {
104
+ return ''
105
+ }
106
+ })
107
+ const newPasswordErrorText = computed<string>(() => {
108
+ if (!initValidationFields.value.newPassword) return ''
109
+
110
+ const { current_password, new_password, confirm_password } = modelLocal.value
111
+
112
+ const validateText = validateField(
113
+ localization.value,
114
+ current_password,
115
+ new_password
116
+ )
117
+ const mismatchError = getPasswordMismatchError(
118
+ localization.value,
119
+ new_password,
120
+ confirm_password
121
+ )
122
+ if (!new_password) {
123
+ return localization.value.common.fieldRequired
124
+ } else if (validateText) {
125
+ return validateText
126
+ } else if (mismatchError) {
127
+ return mismatchError
128
+ } else return ''
129
+ })
130
+ const confirmPasswordErrorText = computed<string>(() => {
131
+ if (!initValidationFields.value.confirmPassword) return ''
132
+ const { new_password, confirm_password } = modelLocal.value
133
+
134
+ if (!confirm_password) {
135
+ return localization.value.common.fieldRequired
136
+ } else {
137
+ return getPasswordMismatchError(
138
+ localization.value,
139
+ new_password,
140
+ confirm_password
141
+ )
142
+ }
143
+ })
144
+ const onSubmit = (): void => {
145
+ const isFieldValid = initValidation([
146
+ 'currentPassword',
147
+ 'newPassword',
148
+ 'confirmPassword',
149
+ ])
150
+
151
+ !isFieldValid && emits('change-password')
152
+ }
153
+ const onHideModal = (): void => {
154
+ emits('hide')
155
+ }
156
+ </script>
157
+
158
+ <style lang="scss" scoped>
159
+ @import 'assets/scss/common/mixins.scss';
160
+ .modal-container-standard {
161
+ padding-top: 8px;
162
+ padding-bottom: 8px;
163
+
164
+ .change-password {
165
+ &__description {
166
+ color: #9da6ad;
167
+ font-size: 12px;
168
+ font-weight: 400;
169
+ line-height: 14.52px;
170
+ margin-bottom: 20px;
171
+ }
172
+ &__alert {
173
+ padding: 10px 12px;
174
+ margin-bottom: 12px;
175
+ :deep(svg) {
176
+ width: 16px;
177
+ height: 16px;
178
+ }
179
+ }
180
+ &__form {
181
+ @include flex($dir: column);
182
+ row-gap: 16px;
183
+ }
184
+ }
185
+ }
186
+ </style>
@@ -10,7 +10,6 @@
10
10
  @submit="onChangePassword"
11
11
  >
12
12
  <template #modalBody>
13
- <p v-if="props.firstTime">{{ localization.common.firstTimeChangePasswordDesc }}</p>
14
13
  <form id="change-password-form" class="compact" @submit.prevent>
15
14
  <section class="form-block">
16
15
  <div class="form-group">
@@ -98,7 +97,6 @@ import { defaultFormFunc } from '~/components/common/layout/theHeader/userMenu/m
98
97
  const props = defineProps<{
99
98
  hostname: string
100
99
  project: UI_T_Project
101
- firstTime: boolean
102
100
  }>()
103
101
  const emits = defineEmits<{
104
102
  (event: 'hide'): void
@@ -1,4 +1,4 @@
1
- import type { UI_I_Localization } from '~//lib/models/interfaces'
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
2
  import { RegExp } from '~/lib/config/regExp'
3
3
 
4
4
  export const getPasswordMismatchError = (
@@ -80,10 +80,10 @@ const onApplyChanges = (): void => {
80
80
  /* TODO сделать рефакторинг потом */
81
81
  model.value.configure.disks.forEach((disk) => {
82
82
  const selectedDisk = selectedPerDisks.value.find(
83
- (selected) =>
84
- selected.virtual_machine === disk.virtual_machine &&
85
- selected.file === disk.file &&
86
- selected.extra.datastore_id === disk.extra.datastore_id
83
+ (selectedDisk) =>
84
+ selectedDisk.virtual_machine === disk.virtual_machine &&
85
+ selectedDisk.extra.disk_source === disk.extra.disk_source &&
86
+ selectedDisk.extra.datastore_id === disk.extra.datastore_id
87
87
  )!
88
88
 
89
89
  if (selectedDisk) {
@@ -158,12 +158,16 @@ export const getBodyDataFunc = (
158
158
  bodyData: UI_I_StorageConfigurePerDiskItem[],
159
159
  localization: UI_I_Localization
160
160
  ): UI_I_DataTableBody[] => {
161
- const { $binary }: any = useNuxtApp()
162
161
 
163
162
  return bodyData.map((disk, index: number) => {
164
163
  const diskFormat =
165
164
  index === 0 ? 'N/A' : UI_E_SelectStorageDiskFormat[disk.disk_format]
166
165
 
166
+ const file =
167
+ disk.extra.disk_source === 'meta'
168
+ ? disk.file
169
+ : `${disk.extra.disk_source} (${disk.extra.disk_size} ${localization.common.mb} )`
170
+
167
171
  const diskSharingKey = disk.extra.sharing
168
172
  ? E_DiskSharing.Active
169
173
  : E_DiskSharing.Inactive
@@ -198,7 +202,7 @@ export const getBodyDataFunc = (
198
202
  },
199
203
  {
200
204
  col: 'col2',
201
- text: disk.file,
205
+ text: file,
202
206
  },
203
207
  {
204
208
  col: 'col3',
@@ -66,32 +66,38 @@ export const bodyItems = (
66
66
  data: UI_I_StorageConfigurePerDiskItem[]
67
67
  ): UI_I_BodyItem[][] => {
68
68
  const bodyItems: UI_I_BodyItem[][] = []
69
+ const localization = useLocal()
69
70
 
70
- data.forEach((storage: UI_I_StorageConfigurePerDiskItem, key: number) => {
71
+ data.forEach((disk: UI_I_StorageConfigurePerDiskItem, key: number) => {
71
72
  const diskFormat =
72
73
  key === 0
73
74
  ? 'N/A'
74
- : UI_E_SelectStorageDiskFormat[storage[vmMigrateDiskTableItemKeys[4]]]
75
+ : UI_E_SelectStorageDiskFormat[disk[vmMigrateDiskTableItemKeys[4]]]
76
+
77
+ const file =
78
+ disk.extra.disk_source === 'meta'
79
+ ? disk[vmMigrateDiskTableItemKeys[2]]
80
+ : `${disk.extra.disk_source} (${disk.extra.disk_size} ${localization.common.mb} )`
75
81
 
76
82
  bodyItems.push([
77
83
  {
78
84
  key: 'col0',
79
- text: storage[vmMigrateDiskTableItemKeys[0]],
85
+ text: disk[vmMigrateDiskTableItemKeys[0]],
80
86
  id: key,
81
87
  },
82
88
  {
83
89
  key: 'col1',
84
- text: storage[vmMigrateDiskTableItemKeys[1]],
90
+ text: disk[vmMigrateDiskTableItemKeys[1]],
85
91
  id: key,
86
92
  },
87
93
  {
88
94
  key: 'col2',
89
- text: storage[vmMigrateDiskTableItemKeys[2]],
95
+ text: file,
90
96
  id: key,
91
97
  },
92
98
  {
93
99
  key: 'col3',
94
- text: storage[vmMigrateDiskTableItemKeys[3]],
100
+ text: disk[vmMigrateDiskTableItemKeys[3]],
95
101
  id: key,
96
102
  },
97
103
  {
@@ -101,33 +107,33 @@ export const bodyItems = (
101
107
  },
102
108
  {
103
109
  key: 'col5',
104
- text: storage.extra[vmMigrateDiskTableItemKeys[5]],
110
+ text: disk.extra[vmMigrateDiskTableItemKeys[5]],
105
111
  id: key,
106
112
  },
107
113
 
108
114
  {
109
115
  key: 'col6',
110
- text: storage.extra[vmMigrateDiskTableItemKeys[6]],
116
+ text: disk.extra[vmMigrateDiskTableItemKeys[6]],
111
117
  id: key,
112
118
  },
113
119
  {
114
120
  key: 'col7',
115
- text: storage.extra[vmMigrateDiskTableItemKeys[7]],
121
+ text: disk.extra[vmMigrateDiskTableItemKeys[7]],
116
122
  id: key,
117
123
  },
118
124
  {
119
125
  key: 'col8',
120
- text: storage.extra[vmMigrateDiskTableItemKeys[8]],
126
+ text: disk.extra[vmMigrateDiskTableItemKeys[8]],
121
127
  id: key,
122
128
  },
123
129
  {
124
130
  key: 'col9',
125
- text: storage.extra[vmMigrateDiskTableItemKeys[9]],
131
+ text: disk.extra[vmMigrateDiskTableItemKeys[9]],
126
132
  id: key,
127
133
  },
128
134
  {
129
135
  key: 'col10',
130
- text: storage.extra[vmMigrateDiskTableItemKeys[10]],
136
+ text: disk.extra[vmMigrateDiskTableItemKeys[10]],
131
137
  id: key,
132
138
  },
133
139
  ])
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.684",
4
+ "version": "1.5.686",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",