bfg-common 1.4.734 → 1.4.799

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 (84) hide show
  1. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  2. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  3. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  4. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  5. package/assets/localization/local_be.json +2 -16
  6. package/assets/localization/local_en.json +2 -16
  7. package/assets/localization/local_hy.json +2 -16
  8. package/assets/localization/local_kk.json +2 -16
  9. package/assets/localization/local_ru.json +2 -16
  10. package/assets/localization/local_zh.json +2 -16
  11. package/components/atoms/select/TheSelect.vue +1 -10
  12. package/components/common/browse/blocks/lib/models/types.ts +1 -1
  13. package/components/common/browse/lib/models/interfaces.ts +5 -5
  14. package/components/common/{monitor/advanced/tools/chartOptionsModal → chartOptionsModal}/counters/timespan/form/Form.vue +544 -539
  15. package/components/common/{pages/hardwareHealth/historyTestimony/tools/chartOptionsModal → chartOptionsModal}/counters/timespan/form/lib/config/dateForm.ts +116 -115
  16. package/components/common/diagramMain/Header.vue +211 -211
  17. package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
  18. package/components/common/diagramMain/lib/config/initial.ts +50 -50
  19. package/components/common/diagramMain/lib/models/types.ts +21 -21
  20. package/components/common/diagramMain/lib/utils/utils.ts +331 -331
  21. package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +330 -330
  22. package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +40 -40
  23. package/components/common/diagramMain/modals/editSettings/EditSettings.vue +497 -497
  24. package/components/common/diagramMain/modals/editSettings/EditSettingsModal.vue +812 -812
  25. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +214 -214
  26. package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +189 -189
  27. package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +163 -163
  28. package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +175 -175
  29. package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +398 -398
  30. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +346 -346
  31. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +205 -205
  32. package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +23 -23
  33. package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
  34. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
  35. package/components/common/diagramMain/modals/lib/mappers/mappers.ts +87 -87
  36. package/components/common/diagramMain/modals/lib/utils/index.ts +24 -24
  37. package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
  38. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +169 -169
  39. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
  40. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +14 -14
  41. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
  42. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
  43. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
  44. package/components/common/diagramMain/port/Ports.vue +47 -47
  45. package/components/common/monitor/advanced/Advanced.vue +5 -0
  46. package/components/common/monitor/advanced/tools/Tools.vue +9 -2
  47. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +9 -2
  48. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +2 -0
  49. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +95 -93
  50. package/components/common/monitor/overview/filters/Filters.vue +3 -0
  51. package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +15 -5
  52. package/components/common/monitor/overview/filters/customIntervalModal/lib/config/dateChecker.ts +24 -14
  53. package/components/common/pages/hardwareHealth/HardwareHealth.vue +12 -5
  54. package/components/common/pages/hardwareHealth/historyTestimony/Graph.vue +456 -451
  55. package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +387 -380
  56. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +13 -6
  57. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/Counters.vue +94 -94
  58. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/Timespan.vue +66 -66
  59. package/components/common/pages/tasks/Tasks.vue +0 -9
  60. package/components/common/pages/tasks/table/Table.vue +1 -0
  61. package/components/common/pages/tasks/table/errorInfo/ErrorInfo.vue +6 -10
  62. package/components/common/pages/tasks/table/expandDetails/ExpandDetails.vue +8 -8
  63. package/components/common/vm/actions/add/Add.vue +0 -2
  64. package/components/common/vm/actions/clone/Clone.vue +0 -2
  65. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +0 -3
  66. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +0 -2
  67. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +0 -2
  68. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +1 -9
  69. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +2 -5
  70. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +1 -3
  71. package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +4 -6
  72. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +10 -52
  73. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceNew.vue +5 -31
  74. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceOld.vue +5 -31
  75. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +2 -9
  76. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options.ts +4 -11
  77. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionNew.vue +1 -1
  78. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionOld.vue +1 -1
  79. package/components/common/vm/actions/editSettings/EditSettings.vue +0 -3
  80. package/components/common/vm/actions/editSettings/EditSettingsOld.vue +0 -2
  81. package/components/common/vm/actions/editSettings/new/New.vue +0 -2
  82. package/package.json +3 -3
  83. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/lib/config/dateForm.ts +0 -114
  84. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/form/Form.vue +0 -539
