bfg-common 1.5.707 → 1.5.708
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-1.svg +3 -2
- 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-1.svg +4 -3
- 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 +3 -46
- package/assets/localization/local_en.json +3 -46
- package/assets/localization/local_hy.json +3 -46
- package/assets/localization/local_kk.json +3 -46
- package/assets/localization/local_ru.json +5 -48
- package/assets/localization/local_zh.json +3 -46
- package/assets/scss/common/icons/icons-1.scss +1 -1
- package/assets/scss/common/icons/icons-2.scss +0 -18
- package/assets/scss/common/theme.scss +0 -2
- package/assets/scss/components/auth.scss +5 -32
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +170 -170
- package/components/atoms/dropdown/tree/Tree.vue +0 -2
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/switch/Switch.vue +1 -7
- 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/atoms/wizard/Wizard.vue +1 -1
- package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/help/navbar/left/lib/utils/constructAccordion.ts +1 -2
- package/components/common/help/navbar/right/Right.vue +1 -1
- package/components/common/layout/theHeader/TheHeaderNew.vue +315 -315
- package/components/common/layout/theHeader/TheHeaderOld.vue +262 -262
- package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
- package/components/common/layout/theHeader/modals/reconnect/ReconnectOld.vue +0 -2
- package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePassword.vue +21 -12
- package/components/common/layout/theHeader/userMenu/modals/changePassword/New.vue +43 -36
- package/components/common/layout/theHeader/userMenu/modals/changePassword/Old.vue +2 -0
- package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/utils.ts +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesNew.vue +0 -13
- package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesOld.vue +144 -144
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +15 -8
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/{New.vue → ChangeLanguageNew.vue} +2 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/{Old.vue → ChangeLanguageOld.vue} +2 -0
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +7 -8
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/{New.vue → DefaultConsoleNew.vue} +3 -3
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/{Old.vue → DefaultConsoleOld.vue} +2 -2
- package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/Inventory.vue +8 -7
- package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/{New.vue → InventoryNew.vue} +2 -3
- package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/{Old.vue → InventoryOld.vue} +2 -2
- package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +7 -7
- package/components/common/layout/theHeader/userMenu/modals/preferences/security/New.vue +12 -277
- package/components/common/layout/theHeader/userMenu/modals/preferences/security/Old.vue +56 -30
- package/components/common/layout/theHeader/userMenu/modals/preferences/security/Security.vue +6 -65
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +8 -8
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/{New.vue → TimeFormatNew.vue} +3 -3
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/{Old.vue → TimeFormatOld.vue} +2 -2
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/View.vue +7 -8
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/{New.vue → ViewNew.vue} +3 -12
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/{Old.vue → ViewOld.vue} +2 -2
- package/components/common/monitor/advanced/graphView/GraphView.vue +0 -8
- package/components/common/monitor/advanced/tools/Tools.vue +1 -5
- 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/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/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/name/lib/models/interfaces.ts +6 -6
- package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +2 -7
- package/components/common/pages/hardwareHealth/tableView/TableView.vue +0 -8
- package/components/common/pages/hardwareHealth/tableView/lib/config/sensorTable.ts +1 -13
- package/components/common/pages/hardwareHealth/toolsPanel/lib/config/actionsPanel.ts +4 -4
- 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/qrcode/Qrcode.vue +56 -0
- 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/split/horizontal/New.vue +2 -0
- package/components/common/split/vertical/New.vue +1 -2
- package/components/common/tools/Actions.vue +207 -207
- package/components/common/treeView/TreeView.vue +52 -52
- package/components/common/vm/actions/add/New.vue +1 -1
- package/components/common/vm/actions/add/Old.vue +1 -1
- package/components/common/vm/actions/clone/lib/config/steps.ts +295 -295
- package/components/common/vm/actions/clone/new/New.vue +438 -438
- package/components/common/vm/actions/clone/old/Old.vue +0 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/New.vue +34 -10
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/Old.vue +37 -15
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +50 -49
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/coresPerSocket/CoresPerSocket.vue +3 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces.ts +1 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +283 -283
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +7 -13
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/New.vue +4 -7
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +45 -52
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/Old.vue +8 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIo.vue +3 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/New.vue +2 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/Old.vue +2 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/New.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/Old.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/New.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGrid.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/Old.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +156 -156
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/options/New.vue +264 -264
- package/components/common/vm/actions/common/select/options/Old.vue +2 -1
- package/components/common/vm/actions/common/select/options/Options.vue +58 -58
- package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
- 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/new/Skeleton.vue +88 -88
- package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
- package/components/common/wizards/common/compatibility/New.vue +1 -1
- package/components/common/wizards/common/compatibility/Old.vue +1 -1
- package/components/common/wizards/common/steps/computeResource/New.vue +93 -93
- 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/New.vue +40 -40
- package/components/common/wizards/datastore/add/Add.vue +228 -228
- package/components/common/wizards/datastore/add/lib/config/createDatastore.ts +0 -1
- package/components/common/wizards/datastore/add/lib/models/interfaces.ts +0 -1
- package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +0 -5
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceOld.vue +0 -5
- package/components/common/wizards/datastore/add/steps/nameAndDevice/table/old/Old.vue +3 -2
- package/components/common/wizards/datastore/add/steps/readyComplete/lib/config/propertiesDetails.ts +1 -8
- package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
- package/components/common/wizards/vm/migrate/lib/models/enums.ts +2 -2
- package/components/common/wizards/vm/migrate/steps/selectStorage/SelectStorage.vue +4 -4
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/new/lib/config/diskTable.ts +2 -6
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +12 -18
- package/composables/useAppVersion.ts +21 -21
- package/composables/useEnvLanguage.ts +8 -7
- package/composables/useLocal.ts +6 -6
- package/composables/useLocalCommon.ts +39 -39
- package/lib/models/interfaces.ts +0 -1
- package/package.json +4 -3
- package/plugins/console.ts +21 -21
- package/plugins/date.ts +37 -14
- 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 +128 -128
- package/public/spice-console/process/inputprocess.js +227 -227
- package/public/spice-console/process/mainprocess.js +212 -212
- package/public/spice-console/run.js +210 -210
- package/store/main/getters.ts +2 -2
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- package/store/tasks/mappers/recentTasks.ts +123 -123
- package/store/tasks/mutations.ts +82 -82
- package/components/common/certificate/Certificate.vue +0 -27
- package/components/common/certificate/CertificateInfo.vue +0 -139
- package/components/common/certificate/Tools.vue +0 -59
- package/components/common/certificate/lib/config/tabsPannel.ts +0 -22
- package/components/common/certificate/lib/models/interfaces.ts +0 -9
- package/components/common/certificate/lib/models/types.ts +0 -1
- package/components/common/certificate/modals/renew/New.vue +0 -64
- package/components/common/certificate/modals/renew/Old.vue +0 -122
- package/components/common/certificate/modals/renew/Renew.vue +0 -67
- package/components/common/pages/auth/TheFooter.vue +0 -104
- package/components/common/pages/files/lib/models/enums.ts +0 -10
- package/components/common/qr/Qr.vue +0 -69
- package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/AdvancedOptions.vue +0 -43
- package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/New.vue +0 -114
- package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/Old.vue +0 -114
|
@@ -105,7 +105,6 @@
|
|
|
105
105
|
:index="props.hardDisksIndex[key]"
|
|
106
106
|
:type="props.hardDisksType[key]"
|
|
107
107
|
:main-storage="props.storage"
|
|
108
|
-
:main-storage-free="props.storageFree"
|
|
109
108
|
:error-validation-fields="props.errorValidationFields"
|
|
110
109
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
111
110
|
:datastore="props.datastore"
|
|
@@ -118,6 +117,12 @@
|
|
|
118
117
|
emits('remove-hard-disk', [props.hardDisksIndex[key], item])
|
|
119
118
|
"
|
|
120
119
|
@roll-back="emits('roll-back-hard-disk', props.hardDisksIndex[key])"
|
|
120
|
+
@send-data="
|
|
121
|
+
emits('send-data-new-hard-disk-method', [
|
|
122
|
+
$event,
|
|
123
|
+
props.hardDisksIndex[key],
|
|
124
|
+
])
|
|
125
|
+
"
|
|
121
126
|
@invalid="
|
|
122
127
|
emits('set-invalid-hard-disk', [
|
|
123
128
|
$event,
|
|
@@ -261,21 +266,30 @@
|
|
|
261
266
|
</div>
|
|
262
267
|
<template v-if="props.passthroughDevices || props.mediatedDevices">
|
|
263
268
|
<common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device
|
|
264
|
-
v-for="(item, key) in
|
|
265
|
-
v-model:address="item.address"
|
|
266
|
-
v-model:vendor_name="item.vendor_name"
|
|
267
|
-
v-model:class_name="item.class_name"
|
|
268
|
-
v-model:device_name="item.device_name"
|
|
269
|
-
v-model:mediated_device="item.mediated_device"
|
|
270
|
-
v-model:mediated_device_uuid="item.mediated_device_uuid"
|
|
269
|
+
v-for="(item, key) in props.pciDevices"
|
|
271
270
|
:key="props.pciDevicesIndex[key]"
|
|
272
271
|
:index="props.pciDevicesIndex[key]"
|
|
272
|
+
:pci-device="item"
|
|
273
|
+
:error-validation-fields="props.errorValidationFields"
|
|
273
274
|
:passthrough-devices="props.passthroughDevices"
|
|
274
275
|
:mediated-devices="props.mediatedDevices"
|
|
275
276
|
:type="props.pciDevicesType[key]"
|
|
276
277
|
:is-edit="props.isEdit"
|
|
277
278
|
:state="props.state"
|
|
278
279
|
@remove="emits('remove-pci-device', props.pciDevicesIndex[key])"
|
|
280
|
+
@send-data="
|
|
281
|
+
emits('send-data-pci-devices-method', [
|
|
282
|
+
$event,
|
|
283
|
+
props.pciDevicesIndex[key],
|
|
284
|
+
])
|
|
285
|
+
"
|
|
286
|
+
@invalid="
|
|
287
|
+
emits('set-invalid-pci-device', [
|
|
288
|
+
$event,
|
|
289
|
+
props.pciDevicesIndex[key],
|
|
290
|
+
])
|
|
291
|
+
"
|
|
292
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
279
293
|
/>
|
|
280
294
|
</template>
|
|
281
295
|
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card
|
|
@@ -360,7 +374,6 @@ const props = withDefaults(
|
|
|
360
374
|
files: UI_I_FileTreeNode[]
|
|
361
375
|
isEdit: boolean
|
|
362
376
|
storage: UI_I_DatastoreTableItem | null
|
|
363
|
-
storageFree: number
|
|
364
377
|
project: UI_T_Project
|
|
365
378
|
maxMemory: number
|
|
366
379
|
cpuModels: UI_I_OptionItem[]
|
|
@@ -384,6 +397,7 @@ const props = withDefaults(
|
|
|
384
397
|
state?: string | number
|
|
385
398
|
// hardDisks?: UI_I_SendDataNewHardDisk[] | null
|
|
386
399
|
videoCard?: UI_I_SendDataVideoCard
|
|
400
|
+
pciDevices?: UI_I_SendDataNewPciDevice[]
|
|
387
401
|
// cdDvdDrives?: UI_I_SendDataNewCdDvdDrive[] | null
|
|
388
402
|
guestMachineType?: UI_I_OptionItem | null
|
|
389
403
|
passthroughDevices?: UI_I_PciDevice[]
|
|
@@ -396,6 +410,7 @@ const props = withDefaults(
|
|
|
396
410
|
cpu: undefined,
|
|
397
411
|
state: undefined,
|
|
398
412
|
videoCard: undefined,
|
|
413
|
+
pciDevices: undefined,
|
|
399
414
|
guestMachineType: undefined,
|
|
400
415
|
passthroughDevices: undefined,
|
|
401
416
|
mediatedDevices: undefined,
|
|
@@ -424,7 +439,16 @@ const emits = defineEmits<{
|
|
|
424
439
|
(event: 'set-invalid-hard-disk', value: [boolean, number]): void
|
|
425
440
|
(event: 'remove-error-by-title', value: string): void
|
|
426
441
|
(event: 'roll-back-cd-dvd-drive', value: number): void
|
|
442
|
+
(event: 'set-invalid-pci-device', value: [boolean, number]): void
|
|
427
443
|
(event: 'get-active-device-child', value: UI_I_FileTreeNode): void
|
|
444
|
+
(
|
|
445
|
+
event: 'send-data-pci-devices-method',
|
|
446
|
+
value: [UI_I_SendDataNewPciDevice, number]
|
|
447
|
+
): void
|
|
448
|
+
(
|
|
449
|
+
event: 'send-data-new-hard-disk-method',
|
|
450
|
+
value: [UI_I_SendDataNewHardDisk, number]
|
|
451
|
+
): void
|
|
428
452
|
(
|
|
429
453
|
event: 'send-data-new-cd-dvd-drive-method',
|
|
430
454
|
value: [UI_I_SendDataNewCdDvdDrive, number]
|
|
@@ -449,7 +473,7 @@ const deviceCount = computed<number>(
|
|
|
449
473
|
// (props.pciDevices?.length || 0) +
|
|
450
474
|
(model.value.disk_devices?.length || 0) +
|
|
451
475
|
(model.value.network_devices?.length || 0) +
|
|
452
|
-
(
|
|
476
|
+
(props.pciDevices?.length || 0) +
|
|
453
477
|
6
|
|
454
478
|
)
|
|
455
479
|
const deviceCountText = computed<string>(() =>
|
|
@@ -85,7 +85,6 @@
|
|
|
85
85
|
:index="props.hardDisksIndex[key]"
|
|
86
86
|
:type="props.hardDisksType[key]"
|
|
87
87
|
:main-storage="props.storage"
|
|
88
|
-
:main-storage-free="props.storageFree"
|
|
89
88
|
:error-validation-fields="props.errorValidationFields"
|
|
90
89
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
91
90
|
:datastore="props.datastore"
|
|
@@ -98,6 +97,12 @@
|
|
|
98
97
|
emits('remove-hard-disk', [props.hardDisksIndex[key], item])
|
|
99
98
|
"
|
|
100
99
|
@roll-back="emits('roll-back-hard-disk', props.hardDisksIndex[key])"
|
|
100
|
+
@send-data="
|
|
101
|
+
emits('send-data-new-hard-disk-method', [
|
|
102
|
+
$event,
|
|
103
|
+
props.hardDisksIndex[key],
|
|
104
|
+
])
|
|
105
|
+
"
|
|
101
106
|
@invalid="
|
|
102
107
|
emits('set-invalid-hard-disk', [
|
|
103
108
|
$event,
|
|
@@ -241,21 +246,30 @@
|
|
|
241
246
|
</div>
|
|
242
247
|
<template v-if="props.passthroughDevices || props.mediatedDevices">
|
|
243
248
|
<common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device
|
|
244
|
-
v-for="(item, key) in
|
|
245
|
-
v-model:address="item.address"
|
|
246
|
-
v-model:vendor-name="item.vendor_name"
|
|
247
|
-
v-model:class-name="item.class_name"
|
|
248
|
-
v-model:device-name="item.device_name"
|
|
249
|
-
v-model:mediated-device="item.mediated_device"
|
|
250
|
-
v-model:mediated-device-uuid="item.mediated_device_uuid"
|
|
249
|
+
v-for="(item, key) in props.pciDevices"
|
|
251
250
|
:key="props.pciDevicesIndex[key]"
|
|
252
251
|
:index="props.pciDevicesIndex[key]"
|
|
252
|
+
:pci-device="item"
|
|
253
|
+
:error-validation-fields="props.errorValidationFields"
|
|
253
254
|
:passthrough-devices="props.passthroughDevices"
|
|
254
255
|
:mediated-devices="props.mediatedDevices"
|
|
255
256
|
:type="props.pciDevicesType[key]"
|
|
256
257
|
:is-edit="props.isEdit"
|
|
257
258
|
:state="props.state"
|
|
258
259
|
@remove="emits('remove-pci-device', props.pciDevicesIndex[key])"
|
|
260
|
+
@send-data="
|
|
261
|
+
emits('send-data-pci-devices-method', [
|
|
262
|
+
$event,
|
|
263
|
+
props.pciDevicesIndex[key],
|
|
264
|
+
])
|
|
265
|
+
"
|
|
266
|
+
@invalid="
|
|
267
|
+
emits('set-invalid-pci-device', [
|
|
268
|
+
$event,
|
|
269
|
+
props.pciDevicesIndex[key],
|
|
270
|
+
])
|
|
271
|
+
"
|
|
272
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
259
273
|
/>
|
|
260
274
|
</template>
|
|
261
275
|
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card
|
|
@@ -304,10 +318,8 @@ import type {
|
|
|
304
318
|
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
305
319
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
306
320
|
import type {
|
|
307
|
-
UI_T_CdDvdType,
|
|
308
321
|
UI_T_HardDiskType,
|
|
309
322
|
UI_T_NetworkType,
|
|
310
|
-
UI_T_PciDeviceType,
|
|
311
323
|
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
|
|
312
324
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
313
325
|
import type {
|
|
@@ -337,7 +349,6 @@ const props = withDefaults(
|
|
|
337
349
|
files: UI_I_FileTreeNode[]
|
|
338
350
|
isEdit: boolean
|
|
339
351
|
storage: UI_I_DatastoreTableItem | null
|
|
340
|
-
storageFree: number
|
|
341
352
|
project: UI_T_Project
|
|
342
353
|
maxMemory: number
|
|
343
354
|
cpuModels: UI_I_OptionItem[]
|
|
@@ -349,10 +360,10 @@ const props = withDefaults(
|
|
|
349
360
|
hardDisksType: UI_T_HardDiskType[]
|
|
350
361
|
networksIndex: number[]
|
|
351
362
|
hardDisksIndex: number[]
|
|
352
|
-
pciDevicesType:
|
|
363
|
+
pciDevicesType: UI_T_NetworkType[]
|
|
353
364
|
isShowFileModal: boolean
|
|
354
365
|
pciDevicesIndex: number[]
|
|
355
|
-
cdDvdDrivesType:
|
|
366
|
+
cdDvdDrivesType: UI_T_NetworkType[]
|
|
356
367
|
cdDvdDrivesIndex: number[]
|
|
357
368
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
358
369
|
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
@@ -360,6 +371,7 @@ const props = withDefaults(
|
|
|
360
371
|
cpu?: API_UI_I_VmEditCpu
|
|
361
372
|
state?: string | number
|
|
362
373
|
videoCard?: UI_I_SendDataVideoCard
|
|
374
|
+
pciDevices?: UI_I_SendDataNewPciDevice[]
|
|
363
375
|
guestMachineType?: UI_I_OptionItem | null
|
|
364
376
|
passthroughDevices?: UI_I_PciDevice[]
|
|
365
377
|
mediatedDevices?: UI_I_MediatedDevice[]
|
|
@@ -370,9 +382,10 @@ const props = withDefaults(
|
|
|
370
382
|
cpu: undefined,
|
|
371
383
|
state: undefined,
|
|
372
384
|
videoCard: undefined,
|
|
385
|
+
pciDevices: undefined,
|
|
373
386
|
guestMachineType: undefined,
|
|
374
|
-
passthroughDevices:
|
|
375
|
-
mediatedDevices:
|
|
387
|
+
passthroughDevices: undefined,
|
|
388
|
+
mediatedDevices: undefined,
|
|
376
389
|
vmCpuHelpTextSecond: undefined,
|
|
377
390
|
computeResource: undefined,
|
|
378
391
|
}
|
|
@@ -397,7 +410,16 @@ const emits = defineEmits<{
|
|
|
397
410
|
(event: 'set-invalid-hard-disk', value: [boolean, number]): void
|
|
398
411
|
(event: 'remove-error-by-title', value: string): void
|
|
399
412
|
(event: 'roll-back-cd-dvd-drive', value: number): void
|
|
413
|
+
(event: 'set-invalid-pci-device', value: [boolean, number]): void
|
|
400
414
|
(event: 'get-active-device-child', value: UI_I_FileTreeNode): void
|
|
415
|
+
(
|
|
416
|
+
event: 'send-data-pci-devices-method',
|
|
417
|
+
value: [UI_I_SendDataNewPciDevice, number]
|
|
418
|
+
): void
|
|
419
|
+
(
|
|
420
|
+
event: 'send-data-new-hard-disk-method',
|
|
421
|
+
value: [UI_I_SendDataNewHardDisk, number]
|
|
422
|
+
): void
|
|
401
423
|
(
|
|
402
424
|
event: 'send-data-new-cd-dvd-drive-method',
|
|
403
425
|
value: [UI_I_SendDataNewCdDvdDrive, number]
|
package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue
CHANGED
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
:files="props.files"
|
|
10
10
|
:is-edit="props.isEdit"
|
|
11
11
|
:storage="props.storage"
|
|
12
|
-
:storage-free="storageFree"
|
|
13
12
|
:project="props.project"
|
|
14
13
|
:max-memory="props.maxMemory"
|
|
15
14
|
:cpu-models="props.cpuModels"
|
|
@@ -30,6 +29,7 @@
|
|
|
30
29
|
:get-datastore-table-func="getDatastoreTableFunc"
|
|
31
30
|
:state="state"
|
|
32
31
|
:video-card="videoCard"
|
|
32
|
+
:pci-devices="pciDevicesLocal"
|
|
33
33
|
:guest-machine-type="guestMachineType"
|
|
34
34
|
:passthrough-devices="passthroughDevices"
|
|
35
35
|
:mediated-devices="mediatedDevices"
|
|
@@ -53,7 +53,9 @@
|
|
|
53
53
|
@set-invalid-hard-disk="onSetInvalidHardDisk(...$event)"
|
|
54
54
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
55
55
|
@roll-back-cd-dvd-drive="onRollBackCdDvdDrive"
|
|
56
|
+
@set-invalid-pci-device="onSetInvalidPciDevice(...$event)"
|
|
56
57
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
58
|
+
@send-data-pci-devices-method="onSendDataPciDevicesMethod(...$event)"
|
|
57
59
|
@send-data-new-hard-disk-method="onSendDataNewHardDiskMethod(...$event)"
|
|
58
60
|
@send-data-new-cd-dvd-drive-method="sendDataNewCdDvdDriveMethod(...$event)"
|
|
59
61
|
/>
|
|
@@ -116,7 +118,7 @@ const props = withDefaults(
|
|
|
116
118
|
hardDisks?: UI_I_SendDataNewHardDisk[] | null
|
|
117
119
|
cdDvdDrives?: UI_I_SendDataNewCdDvdDrive[] | null
|
|
118
120
|
videoCard?: UI_I_SendDataVideoCard
|
|
119
|
-
|
|
121
|
+
pciDevices?: UI_I_SendDataNewPciDevice[]
|
|
120
122
|
passthroughDevices?: UI_I_PciDevice[]
|
|
121
123
|
mediatedDevices?: UI_I_MediatedDevice[]
|
|
122
124
|
guestMachineType?: UI_I_OptionItem | null
|
|
@@ -129,7 +131,7 @@ const props = withDefaults(
|
|
|
129
131
|
hardDisks: undefined,
|
|
130
132
|
cdDvdDrives: undefined,
|
|
131
133
|
videoCard: undefined,
|
|
132
|
-
|
|
134
|
+
pciDevices: undefined,
|
|
133
135
|
passthroughDevices: undefined,
|
|
134
136
|
mediatedDevices: undefined,
|
|
135
137
|
guestMachineType: undefined,
|
|
@@ -217,24 +219,6 @@ if (!model.value.disk_devices?.length) {
|
|
|
217
219
|
// { immediate: true }
|
|
218
220
|
// )
|
|
219
221
|
|
|
220
|
-
const getDisksSize = (): number => {
|
|
221
|
-
return (
|
|
222
|
-
model.value.disk_devices.reduce(
|
|
223
|
-
(acum, disk) => (acum += disk.size || 0),
|
|
224
|
-
0
|
|
225
|
-
) || 0
|
|
226
|
-
)
|
|
227
|
-
}
|
|
228
|
-
const initialDisksSize = getDisksSize()
|
|
229
|
-
const storageFree = computed<number>(() => {
|
|
230
|
-
if (!props.storage) return 0
|
|
231
|
-
const free = (props.storage.capacity.free_mb || props.storage.free) as number // TODO fix
|
|
232
|
-
|
|
233
|
-
const disksSize = getDisksSize()
|
|
234
|
-
|
|
235
|
-
return free + initialDisksSize - (disksSize - initialDisksSize)
|
|
236
|
-
})
|
|
237
|
-
|
|
238
222
|
const addHardDisk = (
|
|
239
223
|
create = true,
|
|
240
224
|
size = 92_160, // 90GB
|
|
@@ -517,46 +501,30 @@ const defaultPciDevice: UI_I_SendDataNewPciDevice = {
|
|
|
517
501
|
}
|
|
518
502
|
const pciDevicesIndex = ref<number[]>([0])
|
|
519
503
|
const pciDevicesType = ref<('new' | 'edit' | 'removed')[]>(['new'])
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
model.value.passthrough_pci_devices.forEach((_disk, _index, array) => {
|
|
526
|
-
if (!props.isEdit && !props.isClone) return
|
|
504
|
+
const pciDevicesLocal = ref<UI_I_SendDataNewPciDevice[]>([])
|
|
505
|
+
watch(
|
|
506
|
+
() => props.pciDevices,
|
|
507
|
+
(newValue) => {
|
|
508
|
+
if ((!props.isEdit && !props.isClone) || !newValue) return
|
|
527
509
|
|
|
528
|
-
const count =
|
|
510
|
+
const count = newValue?.length || 0
|
|
529
511
|
pciDevicesIndex.value = [...Array(count).keys()]
|
|
512
|
+
pciDevicesLocal.value = newValue || []
|
|
530
513
|
if (props.isEdit) {
|
|
531
514
|
pciDevicesType.value = Array(count).fill('edit')
|
|
532
515
|
} else if (props.isClone) {
|
|
533
|
-
pciDevicesType.value = Array(count).fill('
|
|
516
|
+
pciDevicesType.value = Array(count).fill('new')
|
|
534
517
|
}
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
// () => props.pciDevices,
|
|
539
|
-
// (newValue) => {
|
|
540
|
-
// if ((!props.isEdit && !props.isClone) || !newValue) return
|
|
541
|
-
//
|
|
542
|
-
// const count = newValue?.length || 0
|
|
543
|
-
// pciDevicesIndex.value = [...Array(count).keys()]
|
|
544
|
-
// pciDevicesLocal.value = newValue || []
|
|
545
|
-
// if (props.isEdit) {
|
|
546
|
-
// pciDevicesType.value = Array(count).fill('edit')
|
|
547
|
-
// } else if (props.isClone) {
|
|
548
|
-
// pciDevicesType.value = Array(count).fill('new')
|
|
549
|
-
// }
|
|
550
|
-
// },
|
|
551
|
-
// { immediate: true }
|
|
552
|
-
// )
|
|
518
|
+
},
|
|
519
|
+
{ immediate: true }
|
|
520
|
+
)
|
|
553
521
|
|
|
554
522
|
const addPciDevice = (): void => {
|
|
555
523
|
const newIndex = (pciDevicesIndex.value.at(-1) ?? -1) + 1
|
|
556
524
|
pciDevicesIndex.value.push(newIndex)
|
|
557
525
|
pciDevicesType.value.push('new')
|
|
558
526
|
|
|
559
|
-
|
|
527
|
+
pciDevicesLocal.value.push(useDeepCopy(defaultPciDevice))
|
|
560
528
|
model.value.passthrough_pci_devices.push(useDeepCopy(defaultPciDevice))
|
|
561
529
|
}
|
|
562
530
|
const onRemovePciDevice = (index: number): void => {
|
|
@@ -570,6 +538,13 @@ const onRemovePciDevice = (index: number): void => {
|
|
|
570
538
|
model.value.passthrough_pci_devices.filter((_pciDevice, key: number) => {
|
|
571
539
|
return removeIndex !== key
|
|
572
540
|
})
|
|
541
|
+
pciDevicesLocal.value = pciDevicesLocal.value.filter(
|
|
542
|
+
(_pciDevice, key: number) => {
|
|
543
|
+
return removeIndex !== key
|
|
544
|
+
}
|
|
545
|
+
)
|
|
546
|
+
|
|
547
|
+
delete newPciDeviceInvalidKeys.value[index]
|
|
573
548
|
}
|
|
574
549
|
|
|
575
550
|
const isShowFileModal = ref<boolean>(false)
|
|
@@ -616,6 +591,14 @@ const sendDataNewCdDvdDriveMethod = (
|
|
|
616
591
|
model.value.disk_devices[cdromIndexStart + index]?.boot_order || 0,
|
|
617
592
|
}
|
|
618
593
|
}
|
|
594
|
+
const onSendDataPciDevicesMethod = (
|
|
595
|
+
data: UI_I_SendDataNewPciDevice,
|
|
596
|
+
index: number
|
|
597
|
+
): void => {
|
|
598
|
+
model.value.passthrough_pci_devices[index] = {
|
|
599
|
+
...data,
|
|
600
|
+
}
|
|
601
|
+
}
|
|
619
602
|
|
|
620
603
|
const onSetInvalidHardDisk = (invalid: boolean, index: number): void => {
|
|
621
604
|
newHardDiskInvalidKeys.value[index] = invalid
|
|
@@ -625,10 +608,15 @@ const onSetInvalidNetwork = (invalid: boolean, key: number): void => {
|
|
|
625
608
|
newNetworkInvalidKeys.value[key] = invalid
|
|
626
609
|
}
|
|
627
610
|
|
|
611
|
+
const onSetInvalidPciDevice = (invalid: boolean, key: number): void => {
|
|
612
|
+
newPciDeviceInvalidKeys.value[key] = invalid
|
|
613
|
+
}
|
|
614
|
+
|
|
628
615
|
const memoryInvalid = ref<boolean>(false)
|
|
629
616
|
const videoCardInvalid = ref<boolean>(false)
|
|
630
617
|
const newHardDiskInvalidKeys = ref<UI_I_InvalidKeys>({})
|
|
631
618
|
const newNetworkInvalidKeys = ref<UI_I_InvalidKeys>({})
|
|
619
|
+
const newPciDeviceInvalidKeys = ref<UI_I_InvalidKeys>({})
|
|
632
620
|
|
|
633
621
|
watch(
|
|
634
622
|
[
|
|
@@ -636,6 +624,7 @@ watch(
|
|
|
636
624
|
memoryInvalid,
|
|
637
625
|
newHardDiskInvalidKeys,
|
|
638
626
|
newNetworkInvalidKeys,
|
|
627
|
+
newPciDeviceInvalidKeys,
|
|
639
628
|
videoCardInvalid,
|
|
640
629
|
],
|
|
641
630
|
() => {
|
|
@@ -668,6 +657,18 @@ watch(
|
|
|
668
657
|
' ' +
|
|
669
658
|
(+key + 1)
|
|
670
659
|
})
|
|
660
|
+
// let pciDevice = ''
|
|
661
|
+
// Object.keys(newPciDeviceInvalidKeys.value).forEach((key) => {
|
|
662
|
+
// if (!newPciDeviceInvalidKeys.value[+key]) {
|
|
663
|
+
// return
|
|
664
|
+
// }
|
|
665
|
+
//
|
|
666
|
+
// pciDevice +=
|
|
667
|
+
// (pciDevice ? ', ' : '') +
|
|
668
|
+
// localization.value.common.pciDevice +
|
|
669
|
+
// ' ' +
|
|
670
|
+
// (+key + 1)
|
|
671
|
+
// })
|
|
671
672
|
|
|
672
673
|
emits('invalid', [cpu, memory, newHardDisk, newNetwork, videoCard])
|
|
673
674
|
},
|
|
@@ -59,9 +59,9 @@ const socketOptions = computed<number[]>(() => {
|
|
|
59
59
|
watch(
|
|
60
60
|
socketOptions,
|
|
61
61
|
() => {
|
|
62
|
-
!socketOptions.value.includes(selectedCorePerSocketLocal.value) &&
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
// !socketOptions.value.includes(selectedCorePerSocketLocal.value) &&
|
|
63
|
+
!props.disabled &&
|
|
64
|
+
(selectedCorePerSocketLocal.value = socketOptions.value.at(-1) || 1)
|
|
65
65
|
},
|
|
66
66
|
{ deep: true }
|
|
67
67
|
)
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
export const sharesOptionsFunc = (
|
|
5
|
-
localization: UI_I_Localization,
|
|
6
|
-
maxShares: number
|
|
7
|
-
): UI_I_OptionItem[] => {
|
|
8
|
-
return [
|
|
9
|
-
{
|
|
10
|
-
text: `${localization.common.minimum} 2`,
|
|
11
|
-
value: 2,
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
text: `${localization.common.maximum} ${maxShares}`,
|
|
15
|
-
value: maxShares,
|
|
16
|
-
},
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
export const sharesTypeOptionsFunc = (
|
|
20
|
-
localization: UI_I_Localization
|
|
21
|
-
): UI_I_OptionItem[] => {
|
|
22
|
-
return [
|
|
23
|
-
{ text: localization.common.low, value: '1000' },
|
|
24
|
-
{ text: localization.common.normal, value: '2000' },
|
|
25
|
-
{ text: localization.common.high, value: '4000' },
|
|
26
|
-
{ text: localization.common.custom, value: '2' },
|
|
27
|
-
]
|
|
28
|
-
}
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
3
|
+
|
|
4
|
+
export const sharesOptionsFunc = (
|
|
5
|
+
localization: UI_I_Localization,
|
|
6
|
+
maxShares: number
|
|
7
|
+
): UI_I_OptionItem[] => {
|
|
8
|
+
return [
|
|
9
|
+
{
|
|
10
|
+
text: `${localization.common.minimum} 2`,
|
|
11
|
+
value: 2,
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
text: `${localization.common.maximum} ${maxShares}`,
|
|
15
|
+
value: maxShares,
|
|
16
|
+
},
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
export const sharesTypeOptionsFunc = (
|
|
20
|
+
localization: UI_I_Localization
|
|
21
|
+
): UI_I_OptionItem[] => {
|
|
22
|
+
return [
|
|
23
|
+
{ text: localization.common.low, value: '1000' },
|
|
24
|
+
{ text: localization.common.normal, value: '2000' },
|
|
25
|
+
{ text: localization.common.high, value: '4000' },
|
|
26
|
+
{ text: localization.common.custom, value: '2' },
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -105,11 +105,9 @@ export interface UI_I_SendDataNewCdDvdDrive {
|
|
|
105
105
|
}
|
|
106
106
|
export interface UI_I_SendDataNewPciDevice {
|
|
107
107
|
address: string
|
|
108
|
-
vendor_name: string
|
|
109
108
|
class_name: string
|
|
110
109
|
device_name: string
|
|
111
|
-
|
|
112
|
-
mediated_device_uuid?: string
|
|
110
|
+
vendor_name: string
|
|
113
111
|
}
|
|
114
112
|
|
|
115
113
|
export interface UI_I_HardDisk {
|