Merge "Upgrade Angular and Spring-Boot"
authorManoop Talasila <talasila@research.att.com>
Thu, 27 Jun 2019 16:28:34 +0000 (16:28 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Thu, 27 Jun 2019 16:28:34 +0000 (16:28 +0000)
docs/release-notes.rst
webapp-frontend/src/app/services/ui/notification.service.ts

index 491a18f..c6fbd26 100644 (file)
@@ -45,6 +45,7 @@ Version 1.0.4, 27 June 2019
 * Move mock admin screen user data to backend
 * Update App manager client to spec version 0.1.5
 * Rework admin table
+* Update the notification service 
 * Remove the RAN connection invocation link from left menu and move it to control screen
 * Repair deploy-app feature and use icon instead of text button
 
index 30f8021..6477125 100644 (file)
@@ -28,25 +28,34 @@ export class NotificationService {
 
   constructor(public snackBar: MatSnackBar) { }
 
-  config: MatSnackBarConfig = {
-    duration: 3000,
+  successConfig: MatSnackBarConfig = {
+    duration: 10000,
     horizontalPosition: 'right',
     verticalPosition: 'top'
   };
 
+  warningConfig: MatSnackBarConfig = {
+    horizontalPosition: 'right',
+    verticalPosition: 'top'
+  };
+
+  errorConfig: MatSnackBarConfig = {
+    horizontalPosition: 'right',
+    verticalPosition: 'top'
+  };
 
   success(msg: string) {
-    this.config['panelClass'] = ['notification', 'success', 'default'];
-    this.snackBar.open(msg, '', this.config);
+    this.successConfig['panelClass'] = ['notification', 'success', 'default'];
+    this.snackBar.open(msg, '', this.successConfig);
   }
 
   warn(msg: string) {
-    this.config['panelClass'] = ['notification', 'warn', 'default'];
-    this.snackBar.open(msg, '', this.config);
+    this.warningConfig['panelClass'] = ['notification', 'warn', 'default'];
+    this.snackBar.open(msg, 'Dismiss', this.warningConfig);
   }
 
   error(msg: string) {
-    this.config['panelClass'] = ['notification', 'error', 'default'];
-    this.snackBar.open(msg, '', this.config);
+    this.errorConfig['panelClass'] = ['notification', 'error', 'default'];
+    this.snackBar.open(msg, 'Dismiss', this.errorConfig);
   }
 }