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.
Files changed (158) hide show
  1. package/CODE_STYLE.md +109 -109
  2. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  3. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  4. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  5. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  6. package/components/atoms/TheIcon3.vue +50 -50
  7. package/components/atoms/collapse/CollapseNav.vue +170 -170
  8. package/components/atoms/perPage/PerPage.vue +58 -58
  9. package/components/atoms/table/dataGrid/DataGrid.vue +1718 -1718
  10. package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
  11. package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
  12. package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
  13. package/components/common/backup/storage/actions/add/Add.vue +251 -251
  14. package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
  15. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  16. package/components/common/diagramMain/modals/lib/config/portModal.ts +251 -251
  17. package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
  18. package/components/common/diagramMain/port/Port.vue +580 -580
  19. package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
  20. package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
  21. package/components/common/pages/backups/DetailView.vue +52 -52
  22. package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
  23. package/components/common/pages/backups/modals/Modals.vue +243 -243
  24. package/components/common/pages/backups/modals/createBackup/New.vue +2 -8
  25. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
  26. package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +69 -69
  27. package/components/common/pages/backups/modals/lib/config/restore.ts +115 -115
  28. package/components/common/pages/backups/modals/lib/models/interfaces.ts +186 -186
  29. package/components/common/pages/backups/modals/restore/Restore.vue +5 -9
  30. package/components/common/pages/backups/modals/restore/RestoreNew.vue +3 -12
  31. package/components/common/pages/backups/modals/restore/RestoreOld.vue +18 -6
  32. package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
  33. package/components/common/pages/home/lib/models/interfaces.ts +48 -48
  34. package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
  35. package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
  36. package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
  37. package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
  38. package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
  39. package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
  40. package/components/common/select/radio/RadioGroup.vue +137 -137
  41. package/components/common/spiceConsole/Drawer.vue +420 -420
  42. package/components/common/spiceConsole/SpiceConsole.vue +184 -184
  43. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  44. package/components/common/tools/Actions.vue +207 -207
  45. package/components/common/treeView/TreeView.vue +52 -52
  46. package/components/common/vm/actions/add/Add.vue +877 -950
  47. package/components/common/vm/actions/add/New.vue +652 -690
  48. package/components/common/vm/actions/add/Old.vue +363 -402
  49. package/components/common/vm/actions/add/lib/config/steps.ts +347 -347
  50. package/components/common/vm/actions/clone/Clone.vue +809 -809
  51. package/components/common/vm/actions/clone/new/New.vue +457 -457
  52. package/components/common/vm/actions/clone/old/Old.vue +378 -378
  53. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +243 -308
  54. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +328 -373
  55. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +161 -205
  56. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +694 -728
  57. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +512 -523
  58. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +328 -339
  59. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +348 -368
  60. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuNew.vue +241 -248
  61. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuOld.vue +184 -189
  62. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
  63. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
  64. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +300 -313
  65. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryNew.vue +158 -158
  66. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryOld.vue +155 -155
  67. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +427 -427
  68. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +154 -154
  69. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
  70. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
  71. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +47 -58
  72. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +68 -65
  73. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerOld.vue +64 -61
  74. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
  75. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +140 -162
  76. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardNew.vue +6 -5
  77. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardOld.vue +6 -5
  78. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options.ts +4 -4
  79. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +53 -53
  80. package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +76 -163
  81. package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +87 -138
  82. package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsOld.vue +71 -120
  83. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +46 -110
  84. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +65 -85
  85. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsOld.vue +70 -91
  86. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
  87. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +60 -60
  88. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +156 -174
  89. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +109 -74
  90. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderOld.vue +104 -66
  91. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +86 -101
  92. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +163 -173
  93. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsOld.vue +162 -170
  94. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +142 -148
  95. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/Old.vue +135 -141
  96. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +74 -178
  97. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
  98. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{KeymapNew.vue → New.vue} +45 -45
  99. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{KeymapOld.vue → Old.vue} +47 -47
  100. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +102 -103
  101. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
  102. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +26 -49
  103. package/components/common/vm/actions/common/lib/models/interfaces.ts +189 -157
  104. package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
  105. package/components/common/vm/actions/common/select/createType/CreateType.vue +38 -38
  106. package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
  107. package/components/common/vm/actions/common/select/os/Old.vue +152 -152
  108. package/components/common/vm/actions/common/select/os/Os.vue +139 -139
  109. package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
  110. package/components/common/vm/actions/common/select/storage/Storage.vue +178 -178
  111. package/components/common/vm/actions/common/select/storage/new/New.vue +311 -311
  112. package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
  113. package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
  114. package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
  115. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  116. package/components/common/vm/actions/lib/models/interfaces.ts +15 -40
  117. package/components/common/vm/actions/lib/utils.ts +244 -239
  118. package/components/common/vm/actions/register/Register.vue +352 -352
  119. package/components/common/vm/actions/register/lib/config/steps.ts +86 -86
  120. package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
  121. package/components/common/wizards/common/compatibility/New.vue +99 -99
  122. package/components/common/wizards/common/compatibility/Old.vue +53 -53
  123. package/components/common/wizards/common/steps/computeResource/ComputeResource.vue +86 -86
  124. package/components/common/wizards/common/steps/computeResource/New.vue +93 -93
  125. package/components/common/wizards/common/steps/computeResource/Old.vue +103 -103
  126. package/components/common/wizards/common/steps/name/Name.vue +178 -178
  127. package/components/common/wizards/common/steps/name/New.vue +221 -221
  128. package/components/common/wizards/common/steps/name/Old.vue +121 -121
  129. package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
  130. package/components/common/wizards/common/steps/name/location/Location.vue +85 -85
  131. package/components/common/wizards/common/steps/name/location/New.vue +40 -40
  132. package/components/common/wizards/datastore/add/Add.vue +228 -228
  133. package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
  134. package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
  135. package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +205 -205
  136. package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
  137. package/composables/useAppVersion.ts +21 -21
  138. package/composables/useLocal.ts +6 -6
  139. package/composables/useLocalCommon.ts +39 -39
  140. package/package.json +1 -3
  141. package/plugins/console.ts +21 -21
  142. package/plugins/date.ts +233 -233
  143. package/plugins/mouse.ts +21 -21
  144. package/plugins/panelStates.ts +70 -70
  145. package/plugins/text.ts +59 -59
  146. package/public/spice-console/application/clientgui.js +854 -854
  147. package/public/spice-console/application/packetfactory.js +211 -211
  148. package/public/spice-console/application/virtualmouse.js +147 -147
  149. package/public/spice-console/lib/images/bitmap.js +203 -203
  150. package/public/spice-console/network/spicechannel.js +440 -440
  151. package/public/spice-console/process/cursorprocess.js +121 -121
  152. package/public/spice-console/process/inputprocess.js +227 -227
  153. package/public/spice-console/process/mainprocess.js +210 -210
  154. package/public/spice-console/run.js +210 -210
  155. package/store/main/mutations.ts +7 -7
  156. package/store/main/state.ts +7 -7
  157. /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{PasswordNew.vue → New.vue} +0 -0
  158. /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{PasswordOld.vue → Old.vue} +0 -0
