[pve-devel] [PATCH manager 1/3] Don't show empty parentheses when size is not known

Dominik Csapak d.csapak at proxmox.com
Thu Apr 30 13:32:19 CEST 2020


one comment inline

On 4/30/20 12:59 PM, Fabian Ebner wrote:
> The size of VM state files and the size of unused disks not
> referenced by any snapshot is not saved in the VM configuration,
> so it's not available here either.
> 
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
>   www/manager6/window/Migrate.js | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js
> index 61bc6a49..9fc66a9b 100644
> --- a/www/manager6/window/Migrate.js
> +++ b/www/manager6/window/Migrate.js
> @@ -269,7 +269,7 @@ Ext.define('PVE.window.Migrate', {
>   				migration['with-local-disks'] = 1;
>   				migration.preconditions.push({
>   				    text:'Migration with local disk might take long: ' + disk.volid
> -					+' (' + PVE.Utils.render_size(disk.size) + ')',
> +					+ (disk.size ? ' (' + PVE.Utils.render_size(disk.size) + ')' : ''),\

we are already deeply nested here and the line is already very long,
i would rather put the text above in a variable
(and maybe use template strings)


>   				    severity: 'warning'
>   				});
>   			    }
> 




More information about the pve-devel mailing list