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) {
if (backup.keep) {
counter[rule]++;
backup.keepReason = rule;
if (rule !== 'keep-all' && counter[rule] >= params[rule]) {
rule = nextRule();
if (rule !== 'keep-all') {
backup.keepReason = rule + ': ' + counter[rule];
if (counter[rule] >= params[rule]) {
rule = nextRule();
}
} else {
backup.keepReason = rule;
}
}
}
@ -212,7 +216,7 @@ Ext.define('PBS.DataStorePrune', {
isCreate: true,
fieldDefaults: { labelWidth: 120 },
fieldDefaults: { labelWidth: 130 },
initComponent: function() {
var me = this;