From 82d6afb723cd47dc30ddb903e342e07ed1038b8a Mon Sep 17 00:00:00 2001 From: Or Ouziel Date: Wed, 5 Jan 2022 14:41:27 +0200 Subject: [PATCH] fix imports (#86) --- .../public/pages/findings/findings.test.tsx | 2 +- .../public/pages/findings/findings_container.tsx | 1 + .../public/pages/findings/findings_table.tsx | 13 +++++++------ .../public/pages/findings/utils.tsx | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings.test.tsx index b8aa13357e9b2..b1d2832916d6a 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings.test.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings.test.tsx @@ -13,7 +13,7 @@ import { dataPluginMock } from '../../../../../../src/plugins/data/public/mocks' import { coreMock } from '../../../../../../src/core/public/mocks'; import { createStubDataView } from '../../../../../../src/plugins/data_views/public/data_views/data_view.stub'; import * as utils from './utils'; -import { CSP_KUBEBEAT_INDEX_NAME } from '../../../common/translations'; +import { CSP_KUBEBEAT_INDEX_NAME } from '../../../common/constants'; import * as TEST_SUBJECTS from './test_subjects'; import type { UseQueryResult } from 'react-query'; import type { DataView } from '../../../../../../src/plugins/data/common'; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_container.tsx b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_container.tsx index b8000dd6ad3d6..561fc4a3d4b85 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_container.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_container.tsx @@ -28,6 +28,7 @@ import type { IKibanaSearchResponse, TimeRange, } from '../../../../../../src/plugins/data/common'; +import { SEARCH_FAILED } from './translations'; type FindingsEsSearchMutation = UseMutationResult< IKibanaSearchResponse>, diff --git a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_table.tsx b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_table.tsx index d71bec41f9f0c..46739938b56dc 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_table.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_table.tsx @@ -19,8 +19,9 @@ import { } from '@elastic/eui'; import { orderBy } from 'lodash'; import * as TEST_SUBJECTS from './test_subjects'; -import type { CspFinding, FindingsFetchState } from './types'; +import * as TEXT from './translations'; import { CSPEvaluationBadge } from '../../components/csp_evaluation_badge'; +import type { CspFinding, FindingsFetchState } from './types'; interface BaseFindingsTableProps { selectItem(v: CspFinding | undefined): void; @@ -101,30 +102,30 @@ const resultEvaluationRenderer = (type: PropsOf['type const columns: Array> = [ { field: 'resource.filename', - name: TX.RESOURCE, + name: TEXT.RESOURCE, truncateText: true, }, { field: 'rule.name', - name: TX.RULE_NAME, + name: TEXT.RULE_NAME, width: '50%', truncateText: true, render: ruleNameRenderer, }, { field: 'result.evaluation', - name: TX.EVALUATION, + name: TEXT.EVALUATION, width: '80px', render: resultEvaluationRenderer, }, { field: 'rule.tags', - name: TX.TAGS, + name: TEXT.TAGS, render: ruleTagsRenderer, }, { field: '@timestamp', - name: TX.TIMESTAMP, + name: TEXT.TIMESTAMP, truncateText: true, }, ]; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/findings/utils.tsx b/x-pack/plugins/cloud_security_posture/public/pages/findings/utils.tsx index d51f657c25386..e7650c16ebc35 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/findings/utils.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/findings/utils.tsx @@ -16,7 +16,7 @@ import type { TimeRange, } from '../../../../../../src/plugins/data/common'; import type { CspPluginSetup } from '../../types'; -import { CSP_KUBEBEAT_INDEX_NAME } from '../../../common/translations'; +import { CSP_KUBEBEAT_INDEX_NAME } from '../../../common/constants'; import { useKibana } from '../../../../../../src/plugins/kibana_react/public'; export const extractErrorMessage = (e: unknown): string =>