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 3F5866A2BD; Thu, 16 Sep 2021 09:44:59 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 34E022190C; Thu, 16 Sep 2021 09:44:59 +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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 5725821901; Thu, 16 Sep 2021 09:44:58 +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 27453448E0; Thu, 16 Sep 2021 09:44:58 +0200 (CEST) Date: Thu, 16 Sep 2021 09:44:50 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Thomas Lamprecht Cc: Proxmox Backup Server development discussion , Proxmox VE development discussion References: <20210915134157.19762-1-f.gruenbichler@proxmox.com> <20210915134157.19762-7-f.gruenbichler@proxmox.com> <3411c837-865e-4f66-04e4-05e93b37c6c0@proxmox.com> In-Reply-To: <3411c837-865e-4f66-04e4-05e93b37c6c0@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1631777807.4arwr26zup.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.373 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 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:44:59 -0000 On September 16, 2021 9:19 am, Thomas Lamprecht wrote: > FYI, it seems you sent the series to PVE devel by mistake. dang, yeah, shell history got me there I guess. >=20 > 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-fri= endly >> (regex-freeform, type-combobox, remote group scanning + selector wit= h >> additional freeform input). >=20 > above paragraph would belong into the commit message IMO. >=20 >> =20 >> I did test the API manually though to see whether it works as expect= ed, 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 sele= cting >> the groups >=20 > we could also get away by adding it in the advanced section for now. it has the problem of "adding an arbitrary amount of filters", which=20 might take up a lot of space, which might make it nicer to move to a=20 separate tab. I am not yet sure which direction to go for this. >> 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); >=20 > Ext.String.htmlEncode only takes a single parameter > https://docs.sencha.com/extjs/7.0.0/classic/Ext.String.html#method-htmlEn= code seems like I copied that from an earlier mistake - render_optional_owner=20 - made by me as well ;) > besides that you could use a arrow fn here, the following would seem quit= e ok for me for > a renderer: >=20 > renderer: v =3D> v ? Ext.String.htmlEncode(v) : gettext('All'), yeah, that looks cleaner. >> + }, >> + cbind: { >> + hidden: '{isCreate}', >> + }, >> + }, >> { >> fieldLabel: gettext('Comment'), >> xtype: 'proxmoxtextfield', >>=20 >=20 >=20