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
@@ -4,6 +4,7 @@
4
4
  <input
5
5
  id="customize-os"
6
6
  v-model="selectedOptions"
7
+ data-id="customize-os"
7
8
  type="checkbox"
8
9
  value="customize-os"
9
10
  />
@@ -15,6 +16,7 @@
15
16
  <input
16
17
  id="customize-hardware"
17
18
  v-model="selectedOptions"
19
+ data-id="customize-hardware"
18
20
  type="checkbox"
19
21
  value="customize-hardware"
20
22
  />
@@ -26,6 +28,7 @@
26
28
  <input
27
29
  id="power-on"
28
30
  v-model="selectedOptions"
31
+ data-id="power-on"
29
32
  type="checkbox"
30
33
  value="power-on"
31
34
  />
@@ -49,9 +52,12 @@ const emits = defineEmits<{
49
52
  const localization = computed<UI_I_Localization>(() => useLocal())
50
53
 
51
54
  const selectedOptions = ref<string[]>([])
52
- watch(() => props.selectOptionsSubmit, () => {
53
- emits('submit', selectedOptions.value)
54
- })
55
+ watch(
56
+ () => props.selectOptionsSubmit,
57
+ () => {
58
+ emits('submit', selectedOptions.value)
59
+ }
60
+ )
55
61
  </script>
56
62
 
57
63
  <style scoped lang="scss">
@@ -1,269 +1,269 @@
1
- <template>
2
- <div class="customize-hardware">
3
- <atoms-nav-bar v-model="selectedNavItem" :items="navItems" />
4
- <atoms-alert
5
- v-show="errors.length"
6
- status="alert-danger"
7
- :items="errors"
8
- @remove="onRemoveValidationErrors"
9
- />
10
-
11
- <div v-show="selectedNavItem === 0">
12
- <common-vm-actions-common-customize-hardware-virtual-hardware
13
- :vm-name="vmNameLocal"
14
- :storage="props.storage"
15
- :max-cpus="props.maxCpus"
16
- :max-memory="props.maxMemory"
17
- :cpu-models="props.cpuModels"
18
- :cpu="props.cpu"
19
- :memory="props.memory"
20
- :is-edit="props.isEdit"
21
- :is-clone="props.isClone"
22
- :state="props.state"
23
- :hard-disks="props.hardDisks"
24
- :cd-dvd-drives="props.cdDvdDrives"
25
- :networks="props.networks"
26
- :networks-table="props.networksTable"
27
- :video-card="props.videoCard"
28
- :usb-controller="props.usbController"
29
- :pci-devices="props.pciDevices"
30
- :nodes="props.nodes"
31
- :files="props.files"
32
- :error-validation-fields="props.errorValidationFields"
33
- :get-datastore-table-func="props.getDatastoreTableFunc"
34
- :datastore="props.datastore"
35
- :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
36
- :passthrough-devices="props.passthroughDevices"
37
- @send-data="onSendDataVirtualHardwareMethod"
38
- @get-storage="emits('get-storage', $event)"
39
- @get-folders-or-files="emits('get-folders-or-files', $event)"
40
- @get-active-device-child="emits('get-active-device-child', $event)"
41
- @show-datastore-child="emits('show-datastore-child', $event)"
42
- @remove-error-by-title="emits('remove-error-by-title', $event)"
43
- @invalid="virtualHardwareInvalid = $event"
44
- @get-networks-table="emits('get-networks-table', $event)"
45
- @get-pci-devices="emits('get-pci-devices')"
46
- />
47
- </div>
48
- <div v-show="selectedNavItem === 1">
49
- <common-vm-actions-common-customize-hardware-vmoptions
50
- v-model:vm-name="vmNameLocal"
51
- v-model:guest-machine-type="guestMachineTypeLocal"
52
- v-model:guest-os-family="guestOsFamilyLocal"
53
- v-model:guest-os-version="guestOsVersionLocal"
54
- :hard-disks="props.hardDisksForBootOptions"
55
- :cd-dvd-drives="props.cdDvdDrivesForBootOptions"
56
- :networks="props.networksForBootOptions"
57
- :options="props.options"
58
- :is-edit="props.isEdit"
59
- :is-clone="props.isClone"
60
- :error-validation-fields="props.errorValidationFields"
61
- :state="props.state"
62
- @change-boot-order="onChangeBootOrder"
63
- @send-data="onSendDataVmOptionsMethod"
64
- @invalid="vmOptionsInvalid = $event"
65
- @remove-error-by-title="emits('remove-error-by-title', $event)"
66
- />
67
- </div>
68
- </div>
69
- </template>
70
-
71
- <script setup lang="ts">
72
- import { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
73
- import { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
74
- import { UI_I_TablePayload } from '~/lib/models/table/interfaces'
75
- import { UI_I_FolderOrFileTreePayload } from '~/lib/models/store/storage/interfaces'
76
- import { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
77
- import {
78
- UI_I_SendDataNewPciDevice,
79
- UI_I_SendDataNewCdDvdDrive,
80
- UI_I_SendDataNewHardDisk,
81
- UI_I_SendDataNewNetwork,
82
- UI_I_SendDataVideoCard,
83
- UI_I_SendDataVirtualHardware,
84
- } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
85
- import { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
86
- import { UI_I_SendDataVmoptions } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
87
- import { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
88
- import { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
89
- import { UI_I_Localization } from '~/lib/models/interfaces'
90
- import { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
91
- import { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
92
- import { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
93
- import {
94
- API_UI_I_VmEditCpu,
95
- API_UI_I_VmEditMemory,
96
- UI_I_PciDevice,
97
- } from '~/lib/models/store/vm/interfaces'
98
- import { navItemsFunc } from '~/components/common/vm/actions/common/customizeHardware/lib/config/navItems'
99
-
100
- const props = defineProps<{
101
- vmName: string
102
- errorValidationFields: UI_I_ErrorValidationField[]
103
- storage: UI_I_DatastoreTableItem | null
104
- guestMachineType: UI_I_OptionItem | null
105
- guestOsFamily: UI_I_OptionItem | null
106
- guestOsVersion: UI_I_OptionItem | null
107
- cpuModels: UI_I_OptionItem[]
108
- hardDisksForBootOptions: UI_I_SendDataNewHardDisk[] | null
109
- cdDvdDrivesForBootOptions: UI_I_SendDataNewCdDvdDrive[] | null
110
- networksForBootOptions: UI_I_SendDataNewNetwork[] | null
111
- customizeHardwareSubmit: null | Function
112
- maxCpus: number
113
- maxMemory: number
114
- selectedNavItem: UI_T_SelectedNavItem
115
- nodes: UI_I_FileTreeNode[]
116
- files: UI_I_FileTreeNode[]
117
- networksTable: UI_I_NetworkTableItem[]
118
- cpu?: API_UI_I_VmEditCpu
119
- memory?: API_UI_I_VmEditMemory
120
- vmCpuHelpTextSecond?: string
121
- getDatastoreTableFunc?: (payload: UI_I_TablePayload) => Promise<void>
122
- datastore: UI_I_DatastoreTableItem[]
123
- hardDisks?: UI_I_SendDataNewHardDisk[] | null
124
- cdDvdDrives?: UI_I_SendDataNewCdDvdDrive[] | null
125
- networks?: UI_I_SendDataNewNetwork[] | null
126
- videoCard?: UI_I_SendDataVideoCard
127
- pciDevices?: UI_I_SendDataNewPciDevice[]
128
- usbController?: string
129
- options?: UI_I_SendDataVmoptions
130
- isEdit?: boolean
131
- isClone?: boolean
132
- state?: string | number
133
- passthroughDevices?: UI_I_PciDevice[]
134
- }>()
135
- const emits = defineEmits<{
136
- (
137
- event: 'change-boot-order',
138
- value: [
139
- UI_I_SendDataNewHardDisk[],
140
- UI_I_SendDataNewCdDvdDrive[],
141
- UI_I_SendDataNewNetwork[]
142
- ]
143
- ): void
144
- (event: 'send-data', value: UI_I_SendDataCustomizeHardware): void
145
- (event: 'next'): void
146
- (event: 'update:vm-name', value: string): void
147
- (event: 'update:guest-machine-type', value: UI_I_OptionItem | null): void
148
- (event: 'update:guest-os-family', value: UI_I_OptionItem | null): void
149
- (event: 'update:guest-os-version', value: UI_I_OptionItem | null): void
150
- (event: 'get-storage', value: UI_I_TablePayload): void
151
- (event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
152
- (event: 'get-active-device-child', value: UI_I_FileTreeNode): void
153
- (event: 'show-datastore-child', value: UI_I_FileTreeNode): void
154
- (event: 'remove-error-by-title', value: string): void
155
- (event: 'get-networks-table', value: UI_I_TablePayload): void
156
- (event: 'get-pci-devices'): void
157
- }>()
158
-
159
- const vmNameLocal = computed<string>({
160
- get() {
161
- return props.vmName
162
- },
163
- set(newValue) {
164
- emits('update:vm-name', newValue)
165
- },
166
- })
167
- const guestMachineTypeLocal = computed<UI_I_OptionItem | null>({
168
- get() {
169
- return props.guestMachineType
170
- },
171
- set(newValue) {
172
- emits('update:guest-machine-type', newValue)
173
- },
174
- })
175
- const guestOsFamilyLocal = computed<UI_I_OptionItem | null>({
176
- get() {
177
- return props.guestOsFamily
178
- },
179
- set(newValue) {
180
- emits('update:guest-os-family', newValue)
181
- },
182
- })
183
- const guestOsVersionLocal = computed<UI_I_OptionItem | null>({
184
- get() {
185
- return props.guestOsVersion
186
- },
187
- set(newValue) {
188
- emits('update:guest-os-version', newValue)
189
- },
190
- })
191
-
192
- const localization = computed<UI_I_Localization>(() => useLocal())
193
-
194
- const navItems = computed<UI_I_CollapseNavItem[]>(() =>
195
- navItemsFunc(localization.value)
196
- )
197
- const selectedNavItem = ref<number>(0)
198
- watch(
199
- () => props.selectedNavItem,
200
- (n) => {
201
- selectedNavItem.value = n
202
- }
203
- )
204
-
205
- const sendDataVirtualHardware = ref<UI_I_SendDataVirtualHardware | null>(null)
206
- const onSendDataVirtualHardwareMethod = (
207
- data: UI_I_SendDataVirtualHardware
208
- ): void => {
209
- sendDataVirtualHardware.value = data
210
- sendData()
211
- }
212
- const sendDataVmOptions = ref<UI_I_SendDataVmoptions | null>(null)
213
- const onSendDataVmOptionsMethod = (data: UI_I_SendDataVmoptions): void => {
214
- sendDataVmOptions.value = data
215
- sendData()
216
- }
217
- const sendData = (): void => {
218
- emits('send-data', {
219
- virtualHardware: sendDataVirtualHardware.value,
220
- vmOptions: sendDataVmOptions.value,
221
- })
222
- }
223
-
224
- const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
225
- emits('change-boot-order', data)
226
- }
227
-
228
- watch(
229
- () => props.customizeHardwareSubmit,
230
- (newValue) => {
231
- newValue && submit(newValue)
232
- }
233
- )
234
- const virtualHardwareInvalid = ref<string[]>([])
235
- const vmOptionsInvalid = ref<string[]>([])
236
- const submit = (cb: Function): void => {
237
- const invalidDevices = [
238
- ...virtualHardwareInvalid.value,
239
- ...vmOptionsInvalid.value,
240
- ]
241
- .filter((item: string) => !!item)
242
- .join(', ')
243
-
244
- if (invalidDevices) {
245
- showValidationErrors([
246
- localization.value.thereErrorsFollowingFields.replace(
247
- '{0}',
248
- invalidDevices
249
- ),
250
- ])
251
- cb(false)
252
- return
253
- }
254
- onRemoveValidationErrors()
255
-
256
- // emits('next')
257
- cb(true)
258
- }
259
-
260
- const errors = ref<string[]>([])
261
- const showValidationErrors = (arr: string[]): void => {
262
- errors.value = arr
263
- }
264
- const onRemoveValidationErrors = (): void => {
265
- errors.value = []
266
- }
267
- </script>
268
-
269
- <style scoped lang="scss"></style>
1
+ <template>
2
+ <div class="customize-hardware">
3
+ <atoms-nav-bar v-model="selectedNavItem" :items="navItems" />
4
+ <atoms-alert
5
+ v-show="errors.length"
6
+ status="alert-danger"
7
+ :items="errors"
8
+ @remove="onRemoveValidationErrors"
9
+ />
10
+
11
+ <div v-show="selectedNavItem === 0">
12
+ <common-vm-actions-common-customize-hardware-virtual-hardware
13
+ :vm-name="vmNameLocal"
14
+ :storage="props.storage"
15
+ :max-cpus="props.maxCpus"
16
+ :max-memory="props.maxMemory"
17
+ :cpu-models="props.cpuModels"
18
+ :cpu="props.cpu"
19
+ :memory="props.memory"
20
+ :is-edit="props.isEdit"
21
+ :is-clone="props.isClone"
22
+ :state="props.state"
23
+ :hard-disks="props.hardDisks"
24
+ :cd-dvd-drives="props.cdDvdDrives"
25
+ :networks="props.networks"
26
+ :networks-table="props.networksTable"
27
+ :video-card="props.videoCard"
28
+ :usb-controller="props.usbController"
29
+ :pci-devices="props.pciDevices"
30
+ :nodes="props.nodes"
31
+ :files="props.files"
32
+ :error-validation-fields="props.errorValidationFields"
33
+ :get-datastore-table-func="props.getDatastoreTableFunc"
34
+ :datastore="props.datastore"
35
+ :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
36
+ :passthrough-devices="props.passthroughDevices"
37
+ @send-data="onSendDataVirtualHardwareMethod"
38
+ @get-storage="emits('get-storage', $event)"
39
+ @get-folders-or-files="emits('get-folders-or-files', $event)"
40
+ @get-active-device-child="emits('get-active-device-child', $event)"
41
+ @show-datastore-child="emits('show-datastore-child', $event)"
42
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
43
+ @invalid="virtualHardwareInvalid = $event"
44
+ @get-networks-table="emits('get-networks-table', $event)"
45
+ @get-pci-devices="emits('get-pci-devices')"
46
+ />
47
+ </div>
48
+ <div v-show="selectedNavItem === 1">
49
+ <common-vm-actions-common-customize-hardware-vmoptions
50
+ v-model:vm-name="vmNameLocal"
51
+ v-model:guest-machine-type="guestMachineTypeLocal"
52
+ v-model:guest-os-family="guestOsFamilyLocal"
53
+ v-model:guest-os-version="guestOsVersionLocal"
54
+ :hard-disks="props.hardDisksForBootOptions"
55
+ :cd-dvd-drives="props.cdDvdDrivesForBootOptions"
56
+ :networks="props.networksForBootOptions"
57
+ :options="props.options"
58
+ :is-edit="props.isEdit"
59
+ :is-clone="props.isClone"
60
+ :error-validation-fields="props.errorValidationFields"
61
+ :state="props.state"
62
+ @change-boot-order="onChangeBootOrder"
63
+ @send-data="onSendDataVmOptionsMethod"
64
+ @invalid="vmOptionsInvalid = $event"
65
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
66
+ />
67
+ </div>
68
+ </div>
69
+ </template>
70
+
71
+ <script setup lang="ts">
72
+ import { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
73
+ import { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
74
+ import { UI_I_TablePayload } from '~/lib/models/table/interfaces'
75
+ import { UI_I_FolderOrFileTreePayload } from '~/lib/models/store/storage/interfaces'
76
+ import { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
77
+ import {
78
+ UI_I_SendDataNewPciDevice,
79
+ UI_I_SendDataNewCdDvdDrive,
80
+ UI_I_SendDataNewHardDisk,
81
+ UI_I_SendDataNewNetwork,
82
+ UI_I_SendDataVideoCard,
83
+ UI_I_SendDataVirtualHardware,
84
+ } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
85
+ import { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
86
+ import { UI_I_SendDataVmoptions } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
87
+ import { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
88
+ import { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
89
+ import { UI_I_Localization } from '~/lib/models/interfaces'
90
+ import { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
91
+ import { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
92
+ import { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
93
+ import {
94
+ API_UI_I_VmEditCpu,
95
+ API_UI_I_VmEditMemory,
96
+ UI_I_PciDevice,
97
+ } from '~/lib/models/store/vm/interfaces'
98
+ import { navItemsFunc } from '~/components/common/vm/actions/common/customizeHardware/lib/config/navItems'
99
+
100
+ const props = defineProps<{
101
+ vmName: string
102
+ errorValidationFields: UI_I_ErrorValidationField[]
103
+ storage: UI_I_DatastoreTableItem | null
104
+ guestMachineType: UI_I_OptionItem | null
105
+ guestOsFamily: UI_I_OptionItem | null
106
+ guestOsVersion: UI_I_OptionItem | null
107
+ cpuModels: UI_I_OptionItem[]
108
+ hardDisksForBootOptions: UI_I_SendDataNewHardDisk[] | null
109
+ cdDvdDrivesForBootOptions: UI_I_SendDataNewCdDvdDrive[] | null
110
+ networksForBootOptions: UI_I_SendDataNewNetwork[] | null
111
+ customizeHardwareSubmit: null | Function
112
+ maxCpus: number
113
+ maxMemory: number
114
+ selectedNavItem: UI_T_SelectedNavItem
115
+ nodes: UI_I_FileTreeNode[]
116
+ files: UI_I_FileTreeNode[]
117
+ networksTable: UI_I_NetworkTableItem[]
118
+ cpu?: API_UI_I_VmEditCpu
119
+ memory?: API_UI_I_VmEditMemory
120
+ vmCpuHelpTextSecond?: string
121
+ getDatastoreTableFunc?: (payload: UI_I_TablePayload) => Promise<void>
122
+ datastore: UI_I_DatastoreTableItem[]
123
+ hardDisks?: UI_I_SendDataNewHardDisk[] | null
124
+ cdDvdDrives?: UI_I_SendDataNewCdDvdDrive[] | null
125
+ networks?: UI_I_SendDataNewNetwork[] | null
126
+ videoCard?: UI_I_SendDataVideoCard
127
+ pciDevices?: UI_I_SendDataNewPciDevice[]
128
+ usbController?: string
129
+ options?: UI_I_SendDataVmoptions
130
+ isEdit?: boolean
131
+ isClone?: boolean
132
+ state?: string | number
133
+ passthroughDevices?: UI_I_PciDevice[]
134
+ }>()
135
+ const emits = defineEmits<{
136
+ (
137
+ event: 'change-boot-order',
138
+ value: [
139
+ UI_I_SendDataNewHardDisk[],
140
+ UI_I_SendDataNewCdDvdDrive[],
141
+ UI_I_SendDataNewNetwork[]
142
+ ]
143
+ ): void
144
+ (event: 'send-data', value: UI_I_SendDataCustomizeHardware): void
145
+ (event: 'next'): void
146
+ (event: 'update:vm-name', value: string): void
147
+ (event: 'update:guest-machine-type', value: UI_I_OptionItem | null): void
148
+ (event: 'update:guest-os-family', value: UI_I_OptionItem | null): void
149
+ (event: 'update:guest-os-version', value: UI_I_OptionItem | null): void
150
+ (event: 'get-storage', value: UI_I_TablePayload): void
151
+ (event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
152
+ (event: 'get-active-device-child', value: UI_I_FileTreeNode): void
153
+ (event: 'show-datastore-child', value: UI_I_FileTreeNode): void
154
+ (event: 'remove-error-by-title', value: string): void
155
+ (event: 'get-networks-table', value: UI_I_TablePayload): void
156
+ (event: 'get-pci-devices'): void
157
+ }>()
158
+
159
+ const vmNameLocal = computed<string>({
160
+ get() {
161
+ return props.vmName
162
+ },
163
+ set(newValue) {
164
+ emits('update:vm-name', newValue)
165
+ },
166
+ })
167
+ const guestMachineTypeLocal = computed<UI_I_OptionItem | null>({
168
+ get() {
169
+ return props.guestMachineType
170
+ },
171
+ set(newValue) {
172
+ emits('update:guest-machine-type', newValue)
173
+ },
174
+ })
175
+ const guestOsFamilyLocal = computed<UI_I_OptionItem | null>({
176
+ get() {
177
+ return props.guestOsFamily
178
+ },
179
+ set(newValue) {
180
+ emits('update:guest-os-family', newValue)
181
+ },
182
+ })
183
+ const guestOsVersionLocal = computed<UI_I_OptionItem | null>({
184
+ get() {
185
+ return props.guestOsVersion
186
+ },
187
+ set(newValue) {
188
+ emits('update:guest-os-version', newValue)
189
+ },
190
+ })
191
+
192
+ const localization = computed<UI_I_Localization>(() => useLocal())
193
+
194
+ const navItems = computed<UI_I_CollapseNavItem[]>(() =>
195
+ navItemsFunc(localization.value)
196
+ )
197
+ const selectedNavItem = ref<number>(0)
198
+ watch(
199
+ () => props.selectedNavItem,
200
+ (n) => {
201
+ selectedNavItem.value = n
202
+ }
203
+ )
204
+
205
+ const sendDataVirtualHardware = ref<UI_I_SendDataVirtualHardware | null>(null)
206
+ const onSendDataVirtualHardwareMethod = (
207
+ data: UI_I_SendDataVirtualHardware
208
+ ): void => {
209
+ sendDataVirtualHardware.value = data
210
+ sendData()
211
+ }
212
+ const sendDataVmOptions = ref<UI_I_SendDataVmoptions | null>(null)
213
+ const onSendDataVmOptionsMethod = (data: UI_I_SendDataVmoptions): void => {
214
+ sendDataVmOptions.value = data
215
+ sendData()
216
+ }
217
+ const sendData = (): void => {
218
+ emits('send-data', {
219
+ virtualHardware: sendDataVirtualHardware.value,
220
+ vmOptions: sendDataVmOptions.value,
221
+ })
222
+ }
223
+
224
+ const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
225
+ emits('change-boot-order', data)
226
+ }
227
+
228
+ watch(
229
+ () => props.customizeHardwareSubmit,
230
+ (newValue) => {
231
+ newValue && submit(newValue)
232
+ }
233
+ )
234
+ const virtualHardwareInvalid = ref<string[]>([])
235
+ const vmOptionsInvalid = ref<string[]>([])
236
+ const submit = (cb: Function): void => {
237
+ const invalidDevices = [
238
+ ...virtualHardwareInvalid.value,
239
+ ...vmOptionsInvalid.value,
240
+ ]
241
+ .filter((item: string) => !!item)
242
+ .join(', ')
243
+
244
+ if (invalidDevices) {
245
+ showValidationErrors([
246
+ localization.value.thereErrorsFollowingFields.replace(
247
+ '{0}',
248
+ invalidDevices
249
+ ),
250
+ ])
251
+ cb(false)
252
+ return
253
+ }
254
+ onRemoveValidationErrors()
255
+
256
+ // emits('next')
257
+ cb(true)
258
+ }
259
+
260
+ const errors = ref<string[]>([])
261
+ const showValidationErrors = (arr: string[]): void => {
262
+ errors.value = arr
263
+ }
264
+ const onRemoveValidationErrors = (): void => {
265
+ errors.value = []
266
+ }
267
+ </script>
268
+
269
+ <style scoped lang="scss"></style>