[pve-devel] [PATCH] resourcegrid : add template menu

Alexandre Derumier aderumier at odiso.com
Thu Aug 28 16:15:52 CEST 2014


same than the resourcetree
or we can create linked clone from the grid

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 www/manager/grid/ResourceGrid.js |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/www/manager/grid/ResourceGrid.js b/www/manager/grid/ResourceGrid.js
index e5568f6..6212fe7 100644
--- a/www/manager/grid/ResourceGrid.js
+++ b/www/manager/grid/ResourceGrid.js
@@ -195,10 +195,14 @@ Ext.define('PVE.grid.ResourceGrid', {
 		    v.select(record);
 		    var menu;
 		    
-		    if (record.data.type === 'qemu') {
+		    if (record.data.type === 'qemu' && !record.data.template) {
 			menu = Ext.create('PVE.qemu.CmdMenu', {
 			    pveSelNode: record
 			});
+		    } else if (record.data.type === 'qemu' && record.data.template) {
+			menu = Ext.create('PVE.qemu.TemplateMenu', {
+			    pveSelNode: record
+			});
 		    } else if (record.data.type === 'openvz') {
 			menu = Ext.create('PVE.openvz.CmdMenu', {
 			    pveSelNode: record
@@ -225,4 +229,4 @@ Ext.define('PVE.grid.ResourceGrid', {
 	updateGrid();
 	rstore.on("load", load_cb);
     }
-});
\ No newline at end of file
+});
-- 
1.7.10.4




More information about the pve-devel mailing list