diff options
author | 2018-11-14 16:27:11 +0800 | |
---|---|---|
committer | 2018-11-14 16:27:58 +0800 | |
commit | 946f2383255ef8c05473251213209c301bb1c9b5 (patch) | |
tree | 404ebfa795d1979f9710274c5f6cccc4d4591110 /usecaseui-portal/src/app/services/services-list/services-list.component.ts | |
parent | 5ac64c3efb45812c5277d1c3728d55418d60e6ca (diff) |
fix ns service instantiation for vf-c
Change-Id: I88e5e856c88859dc990a1c50b61e3c3639ba3b79
Issue-ID: USECASEUI-160
Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/services/services-list/services-list.component.ts')
-rw-r--r-- | usecaseui-portal/src/app/services/services-list/services-list.component.ts | 10 |
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]; |