Commit fbf2ad18 authored by Dietmar Maurer's avatar Dietmar Maurer

fix bug #55: add Migrate and Stop to context menu

parent ca39b13b
pve-manager (2.0-51) unstable; urgency=low
* fix bug #55: add Migrate and Stop to context menu
-- Proxmox Support Team <support@proxmox.com> Wed, 28 Mar 2012 13:12:19 +0200
pve-manager (2.0-50) unstable; urgency=low pve-manager (2.0-50) unstable; urgency=low
* kvm network: allow to configure VLAN Id on the GUI * kvm network: allow to configure VLAN Id on the GUI
......
...@@ -2,7 +2,7 @@ RELEASE=2.0 ...@@ -2,7 +2,7 @@ RELEASE=2.0
VERSION=2.0 VERSION=2.0
PACKAGE=pve-manager PACKAGE=pve-manager
PACKAGERELEASE=50 PACKAGERELEASE=51
BINDIR=${DESTDIR}/usr/bin BINDIR=${DESTDIR}/usr/bin
PERLLIBDIR=${DESTDIR}/usr/share/perl5 PERLLIBDIR=${DESTDIR}/usr/share/perl5
......
...@@ -7,6 +7,8 @@ all: ...@@ -7,6 +7,8 @@ all:
GNOME_IMAGES = \ GNOME_IMAGES = \
start.png \ start.png \
stop.png \ stop.png \
gtk-stop.png \
forward.png \
display.png \ display.png \
keyboard.png \ keyboard.png \
cdrom.png \ cdrom.png \
......
...@@ -197,13 +197,11 @@ Ext.define('PVE.grid.ResourceGrid', { ...@@ -197,13 +197,11 @@ Ext.define('PVE.grid.ResourceGrid', {
if (record.data.type === 'qemu') { if (record.data.type === 'qemu') {
menu = Ext.create('PVE.qemu.CmdMenu', { menu = Ext.create('PVE.qemu.CmdMenu', {
vmid: record.data.vmid, pveSelNode: record
nodename: record.data.node
}); });
} else if (record.data.type === 'openvz') { } else if (record.data.type === 'openvz') {
menu = Ext.create('PVE.openvz.CmdMenu', { menu = Ext.create('PVE.openvz.CmdMenu', {
vmid: record.data.vmid, pveSelNode: record
nodename: record.data.node
}); });
} else { } else {
return; return;
......
...@@ -37,6 +37,18 @@ Ext.define('PVE.openvz.CmdMenu', { ...@@ -37,6 +37,18 @@ Ext.define('PVE.openvz.CmdMenu', {
vm_command('start'); vm_command('start');
} }
}, },
{
text: gettext('Migrate'),
icon: '/pve2/images/forward.png',
handler: function() {
var win = Ext.create('PVE.window.Migrate', {
vmtype: 'openvz',
nodename: nodename,
vmid: vmid
});
win.show();
}
},
{ {
text: gettext('Shutdown'), text: gettext('Shutdown'),
icon: '/pve2/images/stop.png', icon: '/pve2/images/stop.png',
...@@ -51,6 +63,20 @@ Ext.define('PVE.openvz.CmdMenu', { ...@@ -51,6 +63,20 @@ Ext.define('PVE.openvz.CmdMenu', {
}); });
} }
}, },
{
text: gettext('Stop'),
icon: '/pve2/images/gtk-stop.png',
handler: function() {
var msg = Ext.String.format(gettext("Do you really want to stop VM {0}?"), vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
vm_command("stop");
});
}
},
{ {
text: gettext('Console'), text: gettext('Console'),
icon: '/pve2/images/display.png', icon: '/pve2/images/display.png',
......
...@@ -37,6 +37,18 @@ Ext.define('PVE.qemu.CmdMenu', { ...@@ -37,6 +37,18 @@ Ext.define('PVE.qemu.CmdMenu', {
vm_command('start'); vm_command('start');
} }
}, },
{
text: gettext('Migrate'),
icon: '/pve2/images/forward.png',
handler: function() {
var win = Ext.create('PVE.window.Migrate', {
vmtype: 'qemu',
nodename: nodename,
vmid: vmid
});
win.show();
}
},
{ {
text: gettext('Shutdown'), text: gettext('Shutdown'),
icon: '/pve2/images/stop.png', icon: '/pve2/images/stop.png',
...@@ -51,6 +63,20 @@ Ext.define('PVE.qemu.CmdMenu', { ...@@ -51,6 +63,20 @@ Ext.define('PVE.qemu.CmdMenu', {
}); });
} }
}, },
{
text: gettext('Stop'),
icon: '/pve2/images/gtk-stop.png',
handler: function() {
var msg = Ext.String.format(gettext("Do you really want to stop VM {0}?"), vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
vm_command("stop", { timeout: 30 });
});
}
},
{ {
text: gettext('Console'), text: gettext('Console'),
icon: '/pve2/images/display.png', icon: '/pve2/images/display.png',
......
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