diff --git a/app/scripts/directives/notifications/notificationDrawerWrapper.js b/app/scripts/directives/notifications/notificationDrawerWrapper.js index cf6b387527..684c00bcd4 100644 --- a/app/scripts/directives/notifications/notificationDrawerWrapper.js +++ b/app/scripts/directives/notifications/notificationDrawerWrapper.js @@ -99,6 +99,7 @@ _.each(drawer.notificationGroups, function(group) { _.remove(group.notifications, { uid: notification.uid, namespace: notification.namespace }); }); + delete notificationsMap[$routeParams.project][notification.uid]; }; var formatAPIEvents = function(apiEvents) { @@ -172,7 +173,7 @@ }; var notificationWatchCallback = function(event, notification) { - if(!notification.showInDrawer) { + if(!notification.showInDrawer || EventsService.isCleared(notification.id)) { return; } var project = notification.namespace || $routeParams.project; diff --git a/app/scripts/services/quota.js b/app/scripts/services/quota.js index 843efb14fe..c7ad8455bc 100644 --- a/app/scripts/services/quota.js +++ b/app/scripts/services/quota.js @@ -317,7 +317,7 @@ angular.module("openshiftConsole") if(hardValue <= usedValue) { notifications.push({ - id: "quota-limit-reached-" + quotaKey, + id: projectName + "/quota-limit-reached-" + quotaKey, namespace: projectName, type: (hardValue < usedValue ? 'warning' : 'info'), message: getNotificaitonMessage(used, usedValue, hard, hardValue, quotaKey), diff --git a/dist/scripts/scripts.js b/dist/scripts/scripts.js index bbbe63c2a9..bfa529dbc2 100644 --- a/dist/scripts/scripts.js +++ b/dist/scripts/scripts.js @@ -3598,7 +3598,7 @@ var t = e.status.total || e.status; _.each(t.hard, function(e, s) { var c = m(e), l = _.get(t, [ "used", s ]), d = m(l); "resourcequotas" !== s && c && d && c <= d && i.push({ -id: "quota-limit-reached-" + s, +id: o + "/quota-limit-reached-" + s, namespace: o, type: c < d ? "warning" : "info", message: I(0, d, e, c, s), @@ -14418,7 +14418,7 @@ _.remove(t.notifications, { uid: e.uid, namespace: e.namespace }); -}); +}), delete h[r.project][e.uid]; }, P = function(e) { return _.map(e, function(e) { return { @@ -14456,7 +14456,7 @@ l && l(), l = null; }, $ = function(e) { g[r.project] = P(R(e.by("metadata.name"))), T(); }, B = function(e, t) { -if (t.showInDrawer) { +if (t.showInDrawer && !c.isCleared(t.id)) { var n = t.namespace || r.project, a = t.id || _.uniqueId("notification_") + Date.now(); h[n] = h[n] || {}, h[n][a] = { actions: t.actions,