diff options
author | wangyuerg <wangyuerg@chinamobile.com> | 2021-02-01 17:47:15 +0800 |
---|---|---|
committer | wangyuerg <wangyuerg@chinamobile.com> | 2021-02-01 17:47:38 +0800 |
commit | f5c784543f6f1aa58c49278001e8104524069dd9 (patch) | |
tree | 6102b9e6108f264baa3fc06ba85e552481ea20d4 | |
parent | 186b679ba02d7729801b4d560697d87034b9c8f6 (diff) |
feat: delete code about endpoints of an and cn
Signed-off-by: wangyuerg <wangyuerg@chinamobile.com>
Change-Id: Iac65b6dfc2df46c0a97d5d2f53c37a307efd6a58
Issue-ID: USECASEUI-527
4 files changed, 10 insertions, 114 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 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 @@ </form> <form nz-form *ngIf="title === 'An' || title === 'Cn'"> <nz-form-item *ngFor="let item of coreFormItems"> - <nz-form-label [nzSpan]="(item.key === 'an_coverage_area_ta_list' || item.title === 'Endpoint')?7:13" - [nzRequired]="item.required" *ngIf=" item.title !== 'Endpoint' || EndpointEnable " - [ngStyle]="labelStyle(item.required)"> + <nz-form-label [nzSpan]="item.key === 'an_coverage_area_ta_list'?7:13" [nzRequired]="item.required" + *ngIf=" item.title !== 'Endpoint' || EndpointEnable " [ngStyle]="labelStyle(item.required)"> {{ item.title }} </nz-form-label> - <nz-form-control [nzSpan]="item.title === 'Endpoint'?14:8" - *ngIf="item.key !== 'an_coverage_area_ta_list'"> + <nz-form-control nzSpan="8" *ngIf="item.key !== 'an_coverage_area_ta_list'"> <input nz-input [id]="item.key" [name]="item.key" [(ngModel)]="formData[item.key]" [readOnly]="item.title === 'S-NSSAI'" [disabled]="item.title === 'S-NSSAI'" - *ngIf=" item.title !== 'Resource Sharing Level' && item.title !== 'Mobility' && item.title !== 'Endpoint' " + *ngIf=" item.title !== 'Resource Sharing Level' && item.title !== 'Mobility' " [placeholder]="inputHolder(item.title)" /> <nz-radio-group [name]="item.key" [(ngModel)]="formData[item.key]" *ngIf="item.title === 'Resource Sharing Level'"> @@ -108,23 +106,7 @@ </nz-select> <div class="validation_alert" *ngIf="item.required"> {{Util.isEmpty(formData[item.key])? 'can not be empty!':' '}}</div> - <!-- 2020.08.17 Add 3 parameters for Endpoint--> <!-- Comment: The following code--> - <nz-input-group *ngIf="item.title === 'Endpoint' && EndpointEnable"> - <div *ngFor="let option of item.options;let i=index"> - <div class="endpoint_input"> - <input nz-input [id]="option.key" [name]="option.key" - [title]="EndpointInputs[option.key]" [(ngModel)]="EndpointInputs[option.key]" - [placeholder]="option.holder" style="width:32%;margin-right:1%" /> - <div class="end_alert_ip" *ngIf="option.title === 'ip_address'"> - {{validateEndPoint(option.title, EndpointInputs[option.key], item.required)}}</div> - <div class="end_alert_logical" *ngIf="option.title === 'logical_link'"> - {{validateEndPoint(option.title, EndpointInputs[option.key], item.required)}}</div> - <div class="end_alert_nexthop" *ngIf="option.title === 'nexthop_info'"> - {{validateEndPoint(option.title, EndpointInputs[option.key], item.required)}}</div> - </div> - </div> - </nz-input-group> <!-- Comment: Above code--> </nz-form-control> <div *ngIf="title === 'An' && item.key === 'an_coverage_area_ta_list'"> 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<any>{ // check params of Endpoint - console.log('end', endpoint) let result: Array<any> = [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]; diff --git a/usecaseui-portal/src/constants/constants.ts b/usecaseui-portal/src/constants/constants.ts index a46ff010..ab40534b 100644 --- a/usecaseui-portal/src/constants/constants.ts +++ b/usecaseui-portal/src/constants/constants.ts @@ -154,6 +154,7 @@ export const TRANSFRER_FORM_ITEMS = [ title: 'Resource Sharing Level', // select
key: 'sliceProfile_TN_resourceSharingLevel', // :new
required: true,
+ type: '',
options: [
{
title: 'Shared',
@@ -341,46 +342,6 @@ export const CORE_FORM_ITEMS = { required: false
},
{
- title:'Endpoint',
- key:"an_Endpoint",
- required: true,
- options: [
- {
- title: 'ip_address',
- key: 'sliceProfile_AN_ipAddress',
- holder: 'IpAddress'
- },
- {
- title: 'logical_link',
- key: 'sliceProfile_AN_logicInterfaceId',
- holder: 'LogicId'
- },
- {
- title: 'nexthop_info',
- key: 'sliceProfile_AN_nextHopInfo',
- holder: 'NextHop'
- }
- ]
- },
- // {
- // title: 'ip_address',
- // key: 'an_coverage_area_ta_list',
- // required: true,
- // holder: 'IpAddress'
- // },
- // {
- // title: 'logical_link',
- // key: 'sliceProfile_AN_logicInterfaceId',
- // required: true,
- // holder: 'LogicalId'
- // },
- // {
- // title: 'nexthop_info',
- // key: 'sliceProfile_AN_nextHopInfo',
- // required: true,
- // holder: 'NextHop'
- // },
- {
title: 'Coverage Area Ta List',
key: 'an_coverage_area_ta_list',
required: true
@@ -498,28 +459,6 @@ export const CORE_FORM_ITEMS = { // required: true,
// holder: 'NextHop'
// },
- {
- title:'Endpoint',
- key:"cn_Endpoint",
- required: true,
- options: [
- {
- title: 'ip_address',
- key: 'sliceProfile_CN_ipAddress',
- holder: 'IpAddress'
- },
- {
- title: 'logical_link',
- key: 'sliceProfile_CN_logicInterfaceId',
- holder: 'LogicId'
- },
- {
- title: 'nexthop_info',
- key: 'sliceProfile_CN_nextHopInfo',
- holder: 'NextHop'
- }
- ]
- },
]
}
|