diff options
Diffstat (limited to 'usecaseui-portal/src/app/views')
5 files changed, 79 insertions, 51 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-management.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-management.component.ts index 3ad730fb..0f530d7d 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-management.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-management.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit, HostBinding } from '@angular/core'; -import { slideToRight } from '../../../shared/utils/animates'; +import { slideToRight } from '@src/app/shared/utils/animates'; @Component({ selector: 'app-slicing-management', 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 d5cda96c..34cd4451 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 @@ -1,7 +1,7 @@ import {Component, OnInit, Input, SimpleChanges} from '@angular/core'; import { NzMessageService } from 'ng-zorro-antd'; -import { SlicingTaskServices } from '.././../../../core/services/slicingTaskServices'; -import { TASK_PROCESSING_STATUS } from '../../../../../constants/constants'; +import { SlicingTaskServices } from '@src/app/core/services/slicingTaskServices'; +import { TASK_PROCESSING_STATUS } from '@src/constants/constants'; @Component({ selector: 'app-slicing-task-management', diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts index 4c60cd9a..f65ed32c 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core'; import { NzMessageService } from 'ng-zorro-antd'; -import { SlicingTaskServices } from '../../../../../core/services/slicingTaskServices'; +import { SlicingTaskServices } from '@src/app/core/services/slicingTaskServices'; @Component({ selector: 'app-slicing-task-model', @@ -143,11 +143,24 @@ export class SlicingTaskModelComponent implements OnInit { let subnetData = this.pick(nsi_nssi_info, ['an_suggest_nssi_id', 'an_suggest_nssi_name', 'tn_suggest_nssi_id', 'tn_suggest_nssi_name', 'cn_suggest_nssi_id', 'cn_suggest_nssi_name']); this.subnetDataFormatting(subnetData, 0); // 前端模拟数据 - let area = ["Beijing;Beijing;Haidian District", "Beijing;Beijing;Xicheng District", "Beijing;Beijing;Changping District"] - // this.slicingSubnet[0].params = { an_latency, an_5qi, an_coverage_area_ta_list } - // this.slicingSubnet[0].params = { an_latency, an_5qi, an_script_name, an_coverage_area_ta_list: area } + let area = ["Beijing;Beijing;Haidian District", "Beijing;Beijing;Xicheng District", "Beijing;Beijing;Changping District"]; + this.slicingSubnet[0].params = {...this.pick(nsi_nssi_info, [ + 'an_service_snssai', + 'an_resource_sharing_level', + 'an_ue_mobility_level', + 'an_latency', + 'an_max_number_of_ues', + 'an_activity_factor', + 'an_exp_data_rate_dl', + 'an_exp_data_rate_ul', + 'an_area_traffic_cap_dl', + 'an_area_traffic_cap_ul', + 'an_script_name', + 'an_overalluser_density', + '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[0].params = this.slicingSubnet[2].params = {...this.pick(nsi_nssi_info, [ + this.slicingSubnet[2].params = {...this.pick(nsi_nssi_info, [ 'cn_service_snssai', 'cn_resource_sharing_level', 'cn_ue_mobility_level', @@ -160,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') } 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 990e5638..50b6e5ad 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,39 +1,6 @@ <nz-modal [(nzVisible)]="showModel" [nzTitle]="title + 'Parameter'" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" nzWidth="700px"> <div class="subnet_params_container"> - <!--<form nz-form *ngIf="title === 'An'">--> - <!--<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]="!ind ? 4 : 5" [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 === 'Tn'"> <nz-form-item *ngFor="let item of transferFormItems"> <nz-form-label [nzSpan]="7" nzRequired [nzFor]="item.key"> @@ -52,13 +19,13 @@ </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 *ngIf="!(item.key === 'an_coverage_area_ta_list' && title === 'Cn')"> + <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"> @@ -69,6 +36,31 @@ <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"> 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 a0b5df21..bceca197 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 @@ -1,5 +1,5 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; -import { WIRELESS_FORM_ITEMS, 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', @@ -15,15 +15,40 @@ export class SubnetParamsModelComponent implements OnInit { @Output() paramsDataChange = new EventEmitter<any>(); transferFormItems = TRANSFRER_FORM_ITEMS; - coreFormItems = CORE_FORM_ITEMS; - wirelessFormItems = WIRELESS_FORM_ITEMS; + coreFormItems: any[] = []; 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() { } ngOnInit() { } ngOnChanges() { + if(this.title){ + this.coreFormItems = this.title === 'An'?CORE_FORM_ITEMS.An:this.title === 'Cn'?CORE_FORM_ITEMS.Cn:[]; + if(this.detailData !==undefined && Object.keys(this.detailData).length!==0){ + this.EndpointEnable = (this.detailData.hasOwnProperty("an_Endpoint") && this.detailData['an_Endpoint'].length!==0) || (this.detailData.hasOwnProperty("cn_Endpoint") && this.detailData['cn_Endpoint'].length!==0) + } + // -------> 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"] + :[]; + }else{ + this.coreFormItems.map((item,index)=>{ + if(item.title === 'Endpoint'){ + this.coreFormItems.splice(index,1) + } + }) + } + } + //-------> Comment: Above code if (this.title === 'An') { this.AreaFormatting(); } |