Commit 47c9c22a authored by Dietmar Maurer's avatar Dietmar Maurer

use same button order everywhere

parent 47b80718
...@@ -233,6 +233,18 @@ Ext.define('PVE.KVMConsole', { ...@@ -233,6 +233,18 @@ Ext.define('PVE.KVMConsole', {
vm_command("start", {}, 1); vm_command("start", {}, 1);
} }
}, },
{
text: gettext('Shutdown'),
handler: function() {
var msg = Ext.String.format(gettext("Do you really want to shutdown VM {0}?"), me.vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
vm_command('shutdown', {timeout: 30});
});
}
},
{ {
text: gettext('Stop'), text: gettext('Stop'),
handler: function() { handler: function() {
...@@ -245,17 +257,6 @@ Ext.define('PVE.KVMConsole', { ...@@ -245,17 +257,6 @@ Ext.define('PVE.KVMConsole', {
}); });
} }
}, },
{
text: gettext('Migrate'),
handler: function() {
var win = Ext.create('PVE.window.Migrate', {
vmtype: 'qemu',
nodename: me.nodename,
vmid: me.vmid
});
win.show();
}
},
{ {
xtype: 'pveQemuSendKeyMenu', xtype: 'pveQemuSendKeyMenu',
nodename: me.nodename, nodename: me.nodename,
...@@ -273,18 +274,6 @@ Ext.define('PVE.KVMConsole', { ...@@ -273,18 +274,6 @@ Ext.define('PVE.KVMConsole', {
}); });
} }
}, },
{
text: gettext('Shutdown'),
handler: function() {
var msg = Ext.String.format(gettext("Do you really want to shutdown VM {0}?"), me.vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
vm_command('shutdown', {timeout: 30});
});
}
},
{ {
text: gettext('Suspend'), text: gettext('Suspend'),
handler: function() { handler: function() {
...@@ -303,6 +292,23 @@ Ext.define('PVE.KVMConsole', { ...@@ -303,6 +292,23 @@ Ext.define('PVE.KVMConsole', {
vm_command("resume"); vm_command("resume");
} }
}, },
{
text: gettext('Migrate'),
handler: function() {
var win = Ext.create('PVE.window.Migrate', {
vmtype: 'qemu',
nodename: me.nodename,
vmid: me.vmid
});
win.show();
}
},
{
text: gettext('Console'),
handler: function() {
PVE.Utils.openConoleWindow('kvm', me.vmid, me.nodename, me.vmname);
}
},
'->', '->',
{ {
text: gettext('Refresh'), text: gettext('Refresh'),
...@@ -317,12 +323,6 @@ Ext.define('PVE.KVMConsole', { ...@@ -317,12 +323,6 @@ Ext.define('PVE.KVMConsole', {
me.reloadApplet(); me.reloadApplet();
} }
}, },
{
text: gettext('Console'),
handler: function() {
PVE.Utils.openConoleWindow('kvm', me.vmid, me.nodename, me.vmname);
}
}
]; ];
Ext.apply(me, { Ext.apply(me, {
...@@ -374,29 +374,46 @@ Ext.define('PVE.OpenVZConsole', { ...@@ -374,29 +374,46 @@ Ext.define('PVE.OpenVZConsole', {
} }
}, },
{ {
text: gettext('Stop'), text: gettext('Shutdown'),
handler: function() { handler: function() {
var msg = Ext.String.format(gettext("Do you really want to stop VM {0}?"), me.vmid); var msg = Ext.String.format(gettext("Do you really want to shutdown VM {0}?"), me.vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) { Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') { if (btn !== 'yes') {
return; return;
} }
vm_command("stop", { fast: 1 }); vm_command("stop");
}); });
} }
}, },
{ {
text: gettext('Shutdown'), text: gettext('Stop'),
handler: function() { handler: function() {
var msg = Ext.String.format(gettext("Do you really want to shutdown VM {0}?"), me.vmid); var msg = Ext.String.format(gettext("Do you really want to stop VM {0}?"), me.vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) { Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') { if (btn !== 'yes') {
return; return;
} }
vm_command("stop"); vm_command("stop", { fast: 1 });
}); });
} }
}, },
{
text: gettext('Migrate'),
handler: function() {
var win = Ext.create('PVE.window.Migrate', {
vmtype: 'openvz',
nodename: me.nodename,
vmid: me.vmid
});
win.show();
}
},
{
text: gettext('Console'),
handler: function() {
PVE.Utils.openConoleWindow('openvz', me.vmid, me.nodename, me.vmname);
}
},
'->', '->',
{ {
text: gettext('Refresh'), text: gettext('Refresh'),
...@@ -410,14 +427,8 @@ Ext.define('PVE.OpenVZConsole', { ...@@ -410,14 +427,8 @@ Ext.define('PVE.OpenVZConsole', {
handler: function () { handler: function () {
me.reloadApplet(); me.reloadApplet();
} }
}, }
{ ];
text: gettext('Console'),
handler: function() {
PVE.Utils.openConoleWindow('openvz', me.vmid, me.nodename, me.vmname);
}
}
];
Ext.apply(me, { Ext.apply(me, {
tbar: tbar, tbar: tbar,
......
...@@ -96,8 +96,8 @@ Ext.define('PVE.openvz.Config', { ...@@ -96,8 +96,8 @@ Ext.define('PVE.openvz.Config', {
Ext.apply(me, { Ext.apply(me, {
title: Ext.String.format(gettext("Container {0} on node {1}"), descr, "'" + nodename + "'"), title: Ext.String.format(gettext("Container {0} on node {1}"), descr, "'" + nodename + "'"),
hstateid: 'ovztab', hstateid: 'ovztab',
tbar: [ startBtn, stopBtn, shutdownBtn, migrateBtn, tbar: [ startBtn, shutdownBtn, stopBtn, removeBtn,
removeBtn, consoleBtn ], migrateBtn, consoleBtn ],
defaults: { statusStore: me.statusStore }, defaults: { statusStore: me.statusStore },
items: [ items: [
{ {
......
...@@ -104,8 +104,8 @@ Ext.define('PVE.qemu.Config', { ...@@ -104,8 +104,8 @@ Ext.define('PVE.qemu.Config', {
Ext.apply(me, { Ext.apply(me, {
title: Ext.String.format(gettext("Virtual machine {0} on node {1}"), descr, "'" + nodename + "'"), title: Ext.String.format(gettext("Virtual machine {0} on node {1}"), descr, "'" + nodename + "'"),
hstateid: 'kvmtab', hstateid: 'kvmtab',
tbar: [ startBtn, stopBtn, resetBtn, shutdownBtn, tbar: [ startBtn, shutdownBtn, stopBtn, resetBtn,
migrateBtn, removeBtn, consoleBtn ], removeBtn, migrateBtn, consoleBtn ],
defaults: { statusStore: me.statusStore }, defaults: { statusStore: me.statusStore },
items: [ items: [
{ {
......
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