From ce3c7a1bda2aeb5b7b591ba3acab3b0b9a53c7db Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 22 Nov 2021 12:20:27 +0100 Subject: [PATCH] ui: sync job: allow to configure rate limit Signed-off-by: Thomas Lamprecht --- www/window/SyncJobEdit.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/www/window/SyncJobEdit.js b/www/window/SyncJobEdit.js index 0b917ce3..3437ef23 100644 --- a/www/window/SyncJobEdit.js +++ b/www/window/SyncJobEdit.js @@ -125,6 +125,12 @@ Ext.define('PBS.window.SyncJobEdit', { if (!values.id && me.up('pbsSyncJobEdit').isCreate) { values.id = 's-' + Ext.data.identifier.Uuid.Global.generate().slice(0, 13); } + if (!me.isCreate) { + PBS.Utils.delete_if_default(values, 'rate-in'); + if (typeof values.delete === 'string') { + values.delete = values.delete.split(','); + } + } return values; }, column1: [ @@ -196,6 +202,14 @@ Ext.define('PBS.window.SyncJobEdit', { value: '{scheduleValue}', }, }, + { + xtype: 'pmxBandwidthField', + name: 'rate-in', + fieldLabel: gettext('Rate Limit'), + emptyText: gettext('Unlimited'), + submitAutoScaledSizeUnit: true, + // NOTE: handle deleteEmpty in onGetValues due to bandwidth field having a cbind too + }, ], columnB: [