From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 5AF1E1FF13B for ; Wed, 11 Mar 2026 13:05:54 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5A1AC18CB6; Wed, 11 Mar 2026 13:05:47 +0100 (CET) From: Christian Ebner 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 Message-ID: <20260311120501.536269-5-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260311120501.536269-1-c.ebner@proxmox.com> References: <20260311120501.536269-1-c.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1773230678226 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.057 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: HZSVS2QPFRSFELWAUT2AICXPPWS37RF2 X-Message-ID-Hash: HZSVS2QPFRSFELWAUT2AICXPPWS37RF2 X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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