diff options
author | Dan Timoney <dtimoney@att.com> | 2019-05-13 13:28:28 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-05-13 13:28:28 +0000 |
commit | 02b98200878ae243329916d2909a33fedab62576 (patch) | |
tree | d8af1f89fe7bb519227808b45e25ca25f651fbe0 /cds-ui/client/src/app/feature-modules/blueprint/modify-template | |
parent | 425e1b49c18f4caebea2af79849e81c5aefb34b3 (diff) | |
parent | 404162a4e997feba3fd6c21f438bcfe8e1ad2281 (diff) |
Merge "Fixed defect CCSDK-1326"
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/blueprint/modify-template')
-rw-r--r-- | cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts index ffe69029b..09fa00315 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts @@ -105,6 +105,7 @@ export class EditorComponent implements OnInit { private fileObject: any; private tocsaMetadaData: any; metadata: IMetaData; + uploadedFileName: string; private transformer = (node: Node, level: number) => { return { @@ -159,6 +160,7 @@ export class EditorComponent implements OnInit { this.filesData = blueprintdata.filesData; this.dataSource.data = this.filesTree; this.blueprintName = blueprintdata.name; + this.uploadedFileName = blueprintdata.uploadedFileName; let blueprint = []; for (let key in this.blueprintdata) { if (this.blueprintdata.hasOwnProperty(key)) { @@ -202,7 +204,8 @@ export class EditorComponent implements OnInit { blueprint: this.blueprint, name: this.blueprintName, files: this.filesTree, - filesData: this.filesData + filesData: this.filesData, + uploadedFileName: this.uploadedFileName } this.store.dispatch(new SetBlueprintState(blueprintState)); // console.log(this.text); @@ -218,7 +221,7 @@ export class EditorComponent implements OnInit { this.filetoDelete = file.name; this.currentFilePath = this.currentFilePath + this.selectedFile; this.filesData.forEach((fileNode) => { - if (fileNode.name.includes(file.name)) { + if (fileNode.name.includes(file.name) && fileNode.name == this.currentFilePath) { this.text = fileNode.data; } }) @@ -406,7 +409,9 @@ export class EditorComponent implements OnInit { this.paths = []; for (var file in zip.files) { this.fileObject = { - name: zip.files[file].name, + // name: zip.files[file].name, + // name: this.uploadedFileName + '/' + zip.files[file].name, + name: this.uploadedFileName + zip.files[file].name, data: '' }; const value = <any>await zip.files[file].async('string'); |