From b7554f331652dfb9a7b987ef8ef72dc4b5c68b66 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Mon, 23 Dec 2019 14:38:21 +0800 Subject: feat:Optimize the compatibility of front-end data rendering Change-Id: I8336d68717c86f6b5268e70bfcd5fa0feda9d4a7 Issue-ID: USECASEUI-369 Signed-off-by: cyuamber --- .../nsi-management/nsi-model/nsi-model.component.ts | 12 ++++++++++-- .../nssi-management/nssi-model/nssi-model.component.ts | 6 +++++- .../slicing-business-model.component.ts | 11 +++++++++-- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts index 569a018f..0ae21d45 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts @@ -27,8 +27,16 @@ export class NsiModelComponent implements OnInit { this.isSpinning = false; const {result_header: {result_code}, result_body: {hosted_business_list,included_nssi_list} } = res; if (+result_code === 200) { - this.businessList = hosted_business_list; - this.nssiList = included_nssi_list; + this.businessList = hosted_business_list.map((item)=>{ + if(item.service_instance_id !==null){ + return item + } + }); + this.nssiList = included_nssi_list.map((item)=>{ + if(item.service_instance_id !==null){ + return item + } + }); } }) } diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-model/nssi-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-model/nssi-model.component.ts index 034d8666..e20d81ed 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-model/nssi-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-model/nssi-model.component.ts @@ -25,7 +25,11 @@ export class NssiModelComponent implements OnInit { this.isSpinning = false; const {result_header: {result_code}, result_body: {hosted_nsi_list} } = res; if (+result_code === 200) { - this.nsiList = hosted_nsi_list; + this.nsiList = hosted_nsi_list.map((item)=>{ + if(item.service_instance_id !==null){ + return item + } + }); } }) } diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-model/slicing-business-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-model/slicing-business-model.component.ts index e0328c89..73407ad5 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-model/slicing-business-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-model/slicing-business-model.component.ts @@ -37,9 +37,16 @@ export class SlicingBusinessModelComponent implements OnInit { item = item.split(';').join('-'); return item }); - this.businessRequirement = [business_demand_info]; + // area : Front-end analog data + let area = ["Beijing;Beijing;Xicheng District", "Beijing;Beijing;Haidian District", "Beijing;Beijing;Chaoyang District"].map(item => { + item = item.split(';').join(' - '); + return item + }); + this.businessRequirement = [{...business_demand_info, area}]; this.NSTinfo = [nst_info]; - this.nsiInfo = [nsi_info]; + if(nsi_info.nsi_id !==null){ + this.nsiInfo = [nsi_info]; + } } }) } -- cgit 1.2.3-korg