bfg-common 1.5.395 → 1.5.396
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/components/common/backup/storage/actions/add/Add.vue +19 -21
- package/components/common/backup/storage/actions/add/New.vue +0 -1
- package/components/common/backup/storage/actions/add/Old.vue +0 -1
- package/components/common/backup/storage/actions/add/lib/validations.ts +71 -63
- package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigure.vue +0 -2
- package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigureNew.vue +53 -49
- package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigureOld.vue +68 -65
- package/package.json +1 -1
@@ -47,7 +47,7 @@ import type {
|
|
47
47
|
} from '~/components/atoms/wizard/lib/models/interfaces'
|
48
48
|
import type { UI_T_DatastoreTypeCode } from '~/components/common/backup/storage/actions/add/lib/models/types'
|
49
49
|
// TODO use from uikit
|
50
|
-
import Wizard from
|
50
|
+
import Wizard from '~/components/atoms/wizard/lib/utils/utils'
|
51
51
|
import {
|
52
52
|
stepsFunc,
|
53
53
|
stepsSchemeInitial,
|
@@ -152,28 +152,27 @@ const validationFunc = async (
|
|
152
152
|
)
|
153
153
|
value = serverValidation.newValue
|
154
154
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
155
|
+
// PC-2542
|
156
|
+
// const usernameValidation = validation.checkUsernameSync(
|
157
|
+
// localization.value,
|
158
|
+
// form.value.user,
|
159
|
+
// wizard,
|
160
|
+
// value
|
161
|
+
// )
|
162
|
+
// value = usernameValidation.newValue
|
163
|
+
|
164
|
+
// const passwordValidation = validation.checkPasswordSync(
|
165
|
+
// localization.value,
|
166
|
+
// form.value.password,
|
167
|
+
// wizard,
|
168
|
+
// value
|
169
|
+
// )
|
170
|
+
// value = passwordValidation.newValue
|
170
171
|
|
171
172
|
stepHasError =
|
172
173
|
nameValidation.stepHasError ||
|
173
174
|
folderValidation.stepHasError ||
|
174
|
-
serverValidation.stepHasError
|
175
|
-
usernameValidation.stepHasError ||
|
176
|
-
passwordValidation.stepHasError
|
175
|
+
serverValidation.stepHasError
|
177
176
|
}
|
178
177
|
|
179
178
|
if (
|
@@ -237,8 +236,7 @@ const onChangeStorage = (storage: UI_I_DatastoreTableItem | null): void => {
|
|
237
236
|
form.value.storm_id = storage.id
|
238
237
|
}
|
239
238
|
|
240
|
-
const onCreate = async (
|
241
|
-
): Promise<void> => {
|
239
|
+
const onCreate = async (): Promise<void> => {
|
242
240
|
emits('create', form.value)
|
243
241
|
}
|
244
242
|
|
@@ -101,7 +101,6 @@
|
|
101
101
|
<common-backup-storage-actions-add-steps-name-and-configure
|
102
102
|
v-if="selectedStep.id === dynamicSteps.nameAndConfigure"
|
103
103
|
v-model="formModelLocal"
|
104
|
-
:project="props.project"
|
105
104
|
:alert-messages="props.alertMessages"
|
106
105
|
:messages-fields="selectedStep.fields"
|
107
106
|
:is-disabled-name-field="wizard.wizardLoader.status"
|
@@ -29,7 +29,6 @@
|
|
29
29
|
<common-backup-storage-actions-add-steps-name-and-configure
|
30
30
|
v-if="selectedStep.id === dynamicSteps.nameAndConfigure"
|
31
31
|
v-model="formModelLocal"
|
32
|
-
:project="props.project"
|
33
32
|
:messages-fields="selectedStep.fields"
|
34
33
|
:alert-messages="props.alertMessages[dynamicSteps.nameAndConfigure]"
|
35
34
|
/>
|
@@ -125,58 +125,89 @@ export const checkServerSync = (
|
|
125
125
|
}
|
126
126
|
}
|
127
127
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
128
|
+
// PC-2542
|
129
|
+
// export const checkUsernameSync = (
|
130
|
+
// localization: UI_I_Localization,
|
131
|
+
// name: string,
|
132
|
+
// wizard: Wizard,
|
133
|
+
// value: UI_I_WizardStep[]
|
134
|
+
// ): UI_I_ValidationReturn => {
|
135
|
+
// let stepHasError = false
|
136
|
+
//
|
137
|
+
// if (!name) {
|
138
|
+
// stepHasError = wizard.setValidation(dynamicSteps.nameAndConfigure, 'user', {
|
139
|
+
// fieldMessage: localization.common.fieldRequired,
|
140
|
+
// alertMessage: '',
|
141
|
+
// })
|
142
|
+
// } else if (wizard.hasMessage(dynamicSteps.nameAndConfigure, 'user')) {
|
143
|
+
// value = wizard.removeValidation(
|
144
|
+
// dynamicSteps.nameAndConfigure,
|
145
|
+
// 'user',
|
146
|
+
// value
|
147
|
+
// )
|
148
|
+
// }
|
149
|
+
//
|
150
|
+
// return {
|
151
|
+
// newValue: value,
|
152
|
+
// stepHasError,
|
153
|
+
// }
|
154
|
+
// }
|
155
|
+
|
156
|
+
// PC-2542
|
157
|
+
// export const checkPasswordSync = (
|
158
|
+
// localization: UI_I_Localization,
|
159
|
+
// name: string,
|
160
|
+
// wizard: Wizard,
|
161
|
+
// value: UI_I_WizardStep[]
|
162
|
+
// ): UI_I_ValidationReturn => {
|
163
|
+
// let stepHasError = false
|
164
|
+
//
|
165
|
+
// if (!name) {
|
166
|
+
// stepHasError = wizard.setValidation(
|
167
|
+
// dynamicSteps.nameAndConfigure,
|
168
|
+
// 'password',
|
169
|
+
// {
|
170
|
+
// fieldMessage: localization.common.fieldRequired,
|
171
|
+
// alertMessage: '',
|
172
|
+
// }
|
173
|
+
// )
|
174
|
+
// } else if (wizard.hasMessage(dynamicSteps.nameAndConfigure, 'password')) {
|
175
|
+
// value = wizard.removeValidation(
|
176
|
+
// dynamicSteps.nameAndConfigure,
|
177
|
+
// 'password',
|
178
|
+
// value
|
179
|
+
// )
|
180
|
+
// }
|
181
|
+
//
|
182
|
+
// return {
|
183
|
+
// newValue: value,
|
184
|
+
// stepHasError,
|
185
|
+
// }
|
186
|
+
// }
|
135
187
|
|
136
|
-
|
137
|
-
stepHasError = wizard.setValidation(
|
138
|
-
dynamicSteps.nameAndConfigure,
|
139
|
-
'user',
|
140
|
-
{
|
141
|
-
fieldMessage: localization.common.fieldRequired,
|
142
|
-
alertMessage: '',
|
143
|
-
}
|
144
|
-
)
|
145
|
-
} else if (wizard.hasMessage(dynamicSteps.nameAndConfigure, 'user')) {
|
146
|
-
value = wizard.removeValidation(
|
147
|
-
dynamicSteps.nameAndConfigure,
|
148
|
-
'user',
|
149
|
-
value
|
150
|
-
)
|
151
|
-
}
|
152
|
-
|
153
|
-
return {
|
154
|
-
newValue: value,
|
155
|
-
stepHasError,
|
156
|
-
}
|
157
|
-
}
|
158
|
-
|
159
|
-
export const checkPasswordSync = (
|
188
|
+
export const checkHostsAccessibilitySync = (
|
160
189
|
localization: UI_I_Localization,
|
161
|
-
|
190
|
+
hosts: string[],
|
162
191
|
wizard: Wizard,
|
163
192
|
value: UI_I_WizardStep[]
|
164
193
|
): UI_I_ValidationReturn => {
|
165
194
|
let stepHasError = false
|
166
195
|
|
167
|
-
if (!
|
196
|
+
if (!hosts.length) {
|
168
197
|
stepHasError = wizard.setValidation(
|
169
|
-
dynamicSteps.
|
170
|
-
'
|
198
|
+
dynamicSteps.hostAccessibility,
|
199
|
+
'hostsAccessibility',
|
171
200
|
{
|
172
|
-
fieldMessage:
|
173
|
-
alertMessage:
|
201
|
+
fieldMessage: '',
|
202
|
+
alertMessage: localization.common.selectLeastEntityContinue,
|
174
203
|
}
|
175
204
|
)
|
176
|
-
} else if (
|
205
|
+
} else if (
|
206
|
+
wizard.hasMessage(dynamicSteps.hostAccessibility, 'hostsAccessibility')
|
207
|
+
) {
|
177
208
|
value = wizard.removeValidation(
|
178
|
-
dynamicSteps.
|
179
|
-
'
|
209
|
+
dynamicSteps.hostAccessibility,
|
210
|
+
'hostsAccessibility',
|
180
211
|
value
|
181
212
|
)
|
182
213
|
}
|
@@ -187,29 +218,6 @@ export const checkPasswordSync = (
|
|
187
218
|
}
|
188
219
|
}
|
189
220
|
|
190
|
-
export const checkHostsAccessibilitySync = (
|
191
|
-
localization: UI_I_Localization,
|
192
|
-
hosts: string[],
|
193
|
-
wizard: Wizard,
|
194
|
-
value: UI_I_WizardStep[]
|
195
|
-
): UI_I_ValidationReturn => {
|
196
|
-
let stepHasError = false
|
197
|
-
|
198
|
-
if (!hosts.length) {
|
199
|
-
stepHasError = wizard.setValidation(dynamicSteps.hostAccessibility, 'hostsAccessibility', {
|
200
|
-
fieldMessage: '',
|
201
|
-
alertMessage: localization.common.selectLeastEntityContinue,
|
202
|
-
})
|
203
|
-
} else if (wizard.hasMessage(dynamicSteps.hostAccessibility, 'hostsAccessibility')) {
|
204
|
-
value = wizard.removeValidation(dynamicSteps.hostAccessibility, 'hostsAccessibility', value)
|
205
|
-
}
|
206
|
-
|
207
|
-
return {
|
208
|
-
newValue: value,
|
209
|
-
stepHasError,
|
210
|
-
}
|
211
|
-
}
|
212
|
-
|
213
221
|
export const checkStorageSync = (
|
214
222
|
localization: UI_I_Localization,
|
215
223
|
storm_id: string,
|
package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigure.vue
CHANGED
@@ -19,13 +19,11 @@
|
|
19
19
|
</template>
|
20
20
|
|
21
21
|
<script lang="ts" setup>
|
22
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
23
22
|
import type { UI_I_WizardStep } from '~/components/atoms/wizard/lib/models/interfaces'
|
24
23
|
import type { UI_I_CreateDatastoreForm } from '~/components/common/backup/storage/actions/add/lib/models/interfaces'
|
25
24
|
|
26
25
|
const formModel = defineModel<UI_I_CreateDatastoreForm>({ required: true })
|
27
26
|
const props = defineProps<{
|
28
|
-
project: UI_T_Project
|
29
27
|
alertMessages: string[]
|
30
28
|
messagesFields: UI_I_WizardStep['fields']
|
31
29
|
isDisabledNameField?: boolean
|
package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigureNew.vue
CHANGED
@@ -87,46 +87,48 @@
|
|
87
87
|
</div>
|
88
88
|
</div>
|
89
89
|
|
90
|
-
|
90
|
+
<!-- PC-2542-->
|
91
|
+
<!-- <div class="basics-step-line"></div>-->
|
91
92
|
|
92
|
-
<div class="basics-step-row"
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
</div
|
93
|
+
<!-- <div class="basics-step-row">-->
|
94
|
+
<!-- <div class="basics-step-row-title">-->
|
95
|
+
<!-- <span class="basics-step-row-title-text">-->
|
96
|
+
<!-- {{ localization.auth.username }}-->
|
97
|
+
<!-- </span>-->
|
98
|
+
<!-- </div>-->
|
99
|
+
<!-- <div class="basics-step-row-content">-->
|
100
|
+
<!-- <ui-input-->
|
101
|
+
<!-- id="configuration-username-input"-->
|
102
|
+
<!-- v-model="formModelLocal.user"-->
|
103
|
+
<!-- :placeholder="localization.auth.username"-->
|
104
|
+
<!-- :error="usernameErrorText"-->
|
105
|
+
<!-- :disabled="props.isDisabledNameField"-->
|
106
|
+
<!-- test-id="configuration-username-input"-->
|
107
|
+
<!-- />-->
|
108
|
+
<!-- </div>-->
|
109
|
+
<!-- </div>-->
|
109
110
|
|
110
|
-
|
111
|
+
<!-- PC-2542-->
|
112
|
+
<!-- <div class="basics-step-line"></div>-->
|
111
113
|
|
112
|
-
<div class="basics-step-row"
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
</div
|
114
|
+
<!-- <div class="basics-step-row">-->
|
115
|
+
<!-- <div class="basics-step-row-title">-->
|
116
|
+
<!-- <span class="basics-step-row-title-text">-->
|
117
|
+
<!-- {{ localization.auth.password }}-->
|
118
|
+
<!-- </span>-->
|
119
|
+
<!-- </div>-->
|
120
|
+
<!-- <div class="basics-step-row-content">-->
|
121
|
+
<!-- <ui-input-->
|
122
|
+
<!-- id="configuration-password-input"-->
|
123
|
+
<!-- v-model="formModelLocal.password"-->
|
124
|
+
<!-- :placeholder="localization.auth.password"-->
|
125
|
+
<!-- :error="passwordErrorText"-->
|
126
|
+
<!-- :disabled="props.isDisabledNameField"-->
|
127
|
+
<!-- type="password"-->
|
128
|
+
<!-- test-id="configuration-password-input"-->
|
129
|
+
<!-- />-->
|
130
|
+
<!-- </div>-->
|
131
|
+
<!-- </div>-->
|
130
132
|
</div>
|
131
133
|
</template>
|
132
134
|
|
@@ -180,20 +182,22 @@ const serverErrorText = computed<string>(() => {
|
|
180
182
|
})
|
181
183
|
|
182
184
|
/* Validation error text for Username input field */
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
185
|
+
// PC-2542
|
186
|
+
// const usernameErrorText = computed<string>(() => {
|
187
|
+
// if (isEmptyAlertMessages.value && props.messagesFields.user?.field) {
|
188
|
+
// return props.messagesFields.user.field
|
189
|
+
// }
|
190
|
+
// return ''
|
191
|
+
// })
|
189
192
|
|
190
193
|
/* Validation error text for Password input field */
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
194
|
+
// PC-2542
|
195
|
+
// const passwordErrorText = computed<string>(() => {
|
196
|
+
// if (isEmptyAlertMessages.value && props.messagesFields.password?.field) {
|
197
|
+
// return props.messagesFields.password.field
|
198
|
+
// }
|
199
|
+
// return ''
|
200
|
+
// })
|
197
201
|
</script>
|
198
202
|
|
199
203
|
<style scoped lang="scss">
|
package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigureOld.vue
CHANGED
@@ -111,67 +111,69 @@
|
|
111
111
|
</div>
|
112
112
|
</div>
|
113
113
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
@
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
</div
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
</div
|
114
|
+
<!-- PC-2542-->
|
115
|
+
<!-- <div class="nd-mt-0 clr-form-control clr-row">-->
|
116
|
+
<!-- <label class="clr-control-label clr-col-md-2">-->
|
117
|
+
<!-- {{ localization.auth.username }}-->
|
118
|
+
<!-- </label>-->
|
119
|
+
|
120
|
+
<!-- <div-->
|
121
|
+
<!-- class="clr-control-container"-->
|
122
|
+
<!-- :class="usernameErrorText && 'clr-error'"-->
|
123
|
+
<!-- >-->
|
124
|
+
<!-- <div class="flex-align-center input-action-wrapper">-->
|
125
|
+
<!-- <input-->
|
126
|
+
<!-- id="configuration-username-input"-->
|
127
|
+
<!-- v-model="formModelLocal.user"-->
|
128
|
+
<!-- data-id="configuration-username-input"-->
|
129
|
+
<!-- type="text"-->
|
130
|
+
<!-- class="clr-input"-->
|
131
|
+
<!-- @blur="initValidation(true, ['user'])"-->
|
132
|
+
<!-- @input="initValidation(false, ['user'])"-->
|
133
|
+
<!-- />-->
|
134
|
+
<!-- <atoms-the-icon class="error-icon" name="info-circle" />-->
|
135
|
+
<!-- </div>-->
|
136
|
+
<!-- <div-->
|
137
|
+
<!-- v-if="usernameErrorText"-->
|
138
|
+
<!-- class="clr-subtext"-->
|
139
|
+
<!-- data-id="username-name-field-require"-->
|
140
|
+
<!-- >-->
|
141
|
+
<!-- {{ usernameErrorText }}-->
|
142
|
+
<!-- </div>-->
|
143
|
+
<!-- </div>-->
|
144
|
+
<!-- </div>-->
|
145
|
+
|
146
|
+
<!-- PC-2542-->
|
147
|
+
<!-- <div class="nd-mt-0 clr-form-control clr-row">-->
|
148
|
+
<!-- <label class="clr-control-label clr-col-md-2">-->
|
149
|
+
<!-- {{ localization.auth.password }}-->
|
150
|
+
<!-- </label>-->
|
151
|
+
|
152
|
+
<!-- <div-->
|
153
|
+
<!-- class="clr-control-container"-->
|
154
|
+
<!-- :class="passwordErrorText && 'clr-error'"-->
|
155
|
+
<!-- >-->
|
156
|
+
<!-- <div class="flex-align-center input-action-wrapper">-->
|
157
|
+
<!-- <input-->
|
158
|
+
<!-- id="configuration-password-input"-->
|
159
|
+
<!-- v-model="formModelLocal.password"-->
|
160
|
+
<!-- data-id="configuration-password-input"-->
|
161
|
+
<!-- type="password"-->
|
162
|
+
<!-- class="clr-input"-->
|
163
|
+
<!-- @blur="initValidation(true, ['password'])"-->
|
164
|
+
<!-- @input="initValidation(false, ['password'])"-->
|
165
|
+
<!-- />-->
|
166
|
+
<!-- <atoms-the-icon class="error-icon" name="info-circle" />-->
|
167
|
+
<!-- </div>-->
|
168
|
+
<!-- <div-->
|
169
|
+
<!-- v-if="passwordErrorText"-->
|
170
|
+
<!-- class="clr-subtext"-->
|
171
|
+
<!-- data-id="password-name-field-require"-->
|
172
|
+
<!-- >-->
|
173
|
+
<!-- {{ passwordErrorText }}-->
|
174
|
+
<!-- </div>-->
|
175
|
+
<!-- </div>-->
|
176
|
+
<!-- </div>-->
|
175
177
|
</div>
|
176
178
|
</template>
|
177
179
|
|
@@ -180,10 +182,8 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
180
182
|
import type { UI_I_WizardStep } from '~/components/atoms/wizard/lib/models/interfaces'
|
181
183
|
import type { UI_I_InitialValidationFields } from '~/components/common/backup/storage/actions/add/steps/nameAndConfigure/lib/models/interfaces'
|
182
184
|
import type { UI_I_CreateDatastoreForm } from '~/components/common/backup/storage/actions/add/lib/models/interfaces'
|
185
|
+
import type { UI_T_InitialValidationFields } from '~/components/common/backup/storage/actions/add/steps/nameAndConfigure/lib/models/types'
|
183
186
|
import { dynamicSteps } from '~/components/common/backup/storage/actions/add/lib/config/steps'
|
184
|
-
import type {
|
185
|
-
UI_T_InitialValidationFields
|
186
|
-
} from "~/components/common/backup/storage/actions/add/steps/nameAndConfigure/lib/models/types";
|
187
187
|
|
188
188
|
const formModelLocal = defineModel<UI_I_CreateDatastoreForm>({ required: true })
|
189
189
|
const isShowAlertInfo = defineModel<boolean>('alertInfo', { required: true })
|
@@ -205,7 +205,10 @@ const initValidationFields = ref<UI_I_InitialValidationFields>({
|
|
205
205
|
user: false,
|
206
206
|
password: false,
|
207
207
|
})
|
208
|
-
const initValidation = (
|
208
|
+
const initValidation = (
|
209
|
+
onlyBlur = false,
|
210
|
+
types: UI_T_InitialValidationFields[]
|
211
|
+
): void => {
|
209
212
|
onlyBlur && types.forEach((type) => (initValidationFields.value[type] = true))
|
210
213
|
}
|
211
214
|
|