From: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH backup v5 3/3] gui: change reporting of the estimated_time_full to "Full" if no space
Date: Wed, 9 Nov 2022 15:25:24 +0100 [thread overview]
Message-ID: <20221109142524.549045-3-d.tschlatscher@proxmox.com> (raw)
In-Reply-To: <20221109142524.549045-1-d.tschlatscher@proxmox.com>
is left in the datastore. Before, the GUI would report "Never" for the
estimated time full, because the value provided in the backend was in
the past. To get around this, the GUI now reports "Full" if the value
for available reaches 0.
Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
---
No changes from v4
www/Utils.js | 6 +++++-
www/datastore/DataStoreListSummary.js | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/www/Utils.js b/www/Utils.js
index ad451c9f..f6d353ef 100644
--- a/www/Utils.js
+++ b/www/Utils.js
@@ -285,7 +285,11 @@ Ext.define('PBS.Utils', {
return tokenid.match(/^(.+)!([^!]+)$/)[2];
},
- render_estimate: function(value) {
+ render_estimate: function(value, metaData, record) {
+ if (record.data.avail === 0) {
+ return gettext("Full");
+ }
+
if (value === undefined) {
return gettext('Not enough data');
}
diff --git a/www/datastore/DataStoreListSummary.js b/www/datastore/DataStoreListSummary.js
index bec0562d..968239b0 100644
--- a/www/datastore/DataStoreListSummary.js
+++ b/www/datastore/DataStoreListSummary.js
@@ -62,7 +62,8 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
let usagePanel = me.lookup('usage');
usagePanel.updateValue(usage, usagetext);
- let estimate = PBS.Utils.render_estimate(statusData['estimated-full-date']);
+ let estimate = PBS.Utils.render_estimate(statusData['estimated-full-date'], null, { data: statusData });
+
vm.set('full', estimate);
vm.set('deduplication', PBS.Utils.calculate_dedup_factor(statusData['gc-status']).toFixed(2));
vm.set('stillbad', statusData['gc-status']['still-bad']);
--
2.30.2
next prev parent reply other threads:[~2022-11-09 14:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 14:25 [pbs-devel] [PATCH backup v5 1/3] fix #4077: Estimated Full metric on ext4 file systems Daniel Tschlatscher
2022-11-09 14:25 ` [pbs-devel] [PATCH backup v5 2/3] 'available' field in rrd data in the API and change usage of 'total' Daniel Tschlatscher
2022-11-09 14:25 ` Daniel Tschlatscher [this message]
2022-11-24 13:29 ` [pbs-devel] applied-series: [PATCH backup v5 1/3] fix #4077: Estimated Full metric on ext4 file systems Wolfgang Bumiller
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=20221109142524.549045-3-d.tschlatscher@proxmox.com \
--to=d.tschlatscher@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