Skip to content

Commit

Permalink
Merge pull request #2426 from skateman/error-danger-notifications
Browse files Browse the repository at this point in the history
Notification type error should be rendered in patternfly as danger
  • Loading branch information
himdel committed Oct 17, 2017
2 parents 83ed40f + 57c2527 commit e0b0998
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/assets/javascripts/services/event_notifications_service.js
Expand Up @@ -47,6 +47,13 @@ function eventNotifications($timeout, API) {
});
};

var levelToType = function(level) {
if (level === 'error') {
return 'danger';
}
return level;
};

this.doReset = function(seed) {
state.groups.splice(0, state.groups.length);
var events = {
Expand Down Expand Up @@ -117,7 +124,7 @@ function eventNotifications($timeout, API) {
id: id,
notificationType: notificationType,
unread: true,
type: type,
type: levelToType(type),
message: message,
data: notificationData,
href: id ? '/api/notifications/' + id : undefined,
Expand Down Expand Up @@ -154,7 +161,7 @@ function eventNotifications($timeout, API) {
if (showToast) {
notification.unread = true;
}
notification.type = type;
notification.type = levelToType(type);
notification.message = message;
notification.data = notificationData;
notification.timeStamp = (new Date()).getTime();
Expand Down

0 comments on commit e0b0998

Please sign in to comment.