Skip to content

Commit

Permalink
ASI support for custom severity order
Browse files Browse the repository at this point in the history
  • Loading branch information
satterly committed Jun 13, 2020
1 parent 14ff2fe commit 942a981
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/AlertIndicator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,13 @@ export default {
AlertsApi.getCounts(paramsWithOpenStatus)
.then(response => {
this.maxSeverity = 'normal'
if (response.severityCounts.informational > 0) this.maxSeverity = 'informational'
if (response.severityCounts.warning > 0) this.maxSeverity = 'warning'
if (response.severityCounts.minor > 0) this.maxSeverity = 'minor'
if (response.severityCounts.major > 0) this.maxSeverity = 'major'
if (response.severityCounts.critical > 0) this.maxSeverity = 'critical'
this.maxSeverity = this.$config.alarm_model.defaults.normal_severity
for (let sev of this.$config.indicators.severity) {
if (response.severityCounts[sev] > 0) {
this.maxSeverity = sev
break
}
}
})
},
refreshCounts() {
Expand Down

0 comments on commit 942a981

Please sign in to comment.