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

use same button order everywhere

parent 47b80718
......@@ -234,26 +234,27 @@ Ext.define('PVE.KVMConsole', {
}
},
{
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", { timeout: 30});
vm_command('shutdown', {timeout: 30});
});
}
},
{
text: gettext('Migrate'),
text: gettext('Stop'),
handler: function() {
var win = Ext.create('PVE.window.Migrate', {
vmtype: 'qemu',
nodename: me.nodename,
vmid: 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", { timeout: 30});
});
win.show();
}
},
{
......@@ -274,33 +275,38 @@ Ext.define('PVE.KVMConsole', {
}
},
{
text: gettext('Shutdown'),
text: gettext('Suspend'),
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 suspend VM {0}?"), me.vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
vm_command('shutdown', {timeout: 30});
vm_command("suspend");
});
}
},
{
text: gettext('Suspend'),
text: gettext('Resume'),
handler: function() {
var msg = Ext.String.format(gettext("Do you really want to suspend VM {0}?"), me.vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
vm_command("resume");
}
vm_command("suspend");
},
{
text: gettext('Migrate'),
handler: function() {
var win = Ext.create('PVE.window.Migrate', {
vmtype: 'qemu',
nodename: me.nodename,
vmid: me.vmid
});
win.show();
}
},
{
text: gettext('Resume'),
text: gettext('Console'),
handler: function() {
vm_command("resume");
PVE.Utils.openConoleWindow('kvm', me.vmid, me.nodename, me.vmname);
}
},
'->',
......@@ -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,12 +427,6 @@ Ext.define('PVE.OpenVZConsole', {
handler: function () {
me.reloadApplet();
}
},
{
text: gettext('Console'),
handler: function() {
PVE.Utils.openConoleWindow('openvz', me.vmid, me.nodename, me.vmname);
}
}
];
......
......@@ -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