From: Arundathi Patil Date: Mon, 25 Mar 2019 07:09:02 +0000 (+0530) Subject: search-template change X-Git-Tag: 0.4.2~157^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F45%2F83145%2F1;p=ccsdk%2Fcds.git search-template change Removed the use of the shift array method which was removing the base folder entry from tree. Issue-ID: CCSDK-1171 Change-Id: Ic07a9fb89f9daba8d773d1d592c49566b28ac8f9 Signed-off-by: Arundathi Patil --- diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts index 777faee68..36876233d 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts @@ -60,6 +60,7 @@ export class SearchTemplateComponent implements OnInit { } fileChanged(e: any) { + this.paths = []; this.file = e.target.files[0]; this.zipFile.files = {}; this.zipFile.loadAsync(this.file) @@ -119,7 +120,7 @@ export class SearchTemplateComponent implements OnInit { paths.forEach((path) => { const pathParts = path.name.split('/'); - pathParts.shift(); + // pathParts.shift(); let currentLevel = tree; pathParts.forEach((part) => { @@ -131,7 +132,8 @@ export class SearchTemplateComponent implements OnInit { const newPart = { name: part, children: [], - data: path.data + data: path.data, + path : path.name }; if(part.trim() == this.blueprintName.trim()) { this.activationBlueprint = path.data;