diff options
author | 2020-02-13 20:44:33 +0800 | |
---|---|---|
committer | 2020-02-13 20:44:39 +0800 | |
commit | c63489b9bb2071abc8180af4e53c2dcb143c127d (patch) | |
tree | bb7730cb155f693e3f5b719adeec72c708ac685d /usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts | |
parent | 3db71a09cb73e24eda6d36f39df2e35f123f290b (diff) |
feat:Optimize code for slice ordering and business code of csmf slicing
Change-Id: I62a00ed407796434239c2089788ac47330e1c0d8
Issue-ID: USECASEUI-368
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts')
-rw-r--r-- | usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts | 15 |
1 files changed, 8 insertions, 7 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 23b8360b..fc07efc9 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 @@ -35,7 +35,7 @@ export class SlicingBusinessTableComponent implements OnInit { isSelect: boolean = false; statusOptions: any[] = BUSINESS_STATUS; progressingTimer: any[] = []; - terminateStart: boolean = false; + terminateStart: any[] = []; @ViewChild('notification') notification1: any; getBusinessList(): void { @@ -47,7 +47,7 @@ export class SlicingBusinessTableComponent implements OnInit { pageSize: this.pageSize }; if (this.selectedValue !== BUSINESS_STATUS[0]) { - paramsObj["businessStatus"] = this.selectedValue; + paramsObj["businessStatus"] = this.selectedValue.toLocaleLowerCase(); this.isSelect = true; } this.myhttp.getSlicingBusinessList(paramsObj, this.isSelect).subscribe(res => { @@ -64,7 +64,8 @@ export class SlicingBusinessTableComponent implements OnInit { let obj = { serviceId: item.service_instance_id }; - if (item.last_operation_type === 'DELETE') this.terminateStart = true; + if (item.last_operation_type === 'DELETE') this.terminateStart[index] = true + else this.terminateStart[index] = false; this.queryProgress(obj, item.orchestration_status, index, updata).then((res) => { item.last_operation_progress = '100'; this.getBusinessList(); @@ -140,14 +141,14 @@ export class SlicingBusinessTableComponent implements OnInit { this.getBusinessList(); }) } - terminate(slicing) { + terminate(slicing,index) { this.modalService.confirm({ nzTitle: 'Do you Want to terminate slicing business?', nzContent: '<b>Name: </b>' + slicing.service_instance_name, nzOnOk: () => { this.notification1.notificationStart('slicing business', 'terminate', slicing.service_instance_id); let paramsObj = { serviceId: slicing.service_instance_id }; - this.terminateStart = true; + this.terminateStart[index] = true; this.loading = true; this.myhttp.terminateSlicingService(paramsObj).subscribe(res => { const { result_header: { result_code, result_message }, result_body: { operation_id } } = res; @@ -157,12 +158,12 @@ export class SlicingBusinessTableComponent implements OnInit { this.getBusinessList(); } else { this.notification1.notificationFailed('slicing business', 'terminate', slicing.service_instance_id); - this.terminateStart = false; + this.terminateStart[index] = false; } }, () => { this.loading = false; this.notification1.notificationFailed('slicing business', 'terminate', slicing.service_instance_id); - this.terminateStart = false; + this.terminateStart[index] = false; }) }, nzCancelText: 'No', |