Skip to content

Commit

Permalink
Merge pull request alerta#247 from alerta/filter-sound-by-env
Browse files Browse the repository at this point in the history
Add filter by env to notification sound logic
  • Loading branch information
satterly committed Sep 21, 2019
2 parents c698e1e + 78e0381 commit ae73755
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/views/Alerts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ export default {
}
},
isNewOpenAlerts() {
return this.alerts.filter(x => x.status == 'open').reduce((a, v) => a || !v.repeat, false)
return this.alerts
.filter(alert => this.filter.environment ? this.filter.environment == alert.environment : true)
.filter(alert => alert.status == 'open')
.reduce((acc, alert) => acc || !alert.repeat, false)
},
totalCount() {
return this.$store.state.alerts.environments
Expand Down

0 comments on commit ae73755

Please sign in to comment.