From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 34ADE768C5 for ; Fri, 16 Jul 2021 11:48:04 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2A757EF19 for ; Fri, 16 Jul 2021 11:48:04 +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 9D191EF0B for ; Fri, 16 Jul 2021 11:48:03 +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 645F941F6D for ; Fri, 16 Jul 2021 11:48:03 +0200 (CEST) To: Proxmox Backup Server development discussion , Dominik Csapak References: <20210716085328.3731574-1-d.csapak@proxmox.com> From: Dietmar Maurer Message-ID: Date: Fri, 16 Jul 2021 11:48:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210716085328.3731574-1-d.csapak@proxmox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-SPAM-LEVEL: Spam detection results: 0 AWL 0.878 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] applied: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2021 09:48:04 -0000 applied On 7/16/21 10:53 AM, Dominik Csapak wrote: > 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(-) >