1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-11 05:17:41 +03:00

Bug #4194: Check if elasticity_policies attr exists

This commit is contained in:
Carlos Martín 2015-11-24 16:59:20 +01:00
parent b5f584db91
commit 9663719eab
2 changed files with 10 additions and 6 deletions

View File

@ -196,9 +196,11 @@ define(function(require) {
$.extend( tmp_json, WizardFields.retrieve($("#"+div_id, context)) );
$.each(role.elasticity_policies, function(i, pol){
pol.expression = TemplateUtils.htmlDecode(pol.expression);
});
if (role.elasticity_policies != undefined){
$.each(role.elasticity_policies, function(i, pol){
pol.expression = TemplateUtils.htmlDecode(pol.expression);
});
}
role.user_inputs_values = tmp_json;

View File

@ -1680,9 +1680,11 @@ define(function(require) {
var role_template = $(this).data("opennebula");
$.each(role_template.elasticity_policies, function(i, pol){
pol.expression = TemplateUtils.htmlDecode(pol.expression);
});
if (role_template.elasticity_policies != undefined){
$.each(role_template.elasticity_policies, function(i, pol){
pol.expression = TemplateUtils.htmlDecode(pol.expression);
});
}
roles.push($.extend(role_template, {
"cardinality": $(".cardinality_value", $(this)).text(),