summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShaabanEltanany <shaaban.eltanany.ext@orange.com>2020-09-30 10:48:55 +0200
committerShaabanEltanany <shaaban.eltanany.ext@orange.com>2020-09-30 10:48:55 +0200
commit3014f76845b6f17b2b389ec08773bec506494f6f (patch)
tree622fc788df34b35d4d90fea322a16d5d5073e3d1
parentdb9eee076faac066ff337193a9211d28cd206711 (diff)
improving creating the package
Issue-ID: CCSDK-2298 Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com> Change-Id: Id50c6d0ee1bf4336e1eba6a9491b15c778cec4e8
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts3
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts15
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);