From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 918161FF56B for ; Mon, 22 Apr 2024 12:07:39 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 59922E110; Mon, 22 Apr 2024 12:07:42 +0200 (CEST) Date: Mon, 22 Apr 2024 12:01:30 +0200 (CEST) To: pve-devel In-Reply-To: References: MIME-Version: 1.0 Message-ID: List-Id: Proxmox VE development discussion List-Post: From: Lucio Magini via pve-devel Precedence: list Cc: Lucio Magini X-Mailman-Version: 2.1.29 X-BeenThere: pve-devel@lists.proxmox.com List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Proxmox VE development discussion List-Help: Subject: Re: [pve-devel] pve-devel Digest, Vol 167, Issue 233 Content-Type: multipart/mixed; boundary="===============0334582416563093038==" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" --===============0334582416563093038== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: X-Original-To: pve-devel@lists.proxmox.com Delivered-To: pve-devel@lists.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 36B519BC57 for ; Mon, 22 Apr 2024 12:07:41 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0D9D4E030 for ; Mon, 22 Apr 2024 12:07:41 +0200 (CEST) Received: from mail.abd.it (mail.abd.it [93.64.167.138]) (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, 22 Apr 2024 12:07:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.abd.it (Postfix) with ESMTP id C88031305A27 for ; Mon, 22 Apr 2024 12:01:35 +0200 (CEST) Received: from mail.abd.it ([127.0.0.1]) by localhost (abdposta.abd.it [127.0.0.1]) (amavis, port 10032) with ESMTP id JcvFUqlDffV1 for ; Mon, 22 Apr 2024 12:01:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.abd.it (Postfix) with ESMTP id 2AD8413059EF for ; Mon, 22 Apr 2024 12:01:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.abd.it 2AD8413059EF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abd.it; s=E44C9B7E-E057-11EE-A0C3-BB1594CB590E; t=1713780091; bh=1TFWvT3CXdffVTZQMPs3xU1ZQJtVVjQ0tA5Ui1wyLqI=; h=Date:From:To:Message-ID:MIME-Version; b=qzPwVsKNZgA7DN3NzXCESosekvPPlAgS7g7ZK2U9TWdfop6gKS+CY4oCt2c1Vd3FW 3K/u6Cg6HptltD3uIMb3gWzbWWwP0jmUAWoXnICwnhqHzNjB9CA5XqL9BJ1m7nxh3B oR9jYYXWQghhhMwwS/Nq5LdvIKzrQZnunIAUIcgHPIC/+jTJuDy8pZF7XXU9/cop6e RcyeIsMERl05GF4TWoZWv+89Wu8aiQA/4SVvmN21L1qbvLCyqfKRmSHFGzozaoMddH TbW0xY9NBqP4/whB3TL34RmH2jl08qKERQNw8a9wfk7+89hfdMsSfrbYupN3/bMePv wMY3KeDTr+QXg== X-Virus-Scanned: amavis at abd.it Received: from mail.abd.it ([127.0.0.1]) by localhost (abdposta.abd.it [127.0.0.1]) (amavis, port 10026) with ESMTP id YYiheJsYRZEI for ; Mon, 22 Apr 2024 12:01:30 +0200 (CEST) Received: from abdposta.abd.it (localhost [127.0.0.1]) by mail.abd.it (Postfix) with ESMTP id E7C4F1305A26 for ; Mon, 22 Apr 2024 12:01:30 +0200 (CEST) Date: Mon, 22 Apr 2024 12:01:30 +0200 (CEST) From: Lucio Magini To: pve-devel Message-ID: <2022047899.84876.1713780090833.JavaMail.zextras@abd.it> In-Reply-To: References: Subject: RE: pve-devel Digest, Vol 167, Issue 233 MIME-Version: 1.0 X-Originating-IP: [93.71.211.137] X-Mailer: Carbonio 24.3.0_ZEXTRAS_202403 (CarbonioWebClient - Firefox 125.0 (Windows)/24.3.0_ZEXTRAS_202403 carbonio 20240215-1458 FOSS) Thread-Topic: pve-devel Digest, Vol 167, Issue 233 Thread-Index: glszLw0H6u4uO/6Ae4+qrHPJORVEJA== X-SPAM-LEVEL: Spam detection results: 0 BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy HTML_MESSAGE 0.001 HTML included in message KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years SPF_HELO_PASS -0.001 SPF: HELO matches SPF record SPF_PASS -0.001 SPF: sender matches SPF record Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Ok, ottimo :-) Grazie Lucio Da: "undefined" A: "undefined" Inviato: luned=C3=AC 22 aprile 2024 12:00 Oggetto: pve-devel Digest, Vol 167, Issue 233 Send pve-devel mailing list submissions to pve-devel@lists.proxmox.com To subscribe or unsubscribe via the World Wide Web, visit https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel or, via email, send a message with subject or body 'help' to pve-devel-request@lists.proxmox.com You can reach the person managing the list at pve-devel-owner@lists.proxmox.com When replying, please edit your Subject line so it is more specific than "Re: Contents of pve-devel digest..." Today's Topics: 1. Re: [PATCH manager v16 1/2] ui: qemu: change DisplayEdit logic to use ViewModel instead of listener function (Dominik Csapak) 2. Re: [PATCH manager v16 2/2] ui: qemu: add clipboard ComboBox as a advanced option in DisplayEdit (Dominik Csapak) ---------------------------------------------------------------------- Message: 1 Date: Mon, 22 Apr 2024 11:33:46 +0200 From: Dominik Csapak To: Proxmox VE development discussion , Markus Frank Subject: Re: [pve-devel] [PATCH manager v16 1/2] ui: qemu: change DisplayEdit logic to use ViewModel instead of listener function Message-ID: <2a004a96-fe68-41c0-94bd-4c6cea151dee@proxmox.com> Content-Type: text/plain; charset=3DUTF-8; format=3Dflowed one minor nit inline, otherwise Reviewed-by: Dominik Csapak Tested-by: Dominik Csapak On 4/8/24 12:33, Markus Frank wrote: > Signed-off-by: Markus Frank > --- > www/manager6/qemu/DisplayEdit.js | 57 ++++++++++++++++++-------------- > 1 file changed, 33 insertions(+), 24 deletions(-) > > diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/Display= Edit.js > index 9bb1763e..17b02ee4 100644 > --- a/www/manager6/qemu/DisplayEdit.js > +++ b/www/manager6/qemu/DisplayEdit.js > @@ -11,6 +11,33 @@ Ext.define('PVE.qemu.DisplayInputPanel', { > return { vga: ret }; > }, > > + viewModel: { > + data: { > + type: '__default__', > + nonGUIOptionRegex: /^(serial\d|none)$/, > + }, > + formulas: { > + matchNonGUIOption: function(get) { > + return get('type').match(get('nonGUIOptionRegex')); since this regex is only used once, i'd inline it where it's used > + }, > + memoryEmptyText: function(get) { > + let val =3D get('type'); > + if (val =3D=3D=3D "cirrus") { > + return "4"; > + } else if (val =3D=3D=3D "std" || val.match(/^qxl\d?$/) || val =3D=3D= =3D "vmware") { > + return "16"; > + } else if (val.match(/^virtio/)) { > + return "256"; > + } else if (get('matchNonGUIOption')) { > + return "N/A"; > + } else { > + console.debug("unexpected display type", val); > + return Proxmox.Utils.defaultText; > + } > + }, > + }, > + }, > + > items: [{ > name: 'type', > xtype: 'proxmoxKVComboBox', > @@ -27,39 +54,21 @@ Ext.define('PVE.qemu.DisplayInputPanel', { > } > return true; > }, > - listeners: { > - change: function(cb, val) { > - if (!val) { > - return; > - } > - let memoryfield =3D this.up('panel').down('field[name=3Dmemory]'); > - let disableMemoryField =3D false; > - > - if (val =3D=3D=3D "cirrus") { > - memoryfield.setEmptyText("4"); > - } else if (val =3D=3D=3D "std" || val.match(/^qxl\d?$/) || val =3D=3D= =3D "vmware") { > - memoryfield.setEmptyText("16"); > - } else if (val.match(/^virtio/)) { > - memoryfield.setEmptyText("256"); > - } else if (val.match(/^(serial\d|none)$/)) { > - memoryfield.setEmptyText("N/A"); > - disableMemoryField =3D true; > - } else { > - console.debug("unexpected display type", val); > - memoryfield.setEmptyText(Proxmox.Utils.defaultText); > - } > - memoryfield.setDisabled(disableMemoryField); > - }, > + bind: { > + value: '{type}', > }, > }, > { > xtype: 'proxmoxintegerfield', > - emptyText: Proxmox.Utils.defaultText, > fieldLabel: gettext('Memory') + ' (MiB)', > minValue: 4, > maxValue: 512, > step: 4, > name: 'memory', > + bind: { > + emptyText: '{memoryEmptyText}', > + disabled: '{matchNonGUIOption}', > + }, > }], > }); > ------------------------------ Message: 2 Date: Mon, 22 Apr 2024 11:36:50 +0200 From: Dominik Csapak To: Proxmox VE development discussion , Markus Frank Subject: Re: [pve-devel] [PATCH manager v16 2/2] ui: qemu: add clipboard ComboBox as a advanced option in DisplayEdit Message-ID: <701654f9-5083-4d5b-891b-21202af943a4@proxmox.com> Content-Type: text/plain; charset=3DUTF-8; format=3Dflowed a few comments inline On 4/8/24 12:33, Markus Frank wrote: > 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/Display= Edit.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 =3D> get('clipboard') =3D=3D=3D 'vnc', > + hideDefaultHint: get =3D> get('isVNC') || get('matchNonGUIOption'), > + hideVNCHint: get =3D> !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)'], this '(SPICE)' here implies that the spice clipboard is available anywhere but the hint below implies it's only available with SPICE i'd probably omit it here and just say default and further explain it in the hint. > + ['vnc', 'VNC'], > + ], > + bind: { > + value: '{clipboard}', > + disabled: '{matchNonGUIOption}', > + }, here you have to set the value initially to '__default__' too, otherwise the bind set will mark it as dirty and allow a reset to the empty value i.e. use ----8<---- value: '__default__', ---->8---- > + }, > + { > + xtype: 'displayfield', > + name: 'vncHint', > + userCls: 'pmx-hint', > + value: gettext('You cannot use the default SPICE clipboard if the VNC C= lipboard 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', { ------------------------------ Subject: Digest Footer _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ------------------------------ End of pve-devel Digest, Vol 167, Issue 233 ******************************************* --===============0334582416563093038== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel --===============0334582416563093038==--