aboutsummaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/services
diff options
context:
space:
mode:
authorguochuyicmri <guochuyi@chinamobile.com>2018-11-14 16:27:11 +0800
committerguochuyicmri <guochuyi@chinamobile.com>2018-11-14 16:27:58 +0800
commit946f2383255ef8c05473251213209c301bb1c9b5 (patch)
tree404ebfa795d1979f9710274c5f6cccc4d4591110 /usecaseui-portal/src/app/services
parent5ac64c3efb45812c5277d1c3728d55418d60e6ca (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')
-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];