diff options
Diffstat (limited to 'usecaseui-portal')
4 files changed, 42 insertions, 14 deletions
diff --git a/usecaseui-portal/src/app/mock/json/slicing_taskCreationProgress.json b/usecaseui-portal/src/app/mock/json/slicing_taskCreationProgress.json index 8b152a08..42570372 100644 --- a/usecaseui-portal/src/app/mock/json/slicing_taskCreationProgress.json +++ b/usecaseui-portal/src/app/mock/json/slicing_taskCreationProgress.json @@ -5,7 +5,10 @@ },
"result_body": {
"an_progress": 100,
- "tn_progress": null,
- "cn_progress": 60
+ "tn_progress": 70,
+ "cn_progress": 60,
+ "an_status":"finished",
+ "tn_status":"processing",
+ "cn_status":"processing"
}
}
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 6065be0f..466d6ee4 100644 --- a/usecaseui-portal/src/app/mock/json/slicing_task_auditInfo.json +++ b/usecaseui-portal/src/app/mock/json/slicing_task_auditInfo.json @@ -47,6 +47,7 @@ "an_area_traffic_cap_dl": "300",
"an_area_traffic_cap_ul": "300",
"an_overalluser_density":"test_an_overalluser_density_01",
+ "an_enableNSSISelection":false,
"an_Endpoint":[
{
"an_ip_address":"test_an_ip_address_01"
@@ -67,6 +68,7 @@ "tn_script_name":"test_tn_01",
"tn_jitter":"test_tn_jitter_01",
"tn_service_snssai":"test_tn_service_snssai_01",
+ "tn_enableNSSISelection":false,
"cn_suggest_nssi_id": "46da8cf8-0878-48ac-bea3-f2200959411c",
"cn_suggest_nssi_name": "eMBB CNinstance3",
"cn_service_snssai": "cn_1-010101",
@@ -81,6 +83,7 @@ "cn_area_traffic_cap_ul": "300",
"cn_script_name":"test_cn_01",
"cn_overalluser_density":"test_cn_overalluser_density_01",
+ "cn_enableNSSISelection":true,
"cn_Endpoint":[
{
"cn_ip_address":"test_cn_ip_address_01"
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html index 58f08d4c..e9ee0ecc 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html @@ -34,11 +34,11 @@ </nz-list-item> <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8"> <p class="listitem_subtitle" nz-col nzSpan="24">Matching Shared NSSI:</p> - <nz-card *ngFor="let item of slicingSubnet" nzType="inner" nz-col nzSpan="24" [nzTitle]="item.title"> + <nz-card *ngFor="let item of slicingSubnet,let i = index" nzType="inner" nz-col nzSpan="24" [nzTitle]="item.title"> <div nz-row [nzGutter]="8"> <div nz-col nzSpan="12"> NSSI ID: - <nz-select nzShowSearch [nzDisabled]="isDisabled" [(ngModel)]="item.slicingId" + <nz-select nzShowSearch [nzDisabled]="isDisabled[i]" [(ngModel)]="item.slicingId" (ngModelChange)="slicingSubnetChange(item)" (nzOpenChange)="openSubnetInstances($event, item)" (nzScrollToBottom)="getNextPageSubnet(item)"> <nz-option nzCustomContent *ngFor="let item of item.instances" [nzValue]="item.service_instance_id" @@ -55,8 +55,8 @@ NSSI Name:{{item.slicingName}} </div> <div nz-col nzSpan="4"> - <button nz-button nzType="primary" (click)="restSubnetInstance(item)" [disabled]='isDisabled' - [attr.disabled]='isDisabled?true:undefined'> + <button nz-button nzType="primary" (click)="restSubnetInstance(item)" [disabled]='isDisabled[i]' + [attr.disabled]='isDisabled[i]?true:undefined'> <i nz-icon class="anticon anticon-delete"></i> </button> <button nz-button nzType="primary" (click)="showParamsModel(item)"> 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 50ef86a0..3e91fd30 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,7 @@ import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core'; import { NzMessageService } from 'ng-zorro-antd'; import { SlicingTaskServices } from '@src/app/core/services/slicingTaskServices'; +import { indexDebugNode } from '@angular/core/src/debug/debug_node'; @Component({ selector: 'app-slicing-task-model', @@ -26,6 +27,8 @@ export class SlicingTaskModelComponent implements OnInit { selectedServiceId: string; selectedServiceName: string; slicingInstances: any; + //an/tn/cn instances NSSI ID下拉框的开关 + enableNSSISelectionList: any[] = [] // 子网实例 slicingSubnet: any[] = [ { @@ -65,7 +68,7 @@ export class SlicingTaskModelComponent implements OnInit { instances: [] } ] - isDisabled: boolean = true; + isDisabled: any = [true,true,true] // 子网参数 isShowParams: boolean; paramsTitle: string; @@ -82,7 +85,9 @@ export class SlicingTaskModelComponent implements OnInit { this.isSpinning = true; this.getautidInfo(); } else { - this.isDisabled = true; + this.isDisabled.map(item=>{ + item = true + }) } } @@ -125,9 +130,18 @@ export class SlicingTaskModelComponent implements OnInit { // 共享切片实例 this.selectedServiceId = nsi_nssi_info.suggest_nsi_id; this.selectedServiceName = nsi_nssi_info.suggest_nsi_name; + // an/tn/cn 3 select box switches parameters of Matching Shared NSSI + this.enableNSSISelectionList = [nsi_nssi_info.an_enableNSSISelection,nsi_nssi_info.tn_enableNSSISelection,nsi_nssi_info.cn_enableNSSISelection]; if (!this.selectedServiceId || !this.selectedServiceName) { - this.isDisabled = false; + this.isDisabled.map((item,index)=>{ + this.isDisabled[index] = false + }) } + this.isDisabled.map((item,index)=>{ + if(this.enableNSSISelectionList[index]){ + this.isDisabled[index] = false + } + }) this.slicingInstances = { currentPage: '1', pageSize: '10', @@ -157,9 +171,10 @@ export class SlicingTaskModelComponent implements OnInit { 'an_area_traffic_cap_ul', 'an_script_name', 'an_overalluser_density', - 'an_Endpoint' + 'an_Endpoint', + "an_enableNSSISelection" ]), 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[1].params = this.pick(nsi_nssi_info, ['tn_latency', 'tn_bandwidth', 'tn_script_name', 'tn_jitter', 'tn_service_snssai',"tn_enableNSSISelection"]); this.slicingSubnet[2].params = {...this.pick(nsi_nssi_info, [ 'cn_service_snssai', 'cn_resource_sharing_level', @@ -173,7 +188,8 @@ export class SlicingTaskModelComponent implements OnInit { 'cn_area_traffic_cap_ul', 'cn_script_name', 'cn_overalluser_density', - 'cn_Endpoint' + 'cn_Endpoint', + "cn_enableNSSISelection" ])}; } else { this.message.error(result_message || 'Failed to get data') @@ -226,7 +242,11 @@ export class SlicingTaskModelComponent implements OnInit { slicingInstanceChange(): void { // choose the target nssi - this.isDisabled = true; + this.isDisabled.map((item,index)=>{ + if (!this.enableNSSISelectionList[index]) { + this.isDisabled[index] = true + } + }) this.selectedServiceName = ''; // 获取切片子网实例数据 this.http.getSlicingSubnetInstance(this.selectedServiceId).subscribe(res => { @@ -284,7 +304,9 @@ export class SlicingTaskModelComponent implements OnInit { item.slicingId = ''; item.slicingName = ''; }) - this.isDisabled = false; + this.isDisabled.map((item,index)=>{ + this.isDisabled[index] = false + }) } openSubnetInstances(bool: boolean, instance: any): void { |