Group Management: Multi-Selection of Domains to add/remove/delete multiple to/from/_ a group in one go

I suggest a feature (or rather a set of functions/fields/buttons/dropdowns) to add (or remove) multiple white- or blacklisted domains in [Group Management > Domains] to (from) one (or more) particular group(s) in one go (or delete those selected from the black/whitelist entirely[*1]) instead of each one by one.
[*1]: this feature request only asks for the "bulk delete" action, which could easily be combined with my suggestion.

At the moment, user has to do this:

  1. Click the "Group Assignment" dropdown button for each domain,
  2. then tick on/off the groups for the domain to apply to,
  3. and then click apply,
  4. then wait until the pop-up ("toast") confirming the change is gone (because next row can't be reliably edited before this is gone, next dropdown does not appear completely, i.e. is sometimes empty for me)
  5. then repeat for the next domain

This is very laborious, dozens of clicks already for a couple domains, and also after each "apply" system takes a few seconds to show a pop up confirming the change. Next row can only reliably be edited once that pop up (or "toast") is more or less gone again.

How I would envision it:

  1. Like in many GUIs you have a tick-box in front of each line,
  2. and one for "select all lines" in the table header above these boxes.
  3. If one could filter the "list of entries" for "whitelisted"/"blacklisted",
  4. and combine that with a filter for "(not) in group XY" (e.g. using keyword "NOT" or "!" or "-", whichever is the right "regex" "not" statement atm) with the filter input, and with other filtering, e.g. for the comments
  5. one would get all white/blacklisted entries (not yet) in group "XY" for which the filter criteria apply.
  6. Then,
    6.1. one could select those needed by their checkboxes (or all filtered by the "select all" tick box above the filtered table of results),
    6.2 and then have a dropdown "Actions" containing "add/remove to group(s) ...", "delete", "apply comment", and maybe others
  7. Then select the desired action, maybe select / deselect the groups or add a comment,
  8. then click "apply", or in case of the comments select "replace" or "append"

=> exaclty 1 click for each domain one wants, and a few "overhead" to filter, select target, and apply.

Could be extremely useful with large numbers of black/whitelists (I was missing it already with only 20-ish domains yesterday...), to mass-assign/remove/replace tags in the comments fields.

Note that this can be done now with SQL commands. A few examples:

Remove all exact blacklist entries from the database:

sudo sqlite3 /etc/pihole/gravity.db "delete from domainlist where type=1"

Remove whitelist entries with a specific comment

sudo sqlite3 /etc/pihole/gravity.db "delete from domainlist where type=0 AND comment like '%source-2%';"

Remove blacklist entries for googlevideo

sudo sqlite3 /etc/pihole/gravity.db "delete from domainlist where type=1 AND domain like '%googlevideo%'"

To my (limited) understanding these suggested sqlite commands are only good for deleting a set of domains applying the one or other "where" filter condition.

Commands to mass-modify group assignments however will be way more complicated I believe: groups are likely identified by an ID (i.e. row number, or rather "next free row number at time of adding"?) in the database I guess (as the examples in the documentation suggest).
=> One will first have to identify the ID of the group(s) ( from another table, looking it up by name, or a "nested" SQL query) to then do the actual modification.

Nothing the ordinary user can do.

(Excuse if terms used above are a bit "mixed up", limited knowledge at my end, not done anything with SQL for ~2 decades)