diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js
index 0ba5a0e238..f21fee47dc 100644
--- a/src/sunstone/public/js/plugins/vms-tab.js
+++ b/src/sunstone/public/js/plugins/vms-tab.js
@@ -102,55 +102,6 @@ var vms_tab_content = '\
\
';
-//var create_vm_tmpl ='\
-//
\
-//
\
-// \
-//
\
-// \
-// ';
-
var create_vm_tmpl ='\
\
\
@@ -695,44 +646,7 @@ var vm_actions = {
},
error: vmMonitorError
},
-/*
- "VM.pool_monitor" : {
- type: "monitor_global",
- call : OpenNebula.VM.pool_monitor,
- callback: function(req,response) {
- var vm_dashboard_graphs = [
- { labels : "Network transmission",
- monitor_resources : "NET_TX",
- humanize_figures : true,
- convert_from_bytes : true,
- y_sufix : "B/s",
- derivative : true,
- div_graph : $("#dash_vm_net_tx_graph", $dashboard)
- },
- { labels : "Network reception",
- monitor_resources : "NET_RX",
- humanize_figures : true,
- convert_from_bytes : true,
- y_sufix : "B/s",
- derivative : true,
- div_graph : $("#dash_vm_net_rx_graph", $dashboard)
- }
- ];
- for(var i=0; i×\
');
- //dialog.dialog({
- // autoOpen:false,
- // width:750,
- // modal:true,
- // height:500,
- // resizable:true,
- // closeOnEscape: false
- //});
dialog.addClass("reveal-modal large max-height");
$('#sendCtrlAltDelButton',dialog).click(function(){
@@ -3288,13 +3194,8 @@ $(document).ready(function(){
})
-
- //addElement([
- // spinner,
- // '','','','','','','','','','',''],dataTable_vMachines);
Sunstone.runAction("VM.list");
- //setupCreateVMDialog();
setVMAutorefresh();
setupVNC();
hotpluggingOps();
diff --git a/src/sunstone/public/js/sunstone-util.js b/src/sunstone/public/js/sunstone-util.js
index 8730ebbeb4..b310325d41 100644
--- a/src/sunstone/public/js/sunstone-util.js
+++ b/src/sunstone/public/js/sunstone-util.js
@@ -1842,10 +1842,13 @@ function insert_extended_template_table(template_json,resource_type,resource_id,
// Add listener for add key and add value for Extended Template
$('#button_add_value').live("click", function() {
- if ( $('#new_value').val() != "" && $('#new_key').val() != "" )
+ new_value = $('#new_value',$(this).parent().parent()).val();
+ new_key = $('#new_key',$(this).parent().parent()).val();
+
+ if ( new_value != "" && new_key != "" )
{
var template_json_bk = $.extend({}, template_json);
- template_json[$.trim($('#new_key').val())] = $.trim($('#new_value').val());
+ template_json[$.trim(new_key)] = $.trim(new_value);
template_str = convert_template_to_string(template_json,unshown_values);
Sunstone.runAction(resource_type+".update_template",resource_id,template_str);
@@ -1861,7 +1864,7 @@ function insert_extended_template_table(template_json,resource_type,resource_id,
if (key == 13)
{
//Get the button the user wants to have clicked
- $('#button_add_value').click();
+ $('#button_add_value', $(this).parent().parent()).click();
ev.preventDefault();
}
})