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,165 +1,165 @@
1
- <template>
2
- <div class="hardware-pci-device">
3
- <atoms-stack-block
4
- :has-children="true"
5
- :removable="isRemovable"
6
- @remove="onRemovePciDevice"
7
- >
8
- <template #stackBlockKey>
9
- <div class="flex-align-center">
10
- <span>{{ label }}</span>
11
- </div>
12
- </template>
13
- <template #stackBlockContent>
14
- <span class="main-label">
15
- {{ selectedLabel }}
16
- </span>
17
- </template>
18
- <template #stackChildren>
19
- <template v-if="props.type === 'new'">
20
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-type-selection
21
- v-model="selectedType"
22
- :options="pciDeviceTypeOptions"
23
- :pci-device-index="props.index"
24
- />
25
-
26
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
27
- v-show="selectedType.value === 'direct_path_io'"
28
- v-model="directPathIo"
29
- :pci-device-index="props.index"
30
- :passthrough-devices="props.passthroughDevices"
31
- />
32
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
33
- v-show="selectedType.value === 'dynamic_direct_path_io'"
34
- v-model="dynamicDirectPathIo"
35
- :pci-device-index="props.index"
36
- :passthrough-devices="props.passthroughDevices"
37
- />
38
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
39
- v-show="selectedType.value === 'nvidia_grid'"
40
- v-model="nvidiaGridProfile"
41
- :pci-device-index="props.index"
42
- />
43
- </template>
44
-
45
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-note />
46
- </template>
47
- </atoms-stack-block>
48
- </div>
49
- </template>
50
-
51
- <script setup lang="ts">
52
- import type { UI_I_Localization } from '~/lib/models/interfaces'
53
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
54
- import type { UI_I_SendDataNewPciDevice } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
55
- import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
56
- import type { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
57
- import { pciDeviceTypeOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options'
58
-
59
- const props = defineProps<{
60
- index: number
61
- pciDevice: UI_I_SendDataNewPciDevice
62
- passthroughDevices: UI_I_PciDevice[]
63
- type: UI_T_PciDeviceType
64
- isEdit: boolean
65
- state?: string | number
66
- // errorValidationFields: UI_I_ErrorValidationField<string>[]
67
- }>()
68
- const emits = defineEmits<{
69
- (event: 'send-data', value: UI_I_SendDataNewPciDevice): void
70
- (event: 'remove'): void
71
- }>()
72
-
73
- const localization = computed<UI_I_Localization>(() => useLocal())
74
-
75
- const isRunning = computed<boolean>(() => {
76
- return props.state === 2
77
- })
78
-
79
- const isRemovable = computed<boolean>(() => {
80
- return !props.isEdit || !isRunning.value
81
- })
82
-
83
- const label = computed<string>(() => {
84
- if (props.type === 'edit')
85
- return `${localization.value.newPciDevice} ${props.index + 1}`
86
-
87
- return `${localization.value.pciDevice} *`
88
- })
89
-
90
- const selectedLabel = computed<string>(() => {
91
- switch (selectedType.value.value) {
92
- case 'direct_path_io':
93
- return `${directPathIo.value.address}|${directPathIo.value.device_name}`
94
- case 'dynamic_direct_path_io':
95
- return dynamicDirectPathIo.value
96
- default:
97
- return nvidiaGridProfile.value
98
- }
99
- })
100
-
101
- const pciDeviceTypeOptions = ref<UI_I_OptionItem[]>(pciDeviceTypeOptionsConfig)
102
- const selectedType = ref<UI_I_OptionItem>(pciDeviceTypeOptionsConfig[0])
103
-
104
- const directPathIo = ref<UI_I_PciDevice>(
105
- props.passthroughDevices[0]
106
- )
107
- const dynamicDirectPathIo = ref<string>('')
108
- const nvidiaGridProfile = ref<string>('')
109
-
110
- watch(
111
- props.pciDevice,
112
- (newValue) => {
113
- // const passthroughDevice = props.passthroughDevices.find(
114
- // (item) => item.address === newValue.address
115
- // )
116
- // passthroughDevice && (directPathIo.value = passthroughDevice) // Todo change
117
- newValue && (directPathIo.value = newValue)
118
- },
119
- { immediate: true }
120
- )
121
-
122
- const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
123
- switch (selectedType.value.value) {
124
- case 'direct_path_io':
125
- return {
126
- address: directPathIo.value.address,
127
- vendor_name: directPathIo.value.vendor_name,
128
- class_name: directPathIo.value.class_name,
129
- device_name: directPathIo.value.device_name,
130
- }
131
- case 'dynamic_direct_path_io':
132
- return {
133
- address: '',
134
- vendor_name: '',
135
- class_name: '',
136
- device_name: '',
137
- }
138
- default:
139
- return {
140
- address: '',
141
- vendor_name: '',
142
- class_name: '',
143
- device_name: '',
144
- }
145
- }
146
- })
147
-
148
- watch(
149
- sendData,
150
- (newValue) => {
151
- emits('send-data', newValue)
152
- },
153
- { immediate: true }
154
- )
155
-
156
- const onRemovePciDevice = (): void => {
157
- emits('remove')
158
- }
159
- </script>
160
-
161
- <style scoped lang="scss">
162
- #network-connect {
163
- margin-right: 4px;
164
- }
165
- </style>
1
+ <template>
2
+ <div class="hardware-pci-device">
3
+ <atoms-stack-block
4
+ :has-children="true"
5
+ :removable="isRemovable"
6
+ @remove="onRemovePciDevice"
7
+ >
8
+ <template #stackBlockKey>
9
+ <div class="flex-align-center">
10
+ <span>{{ label }}</span>
11
+ </div>
12
+ </template>
13
+ <template #stackBlockContent>
14
+ <span class="main-label">
15
+ {{ selectedLabel }}
16
+ </span>
17
+ </template>
18
+ <template #stackChildren>
19
+ <template v-if="props.type === 'new'">
20
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-type-selection
21
+ v-model="selectedType"
22
+ :options="pciDeviceTypeOptions"
23
+ :pci-device-index="props.index"
24
+ />
25
+
26
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
27
+ v-show="selectedType.value === 'direct_path_io'"
28
+ v-model="directPathIo"
29
+ :pci-device-index="props.index"
30
+ :passthrough-devices="props.passthroughDevices"
31
+ />
32
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
33
+ v-show="selectedType.value === 'dynamic_direct_path_io'"
34
+ v-model="dynamicDirectPathIo"
35
+ :pci-device-index="props.index"
36
+ :passthrough-devices="props.passthroughDevices"
37
+ />
38
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
39
+ v-show="selectedType.value === 'nvidia_grid'"
40
+ v-model="nvidiaGridProfile"
41
+ :pci-device-index="props.index"
42
+ />
43
+ </template>
44
+
45
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-note />
46
+ </template>
47
+ </atoms-stack-block>
48
+ </div>
49
+ </template>
50
+
51
+ <script setup lang="ts">
52
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
53
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
54
+ import type { UI_I_SendDataNewPciDevice } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
55
+ import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
56
+ import type { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
57
+ import { pciDeviceTypeOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options'
58
+
59
+ const props = defineProps<{
60
+ index: number
61
+ pciDevice: UI_I_SendDataNewPciDevice
62
+ passthroughDevices: UI_I_PciDevice[]
63
+ type: UI_T_PciDeviceType
64
+ isEdit: boolean
65
+ state?: string | number
66
+ // errorValidationFields: UI_I_ErrorValidationField<string>[]
67
+ }>()
68
+ const emits = defineEmits<{
69
+ (event: 'send-data', value: UI_I_SendDataNewPciDevice): void
70
+ (event: 'remove'): void
71
+ }>()
72
+
73
+ const localization = computed<UI_I_Localization>(() => useLocal())
74
+
75
+ const isRunning = computed<boolean>(() => {
76
+ return props.state === 2
77
+ })
78
+
79
+ const isRemovable = computed<boolean>(() => {
80
+ return !props.isEdit || !isRunning.value
81
+ })
82
+
83
+ const label = computed<string>(() => {
84
+ if (props.type === 'edit')
85
+ return `${localization.value.newPciDevice} ${props.index + 1}`
86
+
87
+ return `${localization.value.pciDevice} *`
88
+ })
89
+
90
+ const selectedLabel = computed<string>(() => {
91
+ switch (selectedType.value.value) {
92
+ case 'direct_path_io':
93
+ return `${directPathIo.value.address}|${directPathIo.value.device_name}`
94
+ case 'dynamic_direct_path_io':
95
+ return dynamicDirectPathIo.value
96
+ default:
97
+ return nvidiaGridProfile.value
98
+ }
99
+ })
100
+
101
+ const pciDeviceTypeOptions = ref<UI_I_OptionItem[]>(pciDeviceTypeOptionsConfig)
102
+ const selectedType = ref<UI_I_OptionItem>(pciDeviceTypeOptionsConfig[0])
103
+
104
+ const directPathIo = ref<UI_I_PciDevice>(
105
+ props.passthroughDevices[0]
106
+ )
107
+ const dynamicDirectPathIo = ref<string>('')
108
+ const nvidiaGridProfile = ref<string>('')
109
+
110
+ watch(
111
+ props.pciDevice,
112
+ (newValue) => {
113
+ // const passthroughDevice = props.passthroughDevices.find(
114
+ // (item) => item.address === newValue.address
115
+ // )
116
+ // passthroughDevice && (directPathIo.value = passthroughDevice) // Todo change
117
+ newValue && (directPathIo.value = newValue)
118
+ },
119
+ { immediate: true }
120
+ )
121
+
122
+ const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
123
+ switch (selectedType.value.value) {
124
+ case 'direct_path_io':
125
+ return {
126
+ address: directPathIo.value.address,
127
+ vendor_name: directPathIo.value.vendor_name,
128
+ class_name: directPathIo.value.class_name,
129
+ device_name: directPathIo.value.device_name,
130
+ }
131
+ case 'dynamic_direct_path_io':
132
+ return {
133
+ address: '',
134
+ vendor_name: '',
135
+ class_name: '',
136
+ device_name: '',
137
+ }
138
+ default:
139
+ return {
140
+ address: '',
141
+ vendor_name: '',
142
+ class_name: '',
143
+ device_name: '',
144
+ }
145
+ }
146
+ })
147
+
148
+ watch(
149
+ sendData,
150
+ (newValue) => {
151
+ emits('send-data', newValue)
152
+ },
153
+ { immediate: true }
154
+ )
155
+
156
+ const onRemovePciDevice = (): void => {
157
+ emits('remove')
158
+ }
159
+ </script>
160
+
161
+ <style scoped lang="scss">
162
+ #network-connect {
163
+ margin-right: 4px;
164
+ }
165
+ </style>
@@ -2,7 +2,11 @@
2
2
  <atoms-stack-block :has-children="false">
