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

This commit is contained in:
Dietmar Maurer 2012-03-28 13:13:07 +02:00
parent 2cc2eaf2d5
commit 44147b3ac6
8 changed files with 63 additions and 5 deletions

View File

@ -1,3 +1,9 @@
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
* kvm network: allow to configure VLAN Id on the GUI

View File

@ -2,7 +2,7 @@ RELEASE=2.0
VERSION=2.0
PACKAGE=pve-manager
PACKAGERELEASE=50
PACKAGERELEASE=51
BINDIR=${DESTDIR}/usr/bin
PERLLIBDIR=${DESTDIR}/usr/share/perl5

View File

@ -7,6 +7,8 @@ all:
GNOME_IMAGES = \
start.png \
stop.png \
gtk-stop.png \
forward.png \
display.png \
keyboard.png \
cdrom.png \

BIN
www/images/forward.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

BIN
www/images/gtk-stop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

View File

@ -197,13 +197,11 @@ Ext.define('PVE.grid.ResourceGrid', {
if (record.data.type === 'qemu') {
menu = Ext.create('PVE.qemu.CmdMenu', {
vmid: record.data.vmid,
nodename: record.data.node
pveSelNode: record
});
} else if (record.data.type === 'openvz') {
menu = Ext.create('PVE.openvz.CmdMenu', {
vmid: record.data.vmid,
nodename: record.data.node
pveSelNode: record
});
} else {
return;

View File

@ -37,6 +37,18 @@ Ext.define('PVE.openvz.CmdMenu', {
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'),
icon: '/pve2/images/stop.png',
@ -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'),
icon: '/pve2/images/display.png',

View File

@ -37,6 +37,18 @@ Ext.define('PVE.qemu.CmdMenu', {
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'),
icon: '/pve2/images/stop.png',
@ -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'),
icon: '/pve2/images/display.png',