@@ -1,457 +1,457 @@
1
- <template>
2
- <ui-wizard
3
- :steps="props.wizard.steps"
4
- :selected-scheme="props.selectedScheme"
5
- :is-loading="props.wizard.wizardLoader.status"
6
- :title="props.title"
7
- :texts="texts"
8
- test-id="clone-exist-vm"
9
- show
10
- @change-steps="onChangeSteps"
11
- @hide="onHideModal"
12
- @submit="onClone"
13
- >
14
- <template #content="{ selectedStep }">
15
- <ui-wizard-block
16
- v-if="selectedStep.id === props.dynamicSteps.scheduledTasks"
17
- :sub-title-height="height0"
18
- >
19
- <template #subTitle>
20
- <div ref="subTitleBlock0">
21
- <div class="subtitle-block flex flex-col">
22
- <ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
23
- </div>
24
- </div>
25
- </template>
26
- <template #content>
27
- <common-pages-scheduled-tasks-modals-common-new-task-form
28
- v-model="schedulerTaskForm"
29
- :target="props.selectedVirtualMachine"
30
- class="new-task-form"
31
- />
32
- </template>
33
- </ui-wizard-block>
34
-
35
- <ui-wizard-block
36
- v-if="
37
- selectedStep.id === props.dynamicSteps.selectName ||
38
- selectedStep.id === props.dynamicSteps.selectNameFolder
39
- "
40
- :sub-title-height="height1"
41
- >
42
- <template #subTitle>
43
- <div ref="subTitleBlock1">
44
- <div class="subtitle-block flex flex-col">
45
- <div
46
- id="name-alert-wrapper"
47
- :class="[{ 'mb-4': !isNameAlertWrapperEmpty }]"
48
- ></div>
49
- <ui-wizard-subtitle
50
- :sub-title="localization.common.specifyUniqueNameForVm"
51
- />
52
- </div>
53
- </div>
54
- </template>
55
- <template #content>
56
- <common-wizards-common-steps-name
57
- v-model:name="vmForm.name"
58
- v-model:location="location"
59
- :show="
60
- selectedStep.id === props.dynamicSteps.selectName ||
61
- selectedStep.id === props.dynamicSteps.selectNameFolder
62
- "
63
- :name-form-submit="props.nameFormSubmit"
64
- :name-request-url="props.nameRequestUrl"
65
- :has-location="props.project === 'sphere'"
66
- :location-nodes="props.locationNodes"
67
- :allowed-location-kinds="props.allowedLocationKinds"
68
- :location-description="props.locationDescription"
69
- :validation-description="
70
- localization.common.enterValidLocationVirtualMachine
71
- "
72
- :name-exist-validation-description="
73
- localization.common.vmNameExistInSelectedLocation
74
- "
75
- :test-ids="props.nameTestIds"
76
- @submit="emits('change-name', $event)"
77
- @has-errors="isNameAlertWrapperEmpty = $event"
78
- />
79
- </template>
80
- </ui-wizard-block>
81
-
82
- <ui-wizard-block
83
- v-if="selectedStep.id === props.dynamicSteps.selectStorage"
84
- :sub-title-height="height2"
85
- >
86
- <template #subTitle>
87
- <div ref="subTitleBlock2">
88
- <div class="subtitle-block flex flex-col">
89
- <ui-wizard-subtitle
90
- :sub-title="
91
- localization.common.selectStorageConfigurationDiskFiles2
92
- "
93
- />
94
- </div>
95
- </div>
96
- </template>
97
- <template #content>
98
- <common-vm-actions-common-select-storage
99
- :storage-submit="props.storageSubmit"
100
- :datastore="props.datastore"
101
- :is-datastore-loading="props.isDatastoreLoading"
102
- :storage="vmForm.storage"
103
- :get-datastore-table-func="props.getDatastoreTableFunc"
104
- hide-alert
105
- @change-storage="emits('change-storage', $event)"
106
- />
107
- </template>
108
- </ui-wizard-block>
109
-
110
- <ui-wizard-block
111
- v-if="selectedStep.id === props.dynamicSteps.selectOptions"
112
- :sub-title-height="height3"
113
- >
114
- <template #subTitle>
115
- <div ref="subTitleBlock3">
116
- <div class="subtitle-block flex flex-col">
117
- <ui-wizard-subtitle
118
- :sub-title="localization.vmWizard.selectAdvancedOptionsCloning"
119
- />
120
- </div>
121
- </div>
122
- </template>
123
- <template #content>
124
- <common-vm-actions-common-select-options
125
- :is-create-template="props.isNewVmFromTemplate"
126
- @change="emits('change-select-options', $event)"
127
- />
128
- </template>
129
- </ui-wizard-block>
130
-
131
- <ui-wizard-block
132
- v-if="selectedStep.id === props.dynamicSteps.selectGuestOSMachineType"
133
- :sub-title-height="height4"
134
- >
135
- <template #subTitle>
136
- <div ref="subTitleBlock4">
137
- <div class="subtitle-block flex flex-col">
138
- <ui-wizard-subtitle
139
- :sub-title="
140
- localization.common
141
- .chooseGuestOSInstalledVmAndMachineTypeUsedCreateVm
142
- "
143
- />
144
- </div>
145
- </div>
146
- </template>
147
- <template #content>
148
- <common-vm-actions-common-select-os
149
- v-model:machine-type="vmForm.guestMachineType"
150
- v-model:guest-os-family="vmForm.guestOsFamily"
151
- v-model:guest-os-version="vmForm.guestOsVersion"
152
- :families-options="props.guestOsFamilies"
153
- :versions-options="props.guestOsVersions"
154
- :machine-types-options="props.machineTypes"
155
- :error-validation-fields="props.errorValidationFields"
156
- @remove-error-by-title="emits('remove-error-by-title', $event)"
157
- />
158
- </template>
159
- </ui-wizard-block>
160
-
161
- <ui-wizard-block
162
- v-if="selectedStep.id === props.dynamicSteps.customizeHardware"
163
- >
164
- <template #content>
165
- <common-vm-actions-common-customize-hardware
166
- v-model:vm-name="vmName"
167
- v-model:guest-machine-type="props.vmSettings.guestMachineType"
168
- v-model:guest-os-family="props.vmSettings.guestOsFamily"
169
- v-model:guest-os-version="props.vmSettings.guestOsVersion"
170
- :storage="vmForm.storage"
171
- :hard-disks-for-boot-options="props.virtualHardwareHardDisksLocal"
172
- :cd-dvd-drives-for-boot-options="
173
- props.virtualHardwareCdDvdDrivesLocal
174
- "
175
- :networks-for-boot-options="props.virtualHardwareNetworksLocal"
176
- :cd-dvd-drives="props.vmSettings.cdDvdDrives"
177
- :hard-disks="props.vmSettings.hardDisks"
178
- :networks="props.vmSettings.networks"
179
- :customize-hardware-submit="props.customizeHardwareSubmit"
180
- :max-cpus="props.vmSettings.maxCpus"
181
- :max-memory="props.vmSettings.maxMemory"
182
- :cpu-models="props.vmSettings.cpuModels"
183
- :cpu="props.vmSettings.cpu"
184
- :memory="props.vmSettings.memory"
185
- :video-card="props.vmSettings.videoCard"
186
- :usb-controller="props.vmSettings.usbController"
187
- :pci-devices="props.vmSettings.pciDevices"
188
- :selected-nav-item="props.selectedNavItem"
189
- :hard-disks-for-edit="props.vmSettings.hardDisks"
190
- :options="props.vmSettings.options"
191
- :nodes="props.nodes"
192
- :files="props.files"
193
- :networks-table="props.networksTable"
194
- :error-validation-fields="props.errorValidationFields"
195
- :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
196
- :passthrough-devices="props.passthroughDevices"
197
- :mediated-devices="props.mediatedDevices"
198
- :get-datastore-table-func="props.getDatastoreTableFunc"
199
- :datastore="props.datastore"
200
- :is-datastore-loading="props.isDatastoreLoading"
201
- :project="props.project"
202
- is-clone
203
- @change-boot-order="emits('change-boot-order', $event)"
204
- @send-data="emits('change-customize-hardware', $event)"
205
- @get-storage="emits('get-storage', $event)"
206
- @get-folders-or-files="emits('get-folders-or-files', $event)"
207
- @get-active-device-child="emits('get-active-device-child', $event)"
208
- @show-datastore-child="emits('show-datastore-child', $event)"
209
- @get-networks-table="emits('get-networks-table', $event)"
210
- @get-pci-devices="emits('get-pci-devices')"
211
- />
212
- </template>
213
- </ui-wizard-block>
214
-
215
- <ui-wizard-block
216
- v-if="selectedStep.id === props.dynamicSteps.selectComputeResource"
217
- :sub-title-height="height5"
218
- >
219
- <template #subTitle>
220
- <div ref="subTitleBlock5">
221
- <div class="subtitle-block">
222
- <ui-alert
223
- v-if="props.computeResourceAlert.length"
224
- :messages="props.computeResourceAlert"
225
- test-id="computed-resource-alert"
226
- type="error"
227
- size="md"
228
- class="subtitle-block__alert"
229
- />
230
- <ui-wizard-subtitle
231
- :sub-title="
232
- localization.vmWizard
233
- .selectDestinationComputeResourceForThisOperation
234
- "
235
- />
236
- </div>
237
- </div>
238
- </template>
239
- <template #content>
240
- <common-wizards-common-steps-compute-resource
241
- v-if="props.isSphere"
242
- v-show="
243
- selectedStep.id === props.dynamicSteps.selectComputeResource
244
- "
245
- v-model="computeResource"
246
- :node="computeResourceTreeLocal"
247
- :alert-messages="props.computeResourceAlert"
248
- :is-loading="props.isLoadingComputeTree"
249
- :compatibility-text="props.compatibilityText"
250
- />
251
- </template>
252
- </ui-wizard-block>
253
-
254
- <ui-wizard-block
255
- v-if="selectedStep.id === props.dynamicSteps.readyComplete"
256
- :sub-title-height="heightReadyComplete"
257
- >
258
- <template #subTitle>
259
- <div ref="subTitleBlockReadyComplete">
260
- <div class="subtitle-block">
261
- <ui-wizard-subtitle
262
- :sub-title="localization.vmWizard.lastCreateSubtitle"
263
- />
264
- </div>
265
- </div>
266
- </template>
267
- <template #content>
268
- <div class="select-block-wrap h-full flex flex-col mt-3">
269
- <common-ready-to-complete :data="props.readyCompleteTableInfo" />
270
- <div
271
- class="vm-hardware-version-wrap justify-end flex flex-1 mt-4 pb-4"
272
- >
273
- <span class="vm-hardware-version">{{
274
- props.compatibilityInfo
275
- }}</span>
276
- </div>
277
- </div>
278
- </template>
279
- </ui-wizard-block>
280
- </template>
281
- </ui-wizard>
282
- </template>
283
-
284
- <script setup lang="ts">
285
- import { useElementSize } from '@vueuse/core'
286
- import type {
287
- UI_I_WizardStep,
288
- UI_I_WizardTexts,
289
- } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
290
- import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
291
- import type {
292
- UI_I_ArbitraryObject,
293
- UI_I_Localization,
294
- } from '~/lib/models/interfaces'
295
- import type {
296
- UI_I_SendDataNewCdDvdDrive,
297
- UI_I_SendDataNewHardDisk,
298
- UI_I_SendDataNewNetwork,
299
- } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
300
- import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
301
- import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
302
- import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
303
- import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
304
- import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
305
- import type { UI_I_NameTestIds } from '~/components/common/wizards/common/steps/name/lib/models/interfaces'
306
- import type { UI_T_Project } from '~/lib/models/types'
307
- import type { UI_I_VmForm } from '~/components/common/vm/actions/common/lib/models/interfaces'
308
- import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
309
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
310
- import type { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
311
- import type { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
312
- import type { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
313
- import type {
314
- UI_I_MediatedDevice,
315
- UI_I_PciDevice,
316
- UI_I_VmSettings,
317
- } from '~/lib/models/store/vm/interfaces'
318
- import type {
319
- UI_I_DatastoreTableItem,
320
- UI_I_FolderOrFileTreePayload,
321
- } from '~/lib/models/store/storage/interfaces'
322
- import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
323
- import type { UI_T_CompatibilityStatus } from '~/components/common/wizards/common/compatibility/lib/models/types'
324
-
325
- const vmForm = defineModel<UI_I_VmForm>('vm-form')
326
- const schedulerTaskForm = defineModel<UI_I_ScheduleNewTasksForm>(
327
- 'scheduler-task-form'
328
- )
329
- const vmName = defineModel<string>('vm-name')
330
- const computeResource = defineModel<UI_I_TreeNode | undefined>(
331
- 'compute-resource'
332
- )
333
- const location = defineModel<UI_I_TreeNode | null>('location')
334
- const props = withDefaults(
335
- defineProps<{
336
- project: UI_T_Project
337
- vmSettings: UI_I_VmSettings | null
338
- nodes: UI_I_FileTreeNode[]
339
- files: UI_I_FileTreeNode[]
340
- networksTable: UI_I_NetworkTableItem[]
341
- datastore: UI_I_DatastoreTableItem[]
342
- isDatastoreLoading: boolean
343
- errorValidationFields: UI_I_ErrorValidationField[]
344
- readyCompleteTableInfo: UI_I_TableInfoItem[]
345
- vmCpuHelpTextSecond: string
346
- getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
347
- passthroughDevices: UI_I_PciDevice[]
348
- mediatedDevices: UI_I_MediatedDevice[]
349
- nameRequestUrl: string
350
- wizard: Wizard
351
- selectedScheme: number[]
352
- selectedVirtualMachine: string
353
- isNewVmFromTemplate: boolean | undefined
354
- computeResourceTree: UI_I_TreeNode[] | undefined // для сферы
355
- locationNodes: UI_I_TreeNode[] | undefined // для сферы
356
- title: string
357
- nameFormSubmit: null | Function
358
- storageSubmit: null | Function
359
- customizeHardwareSubmit: null | Function
360
- selectedNavItem: UI_T_SelectedNavItem
361
- allowedLocationKinds: number[]
362
- isSphere: boolean
363
- locationDescription: string
364
- nameTestIds: UI_I_NameTestIds
365
- virtualHardwareHardDisksLocal: UI_I_SendDataNewHardDisk[] | null
366
- virtualHardwareNetworksLocal: UI_I_SendDataNewNetwork[] | null
367
- virtualHardwareCdDvdDrivesLocal: UI_I_SendDataNewCdDvdDrive[] | null
368
- guestOsFamilies: UI_I_OptionItem[]
369
- guestOsVersions: UI_I_ArbitraryObject<UI_I_OptionItem[]>
370
- machineTypes: UI_I_OptionItem[]
371
- dynamicSteps: UI_I_ArbitraryObject<number>
372
- isLoadingComputeTree?: boolean // для сферы
373
- computeResourceAlert?: string[] // для сферы
374
- compatibilityText?: [UI_T_CompatibilityStatus, string] // для сферы
375
- }>(),
376
- {
377
- isLoadingComputeTree: false,
378
- computeResourceAlert: () => [],
379
- compatibilityText: () => ['none', ''],
380
- }
381
- )
382
-
383
- const emits = defineEmits<{
384
- (event: 'get-storage', value: UI_I_TablePayload): void
385
- (event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
386
- (event: 'get-active-device-child', value: UI_I_FileTreeNode): void
387
- (event: 'show-datastore-child', value: UI_I_FileTreeNode): void
388
- (event: 'remove-error-by-title', value: string): void
389
- (event: 'get-networks-table', value: UI_I_TablePayload): void
390
- (event: 'get-pci-devices'): void
391
- (event: 'change-steps', value: UI_I_WizardStep[]): void
392
- (event: 'change-name', value: [string, UI_I_TreeNode | null]): void
393
- (event: 'change-storage', value: UI_I_DatastoreTableItem | null): void
394
- (event: 'change-select-options', value: string[]): void
395
- (event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
396
- (
397
- event: 'change-customize-hardware',
398
- value: UI_I_SendDataCustomizeHardware
399
- ): void
400
- (event: 'hide'): void
401
- (event: 'finish'): void
402
- }>()
403
-
404
- const localization = computed<UI_I_Localization>(() => useLocal())
405
-
406
- const computeResourceTreeLocal = computed<UI_I_TreeNode | null>(() => {
407
- // для сферы
408
- return props.computeResourceTree?.[0] || null
409
- })
410
-
411
- const texts = computed<UI_I_WizardTexts>(() => ({
412
- cancel: localization.value.common.cancel,
413
- back: localization.value.common.backCap,
414
- processing: localization.value.common.processing,
415
- next: localization.value.common.next,
416
- finish: localization.value.common.clone,
417
- incompleteTitle: localization.value.common.incompleteProcess,
418
- incompleteMessage: localization.value.common.incompleteProcessMessage,
419
- incompleteCancel: localization.value.common.cancel,
420
- incompleteLeave: localization.value.common.leave,
421
- step: localization.value.common.step,
422
- of: localization.value.common.of2,
423
- }))
424
-
425
- const subTitleBlock0 = ref<HTMLElement | null>(null)
426
- const { height: height0 } = useElementSize(subTitleBlock0)
427
-
428
- const subTitleBlock1 = ref<HTMLElement | null>(null)
429
- const { height: height1 } = useElementSize(subTitleBlock1)
430
-
431
- const subTitleBlock2 = ref<HTMLElement | null>(null)
432
- const { height: height2 } = useElementSize(subTitleBlock2)
433
-
434
- const subTitleBlock3 = ref<HTMLElement | null>(null)
435
- const { height: height3 } = useElementSize(subTitleBlock3)
436
-
437
- const subTitleBlock4 = ref<HTMLElement | null>(null)
438
- const { height: height4 } = useElementSize(subTitleBlock4)
439
-
440
- const subTitleBlock5 = ref<HTMLElement | null>(null)
441
- const { height: height5 } = useElementSize(subTitleBlock5)
442
-
443
- const subTitleBlockReadyComplete = ref<HTMLElement | null>(null)
444
- const { height: heightReadyComplete } = useElementSize(
445
- subTitleBlockReadyComplete
446
- )
447
-
448
- const isNameAlertWrapperEmpty = ref<boolean>(false)
449
-
450
- const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> =>
451
- emits('change-steps', value)
452
-
453
- const onHideModal = (): void => emits('hide')
454
- const onClone = (): void => emits('finish')
455
- </script>
456
-
457
- <style scoped lang="scss"></style>
1
+ <template>
2
+ <ui-wizard
3
+ :steps="props.wizard.steps"
4
+ :selected-scheme="props.selectedScheme"
5
+ :is-loading="props.wizard.wizardLoader.status"
6
+ :title="props.title"
7
+ :texts="texts"
8
+ test-id="clone-exist-vm"
9
+ show
10
+ @change-steps="onChangeSteps"
11
+ @hide="onHideModal"
12
+ @submit="onClone"
13
+ >
14
+ <template #content="{ selectedStep }">
15
+ <ui-wizard-block
16
+ v-if="selectedStep.id === props.dynamicSteps.scheduledTasks"
17
+ :sub-title-height="height0"
18
+ >
19
+ <template #subTitle>
20
+ <div ref="subTitleBlock0">
21
+ <div class="subtitle-block flex flex-col">
22
+ <ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
23
+ </div>
24
+ </div>
25
+ </template>
26
+ <template #content>
27
+ <common-pages-scheduled-tasks-modals-common-new-task-form
28
+ v-model="schedulerTaskForm"
29
+ :target="props.selectedVirtualMachine"
30
+ class="new-task-form"
31
+ />
32
+ </template>
33
+ </ui-wizard-block>
34
+
35
+ <ui-wizard-block
36
+ v-if="
37
+ selectedStep.id === props.dynamicSteps.selectName ||
38
+ selectedStep.id === props.dynamicSteps.selectNameFolder
39
+ "
40
+ :sub-title-height="height1"
41
+ >
42
+ <template #subTitle>
43
+ <div ref="subTitleBlock1">
44
+ <div class="subtitle-block flex flex-col">
45
+ <div
46
+ id="name-alert-wrapper"
47
+ :class="[{ 'mb-4': !isNameAlertWrapperEmpty }]"
48
+ ></div>
49
+ <ui-wizard-subtitle
50
+ :sub-title="localization.common.specifyUniqueNameForVm"
51
+ />
52
+ </div>
53
+ </div>
54
+ </template>
55
+ <template #content>
56
+ <common-wizards-common-steps-name
57
+ v-model:name="vmForm.name"
58
+ v-model:location="location"
59
+ :show="
60
+ selectedStep.id === props.dynamicSteps.selectName ||
61
+ selectedStep.id === props.dynamicSteps.selectNameFolder
62
+ "
63
+ :name-form-submit="props.nameFormSubmit"
64
+ :name-request-url="props.nameRequestUrl"
65
+ :has-location="props.project === 'sphere'"
66
+ :location-nodes="props.locationNodes"
67
+ :allowed-location-kinds="props.allowedLocationKinds"
68
+ :location-description="props.locationDescription"
69
+ :validation-description="
70
+ localization.common.enterValidLocationVirtualMachine
71
+ "
72
+ :name-exist-validation-description="
73
+ localization.common.vmNameExistInSelectedLocation
74
+ "
75
+ :test-ids="props.nameTestIds"
76
+ @submit="emits('change-name', $event)"
77
+ @has-errors="isNameAlertWrapperEmpty = $event"
78
+ />
79
+ </template>
80
+ </ui-wizard-block>
81
+
82
+ <ui-wizard-block
83
+ v-if="selectedStep.id === props.dynamicSteps.selectStorage"
84
+ :sub-title-height="height2"
85
+ >
86
+ <template #subTitle>
87
+ <div ref="subTitleBlock2">
88
+ <div class="subtitle-block flex flex-col">
89
+ <ui-wizard-subtitle
90
+ :sub-title="
91
+ localization.common.selectStorageConfigurationDiskFiles2
92
+ "
93
+ />
94
+ </div>
95
+ </div>
96
+ </template>
97
+ <template #content>
98
+ <common-vm-actions-common-select-storage
99
+ :storage-submit="props.storageSubmit"
100
+ :datastore="props.datastore"
101
+ :is-datastore-loading="props.isDatastoreLoading"
102
+ :storage="vmForm.storage"
103
+ :get-datastore-table-func="props.getDatastoreTableFunc"
104
+ hide-alert
105
+ @change-storage="emits('change-storage', $event)"
106
+ />
107
+ </template>
108
+ </ui-wizard-block>
109
+
110
+ <ui-wizard-block
111
+ v-if="selectedStep.id === props.dynamicSteps.selectOptions"
112
+ :sub-title-height="height3"
113
+ >
114
+ <template #subTitle>
115
+ <div ref="subTitleBlock3">
116
+ <div class="subtitle-block flex flex-col">
117
+ <ui-wizard-subtitle
118
+ :sub-title="localization.vmWizard.selectAdvancedOptionsCloning"
119
+ />
120
+ </div>
121
+ </div>
122
+ </template>
123
+ <template #content>
124
+ <common-vm-actions-common-select-options
125
+ :is-create-template="props.isNewVmFromTemplate"
126
+ @change="emits('change-select-options', $event)"
127
+ />
128
+ </template>
129
+ </ui-wizard-block>
130
+
131
+ <ui-wizard-block
132
+ v-if="selectedStep.id === props.dynamicSteps.selectGuestOSMachineType"
133
+ :sub-title-height="height4"
134
+ >
135
+ <template #subTitle>
136
+ <div ref="subTitleBlock4">
137
+ <div class="subtitle-block flex flex-col">
138
+ <ui-wizard-subtitle
139
+ :sub-title="
140
+ localization.common
141
+ .chooseGuestOSInstalledVmAndMachineTypeUsedCreateVm
142
+ "
143
+ />
144
+ </div>
145
+ </div>
146
+ </template>
147
+ <template #content>
148
+ <common-vm-actions-common-select-os
149
+ v-model:machine-type="vmForm.guestMachineType"
150
+ v-model:guest-os-family="vmForm.guestOsFamily"
151
+ v-model:guest-os-version="vmForm.guestOsVersion"
152
+ :families-options="props.guestOsFamilies"
153
+ :versions-options="props.guestOsVersions"
154
+ :machine-types-options="props.machineTypes"
155
+ :error-validation-fields="props.errorValidationFields"
156
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
157
+ />
158
+ </template>
159
+ </ui-wizard-block>
160
+
161
+ <ui-wizard-block
162
+ v-if="selectedStep.id === props.dynamicSteps.customizeHardware"
163
+ >
164
+ <template #content>
165
+ <common-vm-actions-common-customize-hardware
166
+ v-model:vm-name="vmName"
167
+ v-model:guest-machine-type="props.vmSettings.guestMachineType"
168
+ v-model:guest-os-family="props.vmSettings.guestOsFamily"
169
+ v-model:guest-os-version="props.vmSettings.guestOsVersion"
170
+ :storage="vmForm.storage"
171
+ :hard-disks-for-boot-options="props.virtualHardwareHardDisksLocal"
172
+ :cd-dvd-drives-for-boot-options="
173
+ props.virtualHardwareCdDvdDrivesLocal
174
+ "
175
+ :networks-for-boot-options="props.virtualHardwareNetworksLocal"
176
+ :cd-dvd-drives="props.vmSettings.cdDvdDrives"
177
+ :hard-disks="props.vmSettings.hardDisks"
178
+ :networks="props.vmSettings.networks"
179
+ :customize-hardware-submit="props.customizeHardwareSubmit"
180
+ :max-cpus="props.vmSettings.maxCpus"
181
+ :max-memory="props.vmSettings.maxMemory"
182
+ :cpu-models="props.vmSettings.cpuModels"
183
+ :cpu="props.vmSettings.cpu"
184
+ :memory="props.vmSettings.memory"
185
+ :video-card="props.vmSettings.videoCard"
186
+ :usb-controller="props.vmSettings.usbController"
187
+ :pci-devices="props.vmSettings.pciDevices"
188
+ :selected-nav-item="props.selectedNavItem"
189
+ :hard-disks-for-edit="props.vmSettings.hardDisks"
190
+ :options="props.vmSettings.options"
191
+ :nodes="props.nodes"
192
+ :files="props.files"
193
+ :networks-table="props.networksTable"
194
+ :error-validation-fields="props.errorValidationFields"
195
+ :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
196
+ :passthrough-devices="props.passthroughDevices"
197
+ :mediated-devices="props.mediatedDevices"
198
+ :get-datastore-table-func="props.getDatastoreTableFunc"
199
+ :datastore="props.datastore"
200
+ :is-datastore-loading="props.isDatastoreLoading"
201
+ :project="props.project"
202
+ is-clone
203
+ @change-boot-order="emits('change-boot-order', $event)"
204
+ @send-data="emits('change-customize-hardware', $event)"
205
+ @get-storage="emits('get-storage', $event)"
206
+ @get-folders-or-files="emits('get-folders-or-files', $event)"
207
+ @get-active-device-child="emits('get-active-device-child', $event)"
208
+ @show-datastore-child="emits('show-datastore-child', $event)"
209
+ @get-networks-table="emits('get-networks-table', $event)"
210
+ @get-pci-devices="emits('get-pci-devices')"
211
+ />
212
+ </template>
213
+ </ui-wizard-block>
214
+
215
+ <ui-wizard-block
216
+ v-if="selectedStep.id === props.dynamicSteps.selectComputeResource"
217
+ :sub-title-height="height5"
218
+ >
219
+ <template #subTitle>
220
+ <div ref="subTitleBlock5">
221
+ <div class="subtitle-block">
222
+ <ui-alert
223
+ v-if="props.computeResourceAlert.length"
224
+ :messages="props.computeResourceAlert"
225
+ test-id="computed-resource-alert"
226
+ type="error"
227
+ size="md"
228
+ class="subtitle-block__alert"
229
+ />
230
+ <ui-wizard-subtitle
231
+ :sub-title="
232
+ localization.vmWizard
233
+ .selectDestinationComputeResourceForThisOperation
234
+ "
235
+ />
236
+ </div>
237
+ </div>
238
+ </template>
239
+ <template #content>
240
+ <common-wizards-common-steps-compute-resource
241
+ v-if="props.isSphere"
242
+ v-show="
243
+ selectedStep.id === props.dynamicSteps.selectComputeResource
244
+ "
245
+ v-model="computeResource"
246
+ :node="computeResourceTreeLocal"
247
+ :alert-messages="props.computeResourceAlert"
248
+ :is-loading="props.isLoadingComputeTree"
249
+ :compatibility-text="props.compatibilityText"
250
+ />
251
+ </template>
252
+ </ui-wizard-block>
253
+
254
+ <ui-wizard-block
255
+ v-if="selectedStep.id === props.dynamicSteps.readyComplete"
256
+ :sub-title-height="heightReadyComplete"
257
+ >
258
+ <template #subTitle>
259
+ <div ref="subTitleBlockReadyComplete">
260
+ <div class="subtitle-block">
261
+ <ui-wizard-subtitle
262
+ :sub-title="localization.vmWizard.lastCreateSubtitle"
263
+ />
264
+ </div>
265
+ </div>
266
+ </template>
267
+ <template #content>
268
+ <div class="select-block-wrap h-full flex flex-col mt-3">
269
+ <common-ready-to-complete :data="props.readyCompleteTableInfo" />
270
+ <div
271
+ class="vm-hardware-version-wrap justify-end flex flex-1 mt-4 pb-4"
272
+ >
273
+ <span class="vm-hardware-version">{{
274
+ props.compatibilityInfo
275
+ }}</span>
276
+ </div>
277
+ </div>
278
+ </template>
279
+ </ui-wizard-block>
280
+ </template>
281
+ </ui-wizard>
282
+ </template>
283
+
284
+ <script setup lang="ts">
285
+ import { useElementSize } from '@vueuse/core'
286
+ import type {
287
+ UI_I_WizardStep,
288
+ UI_I_WizardTexts,
289
+ } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
290
+ import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
291
+ import type {
292
+ UI_I_ArbitraryObject,
293
+ UI_I_Localization,
294
+ } from '~/lib/models/interfaces'
295
+ import type {
296
+ UI_I_SendDataNewCdDvdDrive,
297
+ UI_I_SendDataNewHardDisk,
298
+ UI_I_SendDataNewNetwork,
299
+ } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
300
+ import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
301
+ import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
302
+ import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
303
+ import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
304
+ import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
305
+ import type { UI_I_NameTestIds } from '~/components/common/wizards/common/steps/name/lib/models/interfaces'
306
+ import type { UI_T_Project } from '~/lib/models/types'
307
+ import type { UI_I_VmForm } from '~/components/common/vm/actions/common/lib/models/interfaces'
308
+ import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
309
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
310
+ import type { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
311
+ import type { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
312
+ import type { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
313
+ import type {
314
+ UI_I_MediatedDevice,
315
+ UI_I_PciDevice,
316
+ UI_I_VmSettings,
317
+ } from '~/lib/models/store/vm/interfaces'
318
+ import type {
319
+ UI_I_DatastoreTableItem,
320
+ UI_I_FolderOrFileTreePayload,
321
+ } from '~/lib/models/store/storage/interfaces'
322
+ import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
323
+ import type { UI_T_CompatibilityStatus } from '~/components/common/wizards/common/compatibility/lib/models/types'
324
+
325
+ const vmForm = defineModel<UI_I_VmForm>('vm-form')
326
+ const schedulerTaskForm = defineModel<UI_I_ScheduleNewTasksForm>(
327
+ 'scheduler-task-form'
328
+ )
329
+ const vmName = defineModel<string>('vm-name')
330
+ const computeResource = defineModel<UI_I_TreeNode | undefined>(
331
+ 'compute-resource'
332
+ )
333
+ const location = defineModel<UI_I_TreeNode | null>('location')
334
+ const props = withDefaults(
335
+ defineProps<{
336
+ project: UI_T_Project
337
+ vmSettings: UI_I_VmSettings | null
338
+ nodes: UI_I_FileTreeNode[]
339
+ files: UI_I_FileTreeNode[]
340
+ networksTable: UI_I_NetworkTableItem[]
341
+ datastore: UI_I_DatastoreTableItem[]
342
+ isDatastoreLoading: boolean
343
+ errorValidationFields: UI_I_ErrorValidationField[]
344
+ readyCompleteTableInfo: UI_I_TableInfoItem[]
345
+ vmCpuHelpTextSecond: string
346
+ getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
347
+ passthroughDevices: UI_I_PciDevice[]
348
+ mediatedDevices: UI_I_MediatedDevice[]
349
+ nameRequestUrl: string
350
+ wizard: Wizard
351
+ selectedScheme: number[]
352
+ selectedVirtualMachine: string
353
+ isNewVmFromTemplate: boolean | undefined
354
+ computeResourceTree: UI_I_TreeNode[] | undefined // для сферы
355
+ locationNodes: UI_I_TreeNode[] | undefined // для сферы
356
+ title: string
357
+ nameFormSubmit: null | Function
358
+ storageSubmit: null | Function
359
+ customizeHardwareSubmit: null | Function
360
+ selectedNavItem: UI_T_SelectedNavItem
361
+ allowedLocationKinds: number[]
362
+ isSphere: boolean
363
+ locationDescription: string
364
+ nameTestIds: UI_I_NameTestIds
365
+ virtualHardwareHardDisksLocal: UI_I_SendDataNewHardDisk[] | null
366
+ virtualHardwareNetworksLocal: UI_I_SendDataNewNetwork[] | null
367
+ virtualHardwareCdDvdDrivesLocal: UI_I_SendDataNewCdDvdDrive[] | null
368
+ guestOsFamilies: UI_I_OptionItem[]
369
+ guestOsVersions: UI_I_ArbitraryObject<UI_I_OptionItem[]>
370
+ machineTypes: UI_I_OptionItem[]
371
+ dynamicSteps: UI_I_ArbitraryObject<number>
372
+ isLoadingComputeTree?: boolean // для сферы
373
+ computeResourceAlert?: string[] // для сферы
374
+ compatibilityText?: [UI_T_CompatibilityStatus, string] // для сферы
375
+ }>(),
376
+ {
377
+ isLoadingComputeTree: false,
378
+ computeResourceAlert: () => [],
379
+ compatibilityText: () => ['none', ''],
380
+ }
381
+ )
382
+
383
+ const emits = defineEmits<{
384
+ (event: 'get-storage', value: UI_I_TablePayload): void
385
+ (event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
386
+ (event: 'get-active-device-child', value: UI_I_FileTreeNode): void
387
+ (event: 'show-datastore-child', value: UI_I_FileTreeNode): void
388
+ (event: 'remove-error-by-title', value: string): void
389
+ (event: 'get-networks-table', value: UI_I_TablePayload): void
390
+ (event: 'get-pci-devices'): void
391
+ (event: 'change-steps', value: UI_I_WizardStep[]): void
392
+ (event: 'change-name', value: [string, UI_I_TreeNode | null]): void
393
+ (event: 'change-storage', value: UI_I_DatastoreTableItem | null): void
394
+ (event: 'change-select-options', value: string[]): void
395
+ (event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
396
+ (
397
+ event: 'change-customize-hardware',
398
+ value: UI_I_SendDataCustomizeHardware
399
+ ): void
400
+ (event: 'hide'): void
401
+ (event: 'finish'): void
402
+ }>()
403
+
404
+ const localization = computed<UI_I_Localization>(() => useLocal())
405
+
406
+ const computeResourceTreeLocal = computed<UI_I_TreeNode | null>(() => {
407
+ // для сферы
408
+ return props.computeResourceTree?.[0] || null
409
+ })
410
+
411
+ const texts = computed<UI_I_WizardTexts>(() => ({
412
+ cancel: localization.value.common.cancel,
413
+ back: localization.value.common.backCap,
414
+ processing: localization.value.common.processing,
415
+ next: localization.value.common.next,
416
+ finish: localization.value.common.clone,
417
+ incompleteTitle: localization.value.common.incompleteProcess,
418
+ incompleteMessage: localization.value.common.incompleteProcessMessage,
419
+ incompleteCancel: localization.value.common.cancel,
420
+ incompleteLeave: localization.value.common.leave,
421
+ step: localization.value.common.step,
422
+ of: localization.value.common.of2,
423
+ }))
424
+
425
+ const subTitleBlock0 = ref<HTMLElement | null>(null)
426
+ const { height: height0 } = useElementSize(subTitleBlock0)
427
+
428
+ const subTitleBlock1 = ref<HTMLElement | null>(null)
429
+ const { height: height1 } = useElementSize(subTitleBlock1)
430
+
431
+ const subTitleBlock2 = ref<HTMLElement | null>(null)
432
+ const { height: height2 } = useElementSize(subTitleBlock2)
433
+
434
+ const subTitleBlock3 = ref<HTMLElement | null>(null)
435
+ const { height: height3 } = useElementSize(subTitleBlock3)
436
+
437
+ const subTitleBlock4 = ref<HTMLElement | null>(null)
438
+ const { height: height4 } = useElementSize(subTitleBlock4)
439
+
440
+ const subTitleBlock5 = ref<HTMLElement | null>(null)
441
+ const { height: height5 } = useElementSize(subTitleBlock5)
442
+
443
+ const subTitleBlockReadyComplete = ref<HTMLElement | null>(null)
444
+ const { height: heightReadyComplete } = useElementSize(
445
+ subTitleBlockReadyComplete
446
+ )
447
+
448
+ const isNameAlertWrapperEmpty = ref<boolean>(false)
449
+
450
+ const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> =>
451
+ emits('change-steps', value)
452
+
453
+ const onHideModal = (): void => emits('hide')
454
+ const onClone = (): void => emits('finish')
455
+ </script>
456
+
457
+ <style scoped lang="scss"></style>