Merge "Fixed defect CCSDK-1610"
authorBrinda Santh Muthuramalingam <brindasanth@in.ibm.com>
Thu, 29 Aug 2019 14:29:03 +0000 (14:29 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 29 Aug 2019 14:29:03 +0000 (14:29 +0000)
cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts

index 5a0b96c..35643ee 100644 (file)
@@ -148,16 +148,11 @@ export class MetadataComponent implements OnInit {
     this.loader.showLoader();
     this.metadata = Object.assign({}, this.CBAMetadataForm.value);
     this.blueprint.metadata = this.metadata;
-    /*if (this.blueprint &&
-      this.blueprint['topology_template'] &&
-      this.blueprint['topology_template'].workflows &&
-      this.blueprint['topology_template'].workflows['resource-assignment'] &&
-      this.blueprint['topology_template'].workflows['resource-assignment'].name) {
-      delete this.blueprint['topology_template'].workflows['resource-assignment'].name;
-    }*/
     this.filesData.forEach((fileNode) => {
       if (fileNode.name.includes(this.blueprintName) && fileNode.name == this.entryDefinition) {
-        fileNode.data = JSON.stringify(this.blueprint, null, "\t");
+        let tempNodeData = JSON.parse(fileNode.data);
+        tempNodeData.metadata = this.blueprint.metadata;
+        fileNode.data = JSON.stringify(tempNodeData, null, "\t");
       }
     });
     let blueprintState = {