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

F #5720: Fix Sunstone error popup (#1743)

Show Popup when the template does not have the VMGROUP_ID
This commit is contained in:
Jorge Miguel Lobo Escalona 2022-02-02 11:38:43 +01:00 committed by GitHub
parent 7889b219cc
commit 94d60e71de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,14 +90,14 @@ define(function(require) {
});
$("#role_section",context).hide();
$(".role_table_section", context).prop("required", false);
if(template_json.VMTEMPLATE.TEMPLATE.VMGROUP){
if(template_json.VMTEMPLATE.TEMPLATE.VMGROUP && template_json.VMTEMPLATE.TEMPLATE.VMGROUP.VMGROUP_ID){
this.vmGroupTable.selectResourceTableSelect({ids:template_json.VMTEMPLATE.TEMPLATE.VMGROUP.VMGROUP_ID});
_generate_provision_role_table(context, template_json.VMTEMPLATE.TEMPLATE.VMGROUP.VMGROUP_ID, template_json.VMTEMPLATE.TEMPLATE.VMGROUP.ROLE);
}
}
function _fill(context, templateJSON, vmGroupTable){
if(templateJSON.VMGROUP){
if(templateJSON.VMGROUP && templateJSON.VMGROUP.VMGROUP_ID){
var element = templateJSON.VMGROUP;
vmGroupTable.selectResourceTableSelect({ids:element.VMGROUP_ID});
_generate_provision_role_table(context,element.VMGROUP_ID, element.ROLE);