Feature #641: Add instantiate button to templates tab

This commit is contained in:
Hector Sanjuan authored and Ruben S. Montero committed 2011-05-13 17:24:03 +02:00
1 parent e13bc9ba9c
commit 4ce5d91d1c
1 file changed
+20
@@ -677,6 +677,21 @@ var template_actions = {
elements: function() { return getSelectedNodes(dataTable_templates); },
error: onError,
notify: true
},
"Template.instantiate" : {
type: "custom",
call: function(){
nodes = getSelectedNodes(dataTable_templates);
$.each(nodes,function(){
Sunstone.runAction("VM.create",
{vm : {
template_id: this
}
});
});
},
notify: false
}
}
@@ -693,6 +708,11 @@ var template_buttons = {
text: "+ New",
condition: True
},
"Template.instantiate" : {
type: "action",
text: "Instantiate",
condition: True
},
"Template.addattr_dialog" : {
type: "action",
text: "Add attribute",