mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-20 10:50:08 +03:00
Bug #1962: Extended template table now is more careful with context
Removed commented code
This commit is contained in:
parent
e1caa587b2
commit
7b56ae8301
@ -102,55 +102,6 @@ var vms_tab_content = '\
|
||||
</table>\
|
||||
</form>';
|
||||
|
||||
//var create_vm_tmpl ='\
|
||||
// <div class="panel">\
|
||||
// <h3>\
|
||||
// <small id="create_vnet_header">'+tr("Create Virtual Machine")+'</small>\
|
||||
// </h3>\
|
||||
// </div>\
|
||||
// <form id="create_vm_form" action="">\
|
||||
// <div class="row centered">\
|
||||
// <div class="four columns">\
|
||||
// <label class="inline right" for="vm_name">'+tr("VM Name")+':</label>\
|
||||
// </div>\
|
||||
// <div class="seven columns">\
|
||||
// <input type="text" name="vm_name" id="vm_name" />\
|
||||
// </div>\
|
||||
// <div class="one columns">\
|
||||
// <div class="tip">'+tr("Defaults to template name when emtpy")+'.</div>\
|
||||
// </div>\
|
||||
// </div>\
|
||||
// <div class="row centered">\
|
||||
// <div class="four columns">\
|
||||
// <label class="inline right" for="template_id">'+tr("Select template")+':</label>\
|
||||
// </div>\
|
||||
// <div class="seven columns">\
|
||||
// <select id="template_id">\
|
||||
// </select>\
|
||||
// </div>\
|
||||
// <div class="one columns">\
|
||||
// <div class=""></div>\
|
||||
// </div>\
|
||||
// </div>\
|
||||
// <div class="row centered">\
|
||||
// <div class="four columns">\
|
||||
// <label class="inline right" for="vm_n_times">'+tr("Deploy # VMs")+':</label>\
|
||||
// </div>\
|
||||
// <div class="seven columns">\
|
||||
// <input type="text" name="vm_n_times" id="vm_n_times" value="1">\
|
||||
// </div>\
|
||||
// <div class="one columns">\
|
||||
// <div class="tip">'+tr("You can use the wildcard %i. When creating several VMs, %i will be replaced with a different number starting from 0 in each of them")+'.</div>\
|
||||
// </div>\
|
||||
// </div>\
|
||||
// <hr>\
|
||||
// <div class="form_buttons">\
|
||||
// <button class="button radius right success" id="create_vm_proceed" value="VM.create">'+tr("Create")+'</button>\
|
||||
// <button class="close-reveal-modal button secondary radius" type="button" value="close">' + tr("Close") + '</button>\
|
||||
// </div>\
|
||||
//<a class="close-reveal-modal">×</a>\
|
||||
//</form>';
|
||||
|
||||
var create_vm_tmpl ='\
|
||||
<div class="panel">\
|
||||
<h3>\
|
||||
@ -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<vm_dashboard_graphs.length; i++) {
|
||||
plot_totals(
|
||||
response,
|
||||
vm_dashboard_graphs[i]
|
||||
);
|
||||
}
|
||||
|
||||
// TODO: refresh individual info panel graphs with this new data?
|
||||
},
|
||||
|
||||
// TODO: ignore error, or set message similar to hostMonitorError?
|
||||
error: onError
|
||||
},
|
||||
*/
|
||||
"VM.chown" : {
|
||||
type: "multiple",
|
||||
call: OpenNebula.VM.chown,
|
||||
@ -3182,14 +3096,6 @@ function setupVNC(){
|
||||
<a class="close-reveal-modal">×</a>\
|
||||
');
|
||||
|
||||
//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();
|
||||
|
@ -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();
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user