feat: Optimize code and add English fields 54/99454/1
authorcyuamber <xuranyjy@chinamobile.com>
Wed, 11 Dec 2019 01:16:41 +0000 (09:16 +0800)
committercyuamber <xuranyjy@chinamobile.com>
Wed, 11 Dec 2019 01:18:16 +0000 (09:18 +0800)
Change-Id: Id61ab33f0bb612f8ae3a1debbc4c2d4887cf2b2d
Issue-ID: USECASEUI-368
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
usecaseui-portal/src/app/mock/json/slicing_task_auditInfo.json
usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html
usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html
usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.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/constants/constants.ts

index a3b97c8..0b44464 100644 (file)
@@ -13,7 +13,7 @@
             "service_snssai": "1-010101",\r
             "exp_data_rate_dl": "300",\r
             "exp_data_rate_ul": "300",\r
-            "ue_mobility_level": "stageary",\r
+            "ue_mobility_level": "stationary",\r
             "latency": "20",\r
             "use_interval": "12",\r
             "coverage_area_ta_list": ["北京;北京市;海淀区", "北京;北京市;西城区", "北京;北京市;昌平区"],\r
@@ -43,7 +43,7 @@
             "cn_suggest_nssi_name": "eMBB CNinstance3",\r
             "cn_service_snssai": "1-010101",\r
             "cn_resource_sharing_level": "shared",\r
-            "cn_ue_mobility_level": "stageary",\r
+            "cn_ue_mobility_level": "stationary",\r
             "cn_latency": "10",\r
             "cn_max_number_of_ues": "10000",\r
             "cn_activity_factor": "60",\r
index f659bd4..9a11ca2 100644 (file)
                                [nzSpan]="list.length === 1 ? '24' : '8'"
                                *ngFor="let ite of list"
                        >
-                               <span class="ant-typography" *ngIf="ite.title !== '区域'">
+                               <span class="ant-typography" *ngIf="ite.title !== 'Area'">
                                        {{ ite.title }} : &nbsp;{{ item[ite.key] }}
                                </span>
-                               <span class="ant-typography" *ngIf="ite.title === '区域'">
+                               <span class="ant-typography" *ngIf="ite.title === 'Area'">
                                        {{ ite.title }} : &nbsp;
                                        <nz-tag *ngFor="let value of item[ite.key]">
                                                {{value}}
index c4aeb72..81f4c96 100644 (file)
@@ -2,17 +2,35 @@
        <div nz-row>
                <div nz-col nzSpan="12" class="task_status">
                        <span>Status : </span>
-                       <nz-select nzShowSearch nzAllowClear [(ngModel)]="selectedValue" nzPlaceHolder="Select a processing status"
-                               (ngModelChange)="processingStatusChange()">
-                               <nz-option *ngFor="let item of statusOptions" [nzLabel]="item.title" [nzValue]="item.value"></nz-option>
+                       <nz-select
+                               nzShowSearch
+                               [(ngModel)]="selectedValue"
+                               nzPlaceHolder="Select a processing status"
+                               (ngModelChange)="processingStatusChange()"
+                       >
+                               <nz-option
+                                       *ngFor="let item of statusOptions"
+                                       [nzLabel]="item.title"
+                                       [nzValue]="item.value"
+                               ></nz-option>
                        </nz-select>
                </div>
        </div>
        <div>
-               <nz-table #basicTable nzShowPagination nzPageSizeOptions nzShowSizeChanger [nzTotal]="total"
-                       [nzLoading]="loading" [nzData]="listOfData" [nzPageIndex]="pageNum" [nzPageSize]="pageSize"
-                       [nzFrontPagination]="false" (nzPageSizeChange)="pageSizeChange($event)"
-                       (nzPageIndexChange)="pageNumChange($event)">
+               <nz-table
+                       #basicTable
+                       nzShowPagination
+                       nzPageSizeOptions
+                       nzShowSizeChanger
+                       [nzTotal]="total"
+                       [nzLoading]="loading"
+                       [nzData]="listOfData"
+                       [nzPageIndex]="pageNum"
+                       [nzPageSize]="pageSize"
+                       [nzFrontPagination]="false"
+                       (nzPageSizeChange)="pageSizeChange($event)"
+                       (nzPageIndexChange)="pageNumChange($event)"
+               >
                        <thead>
                                <tr>
                                        <th>Task ID</th>
                                        <td>{{ data.create_time | date: "yyyy-MM-dd HH:mm:ss"}}</td>
                                        <td>{{ data.processing_status }}</td>
                                        <td>
