Skip to content

Commit

Permalink
problems: fix "acknowledged" filter, closes #678, #691
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderzobnin committed Mar 4, 2019
1 parent 6449b8b commit c415e82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/panel-triggers/triggers_panel_ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,12 +380,12 @@ export class TriggerPanelCtrl extends PanelCtrl {
// Filter acknowledged triggers
if (this.panel.showTriggers === 'unacknowledged') {
triggerList = _.filter(triggerList, trigger => {
return !trigger.acknowledges;
return !(trigger.acknowledges && trigger.acknowledges.length);
});
} else if (this.panel.showTriggers === 'acknowledged') {
triggerList = _.filter(triggerList, 'acknowledges');
} else {
triggerList = triggerList;
triggerList = _.filter(triggerList, trigger => {
return trigger.acknowledges && trigger.acknowledges.length;
});
}

// Filter by maintenance status
Expand Down

0 comments on commit c415e82

Please sign in to comment.