Skip to content

Commit

Permalink
Revert "remove records with grouping (#26)" (#32)
Browse files Browse the repository at this point in the history
This reverts commit 9efdbaf.

Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
  • Loading branch information
deshsidd authored Nov 15, 2024
1 parent 1e70dc6 commit 3ceb453
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 246 deletions.
3 changes: 1 addition & 2 deletions public/pages/TopNQueries/TopNQueries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import QueryInsights from '../QueryInsights/QueryInsights';
import Configuration from '../Configuration/Configuration';
import QueryDetails from '../QueryDetails/QueryDetails';
import { SearchQueryRecord } from '../../../types/types';
import { removeQueryGroups } from '../../utils/utils';

export const QUERY_INSIGHTS = '/queryInsights';
export const CONFIGURATION = '/configuration';
Expand Down Expand Up @@ -159,7 +158,7 @@ const TopNQueries = ({
const noDuplicates: SearchQueryRecord[] = Array.from(
new Set(newQueries.map((item) => JSON.stringify(item)))
).map((item) => JSON.parse(item));
setQueries(removeQueryGroups(noDuplicates));
setQueries(noDuplicates);
} catch (error) {
console.error('Error retrieving queries:', error);
} finally {
Expand Down
38 changes: 0 additions & 38 deletions public/utils/utils.test.ts

This file was deleted.

12 changes: 0 additions & 12 deletions public/utils/utils.ts

This file was deleted.

192 changes: 0 additions & 192 deletions test/testUtils.ts

This file was deleted.

5 changes: 3 additions & 2 deletions types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { ISearchSource } from 'src/plugins/data/public';

export interface SearchQueryRecord {
timestamp: number;
measurements: {
Expand All @@ -12,13 +14,12 @@ export interface SearchQueryRecord {
};
total_shards: number;
node_id: string;
source: Record<string, any>;
source: ISearchSource;
labels: Record<string, string>;
search_type: string;
indices: string[];
phase_latency_map: PhaseLatencyMap;
task_resource_usages: Task[];
query_hashcode: string;
}

export interface Measurement {
Expand Down

0 comments on commit 3ceb453

Please sign in to comment.