mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
don't use stack to dedup notifications
This commit is contained in:
parent
2488a758a1
commit
61c9331932
2 changed files with 6 additions and 7 deletions
|
@ -55,20 +55,19 @@ define(function (require) {
|
|||
});
|
||||
}
|
||||
|
||||
if (!notif.count) notif.count = 1;
|
||||
notif.count = (notif.count || 0) + 1;
|
||||
|
||||
var dup = _.find(notifs, function (item) {
|
||||
return item.content === notif.content
|
||||
&& item.stack === notif.stack
|
||||
&& item.lifetime === notif.lifetime;
|
||||
return item.content === notif.content && item.lifetime === notif.lifetime;
|
||||
});
|
||||
|
||||
if (dup) {
|
||||
dup.count++;
|
||||
dup.count += 1;
|
||||
dup.stacks = _.union(dup.stacks, [notif.stack]);
|
||||
} else {
|
||||
notif.stacks = [notif.stack];
|
||||
notifs.push(notif);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function formatMsg(msg, from) {
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</div>
|
||||
|
||||
<div ng-if="notif.stack && notif.showStack" class="toast-stack alert" ng-class="'alert-' + notif.type">
|
||||
<pre ng-bind="notif.stack"></pre>
|
||||
<pre ng-repeat="stack in notif.stacks" ng-bind="stack"></pre>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue