Change order of alert endpoint options to make defaults be first

pull/1724/head
Jared Scheib 2017-07-17 17:01:30 -07:00
parent b2a69dd6ac
commit bc41ef4094
1 changed files with 5 additions and 4 deletions

View File

@ -43,11 +43,12 @@ export const RuleMessage = React.createClass({
return {text, ruleID: rule.id}
})
const alerts = enabledAlerts
.map(text => {
const alerts = [
...defaultAlertEndpoints,
...enabledAlerts.map(text => {
return {text, ruleID: rule.id}
})
.concat(defaultAlertEndpoints)
}),
]
const selectedAlert = rule.alerts[0] || alerts[0].text