[pbs-devel] [PATCH proxmox-backup 4/4] ui: Set datastore usage related titles based on backend
Christian Ebner
c.ebner at proxmox.com
Thu Jul 31 09:39:50 CEST 2025
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 <c.ebner at proxmox.com>
---
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
More information about the pbs-devel
mailing list