all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH proxmox-backup v2 3/3] ui: Set datastore usage related titles based on backend
Date: Wed, 11 Mar 2026 13:05:01 +0100	[thread overview]
Message-ID: <20260311120501.536269-5-c.ebner@proxmox.com> (raw)
In-Reply-To: <20260311120501.536269-1-c.ebner@proxmox.com>

If the datastore is backed by S3, replace the titles in the datastore
summary storage usage and the storage rdd chart to include the
information that this is local cache storage usage.

Further, the estimated full values are also not shown for local
datastore caches.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 www/datastore/DataStoreListSummary.js | 10 ++++++++--
 www/datastore/Summary.js              | 13 +++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/www/datastore/DataStoreListSummary.js b/www/datastore/DataStoreListSummary.js
index ff88afaa0..dad51fbd6 100644
--- a/www/datastore/DataStoreListSummary.js
+++ b/www/datastore/DataStoreListSummary.js
@@ -24,6 +24,7 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
             error: '',
             removable: false,
             maintenance: '',
+            isS3: false,
         },
     },
     setTasks: function (taskdata, since) {
@@ -115,7 +116,12 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
             return entry;
         });
 
-        me.lookup('historychart').setData(data);
+        let historyChart = me.lookup('historychart');
+        if (statusData['backend-type'] === 's3') {
+            vm.set('isS3', true);
+            historyChart.setTitle(gettext('Cache Usage History'));
+        }
+        historyChart.setData(data);
     },
 
     items: [
@@ -189,7 +195,7 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
                         data: {
                             text: '{full}',
                         },
-                        visible: '{!error}',
+                        visible: '{!error && !isS3}',
                     },
                 },
                 {
diff --git a/www/datastore/Summary.js b/www/datastore/Summary.js
index cdb34aea3..d26f02348 100644
--- a/www/datastore/Summary.js
+++ b/www/datastore/Summary.js
@@ -94,6 +94,10 @@ Ext.define('PBS.DataStoreInfo', {
             let counts = store.getById('counts').data.value;
             let used = store.getById('used').data.value;
             let total = store.getById('avail').data.value + used;
+            let backendType = store.getById('backend-type').data.value;
+            if (backendType === 's3') {
+                me.lookup('usage').title = gettext('Local Cache Usage');
+            }
 
             let usage = Proxmox.Utils.render_size_usage(used, total, true);
             vm.set('usagetext', usage);
@@ -152,6 +156,7 @@ Ext.define('PBS.DataStoreInfo', {
         {
             iconCls: 'fa fa-fw fa-hdd-o',
             title: gettext('Usage'),
+            reference: 'usage',
             bind: {
                 data: {
                     usage: '{usage}',
@@ -337,6 +342,7 @@ Ext.define('PBS.DataStoreSummary', {
         {
             xtype: 'proxmoxRRDChart',
             title: gettext('Storage usage (bytes)'),
+            name: 'usage-rrd-chart',
             fields: ['unpriv-total', 'used'],
             fieldTitles: [gettext('Total'), gettext('Storage usage')],
         },
@@ -437,6 +443,13 @@ Ext.define('PBS.DataStoreSummary', {
                 unmountBtn.setDisabled(false);
                 mountBtn.setDisabled(true);
                 lastRequestWasFailue = false;
+
+                let backendType = s.getById('backend-type').data.value;
+                if (backendType === 's3') {
+                    me.down('[name=usage-rrd-chart]').setTitle(
+                        gettext('Local Cache Usage (bytes)'),
+                    );
+                }
             }
         });
 
-- 
2.47.3





  parent reply	other threads:[~2026-03-11 12:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 12:04 [PATCH proxmox{,-backup} v2 0/4] switch local storage usage titles based on datastore backend Christian Ebner
2026-03-11 12:04 ` [PATCH proxmox v2 1/1] pbs-api-types: add backend type to datastore's status items Christian Ebner
2026-03-11 12:04 ` [PATCH proxmox-backup v2 1/3] datastore: introduce helper to get store's backend type Christian Ebner
2026-03-11 12:05 ` [PATCH proxmox-backup v2 2/3] api: status/datastore: expose backend type in datastore status/list Christian Ebner
2026-03-11 12:05 ` Christian Ebner [this message]
2026-03-11 15:01 ` applied-series: [PATCH proxmox{,-backup} v2 0/4] switch local storage usage titles based on datastore backend Fabian Grünbichler

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=20260311120501.536269-5-c.ebner@proxmox.com \
    --to=c.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal