bfg-common 1.3.370 → 1.3.372

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.
Files changed (60) hide show
  1. package/assets/scss/common/normalize.scss +3 -2
  2. package/components/atoms/TheIcon.vue +42 -42
  3. package/components/atoms/TheIcon2.vue +190 -3
  4. package/components/atoms/collapse/CollapseNavItem.vue +31 -7
  5. package/components/atoms/collapse/lib/models/interfaces.ts +1 -0
  6. package/components/atoms/loader/Loader.vue +30 -30
  7. package/components/atoms/loader/PreLoader.vue +38 -38
  8. package/components/atoms/switch/Switch.vue +111 -111
  9. package/components/atoms/table/compact/Compact.vue +526 -526
  10. package/components/common/adapterManager/ui/table/Header.vue +93 -93
  11. package/components/common/adapterManager/ui/table/Table.vue +162 -162
  12. package/components/common/context/Context.vue +99 -99
  13. package/components/common/lib/config/states.ts +126 -126
  14. package/components/common/resource/progressBlock/ProgressBlock.vue +142 -142
  15. package/components/common/shortcuts/Block.vue +11 -1
  16. package/components/common/shortcuts/lib/models/interfaces.ts +1 -0
  17. package/components/common/vm/actions/add/Add.vue +602 -602
  18. package/components/common/vm/actions/clone/Clone.vue +518 -518
  19. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +273 -273
  20. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +697 -697
  21. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +256 -256
  22. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +458 -458
  23. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +304 -304
  24. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +167 -167
  25. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +82 -82
  26. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +32 -32
  27. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +182 -182
  28. package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +164 -164
  29. package/components/common/vm/actions/common/select/name/Name.vue +235 -235
  30. package/components/common/vm/actions/common/select/storage/Storage.vue +198 -198
  31. package/components/common/vm/actions/editSettings/EditSettings.vue +316 -316
  32. package/components/common/weekSelect/lib/config/options.ts +10 -10
  33. package/components/common/wizards/datastore/add/Add.vue +436 -436
  34. package/components/common/wizards/datastore/add/lib/config/stepItems.ts +191 -191
  35. package/components/common/wizards/datastore/add/lib/models/interfaces.ts +38 -38
  36. package/components/common/wizards/datastore/add/lib/utils.ts +70 -70
  37. package/components/common/wizards/datastore/add/local/createName/CreateName.vue +160 -160
  38. package/components/common/wizards/datastore/add/nfs/Nfs.vue +112 -112
  39. package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +104 -104
  40. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +62 -62
  41. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +53 -53
  42. package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +86 -86
  43. package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +184 -184
  44. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +459 -459
  45. package/components/common/wizards/datastore/add/types/Types.vue +80 -80
  46. package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +49 -49
  47. package/composables/useAppVersion.ts +21 -21
  48. package/composables/useEnvLanguage.ts +20 -20
  49. package/lib/utils/sendTask.ts +72 -72
  50. package/minify.js +146 -146
  51. package/package.json +1 -1
  52. package/public/spice-console/application/codec.js +257 -257
  53. package/public/spice-console/lib/rasterEngine.js +907 -907
  54. package/public/spice-console/network/spicechannel.js +369 -369
  55. package/store/main/lib/interfaces.ts +9 -9
  56. package/store/tasks/actions.ts +133 -133
  57. package/store/tasks/getters.ts +25 -25
  58. package/store/tasks/lib/models/interfaces.ts +18 -18
  59. package/store/tasks/mutations.ts +58 -58
  60. package/store/tasks/state.ts +16 -16
