bfg-common 1.5.581 → 1.5.583
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/vm/actions/add/Add.vue +46 -120
- package/components/common/vm/actions/add/New.vue +16 -54
- package/components/common/vm/actions/add/Old.vue +16 -55
- package/components/common/vm/actions/clone/Clone.vue +44 -116
- package/components/common/vm/actions/clone/new/New.vue +14 -50
- package/components/common/vm/actions/clone/old/Old.vue +16 -52
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +14 -81
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +7 -56
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +8 -56
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +211 -206
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +225 -120
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +220 -118
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +66 -53
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +139 -159
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuNew.vue +8 -15
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuOld.vue +8 -13
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +62 -75
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +241 -149
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +3 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskOld.vue +2 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +62 -100
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +6 -17
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +6 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerOld.vue +6 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +17 -39
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardNew.vue +6 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardOld.vue +6 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options.ts +4 -4
- package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +6 -93
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +8 -60
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsOld.vue +8 -58
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +5 -69
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +12 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsOld.vue +12 -33
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +114 -132
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +41 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderOld.vue +44 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +8 -23
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +21 -31
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsOld.vue +26 -34
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +28 -34
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/Old.vue +24 -30
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +8 -112
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +3 -3
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{KeymapNew.vue → New.vue} +6 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{KeymapOld.vue → Old.vue} +5 -5
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +6 -7
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +9 -27
- package/components/common/vm/actions/common/lib/models/interfaces.ts +58 -25
- package/components/common/vm/actions/editSettings/EditSettings.vue +32 -90
- package/components/common/vm/actions/editSettings/EditSettingsOld.vue +14 -41
- package/components/common/vm/actions/editSettings/new/New.vue +14 -41
- package/components/common/vm/actions/lib/models/interfaces.ts +4 -29
- package/components/common/vm/actions/lib/utils.ts +64 -36
- package/package.json +1 -1
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{PasswordNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{PasswordOld.vue → Old.vue} +0 -0
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-vm-actions-clone-new
|
|
3
3
|
v-if="isNewView"
|
|
4
|
-
v-model
|
|
4
|
+
v-model="model"
|
|
5
5
|
v-model:scheduler-task-form="schedulerTaskForm"
|
|
6
|
-
v-model:vm-name="vmName"
|
|
7
6
|
v-model:compute-resource="vmForm.computeResource"
|
|
8
7
|
v-model:location="location"
|
|
9
8
|
:project="props.project"
|
|
10
|
-
:vm-settings="vmSettings"
|
|
11
9
|
:nodes="props.nodes"
|
|
12
10
|
:files="props.files"
|
|
13
11
|
:networks-table="props.networksTable"
|
|
@@ -35,9 +33,6 @@
|
|
|
35
33
|
:is-sphere="isSphere"
|
|
36
34
|
:location-description="locationDescription"
|
|
37
35
|
:name-test-ids="nameTestIds"
|
|
38
|
-
:virtual-hardware-hard-disks-local="virtualHardwareHardDisksLocal"
|
|
39
|
-
:virtual-hardware-networks-local="virtualHardwareNetworksLocal"
|
|
40
|
-
:virtual-hardware-cd-dvd-drives-local="virtualHardwareCdDvdDrivesLocal"
|
|
41
36
|
:guest-os-families="guestOsFamilies"
|
|
42
37
|
:guest-os-versions="guestOsVersions"
|
|
43
38
|
:machine-types="machineTypes"
|
|
@@ -45,13 +40,13 @@
|
|
|
45
40
|
:is-loading-compute-tree="isLoadingComputeTree"
|
|
46
41
|
:compute-resource-alert="computeResourceAlert"
|
|
47
42
|
:compatibility-text="compatibilityText"
|
|
43
|
+
:max-memory="maxMemory"
|
|
44
|
+
:cpu-models="cpuModels"
|
|
48
45
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
49
46
|
@change-name="onChangeName"
|
|
50
47
|
@change-storage="onChangeStorage"
|
|
51
48
|
@change-select-options="onChangeSelectOptions"
|
|
52
49
|
@change-clone-count="cloneCount = $event"
|
|
53
|
-
@change-boot-order="onChangeBootOrder"
|
|
54
|
-
@change-customize-hardware="onChangeCustomizeHardware"
|
|
55
50
|
@get-storage="emits('get-storage', $event)"
|
|
56
51
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
57
52
|
@show-datastore-child="emits('show-datastore-child', $event)"
|
|
@@ -64,13 +59,11 @@
|
|
|
64
59
|
/>
|
|
65
60
|
<common-vm-actions-clone-old
|
|
66
61
|
v-else
|
|
67
|
-
v-model
|
|
62
|
+
v-model="model"
|
|
68
63
|
v-model:scheduler-task-form="schedulerTaskForm"
|
|
69
|
-
v-model:vm-name="vmName"
|
|
70
64
|
v-model:compute-resource="vmForm.computeResource"
|
|
71
65
|
v-model:location="location"
|
|
72
66
|
:project="props.project"
|
|
73
|
-
:vm-settings="vmSettings"
|
|
74
67
|
:nodes="props.nodes"
|
|
75
68
|
:files="props.files"
|
|
76
69
|
:networks-table="props.networksTable"
|
|
@@ -99,9 +92,6 @@
|
|
|
99
92
|
:is-sphere="isSphere"
|
|
100
93
|
:location-description="locationDescription"
|
|
101
94
|
:name-test-ids="nameTestIds"
|
|
102
|
-
:virtual-hardware-hard-disks-local="virtualHardwareHardDisksLocal"
|
|
103
|
-
:virtual-hardware-networks-local="virtualHardwareNetworksLocal"
|
|
104
|
-
:virtual-hardware-cd-dvd-drives-local="virtualHardwareCdDvdDrivesLocal"
|
|
105
95
|
:guest-os-families="guestOsFamilies"
|
|
106
96
|
:guest-os-versions="guestOsVersions"
|
|
107
97
|
:machine-types="machineTypes"
|
|
@@ -109,13 +99,13 @@
|
|
|
109
99
|
:is-loading-compute-tree="isLoadingComputeTree"
|
|
110
100
|
:compute-resource-alert="computeResourceAlert"
|
|
111
101
|
:compatibility-text="compatibilityText"
|
|
102
|
+
:max-memory="maxMemory"
|
|
103
|
+
:cpu-models="cpuModels"
|
|
112
104
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
113
105
|
@change-name="onChangeName"
|
|
114
106
|
@change-storage="onChangeStorage"
|
|
115
107
|
@change-select-options="onChangeSelectOptions"
|
|
116
108
|
@change-clone-count="cloneCount = $event"
|
|
117
|
-
@change-boot-order="onChangeBootOrder"
|
|
118
|
-
@change-customize-hardware="onChangeCustomizeHardware"
|
|
119
109
|
@get-storage="emits('get-storage', $event)"
|
|
120
110
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
121
111
|
@show-datastore-child="emits('show-datastore-child', $event)"
|
|
@@ -145,25 +135,15 @@ import type {
|
|
|
145
135
|
UI_I_ArbitraryObject,
|
|
146
136
|
UI_I_Localization,
|
|
147
137
|
} from '~/lib/models/interfaces'
|
|
148
|
-
import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
|
|
149
138
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
150
|
-
import type {
|
|
151
|
-
UI_I_SendDataCpu,
|
|
152
|
-
UI_I_SendDataMemory,
|
|
153
|
-
UI_I_SendDataNewCdDvdDrive,
|
|
154
|
-
UI_I_SendDataNewHardDisk,
|
|
155
|
-
UI_I_SendDataNewNetwork,
|
|
156
|
-
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
157
139
|
import type { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
|
|
158
140
|
import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
|
|
159
|
-
import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
|
|
160
141
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
161
142
|
import type {
|
|
162
143
|
UI_I_MediatedDevice,
|
|
163
144
|
UI_I_PciDevice,
|
|
164
|
-
UI_I_VmSettings,
|
|
165
145
|
} from '~/lib/models/store/vm/interfaces'
|
|
166
|
-
import type { UI_I_VmForm
|
|
146
|
+
import type {UI_I_CreateVmData, UI_I_VmForm} from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
167
147
|
import type { UI_I_Capabilities } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
168
148
|
import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
|
|
169
149
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
@@ -179,10 +159,11 @@ import { mapCapabilities } from '~/components/common/vm/actions/common/lib/utils
|
|
|
179
159
|
import { scheduledTaskDefaultFormFunc } from '~/components/common/pages/scheduledTasks/modals/lib/config/createScheduledTask'
|
|
180
160
|
import { capabilities } from '~/components/common/vm/actions/common/lib/config/capabilities'
|
|
181
161
|
|
|
162
|
+
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
163
|
+
|
|
182
164
|
const props = withDefaults(
|
|
183
165
|
defineProps<{
|
|
184
166
|
project: UI_T_Project
|
|
185
|
-
vmSettings: UI_I_VmSettings | null
|
|
186
167
|
nodes: UI_I_FileTreeNode[]
|
|
187
168
|
files: UI_I_FileTreeNode[]
|
|
188
169
|
networksTable: UI_I_NetworkTableItem[]
|
|
@@ -279,6 +260,9 @@ watch(
|
|
|
279
260
|
{ deep: true, immediate: true }
|
|
280
261
|
)
|
|
281
262
|
|
|
263
|
+
const cpuModels = ref<UI_I_OptionItem[]>(capabilities.value.cpuModels)
|
|
264
|
+
const maxMemory = ref<number>(capabilities.value.maxMemory)
|
|
265
|
+
|
|
282
266
|
const wizard: Wizard = new Wizard(
|
|
283
267
|
stepsFunc(localization.value),
|
|
284
268
|
stepsSchemeInitial
|
|
@@ -579,23 +563,14 @@ const checkCustomizeHardware = async (
|
|
|
579
563
|
}
|
|
580
564
|
|
|
581
565
|
const vmForm = ref<UI_I_VmForm>({
|
|
582
|
-
name: '',
|
|
583
|
-
compatibility: '',
|
|
584
|
-
guestMachineType: null,
|
|
585
|
-
guestOsFamily: null,
|
|
586
|
-
guestOsVersion: null,
|
|
587
|
-
computeResource: props.computeResource,
|
|
588
|
-
storage: null,
|
|
589
566
|
locationPath: '',
|
|
590
567
|
dataCenter: null,
|
|
591
|
-
options: [],
|
|
592
568
|
})
|
|
593
569
|
|
|
594
570
|
const isLoadingComputeTree = ref<boolean>(false)
|
|
595
571
|
const onChangeName = (data: [string, UI_I_TreeNode | null]): void => {
|
|
596
|
-
const [
|
|
597
|
-
|
|
598
|
-
vmForm.value.name = name
|
|
572
|
+
const [_name, node] = data
|
|
573
|
+
// vmForm.value.name = name
|
|
599
574
|
if (isSphere.value) {
|
|
600
575
|
vmForm.value.locationPath = node.id
|
|
601
576
|
vmForm.value.dataCenter = $recursion.findParentByValue(
|
|
@@ -616,10 +591,11 @@ const onChangeName = (data: [string, UI_I_TreeNode | null]): void => {
|
|
|
616
591
|
const onChangeStorage = (storage: UI_I_DatastoreTableItem | null): void => {
|
|
617
592
|
if (!storage) return
|
|
618
593
|
|
|
619
|
-
vmForm.value.storage = storage
|
|
594
|
+
// vmForm.value.storage = storage
|
|
595
|
+
model.value.storage = storage
|
|
620
596
|
}
|
|
621
597
|
const onChangeSelectOptions = (options: string[]): void => {
|
|
622
|
-
vmForm.value.options = options
|
|
598
|
+
// vmForm.value.options = options
|
|
623
599
|
if (
|
|
624
600
|
options.includes('customize-os') &&
|
|
625
601
|
options.includes('customize-hardware')
|
|
@@ -645,48 +621,15 @@ const onChangeSelectOptions = (options: string[]): void => {
|
|
|
645
621
|
isPowerOnByDefault.value = options.includes('power-on')
|
|
646
622
|
isCreateLinkedClone.value = options.includes('create-linked-clone')
|
|
647
623
|
}
|
|
648
|
-
const cloneCount = ref<number>(1)
|
|
649
|
-
const customizeHardware = ref<UI_I_SendDataCustomizeHardware | null>(null)
|
|
650
|
-
const onChangeCustomizeHardware = (
|
|
651
|
-
data: UI_I_SendDataCustomizeHardware
|
|
652
|
-
): void => {
|
|
653
|
-
customizeHardware.value = data
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
const virtualHardwareHardDisksLocal = computed<
|
|
657
|
-
UI_I_SendDataNewHardDisk[] | null
|
|
658
|
-
>(() => customizeHardware.value?.virtualHardware?.hardDisks || null)
|
|
659
|
-
const virtualHardwareNetworksLocal = computed<UI_I_SendDataNewNetwork[] | null>(
|
|
660
|
-
() => customizeHardware.value?.virtualHardware?.networks || null
|
|
661
|
-
)
|
|
662
|
-
const virtualHardwareCdDvdDrivesLocal = computed<
|
|
663
|
-
UI_I_SendDataNewCdDvdDrive[] | null
|
|
664
|
-
>(() => customizeHardware.value?.virtualHardware?.cdDvdDrives || null)
|
|
665
|
-
|
|
666
|
-
const virtualHardwareCpu = computed<UI_I_SendDataCpu | null>(
|
|
667
|
-
() => customizeHardware.value?.virtualHardware?.cpu || null
|
|
668
|
-
)
|
|
669
|
-
const virtualHardwareMemory = computed<UI_I_SendDataMemory | null>(
|
|
670
|
-
() => customizeHardware.value?.virtualHardware?.memory || null
|
|
671
|
-
)
|
|
672
|
-
const virtualHardwareHardDisks = ref<UI_I_SendDataNewHardDisk[] | null>(null)
|
|
673
|
-
const virtualHardwareCdDvdDrives = ref<UI_I_SendDataNewCdDvdDrive[] | null>(
|
|
674
|
-
null
|
|
675
|
-
)
|
|
676
|
-
const virtualHardwareNetworks = ref<UI_I_SendDataNewNetwork[] | null>(null)
|
|
677
|
-
const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
|
|
678
|
-
virtualHardwareHardDisks.value = data[0]
|
|
679
|
-
virtualHardwareCdDvdDrives.value = data[1]
|
|
680
|
-
virtualHardwareNetworks.value = data[2]
|
|
681
|
-
}
|
|
682
|
-
|
|
683
624
|
const isPowerOnByDefault = ref<boolean>(false)
|
|
684
625
|
const isCreateLinkedClone = ref<boolean>(false)
|
|
626
|
+
const cloneCount = ref<number>(0)
|
|
685
627
|
|
|
686
628
|
watch(
|
|
687
629
|
() => props.vmNameInWizard,
|
|
688
630
|
(newValue) => {
|
|
689
|
-
vmForm.value.name = newValue
|
|
631
|
+
// vmForm.value.name = newValue
|
|
632
|
+
model.value.name = newValue
|
|
690
633
|
}
|
|
691
634
|
)
|
|
692
635
|
|
|
@@ -697,18 +640,12 @@ const validateSendData = async (
|
|
|
697
640
|
let stepHasError = false
|
|
698
641
|
|
|
699
642
|
const data = await props.validateSendDataFunc(
|
|
700
|
-
|
|
701
|
-
virtualHardwareCpu.value,
|
|
702
|
-
virtualHardwareMemory.value,
|
|
703
|
-
customizeHardware.value,
|
|
704
|
-
virtualHardwareNetworks.value,
|
|
705
|
-
virtualHardwareHardDisks.value,
|
|
706
|
-
virtualHardwareCdDvdDrives.value,
|
|
643
|
+
model.value,
|
|
707
644
|
isPowerOnByDefault.value,
|
|
708
645
|
localization.value,
|
|
709
646
|
vmForm.value.locationPath, // для сферы
|
|
710
647
|
// computeResourcePath.value // для сферы
|
|
711
|
-
|
|
648
|
+
model.value.host_id // для сферы // TODO rollback
|
|
712
649
|
)
|
|
713
650
|
|
|
714
651
|
wizard.setLoader(false)
|
|
@@ -729,18 +666,12 @@ const onFinish = (): void => {
|
|
|
729
666
|
wizard.setLoader(false)
|
|
730
667
|
props
|
|
731
668
|
.finishFunc(
|
|
732
|
-
|
|
733
|
-
virtualHardwareCpu.value,
|
|
734
|
-
virtualHardwareMemory.value,
|
|
735
|
-
customizeHardware.value,
|
|
736
|
-
virtualHardwareNetworks.value,
|
|
737
|
-
virtualHardwareHardDisks.value,
|
|
738
|
-
virtualHardwareCdDvdDrives.value,
|
|
669
|
+
model.value,
|
|
739
670
|
isPowerOnByDefault.value,
|
|
740
671
|
localization.value,
|
|
741
672
|
vmForm.value.locationPath, // для сферы
|
|
742
673
|
// computeResourcePath.value, // для сферы
|
|
743
|
-
|
|
674
|
+
model.value.host_id, // для сферы // TODO rollback
|
|
744
675
|
false,
|
|
745
676
|
schedulerTaskForm.value,
|
|
746
677
|
props.schedulerTask,
|
|
@@ -760,9 +691,6 @@ const nameFormSubmit = ref<null | Function>(null)
|
|
|
760
691
|
const storageSubmit = ref<null | Function>(null)
|
|
761
692
|
const customizeHardwareSubmit = ref<null | Function>(null)
|
|
762
693
|
|
|
763
|
-
const vmSettings = computed<UI_I_VmSettings | null>(() => props.vmSettings)
|
|
764
|
-
const vmName = ref<string>(vmSettings.value?.name || '')
|
|
765
|
-
|
|
766
694
|
const guestOsFamilies = ref<UI_I_OptionItem[]>(
|
|
767
695
|
capabilities.value.guestOsFamilies
|
|
768
696
|
)
|
|
@@ -787,26 +715,26 @@ watch(
|
|
|
787
715
|
{ deep: true, immediate: true }
|
|
788
716
|
)
|
|
789
717
|
|
|
790
|
-
watch(vmSettings, (newValue) => {
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
})
|
|
718
|
+
// watch(vmSettings, (newValue) => {
|
|
719
|
+
// vmName.value = newValue?.name || ''
|
|
720
|
+
//
|
|
721
|
+
// if (newValue?.guestOsFamily)
|
|
722
|
+
// vmForm.value.guestOsFamily = newValue.guestOsFamily
|
|
723
|
+
// if (newValue?.guestMachineType)
|
|
724
|
+
// vmForm.value.guestMachineType = newValue.guestMachineType
|
|
725
|
+
// if (newValue?.guestOsVersion)
|
|
726
|
+
// vmForm.value.guestOsVersion = newValue.guestOsVersion
|
|
727
|
+
//
|
|
728
|
+
// if (newValue?.compatibility)
|
|
729
|
+
// vmForm.value.compatibility = newValue.compatibility
|
|
730
|
+
//
|
|
731
|
+
// if (newValue?.storage) {
|
|
732
|
+
// const datastore = props.datastore.find(
|
|
733
|
+
// (item) => item.id === newValue.storage.id
|
|
734
|
+
// )
|
|
735
|
+
// if (datastore) vmForm.value.storage = datastore
|
|
736
|
+
// }
|
|
737
|
+
// })
|
|
810
738
|
|
|
811
739
|
const onHideModal = (): void => {
|
|
812
740
|
emits('hide')
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
</template>
|
|
55
55
|
<template #content>
|
|
56
56
|
<common-wizards-common-steps-name
|
|
57
|
-
v-model:name="
|
|
57
|
+
v-model:name="model.name"
|
|
58
58
|
v-model:location="location"
|
|
59
59
|
:show="
|
|
60
60
|
selectedStep.id === props.dynamicSteps.selectName ||
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
:storage-submit="props.storageSubmit"
|
|
100
100
|
:datastore="props.datastore"
|
|
101
101
|
:is-datastore-loading="props.isDatastoreLoading"
|
|
102
|
-
:storage="
|
|
102
|
+
:storage="model.storage"
|
|
103
103
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
104
104
|
hide-alert
|
|
105
105
|
@change-storage="emits('change-storage', $event)"
|
|
@@ -147,9 +147,9 @@
|
|
|
147
147
|
</template>
|
|
148
148
|
<template #content>
|
|
149
149
|
<common-vm-actions-common-select-os
|
|
150
|
-
v-model:
|
|
151
|
-
v-model:guest-os-
|
|
152
|
-
v-model:
|
|
150
|
+
v-model:guest-os-family="model.guest_os_family"
|
|
151
|
+
v-model:guest-os-version="model.guest_os_version"
|
|
152
|
+
v-model:machine-type="model.machine_type"
|
|
153
153
|
:families-options="props.guestOsFamilies"
|
|
154
154
|
:versions-options="props.guestOsVersions"
|
|
155
155
|
:machine-types-options="props.machineTypes"
|
|
@@ -164,31 +164,12 @@
|
|
|
164
164
|
>
|
|
165
165
|
<template #content>
|
|
166
166
|
<common-vm-actions-common-customize-hardware
|
|
167
|
-
v-model
|
|
168
|
-
|
|
169
|
-
v-model:guest-os-family="props.vmSettings.guestOsFamily"
|
|
170
|
-
v-model:guest-os-version="props.vmSettings.guestOsVersion"
|
|
171
|
-
:storage="vmForm.storage"
|
|
172
|
-
:hard-disks-for-boot-options="props.virtualHardwareHardDisksLocal"
|
|
173
|
-
:cd-dvd-drives-for-boot-options="
|
|
174
|
-
props.virtualHardwareCdDvdDrivesLocal
|
|
175
|
-
"
|
|
176
|
-
:networks-for-boot-options="props.virtualHardwareNetworksLocal"
|
|
177
|
-
:cd-dvd-drives="props.vmSettings.cdDvdDrives"
|
|
178
|
-
:hard-disks="props.vmSettings.hardDisks"
|
|
179
|
-
:networks="props.vmSettings.networks"
|
|
167
|
+
v-model="model"
|
|
168
|
+
:storage="model.storage"
|
|
180
169
|
:customize-hardware-submit="props.customizeHardwareSubmit"
|
|
181
|
-
:max-
|
|
182
|
-
:
|
|
183
|
-
:cpu-models="props.vmSettings.cpuModels"
|
|
184
|
-
:cpu="props.vmSettings.cpu"
|
|
185
|
-
:memory="props.vmSettings.memory"
|
|
186
|
-
:video-card="props.vmSettings.videoCard"
|
|
187
|
-
:usb-controller="props.vmSettings.usbController"
|
|
188
|
-
:pci-devices="props.vmSettings.pciDevices"
|
|
170
|
+
:max-memory="props.maxMemory"
|
|
171
|
+
:cpu-models="props.cpuModels"
|
|
189
172
|
:selected-nav-item="props.selectedNavItem"
|
|
190
|
-
:hard-disks-for-edit="props.vmSettings.hardDisks"
|
|
191
|
-
:options="props.vmSettings.options"
|
|
192
173
|
:nodes="props.nodes"
|
|
193
174
|
:files="props.files"
|
|
194
175
|
:networks-table="props.networksTable"
|
|
@@ -201,8 +182,6 @@
|
|
|
201
182
|
:is-datastore-loading="props.isDatastoreLoading"
|
|
202
183
|
:project="props.project"
|
|
203
184
|
is-clone
|
|
204
|
-
@change-boot-order="emits('change-boot-order', $event)"
|
|
205
|
-
@send-data="emits('change-customize-hardware', $event)"
|
|
206
185
|
@get-storage="emits('get-storage', $event)"
|
|
207
186
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
208
187
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
@@ -293,19 +272,12 @@ import type {
|
|
|
293
272
|
UI_I_ArbitraryObject,
|
|
294
273
|
UI_I_Localization,
|
|
295
274
|
} from '~/lib/models/interfaces'
|
|
296
|
-
import type {
|
|
297
|
-
UI_I_SendDataNewCdDvdDrive,
|
|
298
|
-
UI_I_SendDataNewHardDisk,
|
|
299
|
-
UI_I_SendDataNewNetwork,
|
|
300
|
-
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
301
|
-
import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
|
|
302
275
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
303
|
-
import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
|
|
304
276
|
import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
|
|
305
277
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
306
278
|
import type { UI_I_NameTestIds } from '~/components/common/wizards/common/steps/name/lib/models/interfaces'
|
|
307
279
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
308
|
-
import type {
|
|
280
|
+
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
309
281
|
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
310
282
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
311
283
|
import type { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
|
|
@@ -314,7 +286,6 @@ import type { UI_I_NetworkTableItem } from '~/lib/models/store/network/interface
|
|
|
314
286
|
import type {
|
|
315
287
|
UI_I_MediatedDevice,
|
|
316
288
|
UI_I_PciDevice,
|
|
317
|
-
UI_I_VmSettings,
|
|
318
289
|
} from '~/lib/models/store/vm/interfaces'
|
|
319
290
|
import type {
|
|
320
291
|
UI_I_DatastoreTableItem,
|
|
@@ -323,11 +294,11 @@ import type {
|
|
|
323
294
|
import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
|
|
324
295
|
import type { UI_T_CompatibilityStatus } from '~/components/common/wizards/common/compatibility/lib/models/types'
|
|
325
296
|
|
|
326
|
-
const
|
|
297
|
+
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
298
|
+
|
|
327
299
|
const schedulerTaskForm = defineModel<UI_I_ScheduleNewTasksForm>(
|
|
328
300
|
'scheduler-task-form'
|
|
329
301
|
)
|
|
330
|
-
const vmName = defineModel<string>('vm-name')
|
|
331
302
|
const computeResource = defineModel<UI_I_TreeNode | undefined>(
|
|
332
303
|
'compute-resource'
|
|
333
304
|
)
|
|
@@ -335,7 +306,6 @@ const location = defineModel<UI_I_TreeNode | null>('location')
|
|
|
335
306
|
const props = withDefaults(
|
|
336
307
|
defineProps<{
|
|
337
308
|
project: UI_T_Project
|
|
338
|
-
vmSettings: UI_I_VmSettings | null
|
|
339
309
|
nodes: UI_I_FileTreeNode[]
|
|
340
310
|
files: UI_I_FileTreeNode[]
|
|
341
311
|
networksTable: UI_I_NetworkTableItem[]
|
|
@@ -363,12 +333,11 @@ const props = withDefaults(
|
|
|
363
333
|
isSphere: boolean
|
|
364
334
|
locationDescription: string
|
|
365
335
|
nameTestIds: UI_I_NameTestIds
|
|
366
|
-
virtualHardwareHardDisksLocal: UI_I_SendDataNewHardDisk[] | null
|
|
367
|
-
virtualHardwareNetworksLocal: UI_I_SendDataNewNetwork[] | null
|
|
368
|
-
virtualHardwareCdDvdDrivesLocal: UI_I_SendDataNewCdDvdDrive[] | null
|
|
369
336
|
guestOsFamilies: UI_I_OptionItem[]
|
|
370
337
|
guestOsVersions: UI_I_ArbitraryObject<UI_I_OptionItem[]>
|
|
371
338
|
machineTypes: UI_I_OptionItem[]
|
|
339
|
+
maxMemory: number
|
|
340
|
+
cpuModels: UI_I_OptionItem[]
|
|
372
341
|
dynamicSteps: UI_I_ArbitraryObject<number>
|
|
373
342
|
isLoadingComputeTree?: boolean // для сферы
|
|
374
343
|
computeResourceAlert?: string[] // для сферы
|
|
@@ -394,11 +363,6 @@ const emits = defineEmits<{
|
|
|
394
363
|
(event: 'change-storage', value: UI_I_DatastoreTableItem | null): void
|
|
395
364
|
(event: 'change-select-options', value: string[]): void
|
|
396
365
|
(event: 'change-clone-count', value: number): void
|
|
397
|
-
(event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
|
|
398
|
-
(
|
|
399
|
-
event: 'change-customize-hardware',
|
|
400
|
-
value: UI_I_SendDataCustomizeHardware
|
|
401
|
-
): void
|
|
402
366
|
(event: 'hide'): void
|
|
403
367
|
(event: 'finish'): void
|
|
404
368
|
}>()
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
>
|
|
13
13
|
<template #modalBody="{ selectedStep }">
|
|
14
14
|
<atoms-loader
|
|
15
|
-
v-show="!
|
|
15
|
+
v-show="!model || props.isLoading"
|
|
16
16
|
id="loader"
|
|
17
17
|
test-id="clone-vm-loader"
|
|
18
18
|
/>
|
|
19
|
-
<div v-if="
|
|
19
|
+
<div v-if="model" class="vm-context">
|
|
20
20
|
<common-pages-scheduled-tasks-modals-common-new-task-form
|
|
21
21
|
v-show="selectedStep.id === props.dynamicSteps.scheduledTasks"
|
|
22
22
|
v-model="schedulerTaskForm"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
selectedStep.id === props.dynamicSteps.selectName ||
|
|
29
29
|
selectedStep.id === props.dynamicSteps.selectNameFolder
|
|
30
30
|
"
|
|
31
|
-
v-model:name="
|
|
31
|
+
v-model:name="model.name"
|
|
32
32
|
v-model:location="location"
|
|
33
33
|
:show="
|
|
34
34
|
selectedStep.id === props.dynamicSteps.selectName ||
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
:storage-submit="props.storageSubmit"
|
|
66
66
|
:datastore="props.datastore"
|
|
67
67
|
:is-datastore-loading="props.isDatastoreLoading"
|
|
68
|
-
:storage="
|
|
68
|
+
:storage="model.storage"
|
|
69
69
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
70
70
|
@submit="emits('change-storage', $event)"
|
|
71
71
|
/>
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
v-show="
|
|
80
80
|
selectedStep.id === props.dynamicSteps.selectGuestOSMachineType
|
|
81
81
|
"
|
|
82
|
-
v-model:
|
|
83
|
-
v-model:guest-os-
|
|
84
|
-
v-model:
|
|
82
|
+
v-model:guest-os-family="model.guest_os_family"
|
|
83
|
+
v-model:guest-os-version="model.guest_os_version"
|
|
84
|
+
v-model:machine-type="model.machine_type"
|
|
85
85
|
:families-options="props.guestOsFamilies"
|
|
86
86
|
:versions-options="props.guestOsVersions"
|
|
87
87
|
:machine-types-options="props.machineTypes"
|
|
@@ -90,31 +90,12 @@
|
|
|
90
90
|
/>
|
|
91
91
|
<common-vm-actions-common-customize-hardware
|
|
92
92
|
v-show="selectedStep.id === props.dynamicSteps.customizeHardware"
|
|
93
|
-
v-model
|
|
94
|
-
|
|
95
|
-
v-model:guest-os-family="props.vmSettings.guestOsFamily"
|
|
96
|
-
v-model:guest-os-version="props.vmSettings.guestOsVersion"
|
|
97
|
-
:storage="vmForm.storage"
|
|
98
|
-
:hard-disks-for-boot-options="props.virtualHardwareHardDisksLocal"
|
|
99
|
-
:cd-dvd-drives-for-boot-options="
|
|
100
|
-
props.virtualHardwareCdDvdDrivesLocal
|
|
101
|
-
"
|
|
102
|
-
:networks-for-boot-options="props.virtualHardwareNetworksLocal"
|
|
103
|
-
:cd-dvd-drives="props.vmSettings.cdDvdDrives"
|
|
104
|
-
:hard-disks="props.vmSettings.hardDisks"
|
|
105
|
-
:networks="props.vmSettings.networks"
|
|
93
|
+
v-model="model"
|
|
94
|
+
:storage="model.storage"
|
|
106
95
|
:customize-hardware-submit="props.customizeHardwareSubmit"
|
|
107
|
-
:max-
|
|
108
|
-
:
|
|
109
|
-
:cpu-models="props.vmSettings.cpuModels"
|
|
110
|
-
:cpu="props.vmSettings.cpu"
|
|
111
|
-
:memory="props.vmSettings.memory"
|
|
112
|
-
:video-card="props.vmSettings.videoCard"
|
|
113
|
-
:usb-controller="props.vmSettings.usbController"
|
|
114
|
-
:pci-devices="props.vmSettings.pciDevices"
|
|
96
|
+
:max-memory="props.maxMemory"
|
|
97
|
+
:cpu-models="props.cpuModels"
|
|
115
98
|
:selected-nav-item="props.selectedNavItem"
|
|
116
|
-
:hard-disks-for-edit="props.vmSettings.hardDisks"
|
|
117
|
-
:options="props.vmSettings.options"
|
|
118
99
|
:nodes="props.nodes"
|
|
119
100
|
:files="props.files"
|
|
120
101
|
:networks-table="props.networksTable"
|
|
@@ -127,8 +108,6 @@
|
|
|
127
108
|
:is-datastore-loading="props.isDatastoreLoading"
|
|
128
109
|
:project="props.project"
|
|
129
110
|
is-clone
|
|
130
|
-
@change-boot-order="emits('change-boot-order', $event)"
|
|
131
|
-
@send-data="emits('change-customize-hardware', $event)"
|
|
132
111
|
@get-storage="emits('get-storage', $event)"
|
|
133
112
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
134
113
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
@@ -160,34 +139,26 @@ import type {
|
|
|
160
139
|
UI_I_ArbitraryObject,
|
|
161
140
|
UI_I_Localization,
|
|
162
141
|
} from '~/lib/models/interfaces'
|
|
163
|
-
import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
|
|
164
142
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
165
|
-
import type {
|
|
166
|
-
UI_I_SendDataNewCdDvdDrive,
|
|
167
|
-
UI_I_SendDataNewHardDisk,
|
|
168
|
-
UI_I_SendDataNewNetwork,
|
|
169
|
-
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
170
143
|
import type { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
|
|
171
144
|
import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
|
|
172
|
-
import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
|
|
173
145
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
174
146
|
import type {
|
|
175
147
|
UI_I_MediatedDevice,
|
|
176
148
|
UI_I_PciDevice,
|
|
177
|
-
UI_I_VmSettings,
|
|
178
149
|
} from '~/lib/models/store/vm/interfaces'
|
|
179
150
|
import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
|
|
180
151
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
181
152
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
182
153
|
import type { UI_I_NameTestIds } from '~/components/common/wizards/common/steps/name/lib/models/interfaces'
|
|
183
|
-
import type {
|
|
154
|
+
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
184
155
|
import type { UI_T_CompatibilityStatus } from '~/components/common/wizards/common/compatibility/lib/models/types'
|
|
185
156
|
|
|
186
|
-
const
|
|
157
|
+
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
158
|
+
|
|
187
159
|
const schedulerTaskForm = defineModel<UI_I_ScheduleNewTasksForm>(
|
|
188
160
|
'scheduler-task-form'
|
|
189
161
|
)
|
|
190
|
-
const vmName = defineModel<string>('vm-name')
|
|
191
162
|
const computeResource = defineModel<UI_I_TreeNode | undefined>(
|
|
192
163
|
'compute-resource'
|
|
193
164
|
)
|
|
@@ -195,7 +166,6 @@ const location = defineModel<UI_I_TreeNode | null>('location')
|
|
|
195
166
|
const props = withDefaults(
|
|
196
167
|
defineProps<{
|
|
197
168
|
project: UI_T_Project
|
|
198
|
-
vmSettings: UI_I_VmSettings | null
|
|
199
169
|
nodes: UI_I_FileTreeNode[]
|
|
200
170
|
files: UI_I_FileTreeNode[]
|
|
201
171
|
networksTable: UI_I_NetworkTableItem[]
|
|
@@ -223,12 +193,11 @@ const props = withDefaults(
|
|
|
223
193
|
isSphere: boolean
|
|
224
194
|
locationDescription: string
|
|
225
195
|
nameTestIds: UI_I_NameTestIds
|
|
226
|
-
virtualHardwareHardDisksLocal: UI_I_SendDataNewHardDisk[] | null
|
|
227
|
-
virtualHardwareNetworksLocal: UI_I_SendDataNewNetwork[] | null
|
|
228
|
-
virtualHardwareCdDvdDrivesLocal: UI_I_SendDataNewCdDvdDrive[] | null
|
|
229
196
|
guestOsFamilies: UI_I_OptionItem[]
|
|
230
197
|
guestOsVersions: UI_I_ArbitraryObject<UI_I_OptionItem[]>
|
|
231
198
|
machineTypes: UI_I_OptionItem[]
|
|
199
|
+
maxMemory: number
|
|
200
|
+
cpuModels: UI_I_OptionItem[]
|
|
232
201
|
dynamicSteps: UI_I_ArbitraryObject<number>
|
|
233
202
|
isLoading: boolean
|
|
234
203
|
isLoadingComputeTree?: boolean // для сферы
|
|
@@ -255,11 +224,6 @@ const emits = defineEmits<{
|
|
|
255
224
|
(event: 'change-storage', value: UI_I_DatastoreTableItem | null): void
|
|
256
225
|
(event: 'change-select-options', value: string[]): void
|
|
257
226
|
(event: 'change-clone-count', value: number): void
|
|
258
|
-
(event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
|
|
259
|
-
(
|
|
260
|
-
event: 'change-customize-hardware',
|
|
261
|
-
value: UI_I_SendDataCustomizeHardware
|
|
262
|
-
): void
|
|
263
227
|
(event: 'hide'): void
|
|
264
228
|
(event: 'finish'): void
|
|
265
229
|
}>()
|