-                                               <span *ngIf="data.processing_status === 'Planning'"
-                                                       class="task_operation_disabled">{{ data.operation }}</span>
-                                               <a (click)="showdetail(data)"
-                                                       *ngIf="data.processing_status !== 'Planning'">{{ data.operation }}</a>
+                                               <span
+                                                       *ngIf="data.processing_status === 'Planning'"
+                                                       class="task_operation_disabled"
+                                                       >{{ data.operation }}</span
+                                               >
+                                               <a
+                                                       (click)="showdetail(data)"
+                                                       *ngIf="data.processing_status !== 'Planning'"
+                                                       >{{ data.operation }}</a
+                                               >
                                        </td>
                                </tr>
                        </tbody>
                </nz-table>
        </div>
-       <app-slicing-task-model [moduleTitle]="moduleTitle" [showDetail]="showDetail" [taskId]="taskId"
-               (cancel)="showDetail = $event">
+       <app-slicing-task-model
+               [moduleTitle]="moduleTitle"
+               [showDetail]="showDetail"
+               [taskId]="taskId"
+               (cancel)="showDetail = $event"
+       >
        </app-slicing-task-model>
-       <app-check-process-model [moduleTitle]="moduleTitle" [showProcess]="showProcess" [taskId]="taskId"
-               (cancel)="showProcess = $event">
+       <app-check-process-model
+               [moduleTitle]="moduleTitle"
+               [showProcess]="showProcess"
+               [taskId]="taskId"
+               (cancel)="showProcess = $event"
+       >
        </app-check-process-model>
 </div>
