diff options
author | 2019-10-12 16:06:37 +0800 | |
---|---|---|
committer | 2019-10-12 16:07:09 +0800 | |
commit | e9ed865ef5d4095cd81e405e8248218247f2d494 (patch) | |
tree | af6d2ec978ee3afc327ca67265a1cbb25581519e /usecaseui-portal/src/app/shared/components/notification/notification.component.ts | |
parent | 3a32288d1a4053e3bf561766c35cf27d5a938b38 (diff) |
feat: extract the deletion notification of the service-list page
Change-Id: I7520a0a2e7406db712ad7c09dd1f23e213e725dc
Issue-ID: USECASEUI-307
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/shared/components/notification/notification.component.ts')
-rw-r--r-- | usecaseui-portal/src/app/shared/components/notification/notification.component.ts | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/usecaseui-portal/src/app/shared/components/notification/notification.component.ts b/usecaseui-portal/src/app/shared/components/notification/notification.component.ts index 00ccf90b..de0df083 100644 --- a/usecaseui-portal/src/app/shared/components/notification/notification.component.ts +++ b/usecaseui-portal/src/app/shared/components/notification/notification.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild, TemplateRef } from '@angular/core'; +import { Component, OnInit, ViewChild, Input } from '@angular/core'; import { NzNotificationService } from 'ng-zorro-antd'; @Component({ @@ -8,6 +8,8 @@ import { NzNotificationService } from 'ng-zorro-antd'; }) export class NotificationComponent implements OnInit { @ViewChild('notificationModel')notificationModel: any; + @Input()isServicesList: boolean; + @Input()customerSelected: object; notificationAttributes: { title: string, @@ -23,17 +25,22 @@ export class NotificationComponent implements OnInit { } setNotification({ title, imgPath, action, status, name }):void{ - this.notificationAttributes = { title, imgPath, action, status, name } + this.notificationAttributes = { title, imgPath, action, status, name }; } notificationSuccess(title: string, action: string, name: string): void { - this.notification.remove() + this.notification.remove(); this.setNotification({ title, imgPath: "assets/images/execute-success.png", action, status: 'Success', name }) this.notification.template(this.notificationModel); } notificationFailed(title: string, action: string, name: string): void { - this.notification.remove() + this.notification.remove(); this.setNotification({ title, imgPath: "assets/images/execute-faild.png", action, status: 'Failed', name }) this.notification.template(this.notificationModel) } + notificationStart(title: string, action: string, name: string): void { + this.notification.remove(); + this.setNotification({ title, imgPath: "assets/images/execute-inproess.png", action , status: 'instance temination is starting', name }) + this.notification.template(this.notificationModel) + } } |