bfg-common 1.5.514 → 1.5.516

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.
Files changed (52) hide show
  1. package/assets/localization/local_be.json +5 -3
  2. package/assets/localization/local_en.json +6 -4
  3. package/assets/localization/local_hy.json +5 -3
  4. package/assets/localization/local_kk.json +5 -3
  5. package/assets/localization/local_ru.json +5 -3
  6. package/assets/localization/local_zh.json +5 -3
  7. package/components/atoms/sortableView/SortableView.vue +2 -2
  8. package/components/common/browse/blocks/lib/models/types.ts +1 -1
  9. package/components/common/browse/lib/models/interfaces.ts +5 -5
  10. package/components/common/diagramMain/modals/lib/config/portModal.ts +251 -251
  11. package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
  12. package/components/common/diagramMain/network/Contents.vue +497 -497
  13. package/components/common/diagramMain/port/Port.vue +580 -580
  14. package/components/common/pages/backups/modals/createBackup/CreateBackup.vue +196 -379
  15. package/components/common/pages/backups/modals/createBackup/New.vue +267 -0
  16. package/components/common/pages/backups/modals/createBackup/Old.vue +142 -0
  17. package/components/common/pages/backups/modals/createBackup/configuration/Configuration.vue +29 -29
  18. package/components/common/pages/backups/modals/createBackup/configuration/ConfigurationNew.vue +218 -0
  19. package/components/common/pages/backups/modals/createBackup/configuration/ConfigurationOld.vue +29 -0
  20. package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +29 -29
  21. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +69 -69
  22. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
  23. package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +38 -38
  24. package/components/common/pages/backups/modals/createBackup/datastores/Datastores.vue +34 -59
  25. package/components/common/pages/backups/modals/createBackup/datastores/DatastoresNew.vue +23 -0
  26. package/components/common/pages/backups/modals/createBackup/datastores/DatastoresOld.vue +33 -0
  27. package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/TableView.vue +134 -0
  28. package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/lib/config/table.ts +219 -0
  29. package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/lib/models/enums.ts +15 -0
  30. package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/lib/models/interfaces.ts +5 -0
  31. package/components/common/pages/backups/modals/createBackup/datastores/tableView/{TableView.vue → old/TableView.vue} +95 -95
  32. package/components/common/pages/backups/modals/createBackup/datastores/tableView/{lib → old/lib}/config/keys.ts +14 -14
  33. package/components/common/pages/backups/modals/createBackup/datastores/tableView/{lib → old/lib}/config/table.ts +127 -127
  34. package/components/common/pages/backups/modals/createBackup/datastores/tableView/{lib → old/lib}/models/types.ts +10 -10
  35. package/components/common/pages/backups/modals/createBackup/disks/Disks.vue +34 -28
  36. package/components/common/pages/backups/modals/createBackup/disks/DisksNew.vue +22 -0
  37. package/components/common/pages/backups/modals/createBackup/disks/DisksOld.vue +28 -0
  38. package/components/common/pages/backups/modals/createBackup/disks/tableView/new/TableView.vue +131 -0
  39. package/components/common/pages/backups/modals/createBackup/disks/tableView/new/lib/config/table.ts +178 -0
  40. package/components/common/pages/backups/modals/createBackup/disks/tableView/{TableView.vue → old/TableView.vue} +119 -108
  41. package/components/common/pages/backups/modals/createBackup/disks/tableView/{lib → old/lib}/config/keys.ts +12 -12
  42. package/components/common/pages/backups/modals/createBackup/disks/tableView/{lib → old/lib}/config/table.ts +125 -125
  43. package/components/common/pages/backups/modals/createBackup/disks/tableView/{lib → old/lib}/models/types.ts +10 -10
  44. package/components/common/pages/backups/modals/createBackup/general/General.vue +33 -141
  45. package/components/common/pages/backups/modals/createBackup/general/GeneralNew.vue +128 -0
  46. package/components/common/pages/backups/modals/createBackup/general/GeneralOld.vue +66 -0
  47. package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +59 -0
  48. package/components/common/pages/backups/modals/createBackup/lib/config/steps.ts +123 -117
  49. package/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions.ts +13 -12
  50. package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
  51. package/components/common/pages/backups/modals/createBackup/lib/validation/validations.ts +145 -0
  52. package/package.json +1 -1