@@ -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 || props.mediatedDevices">
142
+ <template v-if="props.passthroughDevices">
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,7 +147,6 @@
147
147
  :pci-device="item"
148
148
  :error-validation-fields="props.errorValidationFields"
149
149
  :passthrough-devices="props.passthroughDevices"
150
- :mediated-devices="props.mediatedDevices"
151
150
  :type="props.pciDevicesType[key]"
152
151
  :is-edit="props.isEdit"
153
152
  :state="props.state"
@@ -267,7 +266,6 @@ const props = defineProps<{
267
266
  usbController?: string
268
267
  guestMachineType?: UI_I_OptionItem | null
269
268
  passthroughDevices?: UI_I_PciDevice[]
270
- mediatedDevices?: any[]
271
269
  vmCpuHelpTextSecond?: string
272
270
  }>()
273
271
  const emits = defineEmits<{
@@ -339,8 +337,7 @@ const dropdownItems = computed<UI_I_Dropdown[]>(() =>
339
337
  dropdownItemsNewFunc(
340
338
  localization.value,
341
339
  props.state,
342
- props.passthroughDevices,
343
- props.mediatedDevices
340
+ props.passthroughDevices
344
341
  )
345
342
  )
346
343
 
@@ -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 || props.mediatedDevices">
102
+ <template v-if="props.passthroughDevices">
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,7 +107,6 @@
107
107
  :pci-device="item"
108
108
  :error-validation-fields="props.errorValidationFields"
109
109
  :passthrough-devices="props.passthroughDevices"
110
- :mediated-devices="props.mediatedDevices"
111
110
  :type="props.pciDevicesType[key]"
112
111
  :is-edit="props.isEdit"
113
112
  :state="props.state"
@@ -221,7 +220,6 @@ const props = defineProps<{
221
220
  usbController?: string
222
221
  guestMachineType?: UI_I_OptionItem | null
223
222
  passthroughDevices?: UI_I_PciDevice[]
224
- mediatedDevices?: any[]
225
223
  vmCpuHelpTextSecond?: string
226
224
  }>()
227
225
  const emits = defineEmits<{
@@ -6,8 +6,7 @@ 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[],
10
- mediatedDevices?: any[]
9
+ passthroughDevices?: UI_I_PciDevice[]
11
10
  ): UI_I_DropdownTreeItem[] => {
12
11
  const { $text } = useNuxtApp()
13
12
 
@@ -52,7 +51,7 @@ export const dropdownItemsFunc = (
52
51
  {
53
52
  text: 'PCI Device',
54
53
  value: 10,
55
- disabled: state === 2 || (!passthroughDevices?.length && !mediatedDevices?.length),
54
+ disabled: state === 2 || !passthroughDevices?.length,
56
55
  testId: 'pci-device',
57
56
  },
58
57
  // { text: 'Watchdog Timer', value: 11 },
@@ -76,8 +75,7 @@ export const dropdownItemsFunc = (
76
75
  export const dropdownItemsNewFunc = (
77
76
  localization: UI_I_Localization,
78
77
  state: string | number | undefined,
79
- passthroughDevices?: UI_I_PciDevice[],
80
- mediatedDevices?: any
78
+ passthroughDevices?: UI_I_PciDevice[]
81
79
  ): UI_I_Dropdown[] => {
82
80
  const { $text } = useNuxtApp()
83
81
 
@@ -126,7 +124,7 @@ export const dropdownItemsNewFunc = (
126
124
  {
127
125
  text: 'PCI Device',
128
126
  value: 10,
129
- disabled: state === 2 || (!passthroughDevices?.length && !mediatedDevices?.length),
127
+ disabled: state === 2 || !passthroughDevices?.length,
130
128
  testId: 'pci-device',
131
129
  },
132
130
  // { text: 'Watchdog Timer', value: 11 },
@@ -7,7 +7,6 @@
7
7
  v-model:nvidia-grid-profile="nvidiaGridProfile"
8
8
  :index="props.index"
9
9
  :passthrough-devices="props.passthroughDevices"
10
- :mediated-devices="props.mediatedDevices"
11
10
  :type="props.type"
12
11
  :is-removable="isRemovable"
13
12
  :label="label"
@@ -23,7 +22,6 @@
23
22
  v-model:nvidia-grid-profile="nvidiaGridProfile"
24
23
  :index="props.index"
25
24
  :passthrough-devices="props.passthroughDevices"
26
- :mediated-devices="props.mediatedDevices"
27
25
  :type="props.type"
28
26
  :is-removable="isRemovable"
29
27
  :label="label"
@@ -39,13 +37,12 @@ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
39
37
  import type { UI_I_SendDataNewPciDevice } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
40
38
  import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
41
39
  import type { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
42
- import { pciDeviceTypeOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options'
40
+ import { pciDeviceTypeOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options'
43
41
 
44
42
  const props = defineProps<{
45
43
  index: number
46
44
  pciDevice: UI_I_SendDataNewPciDevice
47
45
  passthroughDevices: UI_I_PciDevice[]
48
- mediatedDevices: any[]
49
46
  type: UI_T_PciDeviceType
50
47
  isEdit: boolean
51
48
  state?: string | number
@@ -87,54 +84,26 @@ const selectedLabel = computed<string>(() => {
87
84
  }
88
85
  })
89
86
 
90
- const pciDeviceTypeOptions = ref<UI_I_OptionItem[]>(
91
- pciDeviceTypeOptionsFunc(
92
- !props.passthroughDevices.length,
93
- !props.mediatedDevices.length
94
- )
95
- )
96
- const selectedType = ref<UI_I_OptionItem>(pciDeviceTypeOptions.value[0])
97
- pciDeviceTypeOptions.value.forEach((option) => {
98
- if (!option.disabled) selectedType.value = option
99
- })
87
+ const pciDeviceTypeOptions = ref<UI_I_OptionItem[]>(pciDeviceTypeOptionsConfig)
88
+ const selectedType = ref<UI_I_OptionItem>(pciDeviceTypeOptionsConfig[0])
100
89
 
101
90
  const directPathIo = ref<UI_I_PciDevice>(props.passthroughDevices[0])
102
91
  const dynamicDirectPathIo = ref<string>('')
103
- const nvidiaGridProfile = ref<any>(props.mediatedDevices[0]?.value)
92
+ const nvidiaGridProfile = ref<string>('')
104
93
 
105
94
  watch(
106
- [() => props.pciDevice, () => props.mediatedDevices],
107
- ([newValue1]) => {
95
+ props.pciDevice,
96
+ (newValue) => {
108
97
  // const passthroughDevice = props.passthroughDevices.find(
109
98
  // (item) => item.address === newValue.address
110
99
  // )
111
100
  // passthroughDevice && (directPathIo.value = passthroughDevice) // Todo change
112
- if (newValue1) {
113
- directPathIo.value = newValue1
114
- const mediatedDevice = props.mediatedDevices.find((device) => {
115
- return (
116
- device.profile_name + '_' + device.root_device ===
117
- newValue1.class_name + '_' + newValue1.address
118
- )
119
- })
120
- if (mediatedDevice) {
121
- nvidiaGridProfile.value = mediatedDevice.profile_name + '_' + mediatedDevice.root_device
122
-
123
- selectedType.value =
124
- pciDeviceTypeOptions.value.find(
125
- (option) => option.value === 'nvidia_grid'
126
- ) || selectedType.value
127
- }
128
- }
101
+ newValue && (directPathIo.value = newValue)
129
102
  },
130
- { immediate: true, deep: true }
103
+ { immediate: true }
131
104
  )
132
105
 
133
106
  const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
134
- const nvidea = props.mediatedDevices.find(
135
- (device) =>
136
- nvidiaGridProfile.value === device.profile_name + '_' + device.root_device
137
- )
138
107
  switch (selectedType.value.value) {
139
108
  case 'direct_path_io':
140
109
  return {
@@ -142,7 +111,6 @@ const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
142
111
  vendor_name: directPathIo.value.vendor_name,
143
112
  class_name: directPathIo.value.class_name,
144
113
  device_name: directPathIo.value.device_name,
145
- mediated_devices: false,
146
114
  }
147
115
  case 'dynamic_direct_path_io':
148
116
  return {
@@ -150,16 +118,6 @@ const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
150
118
  vendor_name: '',
151
119
  class_name: '',
152
120
  device_name: '',
153
- mediated_devices: false,
154
- }
155
- case 'nvidia_grid':
156
- return {
157
- address: nvidea?.root_device || '',
158
- vendor_name: '',
159
- class_name: nvidea?.profile_name || '',
160
- device_name: nvidea?.name || '',
161
- mediated_devices: true,
162
- mediated_devices_uuid: '',
163
121
  }
164
122
  default:
165
123
  return {
@@ -167,7 +125,6 @@ const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
167
125
  vendor_name: '',
168
126
  class_name: '',
169
127
  device_name: '',
170
- mediated_devices: false,
171
128
  }
172
129
  }
173
130
  })
@@ -181,4 +138,5 @@ watch(
181
138
  )
182
139
  </script>
183
140
 
184
- <style scoped lang="scss"></style>
141
+ <style scoped lang="scss">
142
+ </style>
@@ -27,47 +27,22 @@
27
27
  :pci-device-index="props.index"
28
28
  />
29
29
 
30
- <!-- v-show="selectedType.value === 'dynamic_direct_path_io'" -->
31
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
32
- v-show="selectedType.value === 'nvidia_grid'"
33
- v-model="nvidiaGridProfile"
34
- :pci-device-index="props.index"
35
- :mediated-devices="props.mediatedDevices"
36
- />
37
- <!-- v-show="selectedType.value === 'nvidia_grid'" -->
38
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
30
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
39
31
  v-show="selectedType.value === 'direct_path_io'"
40
32
  v-model="directPathIo"
41
33
  :pci-device-index="props.index"
34
+ :passthrough-devices="props.passthroughDevices"
42
35
  />
43
- <!-- v-show="selectedType.value === 'direct_path_io'" -->
44
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
36
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
45
37
  v-show="selectedType.value === 'dynamic_direct_path_io'"
46
38
  v-model="dynamicDirectPathIo"
47
39
  :pci-device-index="props.index"
48
- :passthrough-devices="props.passthroughDevices"
49
40
  />
50
-
51
- <!-- v-show="selectedType.value === 'dynamic_direct_path_io'" -->
52
- <!-- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
41
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
53
42
  v-show="selectedType.value === 'nvidia_grid'"
54
- v-model="dynamicDirectPathIo"
55
- :pci-device-index="props.index"
56
- :mediated-devices="props.mediatedDevices"
57
- /> -->
58
- <!-- v-show="selectedType.value === 'nvidia_grid'" -->
59
- <!-- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
60
- v-show="selectedType.value === 'direct_path_io'"
61
43
  v-model="nvidiaGridProfile"
62
44
  :pci-device-index="props.index"
63
- /> -->
64
- <!-- v-show="selectedType.value === 'direct_path_io'" -->
65
- <!-- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
66
- v-show="selectedType.value === 'dynamic_direct_path_io'"
67
- v-model="directPathIo"
68
- :pci-device-index="props.index"
69
- :passthrough-devices="props.passthroughDevices"
70
- /> -->
45
+ />
71
46
  </template>
72
47
 
73
48
  <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-note />
@@ -96,7 +71,6 @@ const nvidiaGridProfile = defineModel<string>('nvidiaGridProfile', {
96
71
  const props = defineProps<{
97
72
  index: number
98
73
  passthroughDevices: UI_I_PciDevice[]
99
- mediatedDevices: any[]
100
74
  type: UI_T_PciDeviceType
101
75
  isRemovable: boolean
102
76
  label: string
@@ -28,47 +28,22 @@
28
28
  :pci-device-index="props.index"
29
29
  />
30
30
 
31
- <!-- v-show="selectedType.value === 'dynamic_direct_path_io'" -->
32
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
33
- v-show="selectedType.value === 'nvidia_grid'"
34
- v-model="nvidiaGridProfile"
35
- :pci-device-index="props.index"
36
- :mediated-devices="props.mediatedDevices"
37
- />
38
- <!-- v-show="selectedType.value === 'nvidia_grid'" -->
39
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
31
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
40
32
  v-show="selectedType.value === 'direct_path_io'"
41
33
  v-model="directPathIo"
42
34
  :pci-device-index="props.index"
35
+ :passthrough-devices="props.passthroughDevices"
43
36
  />
44
- <!-- v-show="selectedType.value === 'direct_path_io'" -->
45
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
37
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
46
38
  v-show="selectedType.value === 'dynamic_direct_path_io'"
47
39
  v-model="dynamicDirectPathIo"
48
40
  :pci-device-index="props.index"
49
- :passthrough-devices="props.passthroughDevices"
50
41
  />
51
-
52
- <!-- v-show="selectedType.value === 'dynamic_direct_path_io'" -->
53
- <!-- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
42
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
54
43
  v-show="selectedType.value === 'nvidia_grid'"
55
- v-model="dynamicDirectPathIo"
56
- :pci-device-index="props.index"
57
- :mediated-devices="props.mediatedDevices"
58
- /> -->
59
- <!-- v-show="selectedType.value === 'nvidia_grid'" -->
60
- <!-- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
61
- v-show="selectedType.value === 'direct_path_io'"
62
44
  v-model="nvidiaGridProfile"
63
45
  :pci-device-index="props.index"
64
- /> -->
65
- <!-- v-show="selectedType.value === 'direct_path_io'" -->
66
- <!-- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
67
- v-show="selectedType.value === 'dynamic_direct_path_io'"
68
- v-model="directPathIo"
69
- :pci-device-index="props.index"
70
- :passthrough-devices="props.passthroughDevices"
71
- /> -->
46
+ />
72
47
  </template>
73
48
 
74
49
  <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-note />
@@ -98,7 +73,6 @@ const nvidiaGridProfile = defineModel<string>('nvidiaGridProfile', {
98
73
  const props = defineProps<{
99
74
  index: number
100
75
  passthroughDevices: UI_I_PciDevice[]
101
- mediatedDevices: any[]
102
76
  type: UI_T_PciDeviceType
103
77
  isRemovable: boolean
104
78
  label: string
@@ -15,25 +15,18 @@
15
15
 
16
16
  <script lang="ts" setup>
17
17
  import type { UI_I_Option } from '~/components/atoms/select/lib/models/interfaces'
18
- // import { optionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/lib/config/options'
18
+ import { optionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/lib/config/options'
19
19
 
20
20
  const model = defineModel<string>({required: true})
21
21
 
22
22
  const props = defineProps<{
23
23
  pciDeviceIndex: number
24
- mediatedDevices: any[]
25
24
  }>()
26
25
 
27
26
  const { $store }: any = useNuxtApp()
28
27
  const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
29
28
 
30
- // const options = ref<UI_I_Option[]>(optionsConfig)
31
- const options = ref<UI_I_Option[]>(props.mediatedDevices.map(device => {
32
- return {
33
- text: device.human_readable,
34
- value: device.profile_name + '_' + device.root_device
35
- }
36
- }))
29
+ const options = ref<UI_I_Option[]>(optionsConfig)
37
30
  model.value = '' + options.value[0].value
38
31
  </script>
39
32
 
@@ -1,14 +1,7 @@
1
1
  import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
2
2
 
3
- export const pciDeviceTypeOptionsFunc = (
4
- isDisabledDynamicDirectPathIo: boolean,
5
- isDisabledNvidiaGrid: boolean
6
- ): UI_I_OptionItem[] => [
7
- {
8
- text: 'Dynamic DP I/O',
9
- value: 'dynamic_direct_path_io',
10
- disabled: isDisabledDynamicDirectPathIo,
11
- },
12
- { text: 'GRID vGPU', value: 'nvidia_grid', disabled: isDisabledNvidiaGrid },
13
- { text: 'DP I/O', value: 'direct_path_io', disabled: true },
3
+ export const pciDeviceTypeOptionsConfig: UI_I_OptionItem[] = [
4
+ { text: 'DP I/O', value: 'direct_path_io' },
5
+ { text: 'Dynamic DP I/O', value: 'dynamic_direct_path_io' },
6
+ { text: 'GRID vGPU', value: 'nvidia_grid' },
14
7
  ]
@@ -8,7 +8,7 @@
8
8
  v-model="modelLocal"
9
9
  :value="item.value"
10
10
  :label="item.text"
11
- :disabled="item.disabled"
11
+ :disabled="!!index"
12
12
  :test-id="`pci-device-radio-input-${props.pciDeviceIndex}-${index}`"
13
13
  />
14
14
  </div>
@@ -13,7 +13,7 @@
13
13
  v-model="model"
14
14
  type="radio"
15
15
  :value="item"
16
- :disabled="item.disabled"
16
+ :disabled="!!index"
17
17
  :data-id="`pci-device-radio-input-${props.pciDeviceIndex}-${index}`"
18
18
  />
19
19
  <label
@@ -18,7 +18,6 @@
18
18
  :state="props.state"
19
19
  :vm-name-old="props.vmSettings?.name"
20
20
  :passthrough-devices="props.passthroughDevices"
21
- :mediated-devices="props.mediatedDevices"
22
21
  :get-datastore-table-func="props.getDatastoreTableFunc"
23
22
  :customize-hardware-submit="customizeHardwareSubmit"
24
23
  @hide="emits('hide')"
@@ -52,7 +51,6 @@
52
51
  :state="props.state"
53
52
  :vm-name-old="props.vmSettings?.name"
54
53
  :passthrough-devices="props.passthroughDevices"
55
- :mediated-devices="props.mediatedDevices"
56
54
  :get-datastore-table-func="props.getDatastoreTableFunc"
57
55
  :customize-hardware-submit="customizeHardwareSubmit"
58
56
  @hide="emits('hide')"
@@ -113,7 +111,6 @@ const props = defineProps<{
113
111
  getDatastoreTableFunc?: (payload: UI_I_TablePayload) => Promise<void>
114
112
  state?: string | number
115
113
  passthroughDevices?: UI_I_PciDevice[]
116
- mediatedDevices?: any[]
117
114
  capabilities?: UI_I_Capabilities
118
115
  }>()
119
116
 
@@ -46,7 +46,6 @@
46
46
  :error-validation-fields="props.errorValidationFields"
47
47
  :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
48
48
  :passthrough-devices="props.passthroughDevices"
49
- :mediated-devices="props.mediatedDevices"
50
49
  :state="props.state"
51
50
  :get-datastore-table-func="props.getDatastoreTableFunc"
52
51
  :datastore="props.datastore"
@@ -113,7 +112,6 @@ const props = defineProps<{
113
112
  state?: string | number
114
113
  vmNameOld?: string
115
114
  passthroughDevices?: UI_I_PciDevice[]
116
- mediatedDevices?: any[]
117
115
  getDatastoreTableFunc?: (payload: UI_I_TablePayload) => Promise<void>
118
116
  customizeHardwareSubmit?: null | Function
119
117
  }>()
@@ -48,7 +48,6 @@
48
48
  :error-validation-fields="props.errorValidationFields"
49
49
  :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
50
50
  :passthrough-devices="props.passthroughDevices"
51
- :mediated-devices="props.mediatedDevices"
52
51
  :state="props.state"
53
52
  :get-datastore-table-func="props.getDatastoreTableFunc"
54
53
  :datastore="props.datastore"
@@ -119,7 +118,6 @@ const props = defineProps<{
119
118
  state?: string | number
120
119
  vmNameOld?: string
121
120
  passthroughDevices?: UI_I_PciDevice[]
122
- mediatedDevices?: any[]
123
121
  getDatastoreTableFunc?: (payload: UI_I_TablePayload) => Promise<void>
124
122
  customizeHardwareSubmit?: null | Function
125
123
  }>()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.734",
4
+ "version": "1.4.799",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -34,8 +34,8 @@
34
34
  "@nuxtjs/eslint-config-typescript": "^12.0.0",
35
35
  "@vueuse/components": "^10.1.2",
36
36
  "date-fns": "^2.29.3",
37
- "bfg-nuxt-3-graph": "1.0.17",
38
- "bfg-uikit": "1.0.312",
37
+ "bfg-nuxt-3-graph": "1.0.15",
38
+ "bfg-uikit": "1.0.301",
39
39
  "html2canvas": "^1.4.1",
40
40
  "prettier-eslint": "^15.0.1"
41
41
  }
@@ -1,114 +0,0 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
3
- import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
4
-
5
- export const timespanFunc = (
6
- localization: UI_I_Localization
7
- ): UI_I_OptionItem[] => [
8
- {
9
- text: localization.inventoryMonitor.realTime,
10
- value: 'real_time',
11
- },
12
- {
13
- text: localization.inventoryMonitor.lastDay,
14
- value: 'last_day',
15
- },
16
- {
17
- text: localization.inventoryMonitor.lastWeek,
18
- value: 'last_week',
19
- },
20
- {
21
- text: localization.inventoryMonitor.lastMonth,
22
- value: 'last_month',
23
- },
24
- // {
25
- // text: localization.inventoryMonitor.lastYear,
26
- // value: 'last_year',
27
- // },
28
- {
29
- text: localization.inventoryMonitor.customInterval,
30
- value: 'custom_interval',
31
- },
32
- ]
33
-
34
- export const customTimeFunc = (
35
- localization: UI_I_Localization,
36
- value: number,
37
- lang: string
38
- ): UI_I_OptionItem[] => {
39
- const isLangRu = lang === 'ru_RU'
40
-
41
- const hourText = isLangRu
42
- ? getCorrectRuForm(value, 'hour')
43
- : localization.common.hours2
44
- const dayText = isLangRu
45
- ? getCorrectRuForm(value, 'day')
46
- : localization.common.days2
47
- const weekText = isLangRu
48
- ? getCorrectRuForm(value, 'week')
49
- : localization.common.weeks2
50
- const monthText = isLangRu
51
- ? getCorrectRuForm(value, 'month')
52
- : localization.common.months2
53
-
54
- return [
55
- {
56
- text: hourText,
57
- value: 'hours',
58
- },
59
- {
60
- text: dayText,
61
- value: 'days',
62
- },
63
- {
64
- text: weekText,
65
- value: 'weeks',
66
- },
67
- {
68
- text: monthText,
69
- value: 'months',
70
- },
71
- ]
72
- }
73
-
74
- export const chartTypeFunc = (
75
- localization: UI_I_Localization
76
- ): UI_I_OptionItem[] => [
77
- {
78
- text: localization.inventoryMonitor.lineGraph,
79
- value: 'line_graph',
80
- },
81
- {
82
- text: localization.inventoryMonitor.stackedGraph,
83
- value: 'stacked_graph',
84
- },
85
- ]
86
-
87
- const getCorrectRuForm = (value: number, type: string): string => {
88
- // TODO поправить используя correctRuUnit из плагина date
89
- const forms: UI_I_ArbitraryObject<string[]> = {
90
- hour: ['Час', 'Часа', 'Часов'],
91
- day: ['День', 'Дня', 'Дней'],
92
- week: ['Неделя', 'Недели', 'Недель'],
93
- month: ['Месяц', 'Месяца', 'Месяцев'],
94
- }
95
-
96
- let text: string
97
-
98
- if (!value) {
99
- return getCorrectRuForm[type]
100
- }
101
-
102
- if (value % 10 === 1 && value % 100 !== 11) {
103
- text = forms[type][0]
104
- } else if (
105
- [2, 3, 4].includes(value % 10) &&
106
- ![12, 13, 14].includes(value % 100)
107
- ) {
108
- text = forms[type][1]
109
- } else {
110
- text = forms[type][2]
111
- }
112
- getCorrectRuForm[type] = text
113
- return text
114
- }