bfg-common 1.5.701 → 1.5.702
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.
- package/assets/localization/local_be.json +2 -1
- package/assets/localization/local_en.json +2 -1
- package/assets/localization/local_hy.json +2 -1
- package/assets/localization/local_kk.json +2 -1
- package/assets/localization/local_ru.json +3 -2
- package/assets/localization/local_zh.json +2 -1
- package/components/common/layout/theHeader/modals/reconnect/ReconnectOld.vue +2 -0
- package/components/common/monitor/advanced/graphView/GraphView.vue +151 -151
- package/components/common/monitor/advanced/tools/Tools.vue +313 -313
- package/components/common/pages/files/lib/models/enums.ts +10 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +394 -394
- package/components/common/pages/hardwareHealth/tableView/TableView.vue +202 -202
- package/components/common/pages/hardwareHealth/tableView/lib/config/sensorTable.ts +165 -165
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/New.vue +0 -9
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/Old.vue +6 -13
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +0 -26
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces.ts +3 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/New.vue +7 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +9 -56
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/Old.vue +5 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIo.vue +1 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/New.vue +2 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/Old.vue +2 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/New.vue +1 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/Old.vue +1 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/New.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGrid.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/Old.vue +1 -1
- package/package.json +1 -1
- package/store/main/getters.ts +7 -7
|
@@ -1,165 +1,165 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
UI_I_HeadItem,
|
|
3
|
-
UI_I_ColumnKey,
|
|
4
|
-
UI_I_BodyItem,
|
|
5
|
-
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
6
|
-
import type { UI_I_Localization } from '~//lib/models/interfaces'
|
|
7
|
-
import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardwareHealth/tableView/lib/models/interfaces'
|
|
8
|
-
import { UI_E_SensorsCategoryIcon } from '~/components/common/pages/hardwareHealth/lib/models/enums'
|
|
9
|
-
import {
|
|
10
|
-
constructHeadItem,
|
|
11
|
-
constructColumnKey,
|
|
12
|
-
} from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
13
|
-
import { hardwareHealthSensorTableKeys } from '~/components/common/pages/hardwareHealth/tableView/lib/config/tableKeys'
|
|
14
|
-
import {
|
|
15
|
-
sensorsLocalizationByStatus,
|
|
16
|
-
sensorsIconByStatus,
|
|
17
|
-
} from '~/components/common/pages/hardwareHealth/lib/config/status'
|
|
18
|
-
|
|
19
|
-
const getItems = (
|
|
20
|
-
localization: UI_I_Localization
|
|
21
|
-
): [string, boolean, string, string][] => {
|
|
22
|
-
return [
|
|
23
|
-
[
|
|
24
|
-
localization.common.sensors,
|
|
25
|
-
true,
|
|
26
|
-
'330px',
|
|
27
|
-
hardwareHealthSensorTableKeys[0],
|
|
28
|
-
],
|
|
29
|
-
[
|
|
30
|
-
localization.common.status,
|
|
31
|
-
true,
|
|
32
|
-
'180px',
|
|
33
|
-
hardwareHealthSensorTableKeys[1],
|
|
34
|
-
],
|
|
35
|
-
[
|
|
36
|
-
localization.common.reading,
|
|
37
|
-
true,
|
|
38
|
-
'115px',
|
|
39
|
-
hardwareHealthSensorTableKeys[2],
|
|
40
|
-
],
|
|
41
|
-
[
|
|
42
|
-
localization.common.categories,
|
|
43
|
-
true,
|
|
44
|
-
'130px',
|
|
45
|
-
hardwareHealthSensorTableKeys[3],
|
|
46
|
-
],
|
|
47
|
-
[
|
|
48
|
-
localization.common.lastUpdated,
|
|
49
|
-
true,
|
|
50
|
-
'195px',
|
|
51
|
-
hardwareHealthSensorTableKeys[4],
|
|
52
|
-
],
|
|
53
|
-
[localization.common.path, true, '195px', hardwareHealthSensorTableKeys[5]],
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
export const columnKeys = (
|
|
57
|
-
localization: UI_I_Localization
|
|
58
|
-
): UI_I_ColumnKey[] => {
|
|
59
|
-
const result: UI_I_ColumnKey[] = []
|
|
60
|
-
getItems(localization).forEach((item, i) => {
|
|
61
|
-
const col = i === 1 || i === 3 ? 'icon' : `col${i}`
|
|
62
|
-
result.push(
|
|
63
|
-
constructColumnKey(col, item[0], item[1], `show-column-${item[3]}`)
|
|
64
|
-
)
|
|
65
|
-
})
|
|
66
|
-
return result
|
|
67
|
-
}
|
|
68
|
-
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
69
|
-
const result: UI_I_HeadItem[] = []
|
|
70
|
-
getItems(localization).forEach((item, i) => {
|
|
71
|
-
const col = i === 1 || i === 3 ? 'icon' : `col${i}`
|
|
72
|
-
result.push(
|
|
73
|
-
constructHeadItem(
|
|
74
|
-
col,
|
|
75
|
-
item[0],
|
|
76
|
-
item[3],
|
|
77
|
-
true,
|
|
78
|
-
item[2],
|
|
79
|
-
undefined,
|
|
80
|
-
item[3]
|
|
81
|
-
)
|
|
82
|
-
)
|
|
83
|
-
})
|
|
84
|
-
return result
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export const bodyItems = (
|
|
88
|
-
data: UI_I_HardwareHealthSensors[],
|
|
89
|
-
localization: UI_I_Localization
|
|
90
|
-
): UI_I_BodyItem[][] => {
|
|
91
|
-
const bodyItems: UI_I_BodyItem[][] = []
|
|
92
|
-
|
|
93
|
-
const { $formattedDatetime }: any = useNuxtApp()
|
|
94
|
-
|
|
95
|
-
data.forEach((sensor: UI_I_HardwareHealthSensors, key) => {
|
|
96
|
-
const statusData = {
|
|
97
|
-
iconClassName: sensorsIconByStatus[sensor.status],
|
|
98
|
-
isSprite: false,
|
|
99
|
-
warning: sensor.warning,
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const lastUpdate = sensor[hardwareHealthSensorTableKeys[4]]
|
|
103
|
-
const currentLastUpdate =
|
|
104
|
-
typeof lastUpdate === 'number'
|
|
105
|
-
? $formattedDatetime(lastUpdate, {
|
|
106
|
-
hasSeconds: true,
|
|
107
|
-
separator: ', ',
|
|
108
|
-
})
|
|
109
|
-
: lastUpdate
|
|
110
|
-
|
|
111
|
-
bodyItems.push([
|
|
112
|
-
// {
|
|
113
|
-
// data,
|
|
114
|
-
// key: 'col0',
|
|
115
|
-
// text: sensor[hardwareHealthSensorTableKeys[0]],
|
|
116
|
-
// id: key,
|
|
117
|
-
// isShowToggleIcon: !!sensor.sel_entries?.length,
|
|
118
|
-
// },
|
|
119
|
-
{
|
|
120
|
-
key: 'col0',
|
|
121
|
-
text: sensor[hardwareHealthSensorTableKeys[0]],
|
|
122
|
-
id: key,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
key: 'icon',
|
|
126
|
-
text: localization.common[
|
|
127
|
-
sensorsLocalizationByStatus[sensor[hardwareHealthSensorTableKeys[1]]]
|
|
128
|
-
],
|
|
129
|
-
id: key,
|
|
130
|
-
data: statusData,
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
key: 'col2',
|
|
134
|
-
text: sensor[hardwareHealthSensorTableKeys[2]],
|
|
135
|
-
id: key,
|
|
136
|
-
},
|
|
137
|
-
// {
|
|
138
|
-
// key: 'icon',
|
|
139
|
-
// text: sensor[hardwareHealthSensorTableKeys[4]]?.length,
|
|
140
|
-
// id: key,
|
|
141
|
-
// },
|
|
142
|
-
{
|
|
143
|
-
key: 'icon',
|
|
144
|
-
text: sensor[hardwareHealthSensorTableKeys[3]],
|
|
145
|
-
id: key,
|
|
146
|
-
data: {
|
|
147
|
-
iconClassName:
|
|
148
|
-
UI_E_SensorsCategoryIcon[sensor.category.toLowerCase()],
|
|
149
|
-
isSprite: true,
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
key: 'col4',
|
|
154
|
-
text: currentLastUpdate,
|
|
155
|
-
id: key,
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
key: 'col5',
|
|
159
|
-
text: sensor[hardwareHealthSensorTableKeys[5]],
|
|
160
|
-
id: key,
|
|
161
|
-
},
|
|
162
|
-
])
|
|
163
|
-
})
|
|
164
|
-
return bodyItems
|
|
165
|
-
}
|
|
1
|
+
import type {
|
|
2
|
+
UI_I_HeadItem,
|
|
3
|
+
UI_I_ColumnKey,
|
|
4
|
+
UI_I_BodyItem,
|
|
5
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
6
|
+
import type { UI_I_Localization } from '~//lib/models/interfaces'
|
|
7
|
+
import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardwareHealth/tableView/lib/models/interfaces'
|
|
8
|
+
import { UI_E_SensorsCategoryIcon } from '~/components/common/pages/hardwareHealth/lib/models/enums'
|
|
9
|
+
import {
|
|
10
|
+
constructHeadItem,
|
|
11
|
+
constructColumnKey,
|
|
12
|
+
} from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
13
|
+
import { hardwareHealthSensorTableKeys } from '~/components/common/pages/hardwareHealth/tableView/lib/config/tableKeys'
|
|
14
|
+
import {
|
|
15
|
+
sensorsLocalizationByStatus,
|
|
16
|
+
sensorsIconByStatus,
|
|
17
|
+
} from '~/components/common/pages/hardwareHealth/lib/config/status'
|
|
18
|
+
|
|
19
|
+
const getItems = (
|
|
20
|
+
localization: UI_I_Localization
|
|
21
|
+
): [string, boolean, string, string][] => {
|
|
22
|
+
return [
|
|
23
|
+
[
|
|
24
|
+
localization.common.sensors,
|
|
25
|
+
true,
|
|
26
|
+
'330px',
|
|
27
|
+
hardwareHealthSensorTableKeys[0],
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
localization.common.status,
|
|
31
|
+
true,
|
|
32
|
+
'180px',
|
|
33
|
+
hardwareHealthSensorTableKeys[1],
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
localization.common.reading,
|
|
37
|
+
true,
|
|
38
|
+
'115px',
|
|
39
|
+
hardwareHealthSensorTableKeys[2],
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
localization.common.categories,
|
|
43
|
+
true,
|
|
44
|
+
'130px',
|
|
45
|
+
hardwareHealthSensorTableKeys[3],
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
localization.common.lastUpdated,
|
|
49
|
+
true,
|
|
50
|
+
'195px',
|
|
51
|
+
hardwareHealthSensorTableKeys[4],
|
|
52
|
+
],
|
|
53
|
+
[localization.common.path, true, '195px', hardwareHealthSensorTableKeys[5]],
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
export const columnKeys = (
|
|
57
|
+
localization: UI_I_Localization
|
|
58
|
+
): UI_I_ColumnKey[] => {
|
|
59
|
+
const result: UI_I_ColumnKey[] = []
|
|
60
|
+
getItems(localization).forEach((item, i) => {
|
|
61
|
+
const col = i === 1 || i === 3 ? 'icon' : `col${i}`
|
|
62
|
+
result.push(
|
|
63
|
+
constructColumnKey(col, item[0], item[1], `show-column-${item[3]}`)
|
|
64
|
+
)
|
|
65
|
+
})
|
|
66
|
+
return result
|
|
67
|
+
}
|
|
68
|
+
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
69
|
+
const result: UI_I_HeadItem[] = []
|
|
70
|
+
getItems(localization).forEach((item, i) => {
|
|
71
|
+
const col = i === 1 || i === 3 ? 'icon' : `col${i}`
|
|
72
|
+
result.push(
|
|
73
|
+
constructHeadItem(
|
|
74
|
+
col,
|
|
75
|
+
item[0],
|
|
76
|
+
item[3],
|
|
77
|
+
true,
|
|
78
|
+
item[2],
|
|
79
|
+
undefined,
|
|
80
|
+
item[3]
|
|
81
|
+
)
|
|
82
|
+
)
|
|
83
|
+
})
|
|
84
|
+
return result
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const bodyItems = (
|
|
88
|
+
data: UI_I_HardwareHealthSensors[],
|
|
89
|
+
localization: UI_I_Localization
|
|
90
|
+
): UI_I_BodyItem[][] => {
|
|
91
|
+
const bodyItems: UI_I_BodyItem[][] = []
|
|
92
|
+
|
|
93
|
+
const { $formattedDatetime }: any = useNuxtApp()
|
|
94
|
+
|
|
95
|
+
data.forEach((sensor: UI_I_HardwareHealthSensors, key) => {
|
|
96
|
+
const statusData = {
|
|
97
|
+
iconClassName: sensorsIconByStatus[sensor.status],
|
|
98
|
+
isSprite: false,
|
|
99
|
+
warning: sensor.warning,
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const lastUpdate = sensor[hardwareHealthSensorTableKeys[4]]
|
|
103
|
+
const currentLastUpdate =
|
|
104
|
+
typeof lastUpdate === 'number'
|
|
105
|
+
? $formattedDatetime(lastUpdate, {
|
|
106
|
+
hasSeconds: true,
|
|
107
|
+
separator: ', ',
|
|
108
|
+
})
|
|
109
|
+
: lastUpdate
|
|
110
|
+
|
|
111
|
+
bodyItems.push([
|
|
112
|
+
// {
|
|
113
|
+
// data,
|
|
114
|
+
// key: 'col0',
|
|
115
|
+
// text: sensor[hardwareHealthSensorTableKeys[0]],
|
|
116
|
+
// id: key,
|
|
117
|
+
// isShowToggleIcon: !!sensor.sel_entries?.length,
|
|
118
|
+
// },
|
|
119
|
+
{
|
|
120
|
+
key: 'col0',
|
|
121
|
+
text: sensor[hardwareHealthSensorTableKeys[0]],
|
|
122
|
+
id: key,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
key: 'icon',
|
|
126
|
+
text: localization.common[
|
|
127
|
+
sensorsLocalizationByStatus[sensor[hardwareHealthSensorTableKeys[1]]]
|
|
128
|
+
],
|
|
129
|
+
id: key,
|
|
130
|
+
data: statusData,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
key: 'col2',
|
|
134
|
+
text: sensor[hardwareHealthSensorTableKeys[2]],
|
|
135
|
+
id: key,
|
|
136
|
+
},
|
|
137
|
+
// {
|
|
138
|
+
// key: 'icon',
|
|
139
|
+
// text: sensor[hardwareHealthSensorTableKeys[4]]?.length,
|
|
140
|
+
// id: key,
|
|
141
|
+
// },
|
|
142
|
+
{
|
|
143
|
+
key: 'icon',
|
|
144
|
+
text: sensor[hardwareHealthSensorTableKeys[3]],
|
|
145
|
+
id: key,
|
|
146
|
+
data: {
|
|
147
|
+
iconClassName:
|
|
148
|
+
UI_E_SensorsCategoryIcon[sensor.category.toLowerCase()],
|
|
149
|
+
isSprite: true,
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
key: 'col4',
|
|
154
|
+
text: currentLastUpdate,
|
|
155
|
+
id: key,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
key: 'col5',
|
|
159
|
+
text: sensor[hardwareHealthSensorTableKeys[5]],
|
|
160
|
+
id: key,
|
|
161
|
+
},
|
|
162
|
+
])
|
|
163
|
+
})
|
|
164
|
+
return bodyItems
|
|
165
|
+
}
|
|
@@ -270,20 +270,12 @@
|
|
|
270
270
|
v-model:mediated_device_uuid="item.mediated_device_uuid"
|
|
271
271
|
:key="props.pciDevicesIndex[key]"
|
|
272
272
|
:index="props.pciDevicesIndex[key]"
|
|
273
|
-
:error-validation-fields="props.errorValidationFields"
|
|
274
273
|
:passthrough-devices="props.passthroughDevices"
|
|
275
274
|
:mediated-devices="props.mediatedDevices"
|
|
276
275
|
:type="props.pciDevicesType[key]"
|
|
277
276
|
:is-edit="props.isEdit"
|
|
278
277
|
:state="props.state"
|
|
279
278
|
@remove="emits('remove-pci-device', props.pciDevicesIndex[key])"
|
|
280
|
-
@invalid="
|
|
281
|
-
emits('set-invalid-pci-device', [
|
|
282
|
-
$event,
|
|
283
|
-
props.pciDevicesIndex[key],
|
|
284
|
-
])
|
|
285
|
-
"
|
|
286
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
287
279
|
/>
|
|
288
280
|
</template>
|
|
289
281
|
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card
|
|
@@ -432,7 +424,6 @@ const emits = defineEmits<{
|
|
|
432
424
|
(event: 'set-invalid-hard-disk', value: [boolean, number]): void
|
|
433
425
|
(event: 'remove-error-by-title', value: string): void
|
|
434
426
|
(event: 'roll-back-cd-dvd-drive', value: number): void
|
|
435
|
-
(event: 'set-invalid-pci-device', value: [boolean, number]): void
|
|
436
427
|
(event: 'get-active-device-child', value: UI_I_FileTreeNode): void
|
|
437
428
|
(
|
|
438
429
|
event: 'send-data-new-cd-dvd-drive-method',
|
|
@@ -250,20 +250,12 @@
|
|
|
250
250
|
v-model:mediated-device-uuid="item.mediated_device_uuid"
|
|
251
251
|
:key="props.pciDevicesIndex[key]"
|
|
252
252
|
:index="props.pciDevicesIndex[key]"
|
|
253
|
-
:error-validation-fields="props.errorValidationFields"
|
|
254
253
|
:passthrough-devices="props.passthroughDevices"
|
|
255
254
|
:mediated-devices="props.mediatedDevices"
|
|
256
255
|
:type="props.pciDevicesType[key]"
|
|
257
256
|
:is-edit="props.isEdit"
|
|
258
257
|
:state="props.state"
|
|
259
258
|
@remove="emits('remove-pci-device', props.pciDevicesIndex[key])"
|
|
260
|
-
@invalid="
|
|
261
|
-
emits('set-invalid-pci-device', [
|
|
262
|
-
$event,
|
|
263
|
-
props.pciDevicesIndex[key],
|
|
264
|
-
])
|
|
265
|
-
"
|
|
266
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
267
259
|
/>
|
|
268
260
|
</template>
|
|
269
261
|
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card
|
|
@@ -312,8 +304,10 @@ import type {
|
|
|
312
304
|
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
313
305
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
314
306
|
import type {
|
|
307
|
+
UI_T_CdDvdType,
|
|
315
308
|
UI_T_HardDiskType,
|
|
316
309
|
UI_T_NetworkType,
|
|
310
|
+
UI_T_PciDeviceType,
|
|
317
311
|
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
|
|
318
312
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
319
313
|
import type {
|
|
@@ -355,10 +349,10 @@ const props = withDefaults(
|
|
|
355
349
|
hardDisksType: UI_T_HardDiskType[]
|
|
356
350
|
networksIndex: number[]
|
|
357
351
|
hardDisksIndex: number[]
|
|
358
|
-
pciDevicesType:
|
|
352
|
+
pciDevicesType: UI_T_PciDeviceType[]
|
|
359
353
|
isShowFileModal: boolean
|
|
360
354
|
pciDevicesIndex: number[]
|
|
361
|
-
cdDvdDrivesType:
|
|
355
|
+
cdDvdDrivesType: UI_T_CdDvdType[]
|
|
362
356
|
cdDvdDrivesIndex: number[]
|
|
363
357
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
364
358
|
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
@@ -377,8 +371,8 @@ const props = withDefaults(
|
|
|
377
371
|
state: undefined,
|
|
378
372
|
videoCard: undefined,
|
|
379
373
|
guestMachineType: undefined,
|
|
380
|
-
passthroughDevices:
|
|
381
|
-
mediatedDevices:
|
|
374
|
+
passthroughDevices: () => [],
|
|
375
|
+
mediatedDevices: () => [],
|
|
382
376
|
vmCpuHelpTextSecond: undefined,
|
|
383
377
|
computeResource: undefined,
|
|
384
378
|
}
|
|
@@ -403,7 +397,6 @@ const emits = defineEmits<{
|
|
|
403
397
|
(event: 'set-invalid-hard-disk', value: [boolean, number]): void
|
|
404
398
|
(event: 'remove-error-by-title', value: string): void
|
|
405
399
|
(event: 'roll-back-cd-dvd-drive', value: number): void
|
|
406
|
-
(event: 'set-invalid-pci-device', value: [boolean, number]): void
|
|
407
400
|
(event: 'get-active-device-child', value: UI_I_FileTreeNode): void
|
|
408
401
|
(
|
|
409
402
|
event: 'send-data-new-cd-dvd-drive-method',
|
package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue
CHANGED
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
@set-invalid-hard-disk="onSetInvalidHardDisk(...$event)"
|
|
54
54
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
55
55
|
@roll-back-cd-dvd-drive="onRollBackCdDvdDrive"
|
|
56
|
-
@set-invalid-pci-device="onSetInvalidPciDevice(...$event)"
|
|
57
56
|
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
58
57
|
@send-data-new-hard-disk-method="onSendDataNewHardDiskMethod(...$event)"
|
|
59
58
|
@send-data-new-cd-dvd-drive-method="sendDataNewCdDvdDriveMethod(...$event)"
|
|
@@ -571,13 +570,6 @@ const onRemovePciDevice = (index: number): void => {
|
|
|
571
570
|
model.value.passthrough_pci_devices.filter((_pciDevice, key: number) => {
|
|
572
571
|
return removeIndex !== key
|
|
573
572
|
})
|
|
574
|
-
// pciDevicesLocal.value = pciDevicesLocal.value.filter(
|
|
575
|
-
// (_pciDevice, key: number) => {
|
|
576
|
-
// return removeIndex !== key
|
|
577
|
-
// }
|
|
578
|
-
// )
|
|
579
|
-
|
|
580
|
-
delete newPciDeviceInvalidKeys.value[index]
|
|
581
573
|
}
|
|
582
574
|
|
|
583
575
|
const isShowFileModal = ref<boolean>(false)
|
|
@@ -633,15 +625,10 @@ const onSetInvalidNetwork = (invalid: boolean, key: number): void => {
|
|
|
633
625
|
newNetworkInvalidKeys.value[key] = invalid
|
|
634
626
|
}
|
|
635
627
|
|
|
636
|
-
const onSetInvalidPciDevice = (invalid: boolean, key: number): void => {
|
|
637
|
-
newPciDeviceInvalidKeys.value[key] = invalid
|
|
638
|
-
}
|
|
639
|
-
|
|
640
628
|
const memoryInvalid = ref<boolean>(false)
|
|
641
629
|
const videoCardInvalid = ref<boolean>(false)
|
|
642
630
|
const newHardDiskInvalidKeys = ref<UI_I_InvalidKeys>({})
|
|
643
631
|
const newNetworkInvalidKeys = ref<UI_I_InvalidKeys>({})
|
|
644
|
-
const newPciDeviceInvalidKeys = ref<UI_I_InvalidKeys>({})
|
|
645
632
|
|
|
646
633
|
watch(
|
|
647
634
|
[
|
|
@@ -649,7 +636,6 @@ watch(
|
|
|
649
636
|
memoryInvalid,
|
|
650
637
|
newHardDiskInvalidKeys,
|
|
651
638
|
newNetworkInvalidKeys,
|
|
652
|
-
newPciDeviceInvalidKeys,
|
|
653
639
|
videoCardInvalid,
|
|
654
640
|
],
|
|
655
641
|
() => {
|
|
@@ -682,18 +668,6 @@ watch(
|
|
|
682
668
|
' ' +
|
|
683
669
|
(+key + 1)
|
|
684
670
|
})
|
|
685
|
-
// let pciDevice = ''
|
|
686
|
-
// Object.keys(newPciDeviceInvalidKeys.value).forEach((key) => {
|
|
687
|
-
// if (!newPciDeviceInvalidKeys.value[+key]) {
|
|
688
|
-
// return
|
|
689
|
-
// }
|
|
690
|
-
//
|
|
691
|
-
// pciDevice +=
|
|
692
|
-
// (pciDevice ? ', ' : '') +
|
|
693
|
-
// localization.value.common.pciDevice +
|
|
694
|
-
// ' ' +
|
|
695
|
-
// (+key + 1)
|
|
696
|
-
// })
|
|
697
671
|
|
|
698
672
|
emits('invalid', [cpu, memory, newHardDisk, newNetwork, videoCard])
|
|
699
673
|
},
|
|
@@ -105,9 +105,11 @@ export interface UI_I_SendDataNewCdDvdDrive {
|
|
|
105
105
|
}
|
|
106
106
|
export interface UI_I_SendDataNewPciDevice {
|
|
107
107
|
address: string
|
|
108
|
+
vendor_name: string
|
|
108
109
|
class_name: string
|
|
109
110
|
device_name: string
|
|
110
|
-
|
|
111
|
+
mediated_device: boolean
|
|
112
|
+
mediated_device_uuid?: string
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
export interface UI_I_HardDisk {
|
package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/New.vue
CHANGED
|
@@ -46,12 +46,15 @@
|
|
|
46
46
|
/>
|
|
47
47
|
</template>
|
|
48
48
|
|
|
49
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-note
|
|
49
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-note
|
|
50
|
+
:pci-device-index="props.index"
|
|
51
|
+
/>
|
|
50
52
|
</template>
|
|
51
53
|
</ui-stack-block>
|
|
52
54
|
</template>
|
|
53
55
|
|
|
54
56
|
<script setup lang="ts">
|
|
57
|
+
import type { UI_I_Option } from '~/components/atoms/select/lib/models/interfaces'
|
|
55
58
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
56
59
|
import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
|
|
57
60
|
import type {
|
|
@@ -62,13 +65,13 @@ import type {
|
|
|
62
65
|
const selectedType = defineModel<UI_I_OptionItem>('selectedType', {
|
|
63
66
|
required: true,
|
|
64
67
|
})
|
|
65
|
-
const directPathIo = defineModel<
|
|
68
|
+
const directPathIo = defineModel<string>('directPathIo', {
|
|
66
69
|
required: true,
|
|
67
70
|
})
|
|
68
|
-
const dynamicDirectPathIo = defineModel<
|
|
71
|
+
const dynamicDirectPathIo = defineModel<UI_I_PciDevice>('dynamicDirectPathIo', {
|
|
69
72
|
required: true,
|
|
70
73
|
})
|
|
71
|
-
const nvidiaGridProfile = defineModel<
|
|
74
|
+
const nvidiaGridProfile = defineModel<UI_I_Option | null>('nvidiaGridProfile', {
|
|
72
75
|
required: true,
|
|
73
76
|
})
|
|
74
77
|
|
|
@@ -33,7 +33,7 @@ const address = defineModel<string>('address')
|
|
|
33
33
|
const vendorName = defineModel<string>('vendorName')
|
|
34
34
|
const className = defineModel<string>('className')
|
|
35
35
|
const deviceName = defineModel<string>('deviceName')
|
|
36
|
-
const mediatedDevice = defineModel<
|
|
36
|
+
const mediatedDevice = defineModel<boolean>('mediatedDevice')
|
|
37
37
|
const mediatedDeviceUuid = defineModel<string>('mediatedDeviceUuid')
|
|
38
38
|
|
|
39
39
|
const props = withDefaults(
|
|
@@ -44,7 +44,6 @@ const props = withDefaults(
|
|
|
44
44
|
type: UI_T_PciDeviceType
|
|
45
45
|
isEdit: boolean
|
|
46
46
|
state?: string | number
|
|
47
|
-
// errorValidationFields: UI_I_ErrorValidationField<string>[]
|
|
48
47
|
}>(),
|
|
49
48
|
{
|
|
50
49
|
state: undefined,
|
|
@@ -69,7 +68,8 @@ const isRunning = computed<boolean>(() => {
|
|
|
69
68
|
})
|
|
70
69
|
|
|
71
70
|
const isRemovable = computed<boolean>(() => {
|
|
72
|
-
return !props.isEdit || !isRunning.value
|
|
71
|
+
// return !props.isEdit || !isRunning.value
|
|
72
|
+
return props.type !== 'edit' || !isRunning.value
|
|
73
73
|
})
|
|
74
74
|
|
|
75
75
|
const label = computed<string>(() => {
|
|
@@ -85,11 +85,12 @@ const selectedLabel = computed<string>(() => {
|
|
|
85
85
|
}
|
|
86
86
|
switch (selectedType.value.value) {
|
|
87
87
|
case 'direct_path_io':
|
|
88
|
-
return
|
|
88
|
+
return directPathIo.value
|
|
89
|
+
// return `${directPathIo.value?.address} | ${directPathIo.value?.device_name}`
|
|
89
90
|
case 'dynamic_direct_path_io':
|
|
90
91
|
return `${dynamicDirectPathIo.value?.address} | ${dynamicDirectPathIo.value?.device_name}`
|
|
91
92
|
default:
|
|
92
|
-
return nvidiaGridProfile.value?.text
|
|
93
|
+
return nvidiaGridProfile.value?.text || ''
|
|
93
94
|
}
|
|
94
95
|
})
|
|
95
96
|
|
|
@@ -104,16 +105,11 @@ pciDeviceTypeOptions.value.forEach((option) => {
|
|
|
104
105
|
if (!option.disabled) selectedType.value = option
|
|
105
106
|
})
|
|
106
107
|
|
|
107
|
-
const directPathIo = ref<string>('')
|
|
108
|
+
const directPathIo = ref<string>('')
|
|
108
109
|
const dynamicDirectPathIo = ref<UI_I_PciDevice>(props.passthroughDevices[0])
|
|
109
110
|
const nvidiaGridProfile = ref<UI_I_Option | null>(null)
|
|
110
111
|
|
|
111
|
-
const
|
|
112
|
-
// const passthroughDevice = props.passthroughDevices.find(
|
|
113
|
-
// (item) => item.address === newValue.address
|
|
114
|
-
// )
|
|
115
|
-
// passthroughDevice && (directPathIo.value = passthroughDevice) // Todo change
|
|
116
|
-
// directPathIo.value = newValue1
|
|
112
|
+
const setData = (): void => {
|
|
117
113
|
const passthroughDevice = props.passthroughDevices.find((device) => {
|
|
118
114
|
return (
|
|
119
115
|
device.class_name + '_' + device.address ===
|
|
@@ -145,53 +141,11 @@ const set = (): void => {
|
|
|
145
141
|
watch(
|
|
146
142
|
() => props.mediatedDevices,
|
|
147
143
|
() => {
|
|
148
|
-
//
|
|
149
|
-
set() // for edit
|
|
144
|
+
setData() // for edit
|
|
150
145
|
},
|
|
151
146
|
{ immediate: true, deep: true }
|
|
152
147
|
)
|
|
153
148
|
|
|
154
|
-
// watch(
|
|
155
|
-
// [() => props.pciDevice, () => props.mediatedDevices],
|
|
156
|
-
// ([newValue1]) => {
|
|
157
|
-
// // const passthroughDevice = props.passthroughDevices.find(
|
|
158
|
-
// // (item) => item.address === newValue.address
|
|
159
|
-
// // )
|
|
160
|
-
// // passthroughDevice && (directPathIo.value = passthroughDevice) // Todo change
|
|
161
|
-
// if (newValue1) {
|
|
162
|
-
// // directPathIo.value = newValue1
|
|
163
|
-
// const passthroughDevice = props.passthroughDevices.find((device) => {
|
|
164
|
-
// return (
|
|
165
|
-
// device.class_name + '_' + device.address ===
|
|
166
|
-
// newValue1.class_name + '_' + newValue1.address
|
|
167
|
-
// )
|
|
168
|
-
// })
|
|
169
|
-
// if (passthroughDevice) {
|
|
170
|
-
// dynamicDirectPathIo.value = passthroughDevice
|
|
171
|
-
// }
|
|
172
|
-
//
|
|
173
|
-
// const mediatedDevice = props.mediatedDevices.find((device) => {
|
|
174
|
-
// return (
|
|
175
|
-
// device.profile_name + '_' + device.root_device ===
|
|
176
|
-
// newValue1.class_name + '_' + newValue1.address
|
|
177
|
-
// )
|
|
178
|
-
// })
|
|
179
|
-
// if (mediatedDevice) {
|
|
180
|
-
// nvidiaGridProfile.value = {
|
|
181
|
-
// text: mediatedDevice.human_readable,
|
|
182
|
-
// value: mediatedDevice.profile_name + '_' + mediatedDevice.root_device,
|
|
183
|
-
// }
|
|
184
|
-
//
|
|
185
|
-
// selectedType.value =
|
|
186
|
-
// pciDeviceTypeOptions.value.find(
|
|
187
|
-
// (option) => option.value === 'nvidia_grid'
|
|
188
|
-
// ) || selectedType.value
|
|
189
|
-
// }
|
|
190
|
-
// }
|
|
191
|
-
// },
|
|
192
|
-
// { immediate: true, deep: true }
|
|
193
|
-
// )
|
|
194
|
-
|
|
195
149
|
const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
|
|
196
150
|
const nvidia = props.mediatedDevices.find(
|
|
197
151
|
(device) =>
|
|
@@ -244,7 +198,6 @@ watch(
|
|
|
244
198
|
deviceName.value = newValue.device_name
|
|
245
199
|
mediatedDevice.value = newValue.mediated_device
|
|
246
200
|
mediatedDeviceUuid.value = newValue.mediated_device_uuid || ''
|
|
247
|
-
// emits('send-data', props.type === 'edit' ? props.pciDevice : newValue)
|
|
248
201
|
},
|
|
249
202
|
{ immediate: true }
|
|
250
203
|
)
|