public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: "Proxmox Backup Server development discussion"
	<pbs-devel@lists.proxmox.com>,
	"Fabian Grünbichler" <f.gruenbichler@proxmox.com>
Subject: Re: [pbs-devel] [pve-devel] [PATCH v2 proxmox-backup 06/10] sync: add group filtering
Date: Thu, 23 Sep 2021 07:24:35 +0200	[thread overview]
Message-ID: <47542209-5eb6-3886-cd73-7d5618e51188@proxmox.com> (raw)
In-Reply-To: <1631778363.a4s2m09ziw.astroid@nora.none>

On 16.09.21 09:57, Fabian Grünbichler wrote:
> On September 16, 2021 9:38 am, Thomas Lamprecht wrote:
>> On 16.09.21 09:19, Thomas Lamprecht wrote:
>>>>     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 selecting
>>>>     the groups
>>> we could also get away by adding it in the advanced section for now.
>>
>> I had a quick talk with Dominik which noticed me that there can be a list of filters.
>>
>> So a separate tab-panel would seem OK to me. For UX I'd could imagine having a
>> "Add Filter" button that'd work out similarly to how we have the knet link add in PVE
>> cluster creation nowadays. In addition to that a preview window would be nice to have,
>> maybe similar to the "Prune now" one, but we only need the backup-groups here not the
>> full list of snapshots, so it would be relatively cheap to get.
>>
> 
> yeah, that was kind of what I was going for - but with the added 
> complexity of having different filter types with different 
> "completion"/selection mechanisms
> - the type filter has three static choices
> - the regex is freeform (but maybe a dropdown with some common 
>   suggestions would be nice? those could also live in the docs though)

yes, can be similar in spirit of what we do for the calendar-event schedule
field.

> - the group filter has a list of existing groups on the remote end to 
>   choose from, but also requires freeform entry as option (a group might 
>   not exist yet, or not exist any longer, but still needs to be filtered 
>   for in the sync job, either to catch the group when it has been 
>   created, or to clean it up when it was previously synced, or just for 
>   handling the currently set filters correctly)

IMO that fits all in the approach with a [+] button, that could add a row that
looks somewhat like:

Type: [ Combobox ] | [ INPUT ]

Where the type combo-box allows to select for the regex-like filter or
a editabled group selection combobox where one multi-select the existing
but can also add others (i.e., only format not store/content validation).

> 
> the last part I tried when writing v1, and it was quite the mess 
> (Dominik's suggestion back then was to move it to a tab with a grid 
> view, because the combobox selector was too limited IIRC).
> 
> a preview/dry-run for pull/sync would be nice in general, and shouldn't 
> be too hard to add. it would need to run in a worker though (as it needs 
> to query remote and local groups to decide what would be synced, even if 
> the bulk work of actually downloading chunks is skipped). it could be 
> done with the pull API without persisting the sync config, as those line 
> up 1:1.

that's not required IMO, I would only show what the filter affects, that
stuff is then not synced if already present on the remote does not matters
much here on that level.

> a preview of just the filterung with the already available (cached) 
> remote groups is of course instant. could even be done GUI-side I guess, 
> since the current filters are quite trivial to re-implement there. not 
> sure how to fit that inside the already big dialogue tab though ;)

Yeah, replicating the filter on the client side would be nice, single thing
that could cause trouble is difference between JS regex engines and the rust
regex crate we use (the latter is probably much saner).




  reply	other threads:[~2021-09-23  5:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210915134157.19762-1-f.gruenbichler@proxmox.com>
     [not found] ` <20210915134157.19762-7-f.gruenbichler@proxmox.com>
2021-09-16  7:19   ` Thomas Lamprecht
2021-09-16  7:38     ` Thomas Lamprecht
2021-09-16  7:57       ` Fabian Grünbichler
2021-09-23  5:24         ` Thomas Lamprecht [this message]
2021-09-16  7:44     ` Fabian Grünbichler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47542209-5eb6-3886-cd73-7d5618e51188@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=f.gruenbichler@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal