feat: delete code about endpoints of an and cn 90/117290/1
authorwangyuerg <wangyuerg@chinamobile.com>
Mon, 1 Feb 2021 09:47:15 +0000 (17:47 +0800)
committerwangyuerg <wangyuerg@chinamobile.com>
Mon, 1 Feb 2021 09:47:38 +0000 (17:47 +0800)
Signed-off-by: wangyuerg <wangyuerg@chinamobile.com>
Change-Id: Iac65b6dfc2df46c0a97d5d2f53c37a307efd6a58
Issue-ID: USECASEUI-527

usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts
usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.html
usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts
usecaseui-portal/src/constants/constants.ts

index 7ac86c8..ef8b6cc 100644 (file)
@@ -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'
       ])};
     })
   }
index 31c19d4..f9e5e28 100644 (file)
                </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'">
                                        </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'">
index 862e2a1..c878de5 100644 (file)
@@ -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];
index a46ff01..ab40534 100644 (file)
@@ -154,6 +154,7 @@ export const TRANSFRER_FORM_ITEMS = [
         title: 'Resource Sharing Level', // select\r
         key: 'sliceProfile_TN_resourceSharingLevel', // :new\r
         required: true,\r
+        type: '',\r
         options: [\r
             {\r
                 title: 'Shared',\r
@@ -340,46 +341,6 @@ export const CORE_FORM_ITEMS = {
             key: 'sliceProfile_AN_overallUserDensity',\r
             required: false\r
         },\r
-        {\r
-            title:'Endpoint',\r
-            key:"an_Endpoint",\r
-            required: true,\r
-            options: [\r
-                {\r
-                    title: 'ip_address',\r
-                    key: 'sliceProfile_AN_ipAddress',\r
-                    holder: 'IpAddress'\r
-                },\r
-                {\r
-                    title: 'logical_link',\r
-                    key: 'sliceProfile_AN_logicInterfaceId',\r
-                    holder: 'LogicId'\r
-                },\r
-                {\r
-                    title: 'nexthop_info',\r
-                    key: 'sliceProfile_AN_nextHopInfo',\r
-                    holder: 'NextHop'\r
-                }\r
-            ]\r
-        },\r
-        // {\r
-        //     title: 'ip_address',\r
-        //     key: 'an_coverage_area_ta_list',\r
-        //     required: true,\r
-        //     holder: 'IpAddress'\r
-        // },\r
-        // {\r
-        //     title: 'logical_link',\r
-        //     key: 'sliceProfile_AN_logicInterfaceId',\r
-        //     required: true,\r
-        //     holder: 'LogicalId'\r
-        // },\r
-        // {\r
-        //     title: 'nexthop_info',\r
-        //     key: 'sliceProfile_AN_nextHopInfo',\r
-        //     required: true,\r
-        //     holder: 'NextHop'\r
-        // },\r
         {\r
             title: 'Coverage Area Ta List',\r
             key: 'an_coverage_area_ta_list',\r
@@ -498,28 +459,6 @@ export const CORE_FORM_ITEMS = {
         //     required: true,\r
         //     holder: 'NextHop'\r
         // },\r
-        {\r
-            title:'Endpoint',\r
-            key:"cn_Endpoint",\r
-            required: true,\r
-            options: [\r
-                {\r
-                    title: 'ip_address',\r
-                    key: 'sliceProfile_CN_ipAddress',\r
-                    holder: 'IpAddress'\r
-                },\r
-                {\r
-                    title: 'logical_link',\r
-                    key: 'sliceProfile_CN_logicInterfaceId',\r
-                    holder: 'LogicId'\r
-                },\r
-                {\r
-                    title: 'nexthop_info',\r
-                    key: 'sliceProfile_CN_nextHopInfo',\r
-                    holder: 'NextHop'\r
-                }\r
-            ]\r
-        },\r
     ]\r
 }\r
 \r