summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/views')
-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') {