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.eb...@proxmox.com>
---

Changes from v1:
    * use variable for size text and use format string
    * drop patch exposing target storage for offline migration
    * and adapt comment

 www/manager6/window/Migrate.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js
index 61bc6a49..42a54246 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'
                                });
                            }
-- 
2.20.1


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to