Commit 85c5e755 authored by Dietmar Maurer's avatar Dietmar Maurer

migrate GUI: select online flag automatically

parent 331c0fe6
...@@ -40,6 +40,13 @@ Ext.define('PVE.window.Migrate', { ...@@ -40,6 +40,13 @@ Ext.define('PVE.window.Migrate', {
throw "no VM type specified"; throw "no VM type specified";
} }
var running = false;
var vmrec = PVE.data.ResourceStore.findRecord('vmid', me.vmid,
0, false, false, true);
if (vmrec && vmrec.data && vmrec.data.running) {
running = true;
}
me.formPanel = Ext.create('Ext.form.Panel', { me.formPanel = Ext.create('Ext.form.Panel', {
bodyPadding: 10, bodyPadding: 10,
border: false, border: false,
...@@ -60,6 +67,7 @@ Ext.define('PVE.window.Migrate', { ...@@ -60,6 +67,7 @@ Ext.define('PVE.window.Migrate', {
name: 'online', name: 'online',
uncheckedValue: 0, uncheckedValue: 0,
defaultValue: 0, defaultValue: 0,
checked: running,
fieldLabel: 'Online' fieldLabel: 'Online'
} }
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment