diff --git a/public/components/event_analytics/explorer/log_patterns/log_patterns.tsx b/public/components/event_analytics/explorer/log_patterns/log_patterns.tsx index 26f34c632..5a149e0c7 100644 --- a/public/components/event_analytics/explorer/log_patterns/log_patterns.tsx +++ b/public/components/event_analytics/explorer/log_patterns/log_patterns.tsx @@ -3,22 +3,22 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { useState, useContext } from 'react'; -import { useDispatch, connect } from 'react-redux'; -import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiText, EuiHorizontalRule } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule, EuiLink, EuiText } from '@elastic/eui'; +import React, { useContext, useState } from 'react'; +import { connect, useDispatch } from 'react-redux'; import { FILTERED_PATTERN, PATTERN_REGEX, - RAW_QUERY, PPL_DEFAULT_PATTERN_REGEX_FILETER, + RAW_QUERY, } from '../../../../../common/constants/explorer'; -import { PatternsHeader } from './patterns_header'; -import { PatternsTable } from './patterns_table'; -import { selectPatterns } from '../../redux/slices/patterns_slice'; +import { PatternTableData, Query as IQuery } from '../../../../../common/types/explorer'; import { TabContext, useFetchPatterns } from '../../hooks'; +import { selectPatterns } from '../../redux/slices/patterns_slice'; import { changeQuery, selectQueries } from '../../redux/slices/query_slice'; import { formatError } from '../../utils'; -import { Query as IQuery, PatternTableData } from '../../../../../common/types/explorer'; +import { PatternsHeader } from './patterns_header'; +import { PatternsTable } from './patterns_table'; export interface LogPatternProps { selectedIntervalUnit: { @@ -41,7 +41,7 @@ const EventPatterns = ({ const dispatch = useDispatch(); const { tabId, pplService, notifications } = useContext(TabContext); const patternsData = patterns[tabId]; - const [viewLogPatterns, setViewLogPatterns] = useState(false); + const [viewLogPatterns, setViewLogPatterns] = useState(true); const [isPatternConfigPopoverOpen, setIsPatternConfigPopoverOpen] = useState(false); const [patternRegexInput, setPatternRegexInput] = useState(PPL_DEFAULT_PATTERN_REGEX_FILETER); const { isEventsLoading: isPatternLoading, getPatterns } = useFetchPatterns({ @@ -99,16 +99,14 @@ const EventPatterns = ({ gutterSize="xs" > - {viewLogPatterns && ( - - )} +