From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 75DDB1FF165 for ; Thu, 31 Jul 2025 09:39:28 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AD9A034565; Thu, 31 Jul 2025 09:40:54 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Thu, 31 Jul 2025 09:39:50 +0200 Message-ID: <20250731073950.73526-6-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250731073950.73526-1-c.ebner@proxmox.com> References: <20250731073950.73526-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1753947608389 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.045 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 Subject: [pbs-devel] [PATCH proxmox-backup 4/4] ui: Set datastore usage related titles based on backend 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: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" 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. The intention is to make this clear to the user until a more powerful summary panel is implemented specifically for s3 backed datastores. Signed-off-by: Christian Ebner --- www/datastore/DataStoreListSummary.js | 10 ++++++++-- www/datastore/Summary.js | 12 ++++++++++++ 2 files changed, 20 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..af0363fc1 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,12 @@ 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.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel