]> git.proxmox.com Git - pve-manager.git/commit
ui: bulk actions: rework filters and include tags
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 9 Nov 2023 10:47:59 +0000 (11:47 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 9 Nov 2023 11:10:48 +0000 (12:10 +0100)
commitf0535b036dba565412f0b736c536fd8dcfe0c9c9
tree2e5e6dcfb6c516360ff9ef1c7c7422e202661ede
parent1aa92bac271da19945146961b6b7eaafdca426de
ui: bulk actions: rework filters and include tags

This moves the filters out of the grid header for the BulkActions and
puts them into their own fieldset above the grid. With that, we can
easily include a tags filter (one include and one exclude list).

The filter fieldset is collapsible and shows the active filters in
parenthesis. aside from that the filter should be the same as before.

To achieve the result, we regenerate the filterFn on every change of
every filter field, and set it with an 'id' so that only that filter is
overridden each time.

To make this work, we have to change three tiny details:
* manually set the labelWidths for the fields, otherwise it breaks
  the ones in the fieldset.
* change the counting in the 'getErrors' of the VMSelector, so that we
  actually get the count of selected VMs, not the one from the
  selectionModel
* override the plugins to '' in the BulkAction windows, so that e.g. in
  the backup window we still have the filters in the grid header
  (we could add a filter box there too, but that is already very crowded
  and would take up too much space for now)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/form/VMSelector.js
www/manager6/window/BulkAction.js