summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2020-08-28 17:15:55 +0800
committercyuamber <xuranyjy@chinamobile.com>2020-08-28 17:16:02 +0800
commitd3d6bbbae10670482186f1844e8389c877f384d3 (patch)
treedfc108e9937eac62ade85842f99d7264cf9e7a5d /usecaseui-portal/src/app/views/services
parent6327a13cbc6290f6df92c125669c162f643d8616 (diff)
fix: Fix the bug of Endpoint parameter rendering for 5g task
Change-Id: I324311620c586bb48e609068a8bb90007e31e80c Issue-ID: USECASEUI-444 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services')
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts4
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts30
2 files changed, 22 insertions, 12 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts
index d11f1930..f65ed32c 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts
@@ -157,7 +157,7 @@ export class SlicingTaskModelComponent implements OnInit {
'an_area_traffic_cap_ul',
'an_script_name',
'an_overalluser_density',
- // 'an_Endpoint'
+ 'an_Endpoint'
]), an_coverage_area_ta_list: area};
this.slicingSubnet[1].params = this.pick(nsi_nssi_info, ['tn_latency', 'tn_bandwidth', 'tn_script_name', 'tn_jitter', 'tn_service_snssai']);
this.slicingSubnet[2].params = {...this.pick(nsi_nssi_info, [
@@ -173,7 +173,7 @@ export class SlicingTaskModelComponent implements OnInit {
'cn_area_traffic_cap_ul',
'cn_script_name',
'cn_overalluser_density',
- // 'cn_Endpoint'
+ 'cn_Endpoint'
])};
} else {
this.message.error(result_message || 'Failed to get data')
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts
index 280d2193..bceca197 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts
@@ -15,7 +15,7 @@ export class SubnetParamsModelComponent implements OnInit {
@Output() paramsDataChange = new EventEmitter<any>();
transferFormItems = TRANSFRER_FORM_ITEMS;
- coreFormItems :object ={};
+ coreFormItems: any[] = [];
areaList: any[] = [];
// 2020.08.17 Add 3 parameters for Endpoint, Comment: The following code
NexthopInfoOptions = NexthopInfo_Options;
@@ -28,15 +28,25 @@ export class SubnetParamsModelComponent implements OnInit {
ngOnInit() { }
ngOnChanges() {
- this.coreFormItems = this.title === 'An'?CORE_FORM_ITEMS.An:CORE_FORM_ITEMS.Cn;
-
- // -------> 2020.08.17 Add 3 parameters for Endpoint, Comment: The following code
- if(this.EndpointEnable){
- this.EndpointInputs = this.title === 'An'
- ?this.detailData["an_Endpoint"]
- :this.title === 'Cn'
- ?this.detailData["cn_Endpoint"]
- :[];
+ if(this.title){
+ this.coreFormItems = this.title === 'An'?CORE_FORM_ITEMS.An:this.title === 'Cn'?CORE_FORM_ITEMS.Cn:[];
+ if(this.detailData !==undefined && Object.keys(this.detailData).length!==0){
+ this.EndpointEnable = (this.detailData.hasOwnProperty("an_Endpoint") && this.detailData['an_Endpoint'].length!==0) || (this.detailData.hasOwnProperty("cn_Endpoint") && this.detailData['cn_Endpoint'].length!==0)
+ }
+ // -------> 2020.08.17 Add 3 parameters for Endpoint, Comment: The following code
+ if(this.EndpointEnable){
+ this.EndpointInputs = this.title === 'An'
+ ?this.detailData["an_Endpoint"]
+ :this.title === 'Cn'
+ ?this.detailData["cn_Endpoint"]
+ :[];
+ }else{
+ this.coreFormItems.map((item,index)=>{
+ if(item.title === 'Endpoint'){
+ this.coreFormItems.splice(index,1)
+ }
+ })
+ }
}
//-------> Comment: Above code
if (this.title === 'An') {