@@ -1,379 +1,196 @@
1
- <template>
2
- <div class="create-backup">
3
- <atoms-wizard
4
- show
5
- :wizard="wizard"
6
- :selected-scheme="selectedScheme"
7
- :title="title"
8
- :localization="localization"
9
- :test-id="testId"
10
- @change-steps="onChangeSteps"
11
- @hide="onHideModal"
12
- @submit="onFinish"
13
- >
14
- <template #modalBody="{ selectedStep }">
15
- <atoms-alert
16
- v-show="errors.length"
17
- status="alert-danger"
18
- :items="errors"
19
- test-id="create-backup-alert"
20
- @remove="onRemoveValidationErrors"
21
- />
22
-
23
- <common-pages-scheduled-tasks-modals-common-new-task-form
24
- v-show="selectedStep.id === dynamicSteps.schedulingOptions"
25
- v-model="modelSchedulerTask"
26
- :target="props.selectedVmName"
27
- class="new-task-form"
28
- />
29
-
30
- <common-pages-backups-modals-create-backup-general
31
- v-show="selectedStep.id === dynamicSteps.general"
32
- v-model="model"
33
- :show="selectedStep.id === dynamicSteps.general"
34
- :general-submit="generalSubmit"
35
- @check-name="onCheckName"
36
- />
37
-
38
- <common-pages-backups-modals-create-backup-disks
39
- v-show="selectedStep.id === dynamicSteps.disks"
40
- v-model="model"
41
- :disks="props.disks"
42
- :disks-loading="props.disksLoading"
43
- />
44
-
45
- <common-pages-backups-modals-create-backup-datastores
46
- v-show="selectedStep.id === dynamicSteps.datastores"
47
- v-model="model"
48
- :datastore-table="props.datastoreTable"
49
- :datastore-table-loading="props.datastoreTableLoading"
50
- @change="onChangeDatastore"
51
- />
52
-
53
- <common-pages-backups-modals-create-backup-configuration
54
- v-show="selectedStep.id === dynamicSteps.configuration"
55
- v-model="model"
56
- />
57
-
58
- <common-ready-to-complete
59
- v-show="selectedStep.id === dynamicSteps.readyComplete"
60
- :data="readyToCompleteInfo"
61
- />
62
- </template>
63
- </atoms-wizard>
64
- </div>
65
- </template>
66
-
67
- <script setup lang="ts">
68
- import type {
69
- UI_I_WizardStep,
70
- UI_I_ValidationReturn,
71
- } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
72
- import Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
73
- import type { UI_I_Localization } from '~/lib/models/interfaces'
74
- import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
75
- import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
76
- import type {
77
- UI_I_BackupDatastoreTable,
78
- UI_I_CreateBackupForm,
79
- UI_I_Pvm,
80
- } from '~/components/common/pages/backups/modals/lib/models/interfaces'
81
- import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
82
- import type { UI_I_NameCheck } from '~/components/common/pages/backups/modals/restore/name/lib/models/interfaces'
83
- import {
84
- stepsSchemeInitial,
85
- stepsFunc,
86
- dynamicSteps,
87
- } from '~/components/common/pages/backups/modals/createBackup/lib/config/steps'
88
- import { strategyOptionsFunc } from '~/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions'
89
-
90
- const model = defineModel<UI_I_CreateBackupForm>({ required: true })
91
- const modelSchedulerTask = defineModel<UI_I_ScheduleNewTasksForm>(
92
- 'schedulerForm',
93
- { required: true }
94
- )
95
-
96
- const props = defineProps<{
97
- isEdit: boolean
98
- target: string
99
- isScheduledTasks: boolean
100
- isEditScheduledTasks: boolean
101
- selectedVmName: string
102
- disks: UI_I_Pvm['disk_devices']
103
- disksLoading: boolean
104
- datastoreTable: UI_I_BackupDatastoreTable | null
105
- datastoreTableLoading: boolean
106
- }>()
107
-
108
- const emits = defineEmits<{
109
- (event: 'change-step-create-backup', value: UI_I_WizardStep[]): void
110
- (event: 'check-name', value: UI_I_NameCheck): void
111
- (event: 'finish'): void
112
- (event: 'hide'): void
113
- }>()
114
-
115
- const localization = computed<UI_I_Localization>(() => useLocal())
116
- const { $binary }: any = useNuxtApp()
117
-
118
- const title = computed<string>(() => {
119
- const { createBackup, updateBackup, scheduleNewTasks, scheduleTaskEdit } =
120
- localization.value.common
121
- let result = props.isEdit ? updateBackup : createBackup
122
- if (props.isScheduledTasks) {
123
- const schedulerMode = props.isEditScheduledTasks
124
- ? scheduleTaskEdit
125
- : scheduleNewTasks
126
-
127
- result = `${schedulerMode} (${createBackup})`
128
- }
129
-
130
- return result
131
- })
132
-
133
- const testId = ref<string>(props.isEdit ? 'update-backup' : 'create-backup')
134
-
135
- const wizard: Wizard = new Wizard(
136
- stepsFunc(localization.value),
137
- stepsSchemeInitial(props.isScheduledTasks)
138
- )
139
-
140
- watch(
141
- modelSchedulerTask,
142
- (newValue: UI_I_ScheduleNewTasksForm) => {
143
- if (props.isScheduledTasks) wizard.setDisabledNextButton(newValue.isValid)
144
- },
145
- { immediate: true, deep: true }
146
- )
147
-
148
- const selectedScheme = computed<number[]>(() => wizard.selectedScheme.value)
149
- const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> => {
150
- emits('change-step-create-backup', value)
151
- wizard.changeSteps(value, validationFunc)
152
- }
153
-
154
- const generalSubmit = ref<null | Function>(null)
155
-
156
- const validationFunc = async (
157
- value: UI_I_WizardStep[],
158
- currentStep: UI_I_WizardStep,
159
- nextStep: UI_I_WizardStep
160
- ): Promise<UI_I_ValidationReturn> => {
161
- let stepHasError = false
162
- const stepShouldStop = {
163
- ifOnCurrentStep: false,
164
- ifFromAnyStep: false,
165
- stoppageStepId: -1,
166
- }
167
-
168
- if (
169
- wizard.isValidateForStep(dynamicSteps.general, currentStep.id, nextStep.id)
170
- ) {
171
- const nameValidation = await checkName(value)
172
-
173
- value = nameValidation.newValue
174
- stepHasError = stepHasError || nameValidation.stepHasError
175
- }
176
-
177
- if (
178
- wizard.isValidateForStep(dynamicSteps.disks, currentStep.id, nextStep.id)
179
- ) {
180
- const validation = checkDisks(value)
181
-
182
- value = validation.newValue
183
- stepHasError = stepHasError || validation.stepHasError
184
- }
185
-
186
- if (
187
- wizard.isValidateForStep(
188
- dynamicSteps.datastores,
189
- currentStep.id,
190
- nextStep.id
191
- )
192
- ) {
193
- const validation = checkDatastore(value)
194
-
195
- value = validation.newValue
196
- stepHasError = stepHasError || validation.stepHasError
197
- }
198
-
199
- return {
200
- newValue: value,
201
- stepHasError,
202
- stepShouldStop,
203
- }
204
- }
205
-
206
- const checkName = async (
207
- value: UI_I_WizardStep[]
208
- ): Promise<UI_I_ValidationReturn> => {
209
- let stepHasError = false
210
-
211
- const { name } = model.value
212
- if (!name) {
213
- stepHasError = wizard.setValidation(dynamicSteps.general, 'name', {
214
- fieldMessage: localization.value.common.nameIsRequired,
215
- alertMessage: localization.value.common.nameIsRequired,
216
- })
217
- return {
218
- stepHasError,
219
- newValue: value,
220
- }
221
- }
222
- return new Promise((resolve) => {
223
- generalSubmit.value = (isValid: boolean): void => {
224
- if (!isValid) {
225
- stepHasError = wizard.setValidation(dynamicSteps.general, 'name', {
226
- fieldMessage: 'aaa',
227
- alertMessage: 'aaa',
228
- })
229
- } else if (wizard.hasMessage(dynamicSteps.general, 'name')) {
230
- value = wizard.removeValidation(dynamicSteps.general, 'name', value)
231
- }
232
-
233
- resolve({
234
- stepHasError,
235
- newValue: value,
236
- })
237
- generalSubmit.value = null
238
- }
239
- })
240
- }
241
- const onCheckName = async (data: UI_I_NameCheck): Promise<void> => {
242
- emits('check-name', data)
243
- }
244
-
245
- const checkDisks = (value: UI_I_WizardStep[]): UI_I_ValidationReturn => {
246
- let stepHasError = false
247
-
248
- const isValidStores = !!model.value?.disk_devices.length
249
- if (!isValidStores) {
250
- stepHasError = wizard.setValidation(dynamicSteps.disks, 'disk_devices', {
251
- fieldMessage: localization.value.common.diskIsRequired,
252
- alertMessage: localization.value.common.diskIsRequired,
253
- })
254
- showValidationErrors([localization.value.common.diskIsRequired])
255
- } else if (wizard.hasMessage(dynamicSteps.disks, 'disk_devices')) {
256
- value = wizard.removeValidation(dynamicSteps.disks, 'disk_devices', value)
257
- onRemoveValidationErrors()
258
- }
259
-
260
- return {
261
- stepHasError,
262
- newValue: value,
263
- }
264
- }
265
-
266
- const checkDatastore = (value: UI_I_WizardStep[]): UI_I_ValidationReturn => {
267
- let stepHasError = false
268
-
269
- const isValidStorage = !!model.value?.backup_storage.length
270
- if (!isValidStorage) {
271
- stepHasError = wizard.setValidation(
272
- dynamicSteps.datastores,
273
- 'backup_storage',
274
- {
275
- fieldMessage: localization.value.common.datastoreIsRequired,
276
- alertMessage: localization.value.common.datastoreIsRequired,
277
- }
278
- )
279
- showValidationErrors([localization.value.common.datastoreIsRequired])
280
- } else if (wizard.hasMessage(dynamicSteps.datastores, 'backup_storage')) {
281
- value = wizard.removeValidation(
282
- dynamicSteps.datastores,
283
- 'backup_storage',
284
- value
285
- )
286
- onRemoveValidationErrors()
287
- }
288
-
289
- return {
290
- stepHasError,
291
- newValue: value,
292
- }
293
- }
294
-
295
- const selectedDatastoresNames = ref<string[]>([])
296
- const onChangeDatastore = (names: string[]): void => {
297
- selectedDatastoresNames.value = names
298
- }
299
-
300
- const strategyOptions = ref<UI_I_SelectInputItem[]>(
301
- strategyOptionsFunc(localization.value)
302
- )
303
-
304
- const readyToCompleteInfo = computed<UI_I_TableInfoItem[]>(() => {
305
- // General
306
- const result = [
307
- {
308
- label: localization.value.common.name,
309
- value: model.value.name,
310
- },
311
- {
312
- label: localization.value.common.description,
313
- value: model.value.description,
314
- },
315
- ]
316
-
317
- // Disks
318
- model.value.disk_devices.forEach((disk_device, i) => {
319
- result.push({
320
- label: `${localization.value.common.disk} ${i + 1}`,
321
- value: disk_device.location,
322
- })
323
- })
324
-
325
- // Datastores
326
- result.push({
327
- label: localization.value.common.datastore,
328
- value: selectedDatastoresNames.value.join(', '),
329
- })
330
-
331
- // Configuration
332
- result.push({
333
- label: localization.value.common.strategy,
334
- value:
335
- strategyOptions.value.find(
336
- (option) => option.value === model.value.strategy
337
- )?.label || '',
338
- })
339
- // result.push({
340
- // label: localization.value.common.backupWindow,
341
- // value: model.value.start_window_min + '',
342
- // })
343
-
344
- const gbSizeByB = 1_073_741_824
345
- const maxBandwidth =
346
- model.value.bandwidth_limit >= gbSizeByB
347
- ? $binary.bToGb(model.value.bandwidth_limit) + ' Gbps'
348
- : $binary.bToMb(model.value.bandwidth_limit) + ' Mbps'
349
-
350
- result.push({
351
- label: localization.value.common.maxBandwidth,
352
- value: maxBandwidth,
353
- })
354
-
355
- return result
356
- })
357
-
358
- const errors = ref<string[]>([])
359
- const showValidationErrors = (data: string[]): void => {
360
- errors.value = data
361
- }
362
- const onRemoveValidationErrors = (): void => {
363
- errors.value = []
364
- }
365
-
366
- const onFinish = (): void => {
367
- emits('finish')
368
- }
369
- const onHideModal = (): void => {
370
- emits('hide')
371
- }
372
- </script>
373
-
374
- <style scoped lang="scss">
375
- :deep(.modal-body) {
376
- display: flex;
377
- flex-direction: column;
378
- }
379
- </style>
1
+ <template>
2
+ <common-pages-backups-modals-create-backup-new
3
+ v-if="isNewView"
4
+ v-model="backupForm"
5
+ v-model:scheduler-form="schedulerForm"
6
+ :wizard="wizard"
7
+ :selected-scheme="selectedScheme"
8
+ :alert-messages="alertMessages"
9
+ :title="title"
10
+ :is-scheduled-tasks="props.isScheduledTasks"
11
+ :is-edit-scheduled-tasks="props.isEditScheduledTasks"
12
+ :target="props.target"
13
+ :selected-vm-name="props.selectedVmName"
14
+ :disks="props.disks"
15
+ :disks-loading="props.disksLoading"
16
+ :datastore-table="props.datastoreTable"
17
+ :datastore-table-loading="props.datastoreTableLoading"
18
+ :ready-to-complete-data="readyToCompleteInfo"
19
+ @change-steps="onChangeSteps"
20
+ @submit="emits('finish')"
21
+ @hide="emits('hide')"
22
+ />
23
+ <common-pages-backups-modals-create-backup-old
24
+ v-else
25
+ v-model="backupForm"
26
+ v-model:scheduler-form="schedulerForm"
27
+ :wizard="wizard"
28
+ :selected-scheme="selectedScheme"
29
+ :alert-messages="alertMessages"
30
+ :title="title"
31
+ :alert-errors="errors"
32
+ :is-scheduled-tasks="props.isScheduledTasks"
33
+ :is-edit-scheduled-tasks="props.isEditScheduledTasks"
34
+ :target="props.target"
35
+ :selected-vm-name="props.selectedVmName"
36
+ :disks="props.disks"
37
+ :disks-loading="props.disksLoading"
38
+ :datastore-table="props.datastoreTable"
39
+ :datastore-table-loading="props.datastoreTableLoading"
40
+ :ready-to-complete-data="readyToCompleteInfo"
41
+ @change-step-create-backup="onChangeSteps"
42
+ @remove-validation-errors="onRemoveValidationErrors"
43
+ @finish="emits('finish')"
44
+ @hide="emits('hide')"
45
+ />
46
+ </template>
47
+
48
+ <script setup lang="ts">
49
+
50
+ import type { UI_I_WizardStep } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
51
+ import Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
52
+ import type { UI_I_ValidationReturn } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
53
+ import {
54
+ stepsSchemeInitial,
55
+ stepsFunc,
56
+ dynamicSteps
57
+ } from '~/components/common/pages/backups/modals/createBackup/lib/config/steps'
58
+ import type {
59
+ UI_I_BackupDatastoreTable,
60
+ UI_I_CreateBackupForm,
61
+ UI_I_Pvm
62
+ } from '~/components/common/pages/backups/modals/lib/models/interfaces'
63
+ import { strategyOptionsFunc } from '~/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions'
64
+ import {
65
+ readyToCompleteOptions
66
+ } from '~/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions'
67
+ import {
68
+ checkName,
69
+ checkDisks,
70
+ checkDatastore,
71
+ checkConfiguration
72
+ } from '~/components/common/pages/backups/modals/createBackup/lib/validation/validations'
73
+ import type {UI_I_NameCheck} from "~/components/common/pages/backups/modals/restore/name/lib/models/interfaces";
74
+ import type {UI_I_Localization} from "~/lib/models/interfaces";
75
+ import type {UI_I_SelectInputItem} from "~/components/common/select/input/lib/models/interfaces";
76
+ import type {UI_I_TableInfoItem} from "~/components/atoms/table/info/lib/models/interfaces";
77
+
78
+
79
+ const backupForm = defineModel<UI_I_CreateBackupForm>({ required: true })
80
+ const schedulerForm = defineModel('schedulerForm', { required: true })
81
+
82
+ const props = defineProps<{
83
+ isEdit: boolean // ToDo проверить на использование
84
+ target: string
85
+ isScheduledTasks: boolean
86
+ isEditScheduledTasks: boolean
87
+ selectedVmName: string
88
+ disks: UI_I_Pvm['disk_devices']
89
+ disksLoading: boolean
90
+ datastoreTable: UI_I_BackupDatastoreTable | null
91
+ datastoreTableLoading: boolean
92
+ }>()
93
+
94
+ const emits = defineEmits<{
95
+ (event: 'change-step-create-backup', value: UI_I_WizardStep[]): void
96
+ (event: 'check-name', value: UI_I_NameCheck): void
97
+ (event: 'finish'): void
98
+ (event: 'hide'): void
99
+ }>()
100
+
101
+ const localization = computed<UI_I_Localization>(() => useLocal())
102
+
103
+ const { $store }: any = useNuxtApp()
104
+
105
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
106
+
107
+ const title = computed<string>(() => {
108
+ const { createBackup, updateBackup, scheduleNewTasks, scheduleTaskEdit } =
109
+ localization.value.common
110
+ let result = props.isEdit ? updateBackup : createBackup
111
+ if (props.isScheduledTasks) {
112
+ const schedulerMode = props.isEditScheduledTasks
113
+ ? scheduleTaskEdit
114
+ : scheduleNewTasks
115
+
116
+ result = `${schedulerMode} (${createBackup})`
117
+ }
118
+
119
+ return result
120
+ })
121
+
122
+
123
+ const wizard: Wizard = new Wizard(
124
+ stepsFunc(localization.value),
125
+ stepsSchemeInitial(props.isScheduledTasks)
126
+ )
127
+
128
+ const selectedScheme = computed<number[]>(() => wizard.selectedScheme.value)
129
+ const alertMessages = computed<string[][]>(() => wizard.alertMessages.value)
130
+
131
+ const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> => {
132
+ emits('change-step-create-backup', value)
133
+ wizard.changeSteps(value, validationFunc)
134
+ }
135
+
136
+ const validationFunc = async (
137
+ value: UI_I_WizardStep[],
138
+ currentStep: UI_I_WizardStep,
139
+ nextStep: UI_I_WizardStep
140
+ ): Promise<UI_I_ValidationReturn> => {
141
+ let stepHasError = false
142
+ const stepShouldStop = {
143
+ ifOnCurrentStep: false,
144
+ ifFromAnyStep: false,
145
+ stoppageStepId: -1
146
+ }
147
+
148
+ if (wizard.isValidateForStep(dynamicSteps.general, currentStep.id, nextStep.id)) {
149
+ const nameValidation = await checkName(value, backupForm.value.name, wizard, localization.value, emits)
150
+ value = nameValidation.newValue
151
+ stepHasError = nameValidation.stepHasError
152
+ }
153
+
154
+ if (wizard.isValidateForStep(dynamicSteps.disks, currentStep.id, nextStep.id)) {
155
+ const disksValidation = checkDisks(value, backupForm.value, wizard, localization.value, showValidationErrors, onRemoveValidationErrors)
156
+ value = disksValidation.newValue
157
+ stepHasError = disksValidation.stepHasError
158
+ }
159
+
160
+ if (wizard.isValidateForStep(dynamicSteps.datastores, currentStep.id, nextStep.id)) {
161
+ const datastoreValidation = checkDatastore(value, backupForm.value, wizard, localization.value, showValidationErrors, onRemoveValidationErrors)
162
+ value = datastoreValidation.newValue
163
+ stepHasError = datastoreValidation.stepHasError
164
+ }
165
+
166
+ if (wizard.isValidateForStep(dynamicSteps.configuration, currentStep.id, nextStep.id)) {
167
+ const configurationValidation = checkConfiguration(value, backupForm.value.bandwidth_limit, wizard, localization.value)
168
+ value = configurationValidation.newValue
169
+ stepHasError = configurationValidation.stepHasError
170
+ }
171
+
172
+ return {
173
+ newValue: value,
174
+ stepHasError,
175
+ stepShouldStop
176
+ }
177
+ }
178
+
179
+ const errors = ref<string[]>([])
180
+ const showValidationErrors = (data: string[]): void => {
181
+ errors.value = data
182
+ }
183
+ const onRemoveValidationErrors = (): void => {
184
+ errors.value = []
185
+ }
186
+
187
+ const strategyOptions = ref<UI_I_SelectInputItem[]>(
188
+ strategyOptionsFunc(localization.value)
189
+ )
190
+
191
+ const readyToCompleteInfo = computed<UI_I_TableInfoItem[]>(() => {
192
+ return readyToCompleteOptions(backupForm.value, localization.value, strategyOptions.value)
193
+ })
194
+
195
+ </script>
196
+ <style scoped lang="scss"></style>