From e9ed865ef5d4095cd81e405e8248218247f2d494 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Sat, 12 Oct 2019 16:06:37 +0800 Subject: feat: extract the deletion notification of the service-list page Change-Id: I7520a0a2e7406db712ad7c09dd1f23e213e725dc Issue-ID: USECASEUI-307 Signed-off-by: cyuamber --- .../components/notification/notification.component.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'usecaseui-portal/src/app/shared/components/notification/notification.component.ts') 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) + } } -- cgit