Code Review
/
portal
/
nonrtric-controlpanel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
AAdd test coverage of NotificationService
[portal/nonrtric-controlpanel.git]
/
webapp-frontend
/
src
/
app
/
services
/
ui
/
notification.service.ts
diff --git
a/webapp-frontend/src/app/services/ui/notification.service.ts
b/webapp-frontend/src/app/services/ui/notification.service.ts
index
09baa38
..
465a3dd
100644
(file)
--- a/
webapp-frontend/src/app/services/ui/notification.service.ts
+++ b/
webapp-frontend/src/app/services/ui/notification.service.ts
@@
-18,41
+18,30
@@
* ========================LICENSE_END===================================
*/
* ========================LICENSE_END===================================
*/
-import { Injectable } from
'@angular/core'
;
-import { ToastrService } from
'ngx-toastr'
;
+import { Injectable } from
"@angular/core"
;
+import { ToastrService } from
"ngx-toastr"
;
@Injectable({
@Injectable({
- providedIn:
'root'
+ providedIn:
"root",
})
export class NotificationService {
})
export class NotificationService {
-
- constructor(public toastr: ToastrService) { }
+ constructor(public toastr: ToastrService) {}
successConfig = {
timeOut: 10000,
successConfig = {
timeOut: 10000,
- closeButton: true
- };
-
- warningConfig = {
- disableTimeOut: true,
- closeButton: true
+ closeButton: true,
};
errorConfig = {
disableTimeOut: true,
};
errorConfig = {
disableTimeOut: true,
- closeButton: true
+ closeButton: true
,
};
success(msg: string) {
};
success(msg: string) {
- this.toastr.success(msg, '', this.successConfig);
- }
-
- warn(msg: string) {
- this.toastr.warning(msg, '', this.warningConfig);
+ this.toastr.success(msg, "", this.successConfig);
}
error(msg: string) {
}
error(msg: string) {
- this.toastr.error(msg,
''
, this.errorConfig);
+ this.toastr.error(msg,
""
, this.errorConfig);
}
}
-
}
}