bfg-common 1.0.9 → 1.0.11
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.
|
@@ -322,13 +322,20 @@ const onChangeNameAndNext = (name: string, node: UI_I_TreeNode): void => {
|
|
|
322
322
|
if (hasChanges) checkLocalChangeAndChangeStepStatus()
|
|
323
323
|
|
|
324
324
|
vmForm.value.name = name
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
325
|
+
if (props.project === 'sphere') {
|
|
326
|
+
vmForm.value.locationPath = $recursion.createAbsolutePathRecursion(
|
|
327
|
+
node,
|
|
328
|
+
'id',
|
|
329
|
+
'parent'
|
|
330
|
+
)
|
|
331
|
+
vmForm.value.dataCenter = $recursion.findParentByValue(
|
|
332
|
+
node,
|
|
333
|
+
'datacenter',
|
|
334
|
+
'type',
|
|
335
|
+
'parent'
|
|
336
|
+
)
|
|
337
|
+
vmFormCash.value.dataCenterId = vmForm.value.dataCenter?.id || null
|
|
338
|
+
}
|
|
332
339
|
onNext(true)
|
|
333
340
|
}
|
|
334
341
|
// Для сферы
|
|
@@ -450,6 +457,8 @@ const onFinish = (): void => {
|
|
|
450
457
|
virtualHardwareCdDvdDrives.value,
|
|
451
458
|
isPowerOnByDefault.value,
|
|
452
459
|
localization.value,
|
|
460
|
+
vmForm.value.locationPath, // для сферы
|
|
461
|
+
computeResourcePath.value, // для сферы
|
|
453
462
|
false
|
|
454
463
|
)
|
|
455
464
|
.then(() => {
|
|
@@ -60,5 +60,6 @@ export type UI_T_AddVmFinishFunc<T = void> = (
|
|
|
60
60
|
isPowerOnByDefault: boolean,
|
|
61
61
|
localization: UI_I_Localization,
|
|
62
62
|
locationPath?: string, // для сферы
|
|
63
|
-
computeResourcePath?: string // для сферы
|
|
63
|
+
computeResourcePath?: string, // для сферы
|
|
64
|
+
isValidation?: boolean
|
|
64
65
|
) => Promise<T>
|
|
@@ -78,20 +78,12 @@ watch(
|
|
|
78
78
|
submit()
|
|
79
79
|
}
|
|
80
80
|
)
|
|
81
|
-
const isParentDatacenter = (node: UI_I_TreeNode | null): boolean => {
|
|
82
|
-
if (!node) return false
|
|
83
|
-
|
|
84
|
-
if (node.parent?.type === 'datacenter') return true
|
|
85
|
-
if (node.parent?.type === 'folder') return isParentDatacenter(node.parent)
|
|
86
|
-
return false
|
|
87
|
-
}
|
|
88
81
|
const submit = (): void => {
|
|
89
|
-
const isDatacenterFolder = isParentDatacenter(selectedNode.value)
|
|
90
82
|
if (
|
|
91
83
|
!selectedNode.value ||
|
|
92
84
|
!compatibilityText.value[1] ||
|
|
93
85
|
selectedNode.value.type === 'datacenter' ||
|
|
94
|
-
selectedNode.value.type === 'folder'
|
|
86
|
+
selectedNode.value.type === 'folder' ||
|
|
95
87
|
(selectedNode.value.type === 'cluster' && !selectedNode.value.nodes.length)
|
|
96
88
|
) {
|
|
97
89
|
showValidationErrors(
|