bfg-common 1.5.573 → 1.5.575
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/CODE_STYLE.md +109 -109
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/localization/local_be.json +29 -6
- package/assets/localization/local_en.json +29 -6
- package/assets/localization/local_hy.json +29 -6
- package/assets/localization/local_kk.json +29 -6
- package/assets/localization/local_ru.json +29 -6
- package/assets/localization/local_zh.json +30 -7
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +170 -170
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/table/dataGrid/DataGrid.vue +1718 -1718
- package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
- package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
- package/components/common/backup/storage/actions/add/Add.vue +3 -2
- package/components/common/backup/storage/actions/add/New.vue +3 -2
- package/components/common/backup/storage/actions/add/Old.vue +5 -4
- package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
- package/components/common/backup/storage/actions/add/steps/readyComplete/ReadyComplete.vue +45 -45
- package/components/common/backup/storage/actions/add/steps/readyComplete/lib/config/propertiesDetails.ts +7 -7
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/diagramMain/DiagramMain.vue +1 -1
- package/components/common/diagramMain/modals/lib/config/portModal.ts +251 -251
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
- package/components/common/modals/confirmByInput/ConfirmByInput.vue +9 -1
- package/components/common/modals/confirmByInput/ConfirmByInputNew.vue +7 -2
- package/components/common/monitor/overview/filters/lib/config/filterOptions.ts +1 -0
- package/components/common/pages/backups/DetailView.vue +52 -52
- package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
- package/components/common/pages/backups/modals/Modals.vue +243 -243
- package/components/common/pages/backups/modals/createBackup/CreateBackup.vue +1 -1
- package/components/common/pages/backups/modals/createBackup/New.vue +8 -2
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
- package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +69 -69
- package/components/common/pages/backups/modals/createBackup/lib/config/steps.ts +2 -1
- package/components/common/pages/backups/modals/lib/config/restore.ts +115 -115
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +186 -186
- package/components/common/pages/backups/modals/restore/Restore.vue +9 -5
- package/components/common/pages/backups/modals/restore/RestoreNew.vue +13 -3
- package/components/common/pages/backups/modals/restore/RestoreOld.vue +6 -18
- package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
- package/components/common/pages/home/lib/models/interfaces.ts +48 -48
- package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
- package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
- package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
- package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
- package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
- package/components/common/pages/scheduledTasks/table/Table.vue +1 -1
- package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
- package/components/common/select/radio/RadioGroup.vue +137 -137
- package/components/common/spiceConsole/Drawer.vue +420 -420
- package/components/common/spiceConsole/SpiceConsole.vue +184 -184
- package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
- package/components/common/tools/Actions.vue +207 -207
- package/components/common/treeView/TreeView.vue +52 -52
- package/components/common/vm/actions/add/Add.vue +127 -52
- package/components/common/vm/actions/add/New.vue +54 -16
- package/components/common/vm/actions/add/Old.vue +55 -16
- package/components/common/vm/actions/add/lib/config/steps.ts +347 -347
- package/components/common/vm/actions/clone/Clone.vue +121 -48
- package/components/common/vm/actions/clone/new/New.vue +50 -14
- package/components/common/vm/actions/clone/old/Old.vue +52 -16
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +81 -14
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +56 -7
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +56 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +206 -208
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +120 -223
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +118 -218
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +53 -66
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/lib/config/options.ts +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +159 -139
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuNew.vue +15 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuOld.vue +13 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +75 -62
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryNew.vue +158 -158
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryOld.vue +155 -155
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +149 -241
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +4 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskOld.vue +3 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +154 -154
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +96 -58
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +17 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +3 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerOld.vue +3 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +39 -17
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardNew.vue +5 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardOld.vue +5 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options.ts +4 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +53 -53
- package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +93 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +62 -8
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsOld.vue +60 -8
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +69 -5
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +32 -12
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsOld.vue +33 -12
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +60 -60
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +132 -114
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +6 -41
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderOld.vue +6 -44
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +23 -8
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +31 -21
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsOld.vue +34 -26
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +34 -28
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/Old.vue +30 -24
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +112 -8
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +3 -3
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{New.vue → KeymapNew.vue} +6 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{Old.vue → KeymapOld.vue} +5 -5
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +7 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +38 -4
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsNew.vue +26 -7
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsOld.vue +50 -24
- package/components/common/vm/actions/common/lib/models/interfaces.ts +25 -57
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- package/components/common/vm/actions/common/select/createType/CreateType.vue +38 -38
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/os/New.vue +19 -0
- package/components/common/vm/actions/common/select/os/Old.vue +34 -0
- package/components/common/vm/actions/common/select/os/Os.vue +25 -0
- package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
- package/components/common/vm/actions/common/select/storage/Storage.vue +178 -178
- package/components/common/vm/actions/common/select/storage/new/New.vue +311 -311
- package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
- package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
- package/components/common/vm/actions/editSettings/EditSettings.vue +90 -32
- package/components/common/vm/actions/editSettings/EditSettingsOld.vue +41 -14
- package/components/common/vm/actions/editSettings/new/New.vue +41 -14
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/vm/actions/lib/models/interfaces.ts +29 -4
- package/components/common/vm/actions/lib/utils.ts +36 -64
- package/components/common/vm/actions/register/Register.vue +352 -352
- package/components/common/vm/actions/register/lib/config/steps.ts +86 -86
- package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
- package/components/common/wizards/common/compatibility/New.vue +99 -99
- package/components/common/wizards/common/compatibility/Old.vue +53 -53
- package/components/common/wizards/common/steps/computeResource/ComputeResource.vue +86 -86
- package/components/common/wizards/common/steps/computeResource/New.vue +93 -93
- package/components/common/wizards/common/steps/computeResource/Old.vue +103 -103
- package/components/common/wizards/common/steps/name/Name.vue +178 -178
- package/components/common/wizards/common/steps/name/New.vue +221 -221
- package/components/common/wizards/common/steps/name/Old.vue +121 -121
- package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
- package/components/common/wizards/common/steps/name/location/Location.vue +85 -85
- package/components/common/wizards/common/steps/name/location/New.vue +40 -40
- package/components/common/wizards/datastore/add/Add.vue +228 -228
- package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
- package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
- package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +205 -205
- package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
- package/composables/useAppVersion.ts +21 -21
- package/composables/useLocal.ts +6 -6
- package/composables/useLocalCommon.ts +39 -39
- package/package.json +3 -1
- package/plugins/console.ts +21 -21
- package/plugins/date.ts +233 -233
- package/plugins/mouse.ts +21 -21
- package/plugins/panelStates.ts +70 -70
- package/plugins/text.ts +59 -59
- package/public/spice-console/application/clientgui.js +854 -854
- package/public/spice-console/application/packetfactory.js +211 -211
- package/public/spice-console/application/virtualmouse.js +147 -147
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +440 -440
- package/public/spice-console/process/cursorprocess.js +121 -121
- package/public/spice-console/process/inputprocess.js +227 -227
- package/public/spice-console/process/mainprocess.js +210 -210
- package/public/spice-console/run.js +210 -210
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- package/store/tasks/mappers/recentTasks.ts +4 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{New.vue → PasswordNew.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{Old.vue → PasswordOld.vue} +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-vm-actions-add-new
|
|
3
3
|
v-if="isNewView"
|
|
4
|
-
v-model="
|
|
5
|
-
v-model:computed-resource="computeResource"
|
|
4
|
+
v-model:vm-form="vmForm"
|
|
6
5
|
v-model:selected-create-type="selectedCreateType"
|
|
7
6
|
v-model:is-power-on-by-default="isPowerOnByDefault"
|
|
8
7
|
:project="props.project"
|
|
@@ -32,6 +31,10 @@
|
|
|
32
31
|
:guestOsFamilies="guestOsFamilies"
|
|
33
32
|
:guestOsVersions="guestOsVersions"
|
|
34
33
|
:machineTypes="machineTypes"
|
|
34
|
+
:virtual-hardware-hard-disks-local="virtualHardwareHardDisksLocal"
|
|
35
|
+
:virtual-hardware-cd-dvd-drives-local="virtualHardwareCdDvdDrivesLocal"
|
|
36
|
+
:virtual-hardware-networks-local="virtualHardwareNetworksLocal"
|
|
37
|
+
:max-cpus="maxCpus"
|
|
35
38
|
:max-memory="maxMemory"
|
|
36
39
|
:cpu-models="cpuModels"
|
|
37
40
|
:selected-nav-item="selectedNavItem"
|
|
@@ -69,13 +72,14 @@
|
|
|
69
72
|
@change-storage="onChangeStorage"
|
|
70
73
|
@change-select-options="onChangeSelectOptions"
|
|
71
74
|
@change-compatibility="onChangeCompatibility"
|
|
75
|
+
@change-boot-order="onChangeBootOrder"
|
|
76
|
+
@change-customize-hardware="onChangeCustomizeHardware"
|
|
72
77
|
@finish="onFinish"
|
|
73
78
|
@hide="onHideModal"
|
|
74
79
|
/>
|
|
75
80
|
<common-vm-actions-add-old
|
|
76
81
|
v-else
|
|
77
|
-
v-model="
|
|
78
|
-
v-model:compute-resource="computeResource"
|
|
82
|
+
v-model:vm-form="vmForm"
|
|
79
83
|
v-model:selected-create-type="selectedCreateType"
|
|
80
84
|
v-model:is-power-on-by-default="isPowerOnByDefault"
|
|
81
85
|
:project="props.project"
|
|
@@ -105,6 +109,10 @@
|
|
|
105
109
|
:guestOsFamilies="guestOsFamilies"
|
|
106
110
|
:guestOsVersions="guestOsVersions"
|
|
107
111
|
:machineTypes="machineTypes"
|
|
112
|
+
:virtual-hardware-hard-disks-local="virtualHardwareHardDisksLocal"
|
|
113
|
+
:virtual-hardware-cd-dvd-drives-local="virtualHardwareCdDvdDrivesLocal"
|
|
114
|
+
:virtual-hardware-networks-local="virtualHardwareNetworksLocal"
|
|
115
|
+
:max-cpus="maxCpus"
|
|
108
116
|
:max-memory="maxMemory"
|
|
109
117
|
:cpu-models="cpuModels"
|
|
110
118
|
:selected-nav-item="selectedNavItem"
|
|
@@ -140,6 +148,8 @@
|
|
|
140
148
|
@change-storage="onChangeStorage"
|
|
141
149
|
@change-select-options="onChangeSelectOptions"
|
|
142
150
|
@change-compatibility="onChangeCompatibility"
|
|
151
|
+
@change-boot-order="onChangeBootOrder"
|
|
152
|
+
@change-customize-hardware="onChangeCustomizeHardware"
|
|
143
153
|
@finish="onFinish"
|
|
144
154
|
@hide="onHideModal"
|
|
145
155
|
/>
|
|
@@ -175,11 +185,19 @@ import type {
|
|
|
175
185
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
176
186
|
import type {
|
|
177
187
|
UI_I_Capabilities,
|
|
178
|
-
UI_I_CreateVmData,
|
|
179
188
|
UI_I_VmForm,
|
|
180
|
-
|
|
189
|
+
UI_I_VmFormCash,
|
|
181
190
|
} from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
191
|
+
import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
|
|
192
|
+
import type {
|
|
193
|
+
UI_I_SendDataCpu,
|
|
194
|
+
UI_I_SendDataMemory,
|
|
195
|
+
UI_I_SendDataNewCdDvdDrive,
|
|
196
|
+
UI_I_SendDataNewHardDisk,
|
|
197
|
+
UI_I_SendDataNewNetwork,
|
|
198
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
182
199
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
200
|
+
import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
|
|
183
201
|
import type {
|
|
184
202
|
UI_I_MediatedDevice,
|
|
185
203
|
UI_I_PciDevice,
|
|
@@ -195,8 +213,6 @@ import {
|
|
|
195
213
|
} from '~/components/common/vm/actions/add/lib/config/steps'
|
|
196
214
|
import { mapCapabilities } from '~/components/common/vm/actions/common/lib/utils/capabilities'
|
|
197
215
|
|
|
198
|
-
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
199
|
-
|
|
200
216
|
const props = withDefaults(
|
|
201
217
|
defineProps<{
|
|
202
218
|
project: UI_T_Project
|
|
@@ -251,6 +267,7 @@ const emits = defineEmits<{
|
|
|
251
267
|
(event: 'remove-error-by-title', value: string): void
|
|
252
268
|
(event: 'get-networks-table', value: UI_I_TablePayload): void
|
|
253
269
|
(event: 'get-pci-devices'): void
|
|
270
|
+
(event: 'get-pci-devices'): void
|
|
254
271
|
(event: 'hide'): void
|
|
255
272
|
(event: 'select-template', value: string): void
|
|
256
273
|
(
|
|
@@ -495,7 +512,9 @@ const onCheckName = async (
|
|
|
495
512
|
})
|
|
496
513
|
}
|
|
497
514
|
const compatibilityText = computed<[UI_T_CompatibilityStatus, string]>(() => {
|
|
498
|
-
|
|
515
|
+
const { computeResource } = vmForm.value
|
|
516
|
+
|
|
517
|
+
if (!computeResource)
|
|
499
518
|
return [
|
|
500
519
|
'none',
|
|
501
520
|
localization.value.vmWizard.noDestinationComputeResourceSelected,
|
|
@@ -506,23 +525,21 @@ const compatibilityText = computed<[UI_T_CompatibilityStatus, string]>(() => {
|
|
|
506
525
|
localization.value.common.compatibilityChecksSucceeded,
|
|
507
526
|
]
|
|
508
527
|
|
|
509
|
-
if (
|
|
510
|
-
!['cluster', 'host', 'resource_pool'].includes(computeResource.value?.type)
|
|
511
|
-
) {
|
|
528
|
+
if (!['cluster', 'host', 'resource_pool'].includes(computeResource?.type)) {
|
|
512
529
|
res = [
|
|
513
530
|
'error',
|
|
514
531
|
localization.value.common.selectValidClusterOrHostDestination,
|
|
515
532
|
]
|
|
516
533
|
}
|
|
517
|
-
if (computeResource
|
|
518
|
-
const hasHost = !!computeResource.
|
|
534
|
+
if (computeResource?.type === 'cluster') {
|
|
535
|
+
const hasHost = !!computeResource.nodes.length
|
|
519
536
|
if (!hasHost) {
|
|
520
537
|
res = ['error', localization.value.common.clusterNotContainAnyHosts]
|
|
521
538
|
}
|
|
522
539
|
}
|
|
523
540
|
|
|
524
|
-
if (computeResource
|
|
525
|
-
if (computeResource.
|
|
541
|
+
if (computeResource?.type === 'host') {
|
|
542
|
+
if (computeResource.state === 'Error') {
|
|
526
543
|
// TODO check Maintenance Mode
|
|
527
544
|
res = [
|
|
528
545
|
'error',
|
|
@@ -539,13 +556,14 @@ const checkComputeResource = (
|
|
|
539
556
|
): UI_I_ValidationReturn => {
|
|
540
557
|
let stepHasError = false
|
|
541
558
|
|
|
559
|
+
const { computeResource } = vmForm.value
|
|
560
|
+
|
|
542
561
|
if (
|
|
543
|
-
!computeResource
|
|
562
|
+
!computeResource ||
|
|
544
563
|
// compatibilityText.value[0] !== 1 ||
|
|
545
|
-
computeResource.
|
|
546
|
-
computeResource.
|
|
547
|
-
(computeResource.
|
|
548
|
-
!computeResource.value.nodes.length)
|
|
564
|
+
computeResource.type === 'datacenter' ||
|
|
565
|
+
computeResource.type === 'folder' ||
|
|
566
|
+
(computeResource.type === 'cluster' && !computeResource.nodes.length)
|
|
549
567
|
) {
|
|
550
568
|
computeResourceAlert.value = [
|
|
551
569
|
localization.value.common.specifyValidClusterOrHostDestination,
|
|
@@ -686,15 +704,22 @@ const checkCustomizeHardwareForTemplate = async (
|
|
|
686
704
|
})
|
|
687
705
|
}
|
|
688
706
|
|
|
689
|
-
const
|
|
707
|
+
const storageIdCash = ref<string | null>(null)
|
|
690
708
|
const vmForm = ref<UI_I_VmForm>({
|
|
709
|
+
name: '',
|
|
710
|
+
compatibility: '',
|
|
711
|
+
guestMachineType: null,
|
|
712
|
+
guestOsFamily: null,
|
|
713
|
+
guestOsVersion: null,
|
|
714
|
+
computeResource: props.computeResource,
|
|
715
|
+
storage: null,
|
|
691
716
|
locationPath: '',
|
|
692
717
|
dataCenter: null,
|
|
693
718
|
})
|
|
694
719
|
|
|
695
720
|
const isLoadingComputeTree = ref<boolean>(false)
|
|
696
|
-
const onChangeName = (
|
|
697
|
-
|
|
721
|
+
const onChangeName = (name: string, node: UI_I_TreeNode | null): void => {
|
|
722
|
+
vmForm.value.name = name // TODO уже нету смысла
|
|
698
723
|
if (isSphere.value) {
|
|
699
724
|
vmForm.value.locationPath = node.id
|
|
700
725
|
vmForm.value.dataCenter = $recursion.findParentByValue(
|
|
@@ -712,43 +737,75 @@ const onChangeName = (_name: string, node: UI_I_TreeNode | null): void => {
|
|
|
712
737
|
})
|
|
713
738
|
}
|
|
714
739
|
}
|
|
715
|
-
//
|
|
740
|
+
// Для сферы
|
|
716
741
|
const computeResourcePath = ref<string>('')
|
|
742
|
+
const onSelectComputeResourceTree = (node: UI_I_TreeNode): void => {
|
|
743
|
+
emits('select-compute-resource-tree', node)
|
|
744
|
+
computeResourcePath.value = node.id
|
|
745
|
+
}
|
|
717
746
|
watch(
|
|
718
|
-
computeResource,
|
|
747
|
+
() => vmForm.value.computeResource,
|
|
719
748
|
(newValue, oldValue) => {
|
|
720
749
|
if (newValue && newValue.id !== oldValue?.id) {
|
|
721
750
|
onSelectComputeResourceTree(newValue)
|
|
722
751
|
}
|
|
723
752
|
},
|
|
724
|
-
{ deep: true }
|
|
753
|
+
{ deep: true, immediate: true }
|
|
725
754
|
)
|
|
726
|
-
|
|
727
|
-
emits('select-compute-resource-tree', node)
|
|
728
|
-
computeResourcePath.value = node.id
|
|
729
|
-
}
|
|
755
|
+
|
|
730
756
|
const onChangeStorage = (storage: UI_I_DatastoreTableItem | null): void => {
|
|
731
757
|
if (!storage) return
|
|
732
758
|
|
|
733
|
-
|
|
734
|
-
|
|
759
|
+
vmForm.value.storage = storage
|
|
760
|
+
storageIdCash.value = storage.id
|
|
735
761
|
}
|
|
736
762
|
const compatibilityInfo = ref<string>('')
|
|
737
763
|
const onChangeCompatibility = (compatibility: UI_I_OptionItem): void => {
|
|
738
|
-
|
|
739
|
-
model.value.compatibility = compatibility.value
|
|
764
|
+
vmForm.value.compatibility = compatibility.value
|
|
740
765
|
|
|
741
766
|
const version = compatibility.value.split('-')[1]
|
|
742
767
|
compatibilityInfo.value = `${localization.value.common.compatibility}: ${compatibility.text} (${localization.value.common.vmVersion} ${version})`
|
|
743
768
|
}
|
|
769
|
+
const customizeHardware = ref<UI_I_SendDataCustomizeHardware | null>(null)
|
|
770
|
+
const onChangeCustomizeHardware = (
|
|
771
|
+
data: UI_I_SendDataCustomizeHardware
|
|
772
|
+
): void => {
|
|
773
|
+
customizeHardware.value = data
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
const virtualHardwareHardDisksLocal = computed<
|
|
777
|
+
UI_I_SendDataNewHardDisk[] | null
|
|
778
|
+
>(() => customizeHardware.value?.virtualHardware?.hardDisks || null)
|
|
779
|
+
const virtualHardwareNetworksLocal = computed<UI_I_SendDataNewNetwork[] | null>(
|
|
780
|
+
() => customizeHardware.value?.virtualHardware?.networks || null
|
|
781
|
+
)
|
|
782
|
+
const virtualHardwareCdDvdDrivesLocal = computed<
|
|
783
|
+
UI_I_SendDataNewCdDvdDrive[] | null
|
|
784
|
+
>(() => customizeHardware.value?.virtualHardware?.cdDvdDrives || null)
|
|
785
|
+
|
|
786
|
+
const virtualHardwareCpu = computed<UI_I_SendDataCpu | null>(
|
|
787
|
+
() => customizeHardware.value?.virtualHardware?.cpu || null
|
|
788
|
+
)
|
|
789
|
+
const virtualHardwareMemory = computed<UI_I_SendDataMemory | null>(
|
|
790
|
+
() => customizeHardware.value?.virtualHardware?.memory || null
|
|
791
|
+
)
|
|
792
|
+
const virtualHardwareHardDisks = ref<UI_I_SendDataNewHardDisk[] | null>(null)
|
|
793
|
+
const virtualHardwareCdDvdDrives = ref<UI_I_SendDataNewCdDvdDrive[] | null>(
|
|
794
|
+
null
|
|
795
|
+
)
|
|
796
|
+
const virtualHardwareNetworks = ref<UI_I_SendDataNewNetwork[] | null>(null)
|
|
797
|
+
const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
|
|
798
|
+
virtualHardwareHardDisks.value = data[0]
|
|
799
|
+
virtualHardwareCdDvdDrives.value = data[1]
|
|
800
|
+
virtualHardwareNetworks.value = data[2]
|
|
801
|
+
}
|
|
744
802
|
|
|
745
803
|
const isPowerOnByDefault = ref<boolean>(true)
|
|
746
804
|
|
|
747
805
|
watch(
|
|
748
806
|
() => props.vmNameInWizard,
|
|
749
807
|
(newValue) => {
|
|
750
|
-
|
|
751
|
-
model.value.name = newValue
|
|
808
|
+
vmForm.value.name = newValue
|
|
752
809
|
}
|
|
753
810
|
)
|
|
754
811
|
|
|
@@ -760,7 +817,13 @@ const validateSendData = async (
|
|
|
760
817
|
isLoading.value = true
|
|
761
818
|
|
|
762
819
|
const data = await props.validateSendDataFunc(
|
|
763
|
-
|
|
820
|
+
vmForm.value,
|
|
821
|
+
virtualHardwareCpu.value,
|
|
822
|
+
virtualHardwareMemory.value,
|
|
823
|
+
customizeHardware.value,
|
|
824
|
+
virtualHardwareNetworks.value,
|
|
825
|
+
virtualHardwareHardDisks.value,
|
|
826
|
+
virtualHardwareCdDvdDrives.value,
|
|
764
827
|
isPowerOnByDefault.value,
|
|
765
828
|
localization.value,
|
|
766
829
|
vmForm.value.locationPath, // для сферы
|
|
@@ -787,7 +850,13 @@ const onFinish = (): void => {
|
|
|
787
850
|
wizard.setLoader(false)
|
|
788
851
|
props
|
|
789
852
|
.finishFunc(
|
|
790
|
-
|
|
853
|
+
vmForm.value,
|
|
854
|
+
virtualHardwareCpu.value,
|
|
855
|
+
virtualHardwareMemory.value,
|
|
856
|
+
customizeHardware.value,
|
|
857
|
+
virtualHardwareNetworks.value,
|
|
858
|
+
virtualHardwareHardDisks.value,
|
|
859
|
+
virtualHardwareCdDvdDrives.value,
|
|
791
860
|
isPowerOnByDefault.value,
|
|
792
861
|
localization.value,
|
|
793
862
|
vmForm.value.locationPath, // для сферы
|
|
@@ -819,7 +888,7 @@ const guestOsVersions = ref<UI_I_ArbitraryObject<UI_I_OptionItem[]>>(
|
|
|
819
888
|
)
|
|
820
889
|
const machineTypes = ref<UI_I_OptionItem[]>(capabilities.value.machineTypes)
|
|
821
890
|
const cpuModels = ref<UI_I_OptionItem[]>(capabilities.value.cpuModels)
|
|
822
|
-
|
|
891
|
+
const maxCpus = ref<number>(capabilities.value.maxCpus)
|
|
823
892
|
const maxMemory = ref<number>(capabilities.value.maxMemory)
|
|
824
893
|
|
|
825
894
|
const selectedTemplate = ref<string>('')
|
|
@@ -854,18 +923,24 @@ watch(
|
|
|
854
923
|
() => props.vmtSettings,
|
|
855
924
|
(newValue) => {
|
|
856
925
|
if (newValue) {
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
926
|
+
vmForm.value.name = newValue.name
|
|
927
|
+
vmForm.value.compatibility =
|
|
928
|
+
newValue.compatibility || vmForm.value.compatibility
|
|
929
|
+
vmForm.value.storage = newValue.storage
|
|
930
|
+
if (customizeHardware.value?.virtualHardware) {
|
|
931
|
+
customizeHardware.value.virtualHardware.cdDvdDrives =
|
|
932
|
+
newValue.cdDvdDrives
|
|
933
|
+
customizeHardware.value.virtualHardware.hardDisks = newValue.hardDisks
|
|
934
|
+
customizeHardware.value.virtualHardware.networks = newValue.networks
|
|
935
|
+
customizeHardware.value.virtualHardware.cpu = newValue.cpu
|
|
936
|
+
customizeHardware.value.virtualHardware.memory = newValue.memory
|
|
937
|
+
customizeHardware.value.virtualHardware.videoCard = newValue.videoCard
|
|
938
|
+
customizeHardware.value.virtualHardware.usbController =
|
|
939
|
+
newValue.usbController
|
|
940
|
+
customizeHardware.value.virtualHardware.pciDevices = newValue.pciDevices
|
|
941
|
+
customizeHardware.value.vmOptions = newValue.options
|
|
942
|
+
}
|
|
943
|
+
maxCpus.value = newValue.cpu.max_vcpus
|
|
869
944
|
cpuModels.value = newValue.cpu.model
|
|
870
945
|
isPowerOnByDefault.value = false
|
|
871
946
|
}
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
</template>
|
|
67
67
|
<template #content>
|
|
68
68
|
<common-wizards-common-steps-name
|
|
69
|
-
v-model:name="
|
|
69
|
+
v-model:name="vmForm.name"
|
|
70
70
|
v-model:location="location"
|
|
71
71
|
:show="
|
|
72
72
|
selectedStep.id === dynamicSteps.selectName ||
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
<common-wizards-common-steps-compute-resource
|
|
119
119
|
v-if="props.isSphere"
|
|
120
120
|
v-show="selectedStep.id === dynamicSteps.selectComputeResource"
|
|
121
|
-
v-model="computeResource"
|
|
121
|
+
v-model="vmForm.computeResource"
|
|
122
122
|
:node="computeResourceTreeLocal"
|
|
123
123
|
:alert-messages="props.computeResourceAlert"
|
|
124
124
|
:is-loading="props.isLoadingComputeTree"
|
|
@@ -227,9 +227,9 @@
|
|
|
227
227
|
<template #content>
|
|
228
228
|
<div class="select-block-wrap overflow-auto pb-4">
|
|
229
229
|
<common-vm-actions-common-select-os
|
|
230
|
-
v-model:
|
|
231
|
-
v-model:guest-os-
|
|
232
|
-
v-model:
|
|
230
|
+
v-model:machine-type="vmForm.guestMachineType"
|
|
231
|
+
v-model:guest-os-family="vmForm.guestOsFamily"
|
|
232
|
+
v-model:guest-os-version="vmForm.guestOsVersion"
|
|
233
233
|
:families-options="props.guestOsFamilies"
|
|
234
234
|
:versions-options="props.guestOsVersions"
|
|
235
235
|
:machine-types-options="props.machineTypes"
|
|
@@ -250,11 +250,21 @@
|
|
|
250
250
|
<template #content>
|
|
251
251
|
<div class="select-block-wrap customize-hardware flex flex-col">
|
|
252
252
|
<common-vm-actions-common-customize-hardware
|
|
253
|
-
v-model="model"
|
|
254
253
|
:project="props.project"
|
|
255
254
|
:is-vmt="props.isVmt"
|
|
256
|
-
:
|
|
255
|
+
:vm-name="vmForm.name"
|
|
256
|
+
:guest-machine-type="vmForm.guestMachineType"
|
|
257
|
+
:guest-os-family="vmForm.guestOsFamily"
|
|
258
|
+
:guest-os-version="vmForm.guestOsVersion"
|
|
259
|
+
:storage="vmForm.storage"
|
|
260
|
+
:hard-disks-for-boot-options="props.virtualHardwareHardDisksLocal"
|
|
261
|
+
:cd-dvd-drives-for-boot-options="
|
|
262
|
+
props.virtualHardwareCdDvdDrivesLocal
|
|
263
|
+
"
|
|
264
|
+
:networks-for-boot-options="props.virtualHardwareNetworksLocal"
|
|
265
|
+
:cd-dvd-drives="props.virtualHardwareCdDvdDrivesLocal"
|
|
257
266
|
:customize-hardware-submit="props.customizeHardwareSubmit"
|
|
267
|
+
:max-cpus="props.maxCpus"
|
|
258
268
|
:max-memory="props.maxMemory"
|
|
259
269
|
:cpu-models="props.cpuModels"
|
|
260
270
|
:selected-nav-item="props.selectedNavItem"
|
|
@@ -268,8 +278,10 @@
|
|
|
268
278
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
269
279
|
:passthrough-devices="props.passthroughDevices"
|
|
270
280
|
:mediated-devices="props.mediatedDevices"
|
|
271
|
-
:compute-resource="computeResource"
|
|
281
|
+
:compute-resource="vmForm.computeResource"
|
|
272
282
|
:compatibility-info="props.compatibilityInfo"
|
|
283
|
+
@change-boot-order="emits('change-boot-order', $event)"
|
|
284
|
+
@send-data="emits('change-customize-hardware', $event)"
|
|
273
285
|
@get-storage="emits('get-storage', $event)"
|
|
274
286
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
275
287
|
@get-active-device-child="
|
|
@@ -301,19 +313,31 @@
|
|
|
301
313
|
class="select-block-wrap overflow-auto h-full flex flex-col pr-8"
|
|
302
314
|
>
|
|
303
315
|
<common-vm-actions-common-customize-hardware
|
|
304
|
-
v-model="model"
|
|
305
316
|
:project="props.project"
|
|
306
317
|
:is-vmt="props.isVmt"
|
|
307
|
-
:
|
|
318
|
+
:vm-name="vmForm.name"
|
|
319
|
+
:guest-machine-type="vmForm.guestMachineType"
|
|
320
|
+
:guest-os-family="vmForm.guestOsFamily"
|
|
321
|
+
:guest-os-version="vmForm.guestOsVersion"
|
|
322
|
+
:storage="vmForm.storage"
|
|
323
|
+
:hard-disks-for-boot-options="props.virtualHardwareHardDisksLocal"
|
|
324
|
+
:cd-dvd-drives-for-boot-options="
|
|
325
|
+
props.virtualHardwareCdDvdDrivesLocal
|
|
326
|
+
"
|
|
327
|
+
:networks-for-boot-options="props.virtualHardwareNetworksLocal"
|
|
308
328
|
:cd-dvd-drives="props.vmtSettings.cdDvdDrives || []"
|
|
309
329
|
:hard-disks="props.vmtSettings.hardDisks || []"
|
|
310
330
|
:networks="props.vmtSettings.networks || []"
|
|
311
331
|
:customize-hardware-submit="
|
|
312
332
|
props.customizeHardwareForTemplateSubmit
|
|
313
333
|
"
|
|
334
|
+
:max-cpus="props.maxCpus"
|
|
314
335
|
:max-memory="props.maxMemory"
|
|
315
336
|
:cpu-models="props.cpuModels"
|
|
337
|
+
:cpu="props.vmtSettings.cpu"
|
|
338
|
+
:memory="props.vmtSettings.memory"
|
|
316
339
|
:video-card="props.vmtSettings.videoCard"
|
|
340
|
+
:usb-controller="props.vmtSettings.usbController"
|
|
317
341
|
:pci-devices="props.vmtSettings.pciDevices"
|
|
318
342
|
:hard-disks-for-edit="props.vmtSettings.hardDisks || []"
|
|
319
343
|
:options="props.vmtSettings.options"
|
|
@@ -328,9 +352,11 @@
|
|
|
328
352
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
329
353
|
:passthrough-devices="props.passthroughDevices"
|
|
330
354
|
:mediated-devices="props.mediatedDevices"
|
|
331
|
-
:compute-resource="computeResource"
|
|
355
|
+
:compute-resource="vmForm.computeResource"
|
|
332
356
|
:compatibility-info="props.compatibilityInfo"
|
|
333
357
|
is-clone
|
|
358
|
+
@change-boot-order="emits('change-boot-order', $event)"
|
|
359
|
+
@send-data="emits('change-customize-hardware', $event)"
|
|
334
360
|
@get-storage="emits('get-storage', $event)"
|
|
335
361
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
336
362
|
@get-active-device-child="
|
|
@@ -418,11 +444,17 @@ import type {
|
|
|
418
444
|
} from '~/components/common/vm/actions/common/lib/models/types'
|
|
419
445
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
420
446
|
import type {
|
|
421
|
-
UI_I_CreateVmData,
|
|
422
447
|
// UI_I_Capabilities,
|
|
423
448
|
UI_I_VmForm,
|
|
424
449
|
} from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
450
|
+
import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
|
|
451
|
+
import type {
|
|
452
|
+
UI_I_SendDataNewCdDvdDrive,
|
|
453
|
+
UI_I_SendDataNewHardDisk,
|
|
454
|
+
UI_I_SendDataNewNetwork,
|
|
455
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
425
456
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
457
|
+
import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
|
|
426
458
|
import type {
|
|
427
459
|
UI_I_MediatedDevice,
|
|
428
460
|
UI_I_PciDevice,
|
|
@@ -432,10 +464,7 @@ import type { UI_I_NameTestIds } from '~/components/common/wizards/common/steps/
|
|
|
432
464
|
import type { UI_T_CompatibilityStatus } from '~/components/common/wizards/common/compatibility/lib/models/types'
|
|
433
465
|
import { dynamicSteps } from '~/components/common/vm/actions/add/lib/config/steps'
|
|
434
466
|
|
|
435
|
-
const
|
|
436
|
-
required: true,
|
|
437
|
-
})
|
|
438
|
-
const computeResource = defineModel<UI_I_TreeNode | null>('computeResource', {
|
|
467
|
+
const vmForm = defineModel<UI_I_VmForm>('vmForm', {
|
|
439
468
|
required: true,
|
|
440
469
|
})
|
|
441
470
|
const selectedCreateType = defineModel<string>('selectedCreateType', {
|
|
@@ -474,6 +503,10 @@ const props = withDefaults(
|
|
|
474
503
|
guestOsFamilies: UI_I_OptionItem[]
|
|
475
504
|
guestOsVersions: UI_I_ArbitraryObject<UI_I_OptionItem[]>
|
|
476
505
|
machineTypes: UI_I_OptionItem[]
|
|
506
|
+
virtualHardwareHardDisksLocal: UI_I_SendDataNewHardDisk[] | null
|
|
507
|
+
virtualHardwareCdDvdDrivesLocal: UI_I_SendDataNewCdDvdDrive[] | null
|
|
508
|
+
virtualHardwareNetworksLocal: UI_I_SendDataNewNetwork[] | null
|
|
509
|
+
maxCpus: number
|
|
477
510
|
maxMemory: number
|
|
478
511
|
cpuModels: UI_I_OptionItem[]
|
|
479
512
|
selectedNavItem: UI_T_SelectedNavItem
|
|
@@ -526,6 +559,11 @@ const emits = defineEmits<{
|
|
|
526
559
|
(event: 'change-storage', value: UI_I_DatastoreTableItem | null): void
|
|
527
560
|
(event: 'change-select-options', value: string[]): void
|
|
528
561
|
(event: 'change-compatibility', value: UI_I_OptionItem): void
|
|
562
|
+
(event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
|
|
563
|
+
(
|
|
564
|
+
event: 'change-customize-hardware',
|
|
565
|
+
value: UI_I_SendDataCustomizeHardware
|
|
566
|
+
): void
|
|
529
567
|
(event: 'hide'): void
|
|
530
568
|
}>()
|
|
531
569
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
selectedStep.id === dynamicSteps.selectName ||
|
|
35
35
|
selectedStep.id === dynamicSteps.selectNameFolder
|
|
36
36
|
"
|
|
37
|
-
v-model:name="
|
|
37
|
+
v-model:name="vmForm.name"
|
|
38
38
|
v-model:location="location"
|
|
39
39
|
:show="
|
|
40
40
|
selectedStep.id === dynamicSteps.selectName ||
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<common-wizards-common-steps-compute-resource
|
|
56
56
|
v-if="props.isSphere"
|
|
57
57
|
v-show="selectedStep.id === dynamicSteps.selectComputeResource"
|
|
58
|
-
v-model="computeResource"
|
|
58
|
+
v-model="vmForm.computeResource"
|
|
59
59
|
:node="computeResourceTreeLocal"
|
|
60
60
|
:alert-messages="props.computeResourceAlert"
|
|
61
61
|
:is-loading="props.isLoadingComputeTree"
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
selectedStep.id === dynamicSteps.selectGuestOSMachineType ||
|
|
91
91
|
selectedStep.id === dynamicSteps.selectGuestOS
|
|
92
92
|
"
|
|
93
|
-
v-model:
|
|
94
|
-
v-model:guest-os-
|
|
95
|
-
v-model:
|
|
93
|
+
v-model:machine-type="vmForm.guestMachineType"
|
|
94
|
+
v-model:guest-os-family="vmForm.guestOsFamily"
|
|
95
|
+
v-model:guest-os-version="vmForm.guestOsVersion"
|
|
96
96
|
:families-options="props.guestOsFamilies"
|
|
97
97
|
:versions-options="props.guestOsVersions"
|
|
98
98
|
:machine-types-options="props.machineTypes"
|
|
@@ -101,11 +101,21 @@
|
|
|
101
101
|
/>
|
|
102
102
|
<common-vm-actions-common-customize-hardware
|
|
103
103
|
v-show="selectedStep.id === dynamicSteps.customizeHardware"
|
|
104
|
-
v-model="model"
|
|
105
104
|
:project="props.project"
|
|
106
105
|
:is-vmt="props.isVmt"
|
|
107
|
-
:
|
|
106
|
+
:vm-name="vmForm.name"
|
|
107
|
+
:guest-machine-type="vmForm.guestMachineType"
|
|
108
|
+
:guest-os-family="vmForm.guestOsFamily"
|
|
109
|
+
:guest-os-version="vmForm.guestOsVersion"
|
|
110
|
+
:storage="vmForm.storage"
|
|
111
|
+
:hard-disks-for-boot-options="props.virtualHardwareHardDisksLocal"
|
|
112
|
+
:cd-dvd-drives-for-boot-options="
|
|
113
|
+
props.virtualHardwareCdDvdDrivesLocal
|
|
114
|
+
"
|
|
115
|
+
:networks-for-boot-options="props.virtualHardwareNetworksLocal"
|
|
116
|
+
:cd-dvd-drives="props.virtualHardwareCdDvdDrivesLocal"
|
|
108
117
|
:customize-hardware-submit="props.customizeHardwareSubmit"
|
|
118
|
+
:max-cpus="props.maxCpus"
|
|
109
119
|
:max-memory="props.maxMemory"
|
|
110
120
|
:cpu-models="props.cpuModels"
|
|
111
121
|
:selected-nav-item="props.selectedNavItem"
|
|
@@ -119,7 +129,9 @@
|
|
|
119
129
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
120
130
|
:passthrough-devices="props.passthroughDevices"
|
|
121
131
|
:mediated-devices="props.mediatedDevices"
|
|
122
|
-
:compute-resource="computeResource"
|
|
132
|
+
:compute-resource="vmForm.computeResource"
|
|
133
|
+
@change-boot-order="emits('change-boot-order', $event)"
|
|
134
|
+
@send-data="emits('change-customize-hardware', $event)"
|
|
123
135
|
@get-storage="emits('get-storage', $event)"
|
|
124
136
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
125
137
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
@@ -131,21 +143,34 @@
|
|
|
131
143
|
<common-vm-actions-common-customize-hardware
|
|
132
144
|
v-if="props.vmtSettings"
|
|
133
145
|
v-show="selectedStep.id === dynamicSteps.customizeHardwareTemplate"
|
|
134
|
-
v-model="model"
|
|
135
146
|
:is-vmt="props.isVmt"
|
|
136
147
|
:project="props.project"
|
|
137
|
-
:
|
|
148
|
+
:vm-name="vmForm.name"
|
|
149
|
+
:guest-machine-type="vmForm.guestMachineType"
|
|
150
|
+
:guest-os-family="vmForm.guestOsFamily"
|
|
151
|
+
:guest-os-version="vmForm.guestOsVersion"
|
|
152
|
+
:storage="vmForm.storage"
|
|
153
|
+
:hard-disks-for-boot-options="props.virtualHardwareHardDisksLocal"
|
|
154
|
+
:cd-dvd-drives-for-boot-options="
|
|
155
|
+
props.virtualHardwareCdDvdDrivesLocal
|
|
156
|
+
"
|
|
157
|
+
:networks-for-boot-options="props.virtualHardwareNetworksLocal"
|
|
138
158
|
:cd-dvd-drives="props.vmtSettings.cdDvdDrives || []"
|
|
139
159
|
:hard-disks="props.vmtSettings.hardDisks || []"
|
|
140
160
|
:networks="props.vmtSettings.networks || []"
|
|
141
161
|
:customize-hardware-submit="
|
|
142
162
|
props.customizeHardwareForTemplateSubmit
|
|
143
163
|
"
|
|
164
|
+
:max-cpus="props.maxCpus"
|
|
144
165
|
:max-memory="props.maxMemory"
|
|
145
166
|
:cpu-models="props.cpuModels"
|
|
167
|
+
:cpu="props.vmtSettings.cpu"
|
|
168
|
+
:memory="props.vmtSettings.memory"
|
|
146
169
|
:video-card="props.vmtSettings.videoCard"
|
|
170
|
+
:usb-controller="props.vmtSettings.usbController"
|
|
147
171
|
:pci-devices="props.vmtSettings.pciDevices"
|
|
148
172
|
:hard-disks-for-edit="props.vmtSettings.hardDisks || []"
|
|
173
|
+
:options="props.vmtSettings.options"
|
|
149
174
|
:selected-nav-item="props.selectedNavItem"
|
|
150
175
|
:nodes="props.nodes"
|
|
151
176
|
:files="props.files"
|
|
@@ -157,8 +182,10 @@
|
|
|
157
182
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
158
183
|
:passthrough-devices="props.passthroughDevices"
|
|
159
184
|
:mediated-devices="props.mediatedDevices"
|
|
160
|
-
:compute-resource="computeResource"
|
|
185
|
+
:compute-resource="vmForm.computeResource"
|
|
161
186
|
is-clone
|
|
187
|
+
@change-boot-order="emits('change-boot-order', $event)"
|
|
188
|
+
@send-data="emits('change-customize-hardware', $event)"
|
|
162
189
|
@get-storage="emits('get-storage', $event)"
|
|
163
190
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
164
191
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
@@ -219,11 +246,17 @@ import type {
|
|
|
219
246
|
} from '~/components/common/vm/actions/common/lib/models/types'
|
|
220
247
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
221
248
|
import type {
|
|
222
|
-
UI_I_CreateVmData,
|
|
223
249
|
// UI_I_Capabilities,
|
|
224
250
|
UI_I_VmForm,
|
|
225
251
|
} from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
252
|
+
import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
|
|
253
|
+
import type {
|
|
254
|
+
UI_I_SendDataNewCdDvdDrive,
|
|
255
|
+
UI_I_SendDataNewHardDisk,
|
|
256
|
+
UI_I_SendDataNewNetwork,
|
|
257
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
226
258
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
259
|
+
import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
|
|
227
260
|
import type {
|
|
228
261
|
UI_I_MediatedDevice,
|
|
229
262
|
UI_I_PciDevice,
|
|
@@ -233,10 +266,7 @@ import type { UI_I_NameTestIds } from '~/components/common/wizards/common/steps/
|
|
|
233
266
|
import type { UI_T_CompatibilityStatus } from '~/components/common/wizards/common/compatibility/lib/models/types'
|
|
234
267
|
import { dynamicSteps } from '~/components/common/vm/actions/add/lib/config/steps'
|
|
235
268
|
|
|
236
|
-
const
|
|
237
|
-
required: true,
|
|
238
|
-
})
|
|
239
|
-
const computeResource = defineModel<UI_I_TreeNode | null>('computeResource', {
|
|
269
|
+
const vmForm = defineModel<UI_I_VmForm>('vmForm', {
|
|
240
270
|
required: true,
|
|
241
271
|
})
|
|
242
272
|
const selectedCreateType = defineModel<string>('selectedCreateType', {
|
|
@@ -275,6 +305,10 @@ const props = withDefaults(
|
|
|
275
305
|
guestOsFamilies: UI_I_OptionItem[]
|
|
276
306
|
guestOsVersions: UI_I_ArbitraryObject<UI_I_OptionItem[]>
|
|
277
307
|
machineTypes: UI_I_OptionItem[]
|
|
308
|
+
virtualHardwareHardDisksLocal: UI_I_SendDataNewHardDisk[] | null
|
|
309
|
+
virtualHardwareCdDvdDrivesLocal: UI_I_SendDataNewCdDvdDrive[] | null
|
|
310
|
+
virtualHardwareNetworksLocal: UI_I_SendDataNewNetwork[] | null
|
|
311
|
+
maxCpus: number
|
|
278
312
|
maxMemory: number
|
|
279
313
|
cpuModels: UI_I_OptionItem[]
|
|
280
314
|
selectedNavItem: UI_T_SelectedNavItem
|
|
@@ -324,6 +358,11 @@ const emits = defineEmits<{
|
|
|
324
358
|
(event: 'change-storage', value: UI_I_DatastoreTableItem | null): void
|
|
325
359
|
(event: 'change-select-options', value: string[]): void
|
|
326
360
|
(event: 'change-compatibility', value: UI_I_OptionItem): void
|
|
361
|
+
(event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
|
|
362
|
+
(
|
|
363
|
+
event: 'change-customize-hardware',
|
|
364
|
+
value: UI_I_SendDataCustomizeHardware
|
|
365
|
+
): void
|
|
327
366
|
(event: 'hide'): void
|
|
328
367
|
}>()
|
|
329
368
|
|