feat: Three new parameters for Endpoint of An/Cn 5G slicingTast 18/111818/1
authorcyuamber <xuranyjy@chinamobile.com>
Fri, 28 Aug 2020 01:06:45 +0000 (09:06 +0800)
committercyuamber <xuranyjy@chinamobile.com>
Fri, 28 Aug 2020 01:06:58 +0000 (09:06 +0800)
Change-Id: If29e1b67c9fcdec31950cd38d0cadba4eb55010c
Issue-ID: USECASEUI-444
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
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 7868114..d11f193 100644 (file)
@@ -157,9 +157,7 @@ export class SlicingTaskModelComponent implements OnInit {
                 'an_area_traffic_cap_ul',
                 'an_script_name',
                 'an_overalluser_density',
-                // an_ip_address,
-                // an_logical_link,
-                // an_nexthop_info,
+                // '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, [
@@ -175,10 +173,8 @@ export class SlicingTaskModelComponent implements OnInit {
           'cn_area_traffic_cap_ul',
           'cn_script_name',
           'cn_overalluser_density',
-          // cn_ip_address,
-          // cn_logical_link,
-          // cn_nexthop_info,
-        ]), an_coverage_area_ta_list: area};
+          // 'cn_Endpoint'
+        ])};
       } else {
         this.message.error(result_message || 'Failed to get data')
       }
index 552523c..50b6e5a 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' && title === 'An')?7:13" nzRequired>
+                               <nz-form-label [nzSpan]="(item.key === 'an_coverage_area_ta_list' || item.title === 'Endpoint')?7:13" nzRequired *ngIf=" item.title !== 'Endpoint' || EndpointEnable ">
                                        {{ item.title }}
                                </nz-form-label>
-                               <nz-form-control [nzSpan]="8" *ngIf="item.key !== 'an_coverage_area_ta_list'">
+                               <nz-form-control [nzSpan]="item.title === 'Endpoint'?14:8" *ngIf="item.key !== 'an_coverage_area_ta_list'">
                                        <input nz-input [id]="item.key" [name]="item.key" [(ngModel)]="detailData[item.key]"
                                                [readOnly]="item.title === 'S-NSSAI'" [disabled]="item.title === 'S-NSSAI'"
-                                               *ngIf=" item.title !== 'Resource Sharing Level' && item.title !== 'Mobility' " />
+                                               *ngIf=" item.title !== 'Resource Sharing Level' && item.title !== 'Mobility' && item.title !== 'Endpoint' " />
                                        <nz-radio-group [name]="item.key" [(ngModel)]="detailData[item.key]"
                                                *ngIf="item.title === 'Resource Sharing Level'">
                                                <label nz-radio [nzValue]="option.key" *ngFor="let option of item.options">
                                                <nz-option [nzValue]="option.key" [nzLabel]="option.title" *ngFor="let option of item.options">
                                                </nz-option>
                                        </nz-select>
+                                       <!-- 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">
+                                                       <input nz-input
+                                                                  *ngIf="option.title !== 'nexthop_info'"
+                                                                  [id]="option.key"
+                                                                  [name]="option.key"
+                                                                  [title]="EndpointInputs[i][option.key]"
+                                                                  [(ngModel)]="EndpointInputs[i][option.key]"
+                                                                  style="width:32%;margin-right:1%" />
+                                                       <nz-select
+                                                                       *ngIf="option.title === 'nexthop_info'"
+                                                                       [name]="option.key"
+                                                                       [title]="EndpointInputs[i][option.key]"
+                                                                       [(ngModel)]="EndpointInputs[i][option.key]" style="width:34%;">
+                                                               <nz-option
+                                                                               *ngFor="let infoOption of NexthopInfoOptions"
+                                                                               [nzValue]="infoOption.key"
+                                                                               [nzLabel]="infoOption.title"
+                                                               ></nz-option>
+                                                       </nz-select>
+                                               </div>
+                                       </nz-input-group>
+                                       <!-- Comment: Above code-->
                                </nz-form-control>
                                <div *ngIf="title === 'An' && item.key === 'an_coverage_area_ta_list'">
                                        <div *ngFor="let area of areaList; let i = index">
