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 8AC3E8165C for ; Wed, 24 Nov 2021 10:04:50 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 802BB1BF21 for ; Wed, 24 Nov 2021 10:04:50 +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 id 5388E1BF13 for ; Wed, 24 Nov 2021 10:04:48 +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 20A314551D for ; Wed, 24 Nov 2021 10:04:48 +0100 (CET) Date: Wed, 24 Nov 2021 10:04:40 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox Backup Server development discussion References: <20211122142024.913238-1-d.csapak@proxmox.com> In-Reply-To: <20211122142024.913238-1-d.csapak@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1637743476.bmrqxyxe38.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.255 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: [pbs-devel] [PATCH proxmox-backup 0/4] ui for group-filters X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2021 09:04:50 -0000 On November 22, 2021 3:20 pm, Dominik Csapak wrote: > adds the ui for group filters for tape-backup-jobs and sync-jobs > some labels are a bit rough ('Type'/'Options') but had no better ones > at the moment >=20 > also one small problem, if one has many group filters for specific > groups, a datastore change triggers an api load for every one of them > (since thats how our normal selectors work) >=20 > if that is not acceptable, i'll find a solution on how we can only > update it once and send a v2 thanks for working on this! :) gave this a quick spin, some issues that probably warrant a v2 anyhow: - in the edit dialogue the old group filter string in the first tab is=20 still there - opening the 'add new sync job' dialogue twice in a row leads to an=20 uncaught exception and a broken/empty dialogue[0] - adding a new sync job requires changing the source datastore after=20 initially setting it, else no 'remote groups' scan is happening - no remote group scan happens when opening the editor for an existing=20 sync job after initially selecting a source datastore (requires a=20 second change to the datastore selector, like when editing) the latter two mean the selection for remote groups is empty. I'd suggest 'Filter type' and 'Filter value' for the headings, then the=20 filter type selector can have 'type', 'group' (or ID? or group ID?),=20 'regex' as values like the API/config file/CLI? I think it's clear=20 from the context that a 'type' filter refers to the backup group type.. IMHO ideally we'd only scan once (well, once initially and then once for=20 each change of remote or remote datastore) and cache that for ALL the=20 group selectors. especially since the list groups API call is not that=20 inexpensive at the moment, since it also returns the number of=20 snapshots and the file list of the last one, so has to list all the=20 snapshot dirs and their contents (and stat the protected file for each=20 snapshot as well).. we could make that part optional maybe (add a new=20 parameter that skips the snapshot querying and returns backup_count =3D 0=20 and empty files - or make them optional, since we know a client=20 requesting this mode must understand the missing fields)? also just=20 realized the groups API call doesn't return empty groups, not sure=20 whether that's ideal.. 0: Uncaught TypeError: Cannot read property 'each' of null at ctor.cleanupReferences (proxmox-backup-gui.js:1354) at ctor.fire (ext-all.js:22) at ctor.dispatch (ext-all.js:22) at ctor.dispatch (ext-all.js:22) at ctor.b.doFireEvent (ext-all.js:22) at ctor.fireEventArgs (ext-all.js:22) at ctor.fireEvent (ext-all.js:22) at ctor.destroy (ext-all.js:22) at ctor.callParent (ext-all.js:22) at ctor. (ext-all.js:22) >=20 > Dominik Csapak (4): > ui: add GroupSelector > ui: add GroupFilter form field(container) > ui: tape/BackupJobEdit: add second tab with group filters > ui: SyncJobEdit: add second tab with group filters >=20 > www/Makefile | 2 + > www/css/ext6-pbs.css | 5 + > www/form/GroupFilter.js | 334 +++++++++++++++++++++++++++++++ > www/form/GroupSelector.js | 83 ++++++++ > www/tape/window/TapeBackupJob.js | 231 +++++++++++---------- > www/window/SyncJobEdit.js | 242 ++++++++++++---------- > 6 files changed, 691 insertions(+), 206 deletions(-) > create mode 100644 www/form/GroupFilter.js > create mode 100644 www/form/GroupSelector.js >=20 > --=20 > 2.30.2 >=20 >=20 >=20 > _______________________________________________ > pbs-devel mailing list > pbs-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel >=20 >=20 >=20