bfg-common 1.5.580 → 1.5.581
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/components/common/vm/actions/add/Add.vue +120 -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/clone/Clone.vue +116 -44
- package/components/common/vm/actions/clone/new/New.vue +50 -14
- package/components/common/vm/actions/clone/old/Old.vue +52 -16
- 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 +206 -211
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +120 -225
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +118 -220
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +53 -66
- 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/memory/Memory.vue +75 -62
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +149 -241
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +4 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskOld.vue +3 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +100 -62
- 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/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/vmoptions/Vmoptions.vue +93 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +60 -8
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsOld.vue +58 -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/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/tools/Tools.vue +27 -9
- package/components/common/vm/actions/common/lib/models/interfaces.ts +25 -58
- package/components/common/vm/actions/editSettings/EditSettings.vue +90 -32
- 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/lib/models/interfaces.ts +29 -4
- package/components/common/vm/actions/lib/utils.ts +36 -64
- package/package.json +1 -1
- /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
|
@@ -1,36 +1,80 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-vm-actions-common-customize-hardware-vmoptions-new
|
|
3
3
|
v-if="isNewView"
|
|
4
|
-
v-model="
|
|
4
|
+
v-model:vm-name="vmName"
|
|
5
|
+
v-model:guest-machine-type="guestMachineType"
|
|
6
|
+
v-model:guest-os-family="guestOsFamily"
|
|
7
|
+
v-model:guest-os-version="guestOsVersion"
|
|
5
8
|
v-model:remote-console-options-invalid="remoteConsoleOptionsInvalid"
|
|
9
|
+
:hard-disks="props.hardDisks"
|
|
10
|
+
:cd-dvd-drives="props.cdDvdDrives"
|
|
11
|
+
:networks="props.networks"
|
|
6
12
|
:is-edit="props.isEdit"
|
|
7
13
|
:is-clone="props.isClone"
|
|
8
14
|
:error-validation-fields="props.errorValidationFields"
|
|
15
|
+
:options="props.options"
|
|
9
16
|
:state="props.state"
|
|
10
17
|
:compatibility-info="props.compatibilityInfo"
|
|
11
18
|
:is-vmt="props.isVmt"
|
|
19
|
+
@change-boot-order="emits('change-boot-order', $event)"
|
|
20
|
+
@send-data-remote-console-options="sendDataRemoteConsoleOptionsMethod"
|
|
21
|
+
@send-data-tools="sendDataToolsMethod"
|
|
22
|
+
@send-data-boot-options="sendDataBootOptionsMethod"
|
|
12
23
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
13
24
|
/>
|
|
14
25
|
<common-vm-actions-common-customize-hardware-vmoptions-old
|
|
15
26
|
v-else
|
|
16
|
-
v-model="
|
|
27
|
+
v-model:vm-name="vmName"
|
|
28
|
+
v-model:guest-machine-type="guestMachineType"
|
|
29
|
+
v-model:guest-os-family="guestOsFamily"
|
|
30
|
+
v-model:guest-os-version="guestOsVersion"
|
|
17
31
|
v-model:remote-console-options-invalid="remoteConsoleOptionsInvalid"
|
|
32
|
+
:hard-disks="props.hardDisks"
|
|
33
|
+
:cd-dvd-drives="props.cdDvdDrives"
|
|
34
|
+
:networks="props.networks"
|
|
18
35
|
:is-edit="props.isEdit"
|
|
19
36
|
:is-clone="props.isClone"
|
|
20
37
|
:error-validation-fields="props.errorValidationFields"
|
|
38
|
+
:options="props.options"
|
|
21
39
|
:state="props.state"
|
|
22
40
|
:is-vmt="props.isVmt"
|
|
41
|
+
@change-boot-order="emits('change-boot-order', $event)"
|
|
42
|
+
@send-data-remote-console-options="sendDataRemoteConsoleOptionsMethod"
|
|
43
|
+
@send-data-tools="sendDataToolsMethod"
|
|
44
|
+
@send-data-boot-options="sendDataBootOptionsMethod"
|
|
23
45
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
24
46
|
/>
|
|
25
47
|
</template>
|
|
26
48
|
|
|
27
49
|
<script setup lang="ts">
|
|
50
|
+
import type {
|
|
51
|
+
UI_I_SendDataRemoteConsoleOptions,
|
|
52
|
+
UI_I_SendDataTools,
|
|
53
|
+
UI_I_SendDataBootOptions,
|
|
54
|
+
UI_I_SendDataVmoptions,
|
|
55
|
+
} from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
|
|
56
|
+
import type {
|
|
57
|
+
UI_I_SendDataNewCdDvdDrive,
|
|
58
|
+
UI_I_SendDataNewHardDisk,
|
|
59
|
+
UI_I_SendDataNewNetwork,
|
|
60
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
28
61
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
29
62
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
30
|
-
import type {
|
|
31
|
-
|
|
32
|
-
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
63
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
33
64
|
|
|
65
|
+
const vmName = defineModel<string>('vmName', { required: true })
|
|
66
|
+
const guestMachineType = defineModel<UI_I_OptionItem | null>(
|
|
67
|
+
'guestMachineType',
|
|
68
|
+
{
|
|
69
|
+
required: true,
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
const guestOsFamily = defineModel<UI_I_OptionItem | null>('guestOsFamily', {
|
|
73
|
+
required: true,
|
|
74
|
+
})
|
|
75
|
+
const guestOsVersion = defineModel<UI_I_OptionItem | null>('guestOsVersion', {
|
|
76
|
+
required: true,
|
|
77
|
+
})
|
|
34
78
|
const remoteConsoleOptionsInvalid = defineModel<boolean>(
|
|
35
79
|
'remoteConsoleOptionsInvalid',
|
|
36
80
|
{ required: true }
|
|
@@ -38,20 +82,34 @@ const remoteConsoleOptionsInvalid = defineModel<boolean>(
|
|
|
38
82
|
|
|
39
83
|
const props = withDefaults(
|
|
40
84
|
defineProps<{
|
|
85
|
+
hardDisks: UI_I_SendDataNewHardDisk[] | null
|
|
86
|
+
cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
87
|
+
networks: UI_I_SendDataNewNetwork[] | null
|
|
41
88
|
isEdit: boolean
|
|
42
89
|
isClone: boolean
|
|
43
90
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
91
|
+
options?: UI_I_SendDataVmoptions
|
|
44
92
|
state?: string | number
|
|
45
93
|
compatibilityInfo?: string
|
|
46
94
|
isVmt?: boolean
|
|
47
95
|
}>(),
|
|
48
96
|
{
|
|
97
|
+
options: undefined,
|
|
49
98
|
state: undefined,
|
|
50
99
|
compatibilityInfo: undefined,
|
|
51
|
-
isVmt:
|
|
100
|
+
isVmt: undefined,
|
|
52
101
|
}
|
|
53
102
|
)
|
|
54
103
|
const emits = defineEmits<{
|
|
104
|
+
(
|
|
105
|
+
event: 'change-boot-order',
|
|
106
|
+
value: [
|
|
107
|
+
UI_I_SendDataNewHardDisk[],
|
|
108
|
+
UI_I_SendDataNewCdDvdDrive[],
|
|
109
|
+
UI_I_SendDataNewNetwork[]
|
|
110
|
+
]
|
|
111
|
+
): void
|
|
112
|
+
(event: 'send-data', value: UI_I_SendDataVmoptions): void
|
|
55
113
|
(event: 'invalid', value: string[]): void
|
|
56
114
|
(event: 'remove-error-by-title', value: string): void
|
|
57
115
|
}>()
|
|
@@ -61,6 +119,35 @@ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
|
61
119
|
|
|
62
120
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
63
121
|
|
|
122
|
+
const sendDataRemoteConsoleOptions =
|
|
123
|
+
ref<UI_I_SendDataRemoteConsoleOptions | null>(null)
|
|
124
|
+
const sendDataRemoteConsoleOptionsMethod = (
|
|
125
|
+
data: UI_I_SendDataRemoteConsoleOptions
|
|
126
|
+
): void => {
|
|
127
|
+
sendDataRemoteConsoleOptions.value = data
|
|
128
|
+
sendData()
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const sendDataTools = ref<UI_I_SendDataTools | null>(null)
|
|
132
|
+
const sendDataToolsMethod = (data: UI_I_SendDataTools): void => {
|
|
133
|
+
sendDataTools.value = data
|
|
134
|
+
sendData()
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const sendDataBootOptions = ref<UI_I_SendDataBootOptions | null>(null)
|
|
138
|
+
const sendDataBootOptionsMethod = (data: UI_I_SendDataBootOptions): void => {
|
|
139
|
+
sendDataBootOptions.value = data
|
|
140
|
+
sendData()
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const sendData = (): void => {
|
|
144
|
+
emits('send-data', {
|
|
145
|
+
remote_console: sendDataRemoteConsoleOptions.value,
|
|
146
|
+
guest_tools: sendDataTools.value,
|
|
147
|
+
boot_options: sendDataBootOptions.value,
|
|
148
|
+
})
|
|
149
|
+
}
|
|
150
|
+
|
|
64
151
|
watch(
|
|
65
152
|
remoteConsoleOptionsInvalid,
|
|
66
153
|
(newValue) => {
|
|
@@ -1,30 +1,41 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="vm-options">
|
|
3
3
|
<common-vm-actions-common-customize-hardware-vmoptions-general-options
|
|
4
|
-
v-model="
|
|
4
|
+
v-model:vm-name="vmName"
|
|
5
|
+
v-model:guest-machine-type="guestMachineType"
|
|
6
|
+
v-model:guest-os-family="guestOsFamily"
|
|
7
|
+
v-model:guest-os-version="guestOsVersion"
|
|
5
8
|
:is-edit="props.isEdit"
|
|
6
9
|
:is-clone="props.isClone"
|
|
7
10
|
:state="props.state"
|
|
8
11
|
:is-vmt="props.isVmt"
|
|
9
12
|
/>
|
|
10
13
|
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options
|
|
11
|
-
v-model="model.options.remote_console"
|
|
12
14
|
:error-validation-fields="props.errorValidationFields"
|
|
15
|
+
:remote-console-options="props.options?.remote_console"
|
|
13
16
|
:is-edit="props.isEdit"
|
|
14
17
|
:state="props.state"
|
|
18
|
+
@send-data="emits('send-data-remote-console-options', $event)"
|
|
15
19
|
@invalid="remoteConsoleOptionsInvalid = $event"
|
|
16
20
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
17
21
|
/>
|
|
18
22
|
<common-vm-actions-common-customize-hardware-vmoptions-tools
|
|
19
|
-
|
|
23
|
+
:tools="props.options?.guest_tools?.enabled"
|
|
24
|
+
:balloon="props.options?.guest_tools?.balloon"
|
|
20
25
|
:is-edit="props.isEdit"
|
|
21
26
|
:state="props.state"
|
|
27
|
+
@send-data="emits('send-data-tools', $event)"
|
|
22
28
|
/>
|
|
23
29
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options
|
|
24
|
-
v-model="model"
|
|
25
30
|
:error-validation-fields="props.errorValidationFields"
|
|
31
|
+
:hard-disks="props.hardDisks"
|
|
32
|
+
:cd-dvd-drives="props.cdDvdDrives"
|
|
33
|
+
:networks="props.networks"
|
|
34
|
+
:boot-options="props.options?.boot_options"
|
|
26
35
|
:is-edit="props.isEdit"
|
|
27
36
|
:state="props.state"
|
|
37
|
+
@change-boot-order="emits('change-boot-order', $event)"
|
|
38
|
+
@send-data="emits('send-data-boot-options', $event)"
|
|
28
39
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
29
40
|
/>
|
|
30
41
|
<div class="vm-hardware-version-wrap justify-end flex flex-1 mt-4">
|
|
@@ -36,11 +47,33 @@
|
|
|
36
47
|
</template>
|
|
37
48
|
|
|
38
49
|
<script setup lang="ts">
|
|
50
|
+
import type {
|
|
51
|
+
UI_I_SendDataRemoteConsoleOptions,
|
|
52
|
+
UI_I_SendDataTools,
|
|
53
|
+
UI_I_SendDataBootOptions,
|
|
54
|
+
UI_I_SendDataVmoptions,
|
|
55
|
+
} from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
|
|
56
|
+
import type {
|
|
57
|
+
UI_I_SendDataNewCdDvdDrive,
|
|
58
|
+
UI_I_SendDataNewHardDisk,
|
|
59
|
+
UI_I_SendDataNewNetwork,
|
|
60
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
39
61
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
40
|
-
import type {
|
|
41
|
-
|
|
42
|
-
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
62
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
43
63
|
|
|
64
|
+
const vmName = defineModel<string>('vmName', { required: true })
|
|
65
|
+
const guestMachineType = defineModel<UI_I_OptionItem | null>(
|
|
66
|
+
'guestMachineType',
|
|
67
|
+
{
|
|
68
|
+
required: true,
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
const guestOsFamily = defineModel<UI_I_OptionItem | null>('guestOsFamily', {
|
|
72
|
+
required: true,
|
|
73
|
+
})
|
|
74
|
+
const guestOsVersion = defineModel<UI_I_OptionItem | null>('guestOsVersion', {
|
|
75
|
+
required: true,
|
|
76
|
+
})
|
|
44
77
|
const remoteConsoleOptionsInvalid = defineModel<boolean>(
|
|
45
78
|
'remoteConsoleOptionsInvalid',
|
|
46
79
|
{ required: true }
|
|
@@ -48,20 +81,39 @@ const remoteConsoleOptionsInvalid = defineModel<boolean>(
|
|
|
48
81
|
|
|
49
82
|
const props = withDefaults(
|
|
50
83
|
defineProps<{
|
|
84
|
+
hardDisks: UI_I_SendDataNewHardDisk[] | null
|
|
85
|
+
cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
86
|
+
networks: UI_I_SendDataNewNetwork[] | null
|
|
51
87
|
isEdit: boolean
|
|
52
88
|
isClone: boolean
|
|
53
89
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
90
|
+
options?: UI_I_SendDataVmoptions
|
|
54
91
|
state?: string | number
|
|
55
92
|
compatibilityInfo?: string
|
|
56
93
|
isVmt?: boolean
|
|
57
94
|
}>(),
|
|
58
95
|
{
|
|
96
|
+
options: undefined,
|
|
59
97
|
state: undefined,
|
|
60
98
|
compatibilityInfo: undefined,
|
|
61
|
-
isVmt:
|
|
99
|
+
isVmt: undefined,
|
|
62
100
|
}
|
|
63
101
|
)
|
|
64
102
|
const emits = defineEmits<{
|
|
103
|
+
(
|
|
104
|
+
event: 'change-boot-order',
|
|
105
|
+
value: [
|
|
106
|
+
UI_I_SendDataNewHardDisk[],
|
|
107
|
+
UI_I_SendDataNewCdDvdDrive[],
|
|
108
|
+
UI_I_SendDataNewNetwork[]
|
|
109
|
+
]
|
|
110
|
+
): void
|
|
111
|
+
(
|
|
112
|
+
event: 'send-data-remote-console-options',
|
|
113
|
+
value: UI_I_SendDataRemoteConsoleOptions
|
|
114
|
+
): void
|
|
115
|
+
(event: 'send-data-tools', value: UI_I_SendDataTools): void
|
|
116
|
+
(event: 'send-data-boot-options', value: UI_I_SendDataBootOptions): void
|
|
65
117
|
(event: 'remove-error-by-title', value: string): void
|
|
66
118
|
}>()
|
|
67
119
|
</script>
|
|
@@ -3,30 +3,41 @@
|
|
|
3
3
|
<div class="clr-component">
|
|
4
4
|
<div class="stack-view">
|
|
5
5
|
<common-vm-actions-common-customize-hardware-vmoptions-general-options
|
|
6
|
-
v-model="
|
|
6
|
+
v-model:vm-name="vmName"
|
|
7
|
+
v-model:guest-machine-type="guestMachineType"
|
|
8
|
+
v-model:guest-os-family="guestOsFamily"
|
|
9
|
+
v-model:guest-os-version="guestOsVersion"
|
|
7
10
|
:is-edit="props.isEdit"
|
|
8
11
|
:is-clone="props.isClone"
|
|
9
12
|
:state="props.state"
|
|
10
13
|
:is-vmt="props.isVmt"
|
|
11
14
|
/>
|
|
12
15
|
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options
|
|
13
|
-
v-model="model.options.remote_console"
|
|
14
16
|
:error-validation-fields="props.errorValidationFields"
|
|
17
|
+
:remote-console-options="props.options?.remote_console"
|
|
15
18
|
:is-edit="props.isEdit"
|
|
16
19
|
:state="props.state"
|
|
20
|
+
@send-data="emits('send-data-remote-console-options', $event)"
|
|
17
21
|
@invalid="remoteConsoleOptionsInvalid = $event"
|
|
18
22
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
19
23
|
/>
|
|
20
24
|
<common-vm-actions-common-customize-hardware-vmoptions-tools
|
|
21
|
-
|
|
25
|
+
:tools="props.options?.guest_tools?.enabled"
|
|
26
|
+
:balloon="props.options?.guest_tools?.balloon"
|
|
22
27
|
:is-edit="props.isEdit"
|
|
23
28
|
:state="props.state"
|
|
29
|
+
@send-data="emits('send-data-tools', $event)"
|
|
24
30
|
/>
|
|
25
31
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options
|
|
26
|
-
v-model="model"
|
|
27
32
|
:error-validation-fields="props.errorValidationFields"
|
|
33
|
+
:hard-disks="props.hardDisks"
|
|
34
|
+
:cd-dvd-drives="props.cdDvdDrives"
|
|
35
|
+
:networks="props.networks"
|
|
36
|
+
:boot-options="props.options?.boot_options"
|
|
28
37
|
:is-edit="props.isEdit"
|
|
29
38
|
:state="props.state"
|
|
39
|
+
@change-boot-order="emits('change-boot-order', $event)"
|
|
40
|
+
@send-data="emits('send-data-boot-options', $event)"
|
|
30
41
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
31
42
|
/>
|
|
32
43
|
</div>
|
|
@@ -35,11 +46,31 @@
|
|
|
35
46
|
</template>
|
|
36
47
|
|
|
37
48
|
<script setup lang="ts">
|
|
49
|
+
import type {
|
|
50
|
+
UI_I_SendDataRemoteConsoleOptions,
|
|
51
|
+
UI_I_SendDataTools,
|
|
52
|
+
UI_I_SendDataBootOptions,
|
|
53
|
+
UI_I_SendDataVmoptions,
|
|
54
|
+
} from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
|
|
55
|
+
import type {
|
|
56
|
+
UI_I_SendDataNewCdDvdDrive,
|
|
57
|
+
UI_I_SendDataNewHardDisk,
|
|
58
|
+
UI_I_SendDataNewNetwork,
|
|
59
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
38
60
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
39
|
-
import type {
|
|
40
|
-
|
|
41
|
-
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
61
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
42
62
|
|
|
63
|
+
const vmName = defineModel<string>('vmName', { required: true })
|
|
64
|
+
const guestMachineType = defineModel<UI_I_OptionItem | null>(
|
|
65
|
+
'guestMachineType',
|
|
66
|
+
{ required: true }
|
|
67
|
+
)
|
|
68
|
+
const guestOsFamily = defineModel<UI_I_OptionItem | null>('guestOsFamily', {
|
|
69
|
+
required: true,
|
|
70
|
+
})
|
|
71
|
+
const guestOsVersion = defineModel<UI_I_OptionItem | null>('guestOsVersion', {
|
|
72
|
+
required: true,
|
|
73
|
+
})
|
|
43
74
|
const remoteConsoleOptionsInvalid = defineModel<boolean>(
|
|
44
75
|
'remoteConsoleOptionsInvalid',
|
|
45
76
|
{ required: true }
|
|
@@ -47,18 +78,37 @@ const remoteConsoleOptionsInvalid = defineModel<boolean>(
|
|
|
47
78
|
|
|
48
79
|
const props = withDefaults(
|
|
49
80
|
defineProps<{
|
|
81
|
+
hardDisks: UI_I_SendDataNewHardDisk[] | null
|
|
82
|
+
cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
83
|
+
networks: UI_I_SendDataNewNetwork[] | null
|
|
50
84
|
isEdit: boolean
|
|
51
85
|
isClone: boolean
|
|
52
86
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
87
|
+
options?: UI_I_SendDataVmoptions
|
|
53
88
|
state?: string | number
|
|
54
89
|
isVmt?: boolean
|
|
55
90
|
}>(),
|
|
56
91
|
{
|
|
92
|
+
options: undefined,
|
|
57
93
|
state: undefined,
|
|
58
|
-
isVmt:
|
|
94
|
+
isVmt: undefined,
|
|
59
95
|
}
|
|
60
96
|
)
|
|
61
97
|
const emits = defineEmits<{
|
|
98
|
+
(
|
|
99
|
+
event: 'change-boot-order',
|
|
100
|
+
value: [
|
|
101
|
+
UI_I_SendDataNewHardDisk[],
|
|
102
|
+
UI_I_SendDataNewCdDvdDrive[],
|
|
103
|
+
UI_I_SendDataNewNetwork[]
|
|
104
|
+
]
|
|
105
|
+
): void
|
|
106
|
+
(
|
|
107
|
+
event: 'send-data-remote-console-options',
|
|
108
|
+
value: UI_I_SendDataRemoteConsoleOptions
|
|
109
|
+
): void
|
|
110
|
+
(event: 'send-data-tools', value: UI_I_SendDataTools): void
|
|
111
|
+
(event: 'send-data-boot-options', value: UI_I_SendDataBootOptions): void
|
|
62
112
|
(event: 'remove-error-by-title', value: string): void
|
|
63
113
|
}>()
|
|
64
114
|
</script>
|
package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue
CHANGED
|
@@ -1,39 +1,70 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options-new
|
|
3
3
|
v-if="isNewView"
|
|
4
|
-
v-model="
|
|
4
|
+
v-model:firmware="firmware"
|
|
5
|
+
v-model:secure-boot="secureBoot"
|
|
6
|
+
v-model:boot-menu="bootMenu"
|
|
7
|
+
v-model:boot-delay="bootDelay"
|
|
5
8
|
:error-validation-fields="props.errorValidationFields"
|
|
9
|
+
:hard-disks="props.hardDisks"
|
|
10
|
+
:cd-dvd-drives="props.cdDvdDrives"
|
|
11
|
+
:networks="props.networks"
|
|
6
12
|
:is-edit="props.isEdit"
|
|
7
13
|
:is-disabled="isDisabled"
|
|
14
|
+
@change-boot-order="emits('change-boot-order', $event)"
|
|
8
15
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
9
16
|
/>
|
|
10
17
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options-old
|
|
11
18
|
v-else
|
|
12
|
-
v-model="
|
|
19
|
+
v-model:firmware="firmware"
|
|
20
|
+
v-model:secure-boot="secureBoot"
|
|
21
|
+
v-model:boot-menu="bootMenu"
|
|
22
|
+
v-model:boot-delay="bootDelay"
|
|
13
23
|
:error-validation-fields="props.errorValidationFields"
|
|
24
|
+
:hard-disks="props.hardDisks"
|
|
25
|
+
:cd-dvd-drives="props.cdDvdDrives"
|
|
26
|
+
:networks="props.networks"
|
|
14
27
|
:is-edit="props.isEdit"
|
|
15
28
|
:is-disabled="isDisabled"
|
|
29
|
+
@change-boot-order="emits('change-boot-order', $event)"
|
|
16
30
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
17
31
|
/>
|
|
18
32
|
</template>
|
|
19
33
|
|
|
20
34
|
<script setup lang="ts">
|
|
35
|
+
import type { UI_I_SendDataBootOptions } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
|
|
36
|
+
import type {
|
|
37
|
+
UI_I_SendDataNewCdDvdDrive,
|
|
38
|
+
UI_I_SendDataNewHardDisk,
|
|
39
|
+
UI_I_SendDataNewNetwork,
|
|
40
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
21
41
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
22
|
-
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
23
|
-
|
|
24
|
-
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
25
42
|
|
|
26
43
|
const props = withDefaults(
|
|
27
44
|
defineProps<{
|
|
28
45
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
46
|
+
hardDisks: UI_I_SendDataNewHardDisk[] | null
|
|
47
|
+
cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
48
|
+
networks: UI_I_SendDataNewNetwork[] | null
|
|
29
49
|
isEdit: boolean
|
|
50
|
+
bootOptions?: UI_I_SendDataBootOptions
|
|
30
51
|
state?: string | number
|
|
31
52
|
}>(),
|
|
32
53
|
{
|
|
54
|
+
bootOptions: undefined,
|
|
33
55
|
state: undefined,
|
|
34
56
|
}
|
|
35
57
|
)
|
|
36
58
|
const emits = defineEmits<{
|
|
59
|
+
(
|
|
60
|
+
event: 'change-boot-order',
|
|
61
|
+
value: [
|
|
62
|
+
UI_I_SendDataNewHardDisk[],
|
|
63
|
+
UI_I_SendDataNewCdDvdDrive[],
|
|
64
|
+
UI_I_SendDataNewNetwork[]
|
|
65
|
+
]
|
|
66
|
+
): void
|
|
67
|
+
(event: 'send-data', value: UI_I_SendDataBootOptions): void
|
|
37
68
|
(event: 'remove-error-by-title', value: string): void
|
|
38
69
|
}>()
|
|
39
70
|
|
|
@@ -41,6 +72,39 @@ const { $store }: any = useNuxtApp()
|
|
|
41
72
|
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
42
73
|
|
|
43
74
|
const isDisabled = computed<boolean>(() => props.isEdit && props.state !== 1)
|
|
75
|
+
|
|
76
|
+
const firmware = ref<string>('efi')
|
|
77
|
+
|
|
78
|
+
const secureBoot = ref<boolean>(true)
|
|
79
|
+
|
|
80
|
+
const bootMenu = ref<boolean>(true)
|
|
81
|
+
|
|
82
|
+
const bootDelay = ref<number>(1000)
|
|
83
|
+
|
|
84
|
+
watch(
|
|
85
|
+
[firmware, secureBoot, bootMenu, bootDelay],
|
|
86
|
+
() => {
|
|
87
|
+
emits('send-data', {
|
|
88
|
+
firmware: firmware.value,
|
|
89
|
+
boot_delay_ms: bootDelay.value,
|
|
90
|
+
boot_menu: bootMenu.value,
|
|
91
|
+
})
|
|
92
|
+
},
|
|
93
|
+
{ immediate: true }
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
// Добавляем данные для редактирования
|
|
97
|
+
watch(
|
|
98
|
+
() => props.bootOptions,
|
|
99
|
+
(newValue) => {
|
|
100
|
+
if (!newValue || !props.bootOptions) return
|
|
101
|
+
|
|
102
|
+
firmware.value = props.bootOptions.firmware
|
|
103
|
+
bootDelay.value = props.bootOptions.boot_delay_ms
|
|
104
|
+
bootMenu.value = props.bootOptions.boot_menu
|
|
105
|
+
},
|
|
106
|
+
{ immediate: true }
|
|
107
|
+
)
|
|
44
108
|
</script>
|
|
45
109
|
|
|
46
110
|
<style scoped lang="scss"></style>
|
|
@@ -15,47 +15,67 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
<template #stackChildren>
|
|
17
17
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options-firmware
|
|
18
|
-
v-model:firmware="
|
|
18
|
+
v-model:firmware="firmware"
|
|
19
19
|
:error-validation-fields="props.errorValidationFields"
|
|
20
20
|
:is-edit="props.isEdit"
|
|
21
21
|
:is-disabled="isDisabled"
|
|
22
22
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
23
23
|
/>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<!-- />-->
|
|
24
|
+
<common-vm-actions-common-customize-hardware-vmoptions-boot-options-secure
|
|
25
|
+
v-if="firmware === 'uefi'"
|
|
26
|
+
v-model:secure-boot="secureBoot"
|
|
27
|
+
:is-disabled="isDisabled"
|
|
28
|
+
/>
|
|
30
29
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options-menu
|
|
31
|
-
v-model:boot-menu="
|
|
30
|
+
v-model:boot-menu="bootMenu"
|
|
32
31
|
:is-disabled="isDisabled"
|
|
33
32
|
/>
|
|
34
33
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options-delay
|
|
35
|
-
v-model:boot-delay="
|
|
34
|
+
v-model:boot-delay="bootDelay"
|
|
36
35
|
:is-disabled="isDisabled"
|
|
37
36
|
/>
|
|
38
37
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options-order
|
|
39
|
-
|
|
38
|
+
:hard-disks="props.hardDisks"
|
|
39
|
+
:cd-dvd-drives="props.cdDvdDrives"
|
|
40
|
+
:networks="props.networks"
|
|
40
41
|
:is-disabled="isDisabled"
|
|
42
|
+
@change="emits('change-boot-order', $event)"
|
|
41
43
|
/>
|
|
42
44
|
</template>
|
|
43
45
|
</ui-stack-block>
|
|
44
46
|
</template>
|
|
45
47
|
|
|
46
48
|
<script setup lang="ts">
|
|
49
|
+
import type {
|
|
50
|
+
UI_I_SendDataNewCdDvdDrive,
|
|
51
|
+
UI_I_SendDataNewHardDisk,
|
|
52
|
+
UI_I_SendDataNewNetwork,
|
|
53
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
47
54
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
48
55
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
49
|
-
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
50
56
|
|
|
51
|
-
const
|
|
57
|
+
const firmware = defineModel<string>('firmware', { required: true })
|
|
58
|
+
const secureBoot = defineModel<boolean>('secureBoot', { required: true })
|
|
59
|
+
const bootMenu = defineModel<boolean>('bootMenu', { required: true })
|
|
60
|
+
const bootDelay = defineModel<number>('bootDelay', { required: true })
|
|
52
61
|
|
|
53
62
|
const props = defineProps<{
|
|
54
63
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
64
|
+
hardDisks: UI_I_SendDataNewHardDisk[] | null
|
|
65
|
+
cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
66
|
+
networks: UI_I_SendDataNewNetwork[] | null
|
|
55
67
|
isEdit: boolean
|
|
56
68
|
isDisabled: boolean
|
|
57
69
|
}>()
|
|
58
70
|
const emits = defineEmits<{
|
|
71
|
+
(
|
|
72
|
+
event: 'change-boot-order',
|
|
73
|
+
value: [
|
|
74
|
+
UI_I_SendDataNewHardDisk[],
|
|
75
|
+
UI_I_SendDataNewCdDvdDrive[],
|
|
76
|
+
UI_I_SendDataNewNetwork[]
|
|
77
|
+
]
|
|
78
|
+
): void
|
|
59
79
|
(event: 'remove-error-by-title', value: string): void
|
|
60
80
|
}>()
|
|
61
81
|
|
|
@@ -12,29 +12,31 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
<template #stackChildren>
|
|
14
14
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options-firmware
|
|
15
|
-
v-model:firmware="
|
|
15
|
+
v-model:firmware="firmware"
|
|
16
16
|
:error-validation-fields="props.errorValidationFields"
|
|
17
17
|
:is-edit="props.isEdit"
|
|
18
18
|
:is-disabled="props.isDisabled"
|
|
19
19
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
20
20
|
/>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<!-- />-->
|
|
21
|
+
<common-vm-actions-common-customize-hardware-vmoptions-boot-options-secure
|
|
22
|
+
v-if="firmware === 'uefi'"
|
|
23
|
+
v-model:secure-boot="secureBoot"
|
|
24
|
+
:is-disabled="props.isDisabled"
|
|
25
|
+
/>
|
|
27
26
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options-menu
|
|
28
|
-
v-model:boot-menu="
|
|
27
|
+
v-model:boot-menu="bootMenu"
|
|
29
28
|
:is-disabled="props.isDisabled"
|
|
30
29
|
/>
|
|
31
30
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options-delay
|
|
32
|
-
v-model:boot-delay="
|
|
31
|
+
v-model:boot-delay="bootDelay"
|
|
33
32
|
:is-disabled="props.isDisabled"
|
|
34
33
|
/>
|
|
35
34
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options-order
|
|
36
|
-
|
|
35
|
+
:hard-disks="props.hardDisks"
|
|
36
|
+
:cd-dvd-drives="props.cdDvdDrives"
|
|
37
|
+
:networks="props.networks"
|
|
37
38
|
:is-disabled="props.isDisabled"
|
|
39
|
+
@change="emits('change-boot-order', $event)"
|
|
38
40
|
/>
|
|
39
41
|
</template>
|
|
40
42
|
</atoms-stack-block>
|
|
@@ -43,15 +45,25 @@
|
|
|
43
45
|
|
|
44
46
|
<script setup lang="ts">
|
|
45
47
|
import type { UI_I_SendDataBootOptions } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
|
|
48
|
+
import type {
|
|
49
|
+
UI_I_SendDataNewCdDvdDrive,
|
|
50
|
+
UI_I_SendDataNewHardDisk,
|
|
51
|
+
UI_I_SendDataNewNetwork,
|
|
52
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
46
53
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
47
54
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
48
|
-
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
49
55
|
|
|
50
|
-
const
|
|
56
|
+
const firmware = defineModel<string>('firmware', { required: true })
|
|
57
|
+
const secureBoot = defineModel<boolean>('secureBoot', { required: true })
|
|
58
|
+
const bootMenu = defineModel<boolean>('bootMenu', { required: true })
|
|
59
|
+
const bootDelay = defineModel<number>('bootDelay', { required: true })
|
|
51
60
|
|
|
52
61
|
const props = withDefaults(
|
|
53
62
|
defineProps<{
|
|
54
63
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
64
|
+
hardDisks: UI_I_SendDataNewHardDisk[] | null
|
|
65
|
+
cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
66
|
+
networks: UI_I_SendDataNewNetwork[] | null
|
|
55
67
|
isEdit: boolean
|
|
56
68
|
isDisabled: boolean
|
|
57
69
|
bootOptions?: UI_I_SendDataBootOptions
|
|
@@ -61,6 +73,15 @@ const props = withDefaults(
|
|
|
61
73
|
}
|
|
62
74
|
)
|
|
63
75
|
const emits = defineEmits<{
|
|
76
|
+
(
|
|
77
|
+
event: 'change-boot-order',
|
|
78
|
+
value: [
|
|
79
|
+
UI_I_SendDataNewHardDisk[],
|
|
80
|
+
UI_I_SendDataNewCdDvdDrive[],
|
|
81
|
+
UI_I_SendDataNewNetwork[]
|
|
82
|
+
]
|
|
83
|
+
): void
|
|
84
|
+
(event: 'send-data', value: UI_I_SendDataBootOptions): void
|
|
64
85
|
(event: 'remove-error-by-title', value: string): void
|
|
65
86
|
}>()
|
|
66
87
|
|