From 1f63d697f3c1a625a6ed160c5d619d66b4adf82d Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 8 Nov 2023 21:29:51 +0000 Subject: [PATCH] Revert "Bug fixes for observability count distribution and application analytics (#1187) (#1189)" This reverts commit e2440d240609942785dd2b62f2222d42fdd7bb5f. --- public/components/common/query_utils/index.ts | 5 +---- .../event_analytics/explorer/explorer.tsx | 17 ++--------------- .../count_distribution/count_distribution.tsx | 1 + .../redux/slices/count_distribution_slice.ts | 1 - 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/public/components/common/query_utils/index.ts b/public/components/common/query_utils/index.ts index 9f4024bb31..bed3432dbb 100644 --- a/public/components/common/query_utils/index.ts +++ b/public/components/common/query_utils/index.ts @@ -245,10 +245,7 @@ export const buildPatternsQuery = ( return finalQuery; }; -export const buildQuery = (baseQuery: string, currQuery: string) => { - if (!currQuery) return baseQuery; - return `${baseQuery} | ${currQuery}`; -}; +export const buildQuery = (baseQuery: string, currQuery: string) => baseQuery + '| ' + currQuery; export const buildRawQuery = (query: IQuery, appBaseQuery: string) => { if (appBaseQuery && !query.rawQuery.includes(appBaseQuery)) diff --git a/public/components/event_analytics/explorer/explorer.tsx b/public/components/event_analytics/explorer/explorer.tsx index 1f4806b3c0..d311cdcc1b 100644 --- a/public/components/event_analytics/explorer/explorer.tsx +++ b/public/components/event_analytics/explorer/explorer.tsx @@ -258,12 +258,6 @@ export const Explorer = ({ ...TIME_INTERVAL_OPTIONS, ]); selectedIntervalRef.current = { text: 'Auto', value: 'auto_' + minInterval }; - dispatch( - updateCountDistribution({ - tabId, - data: { selectedInterval: selectedIntervalRef.current.value.replace(/^auto_/, '') }, - }) - ); }; useEffect(() => { @@ -501,18 +495,13 @@ export const Explorer = ({ selectedIntervalRef.current = timeIntervalOptions[intervalOptionsIndex]; getPatterns(intrv, getErrorHandler('Error fetching patterns')); }} - stateInterval={ - countDistribution.selectedInterval || selectedIntervalRef.current?.value - } + stateInterval={selectedIntervalRef.current?.value} startTime={appLogEvents ? startTime : dateRange[0]} endTime={appLogEvents ? endTime : dateRange[1]} /> - @@ -794,8 +783,6 @@ export const Explorer = ({ subType, selectedCustomPanelOptions, explorerSearchMeta, - selectedIntervalRef.current, - countDistribution, ]); const liveTailLoop = async ( diff --git a/public/components/event_analytics/explorer/visualizations/count_distribution/count_distribution.tsx b/public/components/event_analytics/explorer/visualizations/count_distribution/count_distribution.tsx index 8e5f10f315..6fa6778819 100644 --- a/public/components/event_analytics/explorer/visualizations/count_distribution/count_distribution.tsx +++ b/public/components/event_analytics/explorer/visualizations/count_distribution/count_distribution.tsx @@ -4,6 +4,7 @@ */ import React from 'react'; +import { EuiPanel } from '@elastic/eui'; import { BarOrientation, LONG_CHART_COLOR } from '../../../../../../common/constants/shared'; import { Plt } from '../../../../visualizations/plotly/plot'; import { fillTimeDataWithEmpty } from '../../../utils/utils'; diff --git a/public/components/event_analytics/redux/slices/count_distribution_slice.ts b/public/components/event_analytics/redux/slices/count_distribution_slice.ts index b960c5064b..59aa1e03f2 100644 --- a/public/components/event_analytics/redux/slices/count_distribution_slice.ts +++ b/public/components/event_analytics/redux/slices/count_distribution_slice.ts @@ -17,7 +17,6 @@ export const countDistributionSlice = createSlice({ reducers: { render: (state, { payload }) => { state[payload.tabId] = { - ...state[payload.tabId], ...payload.data, }; },