bfg-common 1.5.556 → 1.5.558
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 +14 -81
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +7 -56
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +8 -56
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +73 -142
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +60 -54
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +61 -55
- 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/newNetwork/NewNetwork.vue +58 -74
- 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 +4 -38
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsNew.vue +7 -26
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsOld.vue +24 -50
- package/components/common/vm/actions/common/lib/models/interfaces.ts +57 -25
- package/components/common/vm/actions/editSettings/EditSettings.vue +21 -35
- package/components/common/vm/actions/editSettings/EditSettingsOld.vue +14 -41
- package/components/common/vm/actions/editSettings/new/New.vue +14 -41
- 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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
2
|
+
<!-- TODO 700-->
|
|
3
|
+
<div v-show="false" class="hardware-tools">
|
|
3
4
|
<atoms-stack-block test-id="tools-stack-block" has-children>
|
|
4
5
|
<template #stackBlockKey>
|
|
5
6
|
<div
|
|
@@ -11,52 +12,31 @@
|
|
|
11
12
|
</div>
|
|
12
13
|
</template>
|
|
13
14
|
<template #stackChildren>
|
|
14
|
-
<!-- TODO 700-->
|
|
15
|
-
<!-- <atoms-stack-block-->
|
|
16
|
-
<!-- :has-children="false"-->
|
|
17
|
-
<!-- test-id="tools-stack-block-children"-->
|
|
18
|
-
<!-- >-->
|
|
19
|
-
<!-- <template #stackBlockKey>-->
|
|
20
|
-
<!-- {{ localization.common.toolsEnable }}-->
|
|
21
|
-
<!-- </template>-->
|
|
22
|
-
<!-- <template #stackBlockContent>-->
|
|
23
|
-
<!-- <div-->
|
|
24
|
-
<!-- :title="localization.common.inDevelopment"-->
|
|
25
|
-
<!-- class="cursor-not-allowed"-->
|
|
26
|
-
<!-- >-->
|
|
27
|
-
<!-- <input-->
|
|
28
|
-
<!-- id="tools-2"-->
|
|
29
|
-
<!-- v-model="tools"-->
|
|
30
|
-
<!-- disabled-->
|
|
31
|
-
<!-- data-id="tools-2-checkbox"-->
|
|
32
|
-
<!-- type="checkbox"-->
|
|
33
|
-
<!-- />-->
|
|
34
|
-
<!-- <label-->
|
|
35
|
-
<!-- for="tools-2"-->
|
|
36
|
-
<!-- class="label-text-normal cursor-not-allowed"-->
|
|
37
|
-
<!-- >{{ localization.common.enable }}</label-->
|
|
38
|
-
<!-- >-->
|
|
39
|
-
<!-- </div>-->
|
|
40
|
-
<!-- </template>-->
|
|
41
|
-
<!-- </atoms-stack-block>-->
|
|
42
15
|
<atoms-stack-block
|
|
43
|
-
|
|
44
|
-
|
|
16
|
+
:has-children="false"
|
|
17
|
+
test-id="tools-stack-block-children"
|
|
45
18
|
>
|
|
46
19
|
<template #stackBlockKey>
|
|
47
|
-
{{ localization.common.
|
|
20
|
+
{{ localization.common.toolsEnable }}
|
|
48
21
|
</template>
|
|
49
22
|
<template #stackBlockContent>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
23
|
+
<div
|
|
24
|
+
:title="localization.common.inDevelopment"
|
|
25
|
+
class="cursor-not-allowed"
|
|
26
|
+
>
|
|
27
|
+
<input
|
|
28
|
+
id="tools-2"
|
|
29
|
+
v-model="tools"
|
|
30
|
+
disabled
|
|
31
|
+
data-id="tools-2-checkbox"
|
|
32
|
+
type="checkbox"
|
|
33
|
+
/>
|
|
34
|
+
<label
|
|
35
|
+
for="tools-2"
|
|
36
|
+
class="label-text-normal cursor-not-allowed"
|
|
37
|
+
>{{ localization.common.enable }}</label
|
|
38
|
+
>
|
|
39
|
+
</div>
|
|
60
40
|
</template>
|
|
61
41
|
</atoms-stack-block>
|
|
62
42
|
</template>
|
|
@@ -67,20 +47,14 @@
|
|
|
67
47
|
<script setup lang="ts">
|
|
68
48
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
69
49
|
|
|
70
|
-
|
|
71
|
-
const balloon = defineModel<boolean>('balloon', { required: true })
|
|
72
|
-
|
|
73
|
-
const props = defineProps<{
|
|
74
|
-
disabled: boolean
|
|
75
|
-
}>()
|
|
50
|
+
const tools = defineModel<boolean>('tools', { required: true })
|
|
76
51
|
|
|
77
52
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
78
53
|
</script>
|
|
79
54
|
|
|
80
55
|
<style scoped lang="scss">
|
|
81
56
|
#tools-1,
|
|
82
|
-
#tools-2
|
|
83
|
-
#balloon {
|
|
57
|
+
#tools-2 {
|
|
84
58
|
margin: 0 4px 4px 0;
|
|
85
59
|
}
|
|
86
60
|
</style>
|
|
@@ -5,7 +5,13 @@ import type {
|
|
|
5
5
|
UI_I_SendDataNewPciDevice,
|
|
6
6
|
UI_I_SendDataVideoCard,
|
|
7
7
|
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
8
|
-
import type {
|
|
8
|
+
import type {
|
|
9
|
+
UI_I_SendDataBootOptions,
|
|
10
|
+
UI_I_SendDataRemoteConsoleOptions,
|
|
11
|
+
UI_I_SendDataRemoteConsoleOptionsSpice,
|
|
12
|
+
UI_I_SendDataTools,
|
|
13
|
+
UI_I_SendDataVmoptions,
|
|
14
|
+
} from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
|
|
9
15
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
10
16
|
import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
|
|
11
17
|
|
|
@@ -47,25 +53,6 @@ export interface UI_I_ErrorMessage {
|
|
|
47
53
|
descriptions: string[]
|
|
48
54
|
}
|
|
49
55
|
|
|
50
|
-
interface UI_I_CreateVmDataStorage {
|
|
51
|
-
id: string
|
|
52
|
-
}
|
|
53
|
-
interface UI_I_CreateVmDataCpu {
|
|
54
|
-
vcpus: number
|
|
55
|
-
max_vcpus: number
|
|
56
|
-
core_per_socket: number
|
|
57
|
-
model: string
|
|
58
|
-
reservation_mhz: number
|
|
59
|
-
limit_mhz: number
|
|
60
|
-
shares: number
|
|
61
|
-
hotplug: boolean
|
|
62
|
-
}
|
|
63
|
-
interface UI_I_CreateVmDataMemory {
|
|
64
|
-
size_mb: number
|
|
65
|
-
hotplug: boolean
|
|
66
|
-
reservation_mb: number
|
|
67
|
-
limit_mb: number
|
|
68
|
-
}
|
|
69
56
|
export interface UI_I_CreateVmDataUsbController {
|
|
70
57
|
type: string
|
|
71
58
|
}
|
|
@@ -148,10 +135,55 @@ export interface UI_I_CreateVmData {
|
|
|
148
135
|
)[]
|
|
149
136
|
network_devices: UI_I_SendDataNewNetwork[]
|
|
150
137
|
passthrough_pci_devices: UI_I_SendDataNewPciDevice[]
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
memory: UI_I_CreateVmDataMemory
|
|
155
|
-
usb_controllers: UI_I_CreateVmDataUsbController[]
|
|
138
|
+
usb_controllers: {
|
|
139
|
+
type: string
|
|
140
|
+
}[]
|
|
156
141
|
input_devices: UI_I_CreateVmDataInputDevices[]
|
|
142
|
+
cpu: {
|
|
143
|
+
vcpus: number
|
|
144
|
+
max_vcpus: number
|
|
145
|
+
core_per_socket: number
|
|
146
|
+
model: string
|
|
147
|
+
reservation_mhz: number
|
|
148
|
+
limit_mhz: number
|
|
149
|
+
shares: number
|
|
150
|
+
hotplug: boolean
|
|
151
|
+
}
|
|
152
|
+
memory: {
|
|
153
|
+
size_mb: number
|
|
154
|
+
hotplug: boolean
|
|
155
|
+
reservation_mb: number
|
|
156
|
+
limit_mb: number
|
|
157
|
+
}
|
|
158
|
+
storage: {
|
|
159
|
+
id: string
|
|
160
|
+
} | null
|
|
161
|
+
options: {
|
|
162
|
+
remote_console: {
|
|
163
|
+
type: string
|
|
164
|
+
port: number
|
|
165
|
+
keymap: string
|
|
166
|
+
password: string
|
|
167
|
+
guest_os_lock: boolean
|
|
168
|
+
limit_sessions: number
|
|
169
|
+
spice: {
|
|
170
|
+
img_compression: string
|
|
171
|
+
jpeg_compression: string
|
|
172
|
+
zlib_glz_compression: string
|
|
173
|
+
streaming_mode: string
|
|
174
|
+
playback_compression: boolean
|
|
175
|
+
file_transfer: boolean
|
|
176
|
+
clipboard: boolean
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
guest_tools: {
|
|
180
|
+
enabled: boolean
|
|
181
|
+
synchronized_time: boolean
|
|
182
|
+
}
|
|
183
|
+
boot_options: {
|
|
184
|
+
firmware: string
|
|
185
|
+
boot_delay_ms: number
|
|
186
|
+
boot_menu: boolean
|
|
187
|
+
}
|
|
188
|
+
}
|
|
157
189
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-vm-actions-edit-settings-new
|
|
3
3
|
v-if="isNewView"
|
|
4
|
-
v-model:vm-name="vmName"
|
|
5
4
|
v-model:vm-settings="vmSettingsLocal"
|
|
6
5
|
:nodes="props.nodes"
|
|
7
6
|
:files="props.files"
|
|
@@ -13,9 +12,6 @@
|
|
|
13
12
|
:selected-nav-item="selectedNavItem"
|
|
14
13
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
15
14
|
:error-validation-fields="props.errorValidationFields"
|
|
16
|
-
:virtual-hardware-networks="virtualHardwareNetworksLocal"
|
|
17
|
-
:virtual-hardware-hard-disks="virtualHardwareHardDisksLocal"
|
|
18
|
-
:virtual-hardware-cd-dvd-drives="virtualHardwareCdDvdDrivesLocal"
|
|
19
15
|
:state="props.state"
|
|
20
16
|
:vm-name-old="props.vmSettings?.name"
|
|
21
17
|
:passthrough-devices="props.passthroughDevices"
|
|
@@ -23,21 +19,19 @@
|
|
|
23
19
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
24
20
|
:customize-hardware-submit="customizeHardwareSubmit"
|
|
25
21
|
:is-vmt="props.isVmt"
|
|
22
|
+
:max-memory="maxMemory"
|
|
23
|
+
:cpu-models="cpuModels"
|
|
26
24
|
@hide="emits('hide')"
|
|
27
25
|
@validate="validateSendData"
|
|
28
|
-
@update-vm="emits('update-vm')"
|
|
29
26
|
@get-storage="emits('get-storage', $event)"
|
|
30
27
|
@get-pci-devices="emits('get-pci-devices')"
|
|
31
|
-
@change-boot-order="onChangeBootOrder"
|
|
32
28
|
@get-networks-table="emits('get-networks-table', $event)"
|
|
33
29
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
34
30
|
@show-datastore-child="emits('show-datastore-child', $event)"
|
|
35
31
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
36
|
-
@change-customize-hardware="onChangeCustomizeHardware"
|
|
37
32
|
/>
|
|
38
33
|
<common-vm-actions-edit-settings-old
|
|
39
34
|
v-else
|
|
40
|
-
v-model:vm-name="vmName"
|
|
41
35
|
v-model:vm-settings="vmSettingsLocal"
|
|
42
36
|
:nodes="props.nodes"
|
|
43
37
|
:files="props.files"
|
|
@@ -49,9 +43,6 @@
|
|
|
49
43
|
:selected-nav-item="selectedNavItem"
|
|
50
44
|
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
51
45
|
:error-validation-fields="props.errorValidationFields"
|
|
52
|
-
:virtual-hardware-networks="virtualHardwareNetworksLocal"
|
|
53
|
-
:virtual-hardware-hard-disks="virtualHardwareHardDisksLocal"
|
|
54
|
-
:virtual-hardware-cd-dvd-drives="virtualHardwareCdDvdDrivesLocal"
|
|
55
46
|
:state="props.state"
|
|
56
47
|
:vm-name-old="props.vmSettings?.name"
|
|
57
48
|
:passthrough-devices="props.passthroughDevices"
|
|
@@ -59,17 +50,16 @@
|
|
|
59
50
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
60
51
|
:customize-hardware-submit="customizeHardwareSubmit"
|
|
61
52
|
:is-vmt="props.isVmt"
|
|
53
|
+
:max-memory="maxMemory"
|
|
54
|
+
:cpu-models="cpuModels"
|
|
62
55
|
@hide="emits('hide')"
|
|
63
56
|
@validate="validateSendData"
|
|
64
|
-
@update-vm="emits('update-vm')"
|
|
65
57
|
@get-storage="emits('get-storage', $event)"
|
|
66
58
|
@get-pci-devices="emits('get-pci-devices')"
|
|
67
|
-
@change-boot-order="onChangeBootOrder"
|
|
68
59
|
@get-networks-table="emits('get-networks-table', $event)"
|
|
69
60
|
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
70
61
|
@show-datastore-child="emits('show-datastore-child', $event)"
|
|
71
62
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
72
|
-
@change-customize-hardware="onChangeCustomizeHardware"
|
|
73
63
|
/>
|
|
74
64
|
</template>
|
|
75
65
|
|
|
@@ -98,10 +88,11 @@ import type {
|
|
|
98
88
|
UI_I_DatastoreTableItem,
|
|
99
89
|
UI_I_FolderOrFileTreePayload,
|
|
100
90
|
} from '~/lib/models/store/storage/interfaces'
|
|
101
|
-
import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
|
|
102
91
|
import type { UI_T_EditVmFinishFunc } from '~/components/common/vm/actions/editSettings/lib/models/types'
|
|
103
92
|
import type { UI_I_Capabilities } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
93
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
104
94
|
import { mapCapabilities } from '~/components/common/vm/actions/common/lib/utils/capabilities'
|
|
95
|
+
import { capabilities } from '~/components/common/vm/actions/common/lib/config/capabilities'
|
|
105
96
|
|
|
106
97
|
const props = withDefaults(
|
|
107
98
|
defineProps<{
|
|
@@ -158,6 +149,9 @@ watch(
|
|
|
158
149
|
{ deep: true, immediate: true }
|
|
159
150
|
)
|
|
160
151
|
|
|
152
|
+
const cpuModels = ref<UI_I_OptionItem[]>(capabilities.value.cpuModels)
|
|
153
|
+
const maxMemory = ref<number>(capabilities.value.maxMemory)
|
|
154
|
+
|
|
161
155
|
const selectedNavItem = ref<UI_T_SelectedNavItem>(0)
|
|
162
156
|
|
|
163
157
|
const loadingLocal = ref<boolean>(false)
|
|
@@ -174,34 +168,26 @@ const vmSettingsLocal = computed<UI_I_VmSettings | null>(() => props.vmSettings)
|
|
|
174
168
|
const vmName = ref<string>(vmSettingsLocal.value?.name || '')
|
|
175
169
|
watch(vmSettingsLocal, (newValue) => {
|
|
176
170
|
vmName.value = newValue?.name || ''
|
|
177
|
-
|
|
171
|
+
console.log(newValue, 11111111111);
|
|
172
|
+
}, {deep: true})
|
|
178
173
|
|
|
179
174
|
const virtualHardwareHardDisks = ref<UI_I_SendDataNewHardDisk[] | null>(null)
|
|
180
175
|
const virtualHardwareCdDvdDrives = ref<UI_I_SendDataNewCdDvdDrive[] | null>(
|
|
181
176
|
null
|
|
182
177
|
)
|
|
183
178
|
const virtualHardwareNetworks = ref<UI_I_SendDataNewNetwork[] | null>(null)
|
|
184
|
-
const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
179
|
+
// const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
|
|
180
|
+
// virtualHardwareHardDisks.value = data[0]
|
|
181
|
+
// virtualHardwareCdDvdDrives.value = data[1]
|
|
182
|
+
// virtualHardwareNetworks.value = data[2]
|
|
183
|
+
// }
|
|
189
184
|
|
|
190
185
|
const customizeHardware = ref<UI_I_SendDataCustomizeHardware | null>(null)
|
|
191
|
-
const onChangeCustomizeHardware = (
|
|
192
|
-
|
|
193
|
-
): void => {
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
const virtualHardwareHardDisksLocal = computed<
|
|
197
|
-
UI_I_SendDataNewHardDisk[] | null
|
|
198
|
-
>(() => customizeHardware.value?.virtualHardware?.hardDisks || null)
|
|
199
|
-
const virtualHardwareNetworksLocal = computed<UI_I_SendDataNewNetwork[] | null>(
|
|
200
|
-
() => customizeHardware.value?.virtualHardware?.networks || null
|
|
201
|
-
)
|
|
202
|
-
const virtualHardwareCdDvdDrivesLocal = computed<
|
|
203
|
-
UI_I_SendDataNewCdDvdDrive[] | null
|
|
204
|
-
>(() => customizeHardware.value?.virtualHardware?.cdDvdDrives || null)
|
|
186
|
+
// const onChangeCustomizeHardware = (
|
|
187
|
+
// data: UI_I_SendDataCustomizeHardware
|
|
188
|
+
// ): void => {
|
|
189
|
+
// customizeHardware.value = data
|
|
190
|
+
// }
|
|
205
191
|
|
|
206
192
|
const virtualHardwareCpu = computed<UI_I_SendDataCpu | null>(
|
|
207
193
|
() => customizeHardware.value?.virtualHardware?.cpu || null
|
|
@@ -17,29 +17,19 @@
|
|
|
17
17
|
/>
|
|
18
18
|
<div v-if="vmSettings" class="vm-context">
|
|
19
19
|
<common-vm-actions-common-customize-hardware
|
|
20
|
-
v-model
|
|
21
|
-
v-model:guest-machine-type="vmSettings.guestMachineType"
|
|
22
|
-
v-model:guest-os-family="vmSettings.guestOsFamily"
|
|
23
|
-
v-model:guest-os-version="vmSettings.guestOsVersion"
|
|
20
|
+
v-model="vmSettings"
|
|
24
21
|
:project="props.project"
|
|
25
22
|
:storage="vmSettings.storage"
|
|
26
|
-
:
|
|
27
|
-
:
|
|
28
|
-
:
|
|
29
|
-
:
|
|
30
|
-
:
|
|
31
|
-
:
|
|
32
|
-
:
|
|
33
|
-
:
|
|
34
|
-
:cpu-models="vmSettings.cpuModels"
|
|
35
|
-
:cpu="vmSettings.cpu"
|
|
36
|
-
:memory="vmSettings.memory"
|
|
37
|
-
:video-card="vmSettings.videoCard"
|
|
38
|
-
:usb-controller="vmSettings.usbController"
|
|
39
|
-
:pci-devices="vmSettings.pciDevices"
|
|
40
|
-
:selected-nav-item="selectedNavItem"
|
|
41
|
-
:hard-disks-for-edit="vmSettings.hardDisks"
|
|
23
|
+
:cd-dvd-drives="vmSettings.disk_devices.filter((disk) => disk.device_type === 'cdrom')"
|
|
24
|
+
:hard-disks="vmSettings.disk_devices.filter((disk) => disk.device_type !== 'cdrom')"
|
|
25
|
+
:max-memory="props.maxMemory"
|
|
26
|
+
:cpu-models="props.cpuModels"
|
|
27
|
+
:video-card="vmSettings.video_card"
|
|
28
|
+
:usb-controller="vmSettings.usb_controllers"
|
|
29
|
+
:pci-devices="vmSettings.passthrough_pci_devices"
|
|
30
|
+
:hard-disks-for-edit="vmSettings.disk_devices.filter((disk) => disk.device_type !== 'cdrom')"
|
|
42
31
|
:options="vmSettings.options"
|
|
32
|
+
:selected-nav-item="props.selectedNavItem"
|
|
43
33
|
:nodes="props.nodes"
|
|
44
34
|
:files="props.files"
|
|
45
35
|
:networks-table="props.networksTable"
|
|
@@ -60,8 +50,6 @@
|
|
|
60
50
|
@show-datastore-child="emits('show-datastore-child', $event)"
|
|
61
51
|
@get-networks-table="emits('get-networks-table', $event)"
|
|
62
52
|
@get-pci-devices="emits('get-pci-devices')"
|
|
63
|
-
@change-boot-order="emits('change-boot-order', $event)"
|
|
64
|
-
@send-data="emits('change-customize-hardware', $event)"
|
|
65
53
|
/>
|
|
66
54
|
</div>
|
|
67
55
|
</template>
|
|
@@ -78,12 +66,6 @@ import type {
|
|
|
78
66
|
UI_I_VmSettings,
|
|
79
67
|
} from '~/lib/models/store/vm/interfaces'
|
|
80
68
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
81
|
-
import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
|
|
82
|
-
import type {
|
|
83
|
-
UI_I_SendDataNewCdDvdDrive,
|
|
84
|
-
UI_I_SendDataNewHardDisk,
|
|
85
|
-
UI_I_SendDataNewNetwork,
|
|
86
|
-
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
87
69
|
import type { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
|
|
88
70
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
89
71
|
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
@@ -91,9 +73,7 @@ import type {
|
|
|
91
73
|
UI_I_DatastoreTableItem,
|
|
92
74
|
UI_I_FolderOrFileTreePayload,
|
|
93
75
|
} from '~/lib/models/store/storage/interfaces'
|
|
94
|
-
import type {
|
|
95
|
-
|
|
96
|
-
const vmName = defineModel<string>('vmName', { required: true })
|
|
76
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
97
77
|
|
|
98
78
|
const vmSettings = defineModel<UI_I_VmSettings | null>('vmSettings', {
|
|
99
79
|
required: true,
|
|
@@ -110,10 +90,9 @@ const props = withDefaults(
|
|
|
110
90
|
networksTable: UI_I_NetworkTableItem[]
|
|
111
91
|
selectedNavItem: UI_T_SelectedNavItem
|
|
112
92
|
vmCpuHelpTextSecond: string
|
|
113
|
-
errorValidationFields: UI_I_ErrorValidationField
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
virtualHardwareCdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
93
|
+
errorValidationFields: UI_I_ErrorValidationField[]
|
|
94
|
+
maxMemory: number
|
|
95
|
+
cpuModels: UI_I_OptionItem[]
|
|
117
96
|
state?: string | number
|
|
118
97
|
vmNameOld?: string
|
|
119
98
|
passthroughDevices?: UI_I_PciDevice[]
|
|
@@ -136,18 +115,12 @@ const props = withDefaults(
|
|
|
136
115
|
const emits = defineEmits<{
|
|
137
116
|
(event: 'hide'): void
|
|
138
117
|
(event: 'validate'): void
|
|
139
|
-
(event: 'update-vm'): void
|
|
140
118
|
(event: 'get-storage', value: UI_I_TablePayload): void
|
|
141
119
|
(event: 'get-pci-devices'): void
|
|
142
|
-
(event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
|
|
143
120
|
(event: 'get-networks-table', value: UI_I_TablePayload): void
|
|
144
121
|
(event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
|
|
145
122
|
(event: 'show-datastore-child', value: UI_I_FileTreeNode): void
|
|
146
123
|
(event: 'get-active-device-child', value: UI_I_FileTreeNode): void
|
|
147
|
-
(
|
|
148
|
-
event: 'change-customize-hardware',
|
|
149
|
-
value: UI_I_SendDataCustomizeHardware
|
|
150
|
-
): void
|
|
151
124
|
}>()
|
|
152
125
|
|
|
153
126
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -20,29 +20,19 @@
|
|
|
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
|
-
:
|
|
30
|
-
:
|
|
31
|
-
:
|
|
32
|
-
:
|
|
33
|
-
:
|
|
34
|
-
:
|
|
35
|
-
:
|
|
36
|
-
:
|
|
37
|
-
:cpu-models="vmSettings.cpuModels"
|
|
38
|
-
:cpu="vmSettings.cpu"
|
|
39
|
-
:memory="vmSettings.memory"
|
|
40
|
-
:video-card="vmSettings.videoCard"
|
|
41
|
-
:usb-controller="vmSettings.usbController"
|
|
42
|
-
:pci-devices="vmSettings.pciDevices"
|
|
43
|
-
:selected-nav-item="props.selectedNavItem"
|
|
44
|
-
:hard-disks-for-edit="vmSettings.hardDisks"
|
|
26
|
+
:cd-dvd-drives="vmSettings.disk_devices.filter((disk) => disk.device_type === 'cdrom')"
|
|
27
|
+
:hard-disks="vmSettings.disk_devices.filter((disk) => disk.device_type !== 'cdrom')"
|
|
28
|
+
:max-memory="props.maxMemory"
|
|
29
|
+
:cpu-models="props.cpuModels"
|
|
30
|
+
:video-card="vmSettings.video_card"
|
|
31
|
+
:usb-controller="vmSettings.usb_controllers"
|
|
32
|
+
:pci-devices="vmSettings.passthrough_pci_devices"
|
|
33
|
+
:hard-disks-for-edit="vmSettings.disk_devices.filter((disk) => disk.device_type !== 'cdrom')"
|
|
45
34
|
:options="vmSettings.options"
|
|
35
|
+
:selected-nav-item="props.selectedNavItem"
|
|
46
36
|
:nodes="props.nodes"
|
|
47
37
|
:files="props.files"
|
|
48
38
|
:networks-table="props.networksTable"
|
|
@@ -63,8 +53,6 @@
|
|
|
63
53
|
@show-datastore-child="emits('show-datastore-child', $event)"
|
|
64
54
|
@get-networks-table="emits('get-networks-table', $event)"
|
|
65
55
|
@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
56
|
/>
|
|
69
57
|
</div>
|
|
70
58
|
</template>
|
|
@@ -84,12 +72,6 @@ import type {
|
|
|
84
72
|
UI_I_VmSettings,
|
|
85
73
|
} from '~/lib/models/store/vm/interfaces'
|
|
86
74
|
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
75
|
import type { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
|
|
94
76
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
95
77
|
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
@@ -97,11 +79,9 @@ import type {
|
|
|
97
79
|
UI_I_DatastoreTableItem,
|
|
98
80
|
UI_I_FolderOrFileTreePayload,
|
|
99
81
|
} from '~/lib/models/store/storage/interfaces'
|
|
100
|
-
import type {
|
|
82
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
101
83
|
import { modalTexts } from '~/components/common/vm/actions/editSettings/lib/config/modal'
|
|
102
84
|
|
|
103
|
-
const vmName = defineModel<string>('vmName', { required: true })
|
|
104
|
-
|
|
105
85
|
const vmSettings = defineModel<UI_I_VmSettings | null>('vmSettings', {
|
|
106
86
|
required: true,
|
|
107
87
|
})
|
|
@@ -117,10 +97,9 @@ const props = withDefaults(
|
|
|
117
97
|
networksTable: UI_I_NetworkTableItem[]
|
|
118
98
|
selectedNavItem: UI_T_SelectedNavItem
|
|
119
99
|
vmCpuHelpTextSecond: string
|
|
120
|
-
errorValidationFields: UI_I_ErrorValidationField
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
virtualHardwareCdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
100
|
+
errorValidationFields: UI_I_ErrorValidationField[]
|
|
101
|
+
maxMemory: number
|
|
102
|
+
cpuModels: UI_I_OptionItem[]
|
|
124
103
|
state?: string | number
|
|
125
104
|
vmNameOld?: string
|
|
126
105
|
passthroughDevices?: UI_I_PciDevice[]
|
|
@@ -143,18 +122,12 @@ const props = withDefaults(
|
|
|
143
122
|
const emits = defineEmits<{
|
|
144
123
|
(event: 'hide'): void
|
|
145
124
|
(event: 'validate'): void
|
|
146
|
-
(event: 'update-vm'): void
|
|
147
125
|
(event: 'get-storage', value: UI_I_TablePayload): void
|
|
148
126
|
(event: 'get-pci-devices'): void
|
|
149
|
-
(event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
|
|
150
127
|
(event: 'get-networks-table', value: UI_I_TablePayload): void
|
|
151
128
|
(event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
|
|
152
129
|
(event: 'show-datastore-child', value: UI_I_FileTreeNode): void
|
|
153
130
|
(event: 'get-active-device-child', value: UI_I_FileTreeNode): void
|
|
154
|
-
(
|
|
155
|
-
event: 'change-customize-hardware',
|
|
156
|
-
value: UI_I_SendDataCustomizeHardware
|
|
157
|
-
): void
|
|
158
131
|
}>()
|
|
159
132
|
|
|
160
133
|
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
|
}
|