bfg-common 1.5.558 → 1.5.559
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CODE_STYLE.md +109 -109
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/localization/local_be.json +26 -5
- package/assets/localization/local_en.json +26 -5
- package/assets/localization/local_hy.json +26 -5
- package/assets/localization/local_kk.json +26 -5
- package/assets/localization/local_ru.json +26 -5
- package/assets/localization/local_zh.json +27 -6
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +170 -170
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/table/dataGrid/DataGrid.vue +1718 -1718
- package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
- package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
- package/components/common/backup/storage/actions/add/Add.vue +251 -251
- 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/portModal.ts +251 -251
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
- package/components/common/modals/confirmByInput/ConfirmByInput.vue +9 -1
- package/components/common/modals/confirmByInput/ConfirmByInputNew.vue +7 -2
- package/components/common/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/New.vue +8 -2
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
- package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +69 -69
- package/components/common/pages/backups/modals/lib/config/restore.ts +115 -115
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +186 -186
- package/components/common/pages/backups/modals/restore/Restore.vue +9 -5
- package/components/common/pages/backups/modals/restore/RestoreNew.vue +13 -3
- package/components/common/pages/backups/modals/restore/RestoreOld.vue +6 -18
- package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
- package/components/common/pages/home/lib/models/interfaces.ts +48 -48
- package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
- package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
- package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
- package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
- package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
- package/components/common/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 +119 -46
- package/components/common/vm/actions/add/New.vue +54 -16
- package/components/common/vm/actions/add/Old.vue +55 -16
- package/components/common/vm/actions/add/lib/config/steps.ts +347 -347
- package/components/common/vm/actions/clone/Clone.vue +809 -809
- package/components/common/vm/actions/clone/new/New.vue +457 -457
- package/components/common/vm/actions/clone/old/Old.vue +378 -378
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +81 -14
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +56 -7
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +56 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +142 -73
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +54 -60
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +55 -61
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +159 -139
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuNew.vue +15 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuOld.vue +13 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +75 -62
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryNew.vue +158 -158
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryOld.vue +155 -155
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +427 -427
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +154 -154
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +74 -58
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +17 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +3 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerOld.vue +3 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +39 -17
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardNew.vue +5 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardOld.vue +5 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options.ts +4 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +53 -53
- package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +93 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +62 -8
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsOld.vue +60 -8
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +69 -5
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +32 -12
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsOld.vue +33 -12
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +60 -60
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +132 -114
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +6 -41
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderOld.vue +6 -44
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +23 -8
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +31 -21
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsOld.vue +34 -26
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +34 -28
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/Old.vue +30 -24
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +112 -8
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +3 -3
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{New.vue → KeymapNew.vue} +6 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{Old.vue → KeymapOld.vue} +5 -5
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +7 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +38 -4
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsNew.vue +26 -7
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsOld.vue +50 -24
- package/components/common/vm/actions/common/lib/models/interfaces.ts +25 -57
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- package/components/common/vm/actions/common/select/createType/CreateType.vue +38 -38
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/os/Old.vue +152 -152
- package/components/common/vm/actions/common/select/os/Os.vue +139 -139
- package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
- package/components/common/vm/actions/common/select/storage/Storage.vue +178 -178
- package/components/common/vm/actions/common/select/storage/new/New.vue +311 -311
- package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
- package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
- package/components/common/vm/actions/editSettings/EditSettings.vue +35 -21
- package/components/common/vm/actions/editSettings/EditSettingsOld.vue +41 -14
- package/components/common/vm/actions/editSettings/new/New.vue +41 -14
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/vm/actions/lib/models/interfaces.ts +29 -4
- package/components/common/vm/actions/lib/utils.ts +32 -37
- package/components/common/vm/actions/register/Register.vue +352 -352
- package/components/common/vm/actions/register/lib/config/steps.ts +86 -86
- package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
- package/components/common/wizards/common/compatibility/New.vue +99 -99
- package/components/common/wizards/common/compatibility/Old.vue +53 -53
- package/components/common/wizards/common/steps/computeResource/ComputeResource.vue +86 -86
- package/components/common/wizards/common/steps/computeResource/New.vue +93 -93
- package/components/common/wizards/common/steps/computeResource/Old.vue +103 -103
- package/components/common/wizards/common/steps/name/Name.vue +178 -178
- package/components/common/wizards/common/steps/name/New.vue +221 -221
- package/components/common/wizards/common/steps/name/Old.vue +121 -121
- package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
- package/components/common/wizards/common/steps/name/location/Location.vue +85 -85
- package/components/common/wizards/common/steps/name/location/New.vue +40 -40
- package/components/common/wizards/datastore/add/Add.vue +228 -228
- package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
- package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
- package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +205 -205
- package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
- package/composables/useAppVersion.ts +21 -21
- package/composables/useLocal.ts +6 -6
- package/composables/useLocalCommon.ts +39 -39
- package/package.json +3 -1
- package/plugins/console.ts +21 -21
- package/plugins/date.ts +233 -233
- package/plugins/mouse.ts +21 -21
- package/plugins/panelStates.ts +70 -70
- package/plugins/text.ts +59 -59
- package/public/spice-console/application/clientgui.js +854 -854
- package/public/spice-console/application/packetfactory.js +211 -211
- package/public/spice-console/application/virtualmouse.js +147 -147
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +440 -440
- package/public/spice-console/process/cursorprocess.js +121 -121
- package/public/spice-console/process/inputprocess.js +227 -227
- package/public/spice-console/process/mainprocess.js +210 -210
- package/public/spice-console/run.js +210 -210
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- package/store/tasks/mappers/recentTasks.ts +4 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{New.vue → PasswordNew.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{Old.vue → PasswordOld.vue} +0 -0
package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-vm-actions-common-customize-hardware-virtual-hardware-new
|
|
3
3
|
v-if="isNewView"
|
|
4
|
-
v-model="model"
|
|
5
4
|
v-model:cpu-invalid="cpuInvalid"
|
|
6
5
|
v-model:memory-invalid="memoryInvalid"
|
|
7
6
|
v-model:video-card-invalid="videoCardInvalid"
|
|
@@ -10,6 +9,7 @@
|
|
|
10
9
|
:is-edit="props.isEdit"
|
|
11
10
|
:storage="props.storage"
|
|
12
11
|
:project="props.project"
|
|
12
|
+
:max-cpus="props.maxCpus"
|
|
13
13
|
:max-memory="props.maxMemory"
|
|
14
14
|
:cpu-models="props.cpuModels"
|
|
15
15
|
:datastore="props.datastore"
|
|
@@ -27,11 +27,15 @@
|
|
|
27
27
|
:cd-dvd-drives-index="cdDvdDrivesIndex"
|
|
28
28
|
:error-validation-fields="errorValidationFields"
|
|
29
29
|
:get-datastore-table-func="getDatastoreTableFunc"
|
|
30
|
+
:cpu="cpu"
|
|
30
31
|
:state="state"
|
|
32
|
+
:memory="memory"
|
|
33
|
+
:networks="networksLocal"
|
|
31
34
|
:hard-disks="hardDisksLocal"
|
|
32
35
|
:video-card="videoCard"
|
|
33
36
|
:pci-devices="pciDevicesLocal"
|
|
34
37
|
:cd-dvd-drives="cdDvdDrivesLocal"
|
|
38
|
+
:usb-controller="usbController"
|
|
35
39
|
:guest-machine-type="guestMachineType"
|
|
36
40
|
:passthrough-devices="passthroughDevices"
|
|
37
41
|
:mediated-devices="mediatedDevices"
|
|
@@ -51,18 +55,22 @@
|
|
|
51
55
|
@remove-cd-dvd-drive="onRemoveCdDvdDrive(...$event)"
|
|
52
56
|
@show-datastore-child="emits('show-datastore-child', $event)"
|
|
53
57
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
58
|
+
@send-data-cpu-method="onSendDataCpuMethod"
|
|
54
59
|
@set-invalid-hard-disk="onSetInvalidHardDisk(...$event)"
|
|
55
60
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
56
61
|
@roll-back-cd-dvd-drive="onRollBackCdDvdDrive"
|
|
57
62
|
@set-invalid-pci-device="onSetInvalidPciDevice(...$event)"
|
|
58
63
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
64
|
+
@send-data-memory-method="onSendDataMemoryMethod"
|
|
65
|
+
@send-data-video-card-method="onSendDataVideoCardMethod"
|
|
66
|
+
@send-data-new-network-method="sendDataNewNetworkMethod(...$event)"
|
|
59
67
|
@send-data-pci-devices-method="onSendDataPciDevicesMethod(...$event)"
|
|
60
68
|
@send-data-new-hard-disk-method="onSendDataNewHardDiskMethod(...$event)"
|
|
61
69
|
@send-data-new-cd-dvd-drive-method="sendDataNewCdDvdDriveMethod(...$event)"
|
|
70
|
+
@send-data-new-usb-controller-method="onSendDataNewUsbControllerMethod"
|
|
62
71
|
/>
|
|
63
72
|
<common-vm-actions-common-customize-hardware-virtual-hardware-old
|
|
64
73
|
v-else
|
|
65
|
-
v-model="model"
|
|
66
74
|
v-model:cpu-invalid="cpuInvalid"
|
|
67
75
|
v-model:memory-invalid="memoryInvalid"
|
|
68
76
|
v-model:video-card-invalid="videoCardInvalid"
|
|
@@ -71,6 +79,7 @@
|
|
|
71
79
|
:is-edit="props.isEdit"
|
|
72
80
|
:storage="props.storage"
|
|
73
81
|
:project="props.project"
|
|
82
|
+
:max-cpus="props.maxCpus"
|
|
74
83
|
:max-memory="props.maxMemory"
|
|
75
84
|
:cpu-models="props.cpuModels"
|
|
76
85
|
:datastore="props.datastore"
|
|
@@ -88,11 +97,15 @@
|
|
|
88
97
|
:cd-dvd-drives-index="cdDvdDrivesIndex"
|
|
89
98
|
:error-validation-fields="errorValidationFields"
|
|
90
99
|
:get-datastore-table-func="getDatastoreTableFunc"
|
|
100
|
+
:cpu="cpu"
|
|
91
101
|
:state="state"
|
|
102
|
+
:memory="memory"
|
|
103
|
+
:networks="networksLocal"
|
|
92
104
|
:hard-disks="hardDisksLocal"
|
|
93
105
|
:video-card="videoCard"
|
|
94
106
|
:pci-devices="pciDevicesLocal"
|
|
95
107
|
:cd-dvd-drives="cdDvdDrivesLocal"
|
|
108
|
+
:usb-controller="usbController"
|
|
96
109
|
:guest-machine-type="guestMachineType"
|
|
97
110
|
:passthrough-devices="passthroughDevices"
|
|
98
111
|
:mediated-devices="mediatedDevices"
|
|
@@ -111,14 +124,19 @@
|
|
|
111
124
|
@remove-cd-dvd-drive="onRemoveCdDvdDrive(...$event)"
|
|
112
125
|
@show-datastore-child="emits('show-datastore-child', $event)"
|
|
113
126
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
127
|
+
@send-data-cpu-method="onSendDataCpuMethod"
|
|
114
128
|
@set-invalid-hard-disk="onSetInvalidHardDisk(...$event)"
|
|
115
129
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
116
130
|
@roll-back-cd-dvd-drive="onRollBackCdDvdDrive"
|
|
117
131
|
@set-invalid-pci-device="onSetInvalidPciDevice(...$event)"
|
|
118
132
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
133
|
+
@send-data-memory-method="onSendDataMemoryMethod"
|
|
134
|
+
@send-data-video-card-method="onSendDataVideoCardMethod"
|
|
135
|
+
@send-data-new-network-method="sendDataNewNetworkMethod(...$event)"
|
|
119
136
|
@send-data-pci-devices-method="onSendDataPciDevicesMethod(...$event)"
|
|
120
137
|
@send-data-new-hard-disk-method="onSendDataNewHardDiskMethod(...$event)"
|
|
121
138
|
@send-data-new-cd-dvd-drive-method="sendDataNewCdDvdDriveMethod(...$event)"
|
|
139
|
+
@send-data-new-usb-controller-method="onSendDataNewUsbControllerMethod"
|
|
122
140
|
/>
|
|
123
141
|
</template>
|
|
124
142
|
|
|
@@ -130,9 +148,13 @@ import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
|
130
148
|
import type { UI_I_FolderOrFileTreePayload } from '~/lib/models/store/storage/interfaces'
|
|
131
149
|
import type { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
|
|
132
150
|
import type {
|
|
151
|
+
UI_I_SendDataCpu,
|
|
152
|
+
UI_I_SendDataMemory,
|
|
133
153
|
UI_I_SendDataNewHardDisk,
|
|
154
|
+
UI_I_SendDataNewNetwork,
|
|
134
155
|
UI_I_SendDataVideoCard,
|
|
135
156
|
UI_I_InvalidKeys,
|
|
157
|
+
UI_I_SendDataVirtualHardware,
|
|
136
158
|
UI_I_SendDataNewCdDvdDrive,
|
|
137
159
|
// UI_I_HardDisk,
|
|
138
160
|
UI_I_SendDataNewPciDevice,
|
|
@@ -150,23 +172,23 @@ import type {
|
|
|
150
172
|
} from '~/components/atoms/dropdown/tree/lib/models/interfaces'
|
|
151
173
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
152
174
|
import type {
|
|
175
|
+
API_UI_I_VmEditCpu,
|
|
176
|
+
API_UI_I_VmEditMemory,
|
|
153
177
|
UI_I_MediatedDevice,
|
|
154
178
|
UI_I_PciDevice,
|
|
155
179
|
} from '~/lib/models/store/vm/interfaces'
|
|
156
180
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
157
|
-
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
158
181
|
import { dropdownItemsFunc } from './lib/config/dropdownItems'
|
|
159
182
|
|
|
160
|
-
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
161
|
-
|
|
162
183
|
const props = withDefaults(
|
|
163
184
|
defineProps<{
|
|
164
185
|
storage: UI_I_DatastoreTableItem | null
|
|
165
186
|
cpuModels: UI_I_OptionItem[]
|
|
187
|
+
maxCpus: number
|
|
166
188
|
maxMemory: number
|
|
167
189
|
isEdit: boolean
|
|
168
190
|
isClone: boolean
|
|
169
|
-
errorValidationFields: UI_I_ErrorValidationField[]
|
|
191
|
+
errorValidationFields: UI_I_ErrorValidationField<string>[]
|
|
170
192
|
nodes: UI_I_FileTreeNode[]
|
|
171
193
|
files: UI_I_FileTreeNode[]
|
|
172
194
|
networksTable: UI_I_NetworkTableItem[]
|
|
@@ -175,10 +197,14 @@ const props = withDefaults(
|
|
|
175
197
|
isDatastoreLoading: boolean
|
|
176
198
|
project: UI_T_Project
|
|
177
199
|
state?: string | number
|
|
200
|
+
cpu?: API_UI_I_VmEditCpu
|
|
201
|
+
memory?: API_UI_I_VmEditMemory
|
|
178
202
|
vmCpuHelpTextSecond?: string
|
|
179
203
|
hardDisks?: UI_I_SendDataNewHardDisk[] | null
|
|
180
204
|
cdDvdDrives?: UI_I_SendDataNewCdDvdDrive[] | null
|
|
205
|
+
networks?: UI_I_SendDataNewNetwork[] | null
|
|
181
206
|
videoCard?: UI_I_SendDataVideoCard
|
|
207
|
+
usbController?: string
|
|
182
208
|
pciDevices?: UI_I_SendDataNewPciDevice[]
|
|
183
209
|
passthroughDevices?: UI_I_PciDevice[]
|
|
184
210
|
mediatedDevices?: UI_I_MediatedDevice[]
|
|
@@ -188,10 +214,14 @@ const props = withDefaults(
|
|
|
188
214
|
}>(),
|
|
189
215
|
{
|
|
190
216
|
state: undefined,
|
|
217
|
+
cpu: undefined,
|
|
218
|
+
memory: undefined,
|
|
191
219
|
vmCpuHelpTextSecond: undefined,
|
|
192
220
|
hardDisks: undefined,
|
|
193
221
|
cdDvdDrives: undefined,
|
|
222
|
+
networks: undefined,
|
|
194
223
|
videoCard: undefined,
|
|
224
|
+
usbController: undefined,
|
|
195
225
|
pciDevices: undefined,
|
|
196
226
|
passthroughDevices: undefined,
|
|
197
227
|
mediatedDevices: undefined,
|
|
@@ -201,6 +231,7 @@ const props = withDefaults(
|
|
|
201
231
|
}
|
|
202
232
|
)
|
|
203
233
|
const emits = defineEmits<{
|
|
234
|
+
(event: 'send-data', value: UI_I_SendDataVirtualHardware): void
|
|
204
235
|
(event: 'invalid', value: string[]): void
|
|
205
236
|
(event: 'get-storage', value: UI_I_TablePayload): void
|
|
206
237
|
(event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
|
|
@@ -270,18 +301,6 @@ const addHardDisk = (
|
|
|
270
301
|
let provisionType = 'thick'
|
|
271
302
|
if (provisioned_type === 1) provisionType = 'thin'
|
|
272
303
|
|
|
273
|
-
model.value.disk_devices = [
|
|
274
|
-
...model.value.disk_devices.filter((disk) => disk.device_type !== 'cdrom'),
|
|
275
|
-
{
|
|
276
|
-
create,
|
|
277
|
-
size,
|
|
278
|
-
source,
|
|
279
|
-
attach: true,
|
|
280
|
-
boot_order: 0, // Убираем галочку
|
|
281
|
-
provision_type: provisionType,
|
|
282
|
-
},
|
|
283
|
-
...model.value.disk_devices.filter((disk) => disk.device_type === 'cdrom'),
|
|
284
|
-
]
|
|
285
304
|
hardDisksLocal.value.push({
|
|
286
305
|
create,
|
|
287
306
|
size,
|
|
@@ -290,6 +309,7 @@ const addHardDisk = (
|
|
|
290
309
|
boot_order: 0, // Убираем галочку
|
|
291
310
|
provision_type: provisionType,
|
|
292
311
|
})
|
|
312
|
+
sendData()
|
|
293
313
|
}
|
|
294
314
|
const onAddExistHardDisk = (file: UI_I_FileTreeNode): void => {
|
|
295
315
|
addHardDisk(
|
|
@@ -311,6 +331,7 @@ const onRemoveHardDisk = (
|
|
|
311
331
|
if (key === removeIndex) return 'removed'
|
|
312
332
|
return item
|
|
313
333
|
})
|
|
334
|
+
sendData()
|
|
314
335
|
return
|
|
315
336
|
}
|
|
316
337
|
|
|
@@ -319,11 +340,6 @@ const onRemoveHardDisk = (
|
|
|
319
340
|
(_item, key) => key !== removeIndex
|
|
320
341
|
)
|
|
321
342
|
|
|
322
|
-
model.value.disk_devices = model.value.disk_devices.filter(
|
|
323
|
-
(_hardDisk, key: number) => {
|
|
324
|
-
return removeIndex !== key
|
|
325
|
-
}
|
|
326
|
-
)
|
|
327
343
|
hardDisksLocal.value = hardDisksLocal.value.filter(
|
|
328
344
|
(_hardDisk, key: number) => {
|
|
329
345
|
return removeIndex !== key
|
|
@@ -331,6 +347,8 @@ const onRemoveHardDisk = (
|
|
|
331
347
|
)
|
|
332
348
|
|
|
333
349
|
delete newHardDiskInvalidKeys.value[index]
|
|
350
|
+
delete sendDataNewHardDisk.value[index]
|
|
351
|
+
sendData()
|
|
334
352
|
}
|
|
335
353
|
const onRollBackHardDisk = (index: number): void => {
|
|
336
354
|
const removeIndex = hardDisksIndex.value.indexOf(index)
|
|
@@ -340,39 +358,51 @@ const onRollBackHardDisk = (index: number): void => {
|
|
|
340
358
|
})
|
|
341
359
|
}
|
|
342
360
|
|
|
343
|
-
const networksType = ref<UI_T_NetworkType[]>(['new'])
|
|
344
|
-
const networksIndex = ref<number[]>([0])
|
|
345
|
-
if (!model.value.network_devices.length) {
|
|
346
|
-
networksType.value = []
|
|
347
|
-
networksIndex.value = []
|
|
348
|
-
}
|
|
349
|
-
model.value.network_devices.forEach(() => {
|
|
350
|
-
if (!props.isEdit && !props.isClone) return
|
|
351
|
-
|
|
352
|
-
const count = model.value.network_devices.length || 0
|
|
353
|
-
networksIndex.value = [...Array(count).keys()]
|
|
354
|
-
if (props.isEdit) {
|
|
355
|
-
networksType.value = Array(count).fill('edit')
|
|
356
|
-
} else if (props.isClone) {
|
|
357
|
-
networksType.value = Array(count).fill('clone')
|
|
358
|
-
}
|
|
359
|
-
})
|
|
360
|
-
|
|
361
361
|
const defaultNetwork = {
|
|
362
362
|
network: '',
|
|
363
363
|
net_bridge: '',
|
|
364
364
|
mac: '',
|
|
365
365
|
target: '',
|
|
366
|
-
model: '
|
|
367
|
-
boot_order:
|
|
366
|
+
model: '',
|
|
367
|
+
boot_order: -1,
|
|
368
368
|
}
|
|
369
|
+
const networksLocal = ref<UI_I_SendDataNewNetwork[]>([
|
|
370
|
+
useDeepCopy(defaultNetwork),
|
|
371
|
+
])
|
|
372
|
+
const networksType = ref<UI_T_NetworkType[]>(['new'])
|
|
373
|
+
const networksIndex = ref<number[]>([0])
|
|
374
|
+
watch(
|
|
375
|
+
() => props.networks,
|
|
376
|
+
(newValue) => {
|
|
377
|
+
if (!props.isEdit && !props.isClone) return
|
|
378
|
+
if (!newValue) {
|
|
379
|
+
networksLocal.value = []
|
|
380
|
+
networksType.value = []
|
|
381
|
+
networksIndex.value = []
|
|
382
|
+
return
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// networksLocal.value = newValue
|
|
386
|
+
// networksType.value = Array(newValue.length).fill('edit')
|
|
387
|
+
const count = newValue?.length || 0
|
|
388
|
+
networksIndex.value = [...Array(count).keys()]
|
|
389
|
+
networksLocal.value = newValue
|
|
390
|
+
if (props.isEdit) {
|
|
391
|
+
networksType.value = Array(count).fill('edit')
|
|
392
|
+
} else if (props.isClone) {
|
|
393
|
+
networksType.value = Array(count).fill('clone')
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
{ immediate: true }
|
|
397
|
+
)
|
|
369
398
|
const addNetwork = (): void => {
|
|
370
399
|
const index = (networksIndex.value.at(-1) ?? -1) + 1
|
|
371
400
|
networksIndex.value.push(index)
|
|
372
401
|
networksType.value.push('new')
|
|
373
402
|
|
|
374
|
-
|
|
403
|
+
networksLocal.value.push({
|
|
375
404
|
...useDeepCopy(defaultNetwork),
|
|
405
|
+
boot_order: 0, // Убираем галочку
|
|
376
406
|
})
|
|
377
407
|
}
|
|
378
408
|
const onRemoveNetwork = (index: number): void => {
|
|
@@ -381,11 +411,13 @@ const onRemoveNetwork = (index: number): void => {
|
|
|
381
411
|
networksType.value = networksType.value.filter(
|
|
382
412
|
(_item, key) => key !== removeIndex
|
|
383
413
|
)
|
|
384
|
-
|
|
414
|
+
networksLocal.value = networksLocal.value.filter(
|
|
385
415
|
(_network, key: number) => removeIndex !== key
|
|
386
416
|
)
|
|
387
417
|
|
|
388
418
|
delete newNetworkInvalidKeys.value[index]
|
|
419
|
+
delete sendDataNewNetwork.value[index]
|
|
420
|
+
sendData()
|
|
389
421
|
}
|
|
390
422
|
|
|
391
423
|
const defaultCdDvdDriver: UI_I_SendDataNewCdDvdDrive = {
|
|
@@ -423,11 +455,6 @@ const addCdDvdDrive = (): void => {
|
|
|
423
455
|
const value = (cdDvdDrivesIndex.value.at(-1) ?? -1) + 1
|
|
424
456
|
cdDvdDrivesIndex.value.push(value)
|
|
425
457
|
cdDvdDrivesType.value.push('new')
|
|
426
|
-
model.value.disk_devices.push({
|
|
427
|
-
...useDeepCopy(defaultCdDvdDriver),
|
|
428
|
-
attach: true,
|
|
429
|
-
boot_order: 0, // Убираем галочку
|
|
430
|
-
})
|
|
431
458
|
cdDvdDrivesLocal.value.push({
|
|
432
459
|
...useDeepCopy(defaultCdDvdDriver),
|
|
433
460
|
attach: true,
|
|
@@ -446,6 +473,7 @@ const onRemoveCdDvdDrive = (
|
|
|
446
473
|
if (key === removeIndex) return 'removed'
|
|
447
474
|
return item
|
|
448
475
|
})
|
|
476
|
+
sendData()
|
|
449
477
|
return
|
|
450
478
|
}
|
|
451
479
|
|
|
@@ -455,12 +483,12 @@ const onRemoveCdDvdDrive = (
|
|
|
455
483
|
cdDvdDrivesType.value = cdDvdDrivesType.value.filter(
|
|
456
484
|
(_item, key) => key !== index
|
|
457
485
|
)
|
|
458
|
-
model.value.disk_devices = model.value.disk_devices.filter(
|
|
459
|
-
(_cdDvdDrive, key: number) => removeIndex !== key
|
|
460
|
-
)
|
|
461
486
|
cdDvdDrivesLocal.value = cdDvdDrivesLocal.value.filter(
|
|
462
487
|
(_cdDvdDrive, key: number) => removeIndex !== key
|
|
463
488
|
)
|
|
489
|
+
|
|
490
|
+
delete sendDataNewCdDvdDrive.value[index]
|
|
491
|
+
sendData()
|
|
464
492
|
}
|
|
465
493
|
const onRollBackCdDvdDrive = (index: number): void => {
|
|
466
494
|
const removeIndex = cdDvdDrivesIndex.value.indexOf(index)
|
|
@@ -502,7 +530,6 @@ const addPciDevice = (): void => {
|
|
|
502
530
|
pciDevicesType.value.push('new')
|
|
503
531
|
|
|
504
532
|
pciDevicesLocal.value.push(useDeepCopy(defaultPciDevice))
|
|
505
|
-
model.value.passthrough_pci_devices.push(useDeepCopy(defaultPciDevice))
|
|
506
533
|
}
|
|
507
534
|
const onRemovePciDevice = (index: number): void => {
|
|
508
535
|
const removeIndex = pciDevicesIndex.value.indexOf(index)
|
|
@@ -511,11 +538,6 @@ const onRemovePciDevice = (index: number): void => {
|
|
|
511
538
|
(_item, key) => key !== removeIndex
|
|
512
539
|
)
|
|
513
540
|
|
|
514
|
-
model.value.passthrough_pci_devices = model.value.passthrough_pci_devices.filter(
|
|
515
|
-
(_pciDevice, key: number) => {
|
|
516
|
-
return removeIndex !== key
|
|
517
|
-
}
|
|
518
|
-
)
|
|
519
541
|
pciDevicesLocal.value = pciDevicesLocal.value.filter(
|
|
520
542
|
(_pciDevice, key: number) => {
|
|
521
543
|
return removeIndex !== key
|
|
@@ -523,6 +545,8 @@ const onRemovePciDevice = (index: number): void => {
|
|
|
523
545
|
)
|
|
524
546
|
|
|
525
547
|
delete newPciDeviceInvalidKeys.value[index]
|
|
548
|
+
delete sendDataNewPciDevices.value[index]
|
|
549
|
+
sendData()
|
|
526
550
|
}
|
|
527
551
|
|
|
528
552
|
const isShowFileModal = ref<boolean>(false)
|
|
@@ -547,35 +571,80 @@ const onAddDevice = (item: UI_I_DropdownTreeItemChild): void => {
|
|
|
547
571
|
}
|
|
548
572
|
|
|
549
573
|
const cpuInvalid = ref<boolean>(false)
|
|
574
|
+
const sendDataCpu = ref<UI_I_SendDataCpu | null>(null)
|
|
575
|
+
const onSendDataCpuMethod = (data: UI_I_SendDataCpu): void => {
|
|
576
|
+
sendDataCpu.value = data
|
|
577
|
+
sendData()
|
|
578
|
+
}
|
|
579
|
+
const sendDataMemory = ref<UI_I_SendDataMemory | null>(null)
|
|
580
|
+
const onSendDataMemoryMethod = (data: UI_I_SendDataMemory): void => {
|
|
581
|
+
sendDataMemory.value = data
|
|
582
|
+
sendData()
|
|
583
|
+
}
|
|
584
|
+
const sendDataNewHardDisk = ref<UI_I_SendDataNewHardDisk[]>([])
|
|
550
585
|
const onSendDataNewHardDiskMethod = (
|
|
551
586
|
data: UI_I_SendDataNewHardDisk,
|
|
552
587
|
index: number
|
|
553
588
|
): void => {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
589
|
+
sendDataNewHardDisk.value[index] = data
|
|
590
|
+
sendData()
|
|
591
|
+
}
|
|
592
|
+
const sendDataNewNetwork = ref<UI_I_SendDataNewNetwork[]>([])
|
|
593
|
+
const sendDataNewNetworkMethod = (
|
|
594
|
+
data: UI_I_SendDataNewNetwork,
|
|
595
|
+
index: number
|
|
596
|
+
): void => {
|
|
597
|
+
sendDataNewNetwork.value[index] = data
|
|
598
|
+
sendData()
|
|
558
599
|
}
|
|
600
|
+
const sendDataNewCdDvdDrive = ref<UI_I_SendDataNewCdDvdDrive[]>([])
|
|
559
601
|
const sendDataNewCdDvdDriveMethod = (
|
|
560
602
|
data: UI_I_SendDataNewCdDvdDrive,
|
|
561
603
|
index: number
|
|
562
604
|
): void => {
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
}
|
|
605
|
+
sendDataNewCdDvdDrive.value[index] = data
|
|
606
|
+
sendData()
|
|
607
|
+
}
|
|
608
|
+
const sendDataNewUsbController = ref<string | null>(null)
|
|
609
|
+
const onSendDataNewUsbControllerMethod = (data: string): void => {
|
|
610
|
+
sendDataNewUsbController.value = data
|
|
611
|
+
sendData()
|
|
571
612
|
}
|
|
613
|
+
const sendDataNewPciDevices = ref<UI_I_SendDataNewPciDevice[]>([])
|
|
572
614
|
const onSendDataPciDevicesMethod = (
|
|
573
615
|
data: UI_I_SendDataNewPciDevice,
|
|
574
616
|
index: number
|
|
575
617
|
): void => {
|
|
576
|
-
|
|
577
|
-
|
|
618
|
+
sendDataNewPciDevices.value[index] = data
|
|
619
|
+
sendData()
|
|
620
|
+
}
|
|
621
|
+
const sendDataVideoCard = ref<UI_I_SendDataVideoCard | null>(null)
|
|
622
|
+
const onSendDataVideoCardMethod = (data: UI_I_SendDataVideoCard): void => {
|
|
623
|
+
sendDataVideoCard.value = data
|
|
624
|
+
sendData()
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
const sendData = (): void => {
|
|
628
|
+
const cpu = sendDataCpu.value
|
|
629
|
+
const memory = sendDataMemory.value
|
|
630
|
+
const hardDisks = sendDataNewHardDisk.value.flat(2)
|
|
631
|
+
const networks = sendDataNewNetwork.value.flat(2)
|
|
632
|
+
const cdDvdDrives = sendDataNewCdDvdDrive.value.flat(2)
|
|
633
|
+
const pciDevices = sendDataNewPciDevices.value.flat()
|
|
634
|
+
const usbController = sendDataNewUsbController.value
|
|
635
|
+
const videoCard = sendDataVideoCard.value
|
|
636
|
+
|
|
637
|
+
const sendData: UI_I_SendDataVirtualHardware = {
|
|
638
|
+
cpu,
|
|
639
|
+
memory,
|
|
640
|
+
usbController,
|
|
641
|
+
pciDevices,
|
|
642
|
+
networks,
|
|
643
|
+
hardDisks,
|
|
644
|
+
cdDvdDrives,
|
|
645
|
+
videoCard,
|
|
578
646
|
}
|
|
647
|
+
emits('send-data', sendData)
|
|
579
648
|
}
|
|
580
649
|
|
|
581
650
|
const onSetInvalidHardDisk = (invalid: boolean, index: number): void => {
|