From 70abcc03144751bcece604c2109c0ef33b8eecb8 Mon Sep 17 00:00:00 2001 From: Phillip Burch Date: Wed, 18 Mar 2020 17:17:36 -0500 Subject: [PATCH] Fix type issue --- .../public/components/alerting/metrics/expression.tsx | 4 ++-- .../infra/public/components/waffle/node_context_menu.tsx | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/x-pack/plugins/infra/public/components/alerting/metrics/expression.tsx b/x-pack/plugins/infra/public/components/alerting/metrics/expression.tsx index 245ac79092bf6..7c820c47e3ab3 100644 --- a/x-pack/plugins/infra/public/components/alerting/metrics/expression.tsx +++ b/x-pack/plugins/infra/public/components/alerting/metrics/expression.tsx @@ -56,7 +56,7 @@ interface Props { errors: IErrorObject[]; alertParams: { criteria: MetricExpression[]; - groupBy?: string | null; + groupBy?: string; filterQuery?: string; }; alertsContext: AlertsContextValue; @@ -135,7 +135,7 @@ export const Expressions: React.FC = props => { const onGroupByChange = useCallback( (group: string | null) => { - setAlertParams('groupBy', group); + setAlertParams('groupBy', group || undefined); }, [setAlertParams] ); diff --git a/x-pack/plugins/infra/public/components/waffle/node_context_menu.tsx b/x-pack/plugins/infra/public/components/waffle/node_context_menu.tsx index 6791920cb55f8..5f05cebd8f616 100644 --- a/x-pack/plugins/infra/public/components/waffle/node_context_menu.tsx +++ b/x-pack/plugins/infra/public/components/waffle/node_context_menu.tsx @@ -145,15 +145,6 @@ export const NodeContextMenu: React.FC = ({ isDisabled: !showUptimeLink, }; - const alertMenuItem: SectionLinkProps = { - label: i18n.translate('xpack.infra.nodeContextMenu.createAlertLink', { - defaultMessage: 'Create Alert', - }), - onClick: () => { - setFlyoutVisible(true); - }, - }; - return ( <>