bfg-common 1.5.577 → 1.5.578
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 +886 -960
- 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/add/lib/config/steps.ts +347 -347
- package/components/common/vm/actions/clone/Clone.vue +744 -816
- 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/common/select/options/New.vue +258 -258
- package/components/common/vm/actions/common/select/options/Old.vue +103 -103
- package/components/common/vm/actions/common/select/options/Options.vue +54 -54
- 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
|
@@ -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
|
}>()
|
|
@@ -1,37 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-vm-actions-common-customize-hardware-new
|
|
3
3
|
v-if="isNewView"
|
|
4
|
-
v-model
|
|
5
|
-
v-model:guest-machine-type="guestMachineType"
|
|
6
|
-
v-model:guest-os-family="guestOsFamily"
|
|
7
|
-
v-model:guest-os-version="guestOsVersion"
|
|
4
|
+
v-model="model"
|
|
8
5
|
v-model:selected-nav-item="selectedNavItemLocal"
|
|
9
6
|
v-model:virtual-hardware-invalid="virtualHardwareInvalid"
|
|
10
7
|
v-model:vm-options-invalid="vmOptionsInvalid"
|
|
11
8
|
:error-validation-fields="props.errorValidationFields"
|
|
12
9
|
:storage="props.storage"
|
|
13
10
|
:cpu-models="props.cpuModels"
|
|
14
|
-
:hard-disks-for-boot-options="props.hardDisksForBootOptions"
|
|
15
|
-
:cd-dvd-drives-for-boot-options="props.cdDvdDrivesForBootOptions"
|
|
16
|
-
:networks-for-boot-options="props.networksForBootOptions"
|
|
17
|
-
:max-cpus="props.maxCpus"
|
|
18
11
|
:max-memory="props.maxMemory"
|
|
19
12
|
:nodes="props.nodes"
|
|
20
13
|
:files="props.files"
|
|
21
14
|
:networks-table="props.networksTable"
|
|
22
|
-
:cpu="props.cpu"
|
|
23
|
-
:memory="props.memory"
|
|
24
15
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
25
16
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
26
17
|
:datastore="props.datastore"
|
|
27
18
|
:is-datastore-loading="props.isDatastoreLoading"
|
|
28
19
|
:hard-disks="props.hardDisks"
|
|
29
20
|
:cd-dvd-drives="props.cdDvdDrives"
|
|
30
|
-
:networks="props.networks"
|
|
31
21
|
:video-card="props.videoCard"
|
|
32
22
|
:pci-devices="props.pciDevices"
|
|
33
|
-
:usb-controller="props.usbController"
|
|
34
|
-
:options="props.options"
|
|
35
23
|
:is-edit="props.isEdit"
|
|
36
24
|
:is-clone="props.isClone"
|
|
37
25
|
:state="props.state"
|
|
@@ -43,8 +31,6 @@
|
|
|
43
31
|
:compute-resource="props.computeResource"
|
|
44
32
|
:compatibility-info="props.compatibilityInfo"
|
|
45
33
|
:is-vmt="props.isVmt"
|
|
46
|
-
@change-boot-order="emits('change-boot-order', $event)"
|
|
47
|
-
@send-data="emits('send-data', $event)"
|
|
48
34
|
@next="emits('next')"
|
|
49
35
|
@get-storage="emits('get-storage', $event)"
|
|
50
36
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
@@ -54,42 +40,28 @@
|
|
|
54
40
|
@get-networks-table="emits('get-networks-table', $event)"
|
|
55
41
|
@get-pci-devices="emits('get-pci-devices')"
|
|
56
42
|
@remove-validation-errors="onRemoveValidationErrors"
|
|
57
|
-
@send-data-virtual-hardware-method="onSendDataVirtualHardwareMethod"
|
|
58
|
-
@send-data-vm-options-method="onSendDataVmOptionsMethod"
|
|
59
43
|
/>
|
|
60
44
|
<common-vm-actions-common-customize-hardware-old
|
|
61
45
|
v-else
|
|
62
|
-
v-model
|
|
63
|
-
v-model:guest-machine-type="guestMachineType"
|
|
64
|
-
v-model:guest-os-family="guestOsFamily"
|
|
65
|
-
v-model:guest-os-version="guestOsVersion"
|
|
46
|
+
v-model="model"
|
|
66
47
|
v-model:selected-nav-item="selectedNavItemLocal"
|
|
67
48
|
v-model:virtual-hardware-invalid="virtualHardwareInvalid"
|
|
68
49
|
v-model:vm-options-invalid="vmOptionsInvalid"
|
|
69
50
|
:error-validation-fields="props.errorValidationFields"
|
|
70
51
|
:storage="props.storage"
|
|
71
52
|
:cpu-models="props.cpuModels"
|
|
72
|
-
:hard-disks-for-boot-options="props.hardDisksForBootOptions"
|
|
73
|
-
:cd-dvd-drives-for-boot-options="props.cdDvdDrivesForBootOptions"
|
|
74
|
-
:networks-for-boot-options="props.networksForBootOptions"
|
|
75
|
-
:max-cpus="props.maxCpus"
|
|
76
53
|
:max-memory="props.maxMemory"
|
|
77
54
|
:nodes="props.nodes"
|
|
78
55
|
:files="props.files"
|
|
79
56
|
:networks-table="props.networksTable"
|
|
80
|
-
:cpu="props.cpu"
|
|
81
|
-
:memory="props.memory"
|
|
82
57
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
83
58
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
84
59
|
:datastore="props.datastore"
|
|
85
60
|
:is-datastore-loading="props.isDatastoreLoading"
|
|
86
61
|
:hard-disks="props.hardDisks"
|
|
87
62
|
:cd-dvd-drives="props.cdDvdDrives"
|
|
88
|
-
:networks="props.networks"
|
|
89
63
|
:video-card="props.videoCard"
|
|
90
64
|
:pci-devices="props.pciDevices"
|
|
91
|
-
:usb-controller="props.usbController"
|
|
92
|
-
:options="props.options"
|
|
93
65
|
:is-edit="props.isEdit"
|
|
94
66
|
:is-clone="props.isClone"
|
|
95
67
|
:state="props.state"
|
|
@@ -100,8 +72,6 @@
|
|
|
100
72
|
:errors="errors"
|
|
101
73
|
:compute-resource="props.computeResource"
|
|
102
74
|
:is-vmt="props.isVmt"
|
|
103
|
-
@change-boot-order="emits('change-boot-order', $event)"
|
|
104
|
-
@send-data="emits('send-data', $event)"
|
|
105
75
|
@next="emits('next')"
|
|
106
76
|
@get-storage="emits('get-storage', $event)"
|
|
107
77
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
@@ -111,8 +81,6 @@
|
|
|
111
81
|
@get-networks-table="emits('get-networks-table', $event)"
|
|
112
82
|
@get-pci-devices="emits('get-pci-devices')"
|
|
113
83
|
@remove-validation-errors="onRemoveValidationErrors"
|
|
114
|
-
@send-data-virtual-hardware-method="onSendDataVirtualHardwareMethod"
|
|
115
|
-
@send-data-vm-options-method="onSendDataVmOptionsMethod"
|
|
116
84
|
/>
|
|
117
85
|
</template>
|
|
118
86
|
|
|
@@ -129,42 +97,30 @@ import type {
|
|
|
129
97
|
UI_I_SendDataNewHardDisk,
|
|
130
98
|
UI_I_SendDataNewNetwork,
|
|
131
99
|
UI_I_SendDataVideoCard,
|
|
132
|
-
UI_I_SendDataVirtualHardware,
|
|
133
100
|
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
134
|
-
import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
|
|
135
|
-
import type { UI_I_SendDataVmoptions } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
|
|
136
101
|
import type { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
|
|
137
102
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
138
103
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
139
104
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
140
|
-
import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
|
|
141
105
|
import type {
|
|
142
|
-
API_UI_I_VmEditCpu,
|
|
143
|
-
API_UI_I_VmEditMemory,
|
|
144
106
|
UI_I_MediatedDevice,
|
|
145
107
|
UI_I_PciDevice,
|
|
146
108
|
} from '~/lib/models/store/vm/interfaces'
|
|
147
109
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
148
110
|
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
111
|
+
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
149
112
|
import { navItemsFunc } from '~/components/common/vm/actions/common/customizeHardware/lib/config/navItems'
|
|
150
113
|
|
|
151
|
-
const
|
|
152
|
-
const guestMachineType = defineModel<UI_I_OptionItem | null>(
|
|
153
|
-
'guest-machine-type'
|
|
154
|
-
)
|
|
155
|
-
const guestOsFamily = defineModel<UI_I_OptionItem | null>('guestOsFamily')
|
|
156
|
-
const guestOsVersion = defineModel<UI_I_OptionItem | null>('guestOsVersion')
|
|
157
|
-
|
|
114
|
+
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
158
115
|
const props = withDefaults(
|
|
159
116
|
defineProps<{
|
|
160
117
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
161
118
|
storage: UI_I_DatastoreTableItem | null
|
|
162
119
|
cpuModels: UI_I_OptionItem[]
|
|
163
|
-
hardDisksForBootOptions: UI_I_SendDataNewHardDisk[] | null
|
|
164
|
-
cdDvdDrivesForBootOptions: UI_I_SendDataNewCdDvdDrive[] | null
|
|
165
|
-
networksForBootOptions: UI_I_SendDataNewNetwork[] | null
|
|
120
|
+
// hardDisksForBootOptions: UI_I_SendDataNewHardDisk[] | null // TODO remove everywhere
|
|
121
|
+
// cdDvdDrivesForBootOptions: UI_I_SendDataNewCdDvdDrive[] | null // TODO remove everywhere
|
|
122
|
+
// networksForBootOptions: UI_I_SendDataNewNetwork[] | null // TODO remove everywhere
|
|
166
123
|
customizeHardwareSubmit: null | Function
|
|
167
|
-
maxCpus: number
|
|
168
124
|
maxMemory: number
|
|
169
125
|
selectedNavItem: UI_T_SelectedNavItem
|
|
170
126
|
nodes: UI_I_FileTreeNode[]
|
|
@@ -172,17 +128,17 @@ const props = withDefaults(
|
|
|
172
128
|
networksTable: UI_I_NetworkTableItem[]
|
|
173
129
|
datastore: UI_I_DatastoreTableItem[]
|
|
174
130
|
isDatastoreLoading: boolean
|
|
175
|
-
cpu?: API_UI_I_VmEditCpu
|
|
176
|
-
memory?: API_UI_I_VmEditMemory
|
|
131
|
+
// cpu?: API_UI_I_VmEditCpu // TODO remove everywhere
|
|
132
|
+
// memory?: API_UI_I_VmEditMemory // TODO remove everywhere
|
|
177
133
|
vmCpuHelpTextSecond?: string
|
|
178
134
|
getDatastoreTableFunc?: (payload: UI_I_TablePayload) => Promise<void>
|
|
179
135
|
hardDisks?: UI_I_SendDataNewHardDisk[] | null
|
|
180
136
|
cdDvdDrives?: UI_I_SendDataNewCdDvdDrive[] | null
|
|
181
|
-
networks?: UI_I_SendDataNewNetwork[] | null
|
|
137
|
+
// networks?: UI_I_SendDataNewNetwork[] | null // TODO remove everywhere
|
|
182
138
|
videoCard?: UI_I_SendDataVideoCard
|
|
183
139
|
pciDevices?: UI_I_SendDataNewPciDevice[]
|
|
184
|
-
usbController?: string
|
|
185
|
-
options?: UI_I_SendDataVmoptions
|
|
140
|
+
// usbController?: string // TODO remove everywhere
|
|
141
|
+
// options?: UI_I_SendDataVmoptions // TODO remove everywhere
|
|
186
142
|
isEdit?: boolean
|
|
187
143
|
isClone?: boolean
|
|
188
144
|
state?: string | number
|
|
@@ -194,8 +150,6 @@ const props = withDefaults(
|
|
|
194
150
|
isVmt?: boolean
|
|
195
151
|
}>(),
|
|
196
152
|
{
|
|
197
|
-
cpu: undefined,
|
|
198
|
-
memory: undefined,
|
|
199
153
|
vmCpuHelpTextSecond: undefined,
|
|
200
154
|
getDatastoreTableFunc: undefined,
|
|
201
155
|
hardDisks: undefined,
|
|
@@ -203,8 +157,6 @@ const props = withDefaults(
|
|
|
203
157
|
networks: undefined,
|
|
204
158
|
videoCard: undefined,
|
|
205
159
|
pciDevices: undefined,
|
|
206
|
-
usbController: undefined,
|
|
207
|
-
options: undefined,
|
|
208
160
|
isEdit: false,
|
|
209
161
|
isClone: false,
|
|
210
162
|
state: undefined,
|
|
@@ -217,8 +169,8 @@ const props = withDefaults(
|
|
|
217
169
|
}
|
|
218
170
|
)
|
|
219
171
|
const emits = defineEmits<{
|
|
220
|
-
(event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
|
|
221
|
-
(event: 'send-data', value: UI_I_SendDataCustomizeHardware): void
|
|
172
|
+
// (event: 'change-boot-order', value: UI_T_ChangeBootOrder): void // TODO remove everywhere
|
|
173
|
+
// (event: 'send-data', value: UI_I_SendDataCustomizeHardware): void // TODO remove everywhere
|
|
222
174
|
(event: 'next'): void
|
|
223
175
|
(event: 'get-storage', value: UI_I_TablePayload): void
|
|
224
176
|
(event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
|
|
@@ -245,25 +197,6 @@ watch(
|
|
|
245
197
|
}
|
|
246
198
|
)
|
|
247
199
|
|
|
248
|
-
const sendDataVirtualHardware = ref<UI_I_SendDataVirtualHardware | null>(null)
|
|
249
|
-
const onSendDataVirtualHardwareMethod = (
|
|
250
|
-
data: UI_I_SendDataVirtualHardware
|
|
251
|
-
): void => {
|
|
252
|
-
sendDataVirtualHardware.value = data
|
|
253
|
-
sendData()
|
|
254
|
-
}
|
|
255
|
-
const sendDataVmOptions = ref<UI_I_SendDataVmoptions | null>(null)
|
|
256
|
-
const onSendDataVmOptionsMethod = (data: UI_I_SendDataVmoptions): void => {
|
|
257
|
-
sendDataVmOptions.value = data
|
|
258
|
-
sendData()
|
|
259
|
-
}
|
|
260
|
-
const sendData = (): void => {
|
|
261
|
-
emits('send-data', {
|
|
262
|
-
virtualHardware: sendDataVirtualHardware.value,
|
|
263
|
-
vmOptions: sendDataVmOptions.value,
|
|
264
|
-
})
|
|
265
|
-
}
|
|
266
|
-
|
|
267
200
|
watch(
|
|
268
201
|
() => props.customizeHardwareSubmit,
|
|
269
202
|
(newValue) => {
|