From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <m.heiserer@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id F31B5632C5
 for <pve-devel@lists.proxmox.com>; Mon, 14 Feb 2022 15:02:05 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id A517E23363
 for <pve-devel@lists.proxmox.com>; Mon, 14 Feb 2022 15:02:05 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id F35C223327
 for <pve-devel@lists.proxmox.com>; Mon, 14 Feb 2022 15:02:03 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id CAFC141B50
 for <pve-devel@lists.proxmox.com>; Mon, 14 Feb 2022 15:02:03 +0100 (CET)
From: Matthias Heiserer <m.heiserer@proxmox.com>
To: pve-devel@lists.proxmox.com
Date: Mon, 14 Feb 2022 15:01:43 +0100
Message-Id: <20220214140144.961041-7-m.heiserer@proxmox.com>
X-Mailer: git-send-email 2.30.2
In-Reply-To: <20220214140144.961041-1-m.heiserer@proxmox.com>
References: <20220214140144.961041-1-m.heiserer@proxmox.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.003 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
Subject: [pve-devel] [RFC manager 4/5] GUI: QEMU Hardware: multikey support
 for comments
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Mon, 14 Feb 2022 14:02:06 -0000

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

Signed-off-by: Matthias Heiserer <m.heiserer@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