ui: prune: show count for rule

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2020-11-09 15:53:08 +01:00 committed by Thomas Lamprecht
parent 5eafe6aabc
commit 3f30b32c2e
1 changed files with 8 additions and 4 deletions

View File

@ -76,9 +76,13 @@ Ext.define('PBS.DataStorePruneInputPanel', {
for (let backup of backups) { for (let backup of backups) {
if (backup.keep) { if (backup.keep) {
counter[rule]++; counter[rule]++;
backup.keepReason = rule; if (rule !== 'keep-all') {
if (rule !== 'keep-all' && counter[rule] >= params[rule]) { backup.keepReason = rule + ': ' + counter[rule];
rule = nextRule(); if (counter[rule] >= params[rule]) {
rule = nextRule();
}
} else {
backup.keepReason = rule;
} }
} }
} }
@ -212,7 +216,7 @@ Ext.define('PBS.DataStorePrune', {
isCreate: true, isCreate: true,
fieldDefaults: { labelWidth: 120 }, fieldDefaults: { labelWidth: 130 },
initComponent: function() { initComponent: function() {
var me = this; var me = this;