From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id A7E7E1FF0E3 for ; Tue, 04 Aug 2026 13:29:54 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 720BD216C0; Tue, 04 Aug 2026 13:29:54 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup 1/3] www: add rate limit field for request limits Date: Tue, 4 Aug 2026 13:29:35 +0200 Message-ID: <20260804112937.358002-2-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260804112937.358002-1-c.ebner@proxmox.com> References: <20260804112937.358002-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: 1785842978725 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.123 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust 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: 5KNSFOR7OAKZ657KNMNHUKKI5BYDTGVB X-Message-ID-Hash: 5KNSFOR7OAKZ657KNMNHUKKI5BYDTGVB 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: Add a dedicated component for the request rate limits, as the currently used `proxmoxintegerfield` does not render nicely in combination with the `pmxBandwidthField`s used for bandwidth limits. Signed-off-by: Christian Ebner --- www/Makefile | 1 + www/form/RateLimitField.js | 32 ++++++++++++++++++++++++++++++++ www/window/S3ClientEdit.js | 8 ++------ 3 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 www/form/RateLimitField.js diff --git a/www/Makefile b/www/Makefile index 568836455..94599650e 100644 --- a/www/Makefile +++ b/www/Makefile @@ -44,6 +44,7 @@ JSSRC= \ form/AuthidSelector.js \ form/S3BucketSelector.js \ form/S3ClientSelector.js \ + form/RateLimitField.js \ form/RemoteSelector.js \ form/RemoteTargetSelector.js \ form/DataStoreSelector.js \ diff --git a/www/form/RateLimitField.js b/www/form/RateLimitField.js new file mode 100644 index 000000000..ef09f8bf6 --- /dev/null +++ b/www/form/RateLimitField.js @@ -0,0 +1,32 @@ +Ext.define('PBS.form.RateLimitField', { + extend: 'Ext.form.FieldContainer', + alias: 'widget.pbsRateLimitField', + + mixins: ['Proxmox.Mixin.CBind'], + + layout: 'hbox', + emptyText: gettext('Unlimited'), + + items: [ + { + xtype: 'proxmoxintegerfield', + cbind: { + name: '{name}', + emptyText: '{emptyText}', + }, + minValue: 1, + step: 1, + deleteEmpty: true, + fieldStyle: 'text-align: right', + flex: 1, + }, + { + xtype: 'displayfield', + name: 'unit', + submitValue: false, + padding: '0 0 0 10', + value: '#/s', + width: 40, + }, + ], +}); diff --git a/www/window/S3ClientEdit.js b/www/window/S3ClientEdit.js index 9624c84e2..003a8abbc 100644 --- a/www/window/S3ClientEdit.js +++ b/www/window/S3ClientEdit.js @@ -136,11 +136,9 @@ Ext.define('PBS.window.S3ClientEdit', { submitAutoScaledSizeUnit: true, }, { - xtype: 'proxmoxintegerfield', + xtype: 'pbsRateLimitField', name: 'limit-active-requests', fieldLabel: gettext('PUT/POST/DELETE request limit (#/s)'), - emptyText: gettext('Unlimited'), - minValue: 1, }, { xtype: 'proxmoxcheckbox', @@ -172,11 +170,9 @@ Ext.define('PBS.window.S3ClientEdit', { submitAutoScaledSizeUnit: true, }, { - xtype: 'proxmoxintegerfield', + xtype: 'pbsRateLimitField', name: 'limit-passive-requests', fieldLabel: gettext('GET/HEAD request limit (#/s)'), - emptyText: gettext('Unlimited'), - minValue: 1, }, ], advancedColumnB: [ -- 2.47.3