Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
neptunian committed Jun 17, 2021
1 parent 78960d2 commit ddbdd0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x-pack/plugins/monitoring/server/lib/alerts/fetch_status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export async function fetchStatus(
if (!states) {
return result;
}

// puts all alert states associated with this rule into a flat array. this works with both the legacy alert
// of having multiple alert states per alert, each representing a firing node, and the current alert where each firing
// node is an alert with a single alert state, the node itself. https://github.com/elastic/kibana/pull/102544
result.states = Object.values(states).reduce((accum: CommonAlertState[], instance: any) => {
const alertInstanceState = instance.state as AlertInstanceState;
if (!alertInstanceState.alertStates) {
Expand Down

0 comments on commit ddbdd0b

Please sign in to comment.