summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/services
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/services')
-rw-r--r--usecaseui-portal/src/app/services/services-list/services-list.component.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/usecaseui-portal/src/app/services/services-list/services-list.component.ts b/usecaseui-portal/src/app/services/services-list/services-list.component.ts
index 7fac33de..003e897f 100644
--- a/usecaseui-portal/src/app/services/services-list/services-list.component.ts
+++ b/usecaseui-portal/src/app/services/services-list/services-list.component.ts
@@ -95,11 +95,17 @@ export class ServicesListComponent implements OnInit {
getAlltemplates(){ //
this.myhttp.getAllServiceTemplates(this.templateTypeSelected)
.subscribe((data)=>{
- console.log(data)
+ // console.log(data)
this.templates = data;
if(this.templateTypeSelected=="Network Service"){
- this.templates = data.map((item)=>{return {name:item.packageInfo.csarName,id:item.csarId,packageInfo:item.packageInfo}});
+ this.templates = data.filter((d)=>{
+ return typeof d.packageInfo.csarName== "string";
+ }).map((item)=>{
+ let cName = item.packageInfo.csarName.split("/").reverse()[0];
+ return {name:cName,id:item.csarId,packageInfo:item.packageInfo}
+ });
}
+ console.log(this.templates);
this.template1 = this.templates[0];
this.template2 = this.templates[1];
this.template3 = this.templates[2];