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 2E19D67853 for ; Tue, 10 Nov 2020 10:55:06 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 232431E54C for ; Tue, 10 Nov 2020 10:54:36 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 0EAC51E542 for ; Tue, 10 Nov 2020 10:54:35 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id CCF9A45FB4 for ; Tue, 10 Nov 2020 10:54:34 +0100 (CET) From: Fabian Ebner To: pbs-devel@lists.proxmox.com Date: Tue, 10 Nov 2020 10:54:30 +0100 Message-Id: <20201110095430.17105-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.027 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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] prune sim: show count for rule 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: Tue, 10 Nov 2020 09:55:06 -0000 and rename 'all zero' to 'keep-all' to make it consistent with the prune dialog in PBS. Signed-off-by: Fabian Ebner --- docs/prune-simulator/prune-simulator.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/prune-simulator/prune-simulator.js b/docs/prune-simulator/prune-simulator.js index c2076dcf..85c2a7b2 100644 --- a/docs/prune-simulator/prune-simulator.js +++ b/docs/prune-simulator/prune-simulator.js @@ -152,7 +152,12 @@ Ext.onReady(function() { dataIndex: 'mark', renderer: function(value, metaData, record) { if (record.data.mark === 'keep') { - return 'keep (' + record.data.keepName + ')'; + if (record.data.keepCount) { + return 'keep (' + record.data.keepName + + ': ' + record.data.keepCount + ')'; + } else { + return 'keep (' + record.data.keepName + ')'; + } } else { return value; } @@ -213,7 +218,11 @@ Ext.onReady(function() { if (backup.data.mark === 'remove') { html += `${text}`; } else { - text += ` (${backup.data.keepName})`; + if (backup.data.keepCount) { + text += ` (${backup.data.keepName}: ${backup.data.keepCount})`; + } else { + text += ` (${backup.data.keepName})`; + } if (me.useColors) { let bgColor = COLORS[backup.data.keepName]; let textColor = TEXT_COLORS[backup.data.keepName]; @@ -470,6 +479,7 @@ Ext.onReady(function() { newlyIncludedCount++; backup.mark = 'keep'; backup.keepName = keepName; + backup.keepCount = newlyIncludedCount; } else { backup.mark = 'remove'; } @@ -488,7 +498,7 @@ Ext.onReady(function() { Number(keepParams['keep-yearly']) === 0) { backups.forEach(function(backup) { backup.mark = 'keep'; - backup.keepName = 'all zero'; + backup.keepName = 'keep-all'; }); return; -- 2.20.1