summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/views')
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html8
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts38
2 files changed, 34 insertions, 12 deletions
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 {