bfg-common 1.4.799 → 1.4.800

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 (146) hide show
  1. package/assets/img/icons/icons-sprite-dark-1.svg +31 -14
  2. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  3. package/assets/img/icons/icons-sprite-dark-4.svg +6 -1
  4. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  5. package/assets/img/icons/icons-sprite-light-1.svg +30 -13
  6. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  7. package/assets/img/icons/icons-sprite-light-4.svg +6 -1
  8. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  9. package/assets/localization/local_be.json +33 -8
  10. package/assets/localization/local_en.json +33 -8
  11. package/assets/localization/local_hy.json +33 -8
  12. package/assets/localization/local_kk.json +34 -9
  13. package/assets/localization/local_ru.json +43 -18
  14. package/assets/localization/local_zh.json +33 -8
  15. package/assets/scss/clarity/local_ar.json +6 -3
  16. package/assets/scss/common/icons/icons-1.scss +4 -4
  17. package/components/atoms/autocomplete/Autocomplete.vue +68 -12
  18. package/components/atoms/select/TheSelect.vue +10 -1
  19. package/components/atoms/table/dataGrid/DataGrid.vue +12 -4
  20. package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +4 -1
  21. package/components/atoms/table/dataGrid/lib/utils/export.ts +13 -13
  22. package/components/atoms/tabs/VerticalTabs.vue +11 -6
  23. package/components/common/browse/blocks/lib/models/types.ts +1 -1
  24. package/components/common/browse/lib/models/interfaces.ts +5 -5
  25. package/components/common/chartOptionsModal/counters/timespan/form/Form.vue +544 -544
  26. package/components/common/chartOptionsModal/counters/timespan/form/lib/config/dateForm.ts +116 -116
  27. package/components/common/context/Context.vue +16 -4
  28. package/components/common/context/recursion/Recursion.vue +2 -1
  29. package/components/common/context/recursion/RecursionNew.vue +57 -31
  30. package/components/common/context/recursion/RecursionOld.vue +33 -19
  31. package/components/common/diagramMain/Header.vue +211 -211
  32. package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
  33. package/components/common/diagramMain/lib/config/initial.ts +50 -50
  34. package/components/common/diagramMain/lib/models/types.ts +21 -21
  35. package/components/common/diagramMain/lib/utils/utils.ts +331 -331
  36. package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +330 -330
  37. package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +40 -40
  38. package/components/common/diagramMain/modals/editSettings/EditSettings.vue +497 -497
  39. package/components/common/diagramMain/modals/editSettings/EditSettingsModal.vue +812 -812
  40. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +214 -214
  41. package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +189 -189
  42. package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +163 -163
  43. package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +175 -175
  44. package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +7 -7
  45. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +346 -346
  46. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +205 -205
  47. package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +23 -23
  48. package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
  49. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
  50. package/components/common/diagramMain/modals/lib/mappers/mappers.ts +87 -87
  51. package/components/common/diagramMain/modals/lib/utils/index.ts +24 -24
  52. package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
  53. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +169 -169
  54. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
  55. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +14 -14
  56. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
  57. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
  58. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
  59. package/components/common/diagramMain/port/Ports.vue +47 -47
  60. package/components/common/feedback/Buttons.vue +2 -2
  61. package/components/common/feedback/Message.vue +1 -0
  62. package/components/common/feedback/VisitPortal.vue +5 -1
  63. package/components/common/layout/theHeader/feedback/new/New.vue +29 -14
  64. package/components/common/layout/theHeader/feedback/new/additionalDetails/AdditionalDetails.vue +34 -9
  65. package/components/common/layout/theHeader/feedback/new/additionalDetails/Headline.vue +17 -6
  66. package/components/common/layout/theHeader/feedback/new/description/Description.vue +1 -0
  67. package/components/common/layout/theHeader/feedback/new/email/Email.vue +1 -1
  68. package/components/common/layout/theHeader/feedback/new/subtitle/Subtitle.vue +22 -6
  69. package/components/common/layout/theHeader/feedback/new/tabs/Tabs.vue +17 -15
  70. package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePasswordNew.vue +1 -1
  71. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +3 -2
  72. package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +1 -1
  73. package/components/common/mainNavigationPanel/MainNavigationPanelOld.vue +1 -1
  74. package/components/common/monitor/advanced/tools/chartOptionsModal/Notification.vue +7 -7
  75. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +95 -95
  76. package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +1 -1
  77. package/components/common/pages/hardwareHealth/historyTestimony/Graph.vue +463 -456
  78. package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +389 -387
  79. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +8 -0
  80. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/Counters.vue +94 -94
  81. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/Timespan.vue +66 -66
  82. package/components/common/pages/home/headline/Headline.vue +3 -2
  83. package/components/common/pages/home/headline/HeadlineNew.vue +1 -1
  84. package/components/common/pages/home/headline/HeadlineOld.vue +5 -0
  85. package/components/common/pages/home/widgets/vms/VmsNew.vue +1 -1
  86. package/components/common/pages/packages/Packages.vue +208 -0
  87. package/components/common/pages/packages/lib/config/actions.ts +59 -0
  88. package/components/common/pages/packages/lib/models/types.ts +8 -0
  89. package/components/common/pages/packages/tableView/TableView.vue +120 -0
  90. package/components/common/pages/packages/tableView/lib/config/configTable.ts +136 -0
  91. package/components/common/pages/packages/tableView/lib/config/tableKey.ts +14 -0
  92. package/components/common/pages/packages/tableView/lib/models/types.ts +12 -0
  93. package/components/common/pages/shortcuts/Shortcuts.vue +1 -1
  94. package/components/common/pages/tasks/Tasks.vue +23 -8
  95. package/components/common/pages/tasks/table/Table.vue +66 -16
  96. package/components/common/pages/tasks/table/errorInfo/ErrorInfo.vue +27 -10
  97. package/components/common/pages/tasks/table/expandDetails/ExpandDetails.vue +28 -12
  98. package/components/common/pages/tasks/table/lib/config/config.ts +11 -11
  99. package/components/common/select/radio/RadioGroup.vue +3 -3
  100. package/components/common/selectLanguage/SelectLanguage.vue +29 -25
  101. package/components/common/selectLanguage/lib/config/config.ts +1 -0
  102. package/components/common/split/horizontal/HorizontalNew.vue +42 -24
  103. package/components/common/split/horizontal/HorizontalOld.vue +43 -13
  104. package/components/common/vm/actions/add/Add.vue +6 -1
  105. package/components/common/vm/actions/clone/Clone.vue +8 -3
  106. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +4 -0
  107. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +6 -4
  108. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +26 -10
  109. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +12 -4
  110. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +6 -3
  111. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +4 -2
  112. package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +6 -4
  113. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +9 -3
  114. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +3 -2
  115. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskOld.vue +3 -2
  116. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +87 -24
  117. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceNew.vue +14 -8
  118. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceOld.vue +9 -7
  119. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIo.vue +0 -4
  120. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoNew.vue +43 -12
  121. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoOld.vue +50 -25
  122. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +5 -7
  123. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoNew.vue +64 -28
  124. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoOld.vue +60 -19
  125. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options.ts +11 -4
  126. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGrid.vue +16 -1
  127. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridNew.vue +59 -8
  128. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridOld.vue +60 -7
  129. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionNew.vue +1 -1
  130. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionOld.vue +1 -1
  131. package/components/common/vm/actions/common/lib/config/capabilities.ts +1 -1
  132. package/components/common/vm/actions/editSettings/EditSettings.vue +4 -0
  133. package/components/common/vm/actions/editSettings/EditSettingsOld.vue +2 -0
  134. package/components/common/vm/actions/editSettings/new/New.vue +2 -0
  135. package/components/common/wizards/datastore/add/Add.vue +4 -4
  136. package/components/common/wizards/datastore/add/lib/config/steps.ts +14 -14
  137. package/components/common/wizards/datastore/add/lib/validations.ts +9 -9
  138. package/components/common/wizards/datastore/add/nfs/Nfs.vue +6 -9
  139. package/components/common/wizards/vm/migrate/Migrate.vue +12 -12
  140. package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +1 -1
  141. package/composables/useLocal.ts +3 -1
  142. package/composables/useLocalStorage.ts +1 -1
  143. package/lib/models/store/vm/interfaces.ts +11 -0
  144. package/lib/models/table/interfaces.ts +1 -0
  145. package/package.json +3 -3
  146. package/store/tasks/actions.ts +2 -1
