From f5c784543f6f1aa58c49278001e8104524069dd9 Mon Sep 17 00:00:00 2001 From: wangyuerg Date: Mon, 1 Feb 2021 17:47:15 +0800 Subject: feat: delete code about endpoints of an and cn Signed-off-by: wangyuerg Change-Id: Iac65b6dfc2df46c0a97d5d2f53c37a307efd6a58 Issue-ID: USECASEUI-527 --- .../slicing-task-model.component.ts | 6 ----- .../subnet-params-model.component.html | 26 +++---------------- .../subnet-params-model.component.ts | 29 ++++------------------ 3 files changed, 9 insertions(+), 52 deletions(-) (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management') 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 7ac86c85..ef8b6cce 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 @@ -178,9 +178,6 @@ export class SlicingTaskModelComponent implements OnInit { 'sliceProfile_AN_overallUserDensity', 'an_enableNSSISelection', 'sliceProfile_AN_maxNumberofPDUSession', - 'sliceProfile_AN_ipAddress', - 'sliceProfile_AN_logicInterfaceId', - 'sliceProfile_AN_nextHopInfo' ]), an_coverage_area_ta_list: area}; this.slicingSubnet[1].params = this.pick(nsi_nssi_info, [ 'tn_bh_latency', @@ -213,9 +210,6 @@ export class SlicingTaskModelComponent implements OnInit { 'sliceProfile_CN_overallUserDensity', 'cn_enableNSSISelection', 'sliceProfile_CN_maxNumberofPDUSession', - 'sliceProfile_CN_logicInterfaceId', - 'sliceProfile_CN_ipAddress', - 'sliceProfile_CN_nextHopInfo' ])}; }) } diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.html index 31c19d49..f9e5e28c 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.html +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.html @@ -85,16 +85,14 @@
- + {{ item.title }} - + @@ -108,23 +106,7 @@
{{Util.isEmpty(formData[item.key])? 'can not be empty!':' '}}
- - -
-
- -
- {{validateEndPoint(option.title, EndpointInputs[option.key], item.required)}}
-
- {{validateEndPoint(option.title, EndpointInputs[option.key], item.required)}}
-
- {{validateEndPoint(option.title, EndpointInputs[option.key], item.required)}}
-
-
-
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 862e2a1f..c878de59 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 @@ -25,7 +25,6 @@ export class SubnetParamsModelComponent implements OnInit { areaList: any[] = []; // 2020.08.17 Add 3 parameters for Endpoint, Comment: The following code NexthopInfoOptions = NexthopInfo_Options; - EndpointInputs: object = {}; ANEndpointInputs: object = {}; CNEndpointInputs: object = {}; ANkeyList: string[] = []; @@ -51,7 +50,6 @@ export class SubnetParamsModelComponent implements OnInit { this.formData = JSON.parse(JSON.stringify(this.detailData)); if (this.title === 'An' || this.title === 'Cn') { this.coreFormItems = this.title === 'An'?CORE_FORM_ITEMS.An:this.title === 'Cn'?CORE_FORM_ITEMS.Cn:[]; - this.keyList = this.coreFormItems.find((item) => {return item.title === 'Endpoint'}).options.map((val) => {return val.key}); } else if (this.title === 'Tn') { this.ANkeyList = this.transferFormItems.find((item) => {return item.title === 'AN Endpoint'}).options.map((val) => {return val.key}) @@ -71,19 +69,11 @@ export class SubnetParamsModelComponent implements OnInit { this.EndpointEnable = this.keyList.every((item) => {return this.formData.hasOwnProperty(item)}) } if(this.EndpointEnable){ - if (this.title === 'An' || this.title === 'Cn') { - this.EndpointInputs = this.Util.pick(this.formData, this.keyList) - } else if (this.title === 'Tn') { + if (this.title === 'Tn') { this.ANEndpointInputs = this.Util.pick(this.formData, this.ANkeyList) this.CNEndpointInputs = this.Util.pick(this.formData, this.CNkeyList) } else { - if (this.title === 'An' || this.title === 'Cn') { - this.coreFormItems.map((item,index)=>{ - if (item.title === 'Endpoint') { - this.coreFormItems.splice(index,1) - } - }) - } else if (this.title === 'Tn') { + if (this.title === 'Tn') { this.transferFormItems.map((item,index)=>{ if (item.title === 'AN Endpoint' || item.title === 'CN Endpoint') { this.coreFormItems.splice(index,1) @@ -288,14 +278,9 @@ export class SubnetParamsModelComponent implements OnInit { endCheckBeforeSubmit (endpoint, required) : Array{ // check params of Endpoint - console.log('end', endpoint) let result: Array = [true, '']; let endPointList; - if (this.title === 'An' || this.title === 'Cn') { - endPointList = this.coreFormItems.find((item) => {return item.title === 'Endpoint'}).options - } else { - endPointList = this.transferFormItems.find((item) => {return item.title === 'AN Endpoint'}).options - } + endPointList = this.transferFormItems.find((item) => {return item.title === 'AN Endpoint'}).options let ipKey = ''; let logicalKey = ''; let nextKey = '' @@ -361,9 +346,7 @@ export class SubnetParamsModelComponent implements OnInit { // Verify that items of EndPoint is correct if (this.EndpointEnable) { let endCheckResult = [] - if (this.title === 'An' || this.title === 'Cn') { - endCheckResult = this.endCheckBeforeSubmit(this.EndpointInputs, this.coreFormItems.find((item) => {return item.title === 'Endpoint'}).required) - } else if (this.title === 'Tn') { + if (this.title === 'Tn') { const ANendCheckResult = this.endCheckBeforeSubmit(this.ANEndpointInputs, this.transferFormItems.find((item) => {return item.title === 'AN Endpoint'}).required) const CNendCheckResult = this.endCheckBeforeSubmit(this.CNEndpointInputs, this.transferFormItems.find((item) => {return item.title === 'CN Endpoint'}).required) if (ANendCheckResult[0] && CNendCheckResult[0]) { @@ -382,9 +365,7 @@ export class SubnetParamsModelComponent implements OnInit { } // replace the params about endPoint for (let prop in this.formData) { - if ((this.title === 'An' || this.title === 'Cn') && typeof this.EndpointInputs[prop] !== 'undefined') { - this.formData[prop] = this.EndpointInputs[prop]; - } else if (this.title === 'Tn' && typeof this.ANEndpointInputs[prop] !== 'undefined') { + if (this.title === 'Tn' && typeof this.ANEndpointInputs[prop] !== 'undefined') { this.formData[prop] = this.ANEndpointInputs[prop]; } else if (this.title === 'Tn' && typeof this.CNEndpointInputs[prop] !== 'undefined') { this.formData[prop] = this.CNEndpointInputs[prop]; -- cgit 1.2.3-korg