bfg-common 1.3.467 → 1.3.468

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 (109) hide show
  1. package/assets/scss/common/normalize.scss +340 -340
  2. package/components/atoms/TheIcon2.vue +1353 -1353
  3. package/components/atoms/loader/Loader.vue +30 -30
  4. package/components/atoms/loader/PreLoader.vue +38 -38
  5. package/components/atoms/switch/Switch.vue +111 -111
  6. package/components/atoms/table/compact/Compact.vue +526 -526
  7. package/components/common/adapterManager/ui/table/Header.vue +93 -93
  8. package/components/common/adapterManager/ui/table/Table.vue +162 -162
  9. package/components/common/context/Context.vue +99 -99
  10. package/components/common/layout/theHeader/LanguageSwitch.vue +102 -0
  11. package/components/common/layout/theHeader/TheHeader.vue +91 -0
  12. package/components/common/layout/theHeader/TheHeaderNew.vue +229 -0
  13. package/components/common/layout/theHeader/TheHeaderOld.vue +241 -0
  14. package/components/common/layout/theHeader/feedback/Feedback.vue +104 -0
  15. package/components/common/layout/theHeader/feedback/FeedbackNew.vue +63 -0
  16. package/components/common/layout/theHeader/feedback/FeedbackOld.vue +73 -0
  17. package/components/common/layout/theHeader/helpMenu/About.vue +110 -0
  18. package/components/common/layout/theHeader/helpMenu/HelpMenu.vue +45 -0
  19. package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +112 -0
  20. package/components/common/layout/theHeader/helpMenu/helpMenuNew/lib/config/dropMenu.ts +25 -0
  21. package/components/common/layout/theHeader/helpMenu/helpMenuOld/HelpMenuOld.vue +69 -0
  22. package/components/common/layout/theHeader/helpMenu/helpMenuOld/lib/config/dropMenu.ts +22 -0
  23. package/components/common/layout/theHeader/helpMenu/helpMenuOld/lib/models/types.ts +1 -0
  24. package/components/common/layout/theHeader/lib/models/types.ts +5 -0
  25. package/components/common/layout/theHeader/modals/Reconnect.vue +98 -0
  26. package/components/common/layout/theHeader/modals/RedirectLogin.vue +60 -0
  27. package/components/common/layout/theHeader/userMenu/UserMenu.vue +95 -0
  28. package/components/common/layout/theHeader/userMenu/lib/models/interfaces.ts +32 -0
  29. package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePassword.vue +210 -0
  30. package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/config/form.ts +31 -0
  31. package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/models/interfaces.ts +12 -0
  32. package/components/common/layout/theHeader/userMenu/modals/preferences/Inventory.vue +43 -0
  33. package/components/common/layout/theHeader/userMenu/modals/preferences/Preferences.vue +119 -0
  34. package/components/common/layout/theHeader/userMenu/modals/preferences/View.vue +113 -0
  35. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +148 -0
  36. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/config/lang.ts +10 -0
  37. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/config/radioOptions.ts +22 -0
  38. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/enums.ts +9 -0
  39. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/interfaces.ts +11 -0
  40. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/types.ts +1 -0
  41. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +66 -0
  42. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/config/consoleOptions.ts +30 -0
  43. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/models/interfaces.ts +5 -0
  44. package/components/common/layout/theHeader/userMenu/modals/preferences/lib/config/preferencesTabs.ts +68 -0
  45. package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +1 -0
  46. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +67 -0
  47. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/config/formatOptions.ts +27 -0
  48. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/models/types.ts +1 -0
  49. package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +114 -0
  50. package/components/common/layout/theHeader/userMenu/userMenuNew/lib/config/dropMenu.ts +28 -0
  51. package/components/common/layout/theHeader/userMenu/userMenuOld/UserMenuOld.vue +36 -0
  52. package/components/common/layout/theHeader/userMenu/userMenuOld/lib/config/dropMenu.ts +36 -0
  53. package/components/common/layout/theHeader/userMenu/userMenuOld/lib/models/types.ts +5 -0
  54. package/components/common/lib/config/states.ts +160 -160
  55. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +142 -142
  56. package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +248 -248
  57. package/components/common/mainNavigationPanel/MainNavigationPanelOld.vue +288 -288
  58. package/components/common/readyToComplete/ReadyToComplete.vue +15 -15
  59. package/components/common/resource/progressBlock/ProgressBlock.vue +142 -142
  60. package/components/common/split/horizontal/Horizontal.vue +70 -70
  61. package/components/common/vm/actions/clone/Clone.vue +511 -511
  62. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +273 -273
  63. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +697 -697
  64. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +400 -400
  65. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +329 -329
  66. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +305 -305
  67. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +168 -168
  68. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +82 -82
  69. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +32 -32
  70. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +182 -182
  71. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +114 -114
  72. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +192 -192
  73. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +72 -72
  74. package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +164 -164
  75. package/components/common/vm/actions/common/select/name/Name.vue +235 -235
  76. package/components/common/vm/actions/common/select/storage/Storage.vue +198 -198
  77. package/components/common/vm/actions/editSettings/EditSettings.vue +316 -316
  78. package/components/common/weekSelect/lib/config/options.ts +10 -10
  79. package/components/common/wizards/datastore/add/Add.vue +436 -436
  80. package/components/common/wizards/datastore/add/lib/config/stepItems.ts +191 -191
  81. package/components/common/wizards/datastore/add/lib/models/interfaces.ts +38 -38
  82. package/components/common/wizards/datastore/add/lib/utils.ts +70 -70
  83. package/components/common/wizards/datastore/add/local/createName/CreateName.vue +160 -160
  84. package/components/common/wizards/datastore/add/nfs/Nfs.vue +112 -112
  85. package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +104 -104
  86. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +62 -62
  87. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +53 -53
  88. package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +86 -86
  89. package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +184 -184
  90. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +459 -459
  91. package/components/common/wizards/datastore/add/types/Types.vue +80 -80
  92. package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +49 -49
  93. package/composables/useAppVersion.ts +22 -22
  94. package/composables/useEnvLanguage.ts +20 -20
  95. package/lib/utils/sendTask.ts +73 -73
  96. package/minify.js +146 -146
  97. package/package.json +2 -1
  98. package/plugins/spice-console/spice.console.ts +147 -147
  99. package/public/spice-console/application/codec.js +263 -263
  100. package/public/spice-console/lib/rasterEngine.js +907 -907
  101. package/public/spice-console/network/spicechannel.js +375 -375
  102. package/store/main/lib/interfaces.ts +9 -9
  103. package/store/tasks/actions.ts +133 -133
  104. package/store/tasks/getters.ts +25 -25
  105. package/store/tasks/lib/models/interfaces.ts +18 -18
  106. package/store/tasks/mutations.ts +58 -58
  107. package/store/tasks/state.ts +16 -16
  108. /package/components/{layout → common/layout}/theHeader/lib/models/enums.ts +0 -0
  109. /package/components/{layout → common/layout}/theHeader/lib/utils/localization.ts +0 -0