@@ -35,6 +35,7 @@
35
35
  :datastore="props.datastore"
36
36
  :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
37
37
  :passthrough-devices="props.passthroughDevices"
38
+ :mediated-devices="props.mediatedDevices"
38
39
  :project="props.project"
39
40
  :guest-machine-type="guestMachineType"
40
41
  @send-data="emits('send-data-virtual-hardware-method', $event)"
@@ -94,16 +95,30 @@ import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/mo
94
95
  import type {
95
96
  API_UI_I_VmEditCpu,
96
97
  API_UI_I_VmEditMemory,
98
+ UI_I_MediatedDevice,
97
99
  UI_I_PciDevice,
98
100
  } from '~/lib/models/store/vm/interfaces'
99
101
 
100
- const vmName = defineModel<string>('vmName', {required: true})
101
- const guestOsFamily = defineModel<UI_I_OptionItem | null>('guestOsFamily', {required: true})
102
- const guestOsVersion = defineModel<UI_I_OptionItem | null>('guestOsVersion', {required: true})
103
- const selectedNavItem = defineModel<UI_T_SelectedNavItem>('selectedNavItem', {required: true})
104
- const guestMachineType = defineModel<UI_I_OptionItem | null>('guestMachineType', {required: true})
105
- const vmOptionsInvalid = defineModel<string[]>('vmOptionsInvalid', {required: true})
106
- const virtualHardwareInvalid = defineModel<string[]>('virtualHardwareInvalid', {required: true})
102
+ const vmName = defineModel<string>('vmName', { required: true })
103
+ const guestOsFamily = defineModel<UI_I_OptionItem | null>('guestOsFamily', {
104
+ required: true,
105
+ })
106
+ const guestOsVersion = defineModel<UI_I_OptionItem | null>('guestOsVersion', {
107
+ required: true,
108
+ })
109
+ const selectedNavItem = defineModel<UI_T_SelectedNavItem>('selectedNavItem', {
110
+ required: true,
111
+ })
112
+ const guestMachineType = defineModel<UI_I_OptionItem | null>(
113
+ 'guestMachineType',
114
+ { required: true }
115
+ )
116
+ const vmOptionsInvalid = defineModel<string[]>('vmOptionsInvalid', {
117
+ required: true,
118
+ })
119
+ const virtualHardwareInvalid = defineModel<string[]>('virtualHardwareInvalid', {
120
+ required: true,
121
+ })
107
122
 
