From 6c0366ef2bc92542f6bfce808476bd219dd06538 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Mon, 25 Mar 2019 12:39:02 +0530 Subject: 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 --- .../select-template/search-template/search-template.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cds-ui') 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; -- cgit 1.2.3-korg