@@ -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="loadingLocal"
9
- @submit="onUpdate"
10
- @hide="onHideModal"
11
- >
12
- <template #modalBody>
13
- <atoms-loader v-show="!vmSettingsLocal || loadingLocal" id="loader" />
14
- <div v-if="vmSettingsLocal" class="vm-context">
15
- <common-vm-actions-common-customize-hardware
16
- v-model:vm-name="vmName"
17
- v-model:guest-machine-type="vmSettingsLocal.guestMachineType"
18
- v-model:guest-os-family="vmSettingsLocal.guestOsFamily"
19
- v-model:guest-os-version="vmSettingsLocal.guestOsVersion"
20
- :project="props.project"
21
- :storage="vmSettingsLocal.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="vmSettingsLocal.cdDvdDrives"
26
- :hard-disks="vmSettingsLocal.hardDisks"
27
- :networks="vmSettingsLocal.networks"
28
- :customize-hardware-submit="0"
29
- :max-cpus="vmSettingsLocal.maxCpus"
30
- :max-memory="vmSettingsLocal.maxMemory"
31
- :cpu-models="vmSettingsLocal.cpuModels"
32
- :cpu="vmSettingsLocal.cpu"
33
- :memory="vmSettingsLocal.memory"
34
- :video-card="vmSettingsLocal.videoCard"
35
- :usb-controller="vmSettingsLocal.usbController"
36
- :pci-devices="vmSettingsLocal.pciDevices"
37
- :selected-nav-item="selectedNavItem"
38
- :hard-disks-for-edit="vmSettingsLocal.hardDisks"
39
- :options="vmSettingsLocal.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 loadingLocal = ref<boolean>(false)
126
- watch(
127
- () => props.loading,
128
- (newValue: boolean) => {
129
- loadingLocal.value = newValue
130
- },
131
- { immediate: true }
132
- )
133
-
134
- const vmSettingsLocal = computed<UI_I_VmSettings | null>(() => props.vmSettings)
135
-
136
- const vmName = ref<string>(vmSettingsLocal.value?.name || '')
137
- const vmNameCash = ref<string>(vmSettingsLocal.value?.name || '')
138
- watch(vmSettingsLocal, (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
- loadingLocal.value = true
186
- props
187
- .validateSendDataFunc(
188
- vmSettingsLocal.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
- loadingLocal.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="loadingLocal"
9
+ @submit="onUpdate"
10
+ @hide="onHideModal"
11
+ >
12
+ <template #modalBody>
13
+ <atoms-loader v-show="!vmSettingsLocal || loadingLocal" id="loader" />
14
+ <div v-if="vmSettingsLocal" class="vm-context">
15
+ <common-vm-actions-common-customize-hardware
16
+ v-model:vm-name="vmName"
17
+ v-model:guest-machine-type="vmSettingsLocal.guestMachineType"
18
+ v-model:guest-os-family="vmSettingsLocal.guestOsFamily"
19
+ v-model:guest-os-version="vmSettingsLocal.guestOsVersion"
20
+ :project="props.project"
21
+ :storage="vmSettingsLocal.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="vmSettingsLocal.cdDvdDrives"
26
+ :hard-disks="vmSettingsLocal.hardDisks"
27
+ :networks="vmSettingsLocal.networks"
28
+ :customize-hardware-submit="0"
29
+ :max-cpus="vmSettingsLocal.maxCpus"
30
+ :max-memory="vmSettingsLocal.maxMemory"
31
+ :cpu-models="vmSettingsLocal.cpuModels"
32
+ :cpu="vmSettingsLocal.cpu"
33
+ :memory="vmSettingsLocal.memory"
34
+ :video-card="vmSettingsLocal.videoCard"
35
+ :usb-controller="vmSettingsLocal.usbController"
36
+ :pci-devices="vmSettingsLocal.pciDevices"
37
+ :selected-nav-item="selectedNavItem"
38
+ :hard-disks-for-edit="vmSettingsLocal.hardDisks"
39
+ :options="vmSettingsLocal.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 loadingLocal = ref<boolean>(false)
126
+ watch(
127
+ () => props.loading,
128
+ (newValue: boolean) => {
129
+ loadingLocal.value = newValue
130
+ },
131
+ { immediate: true }
132
+ )
133
+
134
+ const vmSettingsLocal = computed<UI_I_VmSettings | null>(() => props.vmSettings)
135
+
136
+ const vmName = ref<string>(vmSettingsLocal.value?.name || '')
137
+ const vmNameCash = ref<string>(vmSettingsLocal.value?.name || '')
138
+ watch(vmSettingsLocal, (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
+ loadingLocal.value = true
186
+ props
187
+ .validateSendDataFunc(
188
+ vmSettingsLocal.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
+ loadingLocal.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
+ ]