qemu right click menu : add vm convert to template

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2013-04-22 17:56:08 +02:00 committed by Dietmar Maurer
parent 4fe1b0c0c1
commit 231d98f93f

View File

@ -89,6 +89,26 @@ Ext.define('PVE.qemu.CmdMenu', {
win.show();
}
},
{
text: gettext('Convert To Template'),
icon: '/pve2/images/forward.png',
handler: function() {
var msg = Ext.String.format(gettext("Do you really want convert VM {0} to template (You'll can use the VM anymore)?"), vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
PVE.Utils.API2Request({
url: '/nodes/' + nodename + '/qemu/' + vmid + '/template',
method: 'POST',
failure: function(response, opts) {
Ext.Msg.alert('Error', response.htmlStatus);
}
});
});
}
},
{
text: gettext('Console'),
icon: '/pve2/images/display.png',