summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-12-11 09:16:41 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-12-11 09:18:16 +0800
commit27f241a7c7c9741d1834fbb13dd7250cb51de8c9 (patch)
tree5aeb03298ddd4f09462e497a2b476315505b31d9 /usecaseui-portal/src
parentbff56675c3a12bafe443fbb52f5d9eea99461db7 (diff)
feat: Optimize code and add English fields
Change-Id: Id61ab33f0bb612f8ae3a1debbc4c2d4887cf2b2d Issue-ID: USECASEUI-368 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src')
-rw-r--r--usecaseui-portal/src/app/mock/json/slicing_task_auditInfo.json4
-rw-r--r--usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html4
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html62
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts8
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.html181
-rw-r--r--usecaseui-portal/src/constants/constants.ts64
6 files changed, 217 insertions, 106 deletions
diff --git a/usecaseui-portal/src/app/mock/json/slicing_task_auditInfo.json b/usecaseui-portal/src/app/mock/json/slicing_task_auditInfo.json
index a3b97c82..0b444646 100644
--- a/usecaseui-portal/src/app/mock/json/slicing_task_auditInfo.json
+++ b/usecaseui-portal/src/app/mock/json/slicing_task_auditInfo.json
@@ -13,7 +13,7 @@
"service_snssai": "1-010101",
"exp_data_rate_dl": "300",
"exp_data_rate_ul": "300",
- "ue_mobility_level": "stageary",
+ "ue_mobility_level": "stationary",
"latency": "20",
"use_interval": "12",
"coverage_area_ta_list": ["北京;北京市;海淀区", "北京;北京市;西城区", "北京;北京市;昌平区"],
@@ -43,7 +43,7 @@
"cn_suggest_nssi_name": "eMBB CNinstance3",
"cn_service_snssai": "1-010101",
"cn_resource_sharing_level": "shared",
- "cn_ue_mobility_level": "stageary",
+ "cn_ue_mobility_level": "stationary",
"cn_latency": "10",
"cn_max_number_of_ues": "10000",
"cn_activity_factor": "60",
diff --git a/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html
index f659bd47..9a11ca2e 100644
--- a/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html
+++ b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html
@@ -54,10 +54,10 @@
[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}}
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html
index c4aeb72e..81f4c961 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html
@@ -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>
@@ -33,19 +51,33 @@
<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
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts
index 6c4d9041..944f4a25 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts
@@ -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();
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 1dfc6338..127a5b98 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
@@ -1,54 +1,129 @@
-<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>
diff --git a/usecaseui-portal/src/constants/constants.ts b/usecaseui-portal/src/constants/constants.ts
index 160a3282..667c3014 100644
--- a/usecaseui-portal/src/constants/constants.ts
+++ b/usecaseui-portal/src/constants/constants.ts
@@ -1,18 +1,22 @@
export const TASK_PROCESSING_STATUS = [
{
- title: '规划阶段',
+ title: 'All',
+ value: 'all'
+ },
+ {
+ title: 'Planning',
value: 'Planning'
},
{
- title: '审核阶段',
+ title: 'Waiting to Confirm',
value: 'Waiting to Confirm'
},
{
- title: '切片创建中',
+ title: 'Creating',
value: 'Creating'
},
{
- title: '创建完成',
+ title: 'Completed',
value: 'Completed'
}
]
@@ -20,7 +24,7 @@ export const TASK_PROCESSING_STATUS = [
export const BUSINESS_REQUIREMENT = [
[
{
- title: '切片业务名称',
+ title: 'Slicing Business Name',
key: 'service_name'
},
{
@@ -28,42 +32,42 @@ export const BUSINESS_REQUIREMENT = [
key: 'service_snssai'
},
{
- title: '用户下行带宽(Mbps)',
+ title: 'Data Rate Downlink (Mbps) ',
key: 'exp_data_rate_dl'
},
],
[
{
- title: '用户上行带宽(Mbps)',
+ title: 'Data Rate Uplink (Mbps) ',
key: 'exp_data_rate_ul'
},
{
- title: '游牧性',
+ title: 'Mobility',
key: 'ue_mobility_level'
},
{
- title: '时延(ms)',
+ title: 'Latency (ms)',
key: 'latency'
},
],
[
{
- title: '使用期限(月)',
+ title: 'Use Interval (Moon) ',
key: 'use_interval'
},
{
- title: '激活因子(%)',
+ title: 'Activity Factor(%)',
key: 'activity_factor'
},
{
- title: '共享等级',
+ title: 'Resource Sharing Level',
key: 'resource_sharing_level'
},
],
[
{
- title: '连接规模数',
+ title: 'Max Number of UEs',
key: 'max_number_of_ues'
},
{
@@ -77,7 +81,7 @@ export const BUSINESS_REQUIREMENT = [
],
[
{
- title: '区域',
+ title: 'Area',
key: 'area'
},
],
@@ -87,7 +91,7 @@ export const BUSINESS_REQUIREMENT = [
export const WIRELESS_FORM_ITEMS = [
{
- title: '时延(ms)',
+ title: 'Latency (ms)',
key: 'an_latency'
},
{
@@ -95,18 +99,18 @@ export const WIRELESS_FORM_ITEMS = [
key: 'an_5qi'
},
{
- title: '覆盖小区列表',
+ title: 'Coverage Area Ta List',
key: 'an_coverage_area_ta_list'
}
]
export const TRANSFRER_FORM_ITEMS = [
{
- title: '时延(ms)',
+ title: 'Latency (ms)',
key: 'tn_latency'
},
{
- title: '带宽',
+ title: 'Bandwidth',
key: 'tn_bandwidth'
}
]
@@ -117,51 +121,51 @@ export const CORE_FORM_ITEMS = [
key: 'cn_service_snssai'
},
{
- title: '共享等级',
+ title: 'Resource Sharing Level',
key: 'cn_resource_sharing_level',
options: [
{
- title: '共享',
+ title: 'Shared',
key: 'shared'
},
{
- title: '独享',
+ title: 'Non-shared',
key: 'no-shared'
}
]
},
{
- title: '游牧性',
+ title: 'Mobility',
key: 'cn_ue_mobility_level',
options: [
{
- title: '不可游牧',
- key: 'stageary'
+ title: 'Stationary',
+ key: 'stationary'
},
{
- title: '固定接入',
+ title: 'Nomadic',
key: 'nomadic'
},
{
- title: '限定范围内可游牧',
+ title: 'Spatially Restricted Mobility',
key: 'spatially restricted mobility'
},
{
- title: '自由游牧',
+ title: 'Fully Mobility',
key: 'fully mobility'
}
]
},
{
- title: '时延(ms)',
+ title: 'Latency (ms)',
key: 'cn_latency'
},
{
- title: '连接规模数',
+ title: 'Max Number of UEs',
key: 'cn_max_number_of_ues'
},
{
- title: '活动因子(%)',
+ title: 'Activity Factor (%)',
key: 'cn_activity_factor'
},
{