Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
machadoum committed Dec 22, 2023
1 parent 32a45ba commit 5d29c5d
Show file tree
Hide file tree
Showing 40 changed files with 550 additions and 371 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React from 'react';
import { FormattedMessage } from '@kbn/i18n-react';
import { EntityDetailsLeftPanelTab } from '../../../flyout/entity_details/shared/left_panel/left_panel_header';
import { EntityDetailsLeftPanelTab } from '../../../flyout/entity_details/shared/components/left_panel/left_panel_header';
import { PREFIX } from '../../../flyout/shared/test_ids';
import { RiskInputsTab } from './tabs/risk_inputs';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
import React, { useMemo } from 'react';
import type { FlyoutPanelProps } from '@kbn/expandable-flyout';
import { getRiskInputTab } from '../../../entity_analytics/components/entity_details_flyout';
import { EntityDetailsLeftPanelTab, LeftPanelHeader } from '../shared/left_panel/left_panel_header';
import { LeftPanelContent } from '../shared/left_panel/left_panel_content';
import { LeftPanelContent } from '../shared/components/left_panel/left_panel_content';
import {
EntityDetailsLeftPanelTab,
LeftPanelHeader,
} from '../shared/components/left_panel/left_panel_header';

interface RiskInputsParam {
alertIds: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import React from 'react';
import type { RiskScoreState } from '../../../entity_analytics/api/hooks/use_risk_score';
import type { HostItem, RiskScoreEntity } from '../../../../common/search_strategy';
import { FlyoutBody } from '../../shared/components/flyout_body';
import { ObservedEntity } from '../shared/observed_entity';
import { ObservedEntity } from '../shared/components/observed_entity';
import { HOST_PANEL_OBSERVED_HOST_QUERY_ID } from '.';
import type { ObservedEntityData } from '../shared/observed_entity/types';
import type { ObservedEntityData } from '../shared/components/observed_entity/types';
import { useObservedHostFields } from './hooks/use_observed_host_fields';

interface HostPanelContentProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import type { HostItem } from '../../../../../common/search_strategy';
import { FormattedRelativePreferenceDate } from '../../../../common/components/formatted_date';
import { NetworkDetailsLink } from '../../../../common/components/links';
import * as i18n from './translations';
import type { ObservedEntityData } from '../../shared/observed_entity/types';
import type { EntityTableRows } from '../../shared/entity_table/types';
import type { ObservedEntityData } from '../../shared/components/observed_entity/types';
import type { EntityTableRows } from '../../shared/components/entity_table/types';

export const basicHostFields: EntityTableRows<ObservedEntityData<HostItem>> = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/

import type { HostItem } from '../../../../../common/search_strategy';
import type { EntityTableRows } from '../../shared/entity_table/types';
import type { ObservedEntityData } from '../../shared/observed_entity/types';
import type { EntityTableRows } from '../../shared/components/entity_table/types';
import type { ObservedEntityData } from '../../shared/components/observed_entity/types';
import * as i18n from './translations';

export const cloudFields: EntityTableRows<ObservedEntityData<HostItem>> = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import React from 'react';
import { EuiHealth } from '@elastic/eui';

import type { EntityTableRows } from '../../shared/entity_table/types';
import type { ObservedEntityData } from '../../shared/observed_entity/types';
import type { EntityTableRows } from '../../shared/components/entity_table/types';
import type { ObservedEntityData } from '../../shared/components/observed_entity/types';
import { EndpointAgentStatus } from '../../../../common/components/endpoint/endpoint_agent_status';
import { getEmptyTagValue } from '../../../../common/components/empty_value';
import type { HostItem } from '../../../../../common/search_strategy';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,120 +7,138 @@

import { i18n } from '@kbn/i18n';

export const HOST_ID = i18n.translate('xpack.securitySolution.host.details.overview.hostIdTitle', {
defaultMessage: 'Host ID',
});
export const HOST_ID = i18n.translate(
'xpack.securitySolution.flyout.entityDetails.host.hostIdTitle',
{
defaultMessage: 'Host ID',
}
);

export const FIRST_SEEN = i18n.translate('xpack.securitySolution.host.details.firstSeenTitle', {
defaultMessage: 'First seen',
});
export const FIRST_SEEN = i18n.translate(
'xpack.securitySolution.flyout.entityDetails.host.firstSeenTitle',
{
defaultMessage: 'First seen',
}
);

export const LAST_SEEN = i18n.translate('xpack.securitySolution.host.details.lastSeenTitle', {
defaultMessage: 'Last seen',
});
export const LAST_SEEN = i18n.translate(
'xpack.securitySolution.flyout.entityDetails.host.lastSeenTitle',
{
defaultMessage: 'Last seen',
}
);

export const HOST_RISK_SCORE = i18n.translate(
'xpack.securitySolution.host.details.overview.hostRiskScoreTitle',
'xpack.securitySolution.flyout.entityDetails.host.hostRiskScoreTitle',
{
defaultMessage: 'Host risk score',
}
);

export const HOST_RISK_LEVEL = i18n.translate(
'xpack.securitySolution.host.details.overview.hostRiskLevel',
'xpack.securitySolution.flyout.entityDetails.host.hostRiskLevel',
{
defaultMessage: 'Host risk level',
}
);

export const IP_ADDRESSES = i18n.translate(
'xpack.securitySolution.host.details.overview.ipAddressesTitle',
'xpack.securitySolution.flyout.entityDetails.host.ipAddressesTitle',
{
defaultMessage: 'IP addresses',
}
);

export const MAC_ADDRESSES = i18n.translate(
'xpack.securitySolution.host.details.overview.macAddressesTitle',
'xpack.securitySolution.flyout.entityDetails.host.macAddressesTitle',
{
defaultMessage: 'MAC addresses',
}
);

export const PLATFORM = i18n.translate(
'xpack.securitySolution.host.details.overview.platformTitle',
'xpack.securitySolution.flyout.entityDetails.host.platformTitle',
{
defaultMessage: 'Platform',
}
);

export const OS = i18n.translate('xpack.securitySolution.host.details.overview.osTitle', {
export const OS = i18n.translate('xpack.securitySolution.flyout.entityDetails.host.osTitle', {
defaultMessage: 'Operating system',
});

export const FAMILY = i18n.translate('xpack.securitySolution.host.details.overview.familyTitle', {
defaultMessage: 'Family',
});
export const FAMILY = i18n.translate(
'xpack.securitySolution.flyout.entityDetails.host.familyTitle',
{
defaultMessage: 'Family',
}
);

export const VERSION = i18n.translate('xpack.securitySolution.host.details.versionLabel', {
defaultMessage: 'Version',
});
export const VERSION = i18n.translate(
'xpack.securitySolution.flyout.entityDetails.host.versionLabel',
{
defaultMessage: 'Version',
}
);

export const ARCHITECTURE = i18n.translate(
'xpack.securitySolution.host.details.architectureLabel',
'xpack.securitySolution.flyout.entityDetails.host.architectureLabel',
{
defaultMessage: 'Architecture',
}
);

export const CLOUD_PROVIDER = i18n.translate(
'xpack.securitySolution.host.details.overview.cloudProviderTitle',
'xpack.securitySolution.flyout.entityDetails.host.cloudProviderTitle',
{
defaultMessage: 'Cloud provider',
}
);

export const REGION = i18n.translate('xpack.securitySolution.host.details.overview.regionTitle', {
defaultMessage: 'Region',
});
export const REGION = i18n.translate(
'xpack.securitySolution.flyout.entityDetails.host.regionTitle',
{
defaultMessage: 'Region',
}
);

export const INSTANCE_ID = i18n.translate(
'xpack.securitySolution.host.details.overview.instanceIdTitle',
'xpack.securitySolution.flyout.entityDetails.host.instanceIdTitle',
{
defaultMessage: 'Instance ID',
}
);

export const MACHINE_TYPE = i18n.translate(
'xpack.securitySolution.host.details.overview.machineTypeTitle',
'xpack.securitySolution.flyout.entityDetails.host.machineTypeTitle',
{
defaultMessage: 'Machine type',
}
);

export const ENDPOINT_POLICY = i18n.translate(
'xpack.securitySolution.host.details.endpoint.endpointPolicy',
'xpack.securitySolution.flyout.entityDetails.host.endpoint.endpointPolicy',
{
defaultMessage: 'Endpoint integration policy',
}
);

export const POLICY_STATUS = i18n.translate(
'xpack.securitySolution.host.details.endpoint.policyStatus',
'xpack.securitySolution.flyout.entityDetails.host.endpoint.policyStatus',
{
defaultMessage: 'Policy Status',
}
);

export const SENSORVERSION = i18n.translate(
'xpack.securitySolution.host.details.endpoint.sensorversion',
'xpack.securitySolution.flyout.entityDetails.host.endpoint.sensorversion',
{
defaultMessage: 'Endpoint version',
}
);

export const FLEET_AGENT_STATUS = i18n.translate(
'xpack.securitySolution.host.details.endpoint.fleetAgentStatus',
'xpack.securitySolution.flyout.entityDetails.host.endpoint.fleetAgentStatus',
{
defaultMessage: 'Agent status',
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { SecuritySolutionLinkAnchor } from '../../../common/components/links';
import { PreferenceFormattedDate } from '../../../common/components/formatted_date';
import { FlyoutHeader } from '../../shared/components/flyout_header';
import { FlyoutTitle } from '../../shared/components/flyout_title';
import type { ObservedEntityData } from '../shared/observed_entity/types';
import type { ObservedEntityData } from '../shared/components/observed_entity/types';

interface HostPanelHeaderProps {
hostName: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type { HostItem } from '../../../../../common/search_strategy';
import { Direction, NOT_EVENT_KIND_ASSET_FILTER } from '../../../../../common/search_strategy';
import { HOST_PANEL_OBSERVED_HOST_QUERY_ID, HOST_PANEL_RISK_SCORE_QUERY_ID } from '..';
import { useQueryInspector } from '../../../../common/components/page/manage_query';
import type { ObservedEntityData } from '../../shared/observed_entity/types';
import type { ObservedEntityData } from '../../shared/components/observed_entity/types';

export const useObservedHost = (
hostName: string
Expand Down
Loading

0 comments on commit 5d29c5d

Please sign in to comment.