diff options
author | 2020-09-30 10:48:55 +0200 | |
---|---|---|
committer | 2020-09-30 10:48:55 +0200 | |
commit | 3014f76845b6f17b2b389ec08773bec506494f6f (patch) | |
tree | 622fc788df34b35d4d90fea322a16d5d5073e3d1 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation | |
parent | db9eee076faac066ff337193a9211d28cd206711 (diff) |
improving creating the package
Issue-ID: CCSDK-2298
Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com>
Change-Id: Id50c6d0ee1bf4336e1eba6a9491b15c778cec4e8
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts | 15 |
1 files changed, 8 insertions, 7 deletions
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); |