\ No newline at end of file
index 6c4d904..944f4a2 100644 (file)
@@ -14,7 +14,7 @@ export class SlicingTaskManagementComponent implements OnInit {
 
   showDetail: boolean = false;
   showProcess: boolean = false;
-  selectedValue = null;
+  selectedValue = 'all';
   taskId: string;
   moduleTitle: string = "";
   listOfData: any[] = [];
@@ -47,7 +47,7 @@ export class SlicingTaskManagementComponent implements OnInit {
   processingStatusChange(): void {
     this.pageSize = '10';
     this.pageNum = '1';
-    if (this.selectedValue) {
+    if (this.selectedValue && this.selectedValue !== 'all') {
       this.getListOfProcessingStatus();
     } else {
       this.getTaskList();
@@ -73,7 +73,7 @@ export class SlicingTaskManagementComponent implements OnInit {
   pageSizeChange(pageSize: number): void {
     this.pageSize = pageSize + '';
     const { selectedValue } = this;
-    if (selectedValue) {
+    if (selectedValue && selectedValue !== 'all') {
       this.getListOfProcessingStatus();
     } else {
       this.getTaskList();
@@ -83,7 +83,7 @@ export class SlicingTaskManagementComponent implements OnInit {
   pageNumChange(pageNum: number): void {
     this.pageNum = pageNum + '';
     const { selectedValue } = this;
-    if (selectedValue) {
+    if (selectedValue && selectedValue !== 'all') {
       this.getListOfProcessingStatus();
     } else {
       this.getTaskList();
index 1dfc633..127a5b9 100644 (file)
-<nz-modal [(nzVisible)]="showModel" [nzTitle]="title + '参数'" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" nzWidth="700px">
-    <div class="subnet_params_container">
-        <form nz-form *ngIf="title === '无线域'">
-            <nz-form-item *ngFor="let item of wirelessFormItems">
-                <nz-form-label  [nzSpan]="5" nzRequired [nzFor]="item.key">{{item.title}}</nz-form-label>
-                <nz-form-control [nzSpan]="10"  *ngIf="item.key !== 'an_coverage_area_ta_list'">
-                    <input nz-input [(ngModel)]="detailData[item.key]" [name]="item.key" [id]="item.key"/>
-                </nz-form-control>
-                <div *ngIf="item.key === 'an_coverage_area_ta_list'">
-                    <div *ngFor="let area of areaList; let i = index">
-                        <nz-form-control [nzSpan]="4" [nzOffset]=" i && !ind ? 5 : 0"  class="subnet_params_area" *ngFor="let item of area; let ind = index">
-                            <nz-select [(ngModel)]="item.selected" [name]="'area' +i + ind" (nzOpenChange)="handleChange(area, item)" (ngModelChange)="handleChangeSelected(area,item)"> 
-                                <nz-option [nzValue]="op.name" *ngFor="let op of item.options" [nzLabel]="op.name" ></nz-option>
-                            </nz-select>
-                        </nz-form-control>
-                        <nz-form-control [nzSpan]="1" [nzOffset]="1">
-                            <button nz-button nzType="primary" nzSize="small"  class="subnet_params_button"  *ngIf="!i" (click)="creatAreaList()">
-                                <i nz-icon class="anticon anticon-plus subnet_params_icon"></i>
-                            </button>
-                            <button nz-button nzType="primary" nzSize="small"  class="subnet_params_button"  *ngIf="i" (click)="deleteAreaList(i)">
-                                <i nz-icon class="anticon anticon-minus subnet_params_icon"></i>
-                            </button>
-                        </nz-form-control>
-                    </div>
-                    
-                </div>
-            </nz-form-item>
-        </form>
-        <form nz-form *ngIf="title === '传输域'">
-            <nz-form-item *ngFor="let item of transferFormItems">
-                <nz-form-label  [nzSpan]="7" nzRequired [nzFor]="item.key">{{item.title}}</nz-form-label>
-                <nz-form-control [nzSpan]="12">
-                    <input nz-input [(ngModel)]="detailData[item.key]" [name]="item.key" [id]="item.key"/>
-                </nz-form-control>
-            </nz-form-item>
-        </form>
-        <form nz-form *ngIf="title === '核心域'">
-            <nz-form-item *ngFor="let item of coreFormItems">
-                <nz-form-label  [nzSpan]="10" nzRequired [nzFor]="item.key">{{item.title}}</nz-form-label>
-                <nz-form-control [nzSpan]="10" >
-                    <input nz-input [(ngModel)]="detailData[item.key]" [name]="item.key" [id]="item.key" [readOnly]="item.title === 'S-NSSAI'" *ngIf="item.title !== '共享等级' && item.title !== '游牧性'"/>
-                    <nz-radio-group [name]="item.key" [(ngModel)]="detailData[item.key]" *ngIf="item.title === '共享等级'">
-                        <label nz-radio [nzValue]="option.key" *ngFor="let option of item.options">{{option.title}}</label>
-                    </nz-radio-group>
-                    <nz-select [name]="item.key" [(ngModel)]="detailData[item.key]" *ngIf=" item.title === '游牧性'">
-                        <nz-option [nzValue]="option.key" *ngFor="let option of item.options" [nzLabel]="option.title"></nz-option>
-                    </nz-select>
-                </nz-form-control>
-
-            </nz-form-item>
-        </form>
-
-    </div>
+<nz-modal
+       [(nzVisible)]="showModel"
+       [nzTitle]="title + '参数'"
+       (nzOnCancel)="handleCancel()"
+       (nzOnOk)="handleOk()"
+       nzWidth="700px"
+>
+       <div class="subnet_params_container">
+               <form nz-form *ngIf="title === '无线域'">
+                       <nz-form-item *ngFor="let item of wirelessFormItems">
+                               <nz-form-label [nzSpan]="6" nzRequired [nzFor]="item.key">
+                    {{ item.title }}
+                </nz-form-label>
+                               <nz-form-control
+                                       [nzSpan]="10"
+                                       *ngIf="item.key !== 'an_coverage_area_ta_list'"
+                               >
+                                       <input
+                                               nz-input
+                                               [(ngModel)]="detailData[item.key]"
+                                               [name]="item.key"
+                                               [id]="item.key"
+                                       />
+                               </nz-form-control>
+                               <div *ngIf="item.key === 'an_coverage_area_ta_list'">
+                                       <div *ngFor="let area of areaList; let i = index">
+                                               <nz-form-control
+                                                       [nzSpan]="4"
+                                                       [nzOffset]="i && !ind ? 6 : 0"
+                                                       class="subnet_params_area"
+                                                       *ngFor="let item of area; let ind = index"
+                                               >
+                                                       <nz-select
+                                                               [(ngModel)]="item.selected"
+                                                               [name]="'area' + i + ind"
+                                                               (nzOpenChange)="handleChange(area, item)"
+                                                               (ngModelChange)=" handleChangeSelected(area, item) "
+                                                       >
+                                                               <nz-option
+                                                                       [nzValue]="op.name"
+                                                                       [nzLabel]="op.name"
+                                                                       *ngFor="let op of item.options"
+                                                               ></nz-option>
+                                                       </nz-select>
+                                               </nz-form-control>
+                                               <nz-form-control [nzSpan]="1" [nzOffset]="1">
+                                                       <button
+                                                               nz-button
+                                                               nzType="primary"
+                                                               nzSize="small"
+                                                               class="subnet_params_button"
+                                                               *ngIf="!i"
+                                                               (click)="creatAreaList()"
+                                                       >
+                                                               <i nz-icon class="anticon anticon-plus subnet_params_icon" ></i>
+                                                       </button>
+                                                       <button
+                                                               nz-button
+                                                               nzType="primary"
+                                                               nzSize="small"
+                                                               class="subnet_params_button"
+                                                               *ngIf="i"
+                                                               (click)="deleteAreaList(i)"
+                                                       >
+                                                               <i nz-icon class="anticon anticon-minus subnet_params_icon" ></i>
+                                                       </button>
+                                               </nz-form-control>
+                                       </div>
+                               </div>
+                       </nz-form-item>
+               </form>
+               <form nz-form *ngIf="title === '传输域'">
+                       <nz-form-item *ngFor="let item of transferFormItems">
+                               <nz-form-label [nzSpan]="7" nzRequired [nzFor]="item.key">
+                    {{ item.title }}
+                </nz-form-label>
+                               <nz-form-control [nzSpan]="12">
+                                       <input
+                                               nz-input
+                                               [(ngModel)]="detailData[item.key]"
+                                               [name]="item.key"
+                                               [id]="item.key"
+                                       />
+                               </nz-form-control>
+                       </nz-form-item>
+               </form>
+               <form nz-form *ngIf="title === '核心域'">
+                       <nz-form-item *ngFor="let item of coreFormItems">
+                               <nz-form-label [nzSpan]="10" nzRequired [nzFor]="item.key">
+                    {{ item.title }}
+                </nz-form-label>
+                               <nz-form-control [nzSpan]="10">
+                                       <input
+                                               nz-input
+                                               [id]="item.key"
+                                               [name]="item.key"
+                                               [(ngModel)]="detailData[item.key]"
+                                               [readOnly]="item.title === 'S-NSSAI'"
+                                               *ngIf=" item.title !== 'Resource Sharing Level' && item.title !== 'Mobility' "
+                                       />
+                                       <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"
+                        >
+                            {{ option.title }}
+                        </label>
+                                       </nz-radio-group>
+                                       <nz-select
+                                               [name]="item.key"
+                                               [(ngModel)]="detailData[item.key]"
+                                               *ngIf="item.title === 'Mobility'"
+                                       >
+                                               <nz-option
+                                                       [nzValue]="option.key"
+                                                       [nzLabel]="option.title"
+                                                       *ngFor="let option of item.options"
+                                               ></nz-option>
+                                       </nz-select>
+                               </nz-form-control>
+                       </nz-form-item>
+               </form>
+       </div>
 </nz-modal>
index 160a328..667c301 100644 (file)
@@ -1,18 +1,22 @@
 export const TASK_PROCESSING_STATUS = [\r
        {\r
-               title: '规划阶段',\r
+               title: 'All',\r
+               value: 'all'\r
+       },\r
+       {\r
+               title: 'Planning',\r
                value: 'Planning'\r
        },\r
        {\r
-               title: '审核阶段',\r
+               title: 'Waiting to Confirm',\r
                value: 'Waiting to Confirm'\r
        },\r
        {\r
-               title: '切片创建中',\r
+               title: 'Creating',\r
                value: 'Creating'\r
        },\r
        {\r
-               title: '创建完成',\r
+               title: 'Completed',\r
                value: 'Completed'\r
        }\r
 ]\r
@@ -20,7 +24,7 @@ export const TASK_PROCESSING_STATUS = [
 export const BUSINESS_REQUIREMENT = [\r
        [\r
                {\r
-                       title: '切片业务名称',\r
+                       title: 'Slicing Business Name',\r
                        key: 'service_name'\r
                },\r
                {\r
@@ -28,42 +32,42 @@ export const BUSINESS_REQUIREMENT = [
                        key: 'service_snssai'\r
                },\r
                {\r
-                       title: '用户下行带宽(Mbps)',\r
+                       title: 'Data Rate Downlink (Mbps) ',\r
                        key: 'exp_data_rate_dl'\r
                },\r
        ],\r
        [\r
                {\r
-                       title: '用户上行带宽(Mbps)',\r
+                       title: 'Data Rate Uplink (Mbps) ',\r
                        key: 'exp_data_rate_ul'\r
                },\r
                {\r
-                       title: '游牧性',\r
+                       title: 'Mobility',\r
                        key: 'ue_mobility_level'\r
                },\r
                {\r
-                       title: '时延(ms)',\r
+                       title: 'Latency (ms)',\r
                        key: 'latency'\r
                },\r
        ],\r
        [\r
                {\r
-                       title: '使用期限(月)',\r
+                       title: 'Use Interval (Moon) ',\r
                        key: 'use_interval'\r
                },\r
 \r
                {\r
-                       title: '激活因子(%)',\r
+                       title: 'Activity Factor(%)',\r
                        key: 'activity_factor'\r
                },\r
                {\r
-                       title: '共享等级',\r
+                       title: 'Resource Sharing Level',\r
                        key: 'resource_sharing_level'\r
                },\r
        ],\r
        [\r
                {\r
-                       title: '连接规模数',\r
+                       title: 'Max Number of UEs',\r
                        key: 'max_number_of_ues'\r
                },\r
                {\r
@@ -77,7 +81,7 @@ export const BUSINESS_REQUIREMENT = [
        ],\r
        [\r
                {\r
-                       title: '区域',\r
+                       title: 'Area',\r
                        key: 'area'\r
                },\r
        ],\r
@@ -87,7 +91,7 @@ export const BUSINESS_REQUIREMENT = [
 \r
 export const WIRELESS_FORM_ITEMS = [\r
        {\r
-               title: '时延(ms)',\r
+               title: 'Latency (ms)',\r
                key: 'an_latency'\r
        },\r
        {\r
@@ -95,18 +99,18 @@ export const WIRELESS_FORM_ITEMS = [
                key: 'an_5qi'\r
        },\r
        {\r
-               title: '覆盖小区列表',\r
+               title: 'Coverage Area Ta List',\r
                key: 'an_coverage_area_ta_list'\r
        }\r
 ]\r
 \r
 export const TRANSFRER_FORM_ITEMS = [\r
        {\r
-               title: '时延(ms)',\r
+               title: 'Latency (ms)',\r
                key: 'tn_latency'\r
        },\r
        {\r
-               title: '带宽',\r
+               title: 'Bandwidth',\r
                key: 'tn_bandwidth'\r
        }\r
 ]\r
@@ -117,51 +121,51 @@ export const CORE_FORM_ITEMS =    [
                key: 'cn_service_snssai'\r
        },\r
        {\r
-               title: '共享等级',\r
+               title: 'Resource Sharing Level',\r
                key: 'cn_resource_sharing_level',\r
                options: [\r
                        {\r
-                               title: '共享',\r
+                               title: 'Shared',\r
                                key: 'shared'\r
                        },\r
                        {\r
-                               title: '独享',\r
+                               title: 'Non-shared',\r
                                key: 'no-shared'\r
                        }\r
                ]\r
        },\r
        {\r
-               title: '游牧性',\r
+               title: 'Mobility',\r
                key: 'cn_ue_mobility_level',\r
                options: [\r
                        {\r
-                               title: '不可游牧',\r
-                               key: 'stageary'\r
+                               title: 'Stationary',\r
+                               key: 'stationary'\r
                        },\r
                        {\r
-                               title: '固定接入',\r
+                               title: 'Nomadic',\r
                                key: 'nomadic'\r
                        },\r
                        {\r
-                               title: '限定范围内可游牧',\r
+                               title: 'Spatially Restricted Mobility',\r
                                key: 'spatially restricted mobility'\r
                        },\r
                        {\r
-                               title: '自由游牧',\r
+                               title: 'Fully Mobility',\r
                                key: 'fully mobility'\r
                        }\r
                ]\r
        },\r
        {\r
-               title: '时延(ms)',\r
+               title: 'Latency (ms)',\r
                key: 'cn_latency'\r
        },\r
        {\r
-               title: '连接规模数',\r
+               title: 'Max Number of UEs',\r
                key: 'cn_max_number_of_ues'\r
        },\r
        {\r
-               title: '活动因子(%)',\r
+               title: 'Activity Factor (%)',\r
                key: 'cn_activity_factor'\r
        },\r
        {\r