Commit 231d98f9 authored by Alexandre Derumier's avatar Alexandre Derumier Committed by Dietmar Maurer

qemu right click menu : add vm convert to template

Signed-off-by: 's avatarAlexandre Derumier <aderumier@odiso.com>
parent 4fe1b0c0
...@@ -89,6 +89,26 @@ Ext.define('PVE.qemu.CmdMenu', { ...@@ -89,6 +89,26 @@ Ext.define('PVE.qemu.CmdMenu', {
win.show(); 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'), 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