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)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id AA46A6A26B; Thu, 16 Sep 2021 09:20:08 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A38F72129C; Thu, 16 Sep 2021 09:20:08 +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 id DA65521291; Thu, 16 Sep 2021 09:20:04 +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 B0012448D6; Thu, 16 Sep 2021 09:20:04 +0200 (CEST) Message-ID: <3411c837-865e-4f66-04e4-05e93b37c6c0@proxmox.com> Date: Thu, 16 Sep 2021 09:19:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Thunderbird/93.0 Content-Language: en-US To: =?UTF-8?Q?Fabian_Gr=c3=bcnbichler?= References: <20210915134157.19762-1-f.gruenbichler@proxmox.com> <20210915134157.19762-7-f.gruenbichler@proxmox.com> Cc: Proxmox VE development discussion , Proxmox Backup Server development discussion From: Thomas Lamprecht In-Reply-To: <20210915134157.19762-7-f.gruenbichler@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 1.108 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 NICE_REPLY_A -1.698 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH v2 proxmox-backup 06/10] sync: add group filtering 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: Thu, 16 Sep 2021 07:20:08 -0000 FYI, it seems you sent the series to PVE devel by mistake. On 15.09.21 15:41, Fabian Gr=C3=BCnbichler wrote: > like for manual pulls, but persisted in the sync job config and visible= > in the relevant GUI parts. >=20 > Signed-off-by: Fabian Gr=C3=BCnbichler > --- >=20 > Notes: > GUI is read-only for now (and defaults to no filtering on creation)= , as this is > a rather advanced feature that requires a complex GUI to be user-fr= iendly > (regex-freeform, type-combobox, remote group scanning + selector wi= th > additional freeform input). above paragraph would belong into the commit message IMO. > =20 > I did test the API manually though to see whether it works as expec= ted, and > updating the filter list by overwriting with a new one passed in as= multiple > parameters works as expected. > =20 > if we want to make this configurable over the GUI, we probably want= to switch > the job edit window to a tabpanel and add a second grid tab for sel= ecting > the groups we could also get away by adding it in the advanced section for now. > diff --git a/www/window/SyncJobEdit.js b/www/window/SyncJobEdit.js > index 47e65ae3..2399f11f 100644 > --- a/www/window/SyncJobEdit.js > +++ b/www/window/SyncJobEdit.js > @@ -199,6 +199,18 @@ Ext.define('PBS.window.SyncJobEdit', { > ], > =20 > columnB: [ > + { > + fieldLabel: gettext('Backup Groups'), > + xtype: 'displayfield', > + name: 'groups', > + renderer: function(value, metadata, record) { > + if (!value) return gettext('All'); > + return Ext.String.htmlEncode(value, metadata, record); Ext.String.htmlEncode only takes a single parameter https://docs.sencha.com/extjs/7.0.0/classic/Ext.String.html#method-htmlEn= code besides that you could use a arrow fn here, the following would seem quit= e ok for me for a renderer: renderer: v =3D> v ? Ext.String.htmlEncode(v) : gettext('All'), > + }, > + cbind: { > + hidden: '{isCreate}', > + }, > + }, > { > fieldLabel: gettext('Comment'), > xtype: 'proxmoxtextfield', >=20