From: Fabian Ebner Date: Mon, 4 May 2020 08:50:39 +0000 (+0200) Subject: Don't show empty parentheses when size is not known X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f0d9a96d765095cbabd2a80ce91411fea6098569;p=pve-manager-legacy.git Don't show empty parentheses when size is not known 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 --- diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js index ea4c9bc8..80d92ac0 100644 --- a/www/manager6/window/Migrate.js +++ b/www/manager6/window/Migrate.js @@ -266,10 +266,11 @@ Ext.define('PVE.window.Migrate', { }); } } else { + var size_string = disk.size ? '(' + PVE.Utils.render_size(disk.size) + ')' : ''; migration['with-local-disks'] = 1; migration.preconditions.push({ - text:'Migration with local disk might take long: ' + disk.volid - +' (' + PVE.Utils.render_size(disk.size) + ')', + text: Ext.String.format('Migration with local disk might take long: {0} {1}', + disk.volid, size_string), severity: 'warning' }); }