[pbs-devel] [PATCH proxmox-backup 00/11] add 'prune all' button to datastore content

Dominik Csapak d.csapak at proxmox.com
Fri Jul 16 10:53:17 CEST 2021


similar to the 'verify all' button, it makes sense that a user can
prune all groups (which he has access to) on demand with custom setings.

this adds a new api call, since pruning all groups could take a while,
depending on the number of groups snapshots, and it does not make sense
to have that in a synchronous api call (that we already have per group),
so modifying the existing api call to have the group optional was not
really sensible IMHO.

patches 1-6 are simply refactoring, to make it more easy to use
 the PruneOptions, 'prune_datastore', etc. later
7,8 add new parameter/functionality to the 'prune_datastore' method
9 really adds the api call
10 is the button in the gui
11 is just a ui improvement for the other prune window
 (could be applied seperately)

Dominik Csapak (11):
  api-types: move PRUNE_SCHEMA_KEEP_* to pbs-api-types
  pbs-datastore/prune: make PruneOptions an api type
  client: simplify prune api method
  api: admin/datastore: simplify prune api call
  backup/datastore: refactor check_backup_owner there
  server/prune_job: factor out 'prune_datastore'
  server/prune_job: add 'keep_all' logic to 'prune_datastore'
  server/prune_job: add proper permission checks to 'prune_datastore'
  api: admin/datastore: add new 'prune-datastore' api call
  ui: datastore/Content: add 'Prune All' button
  ui: datastore/Prune: improve title of group prune window

 pbs-api-types/src/lib.rs         |  30 +++++
 pbs-datastore/src/prune.rs       |  50 +++++++-
 src/api2/admin/datastore.rs      | 208 ++++++++++++++++---------------
 src/api2/types/mod.rs            |  30 -----
 src/backup/datastore.rs          |  20 +++
 src/bin/proxmox-backup-client.rs |  95 +++++++-------
 src/server/prune_job.rs          | 139 +++++++++++++--------
 www/datastore/Content.js         |  34 +++++
 www/datastore/Prune.js           |   2 +-
 www/window/DataStoreEdit.js      |  15 +++
 10 files changed, 390 insertions(+), 233 deletions(-)

-- 
2.30.2






More information about the pbs-devel mailing list