[pbs-devel] [pve-devel] [PATCH v2 proxmox-backup 06/10] sync: add group filtering

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Sep 16 09:57:55 CEST 2021


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)
- 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)

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.

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 ;)





More information about the pbs-devel mailing list