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

[Backport 2.x] [Bug] Traces redirection while QA enabled #2374

Merged
merged 1 commit into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion public/components/common/search/query_area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
nlqInput,
setNlqInput,
pplService,
}: any) {

Check warning on line 29 in public/components/common/search/query_area.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
const requestParams = { tabId };
const { getAvailableFields } = useFetchEvents({
pplService,
Expand All @@ -34,11 +34,10 @@
});

// use effect that sets the editor text and populates sidebar field for a particular index upon initialization
const memoizedGetAvailableFields = useMemo(() => getAvailableFields, []);

Check warning on line 37 in public/components/common/search/query_area.tsx

View workflow job for this annotation

GitHub Actions / Lint

React Hook useMemo has a missing dependency: 'getAvailableFields'. Either include it or remove the dependency array
const memoizedHandleQueryChange = useMemo(() => handleQueryChange, []);

Check warning on line 38 in public/components/common/search/query_area.tsx

View workflow job for this annotation

GitHub Actions / Lint

React Hook useMemo has a missing dependency: 'handleQueryChange'. Either include it or remove the dependency array
useEffect(() => {
const indexQuery = `source = ${selectedIndex[0]?.label || ''}`;
memoizedHandleQueryChange(indexQuery);
memoizedGetAvailableFields(indexQuery);
}, [selectedIndex, memoizedGetAvailableFields, memoizedHandleQueryChange]);
const [lastFocusedInput, setLastFocusedInput] = useState<'query_area' | 'nlq_input'>('nlq_input');
Expand Down
1 change: 0 additions & 1 deletion public/components/common/search/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
tempQuery: string;
handleQueryChange: (query: string) => void;
handleQuerySearch: () => void;
dslService: any;

Check warning on line 73 in public/components/common/search/search.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
}

export interface IDatePickerProps {
Expand All @@ -80,12 +80,12 @@
setEndTime: (end: string) => void;
setTimeRange: () => void;
setIsOutputStale: () => void;
handleTimePickerChange: (timeRange: string[]) => any;

Check warning on line 83 in public/components/common/search/search.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
handleTimeRangePickerRefresh: () => any;

Check warning on line 84 in public/components/common/search/search.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
isAppAnalytics: boolean;
}

export const Search = (props: any) => {

Check warning on line 88 in public/components/common/search/search.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
const {
query,
tempQuery,
Expand Down Expand Up @@ -149,7 +149,7 @@
error: pollingError,
startPolling: _startPolling,
stopPolling,
} = usePolling<any, any>((params) => {

Check warning on line 152 in public/components/common/search/search.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type

Check warning on line 152 in public/components/common/search/search.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
return sqlService.fetchWithJobId(params);
}, 5000);

Expand Down Expand Up @@ -249,7 +249,7 @@
stopPolling();
setIsQueryRunning(false);
}
}, [pollingResult, pollingError]);

Check warning on line 252 in public/components/common/search/search.tsx

View workflow job for this annotation

GitHub Actions / Lint

React Hook useEffect has missing dependencies: 'dispatchOnGettingHis', 'setIsQueryRunning', and 'stopPolling'. Either include them or remove the dependency array

useEffect(() => {
// set index and olly query assistant question if changed elsewhere
Expand All @@ -259,7 +259,6 @@
setSelectedIndex(reduxIndex);
// sets the editor text and populates sidebar field for a particular index upon initialization
const indexQuery = `source = ${reduxIndex[0].label}`;
handleQueryChange(indexQuery);
getAvailableFields(indexQuery);
}
if (queryRedux.ollyQueryAssistant.length > 0) {
Expand Down
Loading