[pve-devel] [PATCH 10/11] qemu right click menu : add vm convert to template
Alexandre Derumier
aderumier at odiso.com
Thu Feb 14 12:04:05 CET 2013
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
www/manager/qemu/CmdMenu.js | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/www/manager/qemu/CmdMenu.js b/www/manager/qemu/CmdMenu.js
index f80922b..3dedc43 100644
--- a/www/manager/qemu/CmdMenu.js
+++ b/www/manager/qemu/CmdMenu.js
@@ -90,6 +90,26 @@ Ext.define('PVE.qemu.CmdMenu', {
}
},
{
+ 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',
handler: function() {
--
1.7.10.4
More information about the pve-devel
mailing list