]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-notification.ts
import 15.2.0 Octopus source
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / models / cd-notification.ts
index 1acbba1a5e4ea69932d4703d50b813eff146669c..3c8c078893252416ec3f160186507d09a8144860 100644 (file)
@@ -1,8 +1,10 @@
 import { IndividualConfig } from 'ngx-toastr';
+import { Icons } from '../enum/icons.enum';
 import { NotificationType } from '../enum/notification-type.enum';
 
 export class CdNotificationConfig {
   applicationClass: string;
+  isFinishedTask = false;
 
   private classes = {
     Ceph: 'ceph-icon',
@@ -24,9 +26,10 @@ export class CdNotification extends CdNotificationConfig {
   timestamp: string;
   textClass: string;
   iconClass: string;
+  duration: number;
 
   private textClasses = ['text-danger', 'text-info', 'text-success'];
-  private iconClasses = ['fa-exclamation-triangle', 'fa-info', 'fa-check'];
+  private iconClasses = [Icons.warning, Icons.info, Icons.check];
 
   constructor(private config: CdNotificationConfig = new CdNotificationConfig()) {
     super(config.type, config.title, config.message, config.options, config.application);
@@ -36,5 +39,6 @@ export class CdNotification extends CdNotificationConfig {
     this.timestamp = new Date().toJSON();
     this.iconClass = this.iconClasses[this.type];
     this.textClass = this.textClasses[this.type];
+    this.isFinishedTask = config.isFinishedTask;
   }
 }