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-22 18:26:01 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-12-22 18:26:08 +0800
commit892c3e66b34b9e7fd9d98b394a345ace8572ab64 (patch)
treea1be078d2fc6bb6d15fe5f634bb2734d09426d31 /usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management
parentb26da532dcd2f216a10b98c77f21aecd91654c68 (diff)
feat:Optimize activation and termination state definitions
Change-Id: I3845e2e9f0688ca0ec1f9e0dea9f17f45e4675a6 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/slicing-business-management/slicing-business-table/slicing-business-table.component.ts19
1 files changed, 16 insertions, 3 deletions
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 834f0c92..b4f2edbd 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
@@ -96,9 +96,9 @@ export class SlicingBusinessTableComponent implements OnInit {
serviceId:slicing.service_instance_id
};
if(slicing.orchestration_status === 'activated'){
- this.changeActivate(paramsObj,false,slicing,"deactivate","deactivated")
+ this.changeActivate(paramsObj,false,slicing,"deactivate","deactivated",i)
}else {
- this.changeActivate(paramsObj,true,slicing,"activate","activated");
+ this.changeActivate(paramsObj,true,slicing,"activate","activated",i);
}
},
nzCancelText: 'No',
@@ -109,7 +109,7 @@ export class SlicingBusinessTableComponent implements OnInit {
}
});
}
- changeActivate(paramsObj,isActivate,slicing,activateValue,finished){
+ changeActivate(paramsObj,isActivate,slicing,activateValue,finished,index){
this.myhttp.changeActivateSlicingService(paramsObj,isActivate).subscribe (res => {
const { result_header: { result_code, result_message }, result_body: { operation_id } } = res;
if (+result_code === 200) {
@@ -130,9 +130,18 @@ export class SlicingBusinessTableComponent implements OnInit {
this.getBusinessList();
})
}else {
+ let singleSlicing = Object.assign({},this.listOfData[index]);
+ this.listOfData[index] = singleSlicing;
+ this.listOfData = [...this.listOfData];
this.notification1.notificationFailed('slicing business', finished, slicing.service_instance_id);
console.error(result_message);
}
+ },(err) => {
+ let singleSlicing = Object.assign({},this.listOfData[index]);
+ this.listOfData[index] = singleSlicing;
+ this.listOfData = [...this.listOfData];
+ this.notification1.notificationFailed('slicing business', finished, slicing.service_instance_id);
+ console.error(err);
})
}
terminate(slicing){
@@ -170,6 +179,10 @@ export class SlicingBusinessTableComponent implements OnInit {
this.terminateStart = false;
console.error(result_message)
}
+ },(err) => {
+ this.notification1.notificationFailed('slicing business', 'terminate', slicing.service_instance_id);
+ this.terminateStart = false;
+ console.error(err)
})
},
nzCancelText: 'No',