]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: migrate: add storage and size information to preconditions
authorTim Marx <t.marx@proxmox.com>
Fri, 28 Jun 2019 13:13:46 +0000 (15:13 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 28 Jun 2019 15:42:21 +0000 (17:42 +0200)
Signed-off-by: Tim Marx <t.marx@proxmox.com>
www/manager6/window/Migrate.js

index 99d4601286c84dbc393f57877a2609529717e329..f83feab19cacab3c4e007d329354b11288c90843 100644 (file)
@@ -197,11 +197,15 @@ Ext.define('PVE.window.Migrate', {
 
                    if (migrateStats.allowed_nodes) {
                        migration.allowedNodes = migrateStats.allowed_nodes;
+                       var target = me.lookup('pveNodeSelector').value;
+                       if (target.length && !migrateStats.allowed_nodes.includes(target)) {
+                           let disallowed = migrateStats.not_allowed_nodes[target];
+                           let missing_storages = disallowed.unavailable_storages.join(', ');
 
-                       if (!migrateStats.allowed_nodes.includes(me.lookup('pveNodeSelector').value)) {
                            migration.possible = false;
                            migration.preconditions.push({
-                               text: 'Local storage not available on selected Node, start VM to use live storage migration or select other target node',
+                               text: 'Storage (' + missing_storages + ') not available on selected target. ' +
+                                 'Start VM to use live storage migration or select other target node',
                                severity: 'error'
                            });
                        }
@@ -221,7 +225,7 @@ Ext.define('PVE.window.Migrate', {
                            if (disk.cdrom && disk.cdrom === 1) {
                                migration.possible = false;
                                migration.preconditions.push({
-                                   text:'Can\'t migrate VM with local CD/DVD',
+                                   text: "Can't migrate VM with local CD/DVD",
                                    severity: 'error'
                                });
 
@@ -234,7 +238,8 @@ Ext.define('PVE.window.Migrate', {
                            } else {
                                migration['with-local-disks'] = 1;
                                migration.preconditions.push({
-                                   text:'Migration with local disk might take long: '+ disk.volid,
+                                   text:'Migration with local disk might take long: ' + disk.volid
+                                       +' (' + PVE.Utils.render_size(disk.size) + ')',
                                    severity: 'warning'
                                });
                            }