summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-12-28 09:04:06 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-12-28 09:04:11 +0800
commitf574888b41dbf6d465973899c0265c4baa251f7f (patch)
tree27fbf4b4b3b51c2533b5856e6a781c92c4c1171c /usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management
parent9503c398fcbf257cda1b590f4a4e14083fd2053c (diff)
feat:Optimize loading of slicing page
Change-Id: I7bebe12f9e62268ce40142b518e592a9335040f5 Issue-ID: USECASEUI-369 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management')
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts4
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts4
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts6
3 files changed, 13 insertions, 1 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 22cc3eec..8a85f91c 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
@@ -41,11 +41,15 @@ export class NsiTableComponent implements OnInit {
}
this.myhttp.getSlicingNsiList(paramsObj,this.isSelect).subscribe (res => {
const { result_header: { result_code }, result_body: { nsi_service_instances,record_number } } = res;
+ this.loading = false;
if (+result_code === 200) {
this.total = record_number;
this.loading = false;
this.listOfData = nsi_service_instances;
}
+ }, (res) => {
+ this.loading = false;
+ console.error(res);
})
}
getListOfProcessingStatus(){
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 034b9a5e..7536a831 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
@@ -41,11 +41,15 @@ export class NssiTableComponent implements OnInit {
}
this.myhttp.getSlicingNssiList(paramsObj,this.isSelect).subscribe (res => {
const { result_header: { result_code }, result_body: { nssi_service_instances,record_number } } = res;
+ this.loading = false;
if (+result_code === 200) {
this.total = record_number;
this.loading = false;
this.listOfData = nssi_service_instances;
}
+ },(res) => {
+ this.loading = false;
+ console.error(res);
})
}
getListOfProcessingStatus(){
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 f81f94e1..92973d58 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
@@ -51,9 +51,9 @@ export class SlicingBusinessTableComponent implements OnInit {
}
this.myhttp.getSlicingBusinessList(paramsObj, this.isSelect).subscribe(res => {
const { result_header: { result_code }, result_body: { slicing_business_list, record_number } } = res;
+ this.loading = false;
if (+result_code === 200) {
this.total = record_number;
- this.loading = false;
this.listOfData = slicing_business_list.map((item, index) => {
if (item.last_operation_progress && item.last_operation_type && item.last_operation_progress < 100) {
let updata = (prodata: { operation_progress: string }) => {
@@ -115,6 +115,7 @@ export class SlicingBusinessTableComponent implements OnInit {
this.loading = true;
this.myhttp.changeActivateSlicingService(paramsObj, isActivate).subscribe(res => {
const { result_header: { result_code, result_message }, result_body: { operation_id } } = res;
+ this.loading = false;
if (+result_code === 200) {
this.notification1.notificationSuccess('slicing business', finished, slicing.service_instance_id);
this.getBusinessList();
@@ -127,6 +128,7 @@ export class SlicingBusinessTableComponent implements OnInit {
}
this.getBusinessList();
}, () => {
+ this.loading = false;
let singleSlicing = Object.assign({}, this.listOfData[index]);
this.listOfData[index] = singleSlicing;
this.listOfData = [...this.listOfData];
@@ -145,6 +147,7 @@ export class SlicingBusinessTableComponent implements OnInit {
this.loading = true;
this.myhttp.terminateSlicingService(paramsObj).subscribe(res => {
const { result_header: { result_code, result_message }, result_body: { operation_id } } = res;
+ this.loading = false;
if (+result_code === 200) {
this.notification1.notificationSuccess('slicing business', 'terminate', slicing.service_instance_id);
this.getBusinessList();
@@ -153,6 +156,7 @@ export class SlicingBusinessTableComponent implements OnInit {
this.terminateStart = false;
}
}, () => {
+ this.loading = false;
this.notification1.notificationFailed('slicing business', 'terminate', slicing.service_instance_id);
this.terminateStart = false;
})