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 27C441FF13F for ; Thu, 09 Apr 2026 10:20:41 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D3A091A80F; Thu, 9 Apr 2026 10:21:23 +0200 (CEST) Message-ID: Date: Thu, 9 Apr 2026 10:21:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH proxmox-backup v8 04/17] ui: expose s3 request counter statistics in the datastore summary To: Christian Ebner , pbs-devel@lists.proxmox.com References: <20260402105333.463088-1-c.ebner@proxmox.com> <20260402105333.463088-5-c.ebner@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20260402105333.463088-5-c.ebner@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1775722812141 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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: XEOTPG5PJG3LQ3LOZS5ZHCWJDGWJPZ4B X-Message-ID-Hash: XEOTPG5PJG3LQ3LOZS5ZHCWJDGWJPZ4B X-MailFrom: d.csapak@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: Looked at this a bit, and I think this is a bit crammed. Especially the comment panel looks a bit weird when it's collapsed. I'd propose switching the positions of s3 and comment, and make the comment a full column wide in case it's an s3 datastore this makes it look less cramped. also users in the past wanted more space for the comments already, so making it smaller in some cases is not good i think. On 4/2/26 12:52 PM, Christian Ebner wrote: > 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 > Reviewed-by: Hannes Laimer > Tested-by: Hannes Laimer > --- > changes since version 7: > - no changes > > www/datastore/Summary.js | 110 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 110 insertions(+) > > diff --git a/www/datastore/Summary.js b/www/datastore/Summary.js > index c2b1cedc9..5dcc0e5dc 100644 > --- a/www/datastore/Summary.js > +++ b/www/datastore/Summary.js > @@ -130,6 +130,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 uploaded'), > + 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', > @@ -150,6 +239,7 @@ Ext.define('PBS.DataStoreSummary', { > usage: {}, > stillbad: 0, > mountpoint: '', > + showS3Stats: false, > }, > }, > > @@ -244,10 +334,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}', > + }, > + }, > ], > }, > { > @@ -464,6 +563,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));