bfg-common 1.3.179 → 1.3.180
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/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue
CHANGED
|
@@ -223,7 +223,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
223
223
|
const { $binary } = useNuxtApp()
|
|
224
224
|
|
|
225
225
|
const dropdownItems = computed<UI_I_DropdownTreeItem[]>(() =>
|
|
226
|
-
dropdownItemsFunc(localization.value, props.state)
|
|
226
|
+
dropdownItemsFunc(localization.value, props.state, props.passthroughDevices)
|
|
227
227
|
)
|
|
228
228
|
|
|
229
229
|
const hardDisksIndex = ref<number[]>([0])
|
|
@@ -277,12 +277,18 @@ const addHardDisk = (
|
|
|
277
277
|
source,
|
|
278
278
|
attach: true,
|
|
279
279
|
boot_order: 0, // Убираем галочку
|
|
280
|
-
provision_type: provisionType
|
|
280
|
+
provision_type: provisionType,
|
|
281
281
|
})
|
|
282
282
|
sendData()
|
|
283
283
|
}
|
|
284
284
|
const onAddExistHardDisk = (file: UI_I_FileTreeNode): void => {
|
|
285
|
-
addHardDisk(
|
|
285
|
+
addHardDisk(
|
|
286
|
+
false,
|
|
287
|
+
$binary.bToGb(file.size),
|
|
288
|
+
file.path,
|
|
289
|
+
'exist',
|
|
290
|
+
file.provisioned_type
|
|
291
|
+
)
|
|
286
292
|
}
|
|
287
293
|
const onRemoveHardDisk = (
|
|
288
294
|
index: number,
|
|
@@ -1,53 +1,59 @@
|
|
|
1
|
-
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import { UI_I_DropdownTreeItem } from '~/components/atoms/dropdown/tree/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// { text: '
|
|
22
|
-
{ text:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
// { text: '
|
|
31
|
-
// { text: '
|
|
32
|
-
//
|
|
33
|
-
// },
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import { UI_I_DropdownTreeItem } from '~/components/atoms/dropdown/tree/lib/models/interfaces'
|
|
3
|
+
import { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
|
|
4
|
+
|
|
5
|
+
export const dropdownItemsFunc = (
|
|
6
|
+
localization: UI_I_Localization,
|
|
7
|
+
state: string | number | undefined,
|
|
8
|
+
passthroughDevices?: UI_I_PciDevice[]
|
|
9
|
+
): UI_I_DropdownTreeItem[] => {
|
|
10
|
+
const { $text } = useNuxtApp()
|
|
11
|
+
|
|
12
|
+
return [
|
|
13
|
+
{
|
|
14
|
+
text: localization.disksDrivesStorage,
|
|
15
|
+
children: [
|
|
16
|
+
{ text: $text.toCapitalizeEveryWord(localization.hardDisk), value: 1 },
|
|
17
|
+
{
|
|
18
|
+
text: $text.toCapitalizeEveryWord(localization.existingHardDisk),
|
|
19
|
+
value: 2,
|
|
20
|
+
},
|
|
21
|
+
// { text: 'RDM Disk', value: 2 },
|
|
22
|
+
// { text: 'Host USB Device', value: 3 },
|
|
23
|
+
// { text: 'NVDIMM', value: 4 },
|
|
24
|
+
{ text: localization.cdDvdDrive, value: 5 },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
// {
|
|
28
|
+
// text: 'Controllers',
|
|
29
|
+
// children: [
|
|
30
|
+
// { text: 'NVMe Controller', value: 6 },
|
|
31
|
+
// { text: 'SATA Controller', value: 7 },
|
|
32
|
+
// { text: 'SCSI Controller', value: 8 },
|
|
33
|
+
// { text: 'USB Controller', value: 9 },
|
|
34
|
+
// ],
|
|
35
|
+
// },
|
|
36
|
+
{
|
|
37
|
+
text: 'Other Devices',
|
|
38
|
+
children: [
|
|
39
|
+
{
|
|
40
|
+
text: 'PCI Device',
|
|
41
|
+
value: 10,
|
|
42
|
+
disabled: state === 2 || !passthroughDevices?.length,
|
|
43
|
+
},
|
|
44
|
+
// { text: 'Watchdog Timer', value: 11 },
|
|
45
|
+
// { text: 'Precision Clock', value: 12 },
|
|
46
|
+
// { text: 'Serial Port', value: 13 },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
text: localization.network,
|
|
51
|
+
children: [
|
|
52
|
+
{
|
|
53
|
+
text: $text.toCapitalizeEveryWord(localization.networkAdapter),
|
|
54
|
+
value: 14,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
]
|
|
59
|
+
}
|