3
3
  <template #stackBlockContent>
4
4
  <div class="select">
5
- <select id="direct-path-io" v-model="valueLocal">
5
+ <select
6
+ id="direct-path-io"
7
+ v-model="valueLocal"
8
+ data-id="direct-path-io-select"
9
+ >
6
10
  <option
7
11
  v-for="item in props.passthroughDevices"
8
12
  :key="item.id"
@@ -7,8 +7,9 @@
7
7
  <template #stackBlockContent>
8
8
  <input
9
9
  :id="`nvidia-grid-${props.pciDeviceIndex}`"
10
- type="text"
11
10
  v-model="profile"
11
+ :data-id="`nvidia-grid-${props.pciDeviceIndex}-input`"
12
+ type="text"
12
13
  />
13
14
  </template>
14
15
  </atoms-stack-block>
@@ -10,10 +10,11 @@
10
10
  >
11
11
  <input
12
12
  :id="`pci-device-radio-input-${props.pciDeviceIndex}-${index}`"
13
+ v-model="selectedType"
13
14
  type="radio"
14
15
  :value="item"
15
16
  :disabled="!!index"
16
- v-model="selectedType"
17
+ :data-id="`pci-device-radio-input-${props.pciDeviceIndex}-${index}`"
17
18
  />
18
19
  <label
19
20
  :for="`pci-device-radio-input-${props.pciDeviceIndex}-${index}`"
@@ -14,6 +14,7 @@
14
14
  <select
15
15
  id="usb-controller-select"
16
16
  v-model="selectedUsbController"
17
+ data-id="usb-controller-select"
17
18
  :disabled="props.isEdit"
18
19
  @click.stop
19
20
  >
@@ -30,8 +30,9 @@
30
30
  <div class="select">
31
31
  <select
32
32
  id="reserve-type-select"
33
- :disabled="props.disabled"
34
33
  v-model="reservationTypeLocal"
34
+ :disabled="props.disabled"
35
+ data-id="reserve-type-select"
35
36
  >
36
37
  <option
37
38
  v-for="(item, key) in reservationTypeOptions"
@@ -50,6 +51,7 @@
50
51
  <input
51
52
  id="reserve-guest-memory"
52
53
  :value="props.reserveGuestMemory"
54
+ data-id="reserve-guest-memory-checkbox"
53
55
  type="checkbox"
54
56
  disabled
55
57
  />
@@ -6,7 +6,12 @@
6
6
  </template>
7
7
  <template #stackBlockContent>
8
8
  <div class="flex-align-center">
9
- <input id="graphics" v-model="graphicsLocal" type="checkbox" />
9
+ <input
10
+ id="graphics"
11
+ v-model="graphicsLocal"
12
+ data-id="graphics-checkbox"
13
+ type="checkbox"
14
+ />
10
15
  <label for="graphics" class="label-text-normal">{{
11
16
  localization.enable3dSupport
12
17
  }}</label>