108
123
  const props = defineProps<{
109
124
  nodes: UI_I_FileTreeNode[]
@@ -134,6 +149,7 @@ const props = defineProps<{
134
149
  cdDvdDrives?: UI_I_SendDataNewCdDvdDrive[] | null
135
150
  usbController?: string
136
151
  passthroughDevices?: UI_I_PciDevice[]
152
+ mediatedDevices?: UI_I_MediatedDevice[]
137
153
  vmCpuHelpTextSecond?: string
138
154
  getDatastoreTableFunc?: (payload: UI_I_TablePayload) => Promise<void>
139
155
  }>()
@@ -147,11 +163,11 @@ const emits = defineEmits<{
147
163
  (event: 'get-active-device-child', value: UI_I_FileTreeNode): void
148
164
  (event: 'remove-validation-errors'): void
149
165
  (event: 'send-data-vm-options-method', value: UI_I_SendDataVmoptions): void
150
- (event: 'send-data-virtual-hardware-method', value: UI_I_SendDataVirtualHardware): void
151
166
  (
152
- event: 'change-boot-order',
153
- value: UI_T_ChangeBootOrder
167
+ event: 'send-data-virtual-hardware-method',
168
+ value: UI_I_SendDataVirtualHardware
154
169
  ): void
170
+ (event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
155
171
  }>()
156
172
  </script>
157
173
 
@@ -37,6 +37,7 @@
37
37
  :usb-controller="usbController"
38
38
  :guest-machine-type="guestMachineType"
39
39
  :passthrough-devices="passthroughDevices"
40
+ :mediated-devices="mediatedDevices"
40
41
  :vm-cpu-help-text-second="vmCpuHelpTextSecond"
41
42
  @add-device="onAddDevice"
42
43
  @get-storage="emits('get-storage', $event)"
@@ -103,6 +104,7 @@
103
104
  :usb-controller="usbController"
104
105
  :guest-machine-type="guestMachineType"
105
106
  :passthrough-devices="passthroughDevices"
107
+ :mediated-devices="mediatedDevices"
106
108
  :vm-cpu-help-text-second="vmCpuHelpTextSecond"
107
109
  @add-device="onAddDevice"
108
110
  @get-storage="emits('get-storage', $event)"
@@ -166,7 +168,7 @@ import type {
166
168
  import type { UI_I_Localization } from '~/lib/models/interfaces'
167
169
  import type {
168
170
  API_UI_I_VmEditCpu,
169
- API_UI_I_VmEditMemory,
171
+ API_UI_I_VmEditMemory, UI_I_MediatedDevice,
170
172
  UI_I_PciDevice,
171
173
  } from '~/lib/models/store/vm/interfaces'
172
174
  import { dropdownItemsFunc } from './lib/config/dropdownItems'
@@ -195,6 +197,7 @@ const props = defineProps<{
195
197
  usbController?: string
196
198
  pciDevices?: UI_I_SendDataNewPciDevice[]
197
199
  passthroughDevices?: UI_I_PciDevice[]
200
+ mediatedDevices?: UI_I_MediatedDevice[]
198
201
  project: UI_T_Project
199
202
  guestMachineType?: UI_I_OptionItem | null
200
203
  }>()
@@ -216,7 +219,12 @@ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
216
219
  const localization = computed<UI_I_Localization>(() => useLocal())
217
220
 
218
221
  const dropdownItems = computed<UI_I_DropdownTreeItem[]>(() =>
219
- dropdownItemsFunc(localization.value, props.state, props.passthroughDevices)
222
+ dropdownItemsFunc(
223
+ localization.value,
224
+ props.state,
225
+ props.passthroughDevices,
226
+ props.mediatedDevices
227
+ )
220
228
  )
221
229
 
222
230
  const hardDisksIndex = ref<number[]>([0])
@@ -458,8 +466,8 @@ const onRollBackCdDvdDrive = (index: number): void => {
458
466
  const defaultPciDevice: UI_I_SendDataNewPciDevice = {
459
467
  address: '',
460
468
  vendor_name: '',
461
- class_name: 'cdrom',
462
- device_name: 'cdrom',
469
+ class_name: '',
470
+ device_name: '',
463
471
  }
464
472
  const pciDevicesIndex = ref<number[]>([0])
465
473
  const pciDevicesType = ref<('new' | 'edit' | 'removed')[]>(['new'])
@@ -139,7 +139,7 @@
139
139
  :state="props.state"
140
140
  @send-data="emits('send-data-new-usb-controller-method', $event)"
141
141
  />
142
- <template v-if="props.passthroughDevices">
142
+ <template v-if="props.passthroughDevices || props.mediatedDevices">
143
143
  <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device
144
144
  v-for="(item, key) in props.pciDevices"
145
145
  :key="props.pciDevicesIndex[key]"
@@ -147,6 +147,7 @@
147
147
  :pci-device="item"
148
148
  :error-validation-fields="props.errorValidationFields"
149
149
  :passthrough-devices="props.passthroughDevices"
150
+ :mediated-devices="props.mediatedDevices"
150
151
  :type="props.pciDevicesType[key]"
151
152
  :is-edit="props.isEdit"
152
153
  :state="props.state"
@@ -221,7 +222,7 @@ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
221
222
  import type { UI_I_Localization } from '~/lib/models/interfaces'
222
223
  import type {
223
224
  API_UI_I_VmEditCpu,
224
- API_UI_I_VmEditMemory,
225
+ API_UI_I_VmEditMemory, UI_I_MediatedDevice,
225
226
  UI_I_PciDevice,
226
227
  } from '~/lib/models/store/vm/interfaces'
227
228
  import { dropdownItemsNewFunc } from './lib/config/dropdownItems'
@@ -266,6 +267,7 @@ const props = defineProps<{
266
267
  usbController?: string
267
268
  guestMachineType?: UI_I_OptionItem | null
268
269
  passthroughDevices?: UI_I_PciDevice[]
270
+ mediatedDevices?: UI_I_MediatedDevice[]
269
271
  vmCpuHelpTextSecond?: string
270
272
  }>()
271
273
  const emits = defineEmits<{
@@ -337,7 +339,8 @@ const dropdownItems = computed<UI_I_Dropdown[]>(() =>
337
339
  dropdownItemsNewFunc(
338
340
  localization.value,
339
341
  props.state,
340
- props.passthroughDevices
342
+ props.passthroughDevices,
343
+ props.mediatedDevices
341
344
  )
342
345
  )
343
346
 
@@ -99,7 +99,7 @@
99
99
  :state="props.state"
100
100
  @send-data="emits('send-data-new-usb-controller-method', $event)"
101
101
  />
102
- <template v-if="props.passthroughDevices">
102
+ <template v-if="props.passthroughDevices || props.mediatedDevices">
103
103
  <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device
104
104
  v-for="(item, key) in props.pciDevices"
105
105
  :key="props.pciDevicesIndex[key]"
@@ -107,6 +107,7 @@
107
107
  :pci-device="item"
108
108
  :error-validation-fields="props.errorValidationFields"
109
109
  :passthrough-devices="props.passthroughDevices"
110
+ :mediated-devices="props.mediatedDevices"
110
111
  :type="props.pciDevicesType[key]"
111
112
  :is-edit="props.isEdit"
112
113
  :state="props.state"
@@ -178,7 +179,7 @@ import type {
178
179
  import type { UI_I_Localization } from '~/lib/models/interfaces'
179
180
  import type {
180
181
  API_UI_I_VmEditCpu,
181
- API_UI_I_VmEditMemory,
182
+ API_UI_I_VmEditMemory, UI_I_MediatedDevice,
182
183
  UI_I_PciDevice,
183
184
  } from '~/lib/models/store/vm/interfaces'
184
185
 
@@ -220,6 +221,7 @@ const props = defineProps<{
220
221
  usbController?: string
221
222
  guestMachineType?: UI_I_OptionItem | null
222
223
  passthroughDevices?: UI_I_PciDevice[]
224
+ mediatedDevices?: UI_I_MediatedDevice[]
223
225
  vmCpuHelpTextSecond?: string
224
226
  }>()
225
227
  const emits = defineEmits<{
@@ -6,7 +6,8 @@ import type { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
6
6
  export const dropdownItemsFunc = (
7
7
  localization: UI_I_Localization,
8
8
  state: string | number | undefined,
9
- passthroughDevices?: UI_I_PciDevice[]
9
+ passthroughDevices?: UI_I_PciDevice[],
10
+ mediatedDevices?: any[]
10
11
  ): UI_I_DropdownTreeItem[] => {
11
12
  const { $text } = useNuxtApp()
12
13
 
@@ -51,7 +52,7 @@ export const dropdownItemsFunc = (
51
52
  {
52
53
  text: 'PCI Device',
53
54
  value: 10,
54
- disabled: state === 2 || !passthroughDevices?.length,
55
+ disabled: state === 2 || (!passthroughDevices?.length && !mediatedDevices?.length),
55
56
  testId: 'pci-device',
56
57
  },
57
58
  // { text: 'Watchdog Timer', value: 11 },
@@ -75,7 +76,8 @@ export const dropdownItemsFunc = (
75
76
  export const dropdownItemsNewFunc = (
76
77
  localization: UI_I_Localization,
77
78
  state: string | number | undefined,
78
- passthroughDevices?: UI_I_PciDevice[]
79
+ passthroughDevices?: UI_I_PciDevice[],
80
+ mediatedDevices?: any
79
81
  ): UI_I_Dropdown[] => {
80
82
  const { $text } = useNuxtApp()
81
83
 
@@ -124,7 +126,7 @@ export const dropdownItemsNewFunc = (
124
126
  {
125
127
  text: 'PCI Device',
126
128
  value: 10,
127
- disabled: state === 2 || !passthroughDevices?.length,
129
+ disabled: state === 2 || (!passthroughDevices?.length && !mediatedDevices?.length),
128
130
  testId: 'pci-device',
129
131
  },
130
132
  // { text: 'Watchdog Timer', value: 11 },
@@ -22,6 +22,7 @@
22
22
  :max-hard-disk="maxHardDisk"
23
23
  :location="location"
24
24
  :is-running="isRunning"
25
+ :is-new-hard-disk="!isNotNewHardDisk"
25
26
  :is-edit="props.isEdit"
26
27
  :datastore="props.datastore"
27
28
  :get-datastore-table-func="props.getDatastoreTableFunc"
@@ -59,6 +60,7 @@
59
60
  :max-hard-disk="maxHardDisk"
60
61
  :location="location"
61
62
  :is-running="isRunning"
63
+ :is-new-hard-disk="!isNotNewHardDisk"
62
64
  :is-edit="props.isEdit"
63
65
  :datastore="props.datastore"
64
66
  :get-datastore-table-func="props.getDatastoreTableFunc"
@@ -135,8 +137,13 @@ const apiErrorLocal = computed<string>(() => {
135
137
  )
136
138
  })
137
139
 
140
+ // PC-1796
141
+ const isNotNewHardDisk = computed<boolean>(
142
+ () => props.type === 'edit' || props.type === 'removed'
143
+ )
138
144
  const label = computed<string>(() => {
139
- if (props.type === 'edit' || props.type === 'removed')
145
+ // if (props.type === 'edit' || props.type === 'removed')
146
+ if (isNotNewHardDisk.value)
140
147
  return `${localization.value.common.hardDisk} ${props.index + 1}`
141
148
 
142
149
  return `${localization.value.common.newHardDisk} *`
@@ -347,5 +354,4 @@ watch(
347
354
  )
348
355
  </script>
349
356
 
350
- <style scoped lang="scss">
351
- </style>
357
+ <style scoped lang="scss"></style>
@@ -105,7 +105,7 @@
105
105
  v-model:limit-iops-type="limitIopsType"
106
106
  :index="props.index"
107
107
  :error-validation-fields="props.errorValidationFields"
108
- :disabled="props.isRunning"
108
+ :disabled="props.isRunning && props.type !== 'new'"
109
109
  @valid="limitIopsInvalid = $event"
110
110
  @remove-error-by-title="emits('remove-error-by-title', $event)"
111
111
  />
@@ -127,7 +127,7 @@
127
127
  v-model:bus="bus"
128
128
  :index="props.index"
129
129
  :error-validation-fields="props.errorValidationFields"
130
- :disabled="props.isRunning"
130
+ :disabled="!props.isNewHardDisk && props.isRunning"
131
131
  :help-text="localization.common.busVirtioHelpDesc"
132
132
  :test-id="`vm-wizard-disk-bus-field-${props.index}`"
133
133
  component-type="disk_devices"
@@ -180,6 +180,7 @@ const props = defineProps<{
180
180
  maxHardDisk: number
181
181
  location: UI_I_DatastoreTableItem | null
182
182
  isRunning: boolean
183
+ isNewHardDisk: boolean
183
184
  isEdit: boolean
184
185
  datastore: UI_I_DatastoreTableItem[]
185
186
  getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
@@ -137,7 +137,7 @@
137
137
  v-model:limit-iops-type="limitIopsType"
138
138
  :index="props.index"
139
139
  :error-validation-fields="props.errorValidationFields"
140
- :disabled="props.isRunning"
140
+ :disabled="props.isRunning && props.type !== 'new'"
141
141
  @valid="limitIopsInvalid = $event"
142
142
  @remove-error-by-title="emits('remove-error-by-title', $event)"
143
143
  />
@@ -159,7 +159,7 @@
159
159
  v-model:bus="bus"
160
160
  :index="props.index"
161
161
  :error-validation-fields="props.errorValidationFields"
162
- :disabled="props.isRunning"
162
+ :disabled="!props.isNewHardDisk && props.isRunning"
163
163
  :help-text="localization.common.busVirtioHelpDesc"
164
164
  :test-id="`vm-wizard-disk-bus-field-${props.index}`"
165
165
  component-type="disk_devices"
@@ -206,6 +206,7 @@ const props = defineProps<{
206
206
  maxHardDisk: number
207
207
  location: UI_I_DatastoreTableItem | null
208
208
  isRunning: boolean
209
+ isNewHardDisk: boolean
209
210
  isEdit: boolean
210
211
  datastore: UI_I_DatastoreTableItem[]
211
212
  getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
@@ -7,6 +7,7 @@
7
7
  v-model:nvidia-grid-profile="nvidiaGridProfile"
8
8
  :index="props.index"
9
9
  :passthrough-devices="props.passthroughDevices"
10
+ :mediated-devices="props.mediatedDevices"
10
11
  :type="props.type"
11
12
  :is-removable="isRemovable"
12
13
  :label="label"
@@ -22,6 +23,7 @@
22
23
  v-model:nvidia-grid-profile="nvidiaGridProfile"
23
24
  :index="props.index"
24
25
  :passthrough-devices="props.passthroughDevices"
26
+ :mediated-devices="props.mediatedDevices"
25
27
  :type="props.type"
26
28
  :is-removable="isRemovable"
27
29
  :label="label"
@@ -36,13 +38,18 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
36
38
  import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
37
39
  import type { UI_I_SendDataNewPciDevice } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
38
40
  import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
39
- import type { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
40
- import { pciDeviceTypeOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options'
41
+ import type {
42
+ UI_I_MediatedDevice,
43
+ UI_I_PciDevice,
44
+ } from '~/lib/models/store/vm/interfaces'
45
+ import type { UI_I_Option } from '~/components/atoms/select/lib/models/interfaces'
46
+ import { pciDeviceTypeOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options'
41
47
 
42
48
  const props = defineProps<{
43
49
  index: number
44
50
  pciDevice: UI_I_SendDataNewPciDevice
45
51
  passthroughDevices: UI_I_PciDevice[]
52
+ mediatedDevices: UI_I_MediatedDevice[]
46
53
  type: UI_T_PciDeviceType
47
54
  isEdit: boolean
48
55
  state?: string | number
@@ -74,50 +81,106 @@ const label = computed<string>(() => {
74
81
  })
75
82
 
76
83
  const selectedLabel = computed<string>(() => {
84
+ if (props.pciDevice.address) {
85
+ return `${props.pciDevice.address} | ${props.pciDevice.device_name}`
86
+ }
77
87
  switch (selectedType.value.value) {
78
88
  case 'direct_path_io':
79
- return `${directPathIo.value.address} | ${directPathIo.value.device_name}`
89
+ return `${directPathIo.value?.address} | ${directPathIo.value?.device_name}`
80
90
  case 'dynamic_direct_path_io':
81
- return dynamicDirectPathIo.value
91
+ return `${dynamicDirectPathIo.value?.address} | ${dynamicDirectPathIo.value?.device_name}`
82
92
  default:
83
- return nvidiaGridProfile.value
93
+ return nvidiaGridProfile.value?.text
84
94
  }
85
95
  })
86
96
 
87
- const pciDeviceTypeOptions = ref<UI_I_OptionItem[]>(pciDeviceTypeOptionsConfig)
88
- const selectedType = ref<UI_I_OptionItem>(pciDeviceTypeOptionsConfig[0])
97
+ const pciDeviceTypeOptions = ref<UI_I_OptionItem[]>(
98
+ pciDeviceTypeOptionsFunc(
99
+ !props.passthroughDevices.length,
100
+ !props.mediatedDevices.length
101
+ )
102
+ )
103
+ const selectedType = ref<UI_I_OptionItem>(pciDeviceTypeOptions.value[0])
104
+ pciDeviceTypeOptions.value.forEach((option) => {
105
+ if (!option.disabled) selectedType.value = option
106
+ })
89
107
 
90
- const directPathIo = ref<UI_I_PciDevice>(props.passthroughDevices[0])
91
- const dynamicDirectPathIo = ref<string>('')
92
- const nvidiaGridProfile = ref<string>('')
108
+ const directPathIo = ref<string>('') /// TODO
109
+ const dynamicDirectPathIo = ref<UI_I_PciDevice>(props.passthroughDevices[0])
110
+ const nvidiaGridProfile = ref<UI_I_Option | null>(null)
93
111
 
94
112
  watch(
95
- props.pciDevice,
96
- (newValue) => {
113
+ [() => props.pciDevice, () => props.mediatedDevices],
114
+ ([newValue1]) => {
97
115
  // const passthroughDevice = props.passthroughDevices.find(
98
116
  // (item) => item.address === newValue.address
99
117
  // )
100
118
  // passthroughDevice && (directPathIo.value = passthroughDevice) // Todo change
101
- newValue && (directPathIo.value = newValue)
119
+ if (newValue1) {
120
+ // directPathIo.value = newValue1
121
+ const passthroughDevice = props.passthroughDevices.find((device) => {
122
+ return (
123
+ device.class_name + '_' + device.address ===
124
+ newValue1.class_name + '_' + newValue1.address
125
+ )
126
+ })
127
+ if (passthroughDevice) {
128
+ dynamicDirectPathIo.value = passthroughDevice
129
+ }
130
+
131
+ const mediatedDevice = props.mediatedDevices.find((device) => {
132
+ return (
133
+ device.profile_name + '_' + device.root_device ===
134
+ newValue1.class_name + '_' + newValue1.address
135
+ )
136
+ })
137
+ if (mediatedDevice) {
138
+ nvidiaGridProfile.value = {
139
+ text: mediatedDevice.human_readable,
140
+ value: mediatedDevice.profile_name + '_' + mediatedDevice.root_device,
141
+ }
142
+
143
+ selectedType.value =
144
+ pciDeviceTypeOptions.value.find(
145
+ (option) => option.value === 'nvidia_grid'
146
+ ) || selectedType.value
147
+ }
148
+ }
102
149
  },
103
- { immediate: true }
150
+ { immediate: true, deep: true }
104
151
  )
105
152
 
106
153
  const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
154
+ const nvidia = props.mediatedDevices.find(
155
+ (device) =>
156
+ nvidiaGridProfile.value?.value ===
157
+ device.profile_name + '_' + device.root_device
158
+ )
107
159
  switch (selectedType.value.value) {
108
160
  case 'direct_path_io':
109
- return {
110
- address: directPathIo.value.address,
111
- vendor_name: directPathIo.value.vendor_name,
112
- class_name: directPathIo.value.class_name,
113
- device_name: directPathIo.value.device_name,
114
- }
115
- case 'dynamic_direct_path_io':
116
161
  return {
117
162
  address: '',
118
163
  vendor_name: '',
119
164
  class_name: '',
120
165
  device_name: '',
166
+ mediated_device: false,
167
+ }
168
+ case 'dynamic_direct_path_io':
169
+ return {
170
+ address: dynamicDirectPathIo.value?.address || '',
171
+ vendor_name: dynamicDirectPathIo.value?.vendor_name || '',
172
+ class_name: dynamicDirectPathIo.value?.class_name || '',
173
+ device_name: dynamicDirectPathIo.value?.device_name || '',
174
+ mediated_device: false,
175
+ }
176
+ case 'nvidia_grid':
177
+ return {
178
+ address: nvidia?.root_device || '',
179
+ vendor_name: '',
180
+ class_name: nvidia?.profile_name || '',
181
+ device_name: nvidia?.name || '',
182
+ mediated_device: true,
183
+ mediated_device_uuid: '',
121
184
  }
122
185
  default:
123
186
  return {
@@ -125,6 +188,7 @@ const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
125
188
  vendor_name: '',
126
189
  class_name: '',
127
190
  device_name: '',
191
+ mediated_device: false,
128
192
  }
129
193
  }
130
194
  })
@@ -132,11 +196,10 @@ const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
132
196
  watch(
133
197
  sendData,
134
198
  (newValue) => {
135
- emits('send-data', newValue)
199
+ emits('send-data', props.type === 'edit' ? props.pciDevice : newValue)
136
200
  },
137
201
  { immediate: true }
138
202
  )
139
203
  </script>
140
204
 
141
- <style scoped lang="scss">
142
- </style>
205
+ <style scoped lang="scss"></style>
@@ -27,21 +27,22 @@
27
27
  :pci-device-index="props.index"
28
28
  />
29
29
 
30
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
31
- v-show="selectedType.value === 'direct_path_io'"
32
- v-model="directPathIo"
33
- :pci-device-index="props.index"
34
- :passthrough-devices="props.passthroughDevices"
35
- />
36
30
  <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
37
31
  v-show="selectedType.value === 'dynamic_direct_path_io'"
38
32
  v-model="dynamicDirectPathIo"
39
33
  :pci-device-index="props.index"
34
+ :passthrough-devices="props.passthroughDevices"
40
35
  />
41
36
  <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
42
37
  v-show="selectedType.value === 'nvidia_grid'"
43
38
  v-model="nvidiaGridProfile"
44
39
  :pci-device-index="props.index"
40
+ :mediated-devices="props.mediatedDevices"
41
+ />
42
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
43
+ v-show="selectedType.value === 'direct_path_io'"
44
+ v-model="directPathIo"
45
+ :pci-device-index="props.index"
45
46
  />
46
47
  </template>
47
48
 
@@ -53,7 +54,7 @@
53
54
  <script setup lang="ts">
54
55
  import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
55
56
  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 type {UI_I_MediatedDevice, UI_I_PciDevice} from '~/lib/models/store/vm/interfaces'
57
58
 
58
59
  const selectedType = defineModel<UI_I_OptionItem>('selectedType', {
59
60
  required: true,
@@ -71,6 +72,7 @@ const nvidiaGridProfile = defineModel<string>('nvidiaGridProfile', {
71
72
  const props = defineProps<{
72
73
  index: number
73
74
  passthroughDevices: UI_I_PciDevice[]
75
+ mediatedDevices: UI_I_MediatedDevice[]
74
76
  type: UI_T_PciDeviceType
75
77
  isRemovable: boolean
76
78
  label: string
@@ -82,4 +84,8 @@ const emits = defineEmits<{
82
84
  }>()
83
85
  </script>
84
86
 
85
- <style scoped lang="scss"></style>
87
+ <style scoped lang="scss">
88
+ :deep(.stack-block.not-children .stack-block-label) {
89
+ height: auto;
90
+ }
91
+ </style>
@@ -28,21 +28,22 @@
28
28
  :pci-device-index="props.index"
29
29
  />
30
30
 
31
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
32
- v-show="selectedType.value === 'direct_path_io'"
33
- v-model="directPathIo"
34
- :pci-device-index="props.index"
35
- :passthrough-devices="props.passthroughDevices"
36
- />
37
31
  <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
38
32
  v-show="selectedType.value === 'dynamic_direct_path_io'"
39
33
  v-model="dynamicDirectPathIo"
40
34
  :pci-device-index="props.index"
35
+ :passthrough-devices="props.passthroughDevices"
41
36
  />
42
37
  <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
43
38
  v-show="selectedType.value === 'nvidia_grid'"
44
39
  v-model="nvidiaGridProfile"
45
40
  :pci-device-index="props.index"
41
+ :mediated-devices="props.mediatedDevices"
42
+ />
43
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
44
+ v-show="selectedType.value === 'direct_path_io'"
45
+ v-model="directPathIo"
46
+ :pci-device-index="props.index"
46
47
  />
47
48
  </template>
48
49
 
@@ -55,7 +56,7 @@
55
56
  <script setup lang="ts">
56
57
  import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
57
58
  import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
58
- import type { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
59
+ import type {UI_I_MediatedDevice, UI_I_PciDevice} from '~/lib/models/store/vm/interfaces'
59
60
 
60
61
  const selectedType = defineModel<UI_I_OptionItem>('selectedType', {
61
62
  required: true,
@@ -73,6 +74,7 @@ const nvidiaGridProfile = defineModel<string>('nvidiaGridProfile', {
73
74
  const props = defineProps<{
74
75
  index: number
75
76
  passthroughDevices: UI_I_PciDevice[]
77
+ mediatedDevices: UI_I_MediatedDevice[]
76
78
  type: UI_T_PciDeviceType
77
79
  isRemovable: boolean
78
80
  label: string
@@ -3,27 +3,23 @@
3
3
  v-if="isNewView"
4
4
  v-model="model"
5
5
  :pci-device-index="props.pciDeviceIndex"
6
- :passthrough-devices="props.passthroughDevices"
7
6
  />
8
7
  <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io-old
9
8
  v-else
10
9
  v-model="model"
11
10
  :pci-device-index="props.pciDeviceIndex"
12
- :passthrough-devices="props.passthroughDevices"
13
11
  />
14
12
  </template>
15
13
 
16
14
  <script lang="ts" setup>
17
15
  import type {
18
16
  UI_I_ConfigureAllPciDevicesItem,
19
- UI_I_ConfigurePciDevicesTable,
20
17
  } from '~/lib/models/store/host/interfaces'
21
18
 
22
19
  const model = defineModel<UI_I_ConfigureAllPciDevicesItem>({required: true})
23
20
 
24
21
  const props = defineProps<{
25
22
  pciDeviceIndex: number
26
- passthroughDevices: UI_I_ConfigurePciDevicesTable
27
23
  }>()
28
24
 
29
25
  const { $store }: any = useNuxtApp()