From: Fabian Ebner <f.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] prune sim: show count for rule
Date: Tue, 10 Nov 2020 10:54:30 +0100 [thread overview]
Message-ID: <20201110095430.17105-1-f.ebner@proxmox.com> (raw)
and rename 'all zero' to 'keep-all' to make it consistent with the prune dialog
in PBS.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
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 += `<span class="strikethrough">${text}</span>`;
} 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
next reply other threads:[~2020-11-10 9:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 9:54 Fabian Ebner [this message]
2020-11-10 10:48 ` [pbs-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201110095430.17105-1-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox