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', {
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'),
handler: function() {
......@@ -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',
nodename: me.nodename,
......@@ -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'),
handler: function() {
......@@ -303,6 +292,23 @@ Ext.define('PVE.KVMConsole', {
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'),
......@@ -317,12 +323,6 @@ Ext.define('PVE.KVMConsole', {
me.reloadApplet();
}
},
{
text: gettext('Console'),
handler: function() {
PVE.Utils.openConoleWindow('kvm', me.vmid, me.nodename, me.vmname);
}
}
];
Ext.apply(me, {
......@@ -374,29 +374,46 @@ Ext.define('PVE.OpenVZConsole', {
}
},
{
text: gettext('Stop'),
text: gettext('Shutdown'),
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) {
if (btn !== 'yes') {
return;
}
vm_command("stop", { fast: 1 });
vm_command("stop");
});
}
},
{
text: gettext('Shutdown'),
text: gettext('Stop'),
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) {
if (btn !== 'yes') {
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'),
......@@ -410,14 +427,8 @@ Ext.define('PVE.OpenVZConsole', {
handler: function () {
me.reloadApplet();
}
},
{
text: gettext('Console'),
handler: function() {
PVE.Utils.openConoleWindow('openvz', me.vmid, me.nodename, me.vmname);
}
}
];
}
];
Ext.apply(me, {
tbar: tbar,
......
......@@ -96,8 +96,8 @@ Ext.define('PVE.openvz.Config', {
Ext.apply(me, {
title: Ext.String.format(gettext("Container {0} on node {1}"), descr, "'" + nodename + "'"),
hstateid: 'ovztab',
tbar: [ startBtn, stopBtn, shutdownBtn, migrateBtn,
removeBtn, consoleBtn ],
tbar: [ startBtn, shutdownBtn, stopBtn, removeBtn,
migrateBtn, consoleBtn ],
defaults: { statusStore: me.statusStore },
items: [
{
......
......@@ -104,8 +104,8 @@ Ext.define('PVE.qemu.Config', {
Ext.apply(me, {
title: Ext.String.format(gettext("Virtual machine {0} on node {1}"), descr, "'" + nodename + "'"),
hstateid: 'kvmtab',
tbar: [ startBtn, stopBtn, resetBtn, shutdownBtn,
migrateBtn, removeBtn, consoleBtn ],
tbar: [ startBtn, shutdownBtn, stopBtn, resetBtn,
removeBtn, migrateBtn, consoleBtn ],
defaults: { statusStore: me.statusStore },
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