bfg-common 1.5.548 → 1.5.550
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CODE_STYLE.md +109 -109
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +170 -170
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/table/dataGrid/DataGrid.vue +1718 -1718
- package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
- package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
- package/components/common/backup/storage/actions/add/Add.vue +251 -251
- package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/diagramMain/modals/lib/config/portModal.ts +251 -251
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
- package/components/common/pages/backups/DetailView.vue +52 -52
- package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
- package/components/common/pages/backups/modals/Modals.vue +243 -243
- package/components/common/pages/backups/modals/createBackup/New.vue +2 -8
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
- package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +69 -69
- package/components/common/pages/backups/modals/lib/config/restore.ts +115 -115
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +186 -186
- package/components/common/pages/backups/modals/restore/Restore.vue +5 -9
- package/components/common/pages/backups/modals/restore/RestoreNew.vue +3 -12
- package/components/common/pages/backups/modals/restore/RestoreOld.vue +18 -6
- package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
- package/components/common/pages/home/lib/models/interfaces.ts +48 -48
- package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
- package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
- package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
- package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
- package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
- package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
- package/components/common/select/radio/RadioGroup.vue +137 -137
- package/components/common/spiceConsole/Drawer.vue +420 -420
- package/components/common/spiceConsole/SpiceConsole.vue +184 -184
- package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
- package/components/common/tools/Actions.vue +207 -207
- package/components/common/treeView/TreeView.vue +52 -52
- package/components/common/vm/actions/add/Add.vue +877 -950
- package/components/common/vm/actions/add/New.vue +652 -690
- package/components/common/vm/actions/add/Old.vue +363 -402
- package/components/common/vm/actions/add/lib/config/steps.ts +347 -347
- package/components/common/vm/actions/clone/Clone.vue +809 -809
- package/components/common/vm/actions/clone/new/New.vue +457 -457
- package/components/common/vm/actions/clone/old/Old.vue +378 -378
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +243 -308
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +328 -373
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +161 -205
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +694 -728
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +512 -523
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +328 -339
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +348 -368
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuNew.vue +241 -248
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuOld.vue +184 -189
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +300 -313
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryNew.vue +158 -158
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryOld.vue +155 -155
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +427 -427
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +154 -154
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +47 -58
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +68 -65
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerOld.vue +64 -61
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +140 -162
- 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/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +53 -53
- package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +76 -163
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +87 -138
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsOld.vue +71 -120
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +46 -110
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +65 -85
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsOld.vue +70 -91
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +60 -60
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +156 -174
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +109 -74
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderOld.vue +104 -66
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +86 -101
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +163 -173
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsOld.vue +162 -170
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +142 -148
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/Old.vue +135 -141
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +74 -178
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{KeymapNew.vue → New.vue} +45 -45
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{KeymapOld.vue → Old.vue} +47 -47
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +102 -103
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +26 -49
- package/components/common/vm/actions/common/lib/models/interfaces.ts +189 -157
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- package/components/common/vm/actions/common/select/createType/CreateType.vue +38 -38
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/os/Old.vue +152 -152
- package/components/common/vm/actions/common/select/os/Os.vue +139 -139
- package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
- package/components/common/vm/actions/common/select/storage/Storage.vue +178 -178
- package/components/common/vm/actions/common/select/storage/new/New.vue +311 -311
- package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
- package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/vm/actions/lib/models/interfaces.ts +15 -40
- package/components/common/vm/actions/lib/utils.ts +244 -239
- package/components/common/vm/actions/register/Register.vue +352 -352
- package/components/common/vm/actions/register/lib/config/steps.ts +86 -86
- package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
- package/components/common/wizards/common/compatibility/New.vue +99 -99
- package/components/common/wizards/common/compatibility/Old.vue +53 -53
- package/components/common/wizards/common/steps/computeResource/ComputeResource.vue +86 -86
- package/components/common/wizards/common/steps/computeResource/New.vue +93 -93
- package/components/common/wizards/common/steps/computeResource/Old.vue +103 -103
- package/components/common/wizards/common/steps/name/Name.vue +178 -178
- package/components/common/wizards/common/steps/name/New.vue +221 -221
- package/components/common/wizards/common/steps/name/Old.vue +121 -121
- package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
- package/components/common/wizards/common/steps/name/location/Location.vue +85 -85
- package/components/common/wizards/common/steps/name/location/New.vue +40 -40
- package/components/common/wizards/datastore/add/Add.vue +228 -228
- package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
- package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
- package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +205 -205
- package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
- package/composables/useAppVersion.ts +21 -21
- package/composables/useLocal.ts +6 -6
- package/composables/useLocalCommon.ts +39 -39
- package/package.json +1 -3
- package/plugins/console.ts +21 -21
- package/plugins/date.ts +233 -233
- package/plugins/mouse.ts +21 -21
- package/plugins/panelStates.ts +70 -70
- package/plugins/text.ts +59 -59
- package/public/spice-console/application/clientgui.js +854 -854
- package/public/spice-console/application/packetfactory.js +211 -211
- package/public/spice-console/application/virtualmouse.js +147 -147
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +440 -440
- package/public/spice-console/process/cursorprocess.js +121 -121
- package/public/spice-console/process/inputprocess.js +227 -227
- package/public/spice-console/process/mainprocess.js +210 -210
- package/public/spice-console/run.js +210 -210
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- /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,162 +1,140 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-new
|
|
3
|
-
v-if="isNewView"
|
|
4
|
-
v-model
|
|
5
|
-
v-model:
|
|
6
|
-
|
|
7
|
-
:
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
:
|
|
11
|
-
:is-disabled="
|
|
12
|
-
:
|
|
13
|
-
:
|
|
14
|
-
:
|
|
15
|
-
|
|
16
|
-
@remove-error="
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
v-
|
|
21
|
-
v-model:invalid="invalid"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
:
|
|
25
|
-
:error-
|
|
26
|
-
:
|
|
27
|
-
:
|
|
28
|
-
:
|
|
29
|
-
:
|
|
30
|
-
:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
import type {
|
|
40
|
-
import type {
|
|
41
|
-
import type {
|
|
42
|
-
import
|
|
43
|
-
import {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
(event: 'invalid', value: boolean): void
|
|
61
|
-
(event: 'remove-error-by-title', value: string): void
|
|
62
|
-
}>()
|
|
63
|
-
|
|
64
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
65
|
-
|
|
66
|
-
const { $store }: any = useNuxtApp()
|
|
67
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
68
|
-
|
|
69
|
-
const isDisabled = computed<boolean>(() => props.isEdit && props.state !== 1)
|
|
70
|
-
const isDisabledNumberDisplays = computed<boolean>(
|
|
71
|
-
() =>
|
|
72
|
-
)
|
|
73
|
-
watch(isDisabled, (newValue) => {
|
|
74
|
-
if (!newValue) {
|
|
75
|
-
return
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
if (model ===
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
)
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
videoCardModel.value = newValue.adapter
|
|
142
|
-
numberDisplays.value = '' + newValue.displays
|
|
143
|
-
// totalVideoMemory.value = newValue.memory_mb
|
|
144
|
-
},
|
|
145
|
-
{ immediate: true }
|
|
146
|
-
)
|
|
147
|
-
|
|
148
|
-
const typeError = 'video_card.adapter'
|
|
149
|
-
|
|
150
|
-
const apiError = computed<string>(() => {
|
|
151
|
-
return (
|
|
152
|
-
props.errorValidationFields?.find((message) => message.field === typeError)
|
|
153
|
-
?.error_message || ''
|
|
154
|
-
)
|
|
155
|
-
})
|
|
156
|
-
|
|
157
|
-
const onRemoveValidationError = (): void => {
|
|
158
|
-
emits('remove-error-by-title', typeError)
|
|
159
|
-
}
|
|
160
|
-
</script>
|
|
161
|
-
|
|
162
|
-
<style scoped lang="scss"></style>
|
|
1
|
+
<template>
|
|
2
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
v-model="model"
|
|
5
|
+
v-model:invalid="invalid"
|
|
6
|
+
:is-edit="props.isEdit"
|
|
7
|
+
:error-validation-fields="props.errorValidationFields"
|
|
8
|
+
:video-card-model-name="videoCardModelName"
|
|
9
|
+
:error-text="apiError"
|
|
10
|
+
:is-disabled="isDisabled"
|
|
11
|
+
:is-disabled-number-displays="isDisabledNumberDisplays"
|
|
12
|
+
:state="props.state"
|
|
13
|
+
:video-card-model-options="videoCardModelOptions"
|
|
14
|
+
:number-displays-options="numberDisplaysOptions"
|
|
15
|
+
@remove-error="onRemoveValidationError"
|
|
16
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
17
|
+
/>
|
|
18
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-old
|
|
19
|
+
v-else
|
|
20
|
+
v-model="model"
|
|
21
|
+
v-model:invalid="invalid"
|
|
22
|
+
:is-edit="props.isEdit"
|
|
23
|
+
:error-validation-fields="props.errorValidationFields"
|
|
24
|
+
:video-card-model-name="videoCardModelName"
|
|
25
|
+
:error-text="apiError"
|
|
26
|
+
:is-disabled="isDisabled"
|
|
27
|
+
:is-disabled-number-displays="isDisabledNumberDisplays"
|
|
28
|
+
:state="props.state"
|
|
29
|
+
:video-card-model-options="videoCardModelOptions"
|
|
30
|
+
:number-displays-options="numberDisplaysOptions"
|
|
31
|
+
@remove-error="onRemoveValidationError"
|
|
32
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
33
|
+
/>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script setup lang="ts">
|
|
37
|
+
import type { UI_I_SendDataVideoCard } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
38
|
+
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
39
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
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'
|
|
42
|
+
import { videoCardModelOptionsConfigFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/lib/config/options'
|
|
43
|
+
import { numberDisplaysOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options'
|
|
44
|
+
|
|
45
|
+
const model = defineModel<UI_I_CreateVmData['video_card']>({ required: true })
|
|
46
|
+
|
|
47
|
+
const props = withDefaults(
|
|
48
|
+
defineProps<{
|
|
49
|
+
isEdit: boolean
|
|
50
|
+
errorValidationFields: UI_I_ErrorValidationField[]
|
|
51
|
+
videoCard?: UI_I_SendDataVideoCard
|
|
52
|
+
state?: string | number
|
|
53
|
+
}>(),
|
|
54
|
+
{
|
|
55
|
+
videoCard: undefined,
|
|
56
|
+
state: undefined,
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
const emits = defineEmits<{
|
|
60
|
+
(event: 'invalid', value: boolean): void
|
|
61
|
+
(event: 'remove-error-by-title', value: string): void
|
|
62
|
+
}>()
|
|
63
|
+
|
|
64
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
65
|
+
|
|
66
|
+
const { $store }: any = useNuxtApp()
|
|
67
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
68
|
+
|
|
69
|
+
const isDisabled = computed<boolean>(() => props.isEdit && props.state !== 1)
|
|
70
|
+
const isDisabledNumberDisplays = computed<boolean>(
|
|
71
|
+
() => model.value.adapter === 'none'
|
|
72
|
+
)
|
|
73
|
+
watch(isDisabled, (newValue) => {
|
|
74
|
+
if (!newValue) {
|
|
75
|
+
return
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
model.value.displays = 1
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
const videoCardModelOptions = computed<UI_I_OptionItem[]>(() =>
|
|
82
|
+
videoCardModelOptionsConfigFunc(localization.value)
|
|
83
|
+
)
|
|
84
|
+
const videoCardModelName = computed<string>(
|
|
85
|
+
() =>
|
|
86
|
+
videoCardModelOptions.value.find(
|
|
87
|
+
(videoCard) => videoCard.value === model.value.adapter
|
|
88
|
+
)?.text || ''
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
const numberDisplaysOptions = computed<UI_I_OptionItem[]>(() => {
|
|
92
|
+
const result = numberDisplaysOptionsFunc()
|
|
93
|
+
if (model.value.adapter === 'none') {
|
|
94
|
+
result.unshift({ text: '0', value: 0 })
|
|
95
|
+
}
|
|
96
|
+
return result
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
// const totalVideoMemory = ref<number>(64)
|
|
100
|
+
const invalid = ref<boolean>(false)
|
|
101
|
+
watch(
|
|
102
|
+
invalid,
|
|
103
|
+
(newValue) => {
|
|
104
|
+
emits('invalid', newValue)
|
|
105
|
+
},
|
|
106
|
+
{ immediate: true }
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
// const graphics = ref(false)
|
|
110
|
+
|
|
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
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
watch(
|
|
119
|
+
() => model.value.adapter,
|
|
120
|
+
(newValue) => {
|
|
121
|
+
changeNumberDisplays(newValue)
|
|
122
|
+
},
|
|
123
|
+
{ immediate: true }
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
const typeError = 'video_card.adapter'
|
|
127
|
+
|
|
128
|
+
const apiError = computed<string>(() => {
|
|
129
|
+
return (
|
|
130
|
+
props.errorValidationFields?.find((message) => message.field === typeError)
|
|
131
|
+
?.error_message || ''
|
|
132
|
+
)
|
|
133
|
+
})
|
|
134
|
+
|
|
135
|
+
const onRemoveValidationError = (): void => {
|
|
136
|
+
emits('remove-error-by-title', typeError)
|
|
137
|
+
}
|
|
138
|
+
</script>
|
|
139
|
+
|
|
140
|
+
<style scoped lang="scss"></style>
|
|
@@ -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,53 +1,53 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays-new
|
|
3
|
-
v-if="isNewView"
|
|
4
|
-
v-model:number-displays="numberDisplays"
|
|
5
|
-
:disabled="props.disabled"
|
|
6
|
-
:error-text="apiError"
|
|
7
|
-
:number-displays-options="props.numberDisplaysOptions"
|
|
8
|
-
@remove-error="onRemoveValidationError"
|
|
9
|
-
/>
|
|
10
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays-old
|
|
11
|
-
v-else
|
|
12
|
-
v-model:number-displays="numberDisplays"
|
|
13
|
-
:disabled="props.disabled"
|
|
14
|
-
:error-text="apiError"
|
|
15
|
-
:number-displays-options="props.numberDisplaysOptions"
|
|
16
|
-
@remove-error="onRemoveValidationError"
|
|
17
|
-
/>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script setup lang="ts">
|
|
21
|
-
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
22
|
-
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
23
|
-
|
|
24
|
-
const numberDisplays = defineModel<string>('numberDisplays', { required: true })
|
|
25
|
-
|
|
26
|
-
const props = defineProps<{
|
|
27
|
-
numberDisplaysOptions: UI_I_OptionItem[]
|
|
28
|
-
disabled: boolean
|
|
29
|
-
errorValidationFields: UI_I_ErrorValidationField[]
|
|
30
|
-
}>()
|
|
31
|
-
|
|
32
|
-
const emits = defineEmits<{
|
|
33
|
-
(event: 'remove-error-by-title', value: string): void
|
|
34
|
-
}>()
|
|
35
|
-
|
|
36
|
-
const { $store }: any = useNuxtApp()
|
|
37
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
38
|
-
|
|
39
|
-
const typeError = 'video_card.displays'
|
|
40
|
-
|
|
41
|
-
const apiError = computed<string>(() => {
|
|
42
|
-
return (
|
|
43
|
-
props.errorValidationFields?.find((message) => message.field === typeError)
|
|
44
|
-
?.error_message || ''
|
|
45
|
-
)
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
const onRemoveValidationError = (): void => {
|
|
49
|
-
emits('remove-error-by-title', typeError)
|
|
50
|
-
}
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<style scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
v-model:number-displays="numberDisplays"
|
|
5
|
+
:disabled="props.disabled"
|
|
6
|
+
:error-text="apiError"
|
|
7
|
+
:number-displays-options="props.numberDisplaysOptions"
|
|
8
|
+
@remove-error="onRemoveValidationError"
|
|
9
|
+
/>
|
|
10
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays-old
|
|
11
|
+
v-else
|
|
12
|
+
v-model:number-displays="numberDisplays"
|
|
13
|
+
:disabled="props.disabled"
|
|
14
|
+
:error-text="apiError"
|
|
15
|
+
:number-displays-options="props.numberDisplaysOptions"
|
|
16
|
+
@remove-error="onRemoveValidationError"
|
|
17
|
+
/>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
22
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
23
|
+
|
|
24
|
+
const numberDisplays = defineModel<string>('numberDisplays', { required: true })
|
|
25
|
+
|
|
26
|
+
const props = defineProps<{
|
|
27
|
+
numberDisplaysOptions: UI_I_OptionItem[]
|
|
28
|
+
disabled: boolean
|
|
29
|
+
errorValidationFields: UI_I_ErrorValidationField[]
|
|
30
|
+
}>()
|
|
31
|
+
|
|
32
|
+
const emits = defineEmits<{
|
|
33
|
+
(event: 'remove-error-by-title', value: string): void
|
|
34
|
+
}>()
|
|
35
|
+
|
|
36
|
+
const { $store }: any = useNuxtApp()
|
|
37
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
38
|
+
|
|
39
|
+
const typeError = 'video_card.displays'
|
|
40
|
+
|
|
41
|
+
const apiError = computed<string>(() => {
|
|
42
|
+
return (
|
|
43
|
+
props.errorValidationFields?.find((message) => message.field === typeError)
|
|
44
|
+
?.error_message || ''
|
|
45
|
+
)
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
const onRemoveValidationError = (): void => {
|
|
49
|
+
emits('remove-error-by-title', typeError)
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<style scoped></style>
|