]> git.proxmox.com Git - pve-manager.git/blobdiff - www/manager6/window/Migrate.js
ui: ceph install mask: avoid showing version
[pve-manager.git] / www / manager6 / window / Migrate.js
index 61bc6a492401ef0c213df472a0e70c41ade53193..91d1b30b79c6be7aee9055416d0b17ec84942d12 100644 (file)
@@ -1,10 +1,10 @@
-/*jslint confusion: true*/
 Ext.define('PVE.window.Migrate', {
     extend: 'Ext.window.Window',
 
     vmtype: undefined,
     nodename: undefined,
     vmid: undefined,
+    maxHeight: 450,
 
     viewModel: {
        data: {
@@ -126,8 +126,9 @@ Ext.define('PVE.window.Migrate', {
            if (vm.get('migration.with-local-disks')) {
                params['with-local-disks'] = 1;
            }
-           //only submit targetstorage if vm is running, storage migration to different storage is only possible online
-           if (vm.get('migration.with-local-disks') && vm.get('running')) {
+           //offline migration to a different storage currently might fail at a late stage
+           //(i.e. after some disks have been moved), so don't expose it yet in the GUI
+           if (vm.get('migration.with-local-disks') && vm.get('running') && values.targetstorage) {
                params.targetstorage = values.targetstorage;
            }
 
@@ -266,10 +267,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'
                                });
                            }
@@ -306,13 +308,11 @@ Ext.define('PVE.window.Migrate', {
            reference: 'formPanel',
            bodyPadding: 10,
            border: false,
-           layout: {
-               type: 'column'
-           },
+           layout: 'hbox',
            items: [
                {
                    xtype: 'container',
-                   columnWidth: 0.5,
+                   flex: 1,
                    items: [{
                        xtype: 'displayfield',
                        name: 'source',
@@ -332,7 +332,7 @@ Ext.define('PVE.window.Migrate', {
                },
                {
                    xtype: 'container',
-                   columnWidth: 0.5,
+                   flex: 1,
                    items: [{
                        xtype: 'pveNodeSelector',
                        reference: 'pveNodeSelector',
@@ -351,6 +351,9 @@ Ext.define('PVE.window.Migrate', {
                            name: 'targetstorage',
                            fieldLabel: gettext('Target storage'),
                            storageContent: 'images',
+                           allowBlank: true,
+                           autoSelect: false,
+                           emptyText: gettext('Current layout'),
                            bind: {
                                hidden: '{setStorageselectorHidden}'
                            }
@@ -403,8 +406,9 @@ Ext.define('PVE.window.Migrate', {
            bind: {
                hidden: '{!migration.preconditions.length}',
                store: {
-                   fields: ['severity','text'],
-                   data: '{migration.preconditions}'
+                   fields: ['severity', 'text'],
+                   data: '{migration.preconditions}',
+                   sorters: 'text',
                }
            }
        }