bfg-common 1.5.821 → 1.5.822
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/monitor/advanced/tools/chartOptionsModal/lib/utils/checkSubmit.ts +1 -1
- package/components/common/pages/backups/modals/lib/config/restore.ts +0 -1
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +0 -1
- package/components/common/vm/actions/add/New.vue +0 -3
- package/components/common/vm/actions/add/Old.vue +0 -3
- package/components/common/vm/actions/clone/new/New.vue +0 -2
- package/components/common/vm/actions/clone/old/Old.vue +0 -2
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +0 -3
- package/components/common/vm/actions/common/customizeHardware/New.vue +0 -3
- package/components/common/vm/actions/common/customizeHardware/Old.vue +0 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/New.vue +3 -18
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/Old.vue +2 -16
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +2 -41
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +1 -1
- package/components/common/vm/actions/common/lib/models/interfaces.ts +0 -1
- package/components/common/vm/actions/editSettings/Old.vue +0 -1
- package/components/common/vm/actions/editSettings/new/New.vue +0 -1
- package/components/common/vm/actions/lib/utils.ts +0 -2
- package/lib/models/store/vm/interfaces.ts +0 -2
- package/package.json +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbDevice/New.vue +0 -62
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbDevice/NewUsbDevice.vue +0 -65
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbDevice/Old.vue +0 -66
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/models/interfaces'
|
|
2
2
|
import {
|
|
3
3
|
allowedHostCpuFieldNotObject,
|
|
4
|
-
allowedHostNetworkFieldNotObject,
|
|
4
|
+
// allowedHostNetworkFieldNotObject,
|
|
5
5
|
} from '~/components/common/monitor/advanced/tools/chartOptionsModal/lib/config'
|
|
6
6
|
|
|
7
7
|
export const checkIsDisabledSubmit = (
|
|
@@ -269,7 +269,6 @@
|
|
|
269
269
|
:datastore="props.datastore"
|
|
270
270
|
:is-datastore-loading="props.isDatastoreLoading"
|
|
271
271
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
272
|
-
:usb-devices="props.usbDevices"
|
|
273
272
|
:passthrough-devices="props.passthroughDevices"
|
|
274
273
|
:mediated-devices="props.mediatedDevices"
|
|
275
274
|
:compute-resource="computeResource"
|
|
@@ -330,7 +329,6 @@
|
|
|
330
329
|
:datastore="props.datastore"
|
|
331
330
|
:is-datastore-loading="props.isDatastoreLoading"
|
|
332
331
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
333
|
-
:usb-devices="props.usbDevices"
|
|
334
332
|
:passthrough-devices="props.passthroughDevices"
|
|
335
333
|
:mediated-devices="props.mediatedDevices"
|
|
336
334
|
:compute-resource="computeResource"
|
|
@@ -464,7 +462,6 @@ const props = withDefaults(
|
|
|
464
462
|
vmCpuHelpTextSecond: string
|
|
465
463
|
importFromVMWarevSphere: string
|
|
466
464
|
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
467
|
-
usbDevices: any[]
|
|
468
465
|
passthroughDevices: UI_I_PciDevice[]
|
|
469
466
|
mediatedDevices: UI_I_MediatedDevice[]
|
|
470
467
|
templatesTree: UI_I_TreeNode[]
|
|
@@ -118,7 +118,6 @@
|
|
|
118
118
|
:datastore="props.datastore"
|
|
119
119
|
:is-datastore-loading="props.isDatastoreLoading"
|
|
120
120
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
121
|
-
:usb-devices="props.usbDevices"
|
|
122
121
|
:passthrough-devices="props.passthroughDevices"
|
|
123
122
|
:mediated-devices="props.mediatedDevices"
|
|
124
123
|
:compute-resource="computeResource"
|
|
@@ -157,7 +156,6 @@
|
|
|
157
156
|
:datastore="props.datastore"
|
|
158
157
|
:is-datastore-loading="props.isDatastoreLoading"
|
|
159
158
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
160
|
-
:usb-devices="props.usbDevices"
|
|
161
159
|
:passthrough-devices="props.passthroughDevices"
|
|
162
160
|
:mediated-devices="props.mediatedDevices"
|
|
163
161
|
:compute-resource="computeResource"
|
|
@@ -263,7 +261,6 @@ const props = withDefaults(
|
|
|
263
261
|
vmCpuHelpTextSecond: string
|
|
264
262
|
importFromVMWarevSphere: string
|
|
265
263
|
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
266
|
-
usbDevices: any[]
|
|
267
264
|
passthroughDevices: UI_I_PciDevice[]
|
|
268
265
|
mediatedDevices: UI_I_MediatedDevice[]
|
|
269
266
|
templatesTree: UI_I_TreeNode[]
|
|
@@ -174,7 +174,6 @@
|
|
|
174
174
|
:networks-table="props.networksTable"
|
|
175
175
|
:error-validation-fields="props.errorValidationFields"
|
|
176
176
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
177
|
-
:usb-devices="props.usbDevices"
|
|
178
177
|
:passthrough-devices="props.passthroughDevices"
|
|
179
178
|
:mediated-devices="props.mediatedDevices"
|
|
180
179
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
@@ -315,7 +314,6 @@ const props = withDefaults(
|
|
|
315
314
|
readyCompleteTableInfo: UI_I_TableInfoItem[]
|
|
316
315
|
vmCpuHelpTextSecond: string
|
|
317
316
|
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
318
|
-
usbDevices: any[]
|
|
319
317
|
passthroughDevices: UI_I_PciDevice[]
|
|
320
318
|
mediatedDevices: UI_I_MediatedDevice[]
|
|
321
319
|
nameRequestUrl: string
|
|
@@ -103,7 +103,6 @@
|
|
|
103
103
|
:networks-table="props.networksTable"
|
|
104
104
|
:error-validation-fields="props.errorValidationFields"
|
|
105
105
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
106
|
-
:usb-devices="props.usbDevices"
|
|
107
106
|
:passthrough-devices="props.passthroughDevices"
|
|
108
107
|
:mediated-devices="props.mediatedDevices"
|
|
109
108
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
@@ -178,7 +177,6 @@ const props = withDefaults(
|
|
|
178
177
|
readyCompleteTableInfo: UI_I_TableInfoItem[]
|
|
179
178
|
vmCpuHelpTextSecond: string
|
|
180
179
|
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
181
|
-
usbDevices: any[]
|
|
182
180
|
passthroughDevices: UI_I_PciDevice[]
|
|
183
181
|
mediatedDevices: UI_I_MediatedDevice[]
|
|
184
182
|
nameRequestUrl: string
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
:is-edit="props.isEdit"
|
|
24
24
|
:is-clone="props.isClone"
|
|
25
25
|
:state="props.state"
|
|
26
|
-
:usb-devices="props.usbDevices"
|
|
27
26
|
:passthrough-devices="props.passthroughDevices"
|
|
28
27
|
:mediated-devices="props.mediatedDevices"
|
|
29
28
|
:project="props.project"
|
|
@@ -102,7 +101,6 @@ const props = withDefaults(
|
|
|
102
101
|
isEdit?: boolean
|
|
103
102
|
isClone?: boolean
|
|
104
103
|
state?: string | number
|
|
105
|
-
usbDevices?: any[]
|
|
106
104
|
passthroughDevices?: UI_I_PciDevice[]
|
|
107
105
|
mediatedDevices?: UI_I_MediatedDevice[]
|
|
108
106
|
project?: UI_T_Project
|
|
@@ -121,7 +119,6 @@ const props = withDefaults(
|
|
|
121
119
|
isEdit: false,
|
|
122
120
|
isClone: false,
|
|
123
121
|
state: undefined,
|
|
124
|
-
usbDevices: undefined,
|
|
125
122
|
passthroughDevices: undefined,
|
|
126
123
|
mediatedDevices: undefined,
|
|
127
124
|
project: undefined,
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
:datastore="props.datastore"
|
|
46
46
|
:is-datastore-loading="props.isDatastoreLoading"
|
|
47
47
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
48
|
-
:usb-devices="props.usbDevices"
|
|
49
48
|
:passthrough-devices="props.passthroughDevices"
|
|
50
49
|
:mediated-devices="props.mediatedDevices"
|
|
51
50
|
:project="props.project"
|
|
@@ -137,7 +136,6 @@ const props = withDefaults(
|
|
|
137
136
|
hardDisks?: UI_I_SendDataNewHardDisk[] | null
|
|
138
137
|
pciDevices?: UI_I_SendDataNewPciDevice[]
|
|
139
138
|
cdDvdDrives?: UI_I_SendDataNewCdDvdDrive[] | null
|
|
140
|
-
usbDevices?: any[]
|
|
141
139
|
passthroughDevices?: UI_I_PciDevice[]
|
|
142
140
|
mediatedDevices?: UI_I_MediatedDevice[]
|
|
143
141
|
vmCpuHelpTextSecond?: string
|
|
@@ -155,7 +153,6 @@ const props = withDefaults(
|
|
|
155
153
|
hardDisks: undefined,
|
|
156
154
|
pciDevices: undefined,
|
|
157
155
|
cdDvdDrives: undefined,
|
|
158
|
-
usbDevices: undefined,
|
|
159
156
|
passthroughDevices: undefined,
|
|
160
157
|
mediatedDevices: undefined,
|
|
161
158
|
vmCpuHelpTextSecond: undefined,
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
:datastore="props.datastore"
|
|
32
32
|
:is-datastore-loading="props.isDatastoreLoading"
|
|
33
33
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
34
|
-
:usb-devices="props.usbDevices"
|
|
35
34
|
:passthrough-devices="props.passthroughDevices"
|
|
36
35
|
:mediated-devices="props.mediatedDevices"
|
|
37
36
|
:project="props.project"
|
|
@@ -119,7 +118,6 @@ const props = withDefaults(
|
|
|
119
118
|
hardDisks?: UI_I_SendDataNewHardDisk[] | null
|
|
120
119
|
pciDevices?: UI_I_SendDataNewPciDevice[]
|
|
121
120
|
cdDvdDrives?: UI_I_SendDataNewCdDvdDrive[] | null
|
|
122
|
-
usbDevices?: any[]
|
|
123
121
|
passthroughDevices?: UI_I_PciDevice[]
|
|
124
122
|
mediatedDevices?: UI_I_MediatedDevice[]
|
|
125
123
|
vmCpuHelpTextSecond?: string
|
|
@@ -136,7 +134,6 @@ const props = withDefaults(
|
|
|
136
134
|
hardDisks: undefined,
|
|
137
135
|
pciDevices: undefined,
|
|
138
136
|
cdDvdDrives: undefined,
|
|
139
|
-
usbDevices: undefined,
|
|
140
137
|
passthroughDevices: undefined,
|
|
141
138
|
mediatedDevices: undefined,
|
|
142
139
|
vmCpuHelpTextSecond: undefined,
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
)"
|
|
59
59
|
:key="props.hardDisksIndex[key]"
|
|
60
60
|
>
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
<!-- TODO 111-->
|
|
62
|
+
<!-- v-model:vm-storage-policy="item.vm_storage_policy"-->
|
|
63
63
|
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk
|
|
64
64
|
v-model:size="item.size"
|
|
65
65
|
v-model:provision-type="item.provision_type"
|
|
@@ -201,16 +201,6 @@
|
|
|
201
201
|
"
|
|
202
202
|
/>
|
|
203
203
|
</div>
|
|
204
|
-
<div v-for="(item, key) in model.passthrough_usb_devices" :key="key">
|
|
205
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-new-usb-device
|
|
206
|
-
v-model:vendor-name="item.vendor_name"
|
|
207
|
-
:index="props.usbDevicesIndex[key]"
|
|
208
|
-
:type="props.usbDevicesType[key]"
|
|
209
|
-
:usb-devices="props.usbDevices"
|
|
210
|
-
:state="props.state"
|
|
211
|
-
@remove="emits('remove-usb-device', props.usbDevicesIndex[key])"
|
|
212
|
-
/>
|
|
213
|
-
</div>
|
|
214
204
|
<div v-for="(item, key) in model.usb_controllers" :key="key">
|
|
215
205
|
<common-vm-actions-common-customize-hardware-virtual-hardware-new-usb-controller
|
|
216
206
|
v-model="item.type"
|
|
@@ -292,7 +282,7 @@ import type {
|
|
|
292
282
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
293
283
|
import type {
|
|
294
284
|
UI_T_HardDiskType,
|
|
295
|
-
UI_T_NetworkType,
|
|
285
|
+
UI_T_NetworkType,
|
|
296
286
|
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
|
|
297
287
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
298
288
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
@@ -334,9 +324,6 @@ const props = withDefaults(
|
|
|
334
324
|
pciDevicesType: UI_T_NetworkType[]
|
|
335
325
|
isShowFileModal: boolean
|
|
336
326
|
pciDevicesIndex: number[]
|
|
337
|
-
usbDevices: any[]
|
|
338
|
-
usbDevicesType: UI_T_PciDeviceType[]
|
|
339
|
-
usbDevicesIndex: number[]
|
|
340
327
|
cdDvdDrivesType: UI_T_NetworkType[]
|
|
341
328
|
cdDvdDrivesIndex: number[]
|
|
342
329
|
errorValidationFields: UI_I_ErrorValidationField<string>[]
|
|
@@ -373,7 +360,6 @@ const emits = defineEmits<{
|
|
|
373
360
|
(event: 'hide-file-modal'): void
|
|
374
361
|
(event: 'remove-hard-disk', value: [number, UI_I_SendDataNewHardDisk]): void
|
|
375
362
|
(event: 'remove-pci-device', value: number): void
|
|
376
|
-
(event: 'remove-usb-device', value: number): void
|
|
377
363
|
(event: 'get-networks-table', value: UI_I_TablePayload): void
|
|
378
364
|
(event: 'add-exist-hard-disk', value: UI_I_FileTreeNode): void
|
|
379
365
|
(event: 'roll-back-hard-disk', value: number): void
|
|
@@ -413,7 +399,6 @@ const deviceCount = computed<number>(
|
|
|
413
399
|
(model.value.disk_devices?.length || 0) +
|
|
414
400
|
(model.value.network_devices?.length || 0) +
|
|
415
401
|
(model.value.passthrough_pci_devices?.length || 0) +
|
|
416
|
-
(model.value.passthrough_usb_devices?.length || 0) +
|
|
417
402
|
6
|
|
418
403
|
)
|
|
419
404
|
const deviceCountText = computed<string>(() =>
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
)"
|
|
37
37
|
:key="props.hardDisksIndex[key]"
|
|
38
38
|
>
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
<!-- TODO 111-->
|
|
40
|
+
<!-- v-model:vm-storage-policy="item.vm_storage_policy"-->
|
|
41
41
|
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk
|
|
42
42
|
v-model:size="item.size"
|
|
43
43
|
v-model:provision-type="item.provision_type"
|
|
@@ -181,16 +181,6 @@
|
|
|
181
181
|
"
|
|
182
182
|
/>
|
|
183
183
|
</div>
|
|
184
|
-
<div v-for="(item, key) in model.passthrough_usb_devices" :key="key">
|
|
185
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-new-usb-device
|
|
186
|
-
v-model:vendor-name="item.vendor_name"
|
|
187
|
-
:index="props.usbDevicesIndex[key]"
|
|
188
|
-
:type="props.usbDevicesType[key]"
|
|
189
|
-
:usb-devices="props.usbDevices"
|
|
190
|
-
:state="props.state"
|
|
191
|
-
@remove="emits('remove-usb-device', props.usbDevicesIndex[key])"
|
|
192
|
-
/>
|
|
193
|
-
</div>
|
|
194
184
|
<div v-for="(item, key) in model.usb_controllers" :key="key">
|
|
195
185
|
<common-vm-actions-common-customize-hardware-virtual-hardware-new-usb-controller
|
|
196
186
|
v-model="item.type"
|
|
@@ -311,9 +301,6 @@ const props = withDefaults(
|
|
|
311
301
|
pciDevicesType: UI_T_PciDeviceType[]
|
|
312
302
|
isShowFileModal: boolean
|
|
313
303
|
pciDevicesIndex: number[]
|
|
314
|
-
usbDevices: any[]
|
|
315
|
-
usbDevicesType: UI_T_PciDeviceType[]
|
|
316
|
-
usbDevicesIndex: number[]
|
|
317
304
|
cdDvdDrivesType: UI_T_CdDvdType[]
|
|
318
305
|
cdDvdDrivesIndex: number[]
|
|
319
306
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
@@ -346,7 +333,6 @@ const emits = defineEmits<{
|
|
|
346
333
|
(event: 'hide-file-modal'): void
|
|
347
334
|
(event: 'remove-hard-disk', value: [number, UI_I_SendDataNewHardDisk]): void
|
|
348
335
|
(event: 'remove-pci-device', value: number): void
|
|
349
|
-
(event: 'remove-usb-device', value: number): void
|
|
350
336
|
(event: 'get-networks-table', value: UI_I_TablePayload): void
|
|
351
337
|
(event: 'add-exist-hard-disk', value: UI_I_FileTreeNode): void
|
|
352
338
|
(event: 'roll-back-hard-disk', value: number): void
|
package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue
CHANGED
|
@@ -24,9 +24,6 @@
|
|
|
24
24
|
:pci-devices-type="pciDevicesType"
|
|
25
25
|
:is-show-file-modal="isShowFileModal"
|
|
26
26
|
:pci-devices-index="pciDevicesIndex"
|
|
27
|
-
:usb-devices="usbDevices"
|
|
28
|
-
:usb-devices-type="usbDevicesType"
|
|
29
|
-
:usb-devices-index="usbDevicesIndex"
|
|
30
27
|
:cd-dvd-drives-type="cdDvdDrivesType"
|
|
31
28
|
:cd-dvd-drives-index="cdDvdDrivesIndex"
|
|
32
29
|
:error-validation-fields="errorValidationFields"
|
|
@@ -34,8 +31,8 @@
|
|
|
34
31
|
:state="state"
|
|
35
32
|
:video-card="videoCard"
|
|
36
33
|
:guest-machine-type="guestMachineType"
|
|
37
|
-
:passthrough-devices="
|
|
38
|
-
:mediated-devices="
|
|
34
|
+
:passthrough-devices="passthroughDevices"
|
|
35
|
+
:mediated-devices="mediatedDevices"
|
|
39
36
|
:vm-cpu-help-text-second="vmCpuHelpTextSecond"
|
|
40
37
|
:compute-resource="props.computeResource"
|
|
41
38
|
:compatibility-info="props.compatibilityInfo"
|
|
@@ -120,7 +117,6 @@ const props = withDefaults(
|
|
|
120
117
|
cdDvdDrives?: UI_I_SendDataNewCdDvdDrive[] | null
|
|
121
118
|
videoCard?: UI_I_SendDataVideoCard
|
|
122
119
|
// pciDevices?: UI_I_SendDataNewPciDevice[]
|
|
123
|
-
usbDevices?: any[]
|
|
124
120
|
passthroughDevices?: UI_I_PciDevice[]
|
|
125
121
|
mediatedDevices?: UI_I_MediatedDevice[]
|
|
126
122
|
guestMachineType?: UI_I_OptionItem | null
|
|
@@ -577,38 +573,6 @@ const onRemovePciDevice = (index: number): void => {
|
|
|
577
573
|
})
|
|
578
574
|
}
|
|
579
575
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
const defaultUsbDevice: any = {
|
|
583
|
-
address: '',
|
|
584
|
-
}
|
|
585
|
-
const usbDevicesIndex = ref<number[]>([0])
|
|
586
|
-
const usbDevicesType = ref<('new' | 'edit' | 'removed')[]>(['new'])
|
|
587
|
-
if (!model.value.passthrough_usb_devices?.length) {
|
|
588
|
-
usbDevicesIndex.value = []
|
|
589
|
-
usbDevicesType.value = []
|
|
590
|
-
} else {
|
|
591
|
-
model.value.passthrough_usb_devices.forEach((_disk, _index, array) => {
|
|
592
|
-
if (!props.isEdit && !props.isClone) return
|
|
593
|
-
|
|
594
|
-
const count = array.length
|
|
595
|
-
usbDevicesIndex.value = [...Array(count).keys()]
|
|
596
|
-
if (props.isEdit) {
|
|
597
|
-
usbDevicesType.value = Array(count).fill('edit')
|
|
598
|
-
} else if (props.isClone) {
|
|
599
|
-
usbDevicesType.value = Array(count).fill('clone') // before been new
|
|
600
|
-
}
|
|
601
|
-
})
|
|
602
|
-
}
|
|
603
|
-
const addUsbDevice = (): void => {
|
|
604
|
-
const newIndex = (usbDevicesIndex.value.at(-1) ?? -1) + 1
|
|
605
|
-
usbDevicesIndex.value.push(newIndex)
|
|
606
|
-
usbDevicesType.value.push('new')
|
|
607
|
-
|
|
608
|
-
if (!model.value.passthrough_usb_devices) model.value.passthrough_usb_devices = []
|
|
609
|
-
model.value.passthrough_usb_devices.push(useDeepCopy(defaultUsbDevice))
|
|
610
|
-
}
|
|
611
|
-
|
|
612
576
|
const isShowFileModal = ref<boolean>(false)
|
|
613
577
|
const onAddDevice = (item: UI_I_DropdownTreeItemChild): void => {
|
|
614
578
|
switch (item.value) {
|
|
@@ -618,9 +582,6 @@ const onAddDevice = (item: UI_I_DropdownTreeItemChild): void => {
|
|
|
618
582
|
case 2:
|
|
619
583
|
isShowFileModal.value = true
|
|
620
584
|
break
|
|
621
|
-
case 3:
|
|
622
|
-
addUsbDevice()
|
|
623
|
-
break
|
|
624
585
|
case 5:
|
|
625
586
|
addCdDvdDrive()
|
|
626
587
|
break
|
|
@@ -28,7 +28,7 @@ export const dropdownItemsFunc = (
|
|
|
28
28
|
testId: 'existing-hard-disk',
|
|
29
29
|
},
|
|
30
30
|
// { text: 'RDM Disk', value: 2 },
|
|
31
|
-
{ text: 'Host USB Device', value: 3 },
|
|
31
|
+
// { text: 'Host USB Device', value: 3 },
|
|
32
32
|
// { text: 'NVDIMM', value: 4 },
|
|
33
33
|
{
|
|
34
34
|
text: localization.common.cdDvdDrive,
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
:video-card="vmSettings.video_card"
|
|
28
28
|
:usb-controller="vmSettings.usb_controllers"
|
|
29
29
|
:pci-devices="vmSettings.passthrough_pci_devices"
|
|
30
|
-
:usb-devices="vmSettings.passthrough_usb_devices"
|
|
31
30
|
:hard-disks-for-edit="vmSettings.disk_devices.filter((disk) => disk.device_type !== 'cdrom')"
|
|
32
31
|
:options="vmSettings.options"
|
|
33
32
|
:selected-nav-item="props.selectedNavItem"
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
:video-card="vmSettings.video_card"
|
|
31
31
|
:usb-controller="vmSettings.usb_controllers"
|
|
32
32
|
:pci-devices="vmSettings.passthrough_pci_devices"
|
|
33
|
-
:usb-devices="vmSettings.passthrough_usb_devices"
|
|
34
33
|
:hard-disks-for-edit="vmSettings.disk_devices.filter((disk) => disk.device_type !== 'cdrom')"
|
|
35
34
|
:options="vmSettings.options"
|
|
36
35
|
:selected-nav-item="props.selectedNavItem"
|
|
@@ -139,7 +139,6 @@ export const constructSendDataForm = (
|
|
|
139
139
|
disk_devices,
|
|
140
140
|
network_devices,
|
|
141
141
|
passthrough_pci_devices,
|
|
142
|
-
passthrough_usb_devices,
|
|
143
142
|
cpu,
|
|
144
143
|
memory,
|
|
145
144
|
usb_controllers,
|
|
@@ -170,7 +169,6 @@ export const constructSendDataForm = (
|
|
|
170
169
|
disk_devices: diskDevices,
|
|
171
170
|
network_devices: network_devices,
|
|
172
171
|
passthrough_pci_devices: passthrough_pci_devices,
|
|
173
|
-
passthrough_usb_devices: passthrough_usb_devices,
|
|
174
172
|
cpu: {
|
|
175
173
|
vcpus: cpu.vcpus,
|
|
176
174
|
max_vcpus: cpu.hotplug ? cpu.max_vcpus : 0,
|
|
@@ -210,7 +210,6 @@ export interface API_UI_I_Pvm {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
passthrough_pci_devices: any[]
|
|
213
|
-
passthrough_usb_devices: any[]
|
|
214
213
|
snapshots: any
|
|
215
214
|
storage: {
|
|
216
215
|
folder: string
|
|
@@ -392,7 +391,6 @@ export interface API_UI_I_VmReadyToComplete {
|
|
|
392
391
|
usb_controllers: API_UI_I_VmReadyToCompleteUsbController[]
|
|
393
392
|
video_card: API_UI_I_VmReadyToCompleteVideoCard
|
|
394
393
|
passthrough_pci_devices: API_UI_I_VmReadyToCompletePciDevice[]
|
|
395
|
-
passthrough_usb_devices: any[]
|
|
396
394
|
}
|
|
397
395
|
compute_resource?: string
|
|
398
396
|
location?: string
|
package/package.json
CHANGED
package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbDevice/New.vue
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ui-stack-block
|
|
3
|
-
:removable="props.isRemovable"
|
|
4
|
-
test-id="usb-device-stack-block"
|
|
5
|
-
has-children
|
|
6
|
-
@remove="emits('remove')"
|
|
7
|
-
>
|
|
8
|
-
<template #stackBlockKey>
|
|
9
|
-
<div
|
|
10
|
-
:id="`vm-wizard-toggle-block-usb-device-${props.index}`"
|
|
11
|
-
:data-id="`vm-wizard-toggle-block-usb-device-${props.index}`"
|
|
12
|
-
class="flex-align-center"
|
|
13
|
-
>
|
|
14
|
-
<span>{{ props.label }}</span>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
17
|
-
<template #stackBlockContent>
|
|
18
|
-
<div v-if="props.isEdit" class="selected-usb-device">
|
|
19
|
-
{{ props.selectedUsbDeviceText }}
|
|
20
|
-
</div>
|
|
21
|
-
<ui-select
|
|
22
|
-
v-else
|
|
23
|
-
id="usb-device-select"
|
|
24
|
-
v-model="vendorName"
|
|
25
|
-
:items="props.usbDevices"
|
|
26
|
-
:disabled="props.isEdit"
|
|
27
|
-
width="auto"
|
|
28
|
-
test-id="usb-device-select"
|
|
29
|
-
size="sm"
|
|
30
|
-
/>
|
|
31
|
-
</template>
|
|
32
|
-
</ui-stack-block>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script setup lang="ts">
|
|
36
|
-
// import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
|
|
37
|
-
// import type {
|
|
38
|
-
// UI_I_PciDevice,
|
|
39
|
-
// } from '~/lib/models/store/vm/interfaces'
|
|
40
|
-
|
|
41
|
-
const vendorName = defineModel<string>('vendorName', { required: true })
|
|
42
|
-
|
|
43
|
-
const props = defineProps<{
|
|
44
|
-
index: number
|
|
45
|
-
type: any
|
|
46
|
-
usbDevices: any[]
|
|
47
|
-
isRemovable: boolean
|
|
48
|
-
label: string
|
|
49
|
-
isEdit: boolean
|
|
50
|
-
selectedUsbDeviceText?: string
|
|
51
|
-
}>()
|
|
52
|
-
|
|
53
|
-
const emits = defineEmits<{
|
|
54
|
-
(event: 'remove'): void
|
|
55
|
-
}>()
|
|
56
|
-
</script>
|
|
57
|
-
|
|
58
|
-
<style scoped lang="scss">
|
|
59
|
-
:deep(.stack-block.not-children .stack-block-label) {
|
|
60
|
-
height: auto;
|
|
61
|
-
}
|
|
62
|
-
</style>
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
:is="currentComponent"
|
|
4
|
-
v-model:vendor-name="vendorName"
|
|
5
|
-
:index="props.index"
|
|
6
|
-
:type="props.type"
|
|
7
|
-
:is-removable="isRemovable"
|
|
8
|
-
:is-edit="isEdit"
|
|
9
|
-
:label="label"
|
|
10
|
-
@remove="emits('remove')"
|
|
11
|
-
/>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup lang="ts">
|
|
15
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
16
|
-
import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
|
|
17
|
-
|
|
18
|
-
const vendorName = defineModel<string>('vendorName', {required: true})
|
|
19
|
-
|
|
20
|
-
const props = withDefaults(
|
|
21
|
-
defineProps<{
|
|
22
|
-
index: number
|
|
23
|
-
type: UI_T_PciDeviceType
|
|
24
|
-
usbDevices: any[]
|
|
25
|
-
state?: string | number
|
|
26
|
-
}>(),
|
|
27
|
-
{
|
|
28
|
-
state: undefined,
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
const emits = defineEmits<{
|
|
32
|
-
(event: 'remove'): void
|
|
33
|
-
}>()
|
|
34
|
-
|
|
35
|
-
const { $store }: any = useNuxtApp()
|
|
36
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
37
|
-
const currentComponent = computed(() =>
|
|
38
|
-
isNewView.value
|
|
39
|
-
? defineAsyncComponent(() => import('./New.vue'))
|
|
40
|
-
: defineAsyncComponent(() => import('./Old.vue'))
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
44
|
-
|
|
45
|
-
const isRunning = computed<boolean>(() => {
|
|
46
|
-
return props.state === 2
|
|
47
|
-
})
|
|
48
|
-
const isEdit = computed<boolean>(() => {
|
|
49
|
-
return props.type === 'edit'
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
const isRemovable = computed<boolean>(() => {
|
|
53
|
-
// return !props.isEdit || !isRunning.value
|
|
54
|
-
return !isEdit.value || !isRunning.value
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
const label = computed<string>(() => {
|
|
58
|
-
if (isEdit.value)
|
|
59
|
-
return `${localization.value.common.newUsbDevice || 'new usb'} ${props.index + 1}`
|
|
60
|
-
|
|
61
|
-
return `${localization.value.common.usbDevice || 'usb'} *`
|
|
62
|
-
})
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
<style scoped lang="scss"></style>
|
package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbDevice/Old.vue
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="hardware-usb-device">
|
|
3
|
-
<atoms-stack-block
|
|
4
|
-
:removable="props.isRemovable"
|
|
5
|
-
test-id="usb-device-stack-block"
|
|
6
|
-
:has-children="false"
|
|
7
|
-
@remove="emits('remove')"
|
|
8
|
-
>
|
|
9
|
-
<template #stackBlockKey>
|
|
10
|
-
<div
|
|
11
|
-
:id="`vm-wizard-toggle-block-usb-device-${props.index}`"
|
|
12
|
-
:data-id="`vm-wizard-toggle-block-usb-device-${props.index}`"
|
|
13
|
-
class="flex-align-center"
|
|
14
|
-
>
|
|
15
|
-
<span>{{ props.label }}</span>
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
18
|
-
<template #stackBlockContent>
|
|
19
|
-
<div v-if="props.isEdit">
|
|
20
|
-
{{ props.selectedUsbDeviceText }}
|
|
21
|
-
</div>
|
|
22
|
-
<div v-else class="select">
|
|
23
|
-
<select
|
|
24
|
-
id="usb-device-select"
|
|
25
|
-
v-model="vendorName"
|
|
26
|
-
:disabled="props.isEdit"
|
|
27
|
-
data-id="usb-device-select"
|
|
28
|
-
@click.stop
|
|
29
|
-
>
|
|
30
|
-
<option
|
|
31
|
-
v-for="(item, key) in props.usbDevices"
|
|
32
|
-
:key="key"
|
|
33
|
-
:value="item.value"
|
|
34
|
-
>
|
|
35
|
-
{{ item.text }}
|
|
36
|
-
</option>
|
|
37
|
-
</select>
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
40
|
-
</atoms-stack-block>
|
|
41
|
-
</div>
|
|
42
|
-
</template>
|
|
43
|
-
|
|
44
|
-
<script setup lang="ts">
|
|
45
|
-
// import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
|
|
46
|
-
// import type {
|
|
47
|
-
// UI_I_PciDevice,
|
|
48
|
-
// } from '~/lib/models/store/vm/interfaces'
|
|
49
|
-
|
|
50
|
-
const vendorName = defineModel<string>('vendorName', { required: true })
|
|
51
|
-
|
|
52
|
-
const props = defineProps<{
|
|
53
|
-
index: number
|
|
54
|
-
type: any
|
|
55
|
-
usbDevices: any[]
|
|
56
|
-
isRemovable: boolean
|
|
57
|
-
label: string
|
|
58
|
-
isEdit: boolean
|
|
59
|
-
selectedUsbDeviceText?: string
|
|
60
|
-
}>()
|
|
61
|
-
const emits = defineEmits<{
|
|
62
|
-
(event: 'remove'): void
|
|
63
|
-
}>()
|
|
64
|
-
</script>
|
|
65
|
-
|
|
66
|
-
<style scoped lang="scss"></style>
|