aboutsummaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/services
diff options
context:
space:
mode:
authorTao Shen <shentao@chinamobile.com>2018-11-14 09:28:07 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-14 09:28:07 +0000
commita79f49321ee56b66011f8daba0ecaee4d6b63670 (patch)
tree448d6d06822c9e97bbd037bbb2f617a8ce8c66b2 /usecaseui-portal/src/app/services
parent53266fd0f2709e2f1a3d87b073d317e0579fa1f0 (diff)
parent946f2383255ef8c05473251213209c301bb1c9b5 (diff)
Merge "fix ns service instantiation for vf-c"
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];