-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update kapacitor alert rule to have detail field #852
Conversation
@@ -34,19 +30,19 @@ export const RuleMessage = React.createClass({ | |||
const alerts = this.props.enabledAlerts.map((text) => { | |||
return {text, ruleID: rule.id}; | |||
}); | |||
const selectedAlert = rule.alerts[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this always be the first item in the array? Why is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should either be the first element in the array or undefined
. Currently, there is only a 1-to-1 relationship of rule to output. This will be changing in the future which is why it's stored in an array.
return {...state, ...{ | ||
[ruleID]: {...state[ruleID], details}, | ||
}}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha. idk if this syntax is easier to follow than Object.assign
but I'm trying it out.
Connect #838
The problem
Kapacitor supports adding an email body via the
.details()
chaining method.The Solution
Added
detail
to rules endpoint.