diff options
author | cyuamber <xuranyjy@chinamobile.com> | 2019-12-11 15:57:45 +0800 |
---|---|---|
committer | cyuamber <xuranyjy@chinamobile.com> | 2019-12-11 15:57:51 +0800 |
commit | 3829d66ffaca12629ec09fee92b362fe599db9c6 (patch) | |
tree | 2f50e7bcd21dfd0b27ce58e4b0d0428e4f00feb2 /usecaseui-portal/src/app/views/services | |
parent | 27f241a7c7c9741d1834fbb13dd7250cb51de8c9 (diff) |
feat:add notification model of slicing business page
Change-Id: I5637f1f5bc5aee23518b6b92f4f7f53071866301
Issue-ID: USECASEUI-369
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services')
2 files changed, 16 insertions, 9 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.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.html index 80fcc763..a8d2407c 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.html +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.html @@ -74,4 +74,5 @@ </tbody> </nz-table> </div> -</div>
\ No newline at end of file +</div> +<app-notification #notification [isServicesList]="false" [parentComponent]="'slicing'"></app-notification>
\ No newline at end of file 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 a524b8bb..bb04c8f5 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 @@ -1,4 +1,4 @@ -import {Component, OnInit} from '@angular/core'; +import {Component, OnInit, ViewChild} from '@angular/core'; import {SlicingTaskServices} from '.././../../../../../core/services/slicingTaskServices'; import {BUSINESS_STATUS} from '../../../../../../../constants/constants'; import { NzModalService } from 'ng-zorro-antd'; @@ -33,7 +33,7 @@ export class SlicingBusinessTableComponent implements OnInit { isSelect: boolean = false; statusOptions: any[] = BUSINESS_STATUS; progressingTimer :any[] = []; - + @ViewChild('notification') notification1: any; getBusinessList (): void{ this.loading = true; @@ -80,8 +80,9 @@ export class SlicingBusinessTableComponent implements OnInit { switchChange(slicing,i){ this.modalService.confirm({ nzTitle: '<i>Do you Want to'+(slicing.orchestration_status === 'activated'?'deactivated':'activated')+ 'slicing business?</i>', - nzContent: '<b>service_instance_id:'+slicing.service_instance_id+'</b>', + nzContent: '<b>Name:'+slicing.service_instance_name+'</b>', nzOnOk: () => { + this.notification1.notificationStart('slicing business', slicing.orchestration_status === 'activated'?'deactivate':'activated', slicing.service_instance_id); let paramsObj = { serviceId:slicing.service_instance_id }; @@ -108,25 +109,28 @@ export class SlicingBusinessTableComponent implements OnInit { console.log(operation_id,"operation_id"); let obj = { serviceId: slicing.service_instance_id - } + }; let updata = (prodata) => { slicing.last_operation_progress = prodata.progress; slicing.orchestration_status = prodata.operation_type; this.queryProgress(obj, updata).then(() => { slicing.last_operation_progress = 100; slicing.orchestration_status = finished; + this.notification1.notificationSuccess('slicing business', finished, slicing.service_instance_id); }) - } + }; }else { - console.error(result_message) + this.notification1.notificationFailed('slicing business', finished, slicing.service_instance_id); + console.error(result_message); } }) } terminate(slicing){ this.modalService.confirm({ nzTitle: 'Do you Want to Terminate slicing business?', - nzContent: '<b>service_instance_id: </b>'+slicing.service_instance_id, + 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 }; @@ -145,9 +149,11 @@ export class SlicingBusinessTableComponent implements OnInit { this.queryProgress(obj, updata).then(() => { slicing.last_operation_progress = 100; slicing.orchestration_status = "terminated"; + this.notification1.notificationSuccess('slicing business', 'terminate', slicing.service_instance_id); }) - } + }; }else { + this.notification1.notificationFailed('slicing business', 'terminate', slicing.service_instance_id); console.error(result_message) } }) |