[pve-devel] applied: [PATCH manager v2] ui: restore: add bandwidth limit field

Dominik Csapak d.csapak at proxmox.com
Tue Mar 27 09:45:53 CEST 2018


applied

On 03/22/2018 10:46 AM, Thomas Lamprecht wrote:
> Let user input MiB/s as values in the KiB/s range are not that handy
> and would make even smaller backups need several hours to restore,
> days for bigger ones.
> 
> Try to give the user imformation about per-storage bandwidth limits
> and how he can disable all of them.
> 
> Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
> ---
>   www/manager6/window/Restore.js | 17 ++++++++++++++++-
>   1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/www/manager6/window/Restore.js b/www/manager6/window/Restore.js
> index 14969f09..8927e096 100644
> --- a/www/manager6/window/Restore.js
> +++ b/www/manager6/window/Restore.js
> @@ -50,7 +50,18 @@ Ext.define('PVE.window.Restore', {
>   		fieldLabel: gettext('Source')
>   	    },
>   	    storagesel,
> -	    IDfield
> +	    IDfield,
> +	    {
> +		xtype: 'proxmoxintegerfield',
> +		name: 'bwlimit',
> +		fieldLabel: gettext('Read Limit (MiB/s)'),
> +		minValue: 0,
> +		emptyText: gettext('Defaults to target storage restore limit'),
> +		autoEl: {
> +		    tag: 'div',
> +		    'data-qtip': gettext("Use '0' to disable all bandwidth limits.")
> +		}
> +	    }
>   	];
>   
>   	if (me.vmtype === 'lxc') {
> @@ -107,6 +118,10 @@ Ext.define('PVE.window.Restore', {
>   		    force: me.vmid ? 1 : 0
>   		};
>   
> +		if (values.bwlimit !== undefined) {
> +		    params.bwlimit = values.bwlimit * 1024;
> +		}
> +
>   		var url;
>   		var msg;
>   		if (me.vmtype === 'lxc') {
> 




More information about the pve-devel mailing list