bfg-common 1.3.458 → 1.3.459
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.
|
@@ -193,7 +193,7 @@ const checkName = async (
|
|
|
193
193
|
} else {
|
|
194
194
|
return {
|
|
195
195
|
isValid: false,
|
|
196
|
-
message: localization.specifyDatastoreName,
|
|
196
|
+
message: !label ? localization.specifyDatastoreName : '',
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
}
|
|
@@ -226,59 +226,6 @@ const checkDatastoreNameAsync = async (
|
|
|
226
226
|
stepHasError,
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
|
|
230
|
-
const checkNameAndDevice = async (
|
|
231
|
-
form: any,
|
|
232
|
-
localization: UI_I_Localization,
|
|
233
|
-
wizard: Wizard
|
|
234
|
-
// emits: UI_I_AddNetworkingEmits
|
|
235
|
-
): Promise<UI_I_AsyncCheckReturn> => {
|
|
236
|
-
if (form.name && form.lunDisk.length) {
|
|
237
|
-
return new Promise((resolve, _reject) =>
|
|
238
|
-
checkValidityName(form.name, wizard, (message: string) => {
|
|
239
|
-
resolve({
|
|
240
|
-
isValid: message === '',
|
|
241
|
-
message: message === '' ? '' : message,
|
|
242
|
-
})
|
|
243
|
-
})
|
|
244
|
-
)
|
|
245
|
-
} else {
|
|
246
|
-
return {
|
|
247
|
-
isValid: false,
|
|
248
|
-
message: !form.name
|
|
249
|
-
? localization.specifyDatastoreName
|
|
250
|
-
: localization.selectHostToContinueAlert,
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
const checkNameAndDeviceAsync = async (
|
|
255
|
-
localization: UI_I_Localization,
|
|
256
|
-
value: UI_I_WizardStep[],
|
|
257
|
-
form: any,
|
|
258
|
-
wizard: Wizard
|
|
259
|
-
): Promise<UI_I_ValidationReturn> => {
|
|
260
|
-
let stepHasError = false
|
|
261
|
-
|
|
262
|
-
const labelValidation: {
|
|
263
|
-
isValid: boolean
|
|
264
|
-
message: string
|
|
265
|
-
} = await checkNameAndDevice(form, localization, wizard)
|
|
266
|
-
|
|
267
|
-
if (!labelValidation.isValid) {
|
|
268
|
-
stepHasError = wizard.setValidation(2, 'datastoreName', {
|
|
269
|
-
fieldMessage: labelValidation.message,
|
|
270
|
-
alertMessage: form.name ? labelValidation.message : '',
|
|
271
|
-
})
|
|
272
|
-
} else if (wizard.hasMessage(2, 'datastoreName')) {
|
|
273
|
-
value = wizard.removeValidation(2, 'datastoreName', value)
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
return {
|
|
277
|
-
newValue: value,
|
|
278
|
-
stepHasError,
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
229
|
const checkNfsFolderSync = (
|
|
283
230
|
localization: UI_I_Localization,
|
|
284
231
|
name: string,
|
|
@@ -347,15 +294,19 @@ const validationFunc = async (
|
|
|
347
294
|
}
|
|
348
295
|
|
|
349
296
|
if (wizard.isValidateForStep(2, currentStep.id, nextStep.id)) {
|
|
350
|
-
const nameValidation = await
|
|
297
|
+
const nameValidation = await checkDatastoreNameAsync(
|
|
351
298
|
localization.value,
|
|
352
299
|
value,
|
|
353
|
-
form.value,
|
|
300
|
+
form.value.name,
|
|
301
|
+
2,
|
|
302
|
+
'datastoreName',
|
|
354
303
|
wizard
|
|
355
304
|
)
|
|
356
305
|
|
|
357
306
|
value = nameValidation.newValue
|
|
358
307
|
|
|
308
|
+
//selectHostToContinueAlert
|
|
309
|
+
|
|
359
310
|
stepHasError = nameValidation.stepHasError
|
|
360
311
|
}
|
|
361
312
|
|
|
@@ -380,14 +331,14 @@ const validationFunc = async (
|
|
|
380
331
|
|
|
381
332
|
const serverValidation = checkNfsServerSync(
|
|
382
333
|
localization.value,
|
|
383
|
-
form.value.
|
|
334
|
+
form.value.server,
|
|
384
335
|
wizard,
|
|
385
336
|
value
|
|
386
337
|
)
|
|
387
338
|
|
|
388
339
|
stepHasError =
|
|
389
|
-
folderValidation.stepHasError ||
|
|
390
340
|
nameValidation.stepHasError ||
|
|
341
|
+
folderValidation.stepHasError ||
|
|
391
342
|
serverValidation.stepHasError
|
|
392
343
|
}
|
|
393
344
|
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
:project="props.project"
|
|
12
12
|
:alert-messages="props.alertMessages"
|
|
13
13
|
:messages-fields="props.messagesFields"
|
|
14
|
+
@hide-alert="(e) => emits('hide-alert', e)"
|
|
14
15
|
@next="onChangeConfigurationAndNext"
|
|
15
16
|
/>
|
|
16
17
|
|
|
@@ -49,6 +50,7 @@ const props = defineProps<{
|
|
|
49
50
|
}>()
|
|
50
51
|
const model = defineModel<any>()
|
|
51
52
|
const emits = defineEmits<{
|
|
53
|
+
(event: 'hide-alert', value: number): void
|
|
52
54
|
(event: 'submit', value: UI_I_ConfigurationSendDataNfs): void
|
|
53
55
|
}>()
|
|
54
56
|
|