aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.html15
-rw-r--r--usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.ts54
2 files changed, 38 insertions, 31 deletions
diff --git a/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.html b/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.html
index a3023fb0..3c849397 100644
--- a/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.html
+++ b/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.html
@@ -14,7 +14,7 @@
limitations under the License.
-->
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'">
- <nz-tab *ngFor="let tab of tabs" [nzTitle]="tab" (nzClick)="handleTabChange(tab)">
+ <nz-tab *ngFor="let tab of tabs" [nzTitle]="tab" (nzClick)="handleTabChange(tab, id, url)">
<!-- nsList -->
<div class="list" *ngIf="tab === 'NS'">
<h3 class="title"> Onboard {{tabTitle}} </h3>
@@ -29,7 +29,7 @@
style="margin-top: 16px">
{{ nsuploading ? 'Uploading' : 'Start Upload' }}
</button>
- <nz-table #nzTable [nzData]="tableData" nzShowSizeChanger [nzFrontPagination]="true" [nzShowQuickJumper]="true"
+ <nz-table #nzTable [nzData]="nstableData" nzShowSizeChanger [nzFrontPagination]="true" [nzShowQuickJumper]="true"
[nzPageSizeOptions]="[5,10,15,20]" [nzTotal]='total' [(nzPageSize)]="nspageSize" [(nzPageIndex)]='nspageIndex'
[nzLoading]="loading" nzSize="middle">
<thead (nzSortChange)="sort($event)" nzSingleSort>
@@ -49,11 +49,11 @@
<td *ngIf="item.uuid">{{item.uuid}}</td>
<td *ngIf="item.nsdName">{{item.nsdName}}</td>
- <td *ngIf="item.nsdName === null">无</td>
+ <td *ngIf="item.nsdName===null">无</td>
<td *ngIf="item.name">{{item.name}}</td>
-
+ <td *ngIf="item.name===null">无</td>
<td *ngIf="item.nsdVersion">{{item.nsdVersion}}</td>
- <td *ngIf="item.nsdVersion === null">无</td>
+ <td *ngIf="item.nsdVersion===null">无</td>
<td *ngIf="item.version">{{ item.version }}</td>
<td>
<span *ngIf="item.nsdOnboardingState">{{item.nsdOnboardingState}}</span>
@@ -65,7 +65,6 @@
'scaling':data.status=='Scaling','healing':data.status=='Healing'}">{{data.status || "Active"}}</span>
<nz-progress *ngIf="item.uuid" *ngIf="data.status == 'Creating' || data.status == 'Deleting' || data.status == 'Scaling' || data.status == 'Healing' " [nzPercent]="data.rate"></nz-progress> -->
</td>
-
<td>{{item.nsdOperationalState}}</td>
<td>{{item.nsdUsageState}}</td>
<td>
@@ -90,7 +89,7 @@
style="margin-top: 16px">
{{ vnfuploading ? 'Uploading' : 'Start Upload' }}
</button>
- <nz-table #nzTable [nzData]="tableData" nzShowSizeChanger [nzFrontPagination]="true" [nzShowQuickJumper]="true"
+ <nz-table #nzTable [nzData]="vnftableData" nzShowSizeChanger [nzFrontPagination]="true" [nzShowQuickJumper]="true"
[nzPageSizeOptions]="[5,10,15,20]" [nzTotal]='total' [(nzPageSize)]="vnfpageSize" [(nzPageIndex)]='vnfpageIndex'
[nzLoading]="loading" nzSize="middle">
<thead (nzSortChange)="sort($event)" nzSingleSort>
@@ -139,7 +138,7 @@
style="margin-top: 16px">
{{ pnfuploading ? 'Uploading' : 'Start Upload' }}
</button>
- <nz-table #nzTable [nzData]="tableData" nzShowSizeChanger [nzFrontPagination]="true" [nzShowQuickJumper]="true"
+ <nz-table #nzTable [nzData]="pnftableData" nzShowSizeChanger [nzFrontPagination]="true" [nzShowQuickJumper]="true"
[nzPageSizeOptions]="[5,10,15,20]" [nzTotal]='total' [(nzPageSize)]="pnfpageSize" [(nzPageIndex)]='pnfpageIndex'
[nzLoading]="loading" nzSize="middle">
<thead (nzSortChange)="sort($event)" nzSingleSort>
diff --git a/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.ts b/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.ts
index 82025ec6..766540c0 100644
--- a/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.ts
+++ b/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.ts
@@ -50,9 +50,14 @@ export class OnboardVnfVmComponent implements OnInit {
}
//表格数据
- tableData:any;
- sdcData:any;
- vfcData:any;
+ nstableData:any;
+ vnftableData:any;
+ pnftableData:any;
+ nssdcData:any;
+ nsvfcData:any;
+
+ vnfsdcData:any;
+ vnfvfcData:any;
nspageIndex = 1;
nspageSize = 10;
vnfpageIndex = 1;
@@ -85,13 +90,15 @@ export class OnboardVnfVmComponent implements OnInit {
console.log(this.url);
switch (tab) {
case 'NS':
+ this.nstableData = [];
this.getTableData();
-
break
case 'VNF':
+ this.vnftableData = [];
this.getTableVnfData()
break
case 'PNF':
+ this.pnftableData = [];
this.getTablePnfData()
break
}
@@ -261,8 +268,8 @@ changeUploadingSta(tab) {
.subscribe((data) => {
console.log("NSlist-vfc-->",data);
console.log("NSlist-length-vfc-->",data.length);
- this.vfcData = data;
- this.tableData = this.vfcData;
+ this.nsvfcData = data;
+ this.nstableData = this.nsvfcData
}, (err) => {
console.log(err);
})
@@ -271,13 +278,13 @@ changeUploadingSta(tab) {
.subscribe((data) => {
console.log('NSlist-sdc-->',data);
console.log("NSlist-length-vfc-->",data.length);
- this.sdcData = data;
- if (this.vfcData.length != 0 && this.sdcData.length != 0){
- this.tableData = this.MergeArray(this.vfcData, this.sdcData) //Array deduplication
- }else if(this.vfcData.length === 0 && this.sdcData.length != 0){
- this.tableData = this.vfcData.concat(this.sdcData); //Array concat
- }else if(this.vfcData.length != 0 && this.sdcData.length === 0){
- this.tableData = this.vfcData.concat(this.sdcData); //Array concat
+ this.nssdcData = data;
+ if (this.nsvfcData.length != 0 && this.nssdcData.length != 0){
+ this.nstableData = this.MergeArray(this.nsvfcData, this.nssdcData) //Array deduplication
+ }else if(this.nsvfcData.length === 0 && this.nssdcData.length != 0){
+ this.nstableData = this.nsvfcData.concat(this.nssdcData); //Array concat
+ }else if(this.nsvfcData.length != 0 && this.nssdcData.length === 0){
+ this.nstableData = this.nsvfcData.concat(this.nssdcData); //Array concat
}
}, (err) => {
console.log(err);
@@ -292,8 +299,8 @@ changeUploadingSta(tab) {
.subscribe((data) => {
console.log("vnfList--vnf>", data);
console.log("vnfList--vnf>", data.length);
- this.vfcData = data;
- this.tableData = this.vfcData;
+ this.vnfvfcData = data;
+ this.vnftableData = this.vnfvfcData
}, (err) => {
console.log(err);
})
@@ -303,13 +310,14 @@ changeUploadingSta(tab) {
.subscribe((data) => {
console.log('vnfList-sdc-->', data)
console.log('vnfList-sdc-->', data.length)
- this.sdcData = data;
- if (this.vfcData.length != 0 && this.sdcData.length != 0){
- this.tableData = this.MergeArray(this.vfcData, this.sdcData) //Array deduplication
- }else if(this.vfcData.length === 0 && this.sdcData.length != 0){
- this.tableData = this.vfcData.concat(this.sdcData); //Array concat
- }else if(this.vfcData.length != 0 && this.sdcData.length === 0){
- this.tableData = this.vfcData.concat(this.sdcData); //Array concat
+ this.vnfsdcData = data;
+ if (this.vnfvfcData.length != 0 && this.vnfsdcData.length != 0){
+ this.vnftableData = this.MergeArray(this.vnfvfcData, this.vnfsdcData) //Array deduplication
+ }else if(this.vnfvfcData.length === 0 && this.vnfsdcData.length != 0){
+ this.vnftableData = this.vnfvfcData.concat(this.vnfsdcData); //Array concat
+ }else if(this.vnfvfcData.length != 0 && this.vnfsdcData.length === 0){
+ this.vnftableData = this.vnfvfcData.concat(this.vnfsdcData); //Array concat
+ console.log(this.vnftableData)
}
}, (err) => {
console.log(err);
@@ -322,7 +330,7 @@ changeUploadingSta(tab) {
.subscribe((data) => {
console.log("pnfList-->", data);
console.log("pnfList-->", data.length);
- this.tableData = data;
+ this.pnftableData = data;
}, (err) => {
console.log(err);
})