Skip to content

Commit

Permalink
[7.x] [Metrics Alerts] Fix saving doc count alerts (elastic#63880)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zacqary committed Apr 20, 2020
1 parent 3e6a1a2 commit 567df0d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,11 @@ export const ExpressionRow: React.FC<ExpressionRowProps> = props => {

const updateAggType = useCallback(
(at: string) => {
setAlertParams(expressionId, { ...expression, aggType: at as MetricExpression['aggType'] });
setAlertParams(expressionId, {
...expression,
aggType: at as MetricExpression['aggType'],
metric: at === 'count' ? undefined : expression.metric,
});
},
[expressionId, expression, setAlertParams]
);
Expand Down

0 comments on commit 567df0d

Please sign in to comment.