bfg-common 1.5.490 → 1.5.492
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 +251 -248
- package/components/common/backup/storage/actions/add/lib/utils.ts +62 -30
- package/components/common/backup/storage/actions/add/lib/validations.ts +16 -8
- package/components/common/vm/actions/add/Add.vue +2 -2
- package/components/common/vm/actions/add/New.vue +1 -1
- package/components/common/vm/actions/add/Old.vue +1 -1
- package/components/common/vm/actions/add/lib/config/steps.ts +347 -331
- package/components/common/vm/actions/clone/Clone.vue +1 -1
- package/components/common/vm/actions/clone/toTemplate/ToTemplate.vue +1 -1
- package/components/common/vm/actions/common/select/name/Name.vue +6 -6
- package/components/common/vm/actions/common/select/name/New.vue +3 -4
- package/components/common/vm/actions/common/select/name/Old.vue +4 -5
- package/components/common/vm/actions/register/Register.vue +1 -1
- package/components/common/wizards/datastore/add/Add.vue +228 -224
- package/components/common/wizards/datastore/add/lib/utils.ts +93 -63
- package/components/common/wizards/datastore/add/lib/validations.ts +16 -8
- package/package.json +1 -1
- package/components/common/vmt/actions/add/Add.vue +0 -549
- package/components/common/vmt/actions/add/New.vue +0 -346
- package/components/common/vmt/actions/add/Old.vue +0 -305
- package/components/common/vmt/actions/add/lib/config/steps.ts +0 -107
- package/components/common/vmt/actions/add/lib/models/interfaces.ts +0 -23
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
selectedStep.id === dynamicSteps.selectNameFolder
|
|
30
30
|
"
|
|
31
31
|
:name-form-submit="nameFormSubmit"
|
|
32
|
-
:
|
|
32
|
+
:has-location="props.project === 'sphere'"
|
|
33
33
|
:data-center="props.dataCenter"
|
|
34
34
|
@submit="onChangeName(...$event)"
|
|
35
35
|
@check-name="emits('check-name', $event)"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
v-show="selectedStep.id === dynamicSteps.selectName"
|
|
28
28
|
:show="selectedStep.id === dynamicSteps.selectName"
|
|
29
29
|
:name-form-submit="nameFormSubmit"
|
|
30
|
-
:
|
|
30
|
+
:has-location="props.project === 'sphere'"
|
|
31
31
|
@submit="onChangeName(...$event)"
|
|
32
32
|
@check-name="emits('check-name', $event)"
|
|
33
33
|
/>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
v-if="isNewView"
|
|
4
4
|
v-model:vm-name="vmName"
|
|
5
5
|
v-model:is-show-help="isShowHelp"
|
|
6
|
-
:
|
|
6
|
+
:has-location="props.hasLocation"
|
|
7
7
|
:errors="errors"
|
|
8
8
|
:data-center="props.dataCenter"
|
|
9
9
|
@remove-validation-errors="onRemoveValidationErrors"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
v-else
|
|
14
14
|
v-model:vm-name="vmName"
|
|
15
15
|
v-model:is-show-help="isShowHelp"
|
|
16
|
-
:
|
|
16
|
+
:has-location="props.hasLocation"
|
|
17
17
|
:is-vmt="props.isVmt"
|
|
18
18
|
:errors="errors"
|
|
19
19
|
:data-center="props.dataCenter"
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
<script setup lang="ts">
|
|
26
26
|
// import { API_UI_I_Error } from '~/lib/models/store/interfaces'
|
|
27
27
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
28
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
29
28
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
30
29
|
|
|
31
30
|
const props = withDefaults(
|
|
32
31
|
defineProps<{
|
|
33
32
|
nameFormSubmit: null | Function
|
|
34
33
|
show: boolean
|
|
35
|
-
|
|
34
|
+
hasLocation?: boolean
|
|
36
35
|
isVmt?: boolean
|
|
37
36
|
validateEmptyName?: boolean
|
|
38
37
|
dataCenter?: UI_I_TreeNode // для сферы
|
|
39
38
|
existName?: string
|
|
40
39
|
}>(),
|
|
41
40
|
{
|
|
42
|
-
|
|
41
|
+
hasLocation: false,
|
|
43
42
|
isVmt: false,
|
|
43
|
+
validateEmptyName: false,
|
|
44
44
|
dataCenter: undefined,
|
|
45
45
|
existName: undefined,
|
|
46
46
|
}
|
|
@@ -100,7 +100,7 @@ const submit = async (cb: Function): Promise<void> => {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
if (props.
|
|
103
|
+
if (props.hasLocation) {
|
|
104
104
|
// const isDatacenterFolder = isParentDatacenter(selectedNode.value)
|
|
105
105
|
|
|
106
106
|
if (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="['select-name', { 'pb-6': props.
|
|
2
|
+
<div :class="['select-name', { 'pb-6': props.hasLocation }]">
|
|
3
3
|
<client-only>
|
|
4
4
|
<Teleport to="#name-alert-wrapper">
|
|
5
5
|
<ui-alert
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
|
|
44
|
-
<template v-if="props.
|
|
44
|
+
<template v-if="props.hasLocation">
|
|
45
45
|
<div class="location">
|
|
46
46
|
<span class="location-label">{{ localization.common.location }}</span>
|
|
47
47
|
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
<script setup lang="ts">
|
|
67
67
|
// import { API_UI_I_Error } from '~/lib/models/store/interfaces'
|
|
68
68
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
69
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
70
69
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
71
70
|
|
|
72
71
|
const vmName = defineModel<string>('vmName', { required: true })
|
|
@@ -74,7 +73,7 @@ const vmName = defineModel<string>('vmName', { required: true })
|
|
|
74
73
|
|
|
75
74
|
const props = withDefaults(
|
|
76
75
|
defineProps<{
|
|
77
|
-
|
|
76
|
+
hasLocation: boolean
|
|
78
77
|
errors: string[]
|
|
79
78
|
dataCenter?: UI_I_TreeNode // для сферы
|
|
80
79
|
}>(),
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
</div>
|
|
41
41
|
</form>
|
|
42
42
|
|
|
43
|
-
<template v-if="props.
|
|
43
|
+
<template v-if="props.hasLocation">
|
|
44
44
|
<p class="new-vm-name-and-folder-instructions mt-1">
|
|
45
45
|
{{ locationDescription }}
|
|
46
46
|
</p>
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
<script setup lang="ts">
|
|
58
58
|
// import { API_UI_I_Error } from '~/lib/models/store/interfaces'
|
|
59
59
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
60
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
61
60
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
62
61
|
|
|
63
62
|
const vmName = defineModel<string>('vmName', { required: true })
|
|
@@ -65,13 +64,13 @@ const isShowHelp = defineModel<boolean>('isShowHelp', { required: true })
|
|
|
65
64
|
|
|
66
65
|
const props = withDefaults(
|
|
67
66
|
defineProps<{
|
|
68
|
-
|
|
67
|
+
hasLocation: boolean
|
|
69
68
|
errors: string[]
|
|
70
69
|
isVmt: boolean
|
|
71
|
-
dataCenter?: UI_I_TreeNode // для сферы
|
|
70
|
+
dataCenter?: UI_I_TreeNode | null // для сферы
|
|
72
71
|
}>(),
|
|
73
72
|
{
|
|
74
|
-
dataCenter:
|
|
73
|
+
dataCenter: null,
|
|
75
74
|
}
|
|
76
75
|
)
|
|
77
76
|
const emits = defineEmits<{
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
selectedStep.id === dynamicSteps.selectNameFolder
|
|
29
29
|
"
|
|
30
30
|
:name-form-submit="nameFormSubmit"
|
|
31
|
-
:
|
|
31
|
+
:has-location="props.project === 'sphere'"
|
|
32
32
|
:data-center="props.dataCenter"
|
|
33
33
|
@submit="onChangeName(...$event)"
|
|
34
34
|
@check-name="emits('check-name', $event)"
|
|
@@ -1,224 +1,228 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<common-wizards-datastore-add-new
|
|
3
|
-
v-if="isNewView"
|
|
4
|
-
v-model="form"
|
|
5
|
-
:project="props.project"
|
|
6
|
-
:wizard="wizard"
|
|
7
|
-
:alert-messages="alertMessages"
|
|
8
|
-
:selected-scheme="selectedScheme"
|
|
9
|
-
:selected-node="props.selectedNode"
|
|
10
|
-
:title="title"
|
|
11
|
-
:nfs-hosts="props.nfsHosts"
|
|
12
|
-
:host-id="props.hostId"
|
|
13
|
-
@change-steps="onChangeSteps"
|
|
14
|
-
@hide="onHideModal"
|
|
15
|
-
@submit="onCreateDatastore"
|
|
16
|
-
/>
|
|
17
|
-
<common-wizards-datastore-add-old
|
|
18
|
-
v-else
|
|
19
|
-
v-model="form"
|
|
20
|
-
:project="props.project"
|
|
21
|
-
:wizard="wizard"
|
|
22
|
-
:alert-messages="alertMessages"
|
|
23
|
-
:selected-scheme="selectedScheme"
|
|
24
|
-
:title="title"
|
|
25
|
-
:nfs-hosts="props.nfsHosts"
|
|
26
|
-
:host-id="props.hostId"
|
|
27
|
-
@change-steps="onChangeSteps"
|
|
28
|
-
@hide-alert="onHideAlert"
|
|
29
|
-
@hide="onHideModal"
|
|
30
|
-
@submit="onCreateDatastore"
|
|
31
|
-
/>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script setup lang="ts">
|
|
35
|
-
import type {
|
|
36
|
-
UI_I_WizardStep,
|
|
37
|
-
UI_I_ValidationReturn,
|
|
38
|
-
} from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
39
|
-
import Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
|
|
40
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
41
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
42
|
-
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
43
|
-
import type { UI_T_DatastoreTypeCode } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
44
|
-
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
|
|
45
|
-
import type { UI_I_CompatibleHosts } from '~/components/common/wizards/datastore/add/steps/hostAccessibility/table/lib/models/interfaces'
|
|
46
|
-
import {
|
|
47
|
-
stepsFunc,
|
|
48
|
-
stepsSchemeInitial,
|
|
49
|
-
getStepScheme,
|
|
50
|
-
dynamicSteps,
|
|
51
|
-
} from '~/components/common/wizards/datastore/add/lib/config/steps'
|
|
52
|
-
import { datastoreDefaultFormFunc } from '~/components/common/wizards/datastore/add/lib/config/createDatastore'
|
|
53
|
-
import * as validation from '~/components/common/wizards/datastore/add/lib/validations'
|
|
54
|
-
|
|
55
|
-
const props = withDefaults(
|
|
56
|
-
defineProps<{
|
|
57
|
-
project: UI_T_Project
|
|
58
|
-
selectedNode: UI_I_TreeNode
|
|
59
|
-
nfsHosts?: UI_I_CompatibleHosts
|
|
60
|
-
hostId?: string
|
|
61
|
-
isMainFilter?: boolean
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
(event: '
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
value,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
(
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
)
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<common-wizards-datastore-add-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
v-model="form"
|
|
5
|
+
:project="props.project"
|
|
6
|
+
:wizard="wizard"
|
|
7
|
+
:alert-messages="alertMessages"
|
|
8
|
+
:selected-scheme="selectedScheme"
|
|
9
|
+
:selected-node="props.selectedNode"
|
|
10
|
+
:title="title"
|
|
11
|
+
:nfs-hosts="props.nfsHosts"
|
|
12
|
+
:host-id="props.hostId"
|
|
13
|
+
@change-steps="onChangeSteps"
|
|
14
|
+
@hide="onHideModal"
|
|
15
|
+
@submit="onCreateDatastore"
|
|
16
|
+
/>
|
|
17
|
+
<common-wizards-datastore-add-old
|
|
18
|
+
v-else
|
|
19
|
+
v-model="form"
|
|
20
|
+
:project="props.project"
|
|
21
|
+
:wizard="wizard"
|
|
22
|
+
:alert-messages="alertMessages"
|
|
23
|
+
:selected-scheme="selectedScheme"
|
|
24
|
+
:title="title"
|
|
25
|
+
:nfs-hosts="props.nfsHosts"
|
|
26
|
+
:host-id="props.hostId"
|
|
27
|
+
@change-steps="onChangeSteps"
|
|
28
|
+
@hide-alert="onHideAlert"
|
|
29
|
+
@hide="onHideModal"
|
|
30
|
+
@submit="onCreateDatastore"
|
|
31
|
+
/>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script setup lang="ts">
|
|
35
|
+
import type {
|
|
36
|
+
UI_I_WizardStep,
|
|
37
|
+
UI_I_ValidationReturn,
|
|
38
|
+
} from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
39
|
+
import Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
|
|
40
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
41
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
42
|
+
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
43
|
+
import type { UI_T_DatastoreTypeCode } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
44
|
+
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
|
|
45
|
+
import type { UI_I_CompatibleHosts } from '~/components/common/wizards/datastore/add/steps/hostAccessibility/table/lib/models/interfaces'
|
|
46
|
+
import {
|
|
47
|
+
stepsFunc,
|
|
48
|
+
stepsSchemeInitial,
|
|
49
|
+
getStepScheme,
|
|
50
|
+
dynamicSteps,
|
|
51
|
+
} from '~/components/common/wizards/datastore/add/lib/config/steps'
|
|
52
|
+
import { datastoreDefaultFormFunc } from '~/components/common/wizards/datastore/add/lib/config/createDatastore'
|
|
53
|
+
import * as validation from '~/components/common/wizards/datastore/add/lib/validations'
|
|
54
|
+
|
|
55
|
+
const props = withDefaults(
|
|
56
|
+
defineProps<{
|
|
57
|
+
project: UI_T_Project
|
|
58
|
+
selectedNode: UI_I_TreeNode
|
|
59
|
+
nfsHosts?: UI_I_CompatibleHosts
|
|
60
|
+
hostId?: string
|
|
61
|
+
isMainFilter?: boolean
|
|
62
|
+
datacenterId?: string // For Sphere
|
|
63
|
+
}>(),
|
|
64
|
+
{
|
|
65
|
+
nfsHosts: undefined,
|
|
66
|
+
hostId: undefined,
|
|
67
|
+
isMainFilter: undefined,
|
|
68
|
+
datacenterId: '',
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
const emits = defineEmits<{
|
|
72
|
+
(event: 'hide'): void
|
|
73
|
+
(event: 'finish', value: UI_I_CreateDatastoreForm): void
|
|
74
|
+
(event: 'main-filter', value: string): void
|
|
75
|
+
}>()
|
|
76
|
+
|
|
77
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
78
|
+
const { $store }: any = useNuxtApp()
|
|
79
|
+
|
|
80
|
+
const wizard: Wizard = new Wizard(
|
|
81
|
+
stepsFunc(localization.value),
|
|
82
|
+
stepsSchemeInitial
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
const selectedScheme = computed<number[]>(() => wizard.selectedScheme.value)
|
|
86
|
+
const alertMessages = computed<string[][]>(() => wizard.alertMessages.value)
|
|
87
|
+
|
|
88
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
89
|
+
|
|
90
|
+
const title = computed<string>(() => localization.value.common.newDatastore)
|
|
91
|
+
|
|
92
|
+
const form = ref<UI_I_CreateDatastoreForm>(
|
|
93
|
+
useDeepCopy(datastoreDefaultFormFunc(props.hostId))
|
|
94
|
+
)
|
|
95
|
+
const validationFunc = async (
|
|
96
|
+
value: UI_I_WizardStep[],
|
|
97
|
+
currentStep: UI_I_WizardStep,
|
|
98
|
+
nextStep: UI_I_WizardStep
|
|
99
|
+
): Promise<UI_I_ValidationReturn> => {
|
|
100
|
+
let stepHasError = false
|
|
101
|
+
|
|
102
|
+
if (
|
|
103
|
+
wizard.isValidateForStep(
|
|
104
|
+
dynamicSteps.nameAndDevice,
|
|
105
|
+
currentStep.id,
|
|
106
|
+
nextStep.id
|
|
107
|
+
)
|
|
108
|
+
) {
|
|
109
|
+
const nameValidation = await validation.checkDatastoreNameAsync(
|
|
110
|
+
localization.value,
|
|
111
|
+
value,
|
|
112
|
+
form.value,
|
|
113
|
+
dynamicSteps.nameAndDevice,
|
|
114
|
+
'datastoreName',
|
|
115
|
+
wizard,
|
|
116
|
+
props.project,
|
|
117
|
+
props.datacenterId
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
value = nameValidation.newValue
|
|
121
|
+
|
|
122
|
+
const lunDiskValidation = validation.checkSelectedLunDiskSync(
|
|
123
|
+
localization.value,
|
|
124
|
+
form.value,
|
|
125
|
+
wizard,
|
|
126
|
+
value,
|
|
127
|
+
props.project,
|
|
128
|
+
props.hostId
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
value = lunDiskValidation.newValue
|
|
132
|
+
|
|
133
|
+
stepHasError = nameValidation.stepHasError || lunDiskValidation.stepHasError
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (
|
|
137
|
+
wizard.isValidateForStep(
|
|
138
|
+
dynamicSteps.nameAndConfigure,
|
|
139
|
+
currentStep.id,
|
|
140
|
+
nextStep.id
|
|
141
|
+
)
|
|
142
|
+
) {
|
|
143
|
+
const nameValidation = await validation.checkDatastoreNameAsync(
|
|
144
|
+
localization.value,
|
|
145
|
+
value,
|
|
146
|
+
form.value,
|
|
147
|
+
dynamicSteps.nameAndConfigure,
|
|
148
|
+
'name',
|
|
149
|
+
wizard,
|
|
150
|
+
props.project,
|
|
151
|
+
props.datacenterId
|
|
152
|
+
)
|
|
153
|
+
value = nameValidation.newValue
|
|
154
|
+
|
|
155
|
+
const folderValidation = validation.checkNfsFolderSync(
|
|
156
|
+
localization.value,
|
|
157
|
+
form.value.folder,
|
|
158
|
+
wizard,
|
|
159
|
+
value
|
|
160
|
+
)
|
|
161
|
+
value = folderValidation.newValue
|
|
162
|
+
|
|
163
|
+
const serverValidation = validation.checkNfsServerSync(
|
|
164
|
+
localization.value,
|
|
165
|
+
form.value.server,
|
|
166
|
+
wizard,
|
|
167
|
+
value
|
|
168
|
+
)
|
|
169
|
+
value = serverValidation.newValue
|
|
170
|
+
|
|
171
|
+
stepHasError =
|
|
172
|
+
nameValidation.stepHasError ||
|
|
173
|
+
folderValidation.stepHasError ||
|
|
174
|
+
serverValidation.stepHasError
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (
|
|
178
|
+
wizard.isValidateForStep(
|
|
179
|
+
dynamicSteps.hostAccessibility,
|
|
180
|
+
currentStep.id,
|
|
181
|
+
nextStep.id
|
|
182
|
+
)
|
|
183
|
+
) {
|
|
184
|
+
const nameValidation = await validation.checkHostsAccessibilitySync(
|
|
185
|
+
localization.value,
|
|
186
|
+
form.value.hosts,
|
|
187
|
+
wizard,
|
|
188
|
+
value
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
value = nameValidation.newValue
|
|
192
|
+
|
|
193
|
+
stepHasError = nameValidation.stepHasError
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return {
|
|
197
|
+
newValue: value,
|
|
198
|
+
stepHasError,
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> =>
|
|
203
|
+
wizard.changeSteps(value, validationFunc)
|
|
204
|
+
|
|
205
|
+
// Choosing Scheme
|
|
206
|
+
watch(
|
|
207
|
+
() => form.value.type_code,
|
|
208
|
+
(newValue: UI_T_DatastoreTypeCode) => {
|
|
209
|
+
const step = getStepScheme(props.project, newValue, props.hostId)
|
|
210
|
+
if (step !== undefined) {
|
|
211
|
+
wizard.changeScheme(step)
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{ immediate: true }
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
const onHideAlert = (stepId: number): void => {
|
|
218
|
+
wizard.hideAlertMessagesByStepId(stepId)
|
|
219
|
+
}
|
|
220
|
+
const onHideModal = (): void => {
|
|
221
|
+
emits('hide')
|
|
222
|
+
}
|
|
223
|
+
const onCreateDatastore = (): void => {
|
|
224
|
+
emits('finish', form.value)
|
|
225
|
+
}
|
|
226
|
+
</script>
|
|
227
|
+
|
|
228
|
+
<style scoped lang="scss"></style>
|