[Security Solution] Reorganize kpi visualization folders (#189234)

## Summary

Moving some folders around so all the kpi related components sit in the
same folder:

x-pack/plugins/security_solution/public/
- detections/pages/detection_engine/chart_panels =>
detections/components/alerts_kpis/chart_panels
- common/components/alerts_treemap_panel =>
detections/components/alerts_kpis/alerts_treemap_panel
- common/components/alerts_treemap =>
detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap

<img width="988" alt="image"
src="https://github.com/user-attachments/assets/04ad7753-7f5a-451a-a396-19323ce86d37">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
christineweng 2024-07-30 09:09:56 -05:00 committed by GitHub
parent 39bde9d4eb
commit 2f1acf975e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 83 additions and 104 deletions

View file

@ -9,7 +9,7 @@ import {
TREEMAP_CATEGORY,
ALERTS_PAGE,
STACK_BY_SETTING_NAME,
} from '../../../detections/pages/detection_engine/chart_panels/alerts_local_storage/constants';
} from '../../../detections/components/alerts_kpis/chart_panels/alerts_local_storage/constants';
import { getSettingKey, isDefaultWhenEmptyString } from './helpers';
describe('helpers', () => {

View file

@ -14,7 +14,7 @@ import {
EXPAND_SETTING_NAME,
STACK_BY_SETTING_NAME,
TREEMAP_CATEGORY,
} from '../../../detections/pages/detection_engine/chart_panels/alerts_local_storage/constants';
} from '../../../detections/components/alerts_kpis/chart_panels/alerts_local_storage/constants';
import { getSettingKey, isDefaultWhenEmptyString } from './helpers';
import { useKibana as mockUseKibana } from '../../lib/kibana/__mocks__';
import { useLocalStorage } from '.';

View file

@ -17,12 +17,9 @@ import type { AlertSearchResponse } from '../../../containers/detection_engine/a
import {
getMaxRiskSubAggregations,
getUpToMaxBuckets,
} from '../../../../common/components/alerts_treemap/lib/helpers';
import { getFlattenedBuckets } from '../../../../common/components/alerts_treemap/lib/flatten/get_flattened_buckets';
import type {
FlattenedBucket,
RawBucket,
} from '../../../../common/components/alerts_treemap/types';
} from '../alerts_treemap_panel/alerts_treemap/lib/helpers';
import { getFlattenedBuckets } from '../alerts_treemap_panel/alerts_treemap/lib/flatten/get_flattened_buckets';
import type { FlattenedBucket, RawBucket } from '../alerts_treemap_panel/alerts_treemap/types';
import {
getMultiGroupAlertsCountTableColumns,
getSingleGroupByAlertsCountTableColumns,

View file

@ -10,7 +10,7 @@ import type { EuiBasicTableColumn } from '@elastic/eui';
import numeral from '@elastic/numeral';
import { TableId } from '@kbn/securitysolution-data-table';
import type { FlattenedBucket } from '../../../../common/components/alerts_treemap/types';
import type { FlattenedBucket } from '../alerts_treemap_panel/alerts_treemap/types';
import { DefaultDraggable } from '../../../../common/components/draggables';
import type { GenericBuckets } from '../../../../../common/search_strategy/common';
import * as i18n from './translations';

View file

@ -6,7 +6,7 @@
*/
import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { getOptionalSubAggregation } from '../../../../common/components/alerts_treemap/query';
import { getOptionalSubAggregation } from '../alerts_treemap_panel/alerts_treemap/query';
export const DEFAULT_STACK_BY_FIELD0_SIZE = 1000;
export const DEFAULT_STACK_BY_FIELD1_SIZE = 1000;

View file

@ -15,8 +15,8 @@ import type { Status } from '../../../../../common/api/detection_engine';
import { useQueryToggle } from '../../../../common/containers/query_toggle';
import { DEFAULT_STACK_BY_FIELD, DEFAULT_STACK_BY_FIELD1 } from '../common/config';
import { TestProviders } from '../../../../common/mock';
import { ChartContextMenu } from '../../../pages/detection_engine/chart_panels/chart_context_menu';
import { TABLE } from '../../../pages/detection_engine/chart_panels/chart_select/translations';
import { ChartContextMenu } from '../chart_panels/chart_context_menu';
import { TABLE } from '../chart_panels/chart_select/translations';
import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features';
import { VisualizationEmbeddable } from '../../../../common/components/visualization_actions/visualization_embeddable';
import type { ExperimentalFeatures } from '../../../../../common/experimental_features';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import type { RawBucket } from '../../../../common/components/alerts_treemap/types';
import type { RawBucket } from '../alerts_treemap_panel/alerts_treemap/types';
export interface AlertsCountAggregation {
stackByField0: {

View file

@ -20,7 +20,7 @@ import {
import {
parseChartCollapseData,
getIsChartCollapseAgg,
} from '../../../pages/detection_engine/chart_panels/chart_collapse/helpers';
} from '../chart_panels/chart_collapse/helpers';
export const parseData = (data: AlertSearchResponse<{}, SummaryChartsAgg>) => {
if (getIsAlertsBySeverityAgg(data)) {

View file

@ -17,10 +17,7 @@ import type {
AlertsByGroupingAgg,
AlertsProgressBarData,
} from '../alerts_progress_bar_panel/types';
import type {
ChartCollapseAgg,
ChartCollapseData,
} from '../../../pages/detection_engine/chart_panels/chart_collapse/types';
import type { ChartCollapseAgg, ChartCollapseData } from '../chart_panels/chart_collapse/types';
export type SummaryChartsAgg = Partial<
AlertsBySeverityAgg | AlertsByTypeAgg | AlertsByGroupingAgg | ChartCollapseAgg | AlertsByRuleAgg

View file

@ -9,7 +9,7 @@ import { render, screen } from '@testing-library/react';
import { Settings } from '@elastic/charts';
import React from 'react';
import { TestProviders } from '../../mock';
import { TestProviders } from '../../../../../common/mock';
import {
mockAlertSearchResponse,
mockNoDataAlertSearchResponse,

View file

@ -13,10 +13,10 @@ import React, { useCallback, useMemo } from 'react';
import styled from 'styled-components';
import { i18n } from '@kbn/i18n';
import { useThemes } from '../charts/common';
import { DraggableLegend } from '../charts/draggable_legend';
import type { LegendItem } from '../charts/draggable_legend_item';
import type { AlertSearchResponse } from '../../../detections/containers/detection_engine/alerts/types';
import { useThemes } from '../../../../../common/components/charts/common';
import { DraggableLegend } from '../../../../../common/components/charts/draggable_legend';
import type { LegendItem } from '../../../../../common/components/charts/draggable_legend_item';
import type { AlertSearchResponse } from '../../../../containers/detection_engine/alerts/types';
import { getRiskScorePalette, RISK_SCORE_STEPS } from './lib/chart_palette';
import { getFlattenedBuckets } from './lib/flatten/get_flattened_buckets';
import { getFlattenedLegendItems } from './lib/legend/get_flattened_legend_items';

View file

@ -14,7 +14,7 @@ import {
RISK_SCORE_MEDIUM,
RISK_SCORE_HIGH,
RISK_SCORE_CRITICAL,
} from '../../../../constants';
} from '../../../../../../../common/constants';
import { getFillColor, getRiskScorePalette, RISK_SCORE_STEPS } from '.';
describe('getFillColor', () => {

View file

@ -15,7 +15,7 @@ import {
RISK_SCORE_MEDIUM,
RISK_SCORE_HIGH,
RISK_SCORE_CRITICAL,
} from '../../../../constants';
} from '../../../../../../../common/constants';
/**
* The detection engine creates risk scores in the range 1 - 100.

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { firstNonNullValue } from '../../../../../../common/endpoint/models/ecs_safety_helpers';
import { firstNonNullValue } from '../../../../../../../../common/endpoint/models/ecs_safety_helpers';
import type { RawBucket, FlattenedBucket } from '../../types';
export const flattenBucket = ({

View file

@ -13,7 +13,7 @@ import type {
WordCloudElementEvent,
XYChartElementEvent,
} from '@elastic/charts';
import { firstNonNullValue } from '../../../../../common/endpoint/models/ecs_safety_helpers';
import { firstNonNullValue } from '../../../../../../../common/endpoint/models/ecs_safety_helpers';
import type { RawBucket } from '../types';

View file

@ -7,7 +7,7 @@
import { omit } from 'lodash/fp';
import type { LegendItem } from '../../../charts/draggable_legend_item';
import type { LegendItem } from '../../../../../../../common/components/charts/draggable_legend_item';
import { getRiskScorePalette, RISK_SCORE_STEPS } from '../chart_palette';
import { getFlattenedLegendItems } from './get_flattened_legend_items';
import { bucketsWithStackByField1, maxRiskSubAggregations } from '../flatten/mocks/mock_buckets';

View file

@ -5,8 +5,8 @@
* 2.0.
*/
import { firstNonNullValue } from '../../../../../../common/endpoint/models/ecs_safety_helpers';
import type { LegendItem } from '../../../charts/draggable_legend_item';
import { firstNonNullValue } from '../../../../../../../../common/endpoint/models/ecs_safety_helpers';
import type { LegendItem } from '../../../../../../../common/components/charts/draggable_legend_item';
import { getLegendMap, getLegendItemFromFlattenedBucket } from '.';
import type { FlattenedBucket, RawBucket } from '../../types';

View file

@ -7,7 +7,7 @@
import { omit } from 'lodash/fp';
import type { LegendItem } from '../../../charts/draggable_legend_item';
import type { LegendItem } from '../../../../../../../common/components/charts/draggable_legend_item';
import { getRiskScorePalette, RISK_SCORE_STEPS } from '../chart_palette';
import { bucketsWithStackByField1, maxRiskSubAggregations } from '../flatten/mocks/mock_buckets';
import {

View file

@ -8,10 +8,10 @@
import { v4 as uuidv4 } from 'uuid';
import { TableId } from '@kbn/securitysolution-data-table';
import { firstNonNullValue } from '../../../../../../common/endpoint/models/ecs_safety_helpers';
import type { LegendItem } from '../../../charts/draggable_legend_item';
import { firstNonNullValue } from '../../../../../../../../common/endpoint/models/ecs_safety_helpers';
import type { LegendItem } from '../../../../../../../common/components/charts/draggable_legend_item';
import { getFillColor } from '../chart_palette';
import { escapeDataProviderId } from '../../../drag_and_drop/helpers';
import { escapeDataProviderId } from '../../../../../../../common/components/drag_and_drop/helpers';
import { getLabel } from '../labels';
import type { FlattenedBucket, RawBucket } from '../../types';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import type { AlertSearchResponse } from '../../../../../detections/containers/detection_engine/alerts/types';
import type { AlertSearchResponse } from '../../../../../../containers/detection_engine/alerts/types';
import type { AlertsTreeMapAggregation } from '../../types';
export const mockAlertSearchResponse: AlertSearchResponse<unknown, AlertsTreeMapAggregation> = {

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import type { GenericBuckets } from '../../../../common/search_strategy/common';
import type { GenericBuckets } from '../../../../../../common/search_strategy/common';
export type RawBucket = GenericBuckets & {
maxRiskSubAggregation?: {

View file

@ -9,24 +9,21 @@ import { render, screen, waitFor } from '@testing-library/react';
import React from 'react';
import { useLocation } from 'react-router-dom';
import { SecurityPageName } from '../../../../common/constants';
import {
DEFAULT_STACK_BY_FIELD,
DEFAULT_STACK_BY_FIELD1,
} from '../../../detections/components/alerts_kpis/common/config';
import { useQueryAlerts } from '../../../detections/containers/detection_engine/alerts/use_query';
import { ChartContextMenu } from '../../../detections/pages/detection_engine/chart_panels/chart_context_menu';
import { ChartSelect } from '../../../detections/pages/detection_engine/chart_panels/chart_select';
import { TREEMAP } from '../../../detections/pages/detection_engine/chart_panels/chart_select/translations';
import { TestProviders } from '../../mock/test_providers';
import { SecurityPageName } from '../../../../../common/constants';
import { DEFAULT_STACK_BY_FIELD, DEFAULT_STACK_BY_FIELD1 } from '../common/config';
import { useQueryAlerts } from '../../../containers/detection_engine/alerts/use_query';
import { ChartContextMenu } from '../chart_panels/chart_context_menu';
import { ChartSelect } from '../chart_panels/chart_select';
import { TREEMAP } from '../chart_panels/chart_select/translations';
import { TestProviders } from '../../../../common/mock/test_providers';
import type { Props } from '.';
import { AlertsTreemapPanel } from '.';
import { mockAlertSearchResponse } from '../alerts_treemap/lib/mocks/mock_alert_search_response';
import { mockAlertSearchResponse } from './alerts_treemap/lib/mocks/mock_alert_search_response';
const from = '2022-07-28T08:20:18.966Z';
const to = '2022-07-28T08:20:18.966Z';
jest.mock('../../containers/use_global_time', () => {
const actual = jest.requireActual('../../containers/use_global_time');
jest.mock('../../../../common/containers/use_global_time', () => {
const actual = jest.requireActual('../../../../common/containers/use_global_time');
return {
...actual,
useGlobalTime: jest
@ -40,15 +37,15 @@ jest.mock('react-router-dom', () => {
return { ...actual, useLocation: jest.fn().mockReturnValue({ pathname: '' }) };
});
jest.mock('../../lib/kibana', () => {
const originalModule = jest.requireActual('../../lib/kibana');
jest.mock('../../../../common/lib/kibana', () => {
const originalModule = jest.requireActual('../../../../common/lib/kibana');
return {
...originalModule,
useUiSetting$: () => ['0,0.[000]'],
};
});
jest.mock('../../../detections/containers/detection_engine/alerts/use_query', () => ({
jest.mock('../../../containers/detection_engine/alerts/use_query', () => ({
useQueryAlerts: jest.fn(),
}));
@ -275,7 +272,7 @@ describe('AlertsTreemapPanel', () => {
});
it('renders the treemap when data is available and `isPanelExpanded` is true', async () => {
jest.mock('../../../detections/containers/detection_engine/alerts/use_query', () => {
jest.mock('../../../containers/detection_engine/alerts/use_query', () => {
return {
useQueryAlerts: () => ({
loading: true,

View file

@ -14,18 +14,18 @@ import { getEsQueryConfig } from '@kbn/data-plugin/common';
import React, { useEffect, useMemo } from 'react';
import { v4 as uuidv4 } from 'uuid';
import { useGlobalTime } from '../../containers/use_global_time';
import { AlertsTreemap, DEFAULT_MIN_CHART_HEIGHT } from '../alerts_treemap';
import { KpiPanel } from '../../../detections/components/alerts_kpis/common/components';
import { useInspectButton } from '../../../detections/components/alerts_kpis/common/hooks';
import { useQueryAlerts } from '../../../detections/containers/detection_engine/alerts/use_query';
import { ALERTS_QUERY_NAMES } from '../../../detections/containers/detection_engine/alerts/constants';
import { FieldSelection } from '../field_selection';
import { HeaderSection } from '../header_section';
import { InspectButtonContainer } from '../inspect';
import { DEFAULT_STACK_BY_FIELD0_SIZE, getAlertsRiskQuery } from '../alerts_treemap/query';
import type { AlertsTreeMapAggregation } from '../alerts_treemap/types';
import { useKibana } from '../../lib/kibana';
import { useGlobalTime } from '../../../../common/containers/use_global_time';
import { AlertsTreemap, DEFAULT_MIN_CHART_HEIGHT } from './alerts_treemap';
import { KpiPanel } from '../common/components';
import { useInspectButton } from '../common/hooks';
import { useQueryAlerts } from '../../../containers/detection_engine/alerts/use_query';
import { ALERTS_QUERY_NAMES } from '../../../containers/detection_engine/alerts/constants';
import { FieldSelection } from '../../../../common/components/field_selection';
import { HeaderSection } from '../../../../common/components/header_section';
import { InspectButtonContainer } from '../../../../common/components/inspect';
import { DEFAULT_STACK_BY_FIELD0_SIZE, getAlertsRiskQuery } from './alerts_treemap/query';
import type { AlertsTreeMapAggregation } from './alerts_treemap/types';
import { useKibana } from '../../../../common/lib/kibana';
const DEFAULT_HEIGHT = DEFAULT_MIN_CHART_HEIGHT + 134; // px

View file

@ -24,14 +24,11 @@ import {
VIEW_CATEGORY,
GROUP_BY_SETTING_NAME,
} from './constants';
import {
DEFAULT_STACK_BY_FIELD,
DEFAULT_STACK_BY_FIELD1,
} from '../../../../components/alerts_kpis/common/config';
import { DEFAULT_STACK_BY_FIELD, DEFAULT_STACK_BY_FIELD1 } from '../../common/config';
import type { AlertsSettings } from './types';
import type { AlertViewSelection } from '../chart_select/helpers';
import { CHARTS_ID, TREND_ID } from '../chart_select/helpers';
import type { GroupBySelection } from '../../../../components/alerts_kpis/alerts_progress_bar_panel/types';
import type { GroupBySelection } from '../../alerts_progress_bar_panel/types';
import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features';
export const useAlertsLocalStorage = (): AlertsSettings => {

View file

@ -6,7 +6,7 @@
*/
import type { AlertViewSelection } from '../chart_select/helpers';
import type { GroupBySelection } from '../../../../components/alerts_kpis/alerts_progress_bar_panel/types';
import type { GroupBySelection } from '../../alerts_progress_bar_panel/types';
export interface AlertsSettings {
alertViewSelection: AlertViewSelection;
countTableStackBy0: string;

View file

@ -8,8 +8,8 @@ import { parseChartCollapseData } from './helpers';
import * as mock from './mock_data';
import type { ChartCollapseAgg } from './types';
import type { AlertSearchResponse } from '../../../../containers/detection_engine/alerts/types';
import { getGroupByLabel } from '../../../../components/alerts_kpis/alerts_progress_bar_panel/helpers';
import * as i18n from '../../../../components/alerts_kpis/alerts_progress_bar_panel/translations';
import { getGroupByLabel } from '../../alerts_progress_bar_panel/helpers';
import * as i18n from '../../alerts_progress_bar_panel/translations';
describe('parse chart collapse data', () => {
test('parse alerts with data', () => {

View file

@ -8,12 +8,9 @@
import { has } from 'lodash';
import type { ChartCollapseAgg, ChartCollapseData } from './types';
import type { AlertSearchResponse } from '../../../../containers/detection_engine/alerts/types';
import type {
SummaryChartsData,
SummaryChartsAgg,
} from '../../../../components/alerts_kpis/alerts_summary_charts_panel/types';
import type { SummaryChartsData, SummaryChartsAgg } from '../../alerts_summary_charts_panel/types';
import { severityLabels } from '../../../../../overview/components/detection_response/alerts_by_status/use_alerts_by_status';
import { UNKNOWN_SEVERITY } from '../../../../components/alerts_kpis/severity_level_panel/translations';
import { UNKNOWN_SEVERITY } from '../../severity_level_panel/translations';
export const parseChartCollapseData = (
response: AlertSearchResponse<{}, ChartCollapseAgg>

View file

@ -7,10 +7,10 @@
import { render } from '@testing-library/react';
import React from 'react';
import type { GroupBySelection } from '../../../../components/alerts_kpis/alerts_progress_bar_panel/types';
import type { GroupBySelection } from '../../alerts_progress_bar_panel/types';
import { TestProviders } from '../../../../../common/mock';
import { ChartCollapse } from '.';
import { useSummaryChartData } from '../../../../components/alerts_kpis/alerts_summary_charts_panel/use_summary_chart_data';
import { useSummaryChartData } from '../../alerts_summary_charts_panel/use_summary_chart_data';
import * as mock from './mock_data';
jest.mock('../../../../../common/lib/kibana');
@ -19,7 +19,7 @@ jest.mock('react-router-dom', () => {
const actual = jest.requireActual('react-router-dom');
return { ...actual, useLocation: jest.fn().mockReturnValue({ pathname: '' }) };
});
jest.mock('../../../../components/alerts_kpis/alerts_summary_charts_panel/use_summary_chart_data');
jest.mock('../../alerts_summary_charts_panel/use_summary_chart_data');
const defaultProps = {
groupBySelection: 'host.name' as GroupBySelection,

View file

@ -12,11 +12,11 @@ import { v4 as uuid } from 'uuid';
import { capitalize } from 'lodash';
import React, { useMemo } from 'react';
import styled from 'styled-components';
import type { GroupBySelection } from '../../../../components/alerts_kpis/alerts_progress_bar_panel/types';
import { getGroupByLabel } from '../../../../components/alerts_kpis/alerts_progress_bar_panel/helpers';
import type { GroupBySelection } from '../../alerts_progress_bar_panel/types';
import { getGroupByLabel } from '../../alerts_progress_bar_panel/helpers';
import { InspectButton, InspectButtonContainer } from '../../../../../common/components/inspect';
import { useSummaryChartData } from '../../../../components/alerts_kpis/alerts_summary_charts_panel/use_summary_chart_data';
import { getSeverityColor } from '../../../../components/alerts_kpis/severity_level_panel/helpers';
import { useSummaryChartData } from '../../alerts_summary_charts_panel/use_summary_chart_data';
import { getSeverityColor } from '../../severity_level_panel/helpers';
import { FormattedCount } from '../../../../../common/components/formatted_number';
import { getIsChartCollapseData } from './helpers';
import * as i18n from './translations';

View file

@ -12,10 +12,7 @@ import React from 'react';
import { RESET_GROUP_BY_FIELDS } from '../../../../../common/components/chart_settings_popover/configurations/default/translations';
import { CHART_SETTINGS_POPOVER_ARIA_LABEL } from '../../../../../common/components/chart_settings_popover/translations';
import { INSPECT } from '../../../../../common/components/inspect/translations';
import {
DEFAULT_STACK_BY_FIELD,
DEFAULT_STACK_BY_FIELD1,
} from '../../../../components/alerts_kpis/common/config';
import { DEFAULT_STACK_BY_FIELD, DEFAULT_STACK_BY_FIELD1 } from '../../common/config';
import { TestProviders } from '../../../../../common/mock';
import { ChartContextMenu } from '.';

View file

@ -19,7 +19,7 @@ import { ChartPanels } from '.';
import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features';
import { useQueryToggle } from '../../../../common/containers/query_toggle';
import { LensEmbeddable } from '../../../../common/components/visualization_actions/lens_embeddable';
import { createResetGroupByFieldAction } from '../../../components/alerts_kpis/alerts_histogram_panel/helpers';
import { createResetGroupByFieldAction } from '../alerts_histogram_panel/helpers';
jest.mock('./alerts_local_storage');
jest.mock('../../../../sourcerer/containers');

View file

@ -17,21 +17,18 @@ import { ChartContextMenu } from './chart_context_menu';
import { ChartSelect } from './chart_select';
import { ChartCollapse } from './chart_collapse';
import * as i18n from './chart_select/translations';
import { AlertsTreemapPanel } from '../../../../common/components/alerts_treemap_panel';
import { AlertsTreemapPanel } from '../alerts_treemap_panel';
import type { RunTimeMappings } from '../../../../sourcerer/store/model';
import type { UpdateDateRange } from '../../../../common/components/charts/common';
import { useEuiComboBoxReset } from '../../../../common/components/use_combo_box_reset';
import { AlertsHistogramPanel } from '../../../components/alerts_kpis/alerts_histogram_panel';
import { AlertsSummaryChartsPanel } from '../../../components/alerts_kpis/alerts_summary_charts_panel';
import {
DEFAULT_STACK_BY_FIELD,
DEFAULT_STACK_BY_FIELD1,
} from '../../../components/alerts_kpis/common/config';
import { AlertsCountPanel } from '../../../components/alerts_kpis/alerts_count_panel';
import { GROUP_BY_LABEL } from '../../../components/alerts_kpis/common/translations';
import { AlertsHistogramPanel } from '../alerts_histogram_panel';
import { AlertsSummaryChartsPanel } from '../alerts_summary_charts_panel';
import { DEFAULT_STACK_BY_FIELD, DEFAULT_STACK_BY_FIELD1 } from '../common/config';
import { AlertsCountPanel } from '../alerts_count_panel';
import { GROUP_BY_LABEL } from '../common/translations';
import { useQueryToggle } from '../../../../common/containers/query_toggle';
import type { AddFilterProps } from '../../../components/alerts_kpis/common/types';
import { createResetGroupByFieldAction } from '../../../components/alerts_kpis/alerts_histogram_panel/helpers';
import type { AddFilterProps } from '../common/types';
import { createResetGroupByFieldAction } from '../alerts_histogram_panel/helpers';
const TREND_CHART_HEIGHT = 240; // px
const CHART_PANEL_HEIGHT = 375; // px

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { mockAlertSearchResponse } from '../../../../common/components/alerts_treemap/lib/mocks/mock_alert_search_response';
import { mockAlertSearchResponse } from '../../alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/mocks/mock_alert_search_response';
export const getQuery = (
selectedGroup: string,

View file

@ -70,7 +70,7 @@ import {
buildShowBuildingBlockFilter,
buildThreatMatchFilter,
} from '../../components/alerts_table/default_config';
import { ChartPanels } from './chart_panels';
import { ChartPanels } from '../../components/alerts_kpis/chart_panels';
import { useSourcererDataView } from '../../../sourcerer/containers';
import { useSignalHelpers } from '../../../sourcerer/containers/use_signal_helpers';

View file

@ -32,7 +32,7 @@ import styled from 'styled-components';
import { useAssistantAvailability } from '../../assistant/use_assistant_availability';
import { SecurityPageName } from '../../app/types';
import { getGroupByFieldsOnClick } from '../../common/components/alerts_treemap/lib/helpers';
import { getGroupByFieldsOnClick } from '../../detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/helpers';
import { useThemes } from '../../common/components/charts/common';
import { HeaderPage } from '../../common/components/header_page';
import { EmptyPrompt } from '../../common/components/empty_prompt';