mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-06 13:50:28 +00:00
gui: qemu HardwareView: specify hardware counts in Utils
this also fixes the issue that we only showed 4 hostpci devices in the gui despite raising the limit in the backend to 16 Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
ca0e7e802c
commit
9d8553982d
@ -1215,6 +1215,8 @@ Ext.define('PVE.Utils', { utilities: {
|
||||
}
|
||||
},
|
||||
|
||||
hardware_counts: { net: 32, usb: 5, hostpci: 16, audio: 1, efidisk: 1, serial: 4 },
|
||||
|
||||
cleanEmptyObjectKeys: function (obj) {
|
||||
var propName;
|
||||
for (propName in obj) {
|
||||
|
@ -234,7 +234,7 @@ Ext.define('PVE.qemu.HardwareView', {
|
||||
cloudheader: gettext('CloudInit Drive') + ' (' + confid + ')'
|
||||
};
|
||||
});
|
||||
for (i = 0; i < 32; i++) {
|
||||
for (i = 0; i < PVE.Utils.hardware_counts.net; i++) {
|
||||
confid = "net" + i.toString();
|
||||
rows[confid] = {
|
||||
group: 15,
|
||||
@ -252,7 +252,7 @@ Ext.define('PVE.qemu.HardwareView', {
|
||||
never_delete: caps.vms['VM.Config.Disk'] ? false : true,
|
||||
header: gettext('EFI Disk')
|
||||
};
|
||||
for (i = 0; i < 5; i++) {
|
||||
for (i = 0; i < PVE.Utils.hardware_counts.usb; i++) {
|
||||
confid = "usb" + i.toString();
|
||||
rows[confid] = {
|
||||
group: 25,
|
||||
@ -263,7 +263,7 @@ Ext.define('PVE.qemu.HardwareView', {
|
||||
header: gettext('USB Device') + ' (' + confid + ')'
|
||||
};
|
||||
}
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (i = 0; i < PVE.Utils.hardware_counts.hostpci; i++) {
|
||||
confid = "hostpci" + i.toString();
|
||||
rows[confid] = {
|
||||
group: 30,
|
||||
@ -274,7 +274,7 @@ Ext.define('PVE.qemu.HardwareView', {
|
||||
header: gettext('PCI Device') + ' (' + confid + ')'
|
||||
};
|
||||
}
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (i = 0; i < PVE.Utils.hardware_counts.serial; i++) {
|
||||
confid = "serial" + i.toString();
|
||||
rows[confid] = {
|
||||
group: 35,
|
||||
|
Loading…
Reference in New Issue
Block a user