bfg-common 1.5.554 → 1.5.555
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/assets/localization/local_be.json +4 -20
- package/assets/localization/local_en.json +4 -20
- package/assets/localization/local_hy.json +4 -20
- package/assets/localization/local_kk.json +4 -20
- package/assets/localization/local_ru.json +4 -20
- package/assets/localization/local_zh.json +5 -21
- package/components/common/modals/confirmByInput/ConfirmByInput.vue +1 -9
- package/components/common/modals/confirmByInput/ConfirmByInputNew.vue +2 -7
- package/components/common/pages/backups/modals/createBackup/New.vue +2 -8
- package/components/common/pages/backups/modals/restore/Restore.vue +5 -9
- package/components/common/pages/backups/modals/restore/RestoreNew.vue +3 -13
- package/components/common/pages/backups/modals/restore/RestoreOld.vue +18 -6
- package/components/common/vm/actions/add/Add.vue +46 -119
- package/components/common/vm/actions/add/New.vue +16 -54
- package/components/common/vm/actions/add/Old.vue +16 -55
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +13 -78
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +7 -52
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +8 -52
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +62 -96
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +13 -24
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +14 -25
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +139 -159
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuNew.vue +8 -15
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuOld.vue +8 -13
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +62 -75
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +6 -17
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +6 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerOld.vue +6 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +17 -39
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardNew.vue +6 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardOld.vue +6 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options.ts +4 -4
- package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +6 -93
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +8 -62
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsOld.vue +8 -60
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +5 -69
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +12 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsOld.vue +12 -33
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +114 -132
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +41 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderOld.vue +44 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +8 -23
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +21 -31
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsOld.vue +26 -34
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +28 -34
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/Old.vue +24 -30
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +8 -112
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +3 -3
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{KeymapNew.vue → New.vue} +6 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{KeymapOld.vue → Old.vue} +5 -5
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +6 -7
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +26 -60
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsNew.vue +7 -26
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsOld.vue +60 -86
- package/components/common/vm/actions/common/lib/models/interfaces.ts +57 -25
- package/components/common/vm/actions/editSettings/EditSettings.vue +10 -33
- package/components/common/vm/actions/editSettings/EditSettingsOld.vue +2 -30
- package/components/common/vm/actions/editSettings/new/New.vue +2 -30
- package/components/common/vm/actions/lib/models/interfaces.ts +4 -29
- package/components/common/vm/actions/lib/utils.ts +37 -32
- package/package.json +1 -3
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{PasswordNew.vue → New.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{PasswordOld.vue → Old.vue} +0 -0
|
@@ -20,23 +20,15 @@
|
|
|
20
20
|
|
|
21
21
|
<div v-else class="vm-context px-8">
|
|
22
22
|
<common-vm-actions-common-customize-hardware
|
|
23
|
-
v-model
|
|
24
|
-
v-model:guest-machine-type="vmSettings.guestMachineType"
|
|
25
|
-
v-model:guest-os-family="vmSettings.guestOsFamily"
|
|
26
|
-
v-model:guest-os-version="vmSettings.guestOsVersion"
|
|
23
|
+
v-model="vmSettings"
|
|
27
24
|
:project="props.project"
|
|
28
25
|
:storage="vmSettings.storage"
|
|
29
|
-
:hard-disks-for-boot-options="props.virtualHardwareHardDisks"
|
|
30
|
-
:cd-dvd-drives-for-boot-options="props.virtualHardwareCdDvdDrives"
|
|
31
|
-
:networks-for-boot-options="props.virtualHardwareNetworks"
|
|
32
26
|
:cd-dvd-drives="vmSettings.cdDvdDrives"
|
|
33
27
|
:hard-disks="vmSettings.hardDisks"
|
|
34
28
|
:networks="vmSettings.networks"
|
|
35
29
|
:max-cpus="vmSettings.maxCpus"
|
|
36
30
|
:max-memory="vmSettings.maxMemory"
|
|
37
31
|
:cpu-models="vmSettings.cpuModels"
|
|
38
|
-
:cpu="vmSettings.cpu"
|
|
39
|
-
:memory="vmSettings.memory"
|
|
40
32
|
:video-card="vmSettings.videoCard"
|
|
41
33
|
:usb-controller="vmSettings.usbController"
|
|
42
34
|
:pci-devices="vmSettings.pciDevices"
|
|
@@ -63,8 +55,6 @@
|
|
|
63
55
|
@show-datastore-child="emits('show-datastore-child', $event)"
|
|
64
56
|
@get-networks-table="emits('get-networks-table', $event)"
|
|
65
57
|
@get-pci-devices="emits('get-pci-devices')"
|
|
66
|
-
@change-boot-order="emits('change-boot-order', $event)"
|
|
67
|
-
@send-data="emits('change-customize-hardware', $event)"
|
|
68
58
|
/>
|
|
69
59
|
</div>
|
|
70
60
|
</template>
|
|
@@ -84,12 +74,6 @@ import type {
|
|
|
84
74
|
UI_I_VmSettings,
|
|
85
75
|
} from '~/lib/models/store/vm/interfaces'
|
|
86
76
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
87
|
-
import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
|
|
88
|
-
import type {
|
|
89
|
-
UI_I_SendDataNewCdDvdDrive,
|
|
90
|
-
UI_I_SendDataNewHardDisk,
|
|
91
|
-
UI_I_SendDataNewNetwork,
|
|
92
|
-
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
93
77
|
import type { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
|
|
94
78
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
95
79
|
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
@@ -97,11 +81,8 @@ import type {
|
|
|
97
81
|
UI_I_DatastoreTableItem,
|
|
98
82
|
UI_I_FolderOrFileTreePayload,
|
|
99
83
|
} from '~/lib/models/store/storage/interfaces'
|
|
100
|
-
import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
|
|
101
84
|
import { modalTexts } from '~/components/common/vm/actions/editSettings/lib/config/modal'
|
|
102
85
|
|
|
103
|
-
const vmName = defineModel<string>('vmName', { required: true })
|
|
104
|
-
|
|
105
86
|
const vmSettings = defineModel<UI_I_VmSettings | null>('vmSettings', {
|
|
106
87
|
required: true,
|
|
107
88
|
})
|
|
@@ -117,10 +98,7 @@ const props = withDefaults(
|
|
|
117
98
|
networksTable: UI_I_NetworkTableItem[]
|
|
118
99
|
selectedNavItem: UI_T_SelectedNavItem
|
|
119
100
|
vmCpuHelpTextSecond: string
|
|
120
|
-
errorValidationFields: UI_I_ErrorValidationField
|
|
121
|
-
virtualHardwareNetworks: UI_I_SendDataNewNetwork[] | null
|
|
122
|
-
virtualHardwareHardDisks: UI_I_SendDataNewHardDisk[] | null
|
|
123
|
-
virtualHardwareCdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
101
|
+
errorValidationFields: UI_I_ErrorValidationField[]
|
|
124
102
|
state?: string | number
|
|
125
103
|
vmNameOld?: string
|
|
126
104
|
passthroughDevices?: UI_I_PciDevice[]
|
|
@@ -143,18 +121,12 @@ const props = withDefaults(
|
|
|
143
121
|
const emits = defineEmits<{
|
|
144
122
|
(event: 'hide'): void
|
|
145
123
|
(event: 'validate'): void
|
|
146
|
-
(event: 'update-vm'): void
|
|
147
124
|
(event: 'get-storage', value: UI_I_TablePayload): void
|
|
148
125
|
(event: 'get-pci-devices'): void
|
|
149
|
-
(event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
|
|
150
126
|
(event: 'get-networks-table', value: UI_I_TablePayload): void
|
|
151
127
|
(event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
|
|
152
128
|
(event: 'show-datastore-child', value: UI_I_FileTreeNode): void
|
|
153
129
|
(event: 'get-active-device-child', value: UI_I_FileTreeNode): void
|
|
154
|
-
(
|
|
155
|
-
event: 'change-customize-hardware',
|
|
156
|
-
value: UI_I_SendDataCustomizeHardware
|
|
157
|
-
): void
|
|
158
130
|
}>()
|
|
159
131
|
|
|
160
132
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -1,40 +1,15 @@
|
|
|
1
|
-
import type { UI_I_ErrorMessage } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_VmSettings } from '~/lib/models/store/vm/interfaces'
|
|
3
1
|
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
UI_I_CreateVmDataNewDiskDevice,
|
|
7
|
-
UI_I_VmForm,
|
|
2
|
+
UI_I_CreateVmData,
|
|
3
|
+
UI_I_ErrorMessage,
|
|
8
4
|
} from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
9
|
-
import type {
|
|
10
|
-
UI_I_SendDataCpu,
|
|
11
|
-
UI_I_SendDataMemory,
|
|
12
|
-
UI_I_SendDataNewNetwork,
|
|
13
|
-
UI_I_SendDataNewPciDevice,
|
|
14
|
-
UI_I_SendDataVideoCard,
|
|
15
|
-
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
16
5
|
|
|
17
6
|
export interface UI_I_ConstructErrorMessagesData {
|
|
18
7
|
fields: string[]
|
|
19
8
|
messages: UI_I_ErrorMessage[]
|
|
20
9
|
}
|
|
21
10
|
|
|
22
|
-
export interface UI_I_VmConstructData
|
|
23
|
-
|
|
24
|
-
name: string,
|
|
25
|
-
vmData: UI_I_VmSettings | UI_I_VmForm,
|
|
26
|
-
videoCard: UI_I_SendDataVideoCard,
|
|
27
|
-
diskDevices: (
|
|
28
|
-
| UI_I_CreateVmDataNewDiskDevice
|
|
29
|
-
| UI_I_CreateVmDataExistDiskDevice
|
|
30
|
-
| UI_I_CreateVmDataCdDvdDevice
|
|
31
|
-
)[],
|
|
32
|
-
networks: UI_I_SendDataNewNetwork[],
|
|
33
|
-
storageId: string,
|
|
34
|
-
cpu: UI_I_SendDataCpu,
|
|
35
|
-
memory: UI_I_SendDataMemory,
|
|
36
|
-
usbController: string,
|
|
37
|
-
pciDevices: UI_I_SendDataNewPciDevice[]
|
|
11
|
+
export interface UI_I_VmConstructData {
|
|
12
|
+
form: UI_I_CreateVmData
|
|
38
13
|
// Sphere
|
|
39
14
|
uuid: string
|
|
40
15
|
}
|
|
@@ -102,37 +102,53 @@ export const constructDiskDevicesFunc = (
|
|
|
102
102
|
export const constructSendDataForm = (
|
|
103
103
|
data: UI_I_VmConstructData
|
|
104
104
|
): UI_I_CreateVmData => {
|
|
105
|
+
const { form, uuid = '' } = data
|
|
106
|
+
|
|
105
107
|
const {
|
|
106
|
-
options,
|
|
107
108
|
name,
|
|
108
|
-
|
|
109
|
-
videoCard,
|
|
110
|
-
diskDevices,
|
|
111
|
-
networks,
|
|
109
|
+
options,
|
|
112
110
|
storage,
|
|
111
|
+
compatibility,
|
|
112
|
+
guest_os_family,
|
|
113
|
+
guest_os_version,
|
|
114
|
+
machine_type,
|
|
115
|
+
video_card,
|
|
116
|
+
disk_devices,
|
|
117
|
+
network_devices,
|
|
118
|
+
passthrough_pci_devices,
|
|
113
119
|
cpu,
|
|
114
120
|
memory,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
121
|
+
usb_controllers,
|
|
122
|
+
input_devices,
|
|
123
|
+
} = form
|
|
124
|
+
|
|
125
|
+
const diskDevices: (
|
|
126
|
+
| UI_I_CreateVmDataNewDiskDevice
|
|
127
|
+
| UI_I_CreateVmDataExistDiskDevice
|
|
128
|
+
| UI_I_CreateVmDataCdDvdDevice
|
|
129
|
+
)[] = constructDiskDevicesFunc(
|
|
130
|
+
disk_devices.filter((disk) => disk.device_type !== 'cdrom'),
|
|
131
|
+
disk_devices.filter((disk) => disk.device_type === 'cdrom')
|
|
132
|
+
)
|
|
119
133
|
|
|
120
134
|
return {
|
|
121
|
-
options,
|
|
122
|
-
name,
|
|
123
135
|
uuid,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
136
|
+
name,
|
|
137
|
+
options,
|
|
138
|
+
compatibility,
|
|
139
|
+
usb_controllers,
|
|
140
|
+
input_devices,
|
|
141
|
+
storage: { id: storage?.id || '' },
|
|
142
|
+
guest_os_family: guest_os_family?.value,
|
|
143
|
+
guest_os_version: guest_os_version?.value,
|
|
144
|
+
machine_type: machine_type?.value,
|
|
145
|
+
video_card: video_card,
|
|
129
146
|
disk_devices: diskDevices,
|
|
130
|
-
network_devices:
|
|
131
|
-
passthrough_pci_devices:
|
|
132
|
-
storage,
|
|
147
|
+
network_devices: network_devices,
|
|
148
|
+
passthrough_pci_devices: passthrough_pci_devices,
|
|
133
149
|
cpu: {
|
|
134
150
|
vcpus: cpu.vcpus,
|
|
135
|
-
max_vcpus: cpu.max_vcpus,
|
|
151
|
+
max_vcpus: cpu.hotplug ? cpu.max_vcpus : 0,
|
|
136
152
|
core_per_socket: cpu.core_per_socket,
|
|
137
153
|
model: cpu.model,
|
|
138
154
|
reservation_mhz: cpu.reservation_mhz,
|
|
@@ -141,22 +157,11 @@ export const constructSendDataForm = (
|
|
|
141
157
|
hotplug: cpu.hotplug,
|
|
142
158
|
},
|
|
143
159
|
memory: {
|
|
144
|
-
size_mb: +memory.
|
|
160
|
+
size_mb: +memory.size_mb,
|
|
145
161
|
hotplug: memory.hotplug,
|
|
146
162
|
reservation_mb: +memory.reservation_mb,
|
|
147
163
|
limit_mb: +memory.limit_mb,
|
|
148
164
|
},
|
|
149
|
-
usb_controllers: [
|
|
150
|
-
{
|
|
151
|
-
type: usbController,
|
|
152
|
-
},
|
|
153
|
-
],
|
|
154
|
-
input_devices: [
|
|
155
|
-
{
|
|
156
|
-
type: 'keyboard',
|
|
157
|
-
bus: 'usb',
|
|
158
|
-
},
|
|
159
|
-
],
|
|
160
165
|
}
|
|
161
166
|
}
|
|
162
167
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.555",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
@@ -17,8 +17,6 @@
|
|
|
17
17
|
"@vueuse/nuxt": "10.1.2",
|
|
18
18
|
"eslint-config-prettier": "^8.5.0",
|
|
19
19
|
"nuxt": "3.11.2",
|
|
20
|
-
"@nuxt/kit": "3.11.2",
|
|
21
|
-
"@nuxt/schema": "3.11.2",
|
|
22
20
|
"prettier": "2.7.1",
|
|
23
21
|
"sass": "^1.54.9",
|
|
24
22
|
"sass-loader": "^10.3.1",
|
|
File without changes
|