Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bug with overriding patterns #1298

Merged
merged 1 commit into from
Nov 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ import {
PPL_PATTERNS_DOCUMENTATION_URL,
PPL_STATS_REGEX,
} from '../../../../common/constants/shared';
import { GroupByChunk } from '../../../../common/query_manager/ast/types';
import {
IDefaultTimestampState,
IExplorerProps,
Expand Down Expand Up @@ -566,7 +565,7 @@ export const Explorer = ({
await updateQueryInStore(patternSelectQuery);
// Passing in empty string will remove pattern query
const patternErrorHandler = getErrorHandler('Error fetching patterns');
getPatterns(minInterval, patternErrorHandler);
getPatterns(selectedIntervalRef.current?.value.replace(/^auto_/, '') || 'y', patternErrorHandler);
}
};

Expand Down Expand Up @@ -641,7 +640,7 @@ export const Explorer = ({
getErrorHandler('Error overriding default pattern')
);
setIsOverridingPattern(false);
await getPatterns(minInterval, getErrorHandler('Error fetching patterns'));
await getPatterns(selectedIntervalRef.current?.value.replace(/^auto_/, '') || 'y', getErrorHandler('Error fetching patterns'));
};

const totalHits: number = useMemo(() => {
Expand Down Expand Up @@ -843,7 +842,7 @@ export const Explorer = ({
})
);
await getPatterns(
minInterval,
selectedIntervalRef.current?.value.replace(/^auto_/, '') || 'y',
getErrorHandler('Error fetching patterns')
);
}}
Expand Down