From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 534AC931BA for ; Mon, 8 Apr 2024 12:33:46 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2EA7481C4 for ; Mon, 8 Apr 2024 12:33:16 +0200 (CEST) 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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 8 Apr 2024 12:33:15 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id CBE8D445F2 for ; Mon, 8 Apr 2024 12:33:14 +0200 (CEST) From: Markus Frank To: pve-devel@lists.proxmox.com Date: Mon, 8 Apr 2024 12:33:05 +0200 Message-Id: <20240408103305.780097-2-m.frank@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240408103305.780097-1-m.frank@proxmox.com> References: <20240408103305.780097-1-m.frank@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.034 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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 Subject: [pve-devel] [PATCH manager v16 2/2] ui: qemu: add clipboard ComboBox as a advanced option in DisplayEdit X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2024 10:33:46 -0000 For SPICE and VNC, a different message is displayed. The backend code for the clipboard option can be found in the 'config: enable vnc clipboard parameter in vga_fmt'-commit in qemu-server. Signed-off-by: Markus Frank --- www/manager6/qemu/DisplayEdit.js | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/DisplayEdit.js index 17b02ee4..3357794a 100644 --- a/www/manager6/qemu/DisplayEdit.js +++ b/www/manager6/qemu/DisplayEdit.js @@ -15,6 +15,7 @@ Ext.define('PVE.qemu.DisplayInputPanel', { data: { type: '__default__', nonGUIOptionRegex: /^(serial\d|none)$/, + clipboard: '__default__', }, formulas: { matchNonGUIOption: function(get) { @@ -35,6 +36,9 @@ Ext.define('PVE.qemu.DisplayInputPanel', { return Proxmox.Utils.defaultText; } }, + isVNC: get => get('clipboard') === 'vnc', + hideDefaultHint: get => get('isVNC') || get('matchNonGUIOption'), + hideVNCHint: get => !get('isVNC') || get('matchNonGUIOption'), }, }, @@ -70,6 +74,43 @@ Ext.define('PVE.qemu.DisplayInputPanel', { disabled: '{matchNonGUIOption}', }, }], + + advancedItems: [ + { + xtype: 'proxmoxKVComboBox', + name: 'clipboard', + deleteEmpty: false, + fieldLabel: gettext('Clipboard'), + comboItems: [ + ['__default__', Proxmox.Utils.defaultText + ' (SPICE)'], + ['vnc', 'VNC'], + ], + bind: { + value: '{clipboard}', + disabled: '{matchNonGUIOption}', + }, + }, + { + xtype: 'displayfield', + name: 'vncHint', + userCls: 'pmx-hint', + value: gettext('You cannot use the default SPICE clipboard if the VNC Clipboard is selected.') + ' ' + + gettext('VNC Clipboard requires spice-tools installed in the Guest-VM.'), + bind: { + hidden: '{hideVNCHint}', + }, + }, + { + xtype: 'displayfield', + name: 'defaultHint', + userCls: 'pmx-hint', + value: gettext('This option depends on your display type.') + ' ' + + gettext('If the display type uses SPICE you are able to use the default SPICE Clipboard.'), + bind: { + hidden: '{hideDefaultHint}', + }, + }, + ], }); Ext.define('PVE.qemu.DisplayEdit', { -- 2.39.2