@@ -1,316 +1,316 @@
1
- <template>
2
- <div class="edit-vm">
3
- <atoms-modal
4
- test-id="edit-vm-wizard"
5
- :show="true"
6
- :title="localization.editSettings"
7
- :second-title="vmNameCash"
8
- :disabled-submit="loading"
9
- @submit="onUpdate"
10
- @hide="onHideModal"
11
- >
12
- <template #modalBody>
13
- <atoms-loader v-show="!vmSettings || loading" id="loader" />
14
- <div v-if="vmSettings" class="vm-context">
15
- <common-vm-actions-common-customize-hardware
16
- v-model:vm-name="vmName"
17
- v-model:guest-machine-type="vmSettings.guestMachineType"
18
- v-model:guest-os-family="vmSettings.guestOsFamily"
19
- v-model:guest-os-version="vmSettings.guestOsVersion"
20
- :project="props.project"
21
- :storage="vmSettings.storage"
22
- :hard-disks-for-boot-options="virtualHardwareHardDisksLocal"
23
- :cd-dvd-drives-for-boot-options="virtualHardwareCdDvdDrivesLocal"
24
- :networks-for-boot-options="virtualHardwareNetworksLocal"
25
- :cd-dvd-drives="vmSettings.cdDvdDrives"
26
- :hard-disks="vmSettings.hardDisks"
27
- :networks="vmSettings.networks"
28
- :customize-hardware-submit="0"
29
- :max-cpus="vmSettings.maxCpus"
30
- :max-memory="vmSettings.maxMemory"
31
- :cpu-models="vmSettings.cpuModels"
32
- :cpu="vmSettings.cpu"
33
- :memory="vmSettings.memory"
34
- :video-card="vmSettings.videoCard"
35
- :usb-controller="vmSettings.usbController"
36
- :pci-devices="vmSettings.pciDevices"
37
- :selected-nav-item="selectedNavItem"
38
- :hard-disks-for-edit="vmSettings.hardDisks"
39
- :options="vmSettings.options"
40
- :nodes="props.nodes"
41
- :files="props.files"
42
- :networks-table="props.networksTable"
43
- :error-validation-fields="props.errorValidationFields"
44
- :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
45
- :passthrough-devices="props.passthroughDevices"
46
- :state="props.state"
47
- :get-datastore-table-func="props.getDatastoreTableFunc"
48
- :datastore="props.datastore"
49
- is-edit
50
- @get-storage="emits('get-storage', $event)"
51
- @get-folders-or-files="emits('get-folders-or-files', $event)"
52
- @get-active-device-child="emits('get-active-device-child', $event)"
53
- @show-datastore-child="emits('show-datastore-child', $event)"
54
- @get-networks-table="emits('get-networks-table', $event)"
55
- @get-pci-devices="emits('get-pci-devices')"
56
- @change-boot-order="onChangeBootOrder"
57
- @send-data="onChangeCustomizeHardware"
58
- />
59
- </div>
60
- </template>
61
- </atoms-modal>
62
- </div>
63
- </template>
64
-
65
- <script setup lang="ts">
66
- import { UI_T_Project } from '~/lib/models/types'
67
- import { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
68
- import { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
69
- import {
70
- UI_I_EditVmPayload,
71
- UI_I_PciDevice,
72
- } from '~/lib/models/store/vm/interfaces'
73
- import { UI_I_Localization } from '~/lib/models/interfaces'
74
- import { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
75
- import {
76
- UI_I_SendDataCpu,
77
- UI_I_SendDataMemory,
78
- UI_I_SendDataNewCdDvdDrive,
79
- UI_I_SendDataNewHardDisk,
80
- UI_I_SendDataNewNetwork,
81
- } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
82
- import { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
83
- import { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
84
- import { UI_I_TablePayload } from '~/lib/models/table/interfaces'
85
- import { UI_I_VmSettings } from '~/lib/models/store/vm/interfaces'
86
- import {
87
- UI_I_DatastoreTableItem,
88
- UI_I_FolderOrFileTreePayload,
89
- } from '~/lib/models/store/storage/interfaces'
90
- import { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
91
- import { UI_T_EditVmFinishFunc } from '~/components/common/vm/actions/editSettings/lib/models/types'
92
-
93
- const props = defineProps<{
94
- project: UI_T_Project
95
- loading: boolean
96
- vmSettings: UI_I_VmSettings | null
97
- nodes: UI_I_FileTreeNode[]
98
- files: UI_I_FileTreeNode[]
99
- networksTable: UI_I_NetworkTableItem[]
100
- errorValidationFields: UI_I_ErrorValidationField<string>[]
101
- vmCpuHelpTextSecond: string
102
- vmId: string
103
- datastore: UI_I_DatastoreTableItem[]
104
- validateSendDataFunc: UI_T_EditVmFinishFunc
105
- getDatastoreTableFunc?: (payload: UI_I_TablePayload) => Promise<void>
106
- state?: string | number
107
- passthroughDevices?: UI_I_PciDevice[]
108
- }>()
109
-
110
- const emits = defineEmits<{
111
- (event: 'hide'): void
112
- (event: 'update-vm', value: UI_I_EditVmPayload): void
113
- (event: 'get-storage', value: UI_I_TablePayload): void
114
- (event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
115
- (event: 'get-active-device-child', value: UI_I_FileTreeNode): void
116
- (event: 'show-datastore-child', value: UI_I_FileTreeNode): void
117
- (event: 'get-networks-table', value: UI_I_TablePayload): void
118
- (event: 'get-pci-devices'): void
119
- }>()
120
-
121
- const localization = computed<UI_I_Localization>(() => useLocal())
122
-
123
- const selectedNavItem = ref<UI_T_SelectedNavItem>(0)
124
-
125
- const loading = ref<boolean>(false)
126
- watch(
127
- () => props.loading,
128
- (value) => {
129
- loading.value = value
130
- },
131
- { immediate: true }
132
- )
133
-
134
- const vmSettings = computed<UI_I_VmSettings | null>(() => props.vmSettings)
135
-
136
- const vmName = ref<string>(vmSettings.value?.name || '')
137
- const vmNameCash = ref<string>(vmSettings.value?.name || '')
138
- watch(vmSettings, (newValue) => {
139
- vmName.value = newValue?.name || ''
140
- vmNameCash.value = newValue?.name || ''
141
- })
142
-
143
- const virtualHardwareHardDisks = ref<UI_I_SendDataNewHardDisk[] | null>(null)
144
- const virtualHardwareCdDvdDrives = ref<UI_I_SendDataNewCdDvdDrive[] | null>(
145
- null
146
- )
147
- const virtualHardwareNetworks = ref<UI_I_SendDataNewNetwork[] | null>(null)
148
- const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
149
- virtualHardwareHardDisks.value = data[0]
150
- virtualHardwareCdDvdDrives.value = data[1]
151
- virtualHardwareNetworks.value = data[2]
152
- }
153
-
154
- const customizeHardware = ref<UI_I_SendDataCustomizeHardware | null>(null)
155
- const onChangeCustomizeHardware = (
156
- data: UI_I_SendDataCustomizeHardware
157
- ): void => {
158
- customizeHardware.value = data
159
- }
160
- const onHideModal = (): void => {
161
- emits('hide')
162
- }
163
- const onUpdate = (): void => {
164
- validateSendData()
165
- }
166
-
167
- const virtualHardwareHardDisksLocal = computed<
168
- UI_I_SendDataNewHardDisk[] | null
169
- >(() => customizeHardware.value?.virtualHardware?.hardDisks || null)
170
- const virtualHardwareNetworksLocal = computed<UI_I_SendDataNewNetwork[] | null>(
171
- () => customizeHardware.value?.virtualHardware?.networks || null
172
- )
173
- const virtualHardwareCdDvdDrivesLocal = computed<
174
- UI_I_SendDataNewCdDvdDrive[] | null
175
- >(() => customizeHardware.value?.virtualHardware?.cdDvdDrives || null)
176
-
177
- const virtualHardwareCpu = computed<UI_I_SendDataCpu | null>(
178
- () => customizeHardware.value?.virtualHardware?.cpu || null
179
- )
180
- const virtualHardwareMemory = computed<UI_I_SendDataMemory | null>(
181
- () => customizeHardware.value?.virtualHardware?.memory || null
182
- )
183
-
184
- const validateSendData = async (): Promise<void> => {
185
- loading.value = true
186
- props
187
- .validateSendDataFunc(
188
- vmSettings.value,
189
- virtualHardwareCpu.value,
190
- virtualHardwareMemory.value,
191
- customizeHardware.value,
192
- virtualHardwareNetworks.value,
193
- virtualHardwareHardDisks.value,
194
- virtualHardwareCdDvdDrives.value,
195
- vmName.value,
196
- localization.value,
197
- props.vmId
198
- )
199
- .then((data) => {
200
- loading.value = false
201
-
202
- !data && onHideModal()
203
- })
204
- }
205
- </script>
206
-
207
- <style scoped lang="scss">
208
- .vm-context {
209
- padding: 16px 15px 10px 10px;
210
- height: 100%;
211
- display: flex;
212
- flex-direction: column;
213
-
214
- .context-title-wrap {
215
- padding-bottom: 3px;
216
- border-bottom: 1px solid #a6a6a6;
217
-
218
- h4 {
219
- font-weight: 700;
220
- font-size: 13px;
221
- color: var(--vm-context-title);
222
- }
223
- p {
224
- font-weight: 400;
225
- font-size: 13px;
226
- color: var(--vm-context-sub-title);
227
- }
228
- }
229
-
230
- .finish-block {
231
- padding: 18px 24px 24px 24px;
232
-
233
- .add-hosts-ready-to-complete-mt-12 {
234
- margin-top: 12px;
235
-
236
- .add-hosts-ready-to-complete-bold {
237
- line-height: 18px;
238
- font-weight: 700;
239
- }
240
- }
241
- }
242
-
243
- .vm-hardware-version {
244
- align-self: flex-end;
245
- margin-top: auto;
246
- }
247
- }
248
-
249
- :deep(.modal-dialog) {
250
- width: 840px;
251
- }
252
- :deep(.modal .modal-dialog .modal-content .modal-footer) {
253
- flex: unset;
254
- height: unset;
255
- min-height: unset;
256
- }
257
- :deep(.wizard-modal-titlebar h3) {
258
- color: #000;
259
- font-size: 24px;
260
- font-weight: 200;
261
- line-height: 27px;
262
- margin: 0;
263
- padding: 0;
264
- }
265
- :deep(.clr-wizard-stepnav-item) {
266
- padding-left: 0;
267
- }
268
- :deep(.clr-wizard-stepnav
269
- .clr-wizard-stepnav-item
270
- button
271
- .clr-wizard-stepnav-link-title) {
272
- width: 189px;
273
- font-weight: 700;
274
- font-size: 13px;
275
- }
276
-
277
- #vm-wizard-notification {
278
- h3 {
279
- color: var(--global-font-color7);
280
- margin-top: 6px;
281
- }
282
- p {
283
- color: var(--global-font-color6);
284
- line-height: 16px;
285
- }
286
- }
287
-
288
- .power-on-by-default-wrap {
289
- display: flex;
290
- align-items: center;
291
-
292
- input {
293
- margin-right: 6px;
294
- }
295
- }
296
-
297
- .loading {
298
- :deep(.spinner) {
299
- width: 45px;
300
- height: 45px;
301
- min-width: 45px;
302
- min-height: 45px;
303
- }
304
- }
305
- </style>
306
-
307
- <style>
308
- :root {
309
- --vm-context-title: #333;
310
- --vm-context-sub-title: #000;
311
- }
312
- :root.dark-theme {
313
- --vm-context-title: #adbbc4;
314
- --vm-context-sub-title: #adbbc4;
315
- }
316
- </style>
1
+ <template>
2
+ <div class="edit-vm">
3
+ <atoms-modal
4
+ test-id="edit-vm-wizard"
5
+ :show="true"
6
+ :title="localization.editSettings"
7
+ :second-title="vmNameCash"
8
+ :disabled-submit="loading"
9
+ @submit="onUpdate"
10
+ @hide="onHideModal"
11
+ >
12
+ <template #modalBody>
13
+ <atoms-loader v-show="!vmSettings || loading" id="loader" />
14
+ <div v-if="vmSettings" class="vm-context">
15
+ <common-vm-actions-common-customize-hardware
16
+ v-model:vm-name="vmName"
17
+ v-model:guest-machine-type="vmSettings.guestMachineType"
18
+ v-model:guest-os-family="vmSettings.guestOsFamily"
19
+ v-model:guest-os-version="vmSettings.guestOsVersion"
20
+ :project="props.project"
21
+ :storage="vmSettings.storage"
22
+ :hard-disks-for-boot-options="virtualHardwareHardDisksLocal"
23
+ :cd-dvd-drives-for-boot-options="virtualHardwareCdDvdDrivesLocal"
24
+ :networks-for-boot-options="virtualHardwareNetworksLocal"
25
+ :cd-dvd-drives="vmSettings.cdDvdDrives"
26
+ :hard-disks="vmSettings.hardDisks"
27
+ :networks="vmSettings.networks"
28
+ :customize-hardware-submit="0"
29
+ :max-cpus="vmSettings.maxCpus"
30
+ :max-memory="vmSettings.maxMemory"
31
+ :cpu-models="vmSettings.cpuModels"
32
+ :cpu="vmSettings.cpu"
33
+ :memory="vmSettings.memory"
34
+ :video-card="vmSettings.videoCard"
35
+ :usb-controller="vmSettings.usbController"
36
+ :pci-devices="vmSettings.pciDevices"
37
+ :selected-nav-item="selectedNavItem"
38
+ :hard-disks-for-edit="vmSettings.hardDisks"
39
+ :options="vmSettings.options"
40
+ :nodes="props.nodes"
41
+ :files="props.files"
42
+ :networks-table="props.networksTable"
43
+ :error-validation-fields="props.errorValidationFields"
44
+ :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
45
+ :passthrough-devices="props.passthroughDevices"
46
+ :state="props.state"
47
+ :get-datastore-table-func="props.getDatastoreTableFunc"
48
+ :datastore="props.datastore"
49
+ is-edit
50
+ @get-storage="emits('get-storage', $event)"
51
+ @get-folders-or-files="emits('get-folders-or-files', $event)"
52
+ @get-active-device-child="emits('get-active-device-child', $event)"
53
+ @show-datastore-child="emits('show-datastore-child', $event)"
54
+ @get-networks-table="emits('get-networks-table', $event)"
55
+ @get-pci-devices="emits('get-pci-devices')"
56
+ @change-boot-order="onChangeBootOrder"
57
+ @send-data="onChangeCustomizeHardware"
58
+ />
59
+ </div>
60
+ </template>
61
+ </atoms-modal>
62
+ </div>
63
+ </template>
64
+
65
+ <script setup lang="ts">
66
+ import { UI_T_Project } from '~/lib/models/types'
67
+ import { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
68
+ import { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
69
+ import {
70
+ UI_I_EditVmPayload,
71
+ UI_I_PciDevice,
72
+ } from '~/lib/models/store/vm/interfaces'
73
+ import { UI_I_Localization } from '~/lib/models/interfaces'
74
+ import { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
75
+ import {
76
+ UI_I_SendDataCpu,
77
+ UI_I_SendDataMemory,
78
+ UI_I_SendDataNewCdDvdDrive,
79
+ UI_I_SendDataNewHardDisk,
80
+ UI_I_SendDataNewNetwork,
81
+ } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
82
+ import { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
83
+ import { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
84
+ import { UI_I_TablePayload } from '~/lib/models/table/interfaces'
85
+ import { UI_I_VmSettings } from '~/lib/models/store/vm/interfaces'
86
+ import {
87
+ UI_I_DatastoreTableItem,
88
+ UI_I_FolderOrFileTreePayload,
89
+ } from '~/lib/models/store/storage/interfaces'
90
+ import { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
91
+ import { UI_T_EditVmFinishFunc } from '~/components/common/vm/actions/editSettings/lib/models/types'
92
+
93
+ const props = defineProps<{
94
+ project: UI_T_Project
95
+ loading: boolean
96
+ vmSettings: UI_I_VmSettings | null
97
+ nodes: UI_I_FileTreeNode[]
98
+ files: UI_I_FileTreeNode[]
99
+ networksTable: UI_I_NetworkTableItem[]
100
+ errorValidationFields: UI_I_ErrorValidationField<string>[]
101
+ vmCpuHelpTextSecond: string
102
+ vmId: string
103
+ datastore: UI_I_DatastoreTableItem[]
104
+ validateSendDataFunc: UI_T_EditVmFinishFunc
105
+ getDatastoreTableFunc?: (payload: UI_I_TablePayload) => Promise<void>
106
+ state?: string | number
107
+ passthroughDevices?: UI_I_PciDevice[]
108
+ }>()
109
+
110
+ const emits = defineEmits<{
111
+ (event: 'hide'): void
112
+ (event: 'update-vm', value: UI_I_EditVmPayload): void
113
+ (event: 'get-storage', value: UI_I_TablePayload): void
114
+ (event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
115
+ (event: 'get-active-device-child', value: UI_I_FileTreeNode): void
116
+ (event: 'show-datastore-child', value: UI_I_FileTreeNode): void
117
+ (event: 'get-networks-table', value: UI_I_TablePayload): void
118
+ (event: 'get-pci-devices'): void
119
+ }>()
120
+
121
+ const localization = computed<UI_I_Localization>(() => useLocal())
122
+
123
+ const selectedNavItem = ref<UI_T_SelectedNavItem>(0)
124
+
125
+ const loading = ref<boolean>(false)
126
+ watch(
127
+ () => props.loading,
128
+ (value) => {
129
+ loading.value = value
130
+ },
131
+ { immediate: true }
132
+ )
133
+
134
+ const vmSettings = computed<UI_I_VmSettings | null>(() => props.vmSettings)
135
+
136
+ const vmName = ref<string>(vmSettings.value?.name || '')
137
+ const vmNameCash = ref<string>(vmSettings.value?.name || '')
138
+ watch(vmSettings, (newValue) => {
139
+ vmName.value = newValue?.name || ''
140
+ vmNameCash.value = newValue?.name || ''
141
+ })
142
+
143
+ const virtualHardwareHardDisks = ref<UI_I_SendDataNewHardDisk[] | null>(null)
144
+ const virtualHardwareCdDvdDrives = ref<UI_I_SendDataNewCdDvdDrive[] | null>(
145
+ null
146
+ )
147
+ const virtualHardwareNetworks = ref<UI_I_SendDataNewNetwork[] | null>(null)
148
+ const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
149
+ virtualHardwareHardDisks.value = data[0]
150
+ virtualHardwareCdDvdDrives.value = data[1]
151
+ virtualHardwareNetworks.value = data[2]
152
+ }
153
+
154
+ const customizeHardware = ref<UI_I_SendDataCustomizeHardware | null>(null)
155
+ const onChangeCustomizeHardware = (
156
+ data: UI_I_SendDataCustomizeHardware
157
+ ): void => {
158
+ customizeHardware.value = data
159
+ }
160
+ const onHideModal = (): void => {
161
+ emits('hide')
162
+ }
163
+ const onUpdate = (): void => {
164
+ validateSendData()
165
+ }
166
+
167
+ const virtualHardwareHardDisksLocal = computed<
168
+ UI_I_SendDataNewHardDisk[] | null
169
+ >(() => customizeHardware.value?.virtualHardware?.hardDisks || null)
170
+ const virtualHardwareNetworksLocal = computed<UI_I_SendDataNewNetwork[] | null>(
171
+ () => customizeHardware.value?.virtualHardware?.networks || null
172
+ )
173
+ const virtualHardwareCdDvdDrivesLocal = computed<
174
+ UI_I_SendDataNewCdDvdDrive[] | null
175
+ >(() => customizeHardware.value?.virtualHardware?.cdDvdDrives || null)
176
+
177
+ const virtualHardwareCpu = computed<UI_I_SendDataCpu | null>(
178
+ () => customizeHardware.value?.virtualHardware?.cpu || null
179
+ )
180
+ const virtualHardwareMemory = computed<UI_I_SendDataMemory | null>(
181
+ () => customizeHardware.value?.virtualHardware?.memory || null
182
+ )
183
+
184
+ const validateSendData = async (): Promise<void> => {
185
+ loading.value = true
186
+ props
187
+ .validateSendDataFunc(
188
+ vmSettings.value,
189
+ virtualHardwareCpu.value,
190
+ virtualHardwareMemory.value,
191
+ customizeHardware.value,
192
+ virtualHardwareNetworks.value,
193
+ virtualHardwareHardDisks.value,
194
+ virtualHardwareCdDvdDrives.value,
195
+ vmName.value,
196
+ localization.value,
197
+ props.vmId
198
+ )
199
+ .then((data) => {
200
+ loading.value = false
201
+
202
+ !data && onHideModal()
203
+ })
204
+ }
205
+ </script>
206
+
207
+ <style scoped lang="scss">
208
+ .vm-context {
209
+ padding: 16px 15px 10px 10px;
210
+ height: 100%;
211
+ display: flex;
212
+ flex-direction: column;
213
+
214
+ .context-title-wrap {
215
+ padding-bottom: 3px;
216
+ border-bottom: 1px solid #a6a6a6;
217
+
218
+ h4 {
219
+ font-weight: 700;
220
+ font-size: 13px;
221
+ color: var(--vm-context-title);
222
+ }
223
+ p {
224
+ font-weight: 400;
225
+ font-size: 13px;
226
+ color: var(--vm-context-sub-title);
227
+ }
228
+ }
229
+
230
+ .finish-block {
231
+ padding: 18px 24px 24px 24px;
232
+
233
+ .add-hosts-ready-to-complete-mt-12 {
234
+ margin-top: 12px;
235
+
236
+ .add-hosts-ready-to-complete-bold {
237
+ line-height: 18px;
238
+ font-weight: 700;
239
+ }
240
+ }
241
+ }
242
+
243
+ .vm-hardware-version {
244
+ align-self: flex-end;
245
+ margin-top: auto;
246
+ }
247
+ }
248
+
249
+ :deep(.modal-dialog) {
250
+ width: 840px;
251
+ }
252
+ :deep(.modal .modal-dialog .modal-content .modal-footer) {
253
+ flex: unset;
254
+ height: unset;
255
+ min-height: unset;
256
+ }
257
+ :deep(.wizard-modal-titlebar h3) {
258
+ color: #000;
259
+ font-size: 24px;
260
+ font-weight: 200;
261
+ line-height: 27px;
262
+ margin: 0;
263
+ padding: 0;
264
+ }
265
+ :deep(.clr-wizard-stepnav-item) {
266
+ padding-left: 0;
267
+ }
268
+ :deep(.clr-wizard-stepnav
269
+ .clr-wizard-stepnav-item
270
+ button
271
+ .clr-wizard-stepnav-link-title) {
272
+ width: 189px;
273
+ font-weight: 700;
274
+ font-size: 13px;
275
+ }
276
+
277
+ #vm-wizard-notification {
278
+ h3 {
279
+ color: var(--global-font-color7);
280
+ margin-top: 6px;
281
+ }
282
+ p {
283
+ color: var(--global-font-color6);
284
+ line-height: 16px;
285
+ }
286
+ }
287
+
288
+ .power-on-by-default-wrap {
289
+ display: flex;
290
+ align-items: center;
291
+
292
+ input {
293
+ margin-right: 6px;
294
+ }
295
+ }
296
+
297
+ .loading {
298
+ :deep(.spinner) {
299
+ width: 45px;
300
+ height: 45px;
301
+ min-width: 45px;
302
+ min-height: 45px;
303
+ }
304
+ }
305
+ </style>
306
+
307
+ <style>
308
+ :root {
309
+ --vm-context-title: #333;
310
+ --vm-context-sub-title: #000;
311
+ }
312
+ :root.dark-theme {
313
+ --vm-context-title: #adbbc4;
314
+ --vm-context-sub-title: #adbbc4;
315
+ }
316
+ </style>
@@ -1,10 +1,10 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
3
-
4
- export const optionsFunc = (
5
- localization: UI_I_Localization
6
- ): UI_I_SelectInputItem[] => [
7
- { label: localization.daily, value: 0 },
8
- { label: localization.weekly, value: 1 },
9
- { label: localization.custom, value: 2 },
10
- ]
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
3
+
4
+ export const optionsFunc = (
5
+ localization: UI_I_Localization
6
+ ): UI_I_SelectInputItem[] => [
7
+ { label: localization.daily, value: 0 },
8
+ { label: localization.weekly, value: 1 },
9
+ { label: localization.custom, value: 2 },
10
+ ]