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 B130A1FF136 for ; Mon, 09 Feb 2026 10:15:27 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C4A65292; Mon, 9 Feb 2026 10:15:59 +0100 (CET) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH v1 08/11] ui: expose s3 request counter statistics in the datastore summary Date: Mon, 9 Feb 2026 10:15:30 +0100 Message-ID: <20260209091533.156902-15-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260209091533.156902-1-c.ebner@proxmox.com> References: <20260209091533.156902-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: 1770628462822 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.048 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: ARB4A5HGL4RRR4CAAMCFZWGUUQTBGOIO X-Message-ID-Hash: ARB4A5HGL4RRR4CAAMCFZWGUUQTBGOIO 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: Show the current s3 request counter statistics for datastore backend. Use a dedicated info widget, only shown for s3 datastores. Signed-off-by: Christian Ebner --- www/datastore/Summary.js | 110 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/www/datastore/Summary.js b/www/datastore/Summary.js index 4dd7dc4ce..f73827747 100644 --- a/www/datastore/Summary.js +++ b/www/datastore/Summary.js @@ -129,6 +129,95 @@ Ext.define('PBS.DataStoreInfo', { ], }); +Ext.define('PBS.DataStoreS3Stats', { + extend: 'Ext.panel.Panel', + alias: 'widget.pbsDataStoreS3Stats', + + defaults: { + xtype: 'pmxInfoWidget', + }, + + bodyPadding: 20, + + items: [ + { + xtype: 'box', + html: `${gettext('S3 traffic:')}`, + padding: '10 0 5 0', + }, + { + iconCls: 'fa fa-fw fa-arrow-up', + title: gettext('Data uploaeded'), + printBar: false, + bind: { + data: { + text: '{uploaded}', + }, + }, + }, + { + iconCls: 'fa fa-fw fa-arrow-down', + title: gettext('Data downloaded'), + printBar: false, + bind: { + data: { + text: '{downloaded}', + }, + }, + }, + { + xtype: 'box', + html: `${gettext('S3 requests:')}`, + padding: '10 0 5 0', + }, + { + title: gettext('GET'), + printBar: false, + bind: { + data: { + text: '{get}', + }, + }, + }, + { + title: gettext('PUT'), + printBar: false, + bind: { + data: { + text: '{put}', + }, + }, + }, + { + title: gettext('POST'), + printBar: false, + bind: { + data: { + text: '{post}', + }, + }, + }, + { + title: gettext('HEAD'), + printBar: false, + bind: { + data: { + text: '{head}', + }, + }, + }, + { + title: gettext('DELETE'), + printBar: false, + bind: { + data: { + text: '{delete}', + }, + }, + }, + ], +}); + Ext.define('PBS.DataStoreSummary', { extend: 'Ext.panel.Panel', alias: 'widget.pbsDataStoreSummary', @@ -149,6 +238,7 @@ Ext.define('PBS.DataStoreSummary', { usage: {}, stillbad: 0, mountpoint: '', + showS3Stats: false, }, }, @@ -243,10 +333,19 @@ Ext.define('PBS.DataStoreSummary', { { xtype: 'pbsDataStoreNotes', flex: 1, + padding: '0 10 0 0', cbind: { datastore: '{datastore}', }, }, + { + xtype: 'pbsDataStoreS3Stats', + flex: 1, + title: gettext('S3 statistics'), + bind: { + visible: '{showS3Stats}', + }, + }, ], }, { @@ -455,6 +554,17 @@ Ext.define('PBS.DataStoreSummary', { vm.set('deduplication', dedup.toFixed(2)); vm.set('stillbad', gcstatus['still-bad']); } + let s3Stats = store.getById('s3-statistics')?.data.value; + if (s3Stats) { + vm.set('uploaded', Proxmox.Utils.format_size(s3Stats.uploaded)); + vm.set('downloaded', Proxmox.Utils.format_size(s3Stats.downloaded)); + vm.set('get', s3Stats.get); + vm.set('post', s3Stats.post); + vm.set('delete', s3Stats.delete); + vm.set('head', s3Stats.head); + vm.set('put', s3Stats.put); + vm.set('showS3Stats', true); + } vm.set('ctcount', countstext(counts.ct)); vm.set('vmcount', countstext(counts.vm)); -- 2.47.3