bfg-common 1.3.239 → 1.3.240

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 (185) hide show
  1. package/components/atoms/switch/Switch.vue +111 -111
  2. package/components/atoms/table/compact/Compact.vue +526 -526
  3. package/components/common/BadBrowser.vue +16 -12
  4. package/components/common/accordion/Accordion.vue +1 -0
  5. package/components/common/accordion/Recursion.vue +2 -0
  6. package/components/common/accordion/lib/models/interfaces.ts +1 -0
  7. package/components/common/adapterManager/AddAdapterModal.vue +8 -5
  8. package/components/common/adapterManager/AddAdapterWarningModal.vue +1 -0
  9. package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +2 -0
  10. package/components/common/adapterManager/ui/actions/MoveDownAdapterButton.vue +2 -0
  11. package/components/common/adapterManager/ui/actions/MoveUpAdapterButton.vue +2 -0
  12. package/components/common/adapterManager/ui/actions/RemoveAdapterButton.vue +2 -0
  13. package/components/common/adapterManager/ui/table/Adapters.vue +14 -13
  14. package/components/common/adapterManager/ui/table/Header.vue +6 -4
  15. package/components/common/adapterManager/ui/table/Table.vue +13 -4
  16. package/components/common/browse/Browse.vue +5 -1
  17. package/components/common/browse/blocks/Container.vue +3 -0
  18. package/components/common/browse/blocks/contents/Files.vue +1 -0
  19. package/components/common/context/ContextRecursion.vue +6 -1
  20. package/components/common/details/DetailsItem.vue +3 -0
  21. package/components/common/diagramMain/Header.vue +4 -0
  22. package/components/common/diagramMain/adapter/AdapterItem.vue +2 -0
  23. package/components/common/diagramMain/adapter/Contents.vue +2 -0
  24. package/components/common/diagramMain/lib/models/interfaces.ts +1 -0
  25. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +1 -0
  26. package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +13 -27
  27. package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +1 -0
  28. package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +3 -0
  29. package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +8 -0
  30. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +6 -0
  31. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +2 -0
  32. package/components/common/diagramMain/modals/lib/config/networkModal.ts +4 -0
  33. package/components/common/diagramMain/modals/lib/config/portModal.ts +7 -2
  34. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +19 -13
  35. package/components/common/diagramMain/modals/remove/RemoveModal.vue +5 -0
  36. package/components/common/diagramMain/modals/viewSettings/ViewSettings.vue +11 -7
  37. package/components/common/diagramMain/network/Contents.vue +5 -4
  38. package/components/common/diagramMain/port/Port.vue +1 -0
  39. package/components/common/feedback/Buttons.vue +2 -0
  40. package/components/common/feedback/Feedback.vue +9 -2
  41. package/components/common/feedback/Message.vue +9 -0
  42. package/components/common/feedback/VisitPortal.vue +11 -2
  43. package/components/common/help/navbar/left/Left.vue +1 -0
  44. package/components/common/help/navbar/right/Right.vue +12 -2
  45. package/components/common/help/navbar/right/lib/models/interfaces.ts +1 -0
  46. package/components/common/home/alertsTable/AlertsTable.vue +1 -0
  47. package/components/common/modals/Confirmation.vue +10 -2
  48. package/components/common/modals/Rename.vue +1 -0
  49. package/components/common/monitor/advanced/tools/Tools.vue +10 -1
  50. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/Actions.vue +7 -1
  51. package/components/common/monitor/advanced/tools/chartOptionsModal/actions/saveOptionsModal/SaveOptionsModal.vue +6 -1
  52. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +14 -1
  53. package/components/common/monitor/overview/filters/Filters.vue +12 -5
  54. package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +4 -0
  55. package/components/common/pages/Tasks.vue +120 -120
  56. package/components/common/perPage/PerPage.vue +1 -0
  57. package/components/common/recursionTree/RecursionTree.vue +205 -203
  58. package/components/common/recursionTree/lib/models/interfaces.ts +4 -2
  59. package/components/common/select/button/ButtonDropdown.vue +2 -0
  60. package/components/common/select/button/lib/models/interfaces.ts +1 -0
  61. package/components/common/select/input/Input.vue +1 -0
  62. package/components/common/select/radio/RadioGroup.vue +2 -0
  63. package/components/common/select/radio/lib/models/interfaces.ts +1 -0
  64. package/components/common/shortcuts/Block.vue +2 -0
  65. package/components/common/shortcuts/Category.vue +1 -0
  66. package/components/common/shortcuts/lib/models/interfaces.ts +1 -0
  67. package/components/common/spiceConsole/Drawer.vue +4 -0
  68. package/components/common/spiceConsole/keyboard/Keyboard.vue +1 -0
  69. package/components/common/spiceConsole/keyboard/lib/config/keyboardRows.ts +81 -6
  70. package/components/common/spiceConsole/keyboard/lib/models/interfaces.ts +1 -0
  71. package/components/common/split/horizontal/Horizontal.vue +1 -0
  72. package/components/common/vm/actions/add/Add.vue +576 -575
  73. package/components/common/vm/actions/clone/Clone.vue +518 -518
  74. package/components/common/vm/actions/clone/select/options/Options.vue +9 -3
  75. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +269 -269
  76. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +693 -693
  77. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/Bus.vue +5 -1
  78. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +7 -2
  79. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +2 -0
  80. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CoresPerSocket.vue +1 -0
  81. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuHotPlug.vue +1 -0
  82. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuModel.vue +225 -220
  83. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Hv.vue +2 -0
  84. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Iommu.vue +1 -0
  85. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Pc.vue +1 -0
  86. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Sa.vue +2 -0
  87. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +5 -1
  88. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/tooltip/Tooltip.vue +1 -0
  89. package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +59 -59
  90. package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +2 -1
  91. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +1 -0
  92. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryHotPlug.vue +1 -0
  93. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/Location.vue +6 -6
  94. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +5 -6
  95. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/cache/Cache.vue +1 -0
  96. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/limitIops/LimitIops.vue +1 -0
  97. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/mode/Mode.vue +1 -0
  98. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/provisioning/Provisioning.vue +1 -0
  99. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/sharing/Sharing.vue +1 -0
  100. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/Location.vue +2 -0
  101. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +295 -294
  102. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/adapterType/AdapterType.vue +1 -0
  103. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +12 -4
  104. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +165 -165
  105. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIo.vue +5 -1
  106. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGrid.vue +2 -1
  107. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelection.vue +2 -1
  108. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +1 -0
  109. package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/Reservation.vue +3 -1
  110. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/Graphics.vue +6 -1
  111. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/TotalVideoMemory.vue +2 -1
  112. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +1 -0
  113. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/Model.vue +1 -0
  114. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +1 -0
  115. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/Menu.vue +6 -1
  116. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/Secure.vue +6 -1
  117. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +5 -1
  118. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +1 -0
  119. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +5 -1
  120. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/lib/models/interfaces.ts +1 -0
  121. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +4 -1
  122. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/CopyPaste.vue +1 -0
  123. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/FileTransfer.vue +1 -0
  124. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/FolderSharing.vue +1 -0
  125. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/PlaybackCompression.vue +1 -0
  126. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/PowerControl.vue +1 -0
  127. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/imgCompression/ImgCompression.vue +1 -0
  128. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/jpegCompression/JpegCompression.vue +1 -0
  129. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +2 -1
  130. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/mouseMode/MouseMode.vue +6 -1
  131. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +7 -1
  132. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/sharePolicy/SharePolicy.vue +5 -1
  133. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +1 -0
  134. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/type/Type.vue +1 -0
  135. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +2 -1
  136. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/zlibCompression/ZlibCompression.vue +1 -0
  137. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +6 -1
  138. package/components/common/vm/actions/common/select/compatibility/Compatibility.vue +31 -27
  139. package/components/common/vm/actions/common/select/name/Name.vue +7 -1
  140. package/components/common/vm/actions/common/select/os/os.vue +7 -1
  141. package/components/common/vm/actions/common/select/storage/lib/config/config.ts +166 -166
  142. package/components/common/vm/actions/editSettings/EditSettings.vue +313 -313
  143. package/components/common/weekSelect/WeekSelect.vue +143 -112
  144. package/components/common/weekSelect/lib/config/options.ts +10 -10
  145. package/components/common/weekSelect/lib/models/interfaces.ts +1 -0
  146. package/components/common/wizards/datastore/add/local/createName/CreateName.vue +1 -0
  147. package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +8 -7
  148. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +9 -1
  149. package/components/common/wizards/datastore/add/nfs/configuration/serversList/DeletePopover.vue +6 -3
  150. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +1 -0
  151. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/lib/config/radioOptions.ts +3 -0
  152. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +2 -0
  153. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +2 -0
  154. package/components/common/wizards/datastore/add/types/Types.vue +1 -0
  155. package/components/common/wizards/network/add/modals/SelectNetwork.vue +16 -3
  156. package/components/common/wizards/network/add/modals/SelectStandardSwitch.vue +10 -2
  157. package/components/common/wizards/network/add/modals/SelectSwitch.vue +10 -2
  158. package/components/common/wizards/network/add/steps/ConnectionSettings.vue +5 -1
  159. package/components/common/wizards/network/add/steps/IpFourSettings.vue +12 -2
  160. package/components/common/wizards/network/add/steps/PortProperties.vue +16 -3
  161. package/components/common/wizards/network/add/steps/SelectConnectionType.vue +6 -3
  162. package/components/common/wizards/network/add/steps/SelectedTargetDevice.vue +11 -0
  163. package/components/common/wizards/vm/common/tooltip/Tooltip.vue +2 -0
  164. package/components/common/wizards/vm/migrate/select/network/Network.vue +1 -0
  165. package/components/common/wizards/vm/migrate/select/network/table/network/Network.vue +1 -0
  166. package/components/common/wizards/vm/migrate/select/storage/Storage.vue +5 -1
  167. package/components/common/wizards/vm/migrate/select/storage/configure/disk/Disk.vue +1 -0
  168. package/components/common/wizards/vm/migrate/select/storage/diskFormat/DiskFormat.vue +1 -0
  169. package/components/common/wizards/vm/migrate/select/storage/policy/Policy.vue +1 -0
  170. package/components/common/wizards/vm/migrate/select/storage/selectedPerDisk/SelectedPerDisk.vue +1 -0
  171. package/components/common/wizards/vm/migrate/select/targetServer/new/New.vue +9 -1
  172. package/composables/useAppVersion.ts +21 -21
  173. package/composables/useEnvLanguage.ts +20 -20
  174. package/lib/utils/sendTask.ts +72 -72
  175. package/minify.js +146 -146
  176. package/package.json +1 -1
  177. package/public/spice-console/application/codec.js +257 -257
  178. package/public/spice-console/lib/rasterEngine.js +907 -907
  179. package/public/spice-console/network/spicechannel.js +369 -369
  180. package/store/main/lib/interfaces.ts +9 -9
  181. package/store/tasks/actions.ts +133 -133
  182. package/store/tasks/getters.ts +25 -25
  183. package/store/tasks/lib/models/interfaces.ts +18 -18
  184. package/store/tasks/mutations.ts +58 -58
  185. package/store/tasks/state.ts +16 -16
@@ -1,313 +1,313 @@
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
- :storage="vmSettings.storage"
21
- :hard-disks-for-boot-options="virtualHardwareHardDisksLocal"
22
- :cd-dvd-drives-for-boot-options="virtualHardwareCdDvdDrivesLocal"
23
- :networks-for-boot-options="virtualHardwareNetworksLocal"
24
- :cd-dvd-drives="vmSettings.cdDvdDrives"
25
- :hard-disks="vmSettings.hardDisks"
26
- :networks="vmSettings.networks"
27
- :customize-hardware-submit="0"
28
- :max-cpus="vmSettings.maxCpus"
29
- :max-memory="vmSettings.maxMemory"
30
- :cpu-models="vmSettings.cpuModels"
31
- :cpu="vmSettings.cpu"
32
- :memory="vmSettings.memory"
33
- :video-card="vmSettings.videoCard"
34
- :usb-controller="vmSettings.usbController"
35
- :pci-devices="vmSettings.pciDevices"
36
- :selected-nav-item="selectedNavItem"
37
- :hard-disks-for-edit="vmSettings.hardDisks"
38
- :options="vmSettings.options"
39
- :nodes="props.nodes"
40
- :files="props.files"
41
- :networks-table="props.networksTable"
42
- :error-validation-fields="props.errorValidationFields"
43
- :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
44
- :passthrough-devices="props.passthroughDevices"
45
- :state="props.state"
46
- :get-datastore-table-func="props.getDatastoreTableFunc"
47
- :datastore="props.datastore"
48
- is-edit
49
- @get-storage="emits('get-storage', $event)"
50
- @get-folders-or-files="emits('get-folders-or-files', $event)"
51
- @get-active-device-child="emits('get-active-device-child', $event)"
52
- @show-datastore-child="emits('show-datastore-child', $event)"
53
- @get-networks-table="emits('get-networks-table', $event)"
54
- @get-pci-devices="emits('get-pci-devices')"
55
- @change-boot-order="onChangeBootOrder"
56
- @send-data="onChangeCustomizeHardware"
57
- />
58
- </div>
59
- </template>
60
- </atoms-modal>
61
- </div>
62
- </template>
63
-
64
- <script setup lang="ts">
65
- import { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
66
- import { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
67
- import {
68
- UI_I_EditVmPayload,
69
- UI_I_PciDevice,
70
- } from '~/lib/models/store/vm/interfaces'
71
- import { UI_I_Localization } from '~/lib/models/interfaces'
72
- import { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
73
- import {
74
- UI_I_SendDataCpu,
75
- UI_I_SendDataMemory,
76
- UI_I_SendDataNewCdDvdDrive,
77
- UI_I_SendDataNewHardDisk,
78
- UI_I_SendDataNewNetwork,
79
- } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
80
- import { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
81
- import { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
82
- import { UI_I_TablePayload } from '~/lib/models/table/interfaces'
83
- import { UI_I_VmSettings } from '~/lib/models/store/vm/interfaces'
84
- import {
85
- UI_I_DatastoreTableItem,
86
- UI_I_FolderOrFileTreePayload,
87
- } from '~/lib/models/store/storage/interfaces'
88
- import { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
89
- import { UI_T_EditVmFinishFunc } from '~/components/common/vm/actions/editSettings/lib/models/types'
90
-
91
- const props = defineProps<{
92
- loading: boolean
93
- vmSettings: UI_I_VmSettings | null
94
- nodes: UI_I_FileTreeNode[]
95
- files: UI_I_FileTreeNode[]
96
- networksTable: UI_I_NetworkTableItem[]
97
- errorValidationFields: UI_I_ErrorValidationField<string>[]
98
- vmCpuHelpTextSecond: string
99
- vmId: string
100
- datastore: UI_I_DatastoreTableItem[]
101
- validateSendDataFunc: UI_T_EditVmFinishFunc
102
- getDatastoreTableFunc?: (payload: UI_I_TablePayload) => Promise<void>
103
- state?: string | number
104
- passthroughDevices?: UI_I_PciDevice[]
105
- }>()
106
-
107
- const emits = defineEmits<{
108
- (event: 'hide'): void
109
- (event: 'update-vm', value: UI_I_EditVmPayload): void
110
- (event: 'get-storage', value: UI_I_TablePayload): void
111
- (event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
112
- (event: 'get-active-device-child', value: UI_I_FileTreeNode): void
113
- (event: 'show-datastore-child', value: UI_I_FileTreeNode): void
114
- (event: 'get-networks-table', value: UI_I_TablePayload): void
115
- (event: 'get-pci-devices'): void
116
- }>()
117
-
118
- const localization = computed<UI_I_Localization>(() => useLocal())
119
-
120
- const selectedNavItem = ref<UI_T_SelectedNavItem>(0)
121
-
122
- const loading = ref<boolean>(false)
123
- watch(
124
- () => props.loading,
125
- (value) => {
126
- loading.value = value
127
- },
128
- { immediate: true }
129
- )
130
-
131
- const vmSettings = computed<UI_I_VmSettings | null>(() => props.vmSettings)
132
-
133
- const vmName = ref<string>(vmSettings.value?.name || '')
134
- const vmNameCash = ref<string>(vmSettings.value?.name || '')
135
- watch(vmSettings, (newValue) => {
136
- vmName.value = newValue?.name || ''
137
- vmNameCash.value = newValue?.name || ''
138
- })
139
-
140
- const virtualHardwareHardDisks = ref<UI_I_SendDataNewHardDisk[] | null>(null)
141
- const virtualHardwareCdDvdDrives = ref<UI_I_SendDataNewCdDvdDrive[] | null>(
142
- null
143
- )
144
- const virtualHardwareNetworks = ref<UI_I_SendDataNewNetwork[] | null>(null)
145
- const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
146
- virtualHardwareHardDisks.value = data[0]
147
- virtualHardwareCdDvdDrives.value = data[1]
148
- virtualHardwareNetworks.value = data[2]
149
- }
150
-
151
- const customizeHardware = ref<UI_I_SendDataCustomizeHardware | null>(null)
152
- const onChangeCustomizeHardware = (
153
- data: UI_I_SendDataCustomizeHardware
154
- ): void => {
155
- customizeHardware.value = data
156
- }
157
- const onHideModal = (): void => {
158
- emits('hide')
159
- }
160
- const onUpdate = (): void => {
161
- validateSendData()
162
- }
163
-
164
- const virtualHardwareHardDisksLocal = computed<
165
- UI_I_SendDataNewHardDisk[] | null
166
- >(() => customizeHardware.value?.virtualHardware?.hardDisks || null)
167
- const virtualHardwareNetworksLocal = computed<UI_I_SendDataNewNetwork[] | null>(
168
- () => customizeHardware.value?.virtualHardware?.networks || null
169
- )
170
- const virtualHardwareCdDvdDrivesLocal = computed<
171
- UI_I_SendDataNewCdDvdDrive[] | null
172
- >(() => customizeHardware.value?.virtualHardware?.cdDvdDrives || null)
173
-
174
- const virtualHardwareCpu = computed<UI_I_SendDataCpu | null>(
175
- () => customizeHardware.value?.virtualHardware?.cpu || null
176
- )
177
- const virtualHardwareMemory = computed<UI_I_SendDataMemory | null>(
178
- () => customizeHardware.value?.virtualHardware?.memory || null
179
- )
180
-
181
- const validateSendData = async (): Promise<void> => {
182
- loading.value = true
183
- props
184
- .validateSendDataFunc(
185
- vmSettings.value,
186
- virtualHardwareCpu.value,
187
- virtualHardwareMemory.value,
188
- customizeHardware.value,
189
- virtualHardwareNetworks.value,
190
- virtualHardwareHardDisks.value,
191
- virtualHardwareCdDvdDrives.value,
192
- vmName.value,
193
- localization.value,
194
- props.vmId
195
- )
196
- .then((data) => {
197
- loading.value = false
198
-
199
- !data && onHideModal()
200
- })
201
- }
202
- </script>
203
-
204
- <style scoped lang="scss">
205
- .vm-context {
206
- padding: 16px 15px 10px 10px;
207
- height: 100%;
208
- display: flex;
209
- flex-direction: column;
210
-
211
- .context-title-wrap {
212
- padding-bottom: 3px;
213
- border-bottom: 1px solid #a6a6a6;
214
-
215
- h4 {
216
- font-weight: 700;
217
- font-size: 13px;
218
- color: var(--vm-context-title);
219
- }
220
- p {
221
- font-weight: 400;
222
- font-size: 13px;
223
- color: var(--vm-context-sub-title);
224
- }
225
- }
226
-
227
- .finish-block {
228
- padding: 18px 24px 24px 24px;
229
-
230
- .add-hosts-ready-to-complete-mt-12 {
231
- margin-top: 12px;
232
-
233
- .add-hosts-ready-to-complete-bold {
234
- line-height: 18px;
235
- font-weight: 700;
236
- }
237
- }
238
- }
239
-
240
- .vm-hardware-version {
241
- align-self: flex-end;
242
- margin-top: auto;
243
- }
244
- }
245
-
246
- :deep(.modal-dialog) {
247
- width: 840px;
248
- }
249
- :deep(.modal .modal-dialog .modal-content .modal-footer) {
250
- flex: unset;
251
- height: unset;
252
- min-height: unset;
253
- }
254
- :deep(.wizard-modal-titlebar h3) {
255
- color: #000;
256
- font-size: 24px;
257
- font-weight: 200;
258
- line-height: 27px;
259
- margin: 0;
260
- padding: 0;
261
- }
262
- :deep(.clr-wizard-stepnav-item) {
263
- padding-left: 0;
264
- }
265
- :deep(.clr-wizard-stepnav
266
- .clr-wizard-stepnav-item
267
- button
268
- .clr-wizard-stepnav-link-title) {
269
- width: 189px;
270
- font-weight: 700;
271
- font-size: 13px;
272
- }
273
-
274
- #vm-wizard-notification {
275
- h3 {
276
- color: var(--global-font-color7);
277
- margin-top: 6px;
278
- }
279
- p {
280
- color: var(--global-font-color6);
281
- line-height: 16px;
282
- }
283
- }
284
-
285
- .power-on-by-default-wrap {
286
- display: flex;
287
- align-items: center;
288
-
289
- input {
290
- margin-right: 6px;
291
- }
292
- }
293
-
294
- .loading {
295
- :deep(.spinner) {
296
- width: 45px;
297
- height: 45px;
298
- min-width: 45px;
299
- min-height: 45px;
300
- }
301
- }
302
- </style>
303
-
304
- <style>
305
- :root {
306
- --vm-context-title: #333;
307
- --vm-context-sub-title: #000;
308
- }
309
- :root.dark-theme {
310
- --vm-context-title: #adbbc4;
311
- --vm-context-sub-title: #adbbc4;
312
- }
313
- </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
+ :storage="vmSettings.storage"
21
+ :hard-disks-for-boot-options="virtualHardwareHardDisksLocal"
22
+ :cd-dvd-drives-for-boot-options="virtualHardwareCdDvdDrivesLocal"
23
+ :networks-for-boot-options="virtualHardwareNetworksLocal"
24
+ :cd-dvd-drives="vmSettings.cdDvdDrives"
25
+ :hard-disks="vmSettings.hardDisks"
26
+ :networks="vmSettings.networks"
27
+ :customize-hardware-submit="0"
28
+ :max-cpus="vmSettings.maxCpus"
29
+ :max-memory="vmSettings.maxMemory"
30
+ :cpu-models="vmSettings.cpuModels"
31
+ :cpu="vmSettings.cpu"
32
+ :memory="vmSettings.memory"
33
+ :video-card="vmSettings.videoCard"
34
+ :usb-controller="vmSettings.usbController"
35
+ :pci-devices="vmSettings.pciDevices"
36
+ :selected-nav-item="selectedNavItem"
37
+ :hard-disks-for-edit="vmSettings.hardDisks"
38
+ :options="vmSettings.options"
39
+ :nodes="props.nodes"
40
+ :files="props.files"
41
+ :networks-table="props.networksTable"
42
+ :error-validation-fields="props.errorValidationFields"
43
+ :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
44
+ :passthrough-devices="props.passthroughDevices"
45
+ :state="props.state"
46
+ :get-datastore-table-func="props.getDatastoreTableFunc"
47
+ :datastore="props.datastore"
48
+ is-edit
49
+ @get-storage="emits('get-storage', $event)"
50
+ @get-folders-or-files="emits('get-folders-or-files', $event)"
51
+ @get-active-device-child="emits('get-active-device-child', $event)"
52
+ @show-datastore-child="emits('show-datastore-child', $event)"
53
+ @get-networks-table="emits('get-networks-table', $event)"
54
+ @get-pci-devices="emits('get-pci-devices')"
55
+ @change-boot-order="onChangeBootOrder"
56
+ @send-data="onChangeCustomizeHardware"
57
+ />
58
+ </div>
59
+ </template>
60
+ </atoms-modal>
61
+ </div>
62
+ </template>
63
+
64
+ <script setup lang="ts">
65
+ import { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
66
+ import { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
67
+ import {
68
+ UI_I_EditVmPayload,
69
+ UI_I_PciDevice,
70
+ } from '~/lib/models/store/vm/interfaces'
71
+ import { UI_I_Localization } from '~/lib/models/interfaces'
72
+ import { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
73
+ import {
74
+ UI_I_SendDataCpu,
75
+ UI_I_SendDataMemory,
76
+ UI_I_SendDataNewCdDvdDrive,
77
+ UI_I_SendDataNewHardDisk,
78
+ UI_I_SendDataNewNetwork,
79
+ } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
80
+ import { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
81
+ import { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
82
+ import { UI_I_TablePayload } from '~/lib/models/table/interfaces'
83
+ import { UI_I_VmSettings } from '~/lib/models/store/vm/interfaces'
84
+ import {
85
+ UI_I_DatastoreTableItem,
86
+ UI_I_FolderOrFileTreePayload,
87
+ } from '~/lib/models/store/storage/interfaces'
88
+ import { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
89
+ import { UI_T_EditVmFinishFunc } from '~/components/common/vm/actions/editSettings/lib/models/types'
90
+
91
+ const props = defineProps<{
92
+ loading: boolean
93
+ vmSettings: UI_I_VmSettings | null
94
+ nodes: UI_I_FileTreeNode[]
95
+ files: UI_I_FileTreeNode[]
96
+ networksTable: UI_I_NetworkTableItem[]
97
+ errorValidationFields: UI_I_ErrorValidationField<string>[]
98
+ vmCpuHelpTextSecond: string
99
+ vmId: string
100
+ datastore: UI_I_DatastoreTableItem[]
101
+ validateSendDataFunc: UI_T_EditVmFinishFunc
102
+ getDatastoreTableFunc?: (payload: UI_I_TablePayload) => Promise<void>
103
+ state?: string | number
104
+ passthroughDevices?: UI_I_PciDevice[]
105
+ }>()
106
+
107
+ const emits = defineEmits<{
108
+ (event: 'hide'): void
109
+ (event: 'update-vm', value: UI_I_EditVmPayload): void
110
+ (event: 'get-storage', value: UI_I_TablePayload): void
111
+ (event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
112
+ (event: 'get-active-device-child', value: UI_I_FileTreeNode): void
113
+ (event: 'show-datastore-child', value: UI_I_FileTreeNode): void
114
+ (event: 'get-networks-table', value: UI_I_TablePayload): void
115
+ (event: 'get-pci-devices'): void
116
+ }>()
117
+
118
+ const localization = computed<UI_I_Localization>(() => useLocal())
119
+
120
+ const selectedNavItem = ref<UI_T_SelectedNavItem>(0)
121
+
122
+ const loading = ref<boolean>(false)
123
+ watch(
124
+ () => props.loading,
125
+ (value) => {
126
+ loading.value = value
127
+ },
128
+ { immediate: true }
129
+ )
130
+
131
+ const vmSettings = computed<UI_I_VmSettings | null>(() => props.vmSettings)
132
+
133
+ const vmName = ref<string>(vmSettings.value?.name || '')
134
+ const vmNameCash = ref<string>(vmSettings.value?.name || '')
135
+ watch(vmSettings, (newValue) => {
136
+ vmName.value = newValue?.name || ''
137
+ vmNameCash.value = newValue?.name || ''
138
+ })
139
+
140
+ const virtualHardwareHardDisks = ref<UI_I_SendDataNewHardDisk[] | null>(null)
141
+ const virtualHardwareCdDvdDrives = ref<UI_I_SendDataNewCdDvdDrive[] | null>(
142
+ null
143
+ )
144
+ const virtualHardwareNetworks = ref<UI_I_SendDataNewNetwork[] | null>(null)
145
+ const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
146
+ virtualHardwareHardDisks.value = data[0]
147
+ virtualHardwareCdDvdDrives.value = data[1]
148
+ virtualHardwareNetworks.value = data[2]
149
+ }
150
+
151
+ const customizeHardware = ref<UI_I_SendDataCustomizeHardware | null>(null)
152
+ const onChangeCustomizeHardware = (
153
+ data: UI_I_SendDataCustomizeHardware
154
+ ): void => {
155
+ customizeHardware.value = data
156
+ }
157
+ const onHideModal = (): void => {
158
+ emits('hide')
159
+ }
160
+ const onUpdate = (): void => {
161
+ validateSendData()
162
+ }
163
+
164
+ const virtualHardwareHardDisksLocal = computed<
165
+ UI_I_SendDataNewHardDisk[] | null
166
+ >(() => customizeHardware.value?.virtualHardware?.hardDisks || null)
167
+ const virtualHardwareNetworksLocal = computed<UI_I_SendDataNewNetwork[] | null>(
168
+ () => customizeHardware.value?.virtualHardware?.networks || null
169
+ )
170
+ const virtualHardwareCdDvdDrivesLocal = computed<
171
+ UI_I_SendDataNewCdDvdDrive[] | null
172
+ >(() => customizeHardware.value?.virtualHardware?.cdDvdDrives || null)
173
+
174
+ const virtualHardwareCpu = computed<UI_I_SendDataCpu | null>(
175
+ () => customizeHardware.value?.virtualHardware?.cpu || null
176
+ )
177
+ const virtualHardwareMemory = computed<UI_I_SendDataMemory | null>(
178
+ () => customizeHardware.value?.virtualHardware?.memory || null
179
+ )
180
+
181
+ const validateSendData = async (): Promise<void> => {
182
+ loading.value = true
183
+ props
184
+ .validateSendDataFunc(
185
+ vmSettings.value,
186
+ virtualHardwareCpu.value,
187
+ virtualHardwareMemory.value,
188
+ customizeHardware.value,
189
+ virtualHardwareNetworks.value,
190
+ virtualHardwareHardDisks.value,
191
+ virtualHardwareCdDvdDrives.value,
192
+ vmName.value,
193
+ localization.value,
194
+ props.vmId
195
+ )
196
+ .then((data) => {
197
+ loading.value = false
198
+
199
+ !data && onHideModal()
200
+ })
201
+ }
202
+ </script>
203
+
204
+ <style scoped lang="scss">
205
+ .vm-context {
206
+ padding: 16px 15px 10px 10px;
207
+ height: 100%;
208
+ display: flex;
209
+ flex-direction: column;
210
+
211
+ .context-title-wrap {
212
+ padding-bottom: 3px;
213
+ border-bottom: 1px solid #a6a6a6;
214
+
215
+ h4 {
216
+ font-weight: 700;
217
+ font-size: 13px;
218
+ color: var(--vm-context-title);
219
+ }
220
+ p {
221
+ font-weight: 400;
222
+ font-size: 13px;
223
+ color: var(--vm-context-sub-title);
224
+ }
225
+ }
226
+
227
+ .finish-block {
228
+ padding: 18px 24px 24px 24px;
229
+
230
+ .add-hosts-ready-to-complete-mt-12 {
231
+ margin-top: 12px;
232
+
233
+ .add-hosts-ready-to-complete-bold {
234
+ line-height: 18px;
235
+ font-weight: 700;
236
+ }
237
+ }
238
+ }
239
+
240
+ .vm-hardware-version {
241
+ align-self: flex-end;
242
+ margin-top: auto;
243
+ }
244
+ }
245
+
246
+ :deep(.modal-dialog) {
247
+ width: 840px;
248
+ }
249
+ :deep(.modal .modal-dialog .modal-content .modal-footer) {
250
+ flex: unset;
251
+ height: unset;
252
+ min-height: unset;
253
+ }
254
+ :deep(.wizard-modal-titlebar h3) {
255
+ color: #000;
256
+ font-size: 24px;
257
+ font-weight: 200;
258
+ line-height: 27px;
259
+ margin: 0;
260
+ padding: 0;
261
+ }
262
+ :deep(.clr-wizard-stepnav-item) {
263
+ padding-left: 0;
264
+ }
265
+ :deep(.clr-wizard-stepnav
266
+ .clr-wizard-stepnav-item
267
+ button
268
+ .clr-wizard-stepnav-link-title) {
269
+ width: 189px;
270
+ font-weight: 700;
271
+ font-size: 13px;
272
+ }
273
+
274
+ #vm-wizard-notification {
275
+ h3 {
276
+ color: var(--global-font-color7);
277
+ margin-top: 6px;
278
+ }
279
+ p {
280
+ color: var(--global-font-color6);
281
+ line-height: 16px;
282
+ }
283
+ }
284
+
285
+ .power-on-by-default-wrap {
286
+ display: flex;
287
+ align-items: center;
288
+
289
+ input {
290
+ margin-right: 6px;
291
+ }
292
+ }
293
+
294
+ .loading {
295
+ :deep(.spinner) {
296
+ width: 45px;
297
+ height: 45px;
298
+ min-width: 45px;
299
+ min-height: 45px;
300
+ }
301
+ }
302
+ </style>
303
+
304
+ <style>
305
+ :root {
306
+ --vm-context-title: #333;
307
+ --vm-context-sub-title: #000;
308
+ }
309
+ :root.dark-theme {
310
+ --vm-context-title: #adbbc4;
311
+ --vm-context-sub-title: #adbbc4;
312
+ }
313
+ </style>