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