bfg-common 1.5.572 → 1.5.574
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 +43 -115
- 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 +42 -60
- 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,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) => {
|
|
@@ -25,22 +25,17 @@
|
|
|
25
25
|
|
|
26
26
|
<div v-show="selectedNavItem === 0">
|
|
27
27
|
<common-vm-actions-common-customize-hardware-virtual-hardware
|
|
28
|
-
:vm-name="
|
|
28
|
+
:vm-name="model.name"
|
|
29
29
|
:storage="props.storage"
|
|
30
|
-
:max-cpus="props.maxCpus"
|
|
31
30
|
:max-memory="props.maxMemory"
|
|
32
31
|
:cpu-models="props.cpuModels"
|
|
33
|
-
:cpu="props.cpu"
|
|
34
|
-
:memory="props.memory"
|
|
35
32
|
:is-edit="props.isEdit"
|
|
36
33
|
:is-clone="props.isClone"
|
|
37
34
|
:state="props.state"
|
|
38
35
|
:hard-disks="props.hardDisks"
|
|
39
36
|
:cd-dvd-drives="props.cdDvdDrives"
|
|
40
|
-
:networks="props.networks"
|
|
41
37
|
:networks-table="props.networksTable"
|
|
42
38
|
:video-card="props.videoCard"
|
|
43
|
-
:usb-controller="props.usbController"
|
|
44
39
|
:pci-devices="props.pciDevices"
|
|
45
40
|
:nodes="props.nodes"
|
|
46
41
|
:files="props.files"
|
|
@@ -52,10 +47,9 @@
|
|
|
52
47
|
:passthrough-devices="props.passthroughDevices"
|
|
53
48
|
:mediated-devices="props.mediatedDevices"
|
|
54
49
|
:project="props.project"
|
|
55
|
-
:guest-machine-type="
|
|
50
|
+
:guest-machine-type="model.machine_type"
|
|
56
51
|
:computeResource="props.computeResource"
|
|
57
52
|
:compatibility-info="props.compatibilityInfo"
|
|
58
|
-
@send-data="emits('send-data-virtual-hardware-method', $event)"
|
|
59
53
|
@get-storage="emits('get-storage', $event)"
|
|
60
54
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
61
55
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
@@ -68,22 +62,13 @@
|
|
|
68
62
|
</div>
|
|
69
63
|
<div v-show="selectedNavItem === 1">
|
|
70
64
|
<common-vm-actions-common-customize-hardware-vmoptions
|
|
71
|
-
v-model
|
|
72
|
-
v-model:guest-machine-type="guestMachineType"
|
|
73
|
-
v-model:guest-os-family="guestOsFamily"
|
|
74
|
-
v-model:guest-os-version="guestOsVersion"
|
|
75
|
-
:hard-disks="props.hardDisksForBootOptions"
|
|
76
|
-
:cd-dvd-drives="props.cdDvdDrivesForBootOptions"
|
|
77
|
-
:networks="props.networksForBootOptions"
|
|
78
|
-
:options="props.options"
|
|
65
|
+
v-model="model"
|
|
79
66
|
:is-edit="props.isEdit"
|
|
80
67
|
:is-clone="props.isClone"
|
|
81
68
|
:error-validation-fields="props.errorValidationFields"
|
|
82
69
|
:state="props.state"
|
|
83
70
|
:compatibility-info="props.compatibilityInfo"
|
|
84
71
|
:is-vmt="props.isVmt"
|
|
85
|
-
@change-boot-order="emits('change-boot-order', $event)"
|
|
86
|
-
@send-data="emits('send-data-vm-options-method', $event)"
|
|
87
72
|
@invalid="vmOptionsInvalid = $event"
|
|
88
73
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
89
74
|
/>
|
|
@@ -103,39 +88,25 @@ import type {
|
|
|
103
88
|
UI_I_SendDataNewPciDevice,
|
|
104
89
|
UI_I_SendDataNewCdDvdDrive,
|
|
105
90
|
UI_I_SendDataNewHardDisk,
|
|
106
|
-
UI_I_SendDataNewNetwork,
|
|
107
91
|
UI_I_SendDataVideoCard,
|
|
108
|
-
UI_I_SendDataVirtualHardware,
|
|
109
92
|
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
110
|
-
import type { UI_I_SendDataVmoptions } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
|
|
111
93
|
import type { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
|
|
112
94
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
113
95
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
114
|
-
import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
|
|
115
96
|
import type {
|
|
116
|
-
API_UI_I_VmEditCpu,
|
|
117
|
-
API_UI_I_VmEditMemory,
|
|
118
97
|
UI_I_MediatedDevice,
|
|
119
98
|
UI_I_PciDevice,
|
|
120
99
|
} from '~/lib/models/store/vm/interfaces'
|
|
121
100
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
122
101
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
102
|
+
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
123
103
|
import { navItemsNewViewFunc } from '~/components/common/vm/actions/common/customizeHardware/lib/config/navItems'
|
|
124
104
|
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
required: true,
|
|
128
|
-
})
|
|
129
|
-
const guestOsVersion = defineModel<UI_I_OptionItem | null>('guestOsVersion', {
|
|
130
|
-
required: true,
|
|
131
|
-
})
|
|
105
|
+
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
106
|
+
|
|
132
107
|
const selectedNavItem = defineModel<UI_T_SelectedNavItem>('selectedNavItem', {
|
|
133
108
|
required: true,
|
|
134
109
|
})
|
|
135
|
-
const guestMachineType = defineModel<UI_I_OptionItem | null>(
|
|
136
|
-
'guestMachineType',
|
|
137
|
-
{ required: true }
|
|
138
|
-
)
|
|
139
110
|
const vmOptionsInvalid = defineModel<string[]>('vmOptionsInvalid', {
|
|
140
111
|
required: true,
|
|
141
112
|
})
|
|
@@ -149,7 +120,6 @@ const props = withDefaults(
|
|
|
149
120
|
files: UI_I_FileTreeNode[]
|
|
150
121
|
errors: string[]
|
|
151
122
|
storage: UI_I_DatastoreTableItem | null
|
|
152
|
-
maxCpus: number
|
|
153
123
|
navItems: UI_I_TabItem[]
|
|
154
124
|
cpuModels: UI_I_OptionItem[]
|
|
155
125
|
maxMemory: number
|
|
@@ -157,22 +127,14 @@ const props = withDefaults(
|
|
|
157
127
|
isDatastoreLoading: boolean
|
|
158
128
|
networksTable: UI_I_NetworkTableItem[]
|
|
159
129
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
160
|
-
networksForBootOptions: UI_I_SendDataNewNetwork[] | null
|
|
161
|
-
hardDisksForBootOptions: UI_I_SendDataNewHardDisk[] | null
|
|
162
|
-
cdDvdDrivesForBootOptions: UI_I_SendDataNewCdDvdDrive[] | null
|
|
163
|
-
cpu?: API_UI_I_VmEditCpu
|
|
164
130
|
state?: string | number
|
|
165
131
|
isEdit?: boolean
|
|
166
|
-
memory?: API_UI_I_VmEditMemory
|
|
167
132
|
project?: UI_T_Project
|
|
168
133
|
isClone?: boolean
|
|
169
|
-
options?: UI_I_SendDataVmoptions
|
|
170
|
-
networks?: UI_I_SendDataNewNetwork[] | null
|
|
171
134
|
videoCard?: UI_I_SendDataVideoCard
|
|
172
135
|
hardDisks?: UI_I_SendDataNewHardDisk[] | null
|
|
173
136
|
pciDevices?: UI_I_SendDataNewPciDevice[]
|
|
174
137
|
cdDvdDrives?: UI_I_SendDataNewCdDvdDrive[] | null
|
|
175
|
-
usbController?: string
|
|
176
138
|
passthroughDevices?: UI_I_PciDevice[]
|
|
177
139
|
mediatedDevices?: UI_I_MediatedDevice[]
|
|
178
140
|
vmCpuHelpTextSecond?: string
|
|
@@ -182,26 +144,21 @@ const props = withDefaults(
|
|
|
182
144
|
isVmt?: boolean
|
|
183
145
|
}>(),
|
|
184
146
|
{
|
|
185
|
-
cpu: undefined,
|
|
186
147
|
state: undefined,
|
|
187
148
|
isEdit: undefined,
|
|
188
|
-
memory: undefined,
|
|
189
149
|
project: undefined,
|
|
190
150
|
isClone: undefined,
|
|
191
|
-
options: undefined,
|
|
192
|
-
networks: undefined,
|
|
193
151
|
videoCard: undefined,
|
|
194
152
|
hardDisks: undefined,
|
|
195
153
|
pciDevices: undefined,
|
|
196
154
|
cdDvdDrives: undefined,
|
|
197
|
-
usbController: undefined,
|
|
198
155
|
passthroughDevices: undefined,
|
|
199
156
|
mediatedDevices: undefined,
|
|
200
157
|
vmCpuHelpTextSecond: undefined,
|
|
201
158
|
getDatastoreTableFunc: undefined,
|
|
202
159
|
computeResource: undefined,
|
|
203
160
|
compatibilityInfo: undefined,
|
|
204
|
-
isVmt:
|
|
161
|
+
isVmt: false,
|
|
205
162
|
}
|
|
206
163
|
)
|
|
207
164
|
const emits = defineEmits<{
|
|
@@ -213,12 +170,6 @@ const emits = defineEmits<{
|
|
|
213
170
|
(event: 'remove-error-by-title', value: string): void
|
|
214
171
|
(event: 'get-active-device-child', value: UI_I_FileTreeNode): void
|
|
215
172
|
(event: 'remove-validation-errors'): void
|
|
216
|
-
(event: 'send-data-vm-options-method', value: UI_I_SendDataVmoptions): void
|
|
217
|
-
(
|
|
218
|
-
event: 'send-data-virtual-hardware-method',
|
|
219
|
-
value: UI_I_SendDataVirtualHardware
|
|
220
|
-
): void
|
|
221
|
-
(event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
|
|
222
173
|
}>()
|
|
223
174
|
|
|
224
175
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -11,22 +11,18 @@
|
|
|
11
11
|
|
|
12
12
|
<div v-show="selectedNavItem === 0">
|
|
13
13
|
<common-vm-actions-common-customize-hardware-virtual-hardware
|
|
14
|
-
|
|
14
|
+
v-model="model"
|
|
15
|
+
:vm-name="model.name"
|
|
15
16
|
:storage="props.storage"
|
|
16
|
-
:max-cpus="props.maxCpus"
|
|
17
17
|
:max-memory="props.maxMemory"
|
|
18
18
|
:cpu-models="props.cpuModels"
|
|
19
|
-
:cpu="props.cpu"
|
|
20
|
-
:memory="props.memory"
|
|
21
19
|
:is-edit="props.isEdit"
|
|
22
20
|
:is-clone="props.isClone"
|
|
23
21
|
:state="props.state"
|
|
24
22
|
:hard-disks="props.hardDisks"
|
|
25
23
|
:cd-dvd-drives="props.cdDvdDrives"
|
|
26
|
-
:networks="props.networks"
|
|
27
24
|
:networks-table="props.networksTable"
|
|
28
25
|
:video-card="props.videoCard"
|
|
29
|
-
:usb-controller="props.usbController"
|
|
30
26
|
:pci-devices="props.pciDevices"
|
|
31
27
|
:nodes="props.nodes"
|
|
32
28
|
:files="props.files"
|
|
@@ -38,9 +34,8 @@
|
|
|
38
34
|
:passthrough-devices="props.passthroughDevices"
|
|
39
35
|
:mediated-devices="props.mediatedDevices"
|
|
40
36
|
:project="props.project"
|
|
41
|
-
:guest-machine-type="
|
|
37
|
+
:guest-machine-type="model.machine_type"
|
|
42
38
|
:compute-resource="props.computeResource"
|
|
43
|
-
@send-data="emits('send-data-virtual-hardware-method', $event)"
|
|
44
39
|
@get-storage="emits('get-storage', $event)"
|
|
45
40
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
46
41
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
@@ -53,21 +48,12 @@
|
|
|
53
48
|
</div>
|
|
54
49
|
<div v-show="selectedNavItem === 1">
|
|
55
50
|
<common-vm-actions-common-customize-hardware-vmoptions
|
|
56
|
-
v-model
|
|
57
|
-
v-model:guest-machine-type="guestMachineType"
|
|
58
|
-
v-model:guest-os-family="guestOsFamily"
|
|
59
|
-
v-model:guest-os-version="guestOsVersion"
|
|
60
|
-
:hard-disks="props.hardDisksForBootOptions"
|
|
61
|
-
:cd-dvd-drives="props.cdDvdDrivesForBootOptions"
|
|
62
|
-
:networks="props.networksForBootOptions"
|
|
63
|
-
:options="props.options"
|
|
51
|
+
v-model="model"
|
|
64
52
|
:is-edit="props.isEdit"
|
|
65
53
|
:is-clone="props.isClone"
|
|
66
54
|
:error-validation-fields="props.errorValidationFields"
|
|
67
55
|
:state="props.state"
|
|
68
56
|
:is-vmt="props.isVmt"
|
|
69
|
-
@change-boot-order="emits('change-boot-order', $event)"
|
|
70
|
-
@send-data="emits('send-data-vm-options-method', $event)"
|
|
71
57
|
@invalid="vmOptionsInvalid = $event"
|
|
72
58
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
73
59
|
/>
|
|
@@ -87,37 +73,23 @@ import type {
|
|
|
87
73
|
UI_I_SendDataNewPciDevice,
|
|
88
74
|
UI_I_SendDataNewCdDvdDrive,
|
|
89
75
|
UI_I_SendDataNewHardDisk,
|
|
90
|
-
UI_I_SendDataNewNetwork,
|
|
91
76
|
UI_I_SendDataVideoCard,
|
|
92
|
-
UI_I_SendDataVirtualHardware,
|
|
93
77
|
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
94
|
-
import type { UI_I_SendDataVmoptions } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
|
|
95
78
|
import type { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
|
|
96
79
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
97
80
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
98
|
-
import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
|
|
99
81
|
import type {
|
|
100
|
-
API_UI_I_VmEditCpu,
|
|
101
|
-
API_UI_I_VmEditMemory,
|
|
102
82
|
UI_I_MediatedDevice,
|
|
103
83
|
UI_I_PciDevice,
|
|
104
84
|
} from '~/lib/models/store/vm/interfaces'
|
|
105
85
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
86
|
+
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
87
|
+
|
|
88
|
+
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
106
89
|
|
|
107
|
-
const vmName = defineModel<string>('vmName', { required: true })
|
|
108
|
-
const guestOsFamily = defineModel<UI_I_OptionItem | null>('guestOsFamily', {
|
|
109
|
-
required: true,
|
|
110
|
-
})
|
|
111
|
-
const guestOsVersion = defineModel<UI_I_OptionItem | null>('guestOsVersion', {
|
|
112
|
-
required: true,
|
|
113
|
-
})
|
|
114
90
|
const selectedNavItem = defineModel<UI_T_SelectedNavItem>('selectedNavItem', {
|
|
115
91
|
required: true,
|
|
116
92
|
})
|
|
117
|
-
const guestMachineType = defineModel<UI_I_OptionItem | null>(
|
|
118
|
-
'guestMachineType',
|
|
119
|
-
{ required: true }
|
|
120
|
-
)
|
|
121
93
|
const vmOptionsInvalid = defineModel<string[]>('vmOptionsInvalid', {
|
|
122
94
|
required: true,
|
|
123
95
|
})
|
|
@@ -131,7 +103,6 @@ const props = withDefaults(
|
|
|
131
103
|
files: UI_I_FileTreeNode[]
|
|
132
104
|
errors: string[]
|
|
133
105
|
storage: UI_I_DatastoreTableItem | null
|
|
134
|
-
maxCpus: number
|
|
135
106
|
navItems: UI_I_TabItem[]
|
|
136
107
|
cpuModels: UI_I_OptionItem[]
|
|
137
108
|
maxMemory: number
|
|
@@ -139,22 +110,14 @@ const props = withDefaults(
|
|
|
139
110
|
isDatastoreLoading: boolean
|
|
140
111
|
networksTable: UI_I_NetworkTableItem[]
|
|
141
112
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
142
|
-
networksForBootOptions: UI_I_SendDataNewNetwork[] | null
|
|
143
|
-
hardDisksForBootOptions: UI_I_SendDataNewHardDisk[] | null
|
|
144
|
-
cdDvdDrivesForBootOptions: UI_I_SendDataNewCdDvdDrive[] | null
|
|
145
|
-
cpu?: API_UI_I_VmEditCpu
|
|
146
113
|
state?: string | number
|
|
147
114
|
isEdit?: boolean
|
|
148
|
-
memory?: API_UI_I_VmEditMemory
|
|
149
115
|
project?: UI_T_Project
|
|
150
116
|
isClone?: boolean
|
|
151
|
-
options?: UI_I_SendDataVmoptions
|
|
152
|
-
networks?: UI_I_SendDataNewNetwork[] | null
|
|
153
117
|
videoCard?: UI_I_SendDataVideoCard
|
|
154
118
|
hardDisks?: UI_I_SendDataNewHardDisk[] | null
|
|
155
119
|
pciDevices?: UI_I_SendDataNewPciDevice[]
|
|
156
120
|
cdDvdDrives?: UI_I_SendDataNewCdDvdDrive[] | null
|
|
157
|
-
usbController?: string
|
|
158
121
|
passthroughDevices?: UI_I_PciDevice[]
|
|
159
122
|
mediatedDevices?: UI_I_MediatedDevice[]
|
|
160
123
|
vmCpuHelpTextSecond?: string
|
|
@@ -163,25 +126,20 @@ const props = withDefaults(
|
|
|
163
126
|
isVmt?: boolean
|
|
164
127
|
}>(),
|
|
165
128
|
{
|
|
166
|
-
cpu: undefined,
|
|
167
129
|
state: undefined,
|
|
168
130
|
isEdit: undefined,
|
|
169
|
-
memory: undefined,
|
|
170
131
|
project: undefined,
|
|
171
132
|
isClone: undefined,
|
|
172
|
-
options: undefined,
|
|
173
|
-
networks: undefined,
|
|
174
133
|
videoCard: undefined,
|
|
175
134
|
hardDisks: undefined,
|
|
176
135
|
pciDevices: undefined,
|
|
177
136
|
cdDvdDrives: undefined,
|
|
178
|
-
usbController: undefined,
|
|
179
137
|
passthroughDevices: undefined,
|
|
180
138
|
mediatedDevices: undefined,
|
|
181
139
|
vmCpuHelpTextSecond: undefined,
|
|
182
140
|
getDatastoreTableFunc: undefined,
|
|
183
141
|
computeResource: undefined,
|
|
184
|
-
isVmt:
|
|
142
|
+
isVmt: false,
|
|
185
143
|
}
|
|
186
144
|
)
|
|
187
145
|
const emits = defineEmits<{
|
|
@@ -193,12 +151,6 @@ const emits = defineEmits<{
|
|
|
193
151
|
(event: 'remove-error-by-title', value: string): void
|
|
194
152
|
(event: 'get-active-device-child', value: UI_I_FileTreeNode): void
|
|
195
153
|
(event: 'remove-validation-errors'): void
|
|
196
|
-
(event: 'send-data-vm-options-method', value: UI_I_SendDataVmoptions): void
|
|
197
|
-
(
|
|
198
|
-
event: 'send-data-virtual-hardware-method',
|
|
199
|
-
value: UI_I_SendDataVirtualHardware
|
|
200
|
-
): void
|
|
201
|
-
(event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
|
|
202
154
|
}>()
|
|
203
155
|
</script>
|
|
204
156
|
|