Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification type error should be rendered in patternfly as danger #2426

Merged
merged 1 commit into from Oct 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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