[pbs-devel] [PATCH proxmox-backup v3 3/3] ui: traffic-control: add users field in edit form and list
Christian Ebner
c.ebner at proxmox.com
Wed Nov 12 10:55:16 CET 2025
On 11/10/25 2:42 PM, Hannes Laimer wrote:
> Reviewed-by: Christian Ebner <c.ebner at proxmox.com>
> Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
nit: incorrect order of tags
> ---
> www/config/TrafficControlView.js | 7 +++++++
> www/window/TrafficControlEdit.js | 18 ++++++++++++++++++
> 2 files changed, 25 insertions(+)
>
> diff --git a/www/config/TrafficControlView.js b/www/config/TrafficControlView.js
> index 0b22d29a..5cfec82b 100644
> --- a/www/config/TrafficControlView.js
> +++ b/www/config/TrafficControlView.js
> @@ -181,6 +181,13 @@ Ext.define('PBS.config.TrafficControlView', {
> renderer: 'render_bandwidth',
> dataIndex: 'burst-out',
> },
> + {
> + header: gettext('Users'),
> + flex: 3,
> + sortable: true,
> + renderer: (users) => (users ? Ext.String.htmlEncode(users.join(', ')) : ''),
> + dataIndex: 'users',
> + },
> {
> header: gettext('Networks'),
> flex: 3,
> diff --git a/www/window/TrafficControlEdit.js b/www/window/TrafficControlEdit.js
> index 0bbbf363..2063c107 100644
> --- a/www/window/TrafficControlEdit.js
> +++ b/www/window/TrafficControlEdit.js
> @@ -215,6 +215,7 @@ Ext.define('PBS.window.TrafficControlEdit', {
> PBS.Utils.delete_if_default(values, 'rate-out');
> PBS.Utils.delete_if_default(values, 'burst-in');
> PBS.Utils.delete_if_default(values, 'burst-out');
> + PBS.Utils.delete_if_default(values, 'users');
> if (typeof values.delete === 'string') {
> values.delete = values.delete.split(',');
> }
> @@ -276,6 +277,23 @@ Ext.define('PBS.window.TrafficControlEdit', {
> ],
>
> columnB: [
> + {
> + xtype: 'pmxUserSelector',
> + fieldLabel: gettext('Users'),
> + name: 'users',
> + multiSelect: true,
> + allowBlank: true,
> + cbind: {
> + deleteEmpty: '{!isCreate}',
> + },
> + emptyText: gettext('Applies to all users'),
> + autoEl: {
> + tag: 'div',
> + 'data-qtip': gettext(
> + 'Limit applies only to authenticated requests by these users. Overrides IP-only rules when both match. If networks are specified on this rule as well, it\'ll only apply if the users request comes from one of the specified networks.',
nit: proxmox-biome would reformat this to use double quotes for the
string delimiter, so the singe quote does not need to be escaped.
> + ),
> + },
> + },
> {
> xtype: 'proxmoxtextfield',
> fieldLabel: gettext('Network(s)'),
More information about the pbs-devel
mailing list