From 336ab62d2fdaa3b1f3a89b71f811f0880bba4221 Mon Sep 17 00:00:00 2001 From: Paul Sebastian Date: Thu, 1 Aug 2024 16:00:32 -0700 Subject: [PATCH] fix Signed-off-by: Paul Sebastian --- public/components/event_analytics/explorer/explorer.tsx | 2 +- .../components/common/filters/filter_helpers.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/components/event_analytics/explorer/explorer.tsx b/public/components/event_analytics/explorer/explorer.tsx index 92441f6a6b..f70663208e 100644 --- a/public/components/event_analytics/explorer/explorer.tsx +++ b/public/components/event_analytics/explorer/explorer.tsx @@ -214,7 +214,7 @@ export const Explorer = ({ const [dataSourceConnectionType, setDataSourceConnectionType] = useState( 'PROMETHEUS' ); - const dataSourceName = explorerSearchMeta?.datasources[0]?.label; + const dataSourceName = explorerSearchMeta?.datasources?.[0]?.label; const renderTablesFlyout = getRenderLogExplorerTablesFlyout(); const renderCreateAccelerationFlyout = getRenderCreateAccelerationFlyout(); const isS3Connection = explorerSearchMeta.datasources?.[0]?.type === 's3glue'; diff --git a/public/components/trace_analytics/components/common/filters/filter_helpers.tsx b/public/components/trace_analytics/components/common/filters/filter_helpers.tsx index c65ef8a47a..cfaef0993b 100644 --- a/public/components/trace_analytics/components/common/filters/filter_helpers.tsx +++ b/public/components/trace_analytics/components/common/filters/filter_helpers.tsx @@ -59,6 +59,7 @@ export const getValidFilterFields = ( page: 'dashboard' | 'traces' | 'services' | 'app', attributesFilterFields: string[] ) => { + if (!attributesFilterFields) return []; const fields = getFields(mode, page, attributesFilterFields); if (page !== 'services') return [...fields, 'Latency percentile within trace group']; return fields;