[pve-devel] [RFC manager 4/5] GUI: QEMU Hardware: multikey support for comments

Matthias Heiserer m.heiserer at proxmox.com
Mon Feb 14 15:01:43 CET 2022


Values in multikey need to be explicitly set `visible: false`,
otherwise they are not found.

Signed-off-by: Matthias Heiserer <m.heiserer at proxmox.com>
---
 www/manager6/qemu/HardwareView.js | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index 60d662d5..ca6dac76 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -98,7 +98,7 @@ Ext.define('PVE.qemu.HardwareView', {
 		tdCls: 'pmx-itype-icon-processor',
 		group: 3,
 		defaultValue: '1',
-		multiKey: ['sockets', 'cpu', 'cores', 'numa', 'vcpus', 'cpulimit', 'cpuunits'],
+		multiKey: ['sockets', 'cpu', 'cores', 'numa', 'vcpus', 'cpulimit', 'cpuunits', 'cpucomment'],
 		renderer: function(value, metaData, record, rowIndex, colIndex, store, pending) {
 		    var sockets = me.getObjectValue('sockets', 1, pending);
 		    var model = me.getObjectValue('cpu', undefined, pending);
@@ -213,6 +213,21 @@ Ext.define('PVE.qemu.HardwareView', {
 	    ostype: {
 		visible: false,
 	    },
+	    sockets_comment: {
+		visible: false,
+	    },
+	    memory_comment: {
+		visible: false,
+	    },
+	    bios_comment: {
+		visible: false,
+	    },
+	    machine_comment: {
+		visible: false,
+	    },
+	    scsihw_comment: {
+		visible: false,
+	    },
 	};
 
 	PVE.Utils.forEachBus(undefined, function(type, id) {
@@ -283,6 +298,9 @@ Ext.define('PVE.qemu.HardwareView', {
 		never_delete: !caps.nodes['Sys.Console'],
 		header: gettext('Serial Port') + ' (' + confid + ')',
 	    };
+	    rows[confid + '_comment'] = {
+		visible: false,
+	    };
 	}
 	rows.audio0 = {
 	    group: 40,
-- 
2.30.2






More information about the pve-devel mailing list