Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -879,11 +879,6 @@ export const Explorer = ({
tabId={tabId}
query={query}
isPatternLoading={isPatternLoading}
totalHits={reduce(
countDistribution.data['count()'],
(sum, n) => sum + n,
0
)}
/>
<EuiHorizontalRule margin="xs" />
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ interface PatternsTableProps {
tabId: string;
query: any;
isPatternLoading: boolean;
totalHits?: number;
}

export function PatternsTable(props: PatternsTableProps) {
const { tableData, tabId, onPatternSelection, query } = props;
const patternsData = useSelector(selectPatterns)[tabId];
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was patternsData just never used?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

patternsData used to contain the results of stats count() as total hit, forgot to remove it since i removed stats count() call

const totalHits = props.totalHits || tableData.reduce((p, v) => p + v.count, 0);
const { tableData, onPatternSelection, query } = props;
const totalHits = tableData.reduce((p, v) => p + v.count, 0);

const tableColumns = [
{
Expand Down