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,9 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-new
|
|
3
3
|
v-if="isNewView"
|
|
4
|
+
v-model="model"
|
|
4
5
|
v-model:invalid="invalid"
|
|
5
|
-
v-model:number-displays="numberDisplays"
|
|
6
|
-
v-model:video-card-model="videoCardModel"
|
|
7
6
|
:is-edit="props.isEdit"
|
|
8
7
|
:error-validation-fields="props.errorValidationFields"
|
|
9
8
|
:video-card-model-name="videoCardModelName"
|
|
@@ -18,9 +17,8 @@
|
|
|
18
17
|
/>
|
|
19
18
|
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-old
|
|
20
19
|
v-else
|
|
20
|
+
v-model="model"
|
|
21
21
|
v-model:invalid="invalid"
|
|
22
|
-
v-model:number-displays="numberDisplays"
|
|
23
|
-
v-model:video-card-model="videoCardModel"
|
|
24
22
|
:is-edit="props.isEdit"
|
|
25
23
|
:error-validation-fields="props.errorValidationFields"
|
|
26
24
|
:video-card-model-name="videoCardModelName"
|
|
@@ -40,9 +38,12 @@ import type { UI_I_SendDataVideoCard } from '~/components/common/vm/actions/comm
|
|
|
40
38
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
41
39
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
42
40
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
41
|
+
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
43
42
|
import { videoCardModelOptionsConfigFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/lib/config/options'
|
|
44
43
|
import { numberDisplaysOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options'
|
|
45
44
|
|
|
45
|
+
const model = defineModel<UI_I_CreateVmData['video_card']>({ required: true })
|
|
46
|
+
|
|
46
47
|
const props = withDefaults(
|
|
47
48
|
defineProps<{
|
|
48
49
|
isEdit: boolean
|
|
@@ -56,7 +57,6 @@ const props = withDefaults(
|
|
|
56
57
|
}
|
|
57
58
|
)
|
|
58
59
|
const emits = defineEmits<{
|
|
59
|
-
(event: 'send-data', value: UI_I_SendDataVideoCard): void
|
|
60
60
|
(event: 'invalid', value: boolean): void
|
|
61
61
|
(event: 'remove-error-by-title', value: string): void
|
|
62
62
|
}>()
|
|
@@ -68,32 +68,30 @@ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
|
68
68
|
|
|
69
69
|
const isDisabled = computed<boolean>(() => props.isEdit && props.state !== 1)
|
|
70
70
|
const isDisabledNumberDisplays = computed<boolean>(
|
|
71
|
-
() =>
|
|
71
|
+
() => model.value.adapter === 'none'
|
|
72
72
|
)
|
|
73
73
|
watch(isDisabled, (newValue) => {
|
|
74
74
|
if (!newValue) {
|
|
75
75
|
return
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
model.value.displays = 1
|
|
79
79
|
})
|
|
80
80
|
|
|
81
|
-
const videoCardModel = ref<string>('qxl')
|
|
82
81
|
const videoCardModelOptions = computed<UI_I_OptionItem[]>(() =>
|
|
83
82
|
videoCardModelOptionsConfigFunc(localization.value)
|
|
84
83
|
)
|
|
85
84
|
const videoCardModelName = computed<string>(
|
|
86
85
|
() =>
|
|
87
86
|
videoCardModelOptions.value.find(
|
|
88
|
-
(videoCard) => videoCard.value ===
|
|
87
|
+
(videoCard) => videoCard.value === model.value.adapter
|
|
89
88
|
)?.text || ''
|
|
90
89
|
)
|
|
91
90
|
|
|
92
|
-
const numberDisplays = ref<string>('1')
|
|
93
91
|
const numberDisplaysOptions = computed<UI_I_OptionItem[]>(() => {
|
|
94
92
|
const result = numberDisplaysOptionsFunc()
|
|
95
|
-
if (
|
|
96
|
-
result.unshift({ text: '0', value:
|
|
93
|
+
if (model.value.adapter === 'none') {
|
|
94
|
+
result.unshift({ text: '0', value: 0 })
|
|
97
95
|
}
|
|
98
96
|
return result
|
|
99
97
|
})
|
|
@@ -110,37 +108,17 @@ watch(
|
|
|
110
108
|
|
|
111
109
|
// const graphics = ref(false)
|
|
112
110
|
|
|
113
|
-
const changeNumberDisplays = (
|
|
114
|
-
if (
|
|
115
|
-
|
|
116
|
-
} else if (
|
|
117
|
-
|
|
111
|
+
const changeNumberDisplays = (modelLocal: string): void => {
|
|
112
|
+
if (modelLocal === 'none') {
|
|
113
|
+
model.value.displays = 0
|
|
114
|
+
} else if (model.value.displays === 0) {
|
|
115
|
+
model.value.displays = 1
|
|
118
116
|
}
|
|
119
117
|
}
|
|
120
118
|
watch(
|
|
121
|
-
|
|
122
|
-
[numberDisplays, videoCardModel],
|
|
123
|
-
([_newValue1, newValue2]) => {
|
|
124
|
-
changeNumberDisplays(newValue2)
|
|
125
|
-
|
|
126
|
-
emits('send-data', {
|
|
127
|
-
adapter: videoCardModel.value,
|
|
128
|
-
displays: +numberDisplays.value,
|
|
129
|
-
// memory_mb: totalVideoMemory.value,
|
|
130
|
-
})
|
|
131
|
-
},
|
|
132
|
-
{ immediate: true }
|
|
133
|
-
)
|
|
134
|
-
|
|
135
|
-
// Добавляем данные для редактирования
|
|
136
|
-
watch(
|
|
137
|
-
() => props.videoCard,
|
|
119
|
+
() => model.value.adapter,
|
|
138
120
|
(newValue) => {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
videoCardModel.value = newValue.adapter
|
|
142
|
-
numberDisplays.value = '' + newValue.displays
|
|
143
|
-
// totalVideoMemory.value = newValue.memory_mb
|
|
121
|
+
changeNumberDisplays(newValue)
|
|
144
122
|
},
|
|
145
123
|
{ immediate: true }
|
|
146
124
|
)
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<template #stackBlockContent>
|
|
27
27
|
<ui-select
|
|
28
28
|
id="vm-wizard-video-card"
|
|
29
|
-
v-model="
|
|
29
|
+
v-model="model.adapter"
|
|
30
30
|
:items="props.videoCardModelOptions"
|
|
31
31
|
:disabled="props.isEdit && props.state !== 1"
|
|
32
32
|
:error-text="props.errorText"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
</template>
|
|
39
39
|
<template #stackChildren>
|
|
40
40
|
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays
|
|
41
|
-
v-model:number-displays="
|
|
41
|
+
v-model:number-displays="model.displays"
|
|
42
42
|
:number-displays-options="props.numberDisplaysOptions"
|
|
43
43
|
:disabled="props.isDisabled || props.isDisabledNumberDisplays"
|
|
44
44
|
:error-validation-fields="props.errorValidationFields"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
<!-- v-models:graphics="graphics"-->
|
|
57
57
|
<!-- />-->
|
|
58
58
|
<!-- <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-model-->
|
|
59
|
-
<!-- v-model:video-card-model="
|
|
59
|
+
<!-- v-model:video-card-model="model.adapter"-->
|
|
60
60
|
<!-- :disabled="props.isDisabled"-->
|
|
61
61
|
<!-- />-->
|
|
62
62
|
</template>
|
|
@@ -67,13 +67,14 @@
|
|
|
67
67
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
68
68
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
69
69
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
70
|
+
import type {UI_I_CreateVmData} from "~/components/common/vm/actions/common/lib/models/interfaces";
|
|
71
|
+
|
|
72
|
+
const model = defineModel<UI_I_CreateVmData['video_card']>({ required: true })
|
|
70
73
|
|
|
71
74
|
const invalid = defineModel<boolean>('invalid', { required: true })
|
|
72
|
-
const numberDisplays = defineModel<string>('numberDisplays', { required: true })
|
|
73
75
|
// const totalVideoMemory = defineModel<number>('totalVideoMemory', {
|
|
74
76
|
// required: true,
|
|
75
77
|
// })
|
|
76
|
-
const videoCardModel = defineModel<string>('videoCardModel', { required: true })
|
|
77
78
|
|
|
78
79
|
const props = withDefaults(
|
|
79
80
|
defineProps<{
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<div class="select">
|
|
31
31
|
<select
|
|
32
32
|
id="vm-wizard-video-card"
|
|
33
|
-
v-model="
|
|
33
|
+
v-model="model.adapter"
|
|
34
34
|
:disabled="props.isEdit && props.state !== 1"
|
|
35
35
|
data-id="vm-wizard-video-card-select"
|
|
36
36
|
class="vm-wizard-video-card input-text-color"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</template>
|
|
52
52
|
<template #stackChildren>
|
|
53
53
|
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays
|
|
54
|
-
v-model:number-displays="
|
|
54
|
+
v-model:number-displays="model.displays"
|
|
55
55
|
:number-displays-options="props.numberDisplaysOptions"
|
|
56
56
|
:disabled="props.isDisabled || props.isDisabledNumberDisplays"
|
|
57
57
|
:error-validation-fields="props.errorValidationFields"
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
<!-- v-models:graphics="graphics"-->
|
|
70
70
|
<!-- />-->
|
|
71
71
|
<!-- <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-model-->
|
|
72
|
-
<!-- v-model:video-card-model="
|
|
72
|
+
<!-- v-model:video-card-model="model.adapter"-->
|
|
73
73
|
<!-- :disabled="props.isDisabled"-->
|
|
74
74
|
<!-- />-->
|
|
75
75
|
</template>
|
|
@@ -81,13 +81,14 @@
|
|
|
81
81
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
82
82
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
83
83
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
84
|
+
import type {UI_I_CreateVmData} from "~/components/common/vm/actions/common/lib/models/interfaces";
|
|
85
|
+
|
|
86
|
+
const model = defineModel<UI_I_CreateVmData['video_card']>({ required: true })
|
|
84
87
|
|
|
85
88
|
const invalid = defineModel<boolean>('invalid', { required: true })
|
|
86
|
-
const numberDisplays = defineModel<string>('numberDisplays', { required: true })
|
|
87
89
|
// const totalVideoMemory = defineModel<number>('totalVideoMemory', {
|
|
88
90
|
// required: true,
|
|
89
91
|
// })
|
|
90
|
-
const videoCardModel = defineModel<string>('videoCardModel', { required: true })
|
|
91
92
|
|
|
92
93
|
const props = withDefaults(
|
|
93
94
|
defineProps<{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
2
2
|
|
|
3
3
|
export const numberDisplaysOptionsFunc = (): UI_I_OptionItem[] => [
|
|
4
|
-
{ text: '1', value:
|
|
5
|
-
{ text: '2', value:
|
|
6
|
-
{ text: '3', value:
|
|
7
|
-
{ text: '4', value:
|
|
4
|
+
{ text: '1', value: 1 },
|
|
5
|
+
{ text: '2', value: 2 },
|
|
6
|
+
{ text: '3', value: 3 },
|
|
7
|
+
{ text: '4', value: 4 },
|
|
8
8
|
// { text: '5', value: '5' },
|
|
9
9
|
// { text: '6', value: '6' },
|
|
10
10
|
// { text: '7', value: '7' },
|
|
@@ -1,80 +1,36 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-vm-actions-common-customize-hardware-vmoptions-new
|
|
3
3
|
v-if="isNewView"
|
|
4
|
-
v-model
|
|
5
|
-
v-model:guest-machine-type="guestMachineType"
|
|
6
|
-
v-model:guest-os-family="guestOsFamily"
|
|
7
|
-
v-model:guest-os-version="guestOsVersion"
|
|
4
|
+
v-model="model"
|
|
8
5
|
v-model:remote-console-options-invalid="remoteConsoleOptionsInvalid"
|
|
9
|
-
:hard-disks="props.hardDisks"
|
|
10
|
-
:cd-dvd-drives="props.cdDvdDrives"
|
|
11
|
-
:networks="props.networks"
|
|
12
6
|
:is-edit="props.isEdit"
|
|
13
7
|
:is-clone="props.isClone"
|
|
14
8
|
:error-validation-fields="props.errorValidationFields"
|
|
15
|
-
:options="props.options"
|
|
16
9
|
:state="props.state"
|
|
17
10
|
:compatibility-info="props.compatibilityInfo"
|
|
18
11
|
: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"
|
|
23
12
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
24
13
|
/>
|
|
25
14
|
<common-vm-actions-common-customize-hardware-vmoptions-old
|
|
26
15
|
v-else
|
|
27
|
-
v-model
|
|
28
|
-
v-model:guest-machine-type="guestMachineType"
|
|
29
|
-
v-model:guest-os-family="guestOsFamily"
|
|
30
|
-
v-model:guest-os-version="guestOsVersion"
|
|
16
|
+
v-model="model"
|
|
31
17
|
v-model:remote-console-options-invalid="remoteConsoleOptionsInvalid"
|
|
32
|
-
:hard-disks="props.hardDisks"
|
|
33
|
-
:cd-dvd-drives="props.cdDvdDrives"
|
|
34
|
-
:networks="props.networks"
|
|
35
18
|
:is-edit="props.isEdit"
|
|
36
19
|
:is-clone="props.isClone"
|
|
37
20
|
:error-validation-fields="props.errorValidationFields"
|
|
38
|
-
:options="props.options"
|
|
39
21
|
:state="props.state"
|
|
40
22
|
: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"
|
|
45
23
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
46
24
|
/>
|
|
47
25
|
</template>
|
|
48
26
|
|
|
49
27
|
<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'
|
|
61
28
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
62
29
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
63
|
-
import type {
|
|
30
|
+
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
31
|
+
|
|
32
|
+
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
64
33
|
|
|
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
|
-
})
|
|
78
34
|
const remoteConsoleOptionsInvalid = defineModel<boolean>(
|
|
79
35
|
'remoteConsoleOptionsInvalid',
|
|
80
36
|
{ required: true }
|
|
@@ -82,34 +38,20 @@ const remoteConsoleOptionsInvalid = defineModel<boolean>(
|
|
|
82
38
|
|
|
83
39
|
const props = withDefaults(
|
|
84
40
|
defineProps<{
|
|
85
|
-
hardDisks: UI_I_SendDataNewHardDisk[] | null
|
|
86
|
-
cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
87
|
-
networks: UI_I_SendDataNewNetwork[] | null
|
|
88
41
|
isEdit: boolean
|
|
89
42
|
isClone: boolean
|
|
90
43
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
91
|
-
options?: UI_I_SendDataVmoptions
|
|
92
44
|
state?: string | number
|
|
93
45
|
compatibilityInfo?: string
|
|
94
46
|
isVmt?: boolean
|
|
95
47
|
}>(),
|
|
96
48
|
{
|
|
97
|
-
options: undefined,
|
|
98
49
|
state: undefined,
|
|
99
50
|
compatibilityInfo: undefined,
|
|
100
|
-
isVmt:
|
|
51
|
+
isVmt: false,
|
|
101
52
|
}
|
|
102
53
|
)
|
|
103
54
|
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
|
|
113
55
|
(event: 'invalid', value: string[]): void
|
|
114
56
|
(event: 'remove-error-by-title', value: string): void
|
|
115
57
|
}>()
|
|
@@ -119,35 +61,6 @@ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
|
119
61
|
|
|
120
62
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
121
63
|
|
|
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
|
-
|
|
151
64
|
watch(
|
|
152
65
|
remoteConsoleOptionsInvalid,
|
|
153
66
|
(newValue) => {
|
|
@@ -1,41 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="vm-options">
|
|
3
3
|
<common-vm-actions-common-customize-hardware-vmoptions-general-options
|
|
4
|
-
v-model
|
|
5
|
-
v-model:guest-machine-type="guestMachineType"
|
|
6
|
-
v-model:guest-os-family="guestOsFamily"
|
|
7
|
-
v-model:guest-os-version="guestOsVersion"
|
|
4
|
+
v-model="model"
|
|
8
5
|
:is-edit="props.isEdit"
|
|
9
6
|
:is-clone="props.isClone"
|
|
10
7
|
:state="props.state"
|
|
11
8
|
:is-vmt="props.isVmt"
|
|
12
9
|
/>
|
|
13
10
|
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options
|
|
11
|
+
v-model="model.options.remote_console"
|
|
14
12
|
:error-validation-fields="props.errorValidationFields"
|
|
15
|
-
:remote-console-options="props.options?.remote_console"
|
|
16
13
|
:is-edit="props.isEdit"
|
|
17
14
|
:state="props.state"
|
|
18
|
-
@send-data="emits('send-data-remote-console-options', $event)"
|
|
19
15
|
@invalid="remoteConsoleOptionsInvalid = $event"
|
|
20
16
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
21
17
|
/>
|
|
22
18
|
<common-vm-actions-common-customize-hardware-vmoptions-tools
|
|
23
|
-
|
|
24
|
-
:balloon="props.options?.guest_tools?.balloon"
|
|
25
|
-
:is-edit="props.isEdit"
|
|
26
|
-
:state="props.state"
|
|
27
|
-
@send-data="emits('send-data-tools', $event)"
|
|
19
|
+
v-model="model.options.guest_tools"
|
|
28
20
|
/>
|
|
29
21
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options
|
|
22
|
+
v-model="model"
|
|
30
23
|
: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"
|
|
35
24
|
:is-edit="props.isEdit"
|
|
36
25
|
:state="props.state"
|
|
37
|
-
@change-boot-order="emits('change-boot-order', $event)"
|
|
38
|
-
@send-data="emits('send-data-boot-options', $event)"
|
|
39
26
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
40
27
|
/>
|
|
41
28
|
<div class="vm-hardware-version-wrap justify-end flex flex-1 mt-4">
|
|
@@ -47,33 +34,11 @@
|
|
|
47
34
|
</template>
|
|
48
35
|
|
|
49
36
|
<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'
|
|
61
37
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
62
|
-
import type {
|
|
38
|
+
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
39
|
+
|
|
40
|
+
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
63
41
|
|
|
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
|
-
})
|
|
77
42
|
const remoteConsoleOptionsInvalid = defineModel<boolean>(
|
|
78
43
|
'remoteConsoleOptionsInvalid',
|
|
79
44
|
{ required: true }
|
|
@@ -81,39 +46,20 @@ const remoteConsoleOptionsInvalid = defineModel<boolean>(
|
|
|
81
46
|
|
|
82
47
|
const props = withDefaults(
|
|
83
48
|
defineProps<{
|
|
84
|
-
hardDisks: UI_I_SendDataNewHardDisk[] | null
|
|
85
|
-
cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
86
|
-
networks: UI_I_SendDataNewNetwork[] | null
|
|
87
49
|
isEdit: boolean
|
|
88
50
|
isClone: boolean
|
|
89
51
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
90
|
-
options?: UI_I_SendDataVmoptions
|
|
91
52
|
state?: string | number
|
|
92
53
|
compatibilityInfo?: string
|
|
93
54
|
isVmt?: boolean
|
|
94
55
|
}>(),
|
|
95
56
|
{
|
|
96
|
-
options: undefined,
|
|
97
57
|
state: undefined,
|
|
98
58
|
compatibilityInfo: undefined,
|
|
99
|
-
isVmt:
|
|
59
|
+
isVmt: false,
|
|
100
60
|
}
|
|
101
61
|
)
|
|
102
62
|
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
|
|
117
63
|
(event: 'remove-error-by-title', value: string): void
|
|
118
64
|
}>()
|
|
119
65
|
</script>
|
|
@@ -3,41 +3,28 @@
|
|
|
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
|
|
7
|
-
v-model:guest-machine-type="guestMachineType"
|
|
8
|
-
v-model:guest-os-family="guestOsFamily"
|
|
9
|
-
v-model:guest-os-version="guestOsVersion"
|
|
6
|
+
v-model="model"
|
|
10
7
|
:is-edit="props.isEdit"
|
|
11
8
|
:is-clone="props.isClone"
|
|
12
9
|
:state="props.state"
|
|
13
10
|
:is-vmt="props.isVmt"
|
|
14
11
|
/>
|
|
15
12
|
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options
|
|
13
|
+
v-model="model.options.remote_console"
|
|
16
14
|
:error-validation-fields="props.errorValidationFields"
|
|
17
|
-
:remote-console-options="props.options?.remote_console"
|
|
18
15
|
:is-edit="props.isEdit"
|
|
19
16
|
:state="props.state"
|
|
20
|
-
@send-data="emits('send-data-remote-console-options', $event)"
|
|
21
17
|
@invalid="remoteConsoleOptionsInvalid = $event"
|
|
22
18
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
23
19
|
/>
|
|
24
20
|
<common-vm-actions-common-customize-hardware-vmoptions-tools
|
|
25
|
-
|
|
26
|
-
:balloon="props.options?.guest_tools?.balloon"
|
|
27
|
-
:is-edit="props.isEdit"
|
|
28
|
-
:state="props.state"
|
|
29
|
-
@send-data="emits('send-data-tools', $event)"
|
|
21
|
+
v-model="model.options.guest_tools"
|
|
30
22
|
/>
|
|
31
23
|
<common-vm-actions-common-customize-hardware-vmoptions-boot-options
|
|
24
|
+
v-model="model"
|
|
32
25
|
: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"
|
|
37
26
|
:is-edit="props.isEdit"
|
|
38
27
|
:state="props.state"
|
|
39
|
-
@change-boot-order="emits('change-boot-order', $event)"
|
|
40
|
-
@send-data="emits('send-data-boot-options', $event)"
|
|
41
28
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
42
29
|
/>
|
|
43
30
|
</div>
|
|
@@ -46,31 +33,11 @@
|
|
|
46
33
|
</template>
|
|
47
34
|
|
|
48
35
|
<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'
|
|
60
36
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
61
|
-
import type {
|
|
37
|
+
import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
|
|
38
|
+
|
|
39
|
+
const model = defineModel<UI_I_CreateVmData>({ required: true })
|
|
62
40
|
|
|
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
|
-
})
|
|
74
41
|
const remoteConsoleOptionsInvalid = defineModel<boolean>(
|
|
75
42
|
'remoteConsoleOptionsInvalid',
|
|
76
43
|
{ required: true }
|
|
@@ -78,37 +45,18 @@ const remoteConsoleOptionsInvalid = defineModel<boolean>(
|
|
|
78
45
|
|
|
79
46
|
const props = withDefaults(
|
|
80
47
|
defineProps<{
|
|
81
|
-
hardDisks: UI_I_SendDataNewHardDisk[] | null
|
|
82
|
-
cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
83
|
-
networks: UI_I_SendDataNewNetwork[] | null
|
|
84
48
|
isEdit: boolean
|
|
85
49
|
isClone: boolean
|
|
86
50
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
87
|
-
options?: UI_I_SendDataVmoptions
|
|
88
51
|
state?: string | number
|
|
89
52
|
isVmt?: boolean
|
|
90
53
|
}>(),
|
|
91
54
|
{
|
|
92
|
-
options: undefined,
|
|
93
55
|
state: undefined,
|
|
94
|
-
isVmt:
|
|
56
|
+
isVmt: false,
|
|
95
57
|
}
|
|
96
58
|
)
|
|
97
59
|
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
|
|
112
60
|
(event: 'remove-error-by-title', value: string): void
|
|
113
61
|
}>()
|
|
114
62
|
</script>
|