]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
Don't show empty parentheses when size is not known
authorFabian Ebner <f.ebner@proxmox.com>
Mon, 4 May 2020 08:50:39 +0000 (10:50 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 6 Jun 2020 16:49:08 +0000 (18:49 +0200)
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@proxmox.com>
www/manager6/window/Migrate.js

index ea4c9bc8a7ac85ef18680aa883a316d7c15ff75a..80d92ac06b673ad1873452859060abe2f890d1fe 100644 (file)
@@ -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'
                                });
                            }