mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[SecuritySolution] Refactor security packages (#155365)
## Summary closes: https://github.com/elastic/kibana/issues/155301 Moves _packages/security-solution/_ to _x-pack/packages/security-solution/_ Moves _x-pack/packages/kbn-securitysolution-*_ into the new _x-pack/packages/security-solution/_ It contains 3 packages now: - data_view/ - ecs_data_quality_dashboard/ - side_nav/ Package names and ids have not changed. ## Other - eslint configured for all the packages in the directory - i18n prefix `securitySolutionPackages` configured for all packages in the directory - generic storybook configuration, run with: `yarn storybook security_solution_packages` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
95d2604a68
commit
202f13f7be
276 changed files with 1602 additions and 1927 deletions
10
.eslintrc.js
10
.eslintrc.js
|
@ -980,7 +980,7 @@ module.exports = {
|
|||
// front end and common typescript and javascript files only
|
||||
files: [
|
||||
'x-pack/plugins/ecs_data_quality_dashboard/common/**/*.{js,mjs,ts,tsx}',
|
||||
'x-pack/packages/kbn-ecs-data-quality-dashboard/common/**/*.{js,mjs,ts,tsx}',
|
||||
'x-pack/packages/security-solution/**/*.{js,mjs,ts,tsx}',
|
||||
'x-pack/plugins/security_solution/public/**/*.{js,mjs,ts,tsx}',
|
||||
'x-pack/plugins/security_solution/common/**/*.{js,mjs,ts,tsx}',
|
||||
'x-pack/plugins/timelines/public/**/*.{js,mjs,ts,tsx}',
|
||||
|
@ -1007,14 +1007,14 @@ module.exports = {
|
|||
// This should be a very small set as most linter rules are useful for tests as well.
|
||||
files: [
|
||||
'x-pack/plugins/ecs_data_quality_dashboard/**/*.{ts,tsx}',
|
||||
'x-pack/packages/kbn-ecs-data-quality-dashboard/**/*.{ts,tsx}',
|
||||
'x-pack/packages/security-solution/**/*.{ts,tsx}',
|
||||
'x-pack/plugins/security_solution/**/*.{ts,tsx}',
|
||||
'x-pack/plugins/timelines/**/*.{ts,tsx}',
|
||||
'x-pack/plugins/cases/**/*.{ts,tsx}',
|
||||
],
|
||||
excludedFiles: [
|
||||
'x-pack/plugins/ecs_data_quality_dashboard/**/*.{test,mock,test_helper}.{ts,tsx}',
|
||||
'x-pack/packages/kbn-ecs-data-quality-dashboard/**/*.{test,mock,test_helper}.{ts,tsx}',
|
||||
'x-pack/packages/security-solution/**/*.{test,mock,test_helper}.{ts,tsx}',
|
||||
'x-pack/plugins/security_solution/**/*.{test,mock,test_helper}.{ts,tsx}',
|
||||
'x-pack/plugins/timelines/**/*.{test,mock,test_helper}.{ts,tsx}',
|
||||
'x-pack/plugins/cases/**/*.{test,mock,test_helper}.{ts,tsx}',
|
||||
|
@ -1027,7 +1027,7 @@ module.exports = {
|
|||
// typescript only for front and back end
|
||||
files: [
|
||||
'x-pack/plugins/ecs_data_quality_dashboard/**/*.{ts,tsx}',
|
||||
'x-pack/packages/kbn-ecs-data-quality-dashboard/**/*.{ts,tsx}',
|
||||
'x-pack/packages/security-solution/**/*.{ts,tsx}',
|
||||
'x-pack/plugins/security_solution/**/*.{ts,tsx}',
|
||||
'x-pack/plugins/timelines/**/*.{ts,tsx}',
|
||||
'x-pack/plugins/cases/**/*.{ts,tsx}',
|
||||
|
@ -1059,7 +1059,7 @@ module.exports = {
|
|||
// typescript and javascript for front and back end
|
||||
files: [
|
||||
'x-pack/plugins/ecs_data_quality_dashboard/**/*.{js,mjs,ts,tsx}',
|
||||
'x-pack/packages/kbn-ecs-data-quality-dashboard/**/*.{js,mjs,ts,tsx}',
|
||||
'x-pack/packages/security-solution/**/*.{js,mjs,ts,tsx}',
|
||||
'x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}',
|
||||
'x-pack/plugins/timelines/**/*.{js,mjs,ts,tsx}',
|
||||
'x-pack/plugins/cases/**/*.{js,mjs,ts,tsx}',
|
||||
|
|
8
.github/CODEOWNERS
vendored
8
.github/CODEOWNERS
vendored
|
@ -319,7 +319,7 @@ packages/kbn-docs-utils @elastic/kibana-operations
|
|||
packages/kbn-dom-drag-drop @elastic/kibana-visualizations @elastic/kibana-data-discovery
|
||||
packages/kbn-ebt-tools @elastic/kibana-core
|
||||
packages/kbn-ecs @elastic/kibana-core @elastic/security-threat-hunting-investigations
|
||||
x-pack/packages/kbn-ecs-data-quality-dashboard @elastic/security-threat-hunting-investigations
|
||||
x-pack/packages/security-solution/ecs_data_quality_dashboard @elastic/security-threat-hunting-investigations
|
||||
x-pack/plugins/ecs_data_quality_dashboard @elastic/security-threat-hunting-investigations
|
||||
test/plugin_functional/plugins/elasticsearch_client_plugin @elastic/kibana-core
|
||||
x-pack/test/plugin_api_integration/plugins/elasticsearch_client @elastic/kibana-core
|
||||
|
@ -549,11 +549,11 @@ x-pack/test/security_api_integration/packages/helpers @elastic/kibana-core
|
|||
x-pack/plugins/security @elastic/kibana-security
|
||||
x-pack/test/cases_api_integration/common/plugins/security_solution @elastic/response-ops
|
||||
x-pack/plugins/security_solution @elastic/security-solution
|
||||
packages/security-solution/side_nav @elastic/security-threat-hunting-explore
|
||||
packages/security-solution/storybook/config @elastic/security-threat-hunting-explore
|
||||
x-pack/packages/security-solution/side_nav @elastic/security-threat-hunting-explore
|
||||
x-pack/packages/security-solution/storybook/config @elastic/security-threat-hunting-explore
|
||||
x-pack/test/security_functional/plugins/test_endpoints @elastic/kibana-security
|
||||
packages/kbn-securitysolution-autocomplete @elastic/security-solution-platform
|
||||
x-pack/packages/kbn-securitysolution-data-table @elastic/security-threat-hunting-investigations
|
||||
x-pack/packages/security-solution/data_table @elastic/security-threat-hunting-investigations
|
||||
packages/kbn-securitysolution-ecs @elastic/security-threat-hunting-explore
|
||||
packages/kbn-securitysolution-es-utils @elastic/security-solution-platform
|
||||
packages/kbn-securitysolution-exception-list-components @elastic/security-solution-platform
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
"domDragDrop": "packages/kbn-dom-drag-drop",
|
||||
"controls": "src/plugins/controls",
|
||||
"data": "src/plugins/data",
|
||||
"ecsDataQualityDashboard": "x-pack/packages/kbn-ecs-data-quality-dashboard",
|
||||
"observabilityAlertDetails": "x-pack/packages/observability/alert_details",
|
||||
"dataViews": "src/plugins/data_views",
|
||||
"devTools": "src/plugins/dev_tools",
|
||||
|
@ -80,11 +79,10 @@
|
|||
"savedObjects": "src/plugins/saved_objects",
|
||||
"savedObjectsFinder": "src/plugins/saved_objects_finder",
|
||||
"savedObjectsManagement": "src/plugins/saved_objects_management",
|
||||
"securitySolutionDataTable": "packages/kbn-securitysolution-data-table",
|
||||
"server": "src/legacy/server",
|
||||
"share": "src/plugins/share",
|
||||
"sharedUXPackages": "packages/shared-ux",
|
||||
"securitySolutionPackages": "packages/security-solution",
|
||||
"securitySolutionPackages": "x-pack/packages/security-solution",
|
||||
"coloring": "packages/kbn-coloring/src",
|
||||
"languageDocumentationPopover": "packages/kbn-language-documentation-popover/src",
|
||||
"statusPage": "src/legacy/core_plugins/status_page",
|
||||
|
|
|
@ -358,7 +358,7 @@
|
|||
"@kbn/dom-drag-drop": "link:packages/kbn-dom-drag-drop",
|
||||
"@kbn/ebt-tools": "link:packages/kbn-ebt-tools",
|
||||
"@kbn/ecs": "link:packages/kbn-ecs",
|
||||
"@kbn/ecs-data-quality-dashboard": "link:x-pack/packages/kbn-ecs-data-quality-dashboard",
|
||||
"@kbn/ecs-data-quality-dashboard": "link:x-pack/packages/security-solution/ecs_data_quality_dashboard",
|
||||
"@kbn/ecs-data-quality-dashboard-plugin": "link:x-pack/plugins/ecs_data_quality_dashboard",
|
||||
"@kbn/elasticsearch-client-plugin": "link:test/plugin_functional/plugins/elasticsearch_client_plugin",
|
||||
"@kbn/elasticsearch-client-xpack-plugin": "link:x-pack/test/plugin_api_integration/plugins/elasticsearch_client",
|
||||
|
@ -550,11 +550,11 @@
|
|||
"@kbn/security-plugin": "link:x-pack/plugins/security",
|
||||
"@kbn/security-solution-fixtures-plugin": "link:x-pack/test/cases_api_integration/common/plugins/security_solution",
|
||||
"@kbn/security-solution-plugin": "link:x-pack/plugins/security_solution",
|
||||
"@kbn/security-solution-side-nav": "link:packages/security-solution/side_nav",
|
||||
"@kbn/security-solution-storybook-config": "link:packages/security-solution/storybook/config",
|
||||
"@kbn/security-solution-side-nav": "link:x-pack/packages/security-solution/side_nav",
|
||||
"@kbn/security-solution-storybook-config": "link:x-pack/packages/security-solution/storybook/config",
|
||||
"@kbn/security-test-endpoints-plugin": "link:x-pack/test/security_functional/plugins/test_endpoints",
|
||||
"@kbn/securitysolution-autocomplete": "link:packages/kbn-securitysolution-autocomplete",
|
||||
"@kbn/securitysolution-data-table": "link:x-pack/packages/kbn-securitysolution-data-table",
|
||||
"@kbn/securitysolution-data-table": "link:x-pack/packages/security-solution/data_table",
|
||||
"@kbn/securitysolution-ecs": "link:packages/kbn-securitysolution-ecs",
|
||||
"@kbn/securitysolution-es-utils": "link:packages/kbn-securitysolution-es-utils",
|
||||
"@kbn/securitysolution-exception-list-components": "link:packages/kbn-securitysolution-exception-list-components",
|
||||
|
|
|
@ -12,9 +12,10 @@ module.exports = {
|
|||
* Used by `kbn-babel-preset` and `kbn-eslint-config`.
|
||||
*/
|
||||
USES_STYLED_COMPONENTS: [
|
||||
/packages[\/\\](kbn-ui-shared-deps-(npm|src)|kbn-ecs-data-quality-dashboard)[\/\\]/,
|
||||
/packages[\/\\]kbn-ui-shared-deps-(npm|src)[\/\\]/,
|
||||
/src[\/\\]plugins[\/\\](kibana_react)[\/\\]/,
|
||||
/x-pack[\/\\]plugins[\/\\](apm|beats_management|cases|fleet|infra|lists|observability|observability_shared|exploratory_view|osquery|security_solution|timelines|synthetics|ux)[\/\\]/,
|
||||
/x-pack[\/\\]test[\/\\]plugin_functional[\/\\]plugins[\/\\]resolver_test[\/\\]/,
|
||||
/x-pack[\/\\]packages[\/\\]security-solution[\/\\]ecs_data_quality_dashboard[\/\\]/,
|
||||
],
|
||||
};
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
preset: '@kbn/test',
|
||||
rootDir: '../../..',
|
||||
roots: ['<rootDir>/packages/security-solution/side_nav'],
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
export { TITLE, URL } from './constants';
|
|
@ -45,8 +45,7 @@ export const storybookAliases = {
|
|||
observability: 'x-pack/plugins/observability/.storybook',
|
||||
presentation: 'src/plugins/presentation_util/storybook',
|
||||
security_solution: 'x-pack/plugins/security_solution/.storybook',
|
||||
security_solution_packages: 'packages/security-solution/storybook/config',
|
||||
security_solution_data_table: 'x-pack/packages/kbn-securitysolution-data-table/.storybook',
|
||||
security_solution_packages: 'x-pack/packages/security-solution/storybook/config',
|
||||
shared_ux: 'packages/shared-ux/storybook/config',
|
||||
threat_intelligence: 'x-pack/plugins/threat_intelligence/.storybook',
|
||||
triggers_actions_ui: 'x-pack/plugins/triggers_actions_ui/.storybook',
|
||||
|
|
|
@ -632,8 +632,8 @@
|
|||
"@kbn/ebt-tools/*": ["packages/kbn-ebt-tools/*"],
|
||||
"@kbn/ecs": ["packages/kbn-ecs"],
|
||||
"@kbn/ecs/*": ["packages/kbn-ecs/*"],
|
||||
"@kbn/ecs-data-quality-dashboard": ["x-pack/packages/kbn-ecs-data-quality-dashboard"],
|
||||
"@kbn/ecs-data-quality-dashboard/*": ["x-pack/packages/kbn-ecs-data-quality-dashboard/*"],
|
||||
"@kbn/ecs-data-quality-dashboard": ["x-pack/packages/security-solution/ecs_data_quality_dashboard"],
|
||||
"@kbn/ecs-data-quality-dashboard/*": ["x-pack/packages/security-solution/ecs_data_quality_dashboard/*"],
|
||||
"@kbn/ecs-data-quality-dashboard-plugin": ["x-pack/plugins/ecs_data_quality_dashboard"],
|
||||
"@kbn/ecs-data-quality-dashboard-plugin/*": ["x-pack/plugins/ecs_data_quality_dashboard/*"],
|
||||
"@kbn/elasticsearch-client-plugin": ["test/plugin_functional/plugins/elasticsearch_client_plugin"],
|
||||
|
@ -1092,16 +1092,16 @@
|
|||
"@kbn/security-solution-fixtures-plugin/*": ["x-pack/test/cases_api_integration/common/plugins/security_solution/*"],
|
||||
"@kbn/security-solution-plugin": ["x-pack/plugins/security_solution"],
|
||||
"@kbn/security-solution-plugin/*": ["x-pack/plugins/security_solution/*"],
|
||||
"@kbn/security-solution-side-nav": ["packages/security-solution/side_nav"],
|
||||
"@kbn/security-solution-side-nav/*": ["packages/security-solution/side_nav/*"],
|
||||
"@kbn/security-solution-storybook-config": ["packages/security-solution/storybook/config"],
|
||||
"@kbn/security-solution-storybook-config/*": ["packages/security-solution/storybook/config/*"],
|
||||
"@kbn/security-solution-side-nav": ["x-pack/packages/security-solution/side_nav"],
|
||||
"@kbn/security-solution-side-nav/*": ["x-pack/packages/security-solution/side_nav/*"],
|
||||
"@kbn/security-solution-storybook-config": ["x-pack/packages/security-solution/storybook/config"],
|
||||
"@kbn/security-solution-storybook-config/*": ["x-pack/packages/security-solution/storybook/config/*"],
|
||||
"@kbn/security-test-endpoints-plugin": ["x-pack/test/security_functional/plugins/test_endpoints"],
|
||||
"@kbn/security-test-endpoints-plugin/*": ["x-pack/test/security_functional/plugins/test_endpoints/*"],
|
||||
"@kbn/securitysolution-autocomplete": ["packages/kbn-securitysolution-autocomplete"],
|
||||
"@kbn/securitysolution-autocomplete/*": ["packages/kbn-securitysolution-autocomplete/*"],
|
||||
"@kbn/securitysolution-data-table": ["x-pack/packages/kbn-securitysolution-data-table"],
|
||||
"@kbn/securitysolution-data-table/*": ["x-pack/packages/kbn-securitysolution-data-table/*"],
|
||||
"@kbn/securitysolution-data-table": ["x-pack/packages/security-solution/data_table"],
|
||||
"@kbn/securitysolution-data-table/*": ["x-pack/packages/security-solution/data_table/*"],
|
||||
"@kbn/securitysolution-ecs": ["packages/kbn-securitysolution-ecs"],
|
||||
"@kbn/securitysolution-ecs/*": ["packages/kbn-securitysolution-ecs/*"],
|
||||
"@kbn/securitysolution-es-utils": ["packages/kbn-securitysolution-es-utils"],
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const INDICES_TAB_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.body.tabs.indicesTabTitle',
|
||||
{
|
||||
defaultMessage: 'Indices',
|
||||
}
|
||||
);
|
||||
|
||||
export const STORAGE_TAB_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.body.tabs.storageTabTitle',
|
||||
{
|
||||
defaultMessage: 'Storage',
|
||||
}
|
||||
);
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const ERROR = i18n.translate('ecsDataQualityDashboard.errorsViewerTable.errorColumn', {
|
||||
defaultMessage: 'Error',
|
||||
});
|
||||
|
||||
export const INDEX = i18n.translate('ecsDataQualityDashboard.errorsViewerTable.indexColumn', {
|
||||
defaultMessage: 'Index',
|
||||
});
|
||||
|
||||
export const PATTERN = i18n.translate('ecsDataQualityDashboard.errorsViewerTable.patternColumn', {
|
||||
defaultMessage: 'Pattern',
|
||||
});
|
|
@ -1,406 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const ADD_TO_NEW_CASE = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.addToNewCaseButton',
|
||||
{
|
||||
defaultMessage: 'Add to new case',
|
||||
}
|
||||
);
|
||||
|
||||
export const ALL_FIELDS = i18n.translate('ecsDataQualityDashboard.indexProperties.allFieldsLabel', {
|
||||
defaultMessage: 'All fields',
|
||||
});
|
||||
|
||||
export const ALL_CALLOUT = (version: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.indexProperties.allCallout', {
|
||||
values: { version },
|
||||
defaultMessage:
|
||||
"All mappings for the fields in this index, including fields that comply with the Elastic Common Schema (ECS), version {version}, and fields that don't",
|
||||
});
|
||||
|
||||
export const ALL_CALLOUT_TITLE = (fieldCount: number) =>
|
||||
i18n.translate('ecsDataQualityDashboard.indexProperties.allCalloutTitle', {
|
||||
values: { fieldCount },
|
||||
defaultMessage:
|
||||
'All {fieldCount} {fieldCount, plural, =1 {field mapping} other {field mappings}}',
|
||||
});
|
||||
|
||||
export const ALL_EMPTY = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.allCalloutEmptyContent',
|
||||
{
|
||||
defaultMessage: 'This index does not contain any mappings',
|
||||
}
|
||||
);
|
||||
|
||||
export const ALL_EMPTY_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.allCalloutEmptyTitle',
|
||||
{
|
||||
defaultMessage: 'No mappings',
|
||||
}
|
||||
);
|
||||
|
||||
export const ALL_FIELDS_TABLE_TITLE = (indexName: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.allTab.allFieldsTableTitle', {
|
||||
values: { indexName },
|
||||
defaultMessage: 'All fields - {indexName}',
|
||||
});
|
||||
|
||||
export const SUMMARY_MARKDOWN_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.summaryMarkdownTitle',
|
||||
{
|
||||
defaultMessage: 'Data quality',
|
||||
}
|
||||
);
|
||||
|
||||
export const SUMMARY_MARKDOWN_DESCRIPTION = ({
|
||||
ecsFieldReferenceUrl,
|
||||
ecsReferenceUrl,
|
||||
indexName,
|
||||
mappingUrl,
|
||||
version,
|
||||
}: {
|
||||
ecsFieldReferenceUrl: string;
|
||||
ecsReferenceUrl: string;
|
||||
indexName: string;
|
||||
mappingUrl: string;
|
||||
version: string;
|
||||
}) =>
|
||||
i18n.translate('ecsDataQualityDashboard.indexProperties.summaryMarkdownDescription', {
|
||||
values: { ecsFieldReferenceUrl, ecsReferenceUrl, indexName, mappingUrl, version },
|
||||
defaultMessage:
|
||||
'The `{indexName}` index has [mappings]({mappingUrl}) or field values that are different than the [Elastic Common Schema]({ecsReferenceUrl}) (ECS), version `{version}` [definitions]({ecsFieldReferenceUrl}).',
|
||||
});
|
||||
|
||||
export const COPY_TO_CLIPBOARD = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.copyToClipboardButton',
|
||||
{
|
||||
defaultMessage: 'Copy to clipboard',
|
||||
}
|
||||
);
|
||||
|
||||
export const CUSTOM_FIELDS_TABLE_TITLE = (indexName: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.customTab.customFieldsTableTitle', {
|
||||
values: { indexName },
|
||||
defaultMessage: 'Custom fields - {indexName}',
|
||||
});
|
||||
|
||||
export const CUSTOM_DETECTION_ENGINE_RULES_WORK = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.custonDetectionEngineRulesWorkMessage',
|
||||
{
|
||||
defaultMessage: '✅ Custom detection engine rules work',
|
||||
}
|
||||
);
|
||||
|
||||
export const DOCS = i18n.translate('ecsDataQualityDashboard.indexProperties.docsLabel', {
|
||||
defaultMessage: 'Docs',
|
||||
});
|
||||
|
||||
export const ECS_COMPLIANT_FIELDS = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.ecsCompliantFieldsLabel',
|
||||
{
|
||||
defaultMessage: 'ECS compliant fields',
|
||||
}
|
||||
);
|
||||
|
||||
export const ECS_COMPLIANT_CALLOUT = ({
|
||||
fieldCount,
|
||||
version,
|
||||
}: {
|
||||
fieldCount: number;
|
||||
version: string;
|
||||
}) =>
|
||||
i18n.translate('ecsDataQualityDashboard.indexProperties.ecsCompliantCallout', {
|
||||
values: { fieldCount, version },
|
||||
defaultMessage:
|
||||
'The {fieldCount, plural, =1 {index mapping type and document values for this field comply} other {index mapping types and document values of these fields comply}} with the Elastic Common Schema (ECS), version {version}',
|
||||
});
|
||||
|
||||
export const ECS_COMPLIANT_CALLOUT_TITLE = (fieldCount: number) =>
|
||||
i18n.translate('ecsDataQualityDashboard.indexProperties.ecsCompliantCalloutTitle', {
|
||||
values: { fieldCount },
|
||||
defaultMessage: '{fieldCount} ECS compliant {fieldCount, plural, =1 {field} other {fields}}',
|
||||
});
|
||||
|
||||
export const ECS_COMPLIANT_EMPTY = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.ecsCompliantEmptyContent',
|
||||
{
|
||||
defaultMessage:
|
||||
'None of the field mappings in this index comply with the Elastic Common Schema (ECS). The index must (at least) contain an @timestamp date field.',
|
||||
}
|
||||
);
|
||||
|
||||
export const ECS_VERSION_MARKDOWN_COMMENT = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.ecsVersionMarkdownComment',
|
||||
{
|
||||
defaultMessage: 'Elastic Common Schema (ECS) version',
|
||||
}
|
||||
);
|
||||
|
||||
export const INDEX = i18n.translate('ecsDataQualityDashboard.indexProperties.indexMarkdown', {
|
||||
defaultMessage: 'Index',
|
||||
});
|
||||
|
||||
export const ECS_COMPLIANT_EMPTY_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.ecsCompliantEmptyTitle',
|
||||
{
|
||||
defaultMessage: 'No ECS compliant Mappings',
|
||||
}
|
||||
);
|
||||
|
||||
export const ECS_COMPLIANT_MAPPINGS_ARE_FULLY_SUPPORTED = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.ecsCompliantMappingsAreFullySupportedMessage',
|
||||
{
|
||||
defaultMessage: '✅ ECS compliant mappings and field values are fully supported',
|
||||
}
|
||||
);
|
||||
|
||||
export const ERROR_LOADING_MAPPINGS_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.emptyErrorPrompt.errorLoadingMappingsTitle',
|
||||
{
|
||||
defaultMessage: 'Unable to load index mappings',
|
||||
}
|
||||
);
|
||||
|
||||
export const ERROR_LOADING_MAPPINGS_BODY = (error: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.emptyErrorPrompt.errorLoadingMappingsBody', {
|
||||
values: { error },
|
||||
defaultMessage: 'There was a problem loading mappings: {error}',
|
||||
});
|
||||
|
||||
export const ERROR_LOADING_UNALLOWED_VALUES_BODY = (error: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.emptyErrorPrompt.errorLoadingUnallowedValuesBody', {
|
||||
values: { error },
|
||||
defaultMessage: 'There was a problem loading unallowed values: {error}',
|
||||
});
|
||||
|
||||
export const ERROR_LOADING_UNALLOWED_VALUES_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.emptyErrorPrompt.errorLoadingUnallowedValuesTitle',
|
||||
{
|
||||
defaultMessage: 'Unable to load unallowed values',
|
||||
}
|
||||
);
|
||||
|
||||
export const ECS_COMPLIANT_FIELDS_TABLE_TITLE = (indexName: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.customTab.ecsComplaintFieldsTableTitle', {
|
||||
values: { indexName },
|
||||
defaultMessage: 'ECS complaint fields - {indexName}',
|
||||
});
|
||||
|
||||
export const LOADING_MAPPINGS = i18n.translate(
|
||||
'ecsDataQualityDashboard.emptyLoadingPrompt.loadingMappingsPrompt',
|
||||
{
|
||||
defaultMessage: 'Loading mappings',
|
||||
}
|
||||
);
|
||||
|
||||
export const LOADING_UNALLOWED_VALUES = i18n.translate(
|
||||
'ecsDataQualityDashboard.emptyLoadingPrompt.loadingUnallowedValuesPrompt',
|
||||
{
|
||||
defaultMessage: 'Loading unallowed values',
|
||||
}
|
||||
);
|
||||
|
||||
export const SUMMARY = i18n.translate('ecsDataQualityDashboard.indexProperties.summaryTab', {
|
||||
defaultMessage: 'Summary',
|
||||
});
|
||||
|
||||
export const MISSING_TIMESTAMP_CALLOUT = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.missingTimestampCallout',
|
||||
{
|
||||
defaultMessage:
|
||||
'Consider adding an @timestamp (date) field mapping to this index, as required by the Elastic Common Schema (ECS), because:',
|
||||
}
|
||||
);
|
||||
|
||||
export const MISSING_TIMESTAMP_CALLOUT_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.missingTimestampCalloutTitle',
|
||||
{
|
||||
defaultMessage: 'Missing an @timestamp (date) field mapping for this index',
|
||||
}
|
||||
);
|
||||
|
||||
export const CUSTOM_FIELDS = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.customFieldsLabel',
|
||||
{
|
||||
defaultMessage: 'Custom fields',
|
||||
}
|
||||
);
|
||||
|
||||
export const CUSTOM_CALLOUT = ({ fieldCount, version }: { fieldCount: number; version: string }) =>
|
||||
i18n.translate('ecsDataQualityDashboard.indexProperties.customCallout', {
|
||||
values: { fieldCount, version },
|
||||
defaultMessage:
|
||||
'{fieldCount, plural, =1 {This field is not} other {These fields are not}} defined by the Elastic Common Schema (ECS), version {version}.',
|
||||
});
|
||||
|
||||
export const CUSTOM_CALLOUT_TITLE = (fieldCount: number) =>
|
||||
i18n.translate('ecsDataQualityDashboard.indexProperties.customCalloutTitle', {
|
||||
values: { fieldCount },
|
||||
defaultMessage:
|
||||
'{fieldCount} Custom {fieldCount, plural, =1 {field mapping} other {field mappings}}',
|
||||
});
|
||||
|
||||
export const CUSTOM_EMPTY = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.customEmptyContent',
|
||||
{
|
||||
defaultMessage: 'All the field mappings in this index are defined by the Elastic Common Schema',
|
||||
}
|
||||
);
|
||||
|
||||
export const CUSTOM_EMPTY_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.customEmptyTitle',
|
||||
{
|
||||
defaultMessage: 'All field mappings defined by ECS',
|
||||
}
|
||||
);
|
||||
|
||||
export const INCOMPATIBLE_FIELDS = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.incompatibleFieldsTab',
|
||||
{
|
||||
defaultMessage: 'Incompatible fields',
|
||||
}
|
||||
);
|
||||
|
||||
export const INCOMPATIBLE_CALLOUT = ({
|
||||
fieldCount,
|
||||
version,
|
||||
}: {
|
||||
fieldCount: number;
|
||||
version: string;
|
||||
}) =>
|
||||
i18n.translate('ecsDataQualityDashboard.indexProperties.incompatibleCallout', {
|
||||
values: { version },
|
||||
defaultMessage:
|
||||
"Fields are incompatible with ECS when index mappings, or the values of the fields in the index, don't conform to the Elastic Common Schema (ECS), version {version}.",
|
||||
});
|
||||
|
||||
export const INCOMPATIBLE_FIELDS_WITH = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.incompatibleCallout.incompatibleFieldsWithLabel',
|
||||
{
|
||||
defaultMessage:
|
||||
'Incompatible fields with mappings in the same family have exactly the same search behavior but may have different space usage or performance characteristics.',
|
||||
}
|
||||
);
|
||||
|
||||
export const WHEN_AN_INCOMPATIBLE_FIELD = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.incompatibleCallout.whenAnIncompatibleFieldLabel',
|
||||
{
|
||||
defaultMessage: 'When an incompatible field is not in the same family:',
|
||||
}
|
||||
);
|
||||
|
||||
export const INCOMPATIBLE_CALLOUT_TITLE = ({
|
||||
fieldCount,
|
||||
fieldsInSameFamily,
|
||||
}: {
|
||||
fieldCount: number;
|
||||
fieldsInSameFamily: number;
|
||||
}) =>
|
||||
i18n.translate('ecsDataQualityDashboard.indexProperties.incompatibleCalloutTitle', {
|
||||
values: { fieldCount, fieldsInSameFamily },
|
||||
defaultMessage:
|
||||
'{fieldCount} incompatible {fieldCount, plural, =1 {field} other {fields}}, {fieldsInSameFamily} {fieldsInSameFamily, plural, =1 {field} other {fields}} with {fieldsInSameFamily, plural, =1 {a mapping} other {mappings}} in the same family',
|
||||
});
|
||||
|
||||
export const INCOMPATIBLE_EMPTY = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.incompatibleEmptyContent',
|
||||
{
|
||||
defaultMessage:
|
||||
'All of the field mappings and document values in this index are compliant with the Elastic Common Schema (ECS).',
|
||||
}
|
||||
);
|
||||
|
||||
export const INCOMPATIBLE_EMPTY_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.incompatibleEmptyTitle',
|
||||
{
|
||||
defaultMessage: 'All field mappings and values are ECS compliant',
|
||||
}
|
||||
);
|
||||
|
||||
export const DETECTION_ENGINE_RULES_WILL_WORK = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.detectionEngineRulesWillWorkMessage',
|
||||
{
|
||||
defaultMessage: '✅ Detection engine rules will work for these fields',
|
||||
}
|
||||
);
|
||||
|
||||
export const DETECTION_ENGINE_RULES_MAY_NOT_MATCH = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.detectionEngineRulesWontWorkMessage',
|
||||
{
|
||||
defaultMessage:
|
||||
'❌ Detection engine rules referencing these fields may not match them correctly',
|
||||
}
|
||||
);
|
||||
|
||||
export const OTHER_APP_CAPABILITIES_WORK_PROPERLY = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.otherAppCapabilitiesWorkProperlyMessage',
|
||||
{
|
||||
defaultMessage: '✅ Other app capabilities work properly',
|
||||
}
|
||||
);
|
||||
|
||||
export const PAGES_DISPLAY_EVENTS = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.pagesDisplayEventsMessage',
|
||||
{
|
||||
defaultMessage: '✅ Pages display events and fields correctly',
|
||||
}
|
||||
);
|
||||
|
||||
export const PAGES_MAY_NOT_DISPLAY_FIELDS = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.pagesMayNotDisplayFieldsMessage',
|
||||
{
|
||||
defaultMessage: '🌕 Some pages and features may not display these fields',
|
||||
}
|
||||
);
|
||||
|
||||
export const PAGES_MAY_NOT_DISPLAY_EVENTS = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.pagesMayNotDisplayEventsMessage',
|
||||
{
|
||||
defaultMessage:
|
||||
'❌ Pages may not display some events or fields due to unexpected field mappings or values',
|
||||
}
|
||||
);
|
||||
|
||||
export const PRE_BUILT_DETECTION_ENGINE_RULES_WORK = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.preBuiltDetectionEngineRulesWorkMessage',
|
||||
{
|
||||
defaultMessage: '✅ Pre-built detection engine rules work',
|
||||
}
|
||||
);
|
||||
|
||||
export const ECS_IS_A_PERMISSIVE_SCHEMA = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.ecsIsAPermissiveSchemaMessage',
|
||||
{
|
||||
defaultMessage:
|
||||
'ECS is a permissive schema. If your events have additional data that cannot be mapped to ECS, you can simply add them to your events, using custom field names.',
|
||||
}
|
||||
);
|
||||
|
||||
export const SOMETIMES_INDICES_CREATED_BY_OLDER = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.sometimesIndicesCreatedByOlderDescription',
|
||||
{
|
||||
defaultMessage:
|
||||
'Sometimes, indices created by older integrations will have mappings or values that were, but are no longer compliant.',
|
||||
}
|
||||
);
|
||||
|
||||
export const MAPPINGS_THAT_CONFLICT_WITH_ECS = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.mappingThatConflictWithEcsMessage',
|
||||
{
|
||||
defaultMessage: "❌ Mappings or field values that don't comply with ECS are not supported",
|
||||
}
|
||||
);
|
||||
|
||||
export const UNKNOWN = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexProperties.unknownCategoryLabel',
|
||||
{
|
||||
defaultMessage: 'Unknown',
|
||||
}
|
||||
);
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const DOCS = i18n.translate('ecsDataQualityDashboard.patternSummary.docsLabel', {
|
||||
defaultMessage: 'Docs',
|
||||
});
|
||||
|
||||
export const INDICES = i18n.translate('ecsDataQualityDashboard.patternSummary.indicesLabel', {
|
||||
defaultMessage: 'Indices',
|
||||
});
|
||||
|
||||
export const PATTERN_OR_INDEX_TOOLTIP = i18n.translate(
|
||||
'ecsDataQualityDashboard.patternSummary.patternOrIndexTooltip',
|
||||
{
|
||||
defaultMessage: 'A pattern or specific index',
|
||||
}
|
||||
);
|
||||
|
||||
export const PATTERN_DOCS_COUNT_TOOLTIP = (pattern: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.patternDocsCountTooltip', {
|
||||
values: { pattern },
|
||||
defaultMessage: 'The total count from all indices matching: {pattern}',
|
||||
});
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const ERROR_LOADING_METADATA_TITLE = (pattern: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.emptyErrorPrompt.errorLoadingMetadataTitle', {
|
||||
values: { pattern },
|
||||
defaultMessage: "Indices matching the {pattern} pattern won't be checked",
|
||||
});
|
||||
|
||||
export const ERROR_LOADING_METADATA_BODY = ({
|
||||
error,
|
||||
pattern,
|
||||
}: {
|
||||
error: string;
|
||||
pattern: string;
|
||||
}) =>
|
||||
i18n.translate('ecsDataQualityDashboard.emptyErrorPrompt.errorLoadingMetadataBody', {
|
||||
values: { error, pattern },
|
||||
defaultMessage:
|
||||
"Indices matching the {pattern} pattern won't be checked, because an error occurred: {error}",
|
||||
});
|
||||
|
||||
export const LOADING_STATS = i18n.translate(
|
||||
'ecsDataQualityDashboard.emptyLoadingPrompt.loadingStatsPrompt',
|
||||
{
|
||||
defaultMessage: 'Loading stats',
|
||||
}
|
||||
);
|
|
@ -1,132 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const CHECKED = i18n.translate('ecsDataQualityDashboard.statLabels.checkedLabel', {
|
||||
defaultMessage: 'checked',
|
||||
});
|
||||
|
||||
export const CUSTOM = i18n.translate('ecsDataQualityDashboard.statLabels.customLabel', {
|
||||
defaultMessage: 'Custom',
|
||||
});
|
||||
|
||||
export const CUSTOM_INDEX_TOOL_TIP = (indexName: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.statLabels.customIndexToolTip', {
|
||||
values: { indexName },
|
||||
defaultMessage: 'A count of the custom field mappings in the {indexName} index',
|
||||
});
|
||||
|
||||
export const CUSTOM_PATTERN_TOOL_TIP = (pattern: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.statLabels.customPatternToolTip', {
|
||||
values: { pattern },
|
||||
defaultMessage:
|
||||
'The total count of custom field mappings, in indices matching the {pattern} pattern',
|
||||
});
|
||||
|
||||
export const DOCS = i18n.translate('ecsDataQualityDashboard.statLabels.docsLabel', {
|
||||
defaultMessage: 'Docs',
|
||||
});
|
||||
|
||||
export const FIELDS = i18n.translate('ecsDataQualityDashboard.statLabels.fieldsLabel', {
|
||||
defaultMessage: 'fields',
|
||||
});
|
||||
|
||||
export const INCOMPATIBLE = i18n.translate('ecsDataQualityDashboard.statLabels.incompatibleLabel', {
|
||||
defaultMessage: 'Incompatible',
|
||||
});
|
||||
|
||||
export const INCOMPATIBLE_INDEX_TOOL_TIP = (indexName: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.statLabels.incompatibleIndexToolTip', {
|
||||
values: { indexName },
|
||||
defaultMessage: 'Mappings and values incompatible with ECS, in the {indexName} index',
|
||||
});
|
||||
|
||||
export const INCOMPATIBLE_PATTERN_TOOL_TIP = (pattern: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.statLabels.incompatiblePatternToolTip', {
|
||||
values: { pattern },
|
||||
defaultMessage:
|
||||
'The total count of fields incompatible with ECS, in indices matching the {pattern} pattern',
|
||||
});
|
||||
|
||||
export const INDEX_DOCS_COUNT_TOOL_TIP = (indexName: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.statLabels.indexDocsCountToolTip', {
|
||||
values: { indexName },
|
||||
defaultMessage: 'A count of the docs in the {indexName} index',
|
||||
});
|
||||
|
||||
export const INDEX_DOCS_PATTERN_TOOL_TIP = (pattern: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.statLabels.indexDocsPatternToolTip', {
|
||||
values: { pattern },
|
||||
defaultMessage: 'The total count of docs, in indices matching the {pattern} pattern',
|
||||
});
|
||||
|
||||
export const INDICES = i18n.translate('ecsDataQualityDashboard.statLabels.indicesLabel', {
|
||||
defaultMessage: 'Indices',
|
||||
});
|
||||
|
||||
export const SIZE = i18n.translate('ecsDataQualityDashboard.statLabels.sizeLabel', {
|
||||
defaultMessage: 'Size',
|
||||
});
|
||||
|
||||
export const INDICES_SIZE_PATTERN_TOOL_TIP = (pattern: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.statLabels.indicesSizePatternToolTip', {
|
||||
values: { pattern },
|
||||
defaultMessage:
|
||||
'The total size of the primary indices matching the {pattern} pattern (does not include replicas)',
|
||||
});
|
||||
|
||||
export const TOTAL_COUNT_OF_INDICES_CHECKED_MATCHING_PATTERN_TOOL_TIP = (pattern: string) =>
|
||||
i18n.translate(
|
||||
'ecsDataQualityDashboard.statLabels.totalCountOfIndicesCheckedMatchingPatternToolTip',
|
||||
{
|
||||
values: { pattern },
|
||||
defaultMessage: 'The total count of indices checked that match the {pattern} pattern',
|
||||
}
|
||||
);
|
||||
|
||||
export const TOTAL_COUNT_OF_INDICES_MATCHING_PATTERN_TOOL_TIP = (pattern: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.statLabels.totalCountOfIndicesMatchingPatternToolTip', {
|
||||
values: { pattern },
|
||||
defaultMessage: 'The total count of indices matching the {pattern} pattern',
|
||||
});
|
||||
|
||||
export const TOTAL_DOCS_TOOL_TIP = i18n.translate(
|
||||
'ecsDataQualityDashboard.statLabels.totalDocsToolTip',
|
||||
{
|
||||
defaultMessage: 'The total count of docs, in all indices',
|
||||
}
|
||||
);
|
||||
|
||||
export const TOTAL_INCOMPATIBLE_TOOL_TIP = i18n.translate(
|
||||
'ecsDataQualityDashboard.statLabels.totalIncompatibleToolTip',
|
||||
{
|
||||
defaultMessage:
|
||||
'The total count of fields incompatible with ECS, in all indices that were checked',
|
||||
}
|
||||
);
|
||||
|
||||
export const TOTAL_INDICES_CHECKED_TOOL_TIP = i18n.translate(
|
||||
'ecsDataQualityDashboard.statLabels.totalIndicesCheckedToolTip',
|
||||
{
|
||||
defaultMessage: 'The total count of all indices checked',
|
||||
}
|
||||
);
|
||||
|
||||
export const TOTAL_INDICES_TOOL_TIP = i18n.translate(
|
||||
'ecsDataQualityDashboard.statLabels.totalIndicesToolTip',
|
||||
{
|
||||
defaultMessage: 'The total count of all indices',
|
||||
}
|
||||
);
|
||||
|
||||
export const TOTAL_SIZE_TOOL_TIP = i18n.translate(
|
||||
'ecsDataQualityDashboard.statLabels.totalSizeToolTip',
|
||||
{
|
||||
defaultMessage: 'The total size of all primary indices (does not include replicas)',
|
||||
}
|
||||
);
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const NO_DATA_LABEL = i18n.translate('ecsDataQualityDashboard.storageTreemap.noDataLabel', {
|
||||
defaultMessage: 'No data to display',
|
||||
});
|
||||
|
||||
export const NO_DATA_REASON_LABEL = (stackByField1: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.storageTreemap.noDataReasonLabel', {
|
||||
values: {
|
||||
stackByField1,
|
||||
},
|
||||
defaultMessage: 'The {stackByField1} field was not present in any groups',
|
||||
});
|
|
@ -1,86 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const COLLAPSE = i18n.translate('ecsDataQualityDashboard.summaryTable.collapseLabel', {
|
||||
defaultMessage: 'Collapse',
|
||||
});
|
||||
|
||||
export const DOCS = i18n.translate('ecsDataQualityDashboard.summaryTable.docsColumn', {
|
||||
defaultMessage: 'Docs',
|
||||
});
|
||||
|
||||
export const EXPAND = i18n.translate('ecsDataQualityDashboard.summaryTable.expandLabel', {
|
||||
defaultMessage: 'Expand',
|
||||
});
|
||||
|
||||
export const EXPAND_ROWS = i18n.translate('ecsDataQualityDashboard.summaryTable.expandRowsColumn', {
|
||||
defaultMessage: 'Expand rows',
|
||||
});
|
||||
|
||||
export const FAILED = i18n.translate('ecsDataQualityDashboard.summaryTable.failedTooltip', {
|
||||
defaultMessage: 'Failed',
|
||||
});
|
||||
|
||||
export const ILM_PHASE = i18n.translate('ecsDataQualityDashboard.summaryTable.ilmPhaseColumn', {
|
||||
defaultMessage: 'ILM Phase',
|
||||
});
|
||||
|
||||
export const INCOMPATIBLE_FIELDS = i18n.translate(
|
||||
'ecsDataQualityDashboard.summaryTable.incompatibleFieldsColumn',
|
||||
{
|
||||
defaultMessage: 'Incompatible fields',
|
||||
}
|
||||
);
|
||||
|
||||
export const INDICES = i18n.translate('ecsDataQualityDashboard.summaryTable.indicesColumn', {
|
||||
defaultMessage: 'Indices',
|
||||
});
|
||||
|
||||
export const INDICES_CHECKED = i18n.translate(
|
||||
'ecsDataQualityDashboard.summaryTable.indicesCheckedColumn',
|
||||
{
|
||||
defaultMessage: 'Indices checked',
|
||||
}
|
||||
);
|
||||
|
||||
export const INDEX = i18n.translate('ecsDataQualityDashboard.summaryTable.indexColumn', {
|
||||
defaultMessage: 'Index',
|
||||
});
|
||||
|
||||
export const INDEX_NAME_LABEL = i18n.translate(
|
||||
'ecsDataQualityDashboard.summaryTable.indexesNameLabel',
|
||||
{
|
||||
defaultMessage: 'Index name',
|
||||
}
|
||||
);
|
||||
|
||||
export const INDEX_TOOL_TIP = (pattern: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.summaryTable.indexToolTip', {
|
||||
values: { pattern },
|
||||
defaultMessage: 'This index matches the pattern or index name: {pattern}',
|
||||
});
|
||||
|
||||
export const PASSED = i18n.translate('ecsDataQualityDashboard.summaryTable.passedTooltip', {
|
||||
defaultMessage: 'Passed',
|
||||
});
|
||||
|
||||
export const RESULT = i18n.translate('ecsDataQualityDashboard.summaryTable.resultColumn', {
|
||||
defaultMessage: 'Result',
|
||||
});
|
||||
|
||||
export const SIZE = i18n.translate('ecsDataQualityDashboard.summaryTable.sizeColumn', {
|
||||
defaultMessage: 'Size',
|
||||
});
|
||||
|
||||
export const THIS_INDEX_HAS_NOT_BEEN_CHECKED = i18n.translate(
|
||||
'ecsDataQualityDashboard.summaryTable.thisIndexHasNotBeenCheckedTooltip',
|
||||
{
|
||||
defaultMessage: 'This index has not been checked',
|
||||
}
|
||||
);
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const INCOMPATIBLE_FIELD_MAPPINGS_TABLE_TITLE = (indexName: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.incompatibleTab.incompatibleFieldMappingsTableTitle', {
|
||||
values: { indexName },
|
||||
defaultMessage: 'Incompatible field mappings - {indexName}',
|
||||
});
|
||||
|
||||
export const INCOMPATIBLE_FIELD_VALUES_TABLE_TITLE = (indexName: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.incompatibleTab.incompatibleFieldValuesTableTitle', {
|
||||
values: { indexName },
|
||||
defaultMessage: 'Incompatible field values - {indexName}',
|
||||
});
|
|
@ -1,62 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const BODY = i18n.translate('ecsDataQualityDashboard.ilmPhasesEmptyPromptBody', {
|
||||
defaultMessage:
|
||||
'Indices with these Index Lifecycle Management (ILM) phases will be checked for data quality',
|
||||
});
|
||||
|
||||
export const COLD = i18n.translate('ecsDataQualityDashboard.ilmPhasesEmptyPromptColdLabel', {
|
||||
defaultMessage: 'cold',
|
||||
});
|
||||
|
||||
export const FROZEN = i18n.translate('ecsDataQualityDashboard.ilmPhasesEmptyPromptFrozenLabel', {
|
||||
defaultMessage: 'frozen',
|
||||
});
|
||||
|
||||
export const HOT = i18n.translate('ecsDataQualityDashboard.ilmPhasesEmptyPromptHotLabel', {
|
||||
defaultMessage: 'hot',
|
||||
});
|
||||
|
||||
export const ILM_PHASES_THAT_CAN_BE_CHECKED = i18n.translate(
|
||||
'ecsDataQualityDashboard.ilmPhasesEmptyPromptIlmPhasesThatCanBeCheckedSubtitle',
|
||||
{
|
||||
defaultMessage: 'ILM phases that can be checked for data quality',
|
||||
}
|
||||
);
|
||||
|
||||
export const ILM_PHASES_THAT_CANNOT_BE_CHECKED = i18n.translate(
|
||||
'ecsDataQualityDashboard.ilmPhasesEmptyPromptIlmPhasesThatCannotBeCheckedSubtitle',
|
||||
{
|
||||
defaultMessage: 'ILM phases that cannot be checked',
|
||||
}
|
||||
);
|
||||
|
||||
export const THE_FOLLOWING_ILM_PHASES = i18n.translate(
|
||||
'ecsDataQualityDashboard.ilmPhasesEmptyPromptITheFollowingIlmPhasesLabel',
|
||||
{
|
||||
defaultMessage:
|
||||
'The following ILM phases cannot be checked for data quality because they are slower to access',
|
||||
}
|
||||
);
|
||||
|
||||
export const UNMANAGED = i18n.translate(
|
||||
'ecsDataQualityDashboard.ilmPhasesEmptyPromptUnmanagedLabel',
|
||||
{
|
||||
defaultMessage: 'unmanaged',
|
||||
}
|
||||
);
|
||||
|
||||
export const WARM = i18n.translate('ecsDataQualityDashboard.ilmPhasesEmptyPromptWarmLabel', {
|
||||
defaultMessage: 'warm',
|
||||
});
|
||||
|
||||
export const TITLE = i18n.translate('ecsDataQualityDashboard.ilmPhasesEmptyPromptTitle', {
|
||||
defaultMessage: 'Select one or more ILM phases',
|
||||
});
|
|
@ -1,240 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const ADD_TO_NEW_CASE = i18n.translate('ecsDataQualityDashboard.addToNewCaseButton', {
|
||||
defaultMessage: 'Add to new case',
|
||||
});
|
||||
|
||||
export const CANCEL = i18n.translate('ecsDataQualityDashboard.cancelButton', {
|
||||
defaultMessage: 'Cancel',
|
||||
});
|
||||
|
||||
export const CHECK_ALL = i18n.translate('ecsDataQualityDashboard.checkAllButton', {
|
||||
defaultMessage: 'Check all',
|
||||
});
|
||||
|
||||
export const CHECKING = (index: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.checkingLabel', {
|
||||
values: { index },
|
||||
defaultMessage: 'Checking {index}',
|
||||
});
|
||||
|
||||
export const COLD_DESCRIPTION = i18n.translate('ecsDataQualityDashboard.coldDescription', {
|
||||
defaultMessage:
|
||||
'The index is no longer being updated and is queried infrequently. The information still needs to be searchable, but it’s okay if those queries are slower.',
|
||||
});
|
||||
|
||||
export const COLD_PATTERN_TOOLTIP = ({ indices, pattern }: { indices: number; pattern: string }) =>
|
||||
i18n.translate('ecsDataQualityDashboard.coldPatternTooltip', {
|
||||
values: { indices, pattern },
|
||||
defaultMessage:
|
||||
'{indices} {indices, plural, =1 {index} other {indices}} matching the {pattern} pattern {indices, plural, =1 {is} other {are}} cold. Cold indices are no longer being updated and are queried infrequently. The information still needs to be searchable, but it’s okay if those queries are slower.',
|
||||
});
|
||||
|
||||
export const COPIED_RESULTS_TOAST_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.toasts.copiedResultsToastTitle',
|
||||
{
|
||||
defaultMessage: 'Copied results to the clipboard',
|
||||
}
|
||||
);
|
||||
|
||||
export const COPY_TO_CLIPBOARD = i18n.translate('ecsDataQualityDashboard.copyToClipboardButton', {
|
||||
defaultMessage: 'Copy to clipboard',
|
||||
});
|
||||
|
||||
/** The subtitle displayed on the Data Quality dashboard */
|
||||
export const DATA_QUALITY_SUBTITLE: string = i18n.translate(
|
||||
'ecsDataQualityDashboard.ecsDataQualityDashboardSubtitle',
|
||||
{
|
||||
defaultMessage: 'Check index mappings and values for compatibility with the',
|
||||
}
|
||||
);
|
||||
|
||||
export const DATA_QUALITY_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.ecsDataQualityDashboardTitle',
|
||||
{
|
||||
defaultMessage: 'Data quality',
|
||||
}
|
||||
);
|
||||
|
||||
export const DEFAULT_PANEL_TITLE = i18n.translate('ecsDataQualityDashboard.defaultPanelTitle', {
|
||||
defaultMessage: 'Check index mappings',
|
||||
});
|
||||
|
||||
export const ECS_VERSION = i18n.translate('ecsDataQualityDashboard.ecsVersionStat', {
|
||||
defaultMessage: 'ECS version',
|
||||
});
|
||||
|
||||
export const ERROR_LOADING_ECS_METADATA_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.emptyErrorPrompt.errorLoadingEcsMetadataTitle',
|
||||
{
|
||||
defaultMessage: 'Unable to load ECS metadata',
|
||||
}
|
||||
);
|
||||
|
||||
export const ERROR_LOADING_ECS_VERSION_TITLE = i18n.translate(
|
||||
'ecsDataQualityDashboard.emptyErrorPrompt.errorLoadingEcsVersionTitle',
|
||||
{
|
||||
defaultMessage: 'Unable to load ECS version',
|
||||
}
|
||||
);
|
||||
|
||||
export const ERROR_LOADING_ILM_EXPLAIN = (details: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.errorLoadingIlmExplainLabel', {
|
||||
values: { details },
|
||||
defaultMessage: 'Error loading ILM Explain: {details}',
|
||||
});
|
||||
|
||||
export const ERROR_LOADING_MAPPINGS = ({
|
||||
details,
|
||||
patternOrIndexName,
|
||||
}: {
|
||||
details: string;
|
||||
patternOrIndexName: string;
|
||||
}) =>
|
||||
i18n.translate('ecsDataQualityDashboard.errorLoadingMappingsLabel', {
|
||||
values: { details, patternOrIndexName },
|
||||
defaultMessage: 'Error loading mappings for {patternOrIndexName}: {details}',
|
||||
});
|
||||
|
||||
export const ERROR_LOADING_STATS = (details: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.errorLoadingStatsLabel', {
|
||||
values: { details },
|
||||
defaultMessage: 'Error loading stats: {details}',
|
||||
});
|
||||
|
||||
export const ERROR_LOADING_UNALLOWED_VALUES = ({
|
||||
details,
|
||||
indexName,
|
||||
}: {
|
||||
details: string;
|
||||
indexName: string;
|
||||
}) =>
|
||||
i18n.translate('ecsDataQualityDashboard.errorLoadingUnallowedValuesLabel', {
|
||||
values: { details, indexName },
|
||||
defaultMessage: 'Error loading unallowed values for index {indexName}: {details}',
|
||||
});
|
||||
|
||||
export const FIELDS = i18n.translate('ecsDataQualityDashboard.fieldsLabel', {
|
||||
defaultMessage: 'Fields',
|
||||
});
|
||||
|
||||
export const FROZEN_DESCRIPTION = i18n.translate('ecsDataQualityDashboard.frozenDescription', {
|
||||
defaultMessage: `The index is no longer being updated and is queried rarely. The information still needs to be searchable, but it's okay if those queries are extremely slow.`,
|
||||
});
|
||||
|
||||
export const FROZEN_PATTERN_TOOLTIP = ({
|
||||
indices,
|
||||
pattern,
|
||||
}: {
|
||||
indices: number;
|
||||
pattern: string;
|
||||
}) =>
|
||||
i18n.translate('ecsDataQualityDashboard.frozenPatternTooltip', {
|
||||
values: { indices, pattern },
|
||||
defaultMessage: `{indices} {indices, plural, =1 {index} other {indices}} matching the {pattern} pattern {indices, plural, =1 {is} other {are}} frozen. Frozen indices are no longer being updated and are queried rarely. The information still needs to be searchable, but it's okay if those queries are extremely slow.`,
|
||||
});
|
||||
|
||||
export const HOT_DESCRIPTION = i18n.translate('ecsDataQualityDashboard.hotDescription', {
|
||||
defaultMessage: 'The index is actively being updated and queried',
|
||||
});
|
||||
|
||||
export const HOT_PATTERN_TOOLTIP = ({ indices, pattern }: { indices: number; pattern: string }) =>
|
||||
i18n.translate('ecsDataQualityDashboard.hotPatternTooltip', {
|
||||
values: { indices, pattern },
|
||||
defaultMessage:
|
||||
'{indices} {indices, plural, =1 {index} other {indices}} matching the {pattern} pattern {indices, plural, =1 {is} other {are}} hot. Hot indices are actively being updated and queried.',
|
||||
});
|
||||
|
||||
/** The tooltip for the `ILM phase` combo box on the Data Quality Dashboard */
|
||||
export const INDEX_LIFECYCLE_MANAGEMENT_PHASES: string = i18n.translate(
|
||||
'ecsDataQualityDashboard.indexLifecycleManagementPhasesTooltip',
|
||||
{
|
||||
defaultMessage:
|
||||
'Indices with these Index Lifecycle Management (ILM) phases will be checked for data quality',
|
||||
}
|
||||
);
|
||||
|
||||
export const INDEX_NAME = i18n.translate('ecsDataQualityDashboard.indexNameLabel', {
|
||||
defaultMessage: 'Index name',
|
||||
});
|
||||
|
||||
/** The label displayed for the `ILM phase` combo box on the Data Quality dashboard */
|
||||
export const ILM_PHASE: string = i18n.translate('ecsDataQualityDashboard.ilmPhaseLabel', {
|
||||
defaultMessage: 'ILM phase',
|
||||
});
|
||||
|
||||
export const LAST_CHECKED = i18n.translate('ecsDataQualityDashboard.lastCheckedLabel', {
|
||||
defaultMessage: 'Last checked',
|
||||
});
|
||||
|
||||
export const LOADING_ECS_METADATA = i18n.translate(
|
||||
'ecsDataQualityDashboard.emptyLoadingPrompt.loadingEcsMetadataPrompt',
|
||||
{
|
||||
defaultMessage: 'Loading ECS metadata',
|
||||
}
|
||||
);
|
||||
|
||||
export const SELECT_AN_INDEX = i18n.translate('ecsDataQualityDashboard.selectAnIndexPrompt', {
|
||||
defaultMessage: 'Select an index to compare it against ECS version',
|
||||
});
|
||||
|
||||
/** The placeholder for the `ILM phase` combo box on the Data Quality Dashboard */
|
||||
export const SELECT_ONE_OR_MORE_ILM_PHASES: string = i18n.translate(
|
||||
'ecsDataQualityDashboard.selectOneOrMorPhasesPlaceholder',
|
||||
{
|
||||
defaultMessage: 'Select one or more ILM phases',
|
||||
}
|
||||
);
|
||||
|
||||
export const INDEX_SIZE_TOOLTIP = i18n.translate('ecsDataQualityDashboard.indexSizeTooltip', {
|
||||
defaultMessage: 'The size of the primary index (does not include replicas)',
|
||||
});
|
||||
|
||||
export const TECHNICAL_PREVIEW = i18n.translate('ecsDataQualityDashboard.technicalPreviewBadge', {
|
||||
defaultMessage: 'Technical preview',
|
||||
});
|
||||
|
||||
export const TIMESTAMP_DESCRIPTION = i18n.translate(
|
||||
'ecsDataQualityDashboard.timestampDescriptionLabel',
|
||||
{
|
||||
defaultMessage:
|
||||
'Date/time when the event originated. This is the date/time extracted from the event, typically representing when the event was generated by the source. If the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline. Required field for all events.',
|
||||
}
|
||||
);
|
||||
|
||||
export const UNMANAGED_DESCRIPTION = i18n.translate(
|
||||
'ecsDataQualityDashboard.unmanagedDescription',
|
||||
{
|
||||
defaultMessage: `The index isn't managed by Index Lifecycle Management (ILM)`,
|
||||
}
|
||||
);
|
||||
|
||||
export const UNMANAGED_PATTERN_TOOLTIP = ({
|
||||
indices,
|
||||
pattern,
|
||||
}: {
|
||||
indices: number;
|
||||
pattern: string;
|
||||
}) =>
|
||||
i18n.translate('ecsDataQualityDashboard.unmanagedPatternTooltip', {
|
||||
values: { indices, pattern },
|
||||
defaultMessage: `{indices} {indices, plural, =1 {index} other {indices}} matching the {pattern} pattern {indices, plural, =1 {is} other {are}} unmanaged by Index Lifecycle Management (ILM)`,
|
||||
});
|
||||
|
||||
export const WARM_DESCRIPTION = i18n.translate('ecsDataQualityDashboard.warmDescription', {
|
||||
defaultMessage: 'The index is no longer being updated but is still being queried',
|
||||
});
|
||||
|
||||
export const WARM_PATTERN_TOOLTIP = ({ indices, pattern }: { indices: number; pattern: string }) =>
|
||||
i18n.translate('ecsDataQualityDashboard.warmPatternTooltip', {
|
||||
values: { indices, pattern },
|
||||
defaultMessage:
|
||||
'{indices} {indices, plural, =1 {index} other {indices}} matching the {pattern} pattern {indices, plural, =1 {is} other {are}} warm. Warm indices are no longer being updated but are still being queried.',
|
||||
});
|
|
@ -1,25 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const ADD_TO_CASE_SUCCESS = i18n.translate('ecsDataQualityDashboard.addToCaseSuccessToast', {
|
||||
defaultMessage: 'Successfully added data quality results to the case',
|
||||
});
|
||||
|
||||
export const CREATE_A_DATA_QUALITY_CASE = i18n.translate(
|
||||
'ecsDataQualityDashboard.createADataQualityCaseHeaderText',
|
||||
{
|
||||
defaultMessage: 'Create a data quality case',
|
||||
}
|
||||
);
|
||||
|
||||
export const CREATE_A_DATA_QUALITY_CASE_FOR_INDEX = (indexName: string) =>
|
||||
i18n.translate('ecsDataQualityDashboard.createADataQualityCaseForIndexHeaderText', {
|
||||
values: { indexName },
|
||||
defaultMessage: 'Create a data quality case for index {indexName}',
|
||||
});
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
coverageDirectory:
|
||||
'<rootDir>/target/kibana-coverage/jest/x-pack/packages/kbn-ecs-data-quality-dashboard/impl',
|
||||
coverageReporters: ['text', 'html'],
|
||||
collectCoverageFrom: [
|
||||
'<rootDir>/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/**/*.{ts,tsx}',
|
||||
'!<rootDir>/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/{__test__,__snapshots__,__examples__,*mock*,tests,test_helpers,integration_tests,types}/**/*',
|
||||
'!<rootDir>/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/*mock*.{ts,tsx}',
|
||||
'!<rootDir>/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/*.test.{ts,tsx}',
|
||||
'!<rootDir>/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/*.d.ts',
|
||||
'!<rootDir>/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/*.config.ts',
|
||||
],
|
||||
preset: '@kbn/test',
|
||||
rootDir: '../../..',
|
||||
roots: ['<rootDir>/x-pack/packages/kbn-ecs-data-quality-dashboard'],
|
||||
setupFilesAfterEnv: ['<rootDir>/x-pack/packages/kbn-ecs-data-quality-dashboard/setup_tests.ts'],
|
||||
};
|
|
@ -154,7 +154,7 @@ const eventRenderedViewColumns: ColumnHeaderOptions[] = [
|
|||
columnHeaderType: defaultColumnHeaderType,
|
||||
id: '@timestamp',
|
||||
displayAsText: i18n.translate(
|
||||
'securitySolutionDataTable.EventRenderedView.timestampTitle.column',
|
||||
'securitySolutionPackages.dataTable.eventRenderedView.timestampTitle.column',
|
||||
{
|
||||
defaultMessage: 'Timestamp',
|
||||
}
|
||||
|
@ -166,9 +166,12 @@ const eventRenderedViewColumns: ColumnHeaderOptions[] = [
|
|||
},
|
||||
{
|
||||
columnHeaderType: defaultColumnHeaderType,
|
||||
displayAsText: i18n.translate('securitySolutionDataTable.EventRenderedView.ruleTitle.column', {
|
||||
defaultMessage: 'Rule',
|
||||
}),
|
||||
displayAsText: i18n.translate(
|
||||
'securitySolutionPackages.dataTable.eventRenderedView.ruleTitle.column',
|
||||
{
|
||||
defaultMessage: 'Rule',
|
||||
}
|
||||
),
|
||||
id: 'kibana.alert.rule.name',
|
||||
initialWidth: DEFAULT_TABLE_COLUMN_MIN_WIDTH + 50,
|
||||
linkField: 'kibana.alert.rule.uuid',
|
||||
|
@ -180,7 +183,7 @@ const eventRenderedViewColumns: ColumnHeaderOptions[] = [
|
|||
columnHeaderType: defaultColumnHeaderType,
|
||||
id: 'eventSummary',
|
||||
displayAsText: i18n.translate(
|
||||
'securitySolutionDataTable.EventRenderedView.eventSummary.column',
|
||||
'securitySolutionPackages.dataTable.eventRenderedView.eventSummary.column',
|
||||
{
|
||||
defaultMessage: 'Event Summary',
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const REMOVE_COLUMN = i18n.translate(
|
||||
'securitySolutionDataTable.columnHeaders.flyout.pane.removeColumnButtonLabel',
|
||||
'securitySolutionPackages.dataTable.columnHeaders.flyout.pane.removeColumnButtonLabel',
|
||||
{
|
||||
defaultMessage: 'Remove column',
|
||||
}
|
|
@ -15,7 +15,6 @@ import { DragDropContext, DropResult, ResponderProvided } from 'react-beautiful-
|
|||
import { ThemeProvider } from 'styled-components';
|
||||
import { Provider as ReduxStoreProvider } from 'react-redux';
|
||||
import { euiDarkVars } from '@kbn/ui-theme';
|
||||
import { Store } from 'redux';
|
||||
import { createStore as createReduxStore } from 'redux';
|
||||
import type { Action } from '@kbn/ui-actions-plugin/public';
|
||||
import { EuiButtonEmpty } from '@elastic/eui';
|
||||
|
@ -26,15 +25,14 @@ import { mockTimelineData } from '../../mock/mock_timeline_data';
|
|||
import { DataTableComponent } from '.';
|
||||
|
||||
export default {
|
||||
component: DataTableComponent,
|
||||
title: 'DataTableComponent',
|
||||
title: 'DataTable',
|
||||
description: 'Table component for displaying events data in a grid view',
|
||||
};
|
||||
|
||||
const createStore = (state: any) => createReduxStore(() => state, state);
|
||||
const createStore = (state: unknown) => createReduxStore(() => state, state);
|
||||
|
||||
interface Props {
|
||||
children?: React.ReactNode;
|
||||
store?: Store;
|
||||
onDragEnd?: (result: DropResult, provided: ResponderProvided) => void;
|
||||
cellActions?: Action[];
|
||||
}
|
||||
|
@ -76,12 +74,12 @@ const MockFieldBrowser = () => {
|
|||
size="xs"
|
||||
onClick={() => window.alert('Not implemented')}
|
||||
>
|
||||
Field Browser
|
||||
{'Field Browser'}
|
||||
</EuiButtonEmpty>
|
||||
);
|
||||
};
|
||||
|
||||
export function Example() {
|
||||
export const DataTable = () => {
|
||||
return (
|
||||
<StoryProviders>
|
||||
<DataTableComponent
|
||||
|
@ -104,4 +102,4 @@ export function Example() {
|
|||
/>
|
||||
</StoryProviders>
|
||||
);
|
||||
}
|
||||
};
|
|
@ -52,7 +52,7 @@ import { UnitCount } from '../toolbar/unit';
|
|||
import { useShallowEqualSelector } from '../../hooks/use_selector';
|
||||
import { tableDefaults } from '../../store/data_table/defaults';
|
||||
|
||||
const DATA_TABLE_ARIA_LABEL = i18n.translate('securitySolutionDataTable.dataTable.ariaLabel', {
|
||||
const DATA_TABLE_ARIA_LABEL = i18n.translate('securitySolutionPackages.dataTable.ariaLabel', {
|
||||
defaultMessage: 'Alerts',
|
||||
});
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const ALERTS_UNIT = (totalCount: number) =>
|
||||
i18n.translate('securitySolutionDataTable.eventsTab.unit', {
|
||||
i18n.translate('securitySolutionPackages.dataTable.eventsTab.unit', {
|
||||
values: { totalCount },
|
||||
defaultMessage: `{totalCount, plural, =1 {alert} other {alerts}}`,
|
||||
});
|
|
@ -7,6 +7,6 @@
|
|||
|
||||
module.exports = {
|
||||
preset: '@kbn/test',
|
||||
roots: ['<rootDir>/x-pack/packages/kbn-securitysolution-data-table'],
|
||||
rootDir: '../../..',
|
||||
roots: ['<rootDir>/x-pack/packages/security-solution/data_table'],
|
||||
rootDir: '../../../..',
|
||||
};
|
|
@ -9,7 +9,7 @@ import { TableId } from '../common/types';
|
|||
import { defaultHeaders } from './header';
|
||||
|
||||
// FIXME add strong typings
|
||||
export const mockGlobalState: any = {
|
||||
export const mockGlobalState = {
|
||||
app: {
|
||||
notesById: {},
|
||||
errors: [
|
|
@ -36,6 +36,7 @@ Object.defineProperty(window, 'localStorage', {
|
|||
});
|
||||
window.scrollTo = jest.fn();
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const createStore = (state: any) => createReduxStore(() => {}, state);
|
||||
|
||||
/** A utility for wrapping children in the providers required to run most tests */
|
|
@ -14,11 +14,12 @@ import {
|
|||
import { mockGlobalState } from '../../mock/global_state';
|
||||
import { SortColumnTable, TableId } from '../../common/types';
|
||||
import type { DataTableModelSettings } from './model';
|
||||
import type { TableById } from './types';
|
||||
|
||||
const id = 'foo';
|
||||
const defaultTableById = {
|
||||
...mockGlobalState.dataTable.tableById,
|
||||
};
|
||||
} as unknown as TableById;
|
||||
|
||||
describe('setInitializeDataTableSettings', () => {
|
||||
test('it returns the expected sort when dataTableSettingsProps has an override', () => {
|
||||
|
@ -68,7 +69,7 @@ describe('setInitializeDataTableSettings', () => {
|
|||
|
||||
describe('updateDataTableColumnOrder', () => {
|
||||
test('it returns the columns in the new expected order', () => {
|
||||
const originalIdOrder = defaultTableById[TableId.test].columns.map((x: any) => x.id); // ['@timestamp', 'event.severity', 'event.category', '...']
|
||||
const originalIdOrder = defaultTableById[TableId.test].columns.map((x) => x.id); // ['@timestamp', 'event.severity', 'event.category', '...']
|
||||
|
||||
// the new order swaps the positions of the first and second columns:
|
||||
const newIdOrder = [originalIdOrder[1], originalIdOrder[0], ...originalIdOrder.slice(2)]; // ['event.severity', '@timestamp', 'event.category', '...']
|
||||
|
@ -93,7 +94,7 @@ describe('updateDataTableColumnOrder', () => {
|
|||
});
|
||||
|
||||
test('it omits unknown column IDs when re-ordering columns', () => {
|
||||
const originalIdOrder = defaultTableById[TableId.test].columns.map((x: any) => x.id); // ['@timestamp', 'event.severity', 'event.category', '...']
|
||||
const originalIdOrder = defaultTableById[TableId.test].columns.map((x) => x.id); // ['@timestamp', 'event.severity', 'event.category', '...']
|
||||
const unknownColumId = 'does.not.exist';
|
||||
const newIdOrder = [originalIdOrder[0], unknownColumId, ...originalIdOrder.slice(1)]; // ['@timestamp', 'does.not.exist', 'event.severity', 'event.category', '...']
|
||||
|
|
@ -9,8 +9,12 @@ import type { EuiDataGridColumn } from '@elastic/eui';
|
|||
import type { Filter } from '@kbn/es-query';
|
||||
import { TimelineNonEcsData } from '@kbn/timelines-plugin/common';
|
||||
import { ExpandedDetail } from '../../common/types/detail_panel';
|
||||
import { ColumnHeaderOptions, SessionViewConfig, SortColumnTable } from '../../common/types';
|
||||
import { ViewSelection } from '../../common/types';
|
||||
import type {
|
||||
ColumnHeaderOptions,
|
||||
SessionViewConfig,
|
||||
SortColumnTable,
|
||||
ViewSelection,
|
||||
} from '../../common/types';
|
||||
|
||||
export interface DataTableModelSettings {
|
||||
defaultColumns: Array<
|
|
@ -8,14 +8,14 @@
|
|||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const LOADING_EVENTS = i18n.translate(
|
||||
'securitySolutionDataTable.dataTable.loadingEventsDataLabel',
|
||||
'securitySolutionPackages.dataTable.loadingEventsDataLabel',
|
||||
{
|
||||
defaultMessage: 'Loading Events',
|
||||
}
|
||||
);
|
||||
|
||||
export const UNIT = (totalCount: number) =>
|
||||
i18n.translate('securitySolutionDataTable.dataTable.unit', {
|
||||
i18n.translate('securitySolutionPackages.dataTable.unit', {
|
||||
values: { totalCount },
|
||||
defaultMessage: `{totalCount, plural, =1 {alert} other {alerts}}`,
|
||||
});
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "target/types",
|
||||
"types": ["jest", "node", "react"]
|
|
@ -8,7 +8,9 @@
|
|||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { mount } from 'enzyme';
|
||||
|
||||
type WrapperOf<F extends (...args: any) => any> = (...args: Parameters<F>) => ReturnType<F>;
|
||||
type WrapperOf<F extends (...args: Parameters<F>) => ReturnType<F>> = (
|
||||
...args: Parameters<F>
|
||||
) => ReturnType<F>;
|
||||
export type MountAppended = WrapperOf<typeof mount>;
|
||||
|
||||
export const useMountAppended = () => {
|
|
@ -8,67 +8,70 @@
|
|||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const ECS_VALUES = i18n.translate(
|
||||
'ecsDataQualityDashboard.compareFieldsTable.ecsValuesColumn',
|
||||
'securitySolutionPackages.ecsDataQualityDashboard.compareFieldsTable.ecsValuesColumn',
|
||||
{
|
||||
defaultMessage: 'ECS values',
|
||||
}
|
||||
);
|
||||
|
||||
export const ECS_VALUES_EXPECTED = i18n.translate(
|
||||
'ecsDataQualityDashboard.compareFieldsTable.ecsValuesExpectedColumn',
|
||||
'securitySolutionPackages.ecsDataQualityDashboard.compareFieldsTable.ecsValuesExpectedColumn',
|
||||
{
|
||||
defaultMessage: 'ECS values (expected)',
|
||||
}
|
||||
);
|
||||
|
||||
export const ECS_DESCRIPTION = i18n.translate(
|
||||
'ecsDataQualityDashboard.compareFieldsTable.ecsDescriptionColumn',
|
||||
'securitySolutionPackages.ecsDataQualityDashboard.compareFieldsTable.ecsDescriptionColumn',
|
||||
{
|
||||
defaultMessage: 'ECS description',
|
||||
}
|
||||
);
|
||||
|
||||
export const ECS_MAPPING_TYPE = i18n.translate(
|
||||
'ecsDataQualityDashboard.compareFieldsTable.ecsMappingTypeColumn',
|
||||
'securitySolutionPackages.ecsDataQualityDashboard.compareFieldsTable.ecsMappingTypeColumn',
|
||||
{
|
||||
defaultMessage: 'ECS mapping type',
|
||||
}
|
||||
);
|
||||
|
||||
export const ECS_MAPPING_TYPE_EXPECTED = i18n.translate(
|
||||
'ecsDataQualityDashboard.compareFieldsTable.ecsMappingTypeExpectedColumn',
|
||||
'securitySolutionPackages.ecsDataQualityDashboard.compareFieldsTable.ecsMappingTypeExpectedColumn',
|
||||
{
|
||||
defaultMessage: 'ECS mapping type (expected)',
|
||||
}
|
||||
);
|
||||
|
||||
export const DOCUMENT_VALUES_ACTUAL = i18n.translate(
|
||||
'ecsDataQualityDashboard.compareFieldsTable.documentValuesActualColumn',
|
||||
'securitySolutionPackages.ecsDataQualityDashboard.compareFieldsTable.documentValuesActualColumn',
|
||||
{
|
||||
defaultMessage: 'Document values (actual)',
|
||||
}
|
||||
);
|
||||
|
||||
export const INDEX_MAPPING_TYPE = i18n.translate(
|
||||
'ecsDataQualityDashboard.compareFieldsTable.indexMappingTypeColumn',
|
||||
'securitySolutionPackages.ecsDataQualityDashboard.compareFieldsTable.indexMappingTypeColumn',
|
||||
{
|
||||
defaultMessage: 'Index mapping type',
|
||||
}
|
||||
);
|
||||
|
||||
export const INDEX_MAPPING_TYPE_ACTUAL = i18n.translate(
|
||||
'ecsDataQualityDashboard.compareFieldsTable.indexMappingTypeActualColumn',
|
||||
'securitySolutionPackages.ecsDataQualityDashboard.compareFieldsTable.indexMappingTypeActualColumn',
|
||||
{
|
||||
defaultMessage: 'Index mapping type (actual)',
|
||||
}
|
||||
);
|
||||
|
||||
export const FIELD = i18n.translate('ecsDataQualityDashboard.compareFieldsTable.fieldColumn', {
|
||||
defaultMessage: 'Field',
|
||||
});
|
||||
export const FIELD = i18n.translate(
|
||||
'securitySolutionPackages.ecsDataQualityDashboard.compareFieldsTable.fieldColumn',
|
||||
{
|
||||
defaultMessage: 'Field',
|
||||
}
|
||||
);
|
||||
|
||||
export const SEARCH_FIELDS = i18n.translate(
|
||||
'ecsDataQualityDashboard.compareFieldsTable.searchFieldsPlaceholder',
|
||||
'securitySolutionPackages.ecsDataQualityDashboard.compareFieldsTable.searchFieldsPlaceholder',
|
||||
{
|
||||
defaultMessage: 'Search fields',
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue