Skip to content

Commit

Permalink
Fix query
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski committed Sep 4, 2020
1 parent 4457d19 commit fdb2909
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { inputsModel } from '../../../common/store';
import { createFilter } from '../../../common/containers/helpers';
import { useKibana, useUiSetting$ } from '../../../common/lib/kibana';
import {
MatrixHistogramQuery,
MatrixHistogramRequestOptions,
MatrixHistogramStrategyResponse,
MatrixHistogramData,
Expand Down Expand Up @@ -54,6 +55,7 @@ export const useMatrixHistogram = ({
MatrixHistogramRequestOptions
>({
defaultIndex,
factoryQueryType: MatrixHistogramQuery,
filterQuery: createFilter(filterQuery),
histogramType,
timerange: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ import { buildAuthenticationsHistogramQuery } from './query.authentications_hist

export const authenticationsMatrixHistogramConfig = {
buildDsl: buildAuthenticationsHistogramQuery,
aggName: 'aggregations.anomalyActionGroup.buckets',
parseKey: 'anomalies.buckets',
aggName: 'aggregations.eventActionGroup.buckets',
parseKey: 'events.buckets',
};
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const matrixHistogram: SecuritySolutionFactory<typeof MatrixHistogramQuer
throw new Error(`This histogram type ${options.histogramType} is unknown to the server side`);
}
const totalCount = getOr(0, 'hits.total.value', response.rawResponse);
const matrixHistogramData = getOr([], myConfig.aggName, response);
const matrixHistogramData = getOr([], myConfig.aggName, response.rawResponse);
const inspect = {
dsl: [inspectStringifyObject(myConfig.buildDsl(options))],
};
Expand Down

0 comments on commit fdb2909

Please sign in to comment.