bfg-common 1.5.591 → 1.5.592
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CODE_STYLE.md +109 -109
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +170 -170
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/table/dataGrid/DataGrid.vue +1718 -1718
- package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
- package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
- package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/browse/blocks/lib/models/types.ts +1 -1
- package/components/common/browse/lib/models/interfaces.ts +5 -5
- package/components/common/diagramMain/network/Contents.vue +497 -497
- package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
- 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/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/readyToComplete/ReadyToComplete.vue +17 -17
- package/components/common/select/radio/RadioGroup.vue +137 -137
- package/components/common/spiceConsole/Drawer.vue +420 -420
- package/components/common/spiceConsole/SpiceConsole.vue +184 -184
- package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
- package/components/common/tools/Actions.vue +207 -207
- package/components/common/treeView/TreeView.vue +52 -52
- package/components/common/vm/actions/add/Add.vue +819 -886
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +205 -241
- package/components/common/vm/actions/common/customizeHardware/{CustomizeHardwareNew.vue → New.vue} +325 -325
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +679 -733
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/Bus.vue +101 -110
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +227 -252
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +29 -30
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +322 -348
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/coresPerSocket/CoresPerSocket.vue +81 -86
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/hotPlug/HotPlug.vue +40 -40
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/maxCpu/MaxCpu.vue +91 -94
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/model/Model.vue +92 -124
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +133 -140
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/tooltip/Tooltip.vue +27 -25
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +214 -221
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +280 -300
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/{MemoryNew.vue → New.vue} +158 -158
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/{MemoryOld.vue → Old.vue} +155 -155
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/hotPlug/HotPlug.vue +29 -29
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/{NewHardDiskNew.vue → New.vue} +0 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +483 -521
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/{NewHardDiskOld.vue → Old.vue} +1 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/cache/Cache.vue +59 -63
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/file/File.vue +24 -25
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/limitIops/LimitIops.vue +96 -103
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +142 -154
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/storageModal/StorageModal.vue +55 -61
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/maximumSize/MaximumSize.vue +26 -26
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/mode/Mode.vue +61 -65
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/provisioning/Provisioning.vue +57 -61
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/sharing/Sharing.vue +59 -63
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +257 -277
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/adapterType/AdapterType.vue +56 -60
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/Location.vue +65 -71
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +111 -119
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +199 -210
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIo.vue +27 -29
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +29 -31
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/Note.vue +23 -22
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGrid.vue +40 -41
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelection.vue +34 -35
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +47 -47
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +15 -16
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/inputDevices/InputDevices.vue +15 -15
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/Reservation.vue +194 -197
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +129 -140
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/Model.vue +35 -37
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +50 -53
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/totalVideoMemory/TotalVideoMemory.vue +104 -107
- package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +70 -76
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +42 -46
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +57 -60
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/menu/Menu.vue +25 -26
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +155 -156
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +82 -86
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +74 -74
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/copyPaste/CopyPaste.vue +25 -26
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/FileTransfer.vue +25 -26
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/folderSharing/FolderSharing.vue +17 -20
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +99 -102
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +42 -42
- package/components/common/vm/actions/common/select/compatibility/Compatibility.vue +105 -107
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- package/components/common/vm/actions/common/select/createType/CreateType.vue +36 -38
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/options/Options.vue +53 -54
- package/components/common/vm/actions/common/select/os/Os.vue +152 -164
- package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
- package/components/common/vm/actions/common/select/storage/Storage.vue +170 -178
- package/components/common/vm/actions/common/select/storage/new/New.vue +311 -311
- package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
- package/components/common/vm/actions/common/select/template/Template.vue +75 -77
- package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
- package/components/common/vm/actions/common/select/template/treeView/TreeView.vue +85 -87
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/vm/actions/register/Register.vue +352 -352
- package/components/common/vm/actions/register/lib/config/steps.ts +86 -86
- package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
- package/components/common/wizards/common/compatibility/New.vue +99 -99
- package/components/common/wizards/common/compatibility/Old.vue +53 -53
- package/components/common/wizards/common/steps/computeResource/ComputeResource.vue +86 -86
- package/components/common/wizards/common/steps/computeResource/New.vue +93 -93
- package/components/common/wizards/common/steps/name/Name.vue +178 -178
- package/components/common/wizards/common/steps/name/New.vue +221 -221
- package/components/common/wizards/common/steps/name/Old.vue +121 -121
- package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
- package/components/common/wizards/common/steps/name/location/Location.vue +85 -85
- package/components/common/wizards/common/steps/name/location/New.vue +40 -40
- package/components/common/wizards/datastore/add/Add.vue +228 -228
- package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
- package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
- package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +205 -205
- package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
- package/composables/useAppVersion.ts +21 -21
- package/composables/useLocal.ts +6 -6
- package/composables/useLocalCommon.ts +39 -39
- package/package.json +1 -1
- package/plugins/console.ts +21 -21
- package/plugins/date.ts +233 -233
- package/plugins/mouse.ts +21 -21
- package/plugins/panelStates.ts +70 -70
- package/plugins/text.ts +59 -59
- package/plugins/time.ts +58 -58
- package/public/spice-console/application/clientgui.js +854 -854
- package/public/spice-console/application/packetfactory.js +211 -211
- package/public/spice-console/application/virtualmouse.js +147 -147
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +440 -440
- package/public/spice-console/process/cursorprocess.js +121 -121
- package/public/spice-console/process/inputprocess.js +227 -227
- package/public/spice-console/process/mainprocess.js +210 -210
- package/public/spice-console/run.js +210 -210
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- /package/components/common/vm/actions/common/customizeHardware/{CustomizeHardwareOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/{VirtualHardwareNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/{VirtualHardwareOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/{BusNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/{BusOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/{CdDvdDriveNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/{CdDvdDriveOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/{MediaNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/{MediaOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/{CpuNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/{CpuOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/coresPerSocket/{CoresPerSocketNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/coresPerSocket/{CoresPerSocketOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/hotPlug/{HotPlugNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/hotPlug/{HotPlugOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/maxCpu/{MaxCpuNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/maxCpu/{MaxCpuOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/model/{ModelNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/model/{ModelOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/{SharesNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/{SharesOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/tooltip/{TooltipNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/tooltip/{TooltipOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/{LimitNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/{LimitOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/hotPlug/{HotPlugNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/hotPlug/{HotPlugOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/cache/{CacheNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/cache/{CacheOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/file/{FileNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/file/{FileOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/limitIops/{LimitIopsNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/limitIops/{LimitIopsOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/{LocationNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/{LocationOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/maximumSize/{MaximumSizeNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/maximumSize/{MaximumSizeOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/mode/{ModeNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/mode/{ModeOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/provisioning/{ProvisioningNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/provisioning/{ProvisioningOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/sharing/{SharingNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/sharing/{SharingOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/{NewNetworkNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/{NewNetworkOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/adapterType/{AdapterTypeNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/adapterType/{AdapterTypeOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/{LocationOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/{MacAddressNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/{MacAddressOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/{NewPciDeviceNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/{NewPciDeviceOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/{DirectPathIoNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/{DirectPathIoOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/{DynamicDirectPathIoNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/{DynamicDirectPathIoOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/{NoteNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/{NoteOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/{NvidiaGridNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/{NvidiaGridOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/{TypeSelectionNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/{TypeSelectionOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/{NewUsbControllerNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/{NewUsbControllerOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/{OtherNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/{OtherOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/inputDevices/{InputDevicesNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/inputDevices/{InputDevicesOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/{ReservationNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/{ReservationOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/{VideoCardNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/{VideoCardOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/{ModelNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/{ModelOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/{NumberDisplaysNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/{NumberDisplaysOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/totalVideoMemory/{TotalVideoMemoryNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/totalVideoMemory/{TotalVideoMemoryOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/{VmoptionsNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/{VmoptionsOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/{BootOptionsNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/{BootOptionsOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/{DelayNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/{DelayOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/{FirmwareNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/{FirmwareOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/menu/{MenuNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/menu/{MenuOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/{OrderNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/{OrderOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/{GeneralOptionsNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/{GeneralOptionsOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/copyPaste/{CopyPasteNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/copyPaste/{CopyPasteOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/{FileTransferNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/{FileTransferOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/folderSharing/{FolderSharingNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/folderSharing/{FolderSharingOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/{UsbRedirectionNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/{UsbRedirectionOld.vue → Old.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/{ToolsNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/{ToolsOld.vue → Old.vue} +0 -0
package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue
CHANGED
|
@@ -1,733 +1,679 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
v-model="model"
|
|
5
|
-
v-model:cpu-invalid="cpuInvalid"
|
|
6
|
-
v-model:memory-invalid="memoryInvalid"
|
|
7
|
-
v-model:video-card-invalid="videoCardInvalid"
|
|
8
|
-
:nodes="props.nodes"
|
|
9
|
-
:files="props.files"
|
|
10
|
-
:is-edit="props.isEdit"
|
|
11
|
-
:storage="props.storage"
|
|
12
|
-
:project="props.project"
|
|
13
|
-
:max-memory="props.maxMemory"
|
|
14
|
-
:cpu-models="props.cpuModels"
|
|
15
|
-
:datastore="props.datastore"
|
|
16
|
-
:is-datastore-loading="props.isDatastoreLoading"
|
|
17
|
-
:networks-type="networksType"
|
|
18
|
-
:networks-table="props.networksTable"
|
|
19
|
-
:dropdown-items="dropdownItems"
|
|
20
|
-
:hard-disks-type="hardDisksType"
|
|
21
|
-
:networks-index="networksIndex"
|
|
22
|
-
:hard-disks-index="hardDisksIndex"
|
|
23
|
-
:pci-devices-type="pciDevicesType"
|
|
24
|
-
:is-show-file-modal="isShowFileModal"
|
|
25
|
-
:pci-devices-index="pciDevicesIndex"
|
|
26
|
-
:cd-dvd-drives-type="cdDvdDrivesType"
|
|
27
|
-
:cd-dvd-drives-index="cdDvdDrivesIndex"
|
|
28
|
-
:error-validation-fields="errorValidationFields"
|
|
29
|
-
:get-datastore-table-func="getDatastoreTableFunc"
|
|
30
|
-
:state="state"
|
|
31
|
-
:video-card="videoCard"
|
|
32
|
-
:pci-devices="pciDevicesLocal"
|
|
33
|
-
:guest-machine-type="guestMachineType"
|
|
34
|
-
:passthrough-devices="passthroughDevices"
|
|
35
|
-
:mediated-devices="mediatedDevices"
|
|
36
|
-
:vm-cpu-help-text-second="vmCpuHelpTextSecond"
|
|
37
|
-
:compute-resource="props.computeResource"
|
|
38
|
-
:compatibility-info="props.compatibilityInfo"
|
|
39
|
-
:network-value-prop="networkValueProp"
|
|
40
|
-
@add-device="onAddDevice"
|
|
41
|
-
@get-storage="emits('get-storage', $event)"
|
|
42
|
-
@remove-network="onRemoveNetwork"
|
|
43
|
-
@hide-file-modal="isShowFileModal = false"
|
|
44
|
-
@remove-hard-disk="onRemoveHardDisk(...$event)"
|
|
45
|
-
@remove-pci-device="onRemovePciDevice"
|
|
46
|
-
@get-networks-table="emits('get-networks-table', $event)"
|
|
47
|
-
@add-exist-hard-disk="onAddExistHardDisk"
|
|
48
|
-
@roll-back-hard-disk="onRollBackHardDisk"
|
|
49
|
-
@set-invalid-network="onSetInvalidNetwork(...$event)"
|
|
50
|
-
@remove-cd-dvd-drive="onRemoveCdDvdDrive(...$event)"
|
|
51
|
-
@show-datastore-child="emits('show-datastore-child', $event)"
|
|
52
|
-
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
53
|
-
@set-invalid-hard-disk="onSetInvalidHardDisk(...$event)"
|
|
54
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
55
|
-
@roll-back-cd-dvd-drive="onRollBackCdDvdDrive"
|
|
56
|
-
@set-invalid-pci-device="onSetInvalidPciDevice(...$event)"
|
|
57
|
-
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
58
|
-
@send-data-pci-devices-method="onSendDataPciDevicesMethod(...$event)"
|
|
59
|
-
@send-data-new-hard-disk-method="onSendDataNewHardDiskMethod(...$event)"
|
|
60
|
-
@send-data-new-cd-dvd-drive-method="sendDataNewCdDvdDriveMethod(...$event)"
|
|
61
|
-
/>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
//
|
|
266
|
-
//
|
|
267
|
-
//
|
|
268
|
-
//
|
|
269
|
-
//
|
|
270
|
-
//
|
|
271
|
-
//
|
|
272
|
-
//
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
)
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
)
|
|
355
|
-
|
|
356
|
-
model.value.
|
|
357
|
-
(
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
//
|
|
428
|
-
//
|
|
429
|
-
//
|
|
430
|
-
//
|
|
431
|
-
//
|
|
432
|
-
//
|
|
433
|
-
//
|
|
434
|
-
//
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
//
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
cdDvdDrivesIndex.value
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
.
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
//
|
|
483
|
-
//
|
|
484
|
-
//
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
)
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
const
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
const
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
)
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
videoCardInvalid,
|
|
681
|
-
],
|
|
682
|
-
() => {
|
|
683
|
-
const cpu = cpuInvalid.value ? localization.value.common.cpu : ''
|
|
684
|
-
const memory = memoryInvalid.value ? localization.value.common.memory : ''
|
|
685
|
-
const videoCard = videoCardInvalid.value
|
|
686
|
-
? localization.value.common.videoCard
|
|
687
|
-
: ''
|
|
688
|
-
let newHardDisk = ''
|
|
689
|
-
Object.keys(newHardDiskInvalidKeys.value).forEach((key) => {
|
|
690
|
-
if (!newHardDiskInvalidKeys.value[+key]) {
|
|
691
|
-
return
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
newHardDisk +=
|
|
695
|
-
(newHardDisk ? ', ' : '') +
|
|
696
|
-
localization.value.common.newHardDisk +
|
|
697
|
-
' ' +
|
|
698
|
-
(+key + 1)
|
|
699
|
-
})
|
|
700
|
-
let newNetwork = ''
|
|
701
|
-
Object.keys(newNetworkInvalidKeys.value).forEach((key) => {
|
|
702
|
-
if (!newNetworkInvalidKeys.value[+key]) {
|
|
703
|
-
return
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
newNetwork +=
|
|
707
|
-
(newNetwork ? ', ' : '') +
|
|
708
|
-
localization.value.common.newNetwork +
|
|
709
|
-
' ' +
|
|
710
|
-
(+key + 1)
|
|
711
|
-
})
|
|
712
|
-
// let pciDevice = ''
|
|
713
|
-
// Object.keys(newPciDeviceInvalidKeys.value).forEach((key) => {
|
|
714
|
-
// if (!newPciDeviceInvalidKeys.value[+key]) {
|
|
715
|
-
// return
|
|
716
|
-
// }
|
|
717
|
-
//
|
|
718
|
-
// pciDevice +=
|
|
719
|
-
// (pciDevice ? ', ' : '') +
|
|
720
|
-
// localization.value.common.pciDevice +
|
|
721
|
-
// ' ' +
|
|
722
|
-
// (+key + 1)
|
|
723
|
-
// })
|
|
724
|
-
|
|
725
|
-
emits('invalid', [cpu, memory, newHardDisk, newNetwork, videoCard])
|
|
726
|
-
},
|
|
727
|
-
{ deep: true }
|
|
728
|
-
)
|
|
729
|
-
|
|
730
|
-
emits('get-pci-devices')
|
|
731
|
-
</script>
|
|
732
|
-
|
|
733
|
-
<style scoped lang="scss"></style>
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
4
|
+
v-model="model"
|
|
5
|
+
v-model:cpu-invalid="cpuInvalid"
|
|
6
|
+
v-model:memory-invalid="memoryInvalid"
|
|
7
|
+
v-model:video-card-invalid="videoCardInvalid"
|
|
8
|
+
:nodes="props.nodes"
|
|
9
|
+
:files="props.files"
|
|
10
|
+
:is-edit="props.isEdit"
|
|
11
|
+
:storage="props.storage"
|
|
12
|
+
:project="props.project"
|
|
13
|
+
:max-memory="props.maxMemory"
|
|
14
|
+
:cpu-models="props.cpuModels"
|
|
15
|
+
:datastore="props.datastore"
|
|
16
|
+
:is-datastore-loading="props.isDatastoreLoading"
|
|
17
|
+
:networks-type="networksType"
|
|
18
|
+
:networks-table="props.networksTable"
|
|
19
|
+
:dropdown-items="dropdownItems"
|
|
20
|
+
:hard-disks-type="hardDisksType"
|
|
21
|
+
:networks-index="networksIndex"
|
|
22
|
+
:hard-disks-index="hardDisksIndex"
|
|
23
|
+
:pci-devices-type="pciDevicesType"
|
|
24
|
+
:is-show-file-modal="isShowFileModal"
|
|
25
|
+
:pci-devices-index="pciDevicesIndex"
|
|
26
|
+
:cd-dvd-drives-type="cdDvdDrivesType"
|
|
27
|
+
:cd-dvd-drives-index="cdDvdDrivesIndex"
|
|
28
|
+
:error-validation-fields="errorValidationFields"
|
|
29
|
+
:get-datastore-table-func="getDatastoreTableFunc"
|
|
30
|
+
:state="state"
|
|
31
|
+
:video-card="videoCard"
|
|
32
|
+
:pci-devices="pciDevicesLocal"
|
|
33
|
+
:guest-machine-type="guestMachineType"
|
|
34
|
+
:passthrough-devices="passthroughDevices"
|
|
35
|
+
:mediated-devices="mediatedDevices"
|
|
36
|
+
:vm-cpu-help-text-second="vmCpuHelpTextSecond"
|
|
37
|
+
:compute-resource="props.computeResource"
|
|
38
|
+
:compatibility-info="props.compatibilityInfo"
|
|
39
|
+
:network-value-prop="networkValueProp"
|
|
40
|
+
@add-device="onAddDevice"
|
|
41
|
+
@get-storage="emits('get-storage', $event)"
|
|
42
|
+
@remove-network="onRemoveNetwork"
|
|
43
|
+
@hide-file-modal="isShowFileModal = false"
|
|
44
|
+
@remove-hard-disk="onRemoveHardDisk(...$event)"
|
|
45
|
+
@remove-pci-device="onRemovePciDevice"
|
|
46
|
+
@get-networks-table="emits('get-networks-table', $event)"
|
|
47
|
+
@add-exist-hard-disk="onAddExistHardDisk"
|
|
48
|
+
@roll-back-hard-disk="onRollBackHardDisk"
|
|
49
|
+
@set-invalid-network="onSetInvalidNetwork(...$event)"
|
|
50
|
+
@remove-cd-dvd-drive="onRemoveCdDvdDrive(...$event)"
|
|
51
|
+
@show-datastore-child="emits('show-datastore-child', $event)"
|
|
52
|
+
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
53
|
+
@set-invalid-hard-disk="onSetInvalidHardDisk(...$event)"
|
|
54
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
55
|
+
@roll-back-cd-dvd-drive="onRollBackCdDvdDrive"
|
|
56
|
+
@set-invalid-pci-device="onSetInvalidPciDevice(...$event)"
|
|
57
|
+
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
58
|
+
@send-data-pci-devices-method="onSendDataPciDevicesMethod(...$event)"
|
|
59
|
+
@send-data-new-hard-disk-method="onSendDataNewHardDiskMethod(...$event)"
|
|
60
|
+
@send-data-new-cd-dvd-drive-method="sendDataNewCdDvdDriveMethod(...$event)"
|
|
61
|
+
/>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<script setup lang="ts">
|
|
65
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
66
|
+
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
67
|
+
import type { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
|
|
68
|
+
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
69
|
+
import type { UI_I_FolderOrFileTreePayload } from '~/lib/models/store/storage/interfaces'
|
|
70
|
+
import type { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
|
|
71
|
+
import type {
|
|
72
|
+
UI_I_SendDataNewHardDisk,
|
|
73
|
+
UI_I_SendDataVideoCard,
|
|
74
|
+
UI_I_InvalidKeys,
|
|
75
|
+
UI_I_SendDataNewCdDvdDrive,
|
|
76
|
+
// UI_I_HardDisk,
|
|
77
|
+
UI_I_SendDataNewPciDevice,
|
|
78
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
79
|
+
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
80
|
+
import type {
|
|
81
|
+
UI_T_HardDiskType,
|
|
82
|
+
UI_T_NetworkType,
|
|
83
|
+
UI_T_CdDvdType,
|
|
84
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
|
|
85
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
86
|
+
import type {
|
|
87
|
+
UI_I_DropdownTreeItem,
|
|
88
|
+
UI_I_DropdownTreeItemChild,
|
|
89
|
+
} from '~/components/atoms/dropdown/tree/lib/models/interfaces'
|
|
90
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
91
|
+
import type {
|
|
92
|
+
UI_I_MediatedDevice,
|
|
93
|
+
UI_I_PciDevice,
|
|
94
|
+
} from '~/lib/models/store/vm/interfaces'
|
|
95
|
+
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
96
|
+
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
97
|
+
import { dropdownItemsFunc } from './lib/config/dropdownItems'
|
|
98
|
+
|
|
99
|
+
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
100
|
+
|
|
101
|
+
const props = withDefaults(
|
|
102
|
+
defineProps<{
|
|
103
|
+
storage: UI_I_DatastoreTableItem | null
|
|
104
|
+
cpuModels: UI_I_OptionItem[]
|
|
105
|
+
maxMemory: number
|
|
106
|
+
isEdit: boolean
|
|
107
|
+
isClone: boolean
|
|
108
|
+
errorValidationFields: UI_I_ErrorValidationField[]
|
|
109
|
+
nodes: UI_I_FileTreeNode[]
|
|
110
|
+
files: UI_I_FileTreeNode[]
|
|
111
|
+
networksTable: UI_I_NetworkTableItem[]
|
|
112
|
+
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
113
|
+
datastore: UI_I_DatastoreTableItem[]
|
|
114
|
+
isDatastoreLoading: boolean
|
|
115
|
+
project: UI_T_Project
|
|
116
|
+
state?: string | number
|
|
117
|
+
vmCpuHelpTextSecond?: string
|
|
118
|
+
hardDisks?: UI_I_SendDataNewHardDisk[] | null
|
|
119
|
+
cdDvdDrives?: UI_I_SendDataNewCdDvdDrive[] | null
|
|
120
|
+
videoCard?: UI_I_SendDataVideoCard
|
|
121
|
+
pciDevices?: UI_I_SendDataNewPciDevice[]
|
|
122
|
+
passthroughDevices?: UI_I_PciDevice[]
|
|
123
|
+
mediatedDevices?: UI_I_MediatedDevice[]
|
|
124
|
+
guestMachineType?: UI_I_OptionItem | null
|
|
125
|
+
computeResource?: UI_I_TreeNode | null
|
|
126
|
+
compatibilityInfo?: string
|
|
127
|
+
}>(),
|
|
128
|
+
{
|
|
129
|
+
state: undefined,
|
|
130
|
+
vmCpuHelpTextSecond: undefined,
|
|
131
|
+
hardDisks: undefined,
|
|
132
|
+
cdDvdDrives: undefined,
|
|
133
|
+
videoCard: undefined,
|
|
134
|
+
pciDevices: undefined,
|
|
135
|
+
passthroughDevices: undefined,
|
|
136
|
+
mediatedDevices: undefined,
|
|
137
|
+
guestMachineType: undefined,
|
|
138
|
+
computeResource: undefined,
|
|
139
|
+
compatibilityInfo: undefined,
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
const emits = defineEmits<{
|
|
143
|
+
(event: 'invalid', value: string[]): void
|
|
144
|
+
(event: 'get-storage', value: UI_I_TablePayload): void
|
|
145
|
+
(event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
|
|
146
|
+
(event: 'get-active-device-child', value: UI_I_FileTreeNode): void
|
|
147
|
+
(event: 'show-datastore-child', value: UI_I_FileTreeNode): void
|
|
148
|
+
(event: 'remove-error-by-title', value: string): void
|
|
149
|
+
(event: 'get-networks-table', value: UI_I_TablePayload): void
|
|
150
|
+
(event: 'get-pci-devices'): void
|
|
151
|
+
}>()
|
|
152
|
+
|
|
153
|
+
const { $store, $binary }: any = useNuxtApp()
|
|
154
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
155
|
+
const currentComponent = computed(() =>
|
|
156
|
+
isNewView.value
|
|
157
|
+
? defineAsyncComponent(() => import('./New.vue'))
|
|
158
|
+
: defineAsyncComponent(() => import('./Old.vue'))
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
162
|
+
|
|
163
|
+
const dropdownItems = computed<UI_I_DropdownTreeItem[]>(() =>
|
|
164
|
+
dropdownItemsFunc(
|
|
165
|
+
localization.value,
|
|
166
|
+
props.state,
|
|
167
|
+
props.passthroughDevices,
|
|
168
|
+
props.mediatedDevices
|
|
169
|
+
)
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
const hardDisksIndex = ref<number[]>([0])
|
|
173
|
+
const hardDisksType = ref<UI_T_HardDiskType[]>(['new'])
|
|
174
|
+
// const hardDisksLocal = ref<UI_I_SendDataNewHardDisk[]>([
|
|
175
|
+
// {
|
|
176
|
+
// create: true,
|
|
177
|
+
// size: 90,
|
|
178
|
+
// source: '',
|
|
179
|
+
// boot_order: -1,
|
|
180
|
+
// },
|
|
181
|
+
// ])
|
|
182
|
+
if (!model.value.disk_devices?.length) {
|
|
183
|
+
hardDisksType.value = []
|
|
184
|
+
hardDisksIndex.value = []
|
|
185
|
+
} else {
|
|
186
|
+
model.value.disk_devices
|
|
187
|
+
.filter((disk) => disk.device_type !== 'cdrom')
|
|
188
|
+
.forEach((_disk, _index, array) => {
|
|
189
|
+
if (!props.isEdit && !props.isClone) return
|
|
190
|
+
|
|
191
|
+
const count = array.length
|
|
192
|
+
hardDisksIndex.value = [...Array(count).keys()]
|
|
193
|
+
if (props.isEdit) {
|
|
194
|
+
hardDisksType.value = Array(count).fill('edit')
|
|
195
|
+
} else if (props.isClone) {
|
|
196
|
+
hardDisksType.value = Array(count).fill('clone')
|
|
197
|
+
}
|
|
198
|
+
})
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// watch(
|
|
202
|
+
// () => props.hardDisks,
|
|
203
|
+
// (newValue) => {
|
|
204
|
+
// if ((!props.isEdit && !props.isClone) || !newValue) return
|
|
205
|
+
//
|
|
206
|
+
// const count = newValue?.length || 0
|
|
207
|
+
// hardDisksIndex.value = [...Array(count).keys()]
|
|
208
|
+
// hardDisksLocal.value = newValue
|
|
209
|
+
// if (props.isEdit) {
|
|
210
|
+
// hardDisksType.value = Array(count).fill('edit')
|
|
211
|
+
// } else if (props.isClone) {
|
|
212
|
+
// hardDisksType.value = Array(count).fill('clone')
|
|
213
|
+
// hardDisksLocal.value = newValue.map((hardDisk) => {
|
|
214
|
+
// hardDisk.create = true
|
|
215
|
+
// return hardDisk
|
|
216
|
+
// })
|
|
217
|
+
// }
|
|
218
|
+
// },
|
|
219
|
+
// { immediate: true }
|
|
220
|
+
// )
|
|
221
|
+
|
|
222
|
+
const addHardDisk = (
|
|
223
|
+
create = true,
|
|
224
|
+
size = 92_160, // 90GB
|
|
225
|
+
source = '',
|
|
226
|
+
type: UI_T_HardDiskType = 'new',
|
|
227
|
+
provisioned_type?: number // При добавлении существующей
|
|
228
|
+
): void => {
|
|
229
|
+
const newIndex = (hardDisksIndex.value.at(-1) ?? -1) + 1
|
|
230
|
+
hardDisksIndex.value.push(newIndex)
|
|
231
|
+
hardDisksType.value.push(type)
|
|
232
|
+
|
|
233
|
+
let provisionType = 'thick'
|
|
234
|
+
if (provisioned_type === 1) provisionType = 'thin'
|
|
235
|
+
|
|
236
|
+
model.value.disk_devices = [
|
|
237
|
+
...model.value.disk_devices.filter((disk) => disk.device_type !== 'cdrom'),
|
|
238
|
+
// {
|
|
239
|
+
// create,
|
|
240
|
+
// size,
|
|
241
|
+
// source,
|
|
242
|
+
// attach: true,
|
|
243
|
+
// boot_order: 0, // Убираем галочку
|
|
244
|
+
// provision_type: provisionType,
|
|
245
|
+
// },
|
|
246
|
+
{
|
|
247
|
+
create,
|
|
248
|
+
size,
|
|
249
|
+
source,
|
|
250
|
+
bus: 'virtio',
|
|
251
|
+
storage_id: '',
|
|
252
|
+
provision_type: 'thick',
|
|
253
|
+
disk_mode: 'dependent',
|
|
254
|
+
boot_order: 0, // Убираем галочку
|
|
255
|
+
device_type: 'disk',
|
|
256
|
+
sharing: false,
|
|
257
|
+
shares: 0,
|
|
258
|
+
cache: 'none',
|
|
259
|
+
io: '',
|
|
260
|
+
limit_iops: 0,
|
|
261
|
+
attach: true,
|
|
262
|
+
},
|
|
263
|
+
...model.value.disk_devices.filter((disk) => disk.device_type === 'cdrom'),
|
|
264
|
+
]
|
|
265
|
+
// hardDisksLocal.value.push({
|
|
266
|
+
// create,
|
|
267
|
+
// size,
|
|
268
|
+
// source,
|
|
269
|
+
// attach: true,
|
|
270
|
+
// boot_order: 0, // Убираем галочку
|
|
271
|
+
// provision_type: provisionType,
|
|
272
|
+
// })
|
|
273
|
+
}
|
|
274
|
+
const onAddExistHardDisk = (file: UI_I_FileTreeNode): void => {
|
|
275
|
+
addHardDisk(
|
|
276
|
+
false,
|
|
277
|
+
$binary.bToGb(file.size),
|
|
278
|
+
file.path,
|
|
279
|
+
'exist',
|
|
280
|
+
file.provisioned_type
|
|
281
|
+
)
|
|
282
|
+
}
|
|
283
|
+
const onRemoveHardDisk = (
|
|
284
|
+
index: number,
|
|
285
|
+
hardDisk: UI_I_SendDataNewHardDisk
|
|
286
|
+
): void => {
|
|
287
|
+
const removeIndex = hardDisksIndex.value.indexOf(index)
|
|
288
|
+
|
|
289
|
+
if (!hardDisk.create && !hardDisk.attach) {
|
|
290
|
+
hardDisksType.value = hardDisksType.value.map((item, key) => {
|
|
291
|
+
if (key === removeIndex) return 'removed'
|
|
292
|
+
return item
|
|
293
|
+
})
|
|
294
|
+
return
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
hardDisksIndex.value = hardDisksIndex.value.filter((item) => item !== index)
|
|
298
|
+
hardDisksType.value = hardDisksType.value.filter(
|
|
299
|
+
(_item, key) => key !== removeIndex
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
model.value.disk_devices = model.value.disk_devices.filter(
|
|
303
|
+
(_hardDisk, key: number) => {
|
|
304
|
+
return removeIndex !== key
|
|
305
|
+
}
|
|
306
|
+
)
|
|
307
|
+
// hardDisksLocal.value = hardDisksLocal.value.filter(
|
|
308
|
+
// (_hardDisk, key: number) => {
|
|
309
|
+
// return removeIndex !== key
|
|
310
|
+
// }
|
|
311
|
+
// )
|
|
312
|
+
|
|
313
|
+
delete newHardDiskInvalidKeys.value[index]
|
|
314
|
+
}
|
|
315
|
+
const onRollBackHardDisk = (index: number): void => {
|
|
316
|
+
const removeIndex = hardDisksIndex.value.indexOf(index)
|
|
317
|
+
hardDisksType.value = hardDisksType.value.map((item, key) => {
|
|
318
|
+
if (key === removeIndex) return 'edit'
|
|
319
|
+
return item
|
|
320
|
+
})
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const networkValueProp = props.project === 'sphere' ? 'network' : 'net_bridge'
|
|
324
|
+
const networksType = ref<UI_T_NetworkType[]>(['new'])
|
|
325
|
+
const networksIndex = ref<number[]>([0])
|
|
326
|
+
if (!model.value.network_devices?.length) {
|
|
327
|
+
networksType.value = []
|
|
328
|
+
networksIndex.value = []
|
|
329
|
+
} else {
|
|
330
|
+
model.value.network_devices.forEach(() => {
|
|
331
|
+
if (!props.isEdit && !props.isClone) return
|
|
332
|
+
|
|
333
|
+
const count = model.value.network_devices.length || 0
|
|
334
|
+
networksIndex.value = [...Array(count).keys()]
|
|
335
|
+
if (props.isEdit) {
|
|
336
|
+
networksType.value = Array(count).fill('edit')
|
|
337
|
+
} else if (props.isClone) {
|
|
338
|
+
networksType.value = Array(count).fill('clone')
|
|
339
|
+
}
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const defaultNetwork = {
|
|
344
|
+
network: '',
|
|
345
|
+
net_bridge: '',
|
|
346
|
+
mac: '',
|
|
347
|
+
target: '',
|
|
348
|
+
model: 'virtio',
|
|
349
|
+
boot_order: 0,
|
|
350
|
+
}
|
|
351
|
+
const addNetwork = (): void => {
|
|
352
|
+
const index = (networksIndex.value.at(-1) ?? -1) + 1
|
|
353
|
+
networksIndex.value.push(index)
|
|
354
|
+
networksType.value.push('new')
|
|
355
|
+
|
|
356
|
+
model.value.network_devices.push({
|
|
357
|
+
...useDeepCopy(defaultNetwork),
|
|
358
|
+
})
|
|
359
|
+
}
|
|
360
|
+
const onRemoveNetwork = (index: number): void => {
|
|
361
|
+
const removeIndex = networksIndex.value.indexOf(index)
|
|
362
|
+
networksIndex.value = networksIndex.value.filter((item) => item !== index)
|
|
363
|
+
networksType.value = networksType.value.filter(
|
|
364
|
+
(_item, key) => key !== removeIndex
|
|
365
|
+
)
|
|
366
|
+
model.value.network_devices = model.value.network_devices.filter(
|
|
367
|
+
(_network, key: number) => removeIndex !== key
|
|
368
|
+
)
|
|
369
|
+
|
|
370
|
+
delete newNetworkInvalidKeys.value[index]
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// const defaultCdDvdDriver: UI_I_SendDataNewCdDvdDrive = {
|
|
374
|
+
// create: false,
|
|
375
|
+
// attach: false,
|
|
376
|
+
// source: '',
|
|
377
|
+
// bus: '',
|
|
378
|
+
// device_type: 'cdrom',
|
|
379
|
+
// boot_order: -1,
|
|
380
|
+
// }
|
|
381
|
+
const defaultCdDvdDriver: UI_I_SendDataNewCdDvdDrive = {
|
|
382
|
+
source: '',
|
|
383
|
+
storage_id: '',
|
|
384
|
+
device_type: 'cdrom',
|
|
385
|
+
bus: '',
|
|
386
|
+
target: '',
|
|
387
|
+
boot_order: 0,
|
|
388
|
+
provision_type: 'thick',
|
|
389
|
+
disk_mode: 'dependent',
|
|
390
|
+
sharing: false,
|
|
391
|
+
read_only: true,
|
|
392
|
+
shares: 0,
|
|
393
|
+
cache: 'none',
|
|
394
|
+
io: 'native',
|
|
395
|
+
limit_iops: 0,
|
|
396
|
+
discard: 'unmap',
|
|
397
|
+
attach: false,
|
|
398
|
+
detach: false,
|
|
399
|
+
remove: false,
|
|
400
|
+
create: false,
|
|
401
|
+
}
|
|
402
|
+
// const cdDvdDrivesLocal = ref<UI_I_SendDataNewCdDvdDrive[]>([
|
|
403
|
+
// useDeepCopy(defaultCdDvdDriver),
|
|
404
|
+
// ])
|
|
405
|
+
const cdDvdDrivesIndex = ref<number[]>([0])
|
|
406
|
+
const cdDvdDrivesType = ref<UI_T_CdDvdType[]>(['new'])
|
|
407
|
+
if (!model.value.disk_devices?.length) {
|
|
408
|
+
cdDvdDrivesIndex.value = []
|
|
409
|
+
cdDvdDrivesType.value = []
|
|
410
|
+
} else {
|
|
411
|
+
model.value.disk_devices
|
|
412
|
+
.filter((disk) => disk.device_type === 'cdrom')
|
|
413
|
+
.forEach((_disk, _index, array) => {
|
|
414
|
+
if (!props.isEdit && !props.isClone) return
|
|
415
|
+
|
|
416
|
+
const count = array.length
|
|
417
|
+
cdDvdDrivesIndex.value = [...Array(count).keys()]
|
|
418
|
+
if (props.isEdit) {
|
|
419
|
+
cdDvdDrivesType.value = Array(count).fill('edit')
|
|
420
|
+
} else if (props.isClone) {
|
|
421
|
+
cdDvdDrivesType.value = Array(count).fill('clone')
|
|
422
|
+
}
|
|
423
|
+
})
|
|
424
|
+
}
|
|
425
|
+
// watch(
|
|
426
|
+
// () => props.cdDvdDrives,
|
|
427
|
+
// (newValue) => {
|
|
428
|
+
// if ((!props.isEdit && !props.isClone) || !newValue) return
|
|
429
|
+
//
|
|
430
|
+
// // cdDvdDrivesLocal.value = newValue
|
|
431
|
+
// // cdDvdDrivesType.value = Array(newValue.length).fill('edit')
|
|
432
|
+
// const count = newValue?.length || 0
|
|
433
|
+
// cdDvdDrivesIndex.value = [...Array(count).keys()]
|
|
434
|
+
// cdDvdDrivesLocal.value = newValue
|
|
435
|
+
// if (props.isEdit) {
|
|
436
|
+
// cdDvdDrivesType.value = Array(count).fill('edit')
|
|
437
|
+
// } else if (props.isClone) {
|
|
438
|
+
// cdDvdDrivesType.value = Array(count).fill('new')
|
|
439
|
+
// }
|
|
440
|
+
// },
|
|
441
|
+
// { immediate: true }
|
|
442
|
+
// )
|
|
443
|
+
const addCdDvdDrive = (): void => {
|
|
444
|
+
const value = (cdDvdDrivesIndex.value.at(-1) ?? -1) + 1
|
|
445
|
+
cdDvdDrivesIndex.value.push(value)
|
|
446
|
+
cdDvdDrivesType.value.push('new')
|
|
447
|
+
model.value.disk_devices.push({
|
|
448
|
+
...useDeepCopy(defaultCdDvdDriver),
|
|
449
|
+
attach: true,
|
|
450
|
+
boot_order: 0, // Убираем галочку
|
|
451
|
+
})
|
|
452
|
+
// cdDvdDrivesLocal.value.push({
|
|
453
|
+
// ...useDeepCopy(defaultCdDvdDriver),
|
|
454
|
+
// attach: true,
|
|
455
|
+
// boot_order: 0, // Убираем галочку
|
|
456
|
+
// })
|
|
457
|
+
}
|
|
458
|
+
const onRemoveCdDvdDrive = (
|
|
459
|
+
index: number,
|
|
460
|
+
cdDvdDrive: UI_I_SendDataNewCdDvdDrive
|
|
461
|
+
): void => {
|
|
462
|
+
const removeIndex = cdDvdDrivesIndex.value.indexOf(index)
|
|
463
|
+
|
|
464
|
+
// if (!cdDvdDrive.create && !cdDvdDrive.attach) {
|
|
465
|
+
if (cdDvdDrivesType.value[index] === 'edit' && !cdDvdDrive.attach) {
|
|
466
|
+
cdDvdDrivesType.value = cdDvdDrivesType.value.map((item, key) => {
|
|
467
|
+
if (key === removeIndex) return 'removed'
|
|
468
|
+
return item
|
|
469
|
+
})
|
|
470
|
+
return
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
cdDvdDrivesIndex.value = cdDvdDrivesIndex.value.filter(
|
|
474
|
+
(cdDvdDrive) => cdDvdDrive !== index
|
|
475
|
+
)
|
|
476
|
+
cdDvdDrivesType.value = cdDvdDrivesType.value.filter(
|
|
477
|
+
(_item, key) => key !== index
|
|
478
|
+
)
|
|
479
|
+
model.value.disk_devices = model.value.disk_devices.filter(
|
|
480
|
+
(_cdDvdDrive, key: number) => removeIndex !== key
|
|
481
|
+
)
|
|
482
|
+
// cdDvdDrivesLocal.value = cdDvdDrivesLocal.value.filter(
|
|
483
|
+
// (_cdDvdDrive, key: number) => removeIndex !== key
|
|
484
|
+
// )
|
|
485
|
+
}
|
|
486
|
+
const onRollBackCdDvdDrive = (index: number): void => {
|
|
487
|
+
const removeIndex = cdDvdDrivesIndex.value.indexOf(index)
|
|
488
|
+
cdDvdDrivesType.value = cdDvdDrivesType.value.map((item, key) => {
|
|
489
|
+
if (key === removeIndex) return 'edit'
|
|
490
|
+
return item
|
|
491
|
+
})
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
const defaultPciDevice: UI_I_SendDataNewPciDevice = {
|
|
495
|
+
address: '',
|
|
496
|
+
vendor_name: '',
|
|
497
|
+
class_name: '',
|
|
498
|
+
device_name: '',
|
|
499
|
+
}
|
|
500
|
+
const pciDevicesIndex = ref<number[]>([0])
|
|
501
|
+
const pciDevicesType = ref<('new' | 'edit' | 'removed')[]>(['new'])
|
|
502
|
+
const pciDevicesLocal = ref<UI_I_SendDataNewPciDevice[]>([])
|
|
503
|
+
watch(
|
|
504
|
+
() => props.pciDevices,
|
|
505
|
+
(newValue) => {
|
|
506
|
+
if ((!props.isEdit && !props.isClone) || !newValue) return
|
|
507
|
+
|
|
508
|
+
const count = newValue?.length || 0
|
|
509
|
+
pciDevicesIndex.value = [...Array(count).keys()]
|
|
510
|
+
pciDevicesLocal.value = newValue || []
|
|
511
|
+
if (props.isEdit) {
|
|
512
|
+
pciDevicesType.value = Array(count).fill('edit')
|
|
513
|
+
} else if (props.isClone) {
|
|
514
|
+
pciDevicesType.value = Array(count).fill('new')
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
{ immediate: true }
|
|
518
|
+
)
|
|
519
|
+
|
|
520
|
+
const addPciDevice = (): void => {
|
|
521
|
+
const newIndex = (pciDevicesIndex.value.at(-1) ?? -1) + 1
|
|
522
|
+
pciDevicesIndex.value.push(newIndex)
|
|
523
|
+
pciDevicesType.value.push('new')
|
|
524
|
+
|
|
525
|
+
pciDevicesLocal.value.push(useDeepCopy(defaultPciDevice))
|
|
526
|
+
model.value.passthrough_pci_devices.push(useDeepCopy(defaultPciDevice))
|
|
527
|
+
}
|
|
528
|
+
const onRemovePciDevice = (index: number): void => {
|
|
529
|
+
const removeIndex = pciDevicesIndex.value.indexOf(index)
|
|
530
|
+
pciDevicesIndex.value = pciDevicesIndex.value.filter((item) => item !== index)
|
|
531
|
+
pciDevicesType.value = pciDevicesType.value.filter(
|
|
532
|
+
(_item, key) => key !== removeIndex
|
|
533
|
+
)
|
|
534
|
+
|
|
535
|
+
model.value.passthrough_pci_devices =
|
|
536
|
+
model.value.passthrough_pci_devices.filter((_pciDevice, key: number) => {
|
|
537
|
+
return removeIndex !== key
|
|
538
|
+
})
|
|
539
|
+
pciDevicesLocal.value = pciDevicesLocal.value.filter(
|
|
540
|
+
(_pciDevice, key: number) => {
|
|
541
|
+
return removeIndex !== key
|
|
542
|
+
}
|
|
543
|
+
)
|
|
544
|
+
|
|
545
|
+
delete newPciDeviceInvalidKeys.value[index]
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
const isShowFileModal = ref<boolean>(false)
|
|
549
|
+
const onAddDevice = (item: UI_I_DropdownTreeItemChild): void => {
|
|
550
|
+
switch (item.value) {
|
|
551
|
+
case 1:
|
|
552
|
+
addHardDisk()
|
|
553
|
+
break
|
|
554
|
+
case 2:
|
|
555
|
+
isShowFileModal.value = true
|
|
556
|
+
break
|
|
557
|
+
case 5:
|
|
558
|
+
addCdDvdDrive()
|
|
559
|
+
break
|
|
560
|
+
case 10:
|
|
561
|
+
addPciDevice()
|
|
562
|
+
break
|
|
563
|
+
case 14:
|
|
564
|
+
addNetwork()
|
|
565
|
+
break
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
const cpuInvalid = ref<boolean>(false)
|
|
570
|
+
const onSendDataNewHardDiskMethod = (
|
|
571
|
+
data: UI_I_SendDataNewHardDisk,
|
|
572
|
+
index: number
|
|
573
|
+
): void => {
|
|
574
|
+
model.value.disk_devices[index] = {
|
|
575
|
+
...data,
|
|
576
|
+
boot_order: model.value.disk_devices[index]?.boot_order || 0,
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
const sendDataNewCdDvdDriveMethod = (
|
|
580
|
+
data: UI_I_SendDataNewCdDvdDrive,
|
|
581
|
+
index: number
|
|
582
|
+
): void => {
|
|
583
|
+
const cdromIndexStart = model.value.disk_devices.findIndex(
|
|
584
|
+
(disk) => disk.device_type === 'cdrom'
|
|
585
|
+
)
|
|
586
|
+
model.value.disk_devices[cdromIndexStart + index] = {
|
|
587
|
+
...data,
|
|
588
|
+
boot_order:
|
|
589
|
+
model.value.disk_devices[cdromIndexStart + index]?.boot_order || 0,
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
const onSendDataPciDevicesMethod = (
|
|
593
|
+
data: UI_I_SendDataNewPciDevice,
|
|
594
|
+
index: number
|
|
595
|
+
): void => {
|
|
596
|
+
model.value.passthrough_pci_devices[index] = {
|
|
597
|
+
...data,
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
const onSetInvalidHardDisk = (invalid: boolean, index: number): void => {
|
|
602
|
+
newHardDiskInvalidKeys.value[index] = invalid
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
const onSetInvalidNetwork = (invalid: boolean, key: number): void => {
|
|
606
|
+
newNetworkInvalidKeys.value[key] = invalid
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
const onSetInvalidPciDevice = (invalid: boolean, key: number): void => {
|
|
610
|
+
newPciDeviceInvalidKeys.value[key] = invalid
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
const memoryInvalid = ref<boolean>(false)
|
|
614
|
+
const videoCardInvalid = ref<boolean>(false)
|
|
615
|
+
const newHardDiskInvalidKeys = ref<UI_I_InvalidKeys>({})
|
|
616
|
+
const newNetworkInvalidKeys = ref<UI_I_InvalidKeys>({})
|
|
617
|
+
const newPciDeviceInvalidKeys = ref<UI_I_InvalidKeys>({})
|
|
618
|
+
|
|
619
|
+
watch(
|
|
620
|
+
[
|
|
621
|
+
cpuInvalid,
|
|
622
|
+
memoryInvalid,
|
|
623
|
+
newHardDiskInvalidKeys,
|
|
624
|
+
newNetworkInvalidKeys,
|
|
625
|
+
newPciDeviceInvalidKeys,
|
|
626
|
+
videoCardInvalid,
|
|
627
|
+
],
|
|
628
|
+
() => {
|
|
629
|
+
const cpu = cpuInvalid.value ? localization.value.common.cpu : ''
|
|
630
|
+
const memory = memoryInvalid.value ? localization.value.common.memory : ''
|
|
631
|
+
const videoCard = videoCardInvalid.value
|
|
632
|
+
? localization.value.common.videoCard
|
|
633
|
+
: ''
|
|
634
|
+
let newHardDisk = ''
|
|
635
|
+
Object.keys(newHardDiskInvalidKeys.value).forEach((key) => {
|
|
636
|
+
if (!newHardDiskInvalidKeys.value[+key]) {
|
|
637
|
+
return
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
newHardDisk +=
|
|
641
|
+
(newHardDisk ? ', ' : '') +
|
|
642
|
+
localization.value.common.newHardDisk +
|
|
643
|
+
' ' +
|
|
644
|
+
(+key + 1)
|
|
645
|
+
})
|
|
646
|
+
let newNetwork = ''
|
|
647
|
+
Object.keys(newNetworkInvalidKeys.value).forEach((key) => {
|
|
648
|
+
if (!newNetworkInvalidKeys.value[+key]) {
|
|
649
|
+
return
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
newNetwork +=
|
|
653
|
+
(newNetwork ? ', ' : '') +
|
|
654
|
+
localization.value.common.newNetwork +
|
|
655
|
+
' ' +
|
|
656
|
+
(+key + 1)
|
|
657
|
+
})
|
|
658
|
+
// let pciDevice = ''
|
|
659
|
+
// Object.keys(newPciDeviceInvalidKeys.value).forEach((key) => {
|
|
660
|
+
// if (!newPciDeviceInvalidKeys.value[+key]) {
|
|
661
|
+
// return
|
|
662
|
+
// }
|
|
663
|
+
//
|
|
664
|
+
// pciDevice +=
|
|
665
|
+
// (pciDevice ? ', ' : '') +
|
|
666
|
+
// localization.value.common.pciDevice +
|
|
667
|
+
// ' ' +
|
|
668
|
+
// (+key + 1)
|
|
669
|
+
// })
|
|
670
|
+
|
|
671
|
+
emits('invalid', [cpu, memory, newHardDisk, newNetwork, videoCard])
|
|
672
|
+
},
|
|
673
|
+
{ deep: true }
|
|
674
|
+
)
|
|
675
|
+
|
|
676
|
+
emits('get-pci-devices')
|
|
677
|
+
</script>
|
|
678
|
+
|
|
679
|
+
<style scoped lang="scss"></style>
|