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 /usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model | |
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
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model')
2 files changed, 9 insertions, 46 deletions
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]; |