1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Bug : Uncheck context on update if context doesn't exist

As a bonus, set memory default on VM template create
This commit is contained in:
Tino Vazquez 2013-09-13 16:47:08 +02:00
parent 15ae2c9fa4
commit ff9210f95e

@ -4588,6 +4588,9 @@ function fillTemplatePopUp(request, response){
var context = template.CONTEXT;
var context_section = $('li#contextTab', $create_template_dialog);
$("#ssh_context", context_section).removeAttr('checked');
$("#network_context", context_section).removeAttr('checked');
if (context) {
var file_ds_regexp = /\$FILE\[IMAGE_ID=([0-9]+)+/g;
var net_regexp = /^NETWORK$/;;
@ -4598,8 +4601,6 @@ function fillTemplatePopUp(request, response){
var net_flag = false;
var files = [];
$("#ssh_context", context_section).removeAttr('checked');
$("#network_context", context_section).removeAttr('checked');
$.each(context, function(key, value){
if (ssh_regexp.test(key)) {
$("#ssh_context", context_section).attr('checked','checked');