index d279d03..280d219 100644 (file)
@@ -1,5 +1,5 @@
 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
-import { TRANSFRER_FORM_ITEMS, CORE_FORM_ITEMS, ADDRESS } from '@src/constants/constants'
+import { TRANSFRER_FORM_ITEMS, CORE_FORM_ITEMS, ADDRESS , NexthopInfo_Options } from '@src/constants/constants'
 
 @Component({
        selector: 'app-subnet-params-model',
@@ -17,6 +17,11 @@ export class SubnetParamsModelComponent implements OnInit {
        transferFormItems = TRANSFRER_FORM_ITEMS;
        coreFormItems :object ={};
        areaList: any[] = [];
+    // 2020.08.17  Add 3 parameters for Endpoint, Comment: The following code
+    NexthopInfoOptions = NexthopInfo_Options;
+    EndpointInputs: any[] = [];
+    EndpointEnable: boolean = false;  // Whether to enable the three parameters of Endpoint
+    //  Comment: Above code
 
        constructor() { }
 
@@ -24,6 +29,16 @@ export class SubnetParamsModelComponent implements OnInit {
 
        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"]
+                    :[];
+               }
+        //-------> Comment: Above code
                if (this.title === 'An') {
                        this.AreaFormatting();
                }
index 8d8af35..3469dd9 100644 (file)
@@ -191,18 +191,24 @@ export const CORE_FORM_ITEMS = {
             title: 'overallUserDensity',\r
             key: 'an_overalluser_density'\r
         },\r
-        // {\r
-        //     title: 'IP Address',\r
-        //     key: 'an_ip_address'\r
-        // },\r
-        // {\r
-        //     title: 'Logical Link',\r
-        //     key: 'an_logical_link'\r
-        // },\r
-        // {\r
-        //     title: 'Nexthop Info',\r
-        //     key: 'an_nexthop_info'\r
-        // },\r
+        {\r
+            title:'Endpoint',\r
+            key:"an_Endpoint",\r
+            options: [\r
+                {\r
+                    title: 'ip_address',\r
+                    key: 'an_ip_address'\r
+                },\r
+                {\r
+                    title: 'logical_link',\r
+                    key: 'an_logical_link'\r
+                },\r
+                {\r
+                    title: 'nexthop_info',\r
+                    key: 'an_nexthop_info'\r
+                }\r
+            ]\r
+        },\r
         {\r
             title: 'Coverage Area Ta List',\r
             key: 'an_coverage_area_ta_list'\r
@@ -285,19 +291,25 @@ export const CORE_FORM_ITEMS = {
             title: 'overallUserDensity',\r
             key: 'cn_overalluser_density'\r
         },\r
-        // {\r
-        //     title: 'IP Address',\r
-        //     key: 'an_ip_address'\r
-        // },\r
-        // {\r
-        //     title: 'Logical Link',\r
-        //     key: 'an_logical_link'\r
-        // },\r
-        // {\r
-        //     title: 'Nexthop Info',\r
-        //     key: 'an_nexthop_info'\r
-        // }\r
-        ]\r
+        {\r
+            title:'Endpoint',\r
+            key:"cn_Endpoint",\r
+            options: [\r
+                {\r
+                    title: 'ip_address',\r
+                    key: 'cn_ip_address'\r
+                },\r
+                {\r
+                    title: 'logical_link',\r
+                    key: 'cn_logical_link'\r
+                },\r
+                {\r
+                    title: 'nexthop_info',\r
+                    key: 'cn_nexthop_info'\r
+                }\r
+            ]\r
+        },\r
+    ]\r
 }\r
 \r
 export const ADDRESS = [\r
@@ -344,6 +356,22 @@ export const ADDRESS = [
                }]\r
        }\r
 ]\r
+\r
+export const NexthopInfo_Options = [\r
+    {\r
+        title:"test_info_01",\r
+        key:"test_info_01"\r
+    },\r
+    {\r
+        title:"test_info_02",\r
+        key:"test_info_02"\r
+    },\r
+    {\r
+        title:"test_info_03",\r
+        key:"test_info_03"\r
+    }\r
+]\r
+\r
 export const BUSINESS_STATUS = [\r
        "All", "Activated", "Deactivated"\r
 ]\r