summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2020-01-06 15:19:42 +0800
committercyuamber <xuranyjy@chinamobile.com>2020-01-06 15:19:49 +0800
commitbedce39f1baa80f816839dc8fb7f393d3076231f (patch)
tree232b6aa71590c707b5d96ebb4e540764b99a2181
parent0cc1ad2b47ebde94a4954b9496c78afcae416ec9 (diff)
feat:Optimize table filtering of slicing business page
Change-Id: If2c9967e0b742c399030228bda26f1f285653f83 Issue-ID: USECASEUI-369 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts5
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts5
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts35
3 files changed, 27 insertions, 18 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts
index 8a85f91c..203df8a6 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts
@@ -31,6 +31,7 @@ export class NsiTableComponent implements OnInit {
getNsiList (): void{
this.loading = true;
this.isSelect = false;
+ this.listOfData = [];
let paramsObj = {
pageNo: this.pageIndex,
pageSize: this.pageSize
@@ -45,7 +46,9 @@ export class NsiTableComponent implements OnInit {
if (+result_code === 200) {
this.total = record_number;
this.loading = false;
- this.listOfData = nsi_service_instances;
+ if(nsi_service_instances !== null && nsi_service_instances.length >0) {
+ this.listOfData = nsi_service_instances;
+ }
}
}, (res) => {
this.loading = false;
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts
index 7536a831..a6e00b43 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts
@@ -31,6 +31,7 @@ export class NssiTableComponent implements OnInit {
getNssiList (): void{
this.loading = true;
this.isSelect = false;
+ this.listOfData = [];
let paramsObj = {
pageNo: this.pageIndex,
pageSize: this.pageSize
@@ -45,7 +46,9 @@ export class NssiTableComponent implements OnInit {
if (+result_code === 200) {
this.total = record_number;
this.loading = false;
- this.listOfData = nssi_service_instances;
+ if(nssi_service_instances !== null && nssi_service_instances.length >0) {
+ this.listOfData = nssi_service_instances;
+ }
}
},(res) => {
this.loading = false;
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts
index 030d9f56..23b8360b 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts
@@ -41,6 +41,7 @@ export class SlicingBusinessTableComponent implements OnInit {
getBusinessList(): void {
this.loading = true;
this.isSelect = false;
+ this.listOfData = [];
let paramsObj = {
pageNo: this.pageIndex,
pageSize: this.pageSize
@@ -54,22 +55,24 @@ export class SlicingBusinessTableComponent implements OnInit {
this.loading = false;
if (+result_code === 200) {
this.total = record_number;
- this.listOfData = slicing_business_list.map((item, index) => {
- if (item.last_operation_progress && item.last_operation_type && Number(item.last_operation_progress) < 100) {
- let updata = (prodata: { operation_progress: string }) => {
- item.last_operation_progress = prodata.operation_progress || item.last_operation_progress;
- };
- let obj = {
- serviceId: item.service_instance_id
- };
- if (item.last_operation_type === 'DELETE') this.terminateStart = true;
- this.queryProgress(obj, item.orchestration_status, index, updata).then((res) => {
- item.last_operation_progress = '100';
- this.getBusinessList();
- })
- }
- return item
- });
+ if(slicing_business_list !==null && slicing_business_list.length >0){
+ this.listOfData = slicing_business_list.map((item, index) => {
+ if (item.last_operation_progress && item.last_operation_type && Number(item.last_operation_progress) < 100) {
+ let updata = (prodata: { operation_progress: string }) => {
+ item.last_operation_progress = prodata.operation_progress || item.last_operation_progress;
+ };
+ let obj = {
+ serviceId: item.service_instance_id
+ };
+ if (item.last_operation_type === 'DELETE') this.terminateStart = true;
+ this.queryProgress(obj, item.orchestration_status, index, updata).then((res) => {
+ item.last_operation_progress = '100';
+ this.getBusinessList();
+ })
+ }
+ return item
+ });
+ }
}
})
}