diff options
Diffstat (limited to 'cds-ui')
2 files changed, 10 insertions, 8 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts index fbdfd007a..dc5697f78 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts @@ -284,7 +284,8 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl checkSkipTypesOfAction() { console.log(this.cbaPackage); - if (this.cbaPackage.templateTopology.node_templates && this.cbaPackage.templateTopology.workflows) { + if (this.cbaPackage.templateTopology && this.cbaPackage.templateTopology.node_templates + && this.cbaPackage.templateTopology.workflows) { this.goToDesignerMode(this.id); } else { this.dataTarget = '#exampleModalLong'; diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts index a9deb675a..e2790d552 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts @@ -80,24 +80,25 @@ export class DesignerCreationMode extends PackageCreationModes { if (!key.includes(cbaPackage.metaData.name)) { files.push({file: key}); } else { - // it means this is entry definition insideVlbDefinition = JSON.parse(valueOfFile); } }); } console.log(vlbDefinition); - vlbDefinition.imports = files; - if (insideVlbDefinition && insideVlbDefinition.topology_template) { - vlbDefinition.topology_template = insideVlbDefinition.topology_template; - } console.log(cbaPackage.definitions.dslDefinition.content); - if (cbaPackage.definitions.dslDefinition.content) { + if (cbaPackage.definitions && cbaPackage.definitions.dslDefinition && + cbaPackage.definitions.dslDefinition.content) { vlbDefinition.dsl_definitions = JSON.parse(cbaPackage.definitions.dslDefinition.content); } - if (cbaPackage.templateTopology.content) { + vlbDefinition.imports = files; + if (insideVlbDefinition && insideVlbDefinition.topology_template) { + vlbDefinition.topology_template = insideVlbDefinition.topology_template; + } else if (cbaPackage.templateTopology && cbaPackage.templateTopology.content) { vlbDefinition.topology_template = JSON.parse(cbaPackage.templateTopology.content); } + + console.log(vlbDefinition); const value = packageCreationUtils.transformToJson(vlbDefinition); |