From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <d.csapak@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 7E89D76822
 for <pbs-devel@lists.proxmox.com>; Fri, 16 Jul 2021 10:53:31 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 64AEEE1D9
 for <pbs-devel@lists.proxmox.com>; Fri, 16 Jul 2021 10:53:31 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id 6FE4AE196
 for <pbs-devel@lists.proxmox.com>; Fri, 16 Jul 2021 10:53:29 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 49F6D42185
 for <pbs-devel@lists.proxmox.com>; Fri, 16 Jul 2021 10:53:29 +0200 (CEST)
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Date: Fri, 16 Jul 2021 10:53:17 +0200
Message-Id: <20210716085328.3731574-1-d.csapak@proxmox.com>
X-Mailer: git-send-email 2.30.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.588 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: [pbs-devel] [PATCH proxmox-backup 00/11] add 'prune all' button to
 datastore content
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Fri, 16 Jul 2021 08:53:31 -0000

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