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 CC18EB8F32 for ; Tue, 12 Mar 2024 10:58:34 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AD609154C9 for ; Tue, 12 Mar 2024 10:58:04 +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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 12 Mar 2024 10:58: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 6B93A43D9A for ; Tue, 12 Mar 2024 10:58:03 +0100 (CET) Message-ID: Date: Tue, 12 Mar 2024 10:58:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion References: <20231121123958.198675-1-m.frank@proxmox.com> Content-Language: en-US From: Markus Frank In-Reply-To: <20231121123958.198675-1-m.frank@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.030 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 T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pve-devel] [PATCH manager v15 1/2] add clipboard comboBox to VM Options 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: Tue, 12 Mar 2024 09:58:34 -0000 Ping, the patch still applies. On 2023-11-21 13:39, Markus Frank wrote: > For SPICE and VNC, a different message is displayed. > > Save config in DisplayEdit so that the clipboard setting persist. > > Signed-off-by: Markus Frank > Reviewed-by: Dominik Csapak > Tested-by: Dominik Csapak > --- > v15: > * changed style of line break in vncHint field > > www/manager6/qemu/DisplayEdit.js | 8 ++++ > www/manager6/qemu/Options.js | 80 ++++++++++++++++++++++++++++++++ > 2 files changed, 88 insertions(+) > > diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/DisplayEdit.js > index 9bb1763e..d7cd51a9 100644 > --- a/www/manager6/qemu/DisplayEdit.js > +++ b/www/manager6/qemu/DisplayEdit.js > @@ -4,6 +4,9 @@ Ext.define('PVE.qemu.DisplayInputPanel', { > onlineHelp: 'qm_display', > > onGetValues: function(values) { > + if (typeof this.originalConfig.clipboard !== 'undefined') { > + values.clipboard = this.originalConfig.clipboard; > + } > let ret = PVE.Parser.printPropertyString(values, 'type'); > if (ret === '') { > return { 'delete': 'vga' }; > @@ -11,6 +14,11 @@ Ext.define('PVE.qemu.DisplayInputPanel', { > return { vga: ret }; > }, > > + onSetValues: function(values) { > + this.originalConfig = values; > + return values; > + }, > + > items: [{ > name: 'type', > xtype: 'proxmoxKVComboBox', > diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js > index 7b112400..53d0beac 100644 > --- a/www/manager6/qemu/Options.js > +++ b/www/manager6/qemu/Options.js > @@ -154,6 +154,86 @@ Ext.define('PVE.qemu.Options', { > }, > } : undefined, > }, > + vga: { > + header: gettext('Clipboard'), > + defaultValue: false, > + renderer: function(value) { > + let vga = PVE.Parser.parsePropertyString(value, 'type'); > + if (vga.clipboard) { > + return vga.clipboard.toUpperCase(); > + } else { > + return Proxmox.Utils.defaultText + ' (SPICE)'; > + } > + }, > + editor: caps.vms['VM.Config.HWType'] ? { > + xtype: 'proxmoxWindowEdit', > + subject: gettext('Clipboard'), > + onlineHelp: 'qm_display', > + items: { > + xtype: 'pveDisplayInputPanel', > + referenceHolder: true, > + items: [ > + { > + xtype: 'proxmoxKVComboBox', > + name: 'clipboard', > + reference: 'clipboard', > + itemId: 'clipboardBox', > + fieldLabel: gettext('Clipboard'), > + deleteDefaultValue: true, > + listeners: { > + change: function(field, value) { > + let inputpanel = field.up("inputpanel"); > + let isVnc = value === 'vnc'; > + inputpanel.lookup('vncHint').setVisible(isVnc); > + inputpanel.lookup('defaultHint').setVisible(!isVnc); > + }, > + }, > + value: '__default__', > + comboItems: [ > + ['__default__', Proxmox.Utils.defaultText + ' (SPICE)'], > + ['vnc', 'VNC'], > + ], > + }, > + { > + itemId: 'vncHint', > + name: 'vncHint', > + reference: 'vncHint', > + xtype: 'displayfield', > + userCls: 'pmx-hint', > + hidden: true, > + 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.'), > + }, > + { > + itemId: 'defaultHint', > + name: 'defaultHint', > + reference: 'defaultHint', > + xtype: 'displayfield', > + userCls: 'pmx-hint', > + hidden: false, > + 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.'), > + }, > + ], > + onGetValues: function(values) { > + values = Ext.apply(this.originalConfig, values); > + if (values.delete === "clipboard") { > + delete values.clipboard; > + delete values.delete; > + } > + let ret = PVE.Parser.printPropertyString(values, 'type'); > + if (ret === "") { > + return { 'delete': "vga" }; > + } > + return { vga: ret }; > + }, > + onSetValues: function(values) { > + this.originalConfig = PVE.Parser.parsePropertyString(values.vga, 'type'); > + return this.originalConfig; > + }, > + }, > + } : undefined, > + }, > hotplug: { > header: gettext('Hotplug'), > defaultValue: 'disk,network,usb',