@@ -18,7 +18,8 @@
18
18
  <div v-show="!props.disabled" class="flex-align-center">
19
19
  <input
20
20
  id="vm-wizard-video-card-memory-field"
21
- v-model="totalVideoMemoryLocal"
21
+ v-model="totalVideoMemoryLocal"
22
+ data-id="vm-wizard-video-card-memory-input"
22
23
  type="text"
23
24
  :class="[{ 'has-error': totalVideoMemoryLocalErrorText }]"
24
25
  />
@@ -24,6 +24,7 @@
24
24
  <select
25
25
  id="vm-wizard-video-card"
26
26
  v-model="selectedVideoCard"
27
+ data-id="vm-wizard-video-card-select"
27
28
  class="vm-wizard-video-card input-text-color"
28
29
  :disabled="props.isEdit && props.state !== 1"
29
30
  @click.stop
@@ -9,6 +9,7 @@
9
9
  <select
10
10
  id="vm-wizard-video-card-adapter-field"
11
11
  v-model="videoCardModelLocal"
12
+ data-id="vm-wizard-video-card-adapter-field-select"
12
13
  :disabled="props.disabled"
13
14
  >
14
15
  <option
@@ -15,6 +15,7 @@
15
15
  <select
16
16
  id="vm-wizard-video-card-display-field"
17
17
  v-model="numberDisplaysLocal"
18
+ data-id="vm-wizard-video-card-display-field-select"
18
19
  :disabled="disabled"
19
20
  >
20
21
  <option
@@ -6,7 +6,12 @@
6
6
  </template>
7
7
  <template #stackBlockContent>
8
8
  <div class="flex-align-center">
9
- <input id="boot-menu" v-model="bootMenuLocal" type="checkbox" />
9
+ <input
10
+ id="boot-menu"
11
+ v-model="bootMenuLocal"
12
+ data-id="boot-menu-checkbox"
13
+ type="checkbox"
14
+ />
10
15
  <label for="boot-menu" class="label-text-normal">{{
11
16
  localization.enable
12
17
  }}</label>
@@ -6,7 +6,12 @@
6
6
  </template>
7
7
  <template #stackBlockContent>
8
8
  <div class="flex-align-center">
9
- <input id="secure-boot" v-model="secureBootLocal" type="checkbox" />
9
+ <input
10
+ id="secure-boot"
11
+ v-model="secureBootLocal"
12
+ data-id="secure-boot-checkbox"
13
+ type="checkbox"
14
+ />
10
15
  <label for="secure-boot" class="label-text-normal">{{
11
16
  localization.enable
12
17
  }}</label>
@@ -6,7 +6,11 @@
6
6
  </template>
7
7
  <template #stackBlockContent>
8
8
  <div class="select">
9
- <select id="boot-delay" v-model="bootDelayLocal">
9
+ <select
10
+ id="boot-delay"
11
+ v-model="bootDelayLocal"
12
+ data-id="boot-delay-select"
13
+ >
10
14
  <option
11
15
  v-for="(item, key) in bootDelayOptions"
12
16
  :key="key"
@@ -15,6 +15,7 @@
15
15
  <select
16
16
  id="vm-wizard-firmware-field"
17
17
  v-model="firmwareLocal"
18
+ data-id="vm-wizard-firmware-select"
18
19
  >
19
20
  <option
20
21
  v-for="(item, key) in firmwareOptions"
@@ -16,8 +16,9 @@
16
16
  #[`leftSide${index}`]
17
17
  >
18
18
  <input
19
- v-model="item.isChecked"
20
19
  :id="`boot-order-${index}`"
20
+ v-model="item.isChecked"
21
+ :data-id="item.testId"
21
22
  type="checkbox"
22
23
  />
23
24
  </template>
@@ -91,6 +92,7 @@ watch(
91
92
  iconClassName: 'icon-disk',
92
93
  type: 'disk',
93
94
  name: item.source + index,
95
+ testId: 'select-disk-value',
94
96
  }
95
97
  }) || []
