diff --git a/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts b/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts index 14daad66a7c23..c94167964b71b 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts @@ -190,12 +190,6 @@ export const allowedExperimentalValues = Object.freeze({ */ timelineEsqlTabDisabled: false, - /* - * Disables date pickers and sourcerer in analyzer if needed. - * - */ - analyzerDatePickersAndSourcererDisabled: false, - /** * Enables graph visualization in alerts flyout */ diff --git a/x-pack/solutions/security/plugins/security_solution/public/resolver/view/controls/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/resolver/view/controls/index.tsx index 58146c2c8ce1c..0b9e608c04d7e 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/resolver/view/controls/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/resolver/view/controls/index.tsx @@ -22,7 +22,6 @@ import { userSetPositionOfCamera, } from '../../store/camera/action'; import type { State } from '../../../common/store/types'; -import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; import { SourcererButton } from './sourcerer_selection'; import { DateSelectionButton } from './date_picker'; import { StyledGraphControls, StyledGraphControlsColumn, StyledEuiRange } from './styles'; @@ -61,9 +60,6 @@ export const GraphControls = React.memo( selectors.scalingFactor(state.analyzer[id]) ); const { timestamp } = useContext(SideEffectContext); - const isDatePickerAndSourcererDisabled = useIsExperimentalFeatureEnabled( - 'analyzerDatePickersAndSourcererDisabled' - ); const [activePopover, setPopover] = useState(null); const colorMap = useColors(); @@ -143,22 +139,18 @@ export const GraphControls = React.memo( isOpen={activePopover === 'nodeLegend'} setActivePopover={setActivePopover} /> - {!isDatePickerAndSourcererDisabled ? ( - <> - - - - ) : null} + + {isSplitPanel && showPanelOnClick && ( )} diff --git a/x-pack/solutions/security/plugins/security_solution/public/timelines/containers/use_timeline_data_filters.ts b/x-pack/solutions/security/plugins/security_solution/public/timelines/containers/use_timeline_data_filters.ts index cd6ed2c4baa93..cd27ff06020ba 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/timelines/containers/use_timeline_data_filters.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/timelines/containers/use_timeline_data_filters.ts @@ -6,27 +6,19 @@ */ import { useMemo } from 'react'; -import { useSelector } from 'react-redux'; -import { useLocation } from 'react-router-dom'; import { useDeepEqualSelector } from '../../common/hooks/use_selector'; import { isLoadingSelector, startSelector, endSelector, } from '../../common/components/super_date_picker/selectors'; -import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features'; import { SourcererScopeName } from '../../sourcerer/store/model'; import { useSourcererDataView } from '../../sourcerer/containers'; -import { getScopeFromPath } from '../../sourcerer/containers/sourcerer_paths'; -import { sourcererSelectors } from '../../common/store'; export function useTimelineDataFilters(isActiveTimelines: boolean) { const getStartSelector = useMemo(() => startSelector(), []); const getEndSelector = useMemo(() => endSelector(), []); const getIsLoadingSelector = useMemo(() => isLoadingSelector(), []); - const isDatePickerAndSourcererDisabled = useIsExperimentalFeatureEnabled( - 'analyzerDatePickersAndSourcererDisabled' - ); const shouldUpdate = useDeepEqualSelector((state) => { if (isActiveTimelines) { @@ -49,35 +41,15 @@ export function useTimelineDataFilters(isActiveTimelines: boolean) { return getEndSelector(state.inputs.global); } }); - const defaultDataView = useSelector(sourcererSelectors.defaultDataView); - const { pathname } = useLocation(); - const { selectedPatterns: nonTimelinePatterns } = useSourcererDataView( - getScopeFromPath(pathname) - ); - - const { selectedPatterns: timelinePatterns } = useSourcererDataView(SourcererScopeName.timeline); - - const selectedPatterns = useMemo(() => { - return isActiveTimelines - ? [...new Set([...timelinePatterns, ...defaultDataView.patternList])] - : [...new Set([...nonTimelinePatterns, ...defaultDataView.patternList])]; - }, [isActiveTimelines, timelinePatterns, nonTimelinePatterns, defaultDataView.patternList]); const { selectedPatterns: analyzerPatterns } = useSourcererDataView(SourcererScopeName.analyzer); return useMemo(() => { return { - selectedPatterns: isDatePickerAndSourcererDisabled ? selectedPatterns : analyzerPatterns, + selectedPatterns: analyzerPatterns, from, to, shouldUpdate, }; - }, [ - selectedPatterns, - from, - to, - shouldUpdate, - isDatePickerAndSourcererDisabled, - analyzerPatterns, - ]); + }, [from, to, shouldUpdate, analyzerPatterns]); }