qemu right click menu : add vm convert to template
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
4fe1b0c0c1
commit
231d98f93f
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user