96
98
  const cdDvdDrives: UI_I_BootItem[] =
@@ -103,6 +105,7 @@ watch(
103
105
  iconClassName: 'icon-disk',
104
106
  type: 'cdDvd',
105
107
  name: item.source + index,
108
+ testId: 'select-cd-dvd-value',
106
109
  }
107
110
  }) || []
108
111
  const networks: UI_I_BootItem[] =
@@ -115,6 +118,7 @@ watch(
115
118
  iconClassName: 'vsphere-icon-network',
116
119
  type: 'nic',
117
120
  name: item.network + index,
121
+ testId: 'select-nic-value',
118
122
  }
119
123
  }) || []
120
124
 
@@ -5,4 +5,5 @@ export interface UI_I_BootItem {
5
5
  iconClassName: string
6
6
  name: string
7
7
  type: 'nic' | 'disk' | 'cdDvd'
8
+ testId?: string
8
9
  }
@@ -36,8 +36,9 @@
36
36
  <select
37
37
  v-if="props.guestMachineType"
38
38
  id="guest-machine-type-select"
39
- :disabled="isDisabled"
40
39
  v-model="guestMachineTypeLocal"
40
+ :disabled="isDisabled"
41
+ data-id="guest-machine-type-select"
41
42
  >
42
43
  <option
43
44
  v-for="item in machineTypeOptions"
@@ -59,6 +60,7 @@
59
60
  v-if="props.guestOsFamily"
60
61
  id="guest-os-family-select"
61
62
  v-model="guestOsFamilyLocal"
63
+ data-id="guest-os-family-select"
62
64
  :disabled="isDisabled"
63
65
  @change="onChangeOS"
64
66
  >
@@ -78,6 +80,7 @@
78
80
  v-if="props.guestOsVersion"
79
81
  id="guest-os-version-select"
80
82
  v-model="guestOsVersionLocal"
83
+ data-id="guest-os-version-select"
81
84
  :disabled="isDisabled"
82
85
  >
83
86
  <option
@@ -9,6 +9,7 @@
9
9
  <input
10
10
  id="copy-paste"
11
11
  v-model="copyPasteLocal"
12
+ data-id="copy-paste-checkbox"
12
13
  :disabled="props.disabled"
13
14
  type="checkbox"
14
15
  />
@@ -9,6 +9,7 @@
9
9
  <input
10
10
  id="file-transfer"
11
11
  v-model="fileTransferLocal"
12
+ data-id="file-transfer-checkbox"
12
13
  :disabled="props.disabled"
13
14
  type="checkbox"
14
15
  />
@@ -9,6 +9,7 @@
9
9
  <input
10
10
  id="folder-sharing"
11
11
  v-model="folderSharingLocal"
12
+ data-id="folder-sharing-checkbox"
12
13
  type="checkbox"
13
14
  disabled
14
15
  />
@@ -9,6 +9,7 @@
9
9
  <input
10
10
  id="playback-compression"
11
11
  v-model="playbackCompressionLocal"
12
+ data-id="playback-compression-checkbox"
12
13
  :disabled="props.disabled"
13
14
  type="checkbox"
14
15
  />
@@ -9,6 +9,7 @@
9
9
  <input
10
10
  id="power-control"
11
11
  v-model="powerControlLocal"
12
+ data-id="power-control-checkbox"
12
13
  type="checkbox"
13
14
  />
14
15
  <label for="power-control" class="label-text-normal">{{
@@ -15,6 +15,7 @@
15
15
  <select
16
16
  id="vm-wizard-img-compression-field"
17
17
  v-model="imgCompressionLocal"
18
+ data-id="vm-wizard-img-compression-select"
18
19
  :disabled="props.disabled"
19
20
  >
20
21
  <option
@@ -15,6 +15,7 @@
15
15
  <select
16
16
  id="vm-wizard-jpeg-compression-field"
17
17
  v-model="jpegCompressionLocal"
18
+ data-id="vm-wizard-jpeg-compression-select"
18
19
  :disabled="props.disabled"
19
20
  >
20
21
  <option
@@ -7,9 +7,10 @@
7
7
  <template #stackBlockContent>
8
8
  <div class="select">
9
9
  <select
10
+ id="keymap-select"
10
11
  v-model="remoteConsoleTypeLocal"
12
+ data-id="keymap-select"
11
13
  :disabled="props.disabled"
12
- id="keymap-select"
13
14
  >
14
15
  <option
15
16
  v-for="(item, key) in keymapOptions"