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