From 7df924f828272554f662aa3b97ce2d7f7905f6c1 Mon Sep 17 00:00:00 2001
From: Katrin Freihofner
Date: Tue, 22 Jun 2021 09:31:15 +0200
Subject: [PATCH 01/63] Wording update for case settings, fixes #102462
(#102496)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
---
.../public/components/configure_cases/translations.ts | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/x-pack/plugins/cases/public/components/configure_cases/translations.ts b/x-pack/plugins/cases/public/components/configure_cases/translations.ts
index 1a60521667bba..ca41db577700e 100644
--- a/x-pack/plugins/cases/public/components/configure_cases/translations.ts
+++ b/x-pack/plugins/cases/public/components/configure_cases/translations.ts
@@ -12,7 +12,7 @@ export * from '../../common/translations';
export const INCIDENT_MANAGEMENT_SYSTEM_TITLE = i18n.translate(
'xpack.cases.configureCases.incidentManagementSystemTitle',
{
- defaultMessage: 'Connect to external incident management system',
+ defaultMessage: 'External incident management system',
}
);
@@ -20,7 +20,7 @@ export const INCIDENT_MANAGEMENT_SYSTEM_DESC = i18n.translate(
'xpack.cases.configureCases.incidentManagementSystemDesc',
{
defaultMessage:
- 'You may optionally connect cases to an external incident management system of your choosing. This will allow you to push case data as an incident in your chosen third-party system.',
+ 'Connect your cases to an external incident management system. You can then push case data as an incident in a third-party system.',
}
);
@@ -38,7 +38,7 @@ export const ADD_NEW_CONNECTOR = i18n.translate('xpack.cases.configureCases.addN
export const CASE_CLOSURE_OPTIONS_TITLE = i18n.translate(
'xpack.cases.configureCases.caseClosureOptionsTitle',
{
- defaultMessage: 'Case Closures',
+ defaultMessage: 'Case closures',
}
);
@@ -46,14 +46,14 @@ export const CASE_CLOSURE_OPTIONS_DESC = i18n.translate(
'xpack.cases.configureCases.caseClosureOptionsDesc',
{
defaultMessage:
- 'Define how you wish cases to be closed. Automated case closures require an established connection to an external incident management system.',
+ 'Define how to close your cases. Automatic closures require an established connection to an external incident management system.',
}
);
export const CASE_CLOSURE_OPTIONS_SUB_CASES = i18n.translate(
'xpack.cases.configureCases.caseClosureOptionsSubCases',
{
- defaultMessage: 'Automated closures of sub-cases is not currently supported.',
+ defaultMessage: 'Automatic closure of sub-cases is not supported.',
}
);
From 1ea35069c08938027567ecb360ea0730efbfa42a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20S=C3=A1nchez?=
Date: Tue, 22 Jun 2021 09:47:05 +0200
Subject: [PATCH 02/63] [Security solution][Endpoint] Removes 'none'
compression as it not used anymore (#102767)
* Removes 'none' compression as it not used anymore
* Revert type because none type is needed for the first time the artifact is created befor the compression
---
.../services/artifacts/manifest_manager/manifest_manager.ts | 1 -
1 file changed, 1 deletion(-)
diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts
index 27108a03f3403..f2d1d3660d78e 100644
--- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts
+++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts
@@ -380,7 +380,6 @@ export class ManifestManager {
for (const result of results) {
await iterateArtifactsBuildResult(result, async (artifact, policyId) => {
const artifactToAdd = baselineManifest.getArtifact(getArtifactId(artifact)) || artifact;
- artifactToAdd.compressionAlgorithm = 'none';
if (!internalArtifactCompleteSchema.is(artifactToAdd)) {
throw new Error(`Incomplete artifact detected: ${getArtifactId(artifactToAdd)}`);
}
From 62fc27bf5583c5d87af202b1cff8479335ec6545 Mon Sep 17 00:00:00 2001
From: Joe Reuter
Date: Tue, 22 Jun 2021 09:59:36 +0200
Subject: [PATCH 03/63] unksip functional test (#102633)
---
test/functional/page_objects/time_to_visualize_page.ts | 5 ++++-
x-pack/test/functional/apps/lens/add_to_dashboard.ts | 3 +--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/test/functional/page_objects/time_to_visualize_page.ts b/test/functional/page_objects/time_to_visualize_page.ts
index 287b03ec60d88..57a22103f6409 100644
--- a/test/functional/page_objects/time_to_visualize_page.ts
+++ b/test/functional/page_objects/time_to_visualize_page.ts
@@ -51,7 +51,10 @@ export class TimeToVisualizePageObject extends FtrService {
vizName: string,
{ saveAsNew, redirectToOrigin, addToDashboard, dashboardId, saveToLibrary }: SaveModalArgs = {}
) {
- await this.testSubjects.setValue('savedObjectTitle', vizName);
+ await this.testSubjects.setValue('savedObjectTitle', vizName, {
+ typeCharByChar: true,
+ clearWithKeyboard: true,
+ });
const hasSaveAsNew = await this.testSubjects.exists('saveAsNewCheckbox');
if (hasSaveAsNew && saveAsNew !== undefined) {
diff --git a/x-pack/test/functional/apps/lens/add_to_dashboard.ts b/x-pack/test/functional/apps/lens/add_to_dashboard.ts
index 61b0c63d226fa..5e51573e32503 100644
--- a/x-pack/test/functional/apps/lens/add_to_dashboard.ts
+++ b/x-pack/test/functional/apps/lens/add_to_dashboard.ts
@@ -62,8 +62,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.lens.assertMetric('Maximum of bytes', '19,986');
};
- // flaky https://github.com/elastic/kibana/issues/102332
- describe.skip('lens add-to-dashboards tests', () => {
+ describe('lens add-to-dashboards tests', () => {
it('should allow new lens to be added by value to a new dashboard', async () => {
await createNewLens();
await PageObjects.lens.save('New Lens from Modal', false, false, false, 'new');
From 38604863e593e9c7aa239d077a1317709ac50131 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Casper=20H=C3=BCbertz?=
Date: Tue, 22 Jun 2021 10:07:20 +0200
Subject: [PATCH 04/63] [Metrics] Update ActionsMenu create alert styles
(#102316)
* [Metrics] Add divider in the actions menu
* [Metrics] Add color and icon to the alert link
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
---
.../inventory_view/components/waffle/node_context_menu.tsx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node_context_menu.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node_context_menu.tsx
index 94b16448a6b61..ea80bd13e8a4d 100644
--- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node_context_menu.tsx
+++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node_context_menu.tsx
@@ -25,6 +25,7 @@ import {
SectionSubtitle,
SectionLinks,
SectionLink,
+ ActionMenuDivider,
} from '../../../../../../../observability/public';
import { useLinkProps } from '../../../../../hooks/use_link_props';
@@ -173,7 +174,10 @@ export const NodeContextMenu: React.FC = withTheme
-
+
+
+
+
From df8637ae47747091d6e1ae2caafadc8fe69f913c Mon Sep 17 00:00:00 2001
From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com>
Date: Tue, 22 Jun 2021 12:30:05 +0200
Subject: [PATCH 05/63] Fix UBI source URL (#102736)
* Fix UBI source URL
This commit fix the source URL for UBI image to ensure that it stays
consistent with the URL generated in
https://artifacts.elastic.co/reports/dependencies/dependencies-current.html
* Update src/dev/run_licenses_csv_report.js
Co-authored-by: Jonathan Budzenski
* Update src/dev/run_licenses_csv_report.js
Co-authored-by: Jonathan Budzenski
* try to make eslint happy
Co-authored-by: Jonathan Budzenski
---
src/dev/run_licenses_csv_report.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/dev/run_licenses_csv_report.js b/src/dev/run_licenses_csv_report.js
index 8a612c9e3d878..1923eddff33e9 100644
--- a/src/dev/run_licenses_csv_report.js
+++ b/src/dev/run_licenses_csv_report.js
@@ -71,7 +71,8 @@ run(
licenses: [
'Custom;https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf',
],
- sourceURL: 'https://oss-dependencies.elastic.co/redhat/ubi/ubi-minimal-8-source.tar.gz',
+ sourceURL:
+ 'https://oss-dependencies.elastic.co/red-hat-universal-base-image-minimal/8/ubi-minimal-8-source.tar.gz',
}
);
From fc55c30e8bff46b4e39928ca423fa7f425d8b8ec Mon Sep 17 00:00:00 2001
From: Pierre Gayvallet
Date: Tue, 22 Jun 2021 12:53:32 +0200
Subject: [PATCH 06/63] Add cache-control for assets served via
`registerStaticDir` (#102756)
* Add cache-control for assets served via `registerStaticDir`
* fix case
* add test for 'dynamic' file content
---
src/core/server/http/http_server.test.ts | 127 +++++++++++++++++-
src/core/server/http/http_server.ts | 8 +-
.../static/compression_available.json | 3 +
.../static/compression_available.json.gz | Bin 0 -> 70 bytes
.../fixtures/static/some_json.json | 3 +
5 files changed, 136 insertions(+), 5 deletions(-)
create mode 100644 src/core/server/http/integration_tests/fixtures/static/compression_available.json
create mode 100644 src/core/server/http/integration_tests/fixtures/static/compression_available.json.gz
create mode 100644 src/core/server/http/integration_tests/fixtures/static/some_json.json
diff --git a/src/core/server/http/http_server.test.ts b/src/core/server/http/http_server.test.ts
index 7624a11a6f03f..ffbd91c645382 100644
--- a/src/core/server/http/http_server.test.ts
+++ b/src/core/server/http/http_server.test.ts
@@ -7,9 +7,10 @@
*/
import { Server } from 'http';
-import { readFileSync } from 'fs';
+import { rmdir, mkdtemp, readFile, writeFile } from 'fs/promises';
import supertest from 'supertest';
import { omit } from 'lodash';
+import { join } from 'path';
import { ByteSizeValue, schema } from '@kbn/config-schema';
import { HttpConfig } from './http_config';
@@ -47,9 +48,9 @@ const enhanceWithContext = (fn: (...args: any[]) => any) => fn.bind(null, {});
let certificate: string;
let key: string;
-beforeAll(() => {
- certificate = readFileSync(KBN_CERT_PATH, 'utf8');
- key = readFileSync(KBN_KEY_PATH, 'utf8');
+beforeAll(async () => {
+ certificate = await readFile(KBN_CERT_PATH, 'utf8');
+ key = await readFile(KBN_KEY_PATH, 'utf8');
});
beforeEach(() => {
@@ -1409,6 +1410,19 @@ describe('setup contract', () => {
});
describe('#registerStaticDir', () => {
+ const assetFolder = join(__dirname, 'integration_tests', 'fixtures', 'static');
+ let tempDir: string;
+
+ beforeAll(async () => {
+ tempDir = await mkdtemp('cache-test');
+ });
+
+ afterAll(async () => {
+ if (tempDir) {
+ await rmdir(tempDir, { recursive: true });
+ }
+ });
+
test('does not throw if called after stop', async () => {
const { registerStaticDir } = await server.setup(config);
await server.stop();
@@ -1416,6 +1430,111 @@ describe('setup contract', () => {
registerStaticDir('/path1/{path*}', '/path/to/resource');
}).not.toThrow();
});
+
+ test('returns correct headers for static assets', async () => {
+ const { registerStaticDir, server: innerServer } = await server.setup(config);
+
+ registerStaticDir('/static/{path*}', assetFolder);
+
+ await server.start();
+ const response = await supertest(innerServer.listener)
+ .get('/static/some_json.json')
+ .expect(200);
+
+ expect(response.get('cache-control')).toEqual('must-revalidate');
+ expect(response.get('etag')).not.toBeUndefined();
+ });
+
+ test('returns compressed version if present', async () => {
+ const { registerStaticDir, server: innerServer } = await server.setup(config);
+
+ registerStaticDir('/static/{path*}', assetFolder);
+
+ await server.start();
+ const response = await supertest(innerServer.listener)
+ .get('/static/compression_available.json')
+ .set('accept-encoding', 'gzip')
+ .expect(200);
+
+ expect(response.get('cache-control')).toEqual('must-revalidate');
+ expect(response.get('etag')).not.toBeUndefined();
+ expect(response.get('content-encoding')).toEqual('gzip');
+ });
+
+ test('returns uncompressed version if compressed asset is not available', async () => {
+ const { registerStaticDir, server: innerServer } = await server.setup(config);
+
+ registerStaticDir('/static/{path*}', assetFolder);
+
+ await server.start();
+ const response = await supertest(innerServer.listener)
+ .get('/static/some_json.json')
+ .set('accept-encoding', 'gzip')
+ .expect(200);
+
+ expect(response.get('cache-control')).toEqual('must-revalidate');
+ expect(response.get('etag')).not.toBeUndefined();
+ expect(response.get('content-encoding')).toBeUndefined();
+ });
+
+ test('returns a 304 if etag value matches', async () => {
+ const { registerStaticDir, server: innerServer } = await server.setup(config);
+
+ registerStaticDir('/static/{path*}', assetFolder);
+
+ await server.start();
+ const response = await supertest(innerServer.listener)
+ .get('/static/some_json.json')
+ .expect(200);
+
+ const etag = response.get('etag');
+ expect(etag).not.toBeUndefined();
+
+ await supertest(innerServer.listener)
+ .get('/static/some_json.json')
+ .set('If-None-Match', etag)
+ .expect(304);
+ });
+
+ test('serves content if etag values does not match', async () => {
+ const { registerStaticDir, server: innerServer } = await server.setup(config);
+
+ registerStaticDir('/static/{path*}', assetFolder);
+
+ await server.start();
+
+ await supertest(innerServer.listener)
+ .get('/static/some_json.json')
+ .set('If-None-Match', `"definitely not a valid etag"`)
+ .expect(200);
+ });
+
+ test('dynamically updates depending on the content of the file', async () => {
+ const tempFile = join(tempDir, 'some_file.json');
+
+ const { registerStaticDir, server: innerServer } = await server.setup(config);
+ registerStaticDir('/static/{path*}', tempDir);
+
+ await server.start();
+
+ await supertest(innerServer.listener).get('/static/some_file.json').expect(404);
+
+ await writeFile(tempFile, `{ "over": 9000 }`);
+
+ let response = await supertest(innerServer.listener)
+ .get('/static/some_file.json')
+ .expect(200);
+
+ const etag1 = response.get('etag');
+
+ await writeFile(tempFile, `{ "over": 42 }`);
+
+ response = await supertest(innerServer.listener).get('/static/some_file.json').expect(200);
+
+ const etag2 = response.get('etag');
+
+ expect(etag1).not.toEqual(etag2);
+ });
});
describe('#registerOnPreRouting', () => {
diff --git a/src/core/server/http/http_server.ts b/src/core/server/http/http_server.ts
index 8b4c3b9416152..d43d86d587d06 100644
--- a/src/core/server/http/http_server.ts
+++ b/src/core/server/http/http_server.ts
@@ -465,7 +465,13 @@ export class HttpServer {
lookupCompressed: true,
},
},
- options: { auth: false },
+ options: {
+ auth: false,
+ cache: {
+ privacy: 'public',
+ otherwise: 'must-revalidate',
+ },
+ },
});
}
diff --git a/src/core/server/http/integration_tests/fixtures/static/compression_available.json b/src/core/server/http/integration_tests/fixtures/static/compression_available.json
new file mode 100644
index 0000000000000..1f878fb465cff
--- /dev/null
+++ b/src/core/server/http/integration_tests/fixtures/static/compression_available.json
@@ -0,0 +1,3 @@
+{
+ "hello": "dolly"
+}
diff --git a/src/core/server/http/integration_tests/fixtures/static/compression_available.json.gz b/src/core/server/http/integration_tests/fixtures/static/compression_available.json.gz
new file mode 100644
index 0000000000000000000000000000000000000000..e77819d2e8e59a357c56c3c74624d3b82476bdf1
GIT binary patch
literal 70
zcmV-M0J;AkiwFp-o6%qZ17mM(aB^jHb7^mGUtxA(X>4I)Y-KKLb8l_{tL9QrP|8Tn
c$;nr;Qcz0C&&jD&;;Q8W0MZJ;EEfO(0RJ`}XaE2J
literal 0
HcmV?d00001
diff --git a/src/core/server/http/integration_tests/fixtures/static/some_json.json b/src/core/server/http/integration_tests/fixtures/static/some_json.json
new file mode 100644
index 0000000000000..c8c4105eb57cd
--- /dev/null
+++ b/src/core/server/http/integration_tests/fixtures/static/some_json.json
@@ -0,0 +1,3 @@
+{
+ "foo": "bar"
+}
From 65de579d5a2e85f5295e98ad94163c3af2ebec7e Mon Sep 17 00:00:00 2001
From: Katrin Freihofner
Date: Tue, 22 Jun 2021 13:15:17 +0200
Subject: [PATCH 07/63] Renamed button and dropdown items in headers (apm,
logs, metrics and uptime) from alerts to rules (#100918)
Co-authored-by: Jonathan Buttner
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Christos Nasikas
Co-authored-by: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com>
Co-authored-by: Steph Milovic
---
.../alerting_popover_flyout.tsx | 8 ++--
.../components/metrics_alert_dropdown.tsx | 12 +++---
.../manage_alerts_context_menu_item.tsx | 2 +-
.../components/alert_dropdown.tsx | 4 +-
.../public/alerts/configuration.tsx | 10 ++---
.../public/pages/overview/empty_section.ts | 2 +-
.../translations/translations/ja-JP.json | 38 -------------------
.../translations/translations/zh-CN.json | 38 -------------------
.../header/action_menu_content.test.tsx | 6 +--
.../alerts/toggle_alert_flyout_button.tsx | 6 +--
.../overview/alerts/translations.ts | 19 ++++++----
.../__snapshots__/monitor_list.test.tsx.snap | 4 +-
.../columns/define_connectors.tsx | 14 +++----
.../columns/enable_alert.test.tsx | 4 +-
.../monitor_list/columns/translations.ts | 4 +-
.../monitor_list_drawer/enabled_alerts.tsx | 6 +--
.../public/lib/alert_types/alert_messages.tsx | 2 +-
.../uptime/public/state/alerts/alerts.ts | 6 +--
18 files changed, 55 insertions(+), 130 deletions(-)
diff --git a/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/alerting_popover_flyout.tsx b/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/alerting_popover_flyout.tsx
index 5b4f4e24af44d..ca73f6ddd05b3 100644
--- a/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/alerting_popover_flyout.tsx
+++ b/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/alerting_popover_flyout.tsx
@@ -18,7 +18,7 @@ import { AlertType } from '../../../../common/alert_types';
import { AlertingFlyout } from '../../alerting/alerting_flyout';
const alertLabel = i18n.translate('xpack.apm.home.alertsMenu.alerts', {
- defaultMessage: 'Alerts',
+ defaultMessage: 'Alerts and rules',
});
const transactionDurationLabel = i18n.translate(
'xpack.apm.home.alertsMenu.transactionDuration',
@@ -33,11 +33,11 @@ const errorCountLabel = i18n.translate('xpack.apm.home.alertsMenu.errorCount', {
});
const createThresholdAlertLabel = i18n.translate(
'xpack.apm.home.alertsMenu.createThresholdAlert',
- { defaultMessage: 'Create threshold alert' }
+ { defaultMessage: 'Create threshold rule' }
);
const createAnomalyAlertAlertLabel = i18n.translate(
'xpack.apm.home.alertsMenu.createAnomalyAlert',
- { defaultMessage: 'Create anomaly alert' }
+ { defaultMessage: 'Create anomaly rule' }
);
const CREATE_TRANSACTION_DURATION_ALERT_PANEL_ID =
@@ -102,7 +102,7 @@ export function AlertingPopoverAndFlyout({
{
name: i18n.translate(
'xpack.apm.home.alertsMenu.viewActiveAlerts',
- { defaultMessage: 'View active alerts' }
+ { defaultMessage: 'Manage rules' }
),
href: basePath.prepend(
'/app/management/insightsAndAlerting/triggersActions/alerts'
diff --git a/x-pack/plugins/infra/public/alerting/common/components/metrics_alert_dropdown.tsx b/x-pack/plugins/infra/public/alerting/common/components/metrics_alert_dropdown.tsx
index 41867053c3a0f..c3327dc3fe85d 100644
--- a/x-pack/plugins/infra/public/alerting/common/components/metrics_alert_dropdown.tsx
+++ b/x-pack/plugins/infra/public/alerting/common/components/metrics_alert_dropdown.tsx
@@ -36,12 +36,12 @@ export const MetricsAlertDropdown = () => {
() => ({
id: 1,
title: i18n.translate('xpack.infra.alerting.infrastructureDropdownTitle', {
- defaultMessage: 'Infrastructure alerts',
+ defaultMessage: 'Infrastructure rules',
}),
items: [
{
name: i18n.translate('xpack.infra.alerting.createInventoryAlertButton', {
- defaultMessage: 'Create inventory alert',
+ defaultMessage: 'Create inventory rule',
}),
onClick: () => setVisibleFlyoutType('inventory'),
},
@@ -54,12 +54,12 @@ export const MetricsAlertDropdown = () => {
() => ({
id: 2,
title: i18n.translate('xpack.infra.alerting.metricsDropdownTitle', {
- defaultMessage: 'Metrics alerts',
+ defaultMessage: 'Metrics rules',
}),
items: [
{
name: i18n.translate('xpack.infra.alerting.createThresholdAlertButton', {
- defaultMessage: 'Create threshold alert',
+ defaultMessage: 'Create threshold rule',
}),
onClick: () => setVisibleFlyoutType('threshold'),
},
@@ -76,7 +76,7 @@ export const MetricsAlertDropdown = () => {
const manageAlertsMenuItem = useMemo(
() => ({
name: i18n.translate('xpack.infra.alerting.manageAlerts', {
- defaultMessage: 'Manage alerts',
+ defaultMessage: 'Manage rules',
}),
icon: 'tableOfContents',
onClick: manageAlertsLinkProps.onClick,
@@ -112,7 +112,7 @@ export const MetricsAlertDropdown = () => {
{
id: 0,
title: i18n.translate('xpack.infra.alerting.alertDropdownTitle', {
- defaultMessage: 'Alerts',
+ defaultMessage: 'Alerts and rules',
}),
items: firstPanelMenuItems,
},
diff --git a/x-pack/plugins/infra/public/alerting/inventory/components/manage_alerts_context_menu_item.tsx b/x-pack/plugins/infra/public/alerting/inventory/components/manage_alerts_context_menu_item.tsx
index a6b69a37f780e..c9b6275264f91 100644
--- a/x-pack/plugins/infra/public/alerting/inventory/components/manage_alerts_context_menu_item.tsx
+++ b/x-pack/plugins/infra/public/alerting/inventory/components/manage_alerts_context_menu_item.tsx
@@ -17,7 +17,7 @@ export const ManageAlertsContextMenuItem = () => {
});
return (
-
+
);
};
diff --git a/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_dropdown.tsx b/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_dropdown.tsx
index 66c77fbf875a4..c1733d4af0589 100644
--- a/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_dropdown.tsx
+++ b/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_dropdown.tsx
@@ -66,13 +66,13 @@ export const AlertDropdown = () => {
>
,
,
];
diff --git a/x-pack/plugins/monitoring/public/alerts/configuration.tsx b/x-pack/plugins/monitoring/public/alerts/configuration.tsx
index 5416095671d71..7825fe8e20617 100644
--- a/x-pack/plugins/monitoring/public/alerts/configuration.tsx
+++ b/x-pack/plugins/monitoring/public/alerts/configuration.tsx
@@ -32,7 +32,7 @@ export const AlertConfiguration: React.FC = (props: Props) => {
} catch (err) {
Legacy.shims.toastNotifications.addDanger({
title: i18n.translate('xpack.monitoring.alerts.panel.disableAlert.errorTitle', {
- defaultMessage: `Unable to disable alert`,
+ defaultMessage: `Unable to disable rule`,
}),
text: err.message,
});
@@ -46,7 +46,7 @@ export const AlertConfiguration: React.FC = (props: Props) => {
} catch (err) {
Legacy.shims.toastNotifications.addDanger({
title: i18n.translate('xpack.monitoring.alerts.panel.enableAlert.errorTitle', {
- defaultMessage: `Unable to enable alert`,
+ defaultMessage: `Unable to enable rule`,
}),
text: err.message,
});
@@ -60,7 +60,7 @@ export const AlertConfiguration: React.FC = (props: Props) => {
} catch (err) {
Legacy.shims.toastNotifications.addDanger({
title: i18n.translate('xpack.monitoring.alerts.panel.muteAlert.errorTitle', {
- defaultMessage: `Unable to mute alert`,
+ defaultMessage: `Unable to mute rule`,
}),
text: err.message,
});
@@ -74,7 +74,7 @@ export const AlertConfiguration: React.FC = (props: Props) => {
} catch (err) {
Legacy.shims.toastNotifications.addDanger({
title: i18n.translate('xpack.monitoring.alerts.panel.ummuteAlert.errorTitle', {
- defaultMessage: `Unable to unmute alert`,
+ defaultMessage: `Unable to unmute rule`,
}),
text: err.message,
});
@@ -112,7 +112,7 @@ export const AlertConfiguration: React.FC = (props: Props) => {
}}
>
{i18n.translate('xpack.monitoring.alerts.panel.editAlert', {
- defaultMessage: `Edit alert`,
+ defaultMessage: `Edit rule`,
})}
diff --git a/x-pack/plugins/observability/public/pages/overview/empty_section.ts b/x-pack/plugins/observability/public/pages/overview/empty_section.ts
index 40b1157b29e35..2747b2ecdebc9 100644
--- a/x-pack/plugins/observability/public/pages/overview/empty_section.ts
+++ b/x-pack/plugins/observability/public/pages/overview/empty_section.ts
@@ -97,7 +97,7 @@ export const getEmptySections = ({ core }: { core: CoreStart }): ISection[] => {
'Are 503 errors stacking up? Are services responding? Is CPU and RAM utilization jumping? See warnings as they happen—not as part of the post-mortem.',
}),
linkTitle: i18n.translate('xpack.observability.emptySection.apps.alert.link', {
- defaultMessage: 'Create alert',
+ defaultMessage: 'Create rule',
}),
href: core.http.basePath.prepend(
'/app/management/insightsAndAlerting/triggersActions/alerts'
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index 227afc122f804..9520c1ad0d9c1 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -5490,13 +5490,9 @@
"xpack.apm.header.badge.readOnly.text": "読み取り専用",
"xpack.apm.header.badge.readOnly.tooltip": "を保存できませんでした",
"xpack.apm.helpMenu.upgradeAssistantLink": "アップグレードアシスタント",
- "xpack.apm.home.alertsMenu.alerts": "アラート",
"xpack.apm.home.alertsMenu.createAnomalyAlert": "異常アラートを作成",
- "xpack.apm.home.alertsMenu.createThresholdAlert": "しきい値アラートを作成",
"xpack.apm.home.alertsMenu.errorCount": "エラー数",
- "xpack.apm.home.alertsMenu.transactionDuration": "レイテンシ",
"xpack.apm.home.alertsMenu.transactionErrorRate": "トランザクションエラー率",
- "xpack.apm.home.alertsMenu.viewActiveAlerts": "アクティブアラートを表示",
"xpack.apm.home.serviceMapTabLabel": "サービスマップ",
"xpack.apm.instancesLatencyDistributionChartLegend": "インスタンス",
"xpack.apm.instancesLatencyDistributionChartLegend.previousPeriod": "前の期間",
@@ -10876,20 +10872,10 @@
"xpack.indexLifecycleMgmt.timeline.title": "ポリシー概要",
"xpack.indexLifecycleMgmt.timeline.warmPhaseSectionTitle": "ウォームフェーズ",
"xpack.indexLifecycleMgmt.warmPhase.dataTier.description": "頻度が低い読み取り専用アクセス用に最適化されたノードにデータを移動します。",
- "xpack.infra.alerting.alertDropdownTitle": "アラート",
"xpack.infra.alerting.alertFlyout.groupBy.placeholder": "なし (グループなし) ",
"xpack.infra.alerting.alertFlyout.groupByLabel": "グループ分けの条件",
- "xpack.infra.alerting.alertsButton": "アラート",
- "xpack.infra.alerting.createInventoryAlertButton": "インベントリアラートの作成",
- "xpack.infra.alerting.createThresholdAlertButton": "しきい値アラートを作成",
"xpack.infra.alerting.infrastructureDropdownMenu": "インフラストラクチャー",
- "xpack.infra.alerting.infrastructureDropdownTitle": "インフラストラクチャーアラート",
- "xpack.infra.alerting.logs.alertsButton": "アラート",
- "xpack.infra.alerting.logs.createAlertButton": "アラートの作成",
- "xpack.infra.alerting.logs.manageAlerts": "アラートを管理",
- "xpack.infra.alerting.manageAlerts": "アラートを管理",
"xpack.infra.alerting.metricsDropdownMenu": "メトリック",
- "xpack.infra.alerting.metricsDropdownTitle": "メトリックアラート",
"xpack.infra.alerts.charts.errorMessage": "問題が発生しました",
"xpack.infra.alerts.charts.loadingMessage": "読み込み中",
"xpack.infra.alerts.charts.noDataMessage": "グラフデータがありません",
@@ -15902,13 +15888,8 @@
"xpack.monitoring.alerts.nodesChanged.ui.removedFiringMessage": "Elasticsearchノード「{removed}」がこのクラスターから削除されました。",
"xpack.monitoring.alerts.nodesChanged.ui.resolvedMessage": "このクラスターのElasticsearchノードは変更されていません。",
"xpack.monitoring.alerts.nodesChanged.ui.restartedFiringMessage": "このクラスターでElasticsearchノード「{restarted}」が再起動しました。",
- "xpack.monitoring.alerts.panel.disableAlert.errorTitle": "アラートを無効にできません",
"xpack.monitoring.alerts.panel.disableTitle": "無効にする",
- "xpack.monitoring.alerts.panel.editAlert": "アラートを編集",
- "xpack.monitoring.alerts.panel.enableAlert.errorTitle": "アラートを有効にできません",
- "xpack.monitoring.alerts.panel.muteAlert.errorTitle": "アラートをミュートできません",
"xpack.monitoring.alerts.panel.muteTitle": "ミュート",
- "xpack.monitoring.alerts.panel.ummuteAlert.errorTitle": "アラートをミュート解除できません",
"xpack.monitoring.alerts.rejection.paramDetails.duration.label": "最後の",
"xpack.monitoring.alerts.rejection.paramDetails.threshold.label": "{type} 拒否カウントが超過するときに通知",
"xpack.monitoring.alerts.searchThreadPoolRejections.description": "検索スレッドプールの拒否数がしきい値を超過するときにアラートを発行します。",
@@ -17235,7 +17216,6 @@
"xpack.observability.alertsTable.viewInAppButtonLabel": "アプリで表示",
"xpack.observability.alertsTitle": "アラート",
"xpack.observability.emptySection.apps.alert.description": "503 エラーが累積していますか?サービスは応答していますか?CPUとRAMの使用量が跳ね上がっていますか?このような警告を、事後にではなく、発生と同時に把握しましょう。",
- "xpack.observability.emptySection.apps.alert.link": "アラートの作成",
"xpack.observability.emptySection.apps.alert.title": "アラートが見つかりません。",
"xpack.observability.emptySection.apps.apm.description": "分散アーキテクチャ全体でトランザクションを追跡し、サービスの通信をマップ化して、簡単にパフォーマンスボトルネックを特定できます。",
"xpack.observability.emptySection.apps.apm.link": "エージェントのインストール",
@@ -23526,8 +23506,6 @@
"xpack.uptime.alerts.tls.validAfterExpiringString": "{relativeDate}日以内、{date}に期限切れになります。",
"xpack.uptime.alerts.tls.validBeforeExpiredString": "{relativeDate}日前、{date}以降有効です。",
"xpack.uptime.alerts.tls.validBeforeExpiringString": "今から{relativeDate}日間、{date}まで無効です。",
- "xpack.uptime.alerts.toggleAlertFlyoutButtonText": "アラート",
- "xpack.uptime.alertsPopover.toggleButton.ariaLabel": "アラートコンテキストメニューを開く",
"xpack.uptime.apmIntegrationAction.description": "このモニターの検索 APM",
"xpack.uptime.apmIntegrationAction.text": "APMデータを表示",
"xpack.uptime.availabilityLabelText": "{value} %",
@@ -23746,15 +23724,11 @@
"xpack.uptime.monitorDetails.title.pingType.tcp": "TCP ping",
"xpack.uptime.monitorList.anomalyColumn.label": "レスポンス異常スコア",
"xpack.uptime.monitorList.defineConnector.description": "アラートを有効にするには、デフォルトのアラートアクションコネクターを定義してください。",
- "xpack.uptime.monitorList.disableDownAlert": "ステータスアラートを無効にする",
"xpack.uptime.monitorList.downLineSeries.downLabel": "ダウン",
"xpack.uptime.monitorList.drawer.missingLocation": "一部の Heartbeat インスタンスには位置情報が定義されていません。Heartbeat 構成への{link}。",
"xpack.uptime.monitorList.drawer.mostRecentRun": "直近のテスト実行",
"xpack.uptime.monitorList.drawer.statusRowLocationList": "前回の確認時に\"{status}\"ステータスだった場所のリスト。",
"xpack.uptime.monitorList.drawer.url": "Url",
- "xpack.uptime.monitorList.enabledAlerts.noAlert": "このモニターではアラートが有効ではありません。",
- "xpack.uptime.monitorList.enabledAlerts.title": "有効なアラート",
- "xpack.uptime.monitorList.enableDownAlert": "ステータスアラートを有効にする",
"xpack.uptime.monitorList.expandDrawerButton.ariaLabel": "ID {id}のモニターの行を展開",
"xpack.uptime.monitorList.geoName.helpLinkAnnotation": "場所を追加",
"xpack.uptime.monitorList.infraIntegrationAction.container.message": "コンテナーメトリックを表示",
@@ -23828,15 +23802,7 @@
"xpack.uptime.monitorStatusBar.timestampFromNowTextAriaLabel": "最終確認からの経過時間",
"xpack.uptime.monitorStatusBar.type.ariaLabel": "モニタータイプ",
"xpack.uptime.monitorStatusBar.type.label": "型",
- "xpack.uptime.navigateToAlertingButton.content": "アラートを管理",
- "xpack.uptime.navigateToAlertingUi": "Uptime を離れてアラート管理ページに移動します",
"xpack.uptime.notFountPage.homeLinkText": "ホームへ戻る",
- "xpack.uptime.openAlertContextPanel.ariaLabel": "アラートコンテキストパネルを開くと、アラートタイプを選択できます",
- "xpack.uptime.openAlertContextPanel.label": "アラートの作成",
- "xpack.uptime.overview.alerts.disabled.failed": "アラートを無効にできません。",
- "xpack.uptime.overview.alerts.disabled.success": "アラートが正常に無効にされました。",
- "xpack.uptime.overview.alerts.enabled.failed": "アラートを有効にできません。",
- "xpack.uptime.overview.alerts.enabled.success": "アラートが正常に有効にされました。 ",
"xpack.uptime.overview.alerts.enabled.success.description": "この監視が停止しているときには、メッセージが {actionConnectors} に送信されます。",
"xpack.uptime.overview.filterButton.label": "{title}フィルターのフィルターグループを展開",
"xpack.uptime.overview.pageHeader.syntheticsCallout.announcementLink": "お知らせを読む",
@@ -24004,10 +23970,6 @@
"xpack.uptime.synthetics.waterfallChart.labels.timings.ssl": "TLS",
"xpack.uptime.synthetics.waterfallChart.labels.timings.wait": "待機中 (TTFB) ",
"xpack.uptime.title": "アップタイム",
- "xpack.uptime.toggleAlertButton.content": "ステータスアラートを監視",
- "xpack.uptime.toggleAlertFlyout.ariaLabel": "アラートの追加ポップアップを開く",
- "xpack.uptime.toggleTlsAlertButton.ariaLabel": "TLSアラートの追加ポップアップを開く",
- "xpack.uptime.toggleTlsAlertButton.content": "TLSアラート",
"xpack.uptime.uptimeFeatureCatalogueTitle": "アップタイム",
"xpack.urlDrilldown.click.event.key.documentation": "クリックしたデータポイントの後ろのフィールド名。",
"xpack.urlDrilldown.click.event.key.title": "クリックしたフィールドの名前。",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index ac43a6938aac3..f74d27eb8b214 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -5520,13 +5520,9 @@
"xpack.apm.header.badge.readOnly.text": "只读",
"xpack.apm.header.badge.readOnly.tooltip": "无法保存",
"xpack.apm.helpMenu.upgradeAssistantLink": "升级助手",
- "xpack.apm.home.alertsMenu.alerts": "告警",
"xpack.apm.home.alertsMenu.createAnomalyAlert": "创建异常告警",
- "xpack.apm.home.alertsMenu.createThresholdAlert": "创建阈值告警",
"xpack.apm.home.alertsMenu.errorCount": "错误计数",
- "xpack.apm.home.alertsMenu.transactionDuration": "延迟",
"xpack.apm.home.alertsMenu.transactionErrorRate": "事务错误率",
- "xpack.apm.home.alertsMenu.viewActiveAlerts": "查看活动告警",
"xpack.apm.home.serviceMapTabLabel": "服务地图",
"xpack.apm.instancesLatencyDistributionChartLegend": "实例",
"xpack.apm.instancesLatencyDistributionChartLegend.previousPeriod": "上一时段",
@@ -11015,20 +11011,10 @@
"xpack.indexLifecycleMgmt.timeline.title": "策略摘要",
"xpack.indexLifecycleMgmt.timeline.warmPhaseSectionTitle": "温阶段",
"xpack.indexLifecycleMgmt.warmPhase.dataTier.description": "将数据移到针对不太频繁的只读访问优化的节点。",
- "xpack.infra.alerting.alertDropdownTitle": "告警",
"xpack.infra.alerting.alertFlyout.groupBy.placeholder": "无内容 (未分组) ",
"xpack.infra.alerting.alertFlyout.groupByLabel": "分组依据",
- "xpack.infra.alerting.alertsButton": "告警",
- "xpack.infra.alerting.createInventoryAlertButton": "创建库存告警",
- "xpack.infra.alerting.createThresholdAlertButton": "创建阈值告警",
"xpack.infra.alerting.infrastructureDropdownMenu": "基础设施",
- "xpack.infra.alerting.infrastructureDropdownTitle": "基础架构告警",
- "xpack.infra.alerting.logs.alertsButton": "告警",
- "xpack.infra.alerting.logs.createAlertButton": "创建告警",
- "xpack.infra.alerting.logs.manageAlerts": "管理告警",
- "xpack.infra.alerting.manageAlerts": "管理告警",
"xpack.infra.alerting.metricsDropdownMenu": "指标",
- "xpack.infra.alerting.metricsDropdownTitle": "指标告警",
"xpack.infra.alerts.charts.errorMessage": "哇哦,出问题了",
"xpack.infra.alerts.charts.loadingMessage": "正在加载",
"xpack.infra.alerts.charts.noDataMessage": "没有可用图表数据",
@@ -16138,13 +16124,8 @@
"xpack.monitoring.alerts.nodesChanged.ui.removedFiringMessage": "Elasticsearch 节点“{removed}”已从此集群中移除。",
"xpack.monitoring.alerts.nodesChanged.ui.resolvedMessage": "此集群的 Elasticsearch 节点中没有更改。",
"xpack.monitoring.alerts.nodesChanged.ui.restartedFiringMessage": "此集群中 Elasticsearch 节点“{restarted}”已重新启动。",
- "xpack.monitoring.alerts.panel.disableAlert.errorTitle": "无法禁用告警",
"xpack.monitoring.alerts.panel.disableTitle": "禁用",
- "xpack.monitoring.alerts.panel.editAlert": "编辑告警",
- "xpack.monitoring.alerts.panel.enableAlert.errorTitle": "无法启用告警",
- "xpack.monitoring.alerts.panel.muteAlert.errorTitle": "无法静音告警",
"xpack.monitoring.alerts.panel.muteTitle": "静音",
- "xpack.monitoring.alerts.panel.ummuteAlert.errorTitle": "无法取消告警静音",
"xpack.monitoring.alerts.rejection.paramDetails.duration.label": "过去",
"xpack.monitoring.alerts.rejection.paramDetails.threshold.label": "当 {type} 拒绝计数超过以下阈值时通知:",
"xpack.monitoring.alerts.searchThreadPoolRejections.description": "当搜索线程池中的拒绝数目超过阈值时告警。",
@@ -17471,7 +17452,6 @@
"xpack.observability.alertsTable.viewInAppButtonLabel": "在应用中查看",
"xpack.observability.alertsTitle": "告警",
"xpack.observability.emptySection.apps.alert.description": "503 错误是否越来越多?服务是否响应?CPU 和 RAM 利用率是否激增?实时查看警告,而不是事后再进行剖析。",
- "xpack.observability.emptySection.apps.alert.link": "创建告警",
"xpack.observability.emptySection.apps.alert.title": "未找到告警。",
"xpack.observability.emptySection.apps.apm.description": "通过分布式体系结构跟踪事务并映射服务的交互以轻松发现性能瓶颈。",
"xpack.observability.emptySection.apps.apm.link": "安装代理",
@@ -23892,8 +23872,6 @@
"xpack.uptime.alerts.tls.validAfterExpiringString": "将在{relativeDate} 天后,即 {date}到期。",
"xpack.uptime.alerts.tls.validBeforeExpiredString": "自 {relativeDate} 天前,即 {date}开始生效。",
"xpack.uptime.alerts.tls.validBeforeExpiringString": "从现在到 {date}的 {relativeDate} 天里无效。",
- "xpack.uptime.alerts.toggleAlertFlyoutButtonText": "告警",
- "xpack.uptime.alertsPopover.toggleButton.ariaLabel": "打开告警上下文菜单",
"xpack.uptime.apmIntegrationAction.description": "在 APM 中搜索此监测",
"xpack.uptime.apmIntegrationAction.text": "显示 APM 数据",
"xpack.uptime.availabilityLabelText": "{value} %",
@@ -24112,15 +24090,11 @@
"xpack.uptime.monitorDetails.title.pingType.tcp": "TCP ping",
"xpack.uptime.monitorList.anomalyColumn.label": "响应异常分数",
"xpack.uptime.monitorList.defineConnector.description": "要开始启用告警,请在以下位置定义默认告警操作连接器",
- "xpack.uptime.monitorList.disableDownAlert": "禁用状态告警",
"xpack.uptime.monitorList.downLineSeries.downLabel": "关闭检查",
"xpack.uptime.monitorList.drawer.missingLocation": "某些 Heartbeat 实例未定义位置。{link}到您的 Heartbeat 配置。",
"xpack.uptime.monitorList.drawer.mostRecentRun": "最新测试运行",
"xpack.uptime.monitorList.drawer.statusRowLocationList": "上次检查时状态为“{status}”的位置列表。",
"xpack.uptime.monitorList.drawer.url": "URL",
- "xpack.uptime.monitorList.enabledAlerts.noAlert": "没有为此监测启用告警。",
- "xpack.uptime.monitorList.enabledAlerts.title": "已启用的告警",
- "xpack.uptime.monitorList.enableDownAlert": "启用状态告警",
"xpack.uptime.monitorList.expandDrawerButton.ariaLabel": "展开 ID {id} 的监测行",
"xpack.uptime.monitorList.geoName.helpLinkAnnotation": "添加位置",
"xpack.uptime.monitorList.infraIntegrationAction.container.message": "显示容器指标",
@@ -24194,15 +24168,7 @@
"xpack.uptime.monitorStatusBar.timestampFromNowTextAriaLabel": "自上次检查以来经过的时间",
"xpack.uptime.monitorStatusBar.type.ariaLabel": "监测类型",
"xpack.uptime.monitorStatusBar.type.label": "类型",
- "xpack.uptime.navigateToAlertingButton.content": "管理告警",
- "xpack.uptime.navigateToAlertingUi": "离开 Uptime 并前往“Alerting 管理”页面",
"xpack.uptime.notFountPage.homeLinkText": "返回主页",
- "xpack.uptime.openAlertContextPanel.ariaLabel": "打开告警上下文面板,以便可以选择告警类型",
- "xpack.uptime.openAlertContextPanel.label": "创建告警",
- "xpack.uptime.overview.alerts.disabled.failed": "无法禁用告警!",
- "xpack.uptime.overview.alerts.disabled.success": "已成功禁用告警!",
- "xpack.uptime.overview.alerts.enabled.failed": "无法启用告警!",
- "xpack.uptime.overview.alerts.enabled.success": "已成功启用告警 ",
"xpack.uptime.overview.alerts.enabled.success.description": "此监测关闭时,将有消息发送到 {actionConnectors}。",
"xpack.uptime.overview.filterButton.label": "展开筛选 {title} 的筛选组",
"xpack.uptime.overview.pageHeader.syntheticsCallout.announcementLink": "阅读公告",
@@ -24370,10 +24336,6 @@
"xpack.uptime.synthetics.waterfallChart.labels.timings.ssl": "TLS",
"xpack.uptime.synthetics.waterfallChart.labels.timings.wait": "等待中 (TTFB)",
"xpack.uptime.title": "运行时间",
- "xpack.uptime.toggleAlertButton.content": "监测状态告警",
- "xpack.uptime.toggleAlertFlyout.ariaLabel": "打开添加告警浮出控件",
- "xpack.uptime.toggleTlsAlertButton.ariaLabel": "打开 TLS 告警浮出控件",
- "xpack.uptime.toggleTlsAlertButton.content": "TLS 告警",
"xpack.uptime.uptimeFeatureCatalogueTitle": "运行时间",
"xpack.urlDrilldown.click.event.key.documentation": "已点击数据点背后的字段名称。",
"xpack.urlDrilldown.click.event.key.title": "已点击字段的名称。",
diff --git a/x-pack/plugins/uptime/public/components/common/header/action_menu_content.test.tsx b/x-pack/plugins/uptime/public/components/common/header/action_menu_content.test.tsx
index 89d8f38b1e3b3..0265588c3fdeb 100644
--- a/x-pack/plugins/uptime/public/components/common/header/action_menu_content.test.tsx
+++ b/x-pack/plugins/uptime/public/components/common/header/action_menu_content.test.tsx
@@ -14,12 +14,12 @@ describe('ActionMenuContent', () => {
it('renders alerts dropdown', async () => {
const { getByLabelText, getByText } = render();
- const alertsDropdown = getByLabelText('Open alert context menu');
+ const alertsDropdown = getByLabelText('Open alerts and rules context menu');
fireEvent.click(alertsDropdown);
await waitFor(() => {
- expect(getByText('Create alert'));
- expect(getByText('Manage alerts'));
+ expect(getByText('Create rule'));
+ expect(getByText('Manage rules'));
});
});
diff --git a/x-pack/plugins/uptime/public/components/overview/alerts/toggle_alert_flyout_button.tsx b/x-pack/plugins/uptime/public/components/overview/alerts/toggle_alert_flyout_button.tsx
index a1b745d07924e..278958bd1987b 100644
--- a/x-pack/plugins/uptime/public/components/overview/alerts/toggle_alert_flyout_button.tsx
+++ b/x-pack/plugins/uptime/public/components/overview/alerts/toggle_alert_flyout_button.tsx
@@ -67,7 +67,7 @@ export const ToggleAlertFlyoutButtonComponent: React.FC = ({
>
),
@@ -114,7 +114,7 @@ export const ToggleAlertFlyoutButtonComponent: React.FC = ({
},
{
id: ALERT_CONTEXT_SELECT_TYPE_PANEL_ID,
- title: 'create alerts',
+ title: ToggleFlyoutTranslations.toggleAlertFlyoutButtonLabel,
items: selectionItems,
},
];
@@ -134,7 +134,7 @@ export const ToggleAlertFlyoutButtonComponent: React.FC = ({
>
}
diff --git a/x-pack/plugins/uptime/public/components/overview/alerts/translations.ts b/x-pack/plugins/uptime/public/components/overview/alerts/translations.ts
index 00a00a4664cd8..7cfcdabe5562b 100644
--- a/x-pack/plugins/uptime/public/components/overview/alerts/translations.ts
+++ b/x-pack/plugins/uptime/public/components/overview/alerts/translations.ts
@@ -283,30 +283,33 @@ export const TlsTranslations = {
export const ToggleFlyoutTranslations = {
toggleButtonAriaLabel: i18n.translate('xpack.uptime.alertsPopover.toggleButton.ariaLabel', {
- defaultMessage: 'Open alert context menu',
+ defaultMessage: 'Open alerts and rules context menu',
}),
openAlertContextPanelAriaLabel: i18n.translate('xpack.uptime.openAlertContextPanel.ariaLabel', {
- defaultMessage: 'Open the alert context panel so you can choose an alert type',
+ defaultMessage: 'Open the rule context panel so you can choose a rule type',
}),
openAlertContextPanelLabel: i18n.translate('xpack.uptime.openAlertContextPanel.label', {
- defaultMessage: 'Create alert',
+ defaultMessage: 'Create rule',
}),
toggleTlsAriaLabel: i18n.translate('xpack.uptime.toggleTlsAlertButton.ariaLabel', {
- defaultMessage: 'Open TLS alert flyout',
+ defaultMessage: 'Open TLS rule flyout',
}),
toggleTlsContent: i18n.translate('xpack.uptime.toggleTlsAlertButton.content', {
- defaultMessage: 'TLS alert',
+ defaultMessage: 'TLS rule',
}),
toggleMonitorStatusAriaLabel: i18n.translate('xpack.uptime.toggleAlertFlyout.ariaLabel', {
- defaultMessage: 'Open add alert flyout',
+ defaultMessage: 'Open add rule flyout',
}),
toggleMonitorStatusContent: i18n.translate('xpack.uptime.toggleAlertButton.content', {
- defaultMessage: 'Monitor status alert',
+ defaultMessage: 'Monitor status rule',
}),
navigateToAlertingUIAriaLabel: i18n.translate('xpack.uptime.navigateToAlertingUi', {
defaultMessage: 'Leave Uptime and go to Alerting Management page',
}),
navigateToAlertingButtonContent: i18n.translate('xpack.uptime.navigateToAlertingButton.content', {
- defaultMessage: 'Manage alerts',
+ defaultMessage: 'Manage rules',
+ }),
+ toggleAlertFlyoutButtonLabel: i18n.translate('xpack.uptime.alerts.createRulesPanel.title', {
+ defaultMessage: 'Create rules',
}),
};
diff --git a/x-pack/plugins/uptime/public/components/overview/monitor_list/__snapshots__/monitor_list.test.tsx.snap b/x-pack/plugins/uptime/public/components/overview/monitor_list/__snapshots__/monitor_list.test.tsx.snap
index 115dab1095dc1..cfdf7afba4e85 100644
--- a/x-pack/plugins/uptime/public/components/overview/monitor_list/__snapshots__/monitor_list.test.tsx.snap
+++ b/x-pack/plugins/uptime/public/components/overview/monitor_list/__snapshots__/monitor_list.test.tsx.snap
@@ -1303,7 +1303,7 @@ exports[`MonitorList component renders the monitor list 1`] = `
>
+
+
+ >
+ )}
+
+ {i18n.translate(
+ 'xpack.enterpriseSearch.appSearch.engine.schema.metaEngine.activeFieldsTitle',
+ { defaultMessage: 'Active fields' }
+ )}
+
+ }
+ subtitle={i18n.translate(
+ 'xpack.enterpriseSearch.appSearch.engine.schema.metaEngine.activeFieldsDescription',
+ { defaultMessage: 'Fields which belong to one or more engine.' }
)}
+ >
+
+
+
+ {hasConflicts && (
{i18n.translate(
- 'xpack.enterpriseSearch.appSearch.engine.schema.metaEngine.activeFieldsTitle',
- { defaultMessage: 'Active fields' }
+ 'xpack.enterpriseSearch.appSearch.engine.schema.metaEngine.inactiveFieldsTitle',
+ { defaultMessage: 'Inactive fields' }
)}
}
subtitle={i18n.translate(
- 'xpack.enterpriseSearch.appSearch.engine.schema.metaEngine.activeFieldsDescription',
- { defaultMessage: 'Fields which belong to one or more engine.' }
+ 'xpack.enterpriseSearch.appSearch.engine.schema.metaEngine.inactiveFieldsDescription',
+ {
+ defaultMessage:
+ 'These fields have type conflicts. To activate these fields, change types in the source engines to match.',
+ }
)}
>
-
+
-
- {hasConflicts && (
-
- {i18n.translate(
- 'xpack.enterpriseSearch.appSearch.engine.schema.metaEngine.inactiveFieldsTitle',
- { defaultMessage: 'Inactive fields' }
- )}
-
- }
- subtitle={i18n.translate(
- 'xpack.enterpriseSearch.appSearch.engine.schema.metaEngine.inactiveFieldsDescription',
- {
- defaultMessage:
- 'These fields have type conflicts. To activate these fields, change types in the source engines to match.',
- }
- )}
- >
-
-
- )}
-
- >
+ )}
+
);
};
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.test.tsx
index 91ec8eda55fc3..cae16d70592fa 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.test.tsx
@@ -7,17 +7,18 @@
import { setMockValues, setMockActions } from '../../../../__mocks__/kea_logic';
import '../../../../__mocks__/shallow_useeffect.mock';
+import '../../../__mocks__/engine_logic.mock';
import React from 'react';
import { shallow } from 'enzyme';
-import { EuiPageHeader, EuiButton } from '@elastic/eui';
+import { EuiButton } from '@elastic/eui';
-import { Loading } from '../../../../shared/loading';
import { SchemaAddFieldModal } from '../../../../shared/schema';
+import { getPageHeaderActions } from '../../../../test_helpers';
-import { SchemaCallouts, SchemaTable, EmptyState } from '../components';
+import { SchemaCallouts, SchemaTable } from '../components';
import { Schema } from './';
@@ -56,27 +57,8 @@ describe('Schema', () => {
expect(actions.loadSchema).toHaveBeenCalled();
});
- it('renders a loading state', () => {
- setMockValues({ ...values, dataLoading: true });
- const wrapper = shallow();
-
- expect(wrapper.find(Loading)).toHaveLength(1);
- });
-
- it('renders an empty state', () => {
- setMockValues({ ...values, hasSchema: false });
- const wrapper = shallow();
-
- expect(wrapper.find(EmptyState)).toHaveLength(1);
- });
-
describe('page action buttons', () => {
- const subject = () =>
- shallow()
- .find(EuiPageHeader)
- .dive()
- .children()
- .dive();
+ const subject = () => getPageHeaderActions(shallow());
it('renders', () => {
const wrapper = subject();
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.tsx
index 7bc995b16468a..d2a760e8accff 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/views/schema.tsx
@@ -9,14 +9,15 @@ import React, { useEffect } from 'react';
import { useValues, useActions } from 'kea';
-import { EuiPageHeader, EuiButton, EuiPageContentBody } from '@elastic/eui';
+import { EuiButton } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
-import { FlashMessages } from '../../../../shared/flash_messages';
-import { Loading } from '../../../../shared/loading';
import { SchemaAddFieldModal } from '../../../../shared/schema';
+import { getEngineBreadcrumbs } from '../../engine';
+import { AppSearchPageTemplate } from '../../layout';
import { SchemaCallouts, SchemaTable, EmptyState } from '../components';
+import { SCHEMA_TITLE } from '../constants';
import { SchemaLogic } from '../schema_logic';
export const Schema: React.FC = () => {
@@ -31,19 +32,18 @@ export const Schema: React.FC = () => {
loadSchema();
}, []);
- if (dataLoading) return ;
-
return (
- <>
- {
>
{i18n.translate(
'xpack.enterpriseSearch.appSearch.engine.schema.updateSchemaButtonLabel',
- { defaultMessage: 'Update types' }
+ { defaultMessage: 'Save changes' }
)}
,
{
{ defaultMessage: 'Create a schema field' }
)}
,
- ]}
- />
-
-
-
- {hasSchema ? : }
- {isModalOpen && (
-
- )}
-
- >
+ ],
+ }}
+ isLoading={dataLoading}
+ isEmptyState={!hasSchema}
+ emptyState={}
+ >
+
+
+ {isModalOpen && (
+
+ )}
+
);
};
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/schema/add_field_modal/index.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/schema/add_field_modal/index.tsx
index 902417d02665e..ba9da900c0145 100644
--- a/x-pack/plugins/enterprise_search/public/applications/shared/schema/add_field_modal/index.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/schema/add_field_modal/index.tsx
@@ -10,6 +10,7 @@ import React, { ChangeEvent, FormEvent, useEffect, useState } from 'react';
import {
EuiButton,
EuiButtonEmpty,
+ EuiCallOut,
EuiFieldText,
EuiFlexGroup,
EuiFlexItem,
@@ -83,8 +84,13 @@ export const SchemaAddFieldModal: React.FC = ({
{ADD_FIELD_MODAL_TITLE}
- {ADD_FIELD_MODAL_DESCRIPTION}
-
+ {ADD_FIELD_MODAL_DESCRIPTION}}
+ />
+
From dec77cfafb0cd557eaf7a6d2ab72280b9801fb6d Mon Sep 17 00:00:00 2001
From: Chris Roberson
Date: Tue, 22 Jun 2021 16:01:43 -0400
Subject: [PATCH 48/63] [Alerting] Add event log entry when an action starts
executing (#102370)
* First steps for adding action execution to event log
* Fix tests
* Move the event to the actions plugin
* Update functional tests
* Fix tests
* Fix types
---
.../actions/server/constants/event_log.ts | 1 +
.../server/lib/action_executor.test.ts | 47 ++++++++++-
.../actions/server/lib/action_executor.ts | 12 +++
.../tests/actions/execute.ts | 78 +++++++++++++++----
.../spaces_only/tests/actions/execute.ts | 50 ++++++++----
5 files changed, 156 insertions(+), 32 deletions(-)
diff --git a/x-pack/plugins/actions/server/constants/event_log.ts b/x-pack/plugins/actions/server/constants/event_log.ts
index 508709c8783ab..9163a0d105ce8 100644
--- a/x-pack/plugins/actions/server/constants/event_log.ts
+++ b/x-pack/plugins/actions/server/constants/event_log.ts
@@ -8,5 +8,6 @@
export const EVENT_LOG_PROVIDER = 'actions';
export const EVENT_LOG_ACTIONS = {
execute: 'execute',
+ executeStart: 'execute-start',
executeViaHttp: 'execute-via-http',
};
diff --git a/x-pack/plugins/actions/server/lib/action_executor.test.ts b/x-pack/plugins/actions/server/lib/action_executor.test.ts
index 8ec94c4d4a552..37d461d6b2a50 100644
--- a/x-pack/plugins/actions/server/lib/action_executor.test.ts
+++ b/x-pack/plugins/actions/server/lib/action_executor.test.ts
@@ -23,6 +23,7 @@ const services = actionsMock.createServices();
const actionsClient = actionsClientMock.create();
const encryptedSavedObjectsClient = encryptedSavedObjectsMock.createClient();
const actionTypeRegistry = actionTypeRegistryMock.create();
+const eventLogger = eventLoggerMock.create();
const executeParams = {
actionId: '1',
@@ -42,7 +43,7 @@ actionExecutor.initialize({
getActionsClientWithRequest,
actionTypeRegistry,
encryptedSavedObjectsClient,
- eventLogger: eventLoggerMock.create(),
+ eventLogger,
preconfiguredActions: [],
});
@@ -379,6 +380,50 @@ test('logs a warning when alert executor returns invalid status', async () => {
);
});
+test('writes to event log for execute and execute start', async () => {
+ const executorMock = setupActionExecutorMock();
+ executorMock.mockResolvedValue({
+ actionId: '1',
+ status: 'ok',
+ });
+ await actionExecutor.execute(executeParams);
+ expect(eventLogger.logEvent).toHaveBeenCalledTimes(2);
+ expect(eventLogger.logEvent.mock.calls[0][0]).toMatchObject({
+ event: {
+ action: 'execute-start',
+ },
+ kibana: {
+ saved_objects: [
+ {
+ rel: 'primary',
+ type: 'action',
+ id: '1',
+ type_id: 'test',
+ namespace: 'some-namespace',
+ },
+ ],
+ },
+ message: 'action started: test:1: action-1',
+ });
+ expect(eventLogger.logEvent.mock.calls[1][0]).toMatchObject({
+ event: {
+ action: 'execute',
+ },
+ kibana: {
+ saved_objects: [
+ {
+ rel: 'primary',
+ type: 'action',
+ id: '1',
+ type_id: 'test',
+ namespace: 'some-namespace',
+ },
+ ],
+ },
+ message: 'action executed: test:1: action-1',
+ });
+});
+
function setupActionExecutorMock() {
const actionType: jest.Mocked = {
id: 'test',
diff --git a/x-pack/plugins/actions/server/lib/action_executor.ts b/x-pack/plugins/actions/server/lib/action_executor.ts
index 9d2b937734fb0..e9e7b17288611 100644
--- a/x-pack/plugins/actions/server/lib/action_executor.ts
+++ b/x-pack/plugins/actions/server/lib/action_executor.ts
@@ -7,6 +7,7 @@
import type { PublicMethodsOf } from '@kbn/utility-types';
import { Logger, KibanaRequest } from 'src/core/server';
+import { cloneDeep } from 'lodash';
import { withSpan } from '@kbn/apm-utils';
import { validateParams, validateConfig, validateSecrets } from './validate_with_schema';
import {
@@ -168,6 +169,17 @@ export class ActionExecutor {
}
eventLogger.startTiming(event);
+
+ const startEvent = cloneDeep({
+ ...event,
+ event: {
+ ...event.event,
+ action: EVENT_LOG_ACTIONS.executeStart,
+ },
+ message: `action started: ${actionLabel}`,
+ });
+ eventLogger.logEvent(startEvent);
+
let rawResult: ActionTypeExecutorResult;
try {
rawResult = await actionType.executor({
diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/execute.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/execute.ts
index f7d7c1df8fd46..5c578d2d08dae 100644
--- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/execute.ts
+++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/execute.ts
@@ -519,47 +519,93 @@ export default function ({ getService }: FtrProviderContext) {
type: 'action',
id: connectorId,
provider: 'actions',
- actions: new Map([['execute', { equal: 1 }]]),
- filter: 'event.action:(execute)',
+ actions: new Map([
+ ['execute-start', { equal: 1 }],
+ ['execute', { equal: 1 }],
+ ]),
+ // filter: 'event.action:(execute)',
});
});
- const event = events[0];
+ const startExecuteEvent = events[0];
+ const executeEvent = events[1];
- const duration = event?.event?.duration;
- const eventStart = Date.parse(event?.event?.start || 'undefined');
- const eventEnd = Date.parse(event?.event?.end || 'undefined');
+ const duration = executeEvent?.event?.duration;
+ const executeEventStart = Date.parse(executeEvent?.event?.start || 'undefined');
+ const startExecuteEventStart = Date.parse(startExecuteEvent?.event?.start || 'undefined');
+ const executeEventEnd = Date.parse(executeEvent?.event?.end || 'undefined');
const dateNow = Date.now();
expect(typeof duration).to.be('number');
- expect(eventStart).to.be.ok();
- expect(eventEnd).to.be.ok();
+ expect(executeEventStart).to.be.ok();
+ expect(startExecuteEventStart).to.equal(executeEventStart);
+ expect(executeEventEnd).to.be.ok();
const durationDiff = Math.abs(
- Math.round(duration! / NANOS_IN_MILLIS) - (eventEnd - eventStart)
+ Math.round(duration! / NANOS_IN_MILLIS) - (executeEventEnd - executeEventStart)
);
// account for rounding errors
expect(durationDiff < 1).to.equal(true);
- expect(eventStart <= eventEnd).to.equal(true);
- expect(eventEnd <= dateNow).to.equal(true);
+ expect(executeEventStart <= executeEventEnd).to.equal(true);
+ expect(executeEventEnd <= dateNow).to.equal(true);
- expect(event?.event?.outcome).to.equal(outcome);
+ expect(executeEvent?.event?.outcome).to.equal(outcome);
- expect(event?.kibana?.saved_objects).to.eql([
+ expect(executeEvent?.kibana?.saved_objects).to.eql([
{
rel: 'primary',
type: 'action',
id: connectorId,
+ namespace: 'space1',
type_id: actionTypeId,
- namespace: spaceId,
},
]);
+ expect(startExecuteEvent?.kibana?.saved_objects).to.eql(executeEvent?.kibana?.saved_objects);
- expect(event?.message).to.eql(message);
+ expect(executeEvent?.message).to.eql(message);
+ expect(startExecuteEvent?.message).to.eql(message.replace('executed', 'started'));
if (errorMessage) {
- expect(event?.error?.message).to.eql(errorMessage);
+ expect(executeEvent?.error?.message).to.eql(errorMessage);
}
+
+ // const event = events[0];
+
+ // const duration = event?.event?.duration;
+ // const eventStart = Date.parse(event?.event?.start || 'undefined');
+ // const eventEnd = Date.parse(event?.event?.end || 'undefined');
+ // const dateNow = Date.now();
+
+ // expect(typeof duration).to.be('number');
+ // expect(eventStart).to.be.ok();
+ // expect(eventEnd).to.be.ok();
+
+ // const durationDiff = Math.abs(
+ // Math.round(duration! / NANOS_IN_MILLIS) - (eventEnd - eventStart)
+ // );
+
+ // // account for rounding errors
+ // expect(durationDiff < 1).to.equal(true);
+ // expect(eventStart <= eventEnd).to.equal(true);
+ // expect(eventEnd <= dateNow).to.equal(true);
+
+ // expect(event?.event?.outcome).to.equal(outcome);
+
+ // expect(event?.kibana?.saved_objects).to.eql([
+ // {
+ // rel: 'primary',
+ // type: 'action',
+ // id: connectorId,
+ // type_id: actionTypeId,
+ // namespace: spaceId,
+ // },
+ // ]);
+
+ // expect(event?.message).to.eql(message);
+
+ // if (errorMessage) {
+ // expect(event?.error?.message).to.eql(errorMessage);
+ // }
}
}
diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/execute.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/execute.ts
index 147b6abfb88d1..d494c99c80e8f 100644
--- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/execute.ts
+++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/execute.ts
@@ -100,6 +100,7 @@ export default function ({ getService }: FtrProviderContext) {
actionTypeId: 'test.index-record',
outcome: 'success',
message: `action executed: test.index-record:${createdAction.id}: My action`,
+ startMessage: `action started: test.index-record:${createdAction.id}: My action`,
});
});
@@ -336,10 +337,19 @@ export default function ({ getService }: FtrProviderContext) {
outcome: string;
message: string;
errorMessage?: string;
+ startMessage?: string;
}
async function validateEventLog(params: ValidateEventLogParams): Promise {
- const { spaceId, actionId, actionTypeId, outcome, message, errorMessage } = params;
+ const {
+ spaceId,
+ actionId,
+ actionTypeId,
+ outcome,
+ message,
+ startMessage,
+ errorMessage,
+ } = params;
const events: IValidatedEvent[] = await retry.try(async () => {
return await getEventLog({
@@ -348,33 +358,39 @@ export default function ({ getService }: FtrProviderContext) {
type: 'action',
id: actionId,
provider: 'actions',
- actions: new Map([['execute', { equal: 1 }]]),
+ actions: new Map([
+ ['execute-start', { equal: 1 }],
+ ['execute', { equal: 1 }],
+ ]),
});
});
- const event = events[0];
+ const startExecuteEvent = events[0];
+ const executeEvent = events[1];
- const duration = event?.event?.duration;
- const eventStart = Date.parse(event?.event?.start || 'undefined');
- const eventEnd = Date.parse(event?.event?.end || 'undefined');
+ const duration = executeEvent?.event?.duration;
+ const executeEventStart = Date.parse(executeEvent?.event?.start || 'undefined');
+ const startExecuteEventStart = Date.parse(startExecuteEvent?.event?.start || 'undefined');
+ const executeEventEnd = Date.parse(executeEvent?.event?.end || 'undefined');
const dateNow = Date.now();
expect(typeof duration).to.be('number');
- expect(eventStart).to.be.ok();
- expect(eventEnd).to.be.ok();
+ expect(executeEventStart).to.be.ok();
+ expect(startExecuteEventStart).to.equal(executeEventStart);
+ expect(executeEventEnd).to.be.ok();
const durationDiff = Math.abs(
- Math.round(duration! / NANOS_IN_MILLIS) - (eventEnd - eventStart)
+ Math.round(duration! / NANOS_IN_MILLIS) - (executeEventEnd - executeEventStart)
);
// account for rounding errors
expect(durationDiff < 1).to.equal(true);
- expect(eventStart <= eventEnd).to.equal(true);
- expect(eventEnd <= dateNow).to.equal(true);
+ expect(executeEventStart <= executeEventEnd).to.equal(true);
+ expect(executeEventEnd <= dateNow).to.equal(true);
- expect(event?.event?.outcome).to.equal(outcome);
+ expect(executeEvent?.event?.outcome).to.equal(outcome);
- expect(event?.kibana?.saved_objects).to.eql([
+ expect(executeEvent?.kibana?.saved_objects).to.eql([
{
rel: 'primary',
type: 'action',
@@ -383,11 +399,15 @@ export default function ({ getService }: FtrProviderContext) {
type_id: actionTypeId,
},
]);
+ expect(startExecuteEvent?.kibana?.saved_objects).to.eql(executeEvent?.kibana?.saved_objects);
- expect(event?.message).to.eql(message);
+ expect(executeEvent?.message).to.eql(message);
+ if (startMessage) {
+ expect(startExecuteEvent?.message).to.eql(startMessage);
+ }
if (errorMessage) {
- expect(event?.error?.message).to.eql(errorMessage);
+ expect(executeEvent?.error?.message).to.eql(errorMessage);
}
}
}
From b161bf03be07d6bc9fe688c03be8909fc26bae5f Mon Sep 17 00:00:00 2001
From: Melissa Alvarez
Date: Tue, 22 Jun 2021 16:58:18 -0400
Subject: [PATCH 49/63] [ML] Anomaly Detection: Visualize delayed - data Part 2
(#102270)
* add link in datafeed tab.remove interval
* add annotation overlay to chart
* adds annotations checkbox
* ensure annotation with same start/end time show up in chart
* update annotations time format
* move time format to client
* adds info tooltip to modal title
* adds model snapshots to datafeed chart
---
x-pack/plugins/ml/common/types/results.ts | 4 +
.../annotations_table/annotations_table.js | 10 +-
.../components/datafeed_modal/constants.ts | 2 +-
.../datafeed_modal/datafeed_modal.tsx | 213 ++++++++++++++----
.../datafeed_modal/get_interval_options.ts | 118 ----------
.../components/job_details/job_details.js | 76 +++++--
.../job_details/job_details_pane.js | 13 +-
.../services/ml_api_service/results.ts | 7 +-
.../models/results_service/results_service.ts | 66 +++++-
9 files changed, 308 insertions(+), 201 deletions(-)
delete mode 100644 x-pack/plugins/ml/public/application/jobs/jobs_list/components/datafeed_modal/get_interval_options.ts
diff --git a/x-pack/plugins/ml/common/types/results.ts b/x-pack/plugins/ml/common/types/results.ts
index fa40cefcaed48..74d3286438588 100644
--- a/x-pack/plugins/ml/common/types/results.ts
+++ b/x-pack/plugins/ml/common/types/results.ts
@@ -6,6 +6,7 @@
*/
import { estypes } from '@elastic/elasticsearch';
+import { LineAnnotationDatum, RectAnnotationDatum } from '@elastic/charts';
export interface GetStoppedPartitionResult {
jobs: string[] | Record;
@@ -13,6 +14,9 @@ export interface GetStoppedPartitionResult {
export interface GetDatafeedResultsChartDataResult {
bucketResults: number[][];
datafeedResults: number[][];
+ annotationResultsRect: RectAnnotationDatum[];
+ annotationResultsLine: LineAnnotationDatum[];
+ modelSnapshotResultsLine: LineAnnotationDatum[];
}
export interface DatafeedResultsChartDataParams {
diff --git a/x-pack/plugins/ml/public/application/components/annotations/annotations_table/annotations_table.js b/x-pack/plugins/ml/public/application/components/annotations/annotations_table/annotations_table.js
index afed7e79ff757..b68e64a5d9f6a 100644
--- a/x-pack/plugins/ml/public/application/components/annotations/annotations_table/annotations_table.js
+++ b/x-pack/plugins/ml/public/application/components/annotations/annotations_table/annotations_table.js
@@ -494,13 +494,13 @@ class AnnotationsTableUI extends Component {
render: (annotation) => {
const viewDataFeedText = (
);
const viewDataFeedTooltipAriaLabelText = i18n.translate(
- 'xpack.ml.annotationsTable.viewDatafeedTooltipAriaLabel',
- { defaultMessage: 'View datafeed' }
+ 'xpack.ml.annotationsTable.datafeedChartTooltipAriaLabel',
+ { defaultMessage: 'Datafeed chart' }
);
return (
) : null}
diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/datafeed_modal/constants.ts b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/datafeed_modal/constants.ts
index 71f3795518bc9..b3b9487523196 100644
--- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/datafeed_modal/constants.ts
+++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/datafeed_modal/constants.ts
@@ -15,7 +15,7 @@ export const CHART_DIRECTION = {
export type ChartDirectionType = typeof CHART_DIRECTION[keyof typeof CHART_DIRECTION];
// [width, height]
-export const CHART_SIZE: ChartSizeArray = ['100%', 300];
+export const CHART_SIZE: ChartSizeArray = ['100%', 380];
export const TAB_IDS = {
CHART: 'chart',
diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/datafeed_modal/datafeed_modal.tsx b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/datafeed_modal/datafeed_modal.tsx
index cf547a49cac4c..2dece82e6f5c7 100644
--- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/datafeed_modal/datafeed_modal.tsx
+++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/datafeed_modal/datafeed_modal.tsx
@@ -11,25 +11,35 @@ import { i18n } from '@kbn/i18n';
import moment from 'moment';
import {
EuiButtonEmpty,
+ EuiCheckbox,
EuiDatePicker,
EuiFlexGroup,
EuiFlexItem,
+ EuiIcon,
+ EuiIconTip,
EuiLoadingChart,
EuiModal,
EuiModalHeader,
EuiModalBody,
- EuiSelect,
EuiSpacer,
EuiTabs,
EuiTab,
+ EuiText,
+ EuiTitle,
EuiToolTip,
+ htmlIdGenerator,
} from '@elastic/eui';
import {
+ AnnotationDomainType,
Axis,
Chart,
CurveType,
+ LineAnnotation,
LineSeries,
+ LineAnnotationDatum,
Position,
+ RectAnnotation,
+ RectAnnotationDatum,
ScaleType,
Settings,
timeFormatter,
@@ -42,7 +52,6 @@ import { useMlApiContext } from '../../../../contexts/kibana';
import { useCurrentEuiTheme } from '../../../../components/color_range_legend';
import { JobMessagesPane } from '../job_details/job_messages_pane';
import { EditQueryDelay } from './edit_query_delay';
-import { getIntervalOptions } from './get_interval_options';
import {
CHART_DIRECTION,
ChartDirectionType,
@@ -53,12 +62,18 @@ import {
} from './constants';
import { loadFullJob } from '../utils';
-const dateFormatter = timeFormatter('MM-DD HH:mm');
+const dateFormatter = timeFormatter('MM-DD HH:mm:ss');
+const MAX_CHART_POINTS = 480;
interface DatafeedModalProps {
jobId: string;
end: number;
- onClose: (deletionApproved?: boolean) => void;
+ onClose: () => void;
+}
+
+function setLineAnnotationHeader(lineDatum: LineAnnotationDatum) {
+ lineDatum.header = dateFormatter(lineDatum.dataValue);
+ return lineDatum;
}
export const DatafeedModal: FC = ({ jobId, end, onClose }) => {
@@ -68,11 +83,17 @@ export const DatafeedModal: FC = ({ jobId, end, onClose }) =
isInitialized: boolean;
}>({ datafeedConfig: undefined, bucketSpan: undefined, isInitialized: false });
const [endDate, setEndDate] = useState(moment(end));
- const [interval, setInterval] = useState();
const [selectedTabId, setSelectedTabId] = useState(TAB_IDS.CHART);
const [isLoadingChartData, setIsLoadingChartData] = useState(false);
const [bucketData, setBucketData] = useState([]);
+ const [annotationData, setAnnotationData] = useState<{
+ rect: RectAnnotationDatum[];
+ line: LineAnnotationDatum[];
+ }>({ rect: [], line: [] });
+ const [modelSnapshotData, setModelSnapshotData] = useState([]);
const [sourceData, setSourceData] = useState([]);
+ const [showAnnotations, setShowAnnotations] = useState(true);
+ const [showModelSnapshots, setShowModelSnapshots] = useState(true);
const {
results: { getDatafeedResultChartData },
@@ -102,25 +123,30 @@ export const DatafeedModal: FC = ({ jobId, end, onClose }) =
const handleChange = (date: moment.Moment) => setEndDate(date);
const handleEndDateChange = (direction: ChartDirectionType) => {
- if (interval === undefined) return;
+ if (data.bucketSpan === undefined) return;
const newEndDate = endDate.clone();
- const [count, type] = interval.split(' ');
+ const unitMatch = data.bucketSpan.match(/[d | h| m | s]/g)!;
+ const unit = unitMatch[0];
+ const count = Number(data.bucketSpan.replace(/[^0-9]/g, ''));
if (direction === CHART_DIRECTION.FORWARD) {
- newEndDate.add(Number(count), type);
+ newEndDate.add(MAX_CHART_POINTS * count, unit);
} else {
- newEndDate.subtract(Number(count), type);
+ newEndDate.subtract(MAX_CHART_POINTS * count, unit);
}
setEndDate(newEndDate);
};
const getChartData = useCallback(async () => {
- if (interval === undefined) return;
+ if (data.bucketSpan === undefined) return;
const endTimestamp = moment(endDate).valueOf();
- const [count, type] = interval.split(' ');
- const startMoment = endDate.clone().subtract(Number(count), type);
+ const unitMatch = data.bucketSpan.match(/[d | h| m | s]/g)!;
+ const unit = unitMatch[0];
+ const count = Number(data.bucketSpan.replace(/[^0-9]/g, ''));
+ // STARTTIME = ENDTIME - (BucketSpan * MAX_CHART_POINTS)
+ const startMoment = endDate.clone().subtract(MAX_CHART_POINTS * count, unit);
const startTimestamp = moment(startMoment).valueOf();
try {
@@ -128,6 +154,11 @@ export const DatafeedModal: FC = ({ jobId, end, onClose }) =
setSourceData(chartData.datafeedResults);
setBucketData(chartData.bucketResults);
+ setAnnotationData({
+ rect: chartData.annotationResultsRect,
+ line: chartData.annotationResultsLine.map(setLineAnnotationHeader),
+ });
+ setModelSnapshotData(chartData.modelSnapshotResultsLine.map(setLineAnnotationHeader));
} catch (error) {
const title = i18n.translate('xpack.ml.jobsList.datafeedModal.errorToastTitle', {
defaultMessage: 'Error fetching data',
@@ -135,7 +166,7 @@ export const DatafeedModal: FC = ({ jobId, end, onClose }) =
displayErrorToast(error, title);
}
setIsLoadingChartData(false);
- }, [endDate, interval]);
+ }, [endDate, data.bucketSpan]);
const getJobData = async () => {
try {
@@ -145,11 +176,6 @@ export const DatafeedModal: FC = ({ jobId, end, onClose }) =
bucketSpan: job.analysis_config.bucket_span,
isInitialized: true,
});
- const intervalOptions = getIntervalOptions(job.analysis_config.bucket_span);
- const initialInterval = intervalOptions.length
- ? intervalOptions[intervalOptions.length - 1]
- : undefined;
- setInterval(initialInterval?.value || '72 hours');
} catch (error) {
displayErrorToast(error);
}
@@ -161,20 +187,17 @@ export const DatafeedModal: FC = ({ jobId, end, onClose }) =
useEffect(
function loadChartData() {
- if (interval !== undefined) {
+ if (data.bucketSpan !== undefined) {
setIsLoadingChartData(true);
getChartData();
}
},
- [endDate, interval]
+ [endDate, data.bucketSpan]
);
const { datafeedConfig, bucketSpan, isInitialized } = data;
-
- const intervalOptions = useMemo(() => {
- if (bucketSpan === undefined) return [];
- return getIntervalOptions(bucketSpan);
- }, [bucketSpan]);
+ const checkboxIdAnnotation = useMemo(() => htmlIdGenerator()(), []);
+ const checkboxIdModelSnapshot = useMemo(() => htmlIdGenerator()(), []);
return (
= ({ jobId, end, onClose }) =
-
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
= ({ jobId, end, onClose }) =
-
- setInterval(e.target.value)}
- aria-label={i18n.translate(
- 'xpack.ml.jobsList.datafeedModal.intervalSelection',
- {
- defaultMessage: 'Datafeed modal chart interval selection',
- }
- )}
- />
-
= ({ jobId, end, onClose }) =
isEnabled={datafeedConfig.state === DATAFEED_STATE.STOPPED}
/>
+
+
+
+
+
+
+ }
+ checked={showAnnotations}
+ onChange={() => setShowAnnotations(!showAnnotations)}
+ />
+
+
+
+
+
+ }
+ checked={showModelSnapshots}
+ onChange={() => setShowModelSnapshots(!showModelSnapshots)}
+ />
+
+
+
@@ -298,7 +362,65 @@ export const DatafeedModal: FC = ({ jobId, end, onClose }) =
})}
position={Position.Left}
/>
+ {showModelSnapshots ? (
+ }
+ markerPosition={Position.Top}
+ style={{
+ line: {
+ strokeWidth: 3,
+ stroke: euiTheme.euiColorVis1,
+ opacity: 0.5,
+ },
+ }}
+ />
+ ) : null}
+ {showAnnotations ? (
+ <>
+ }
+ markerPosition={Position.Top}
+ style={{
+ line: {
+ strokeWidth: 3,
+ stroke: euiTheme.euiColorDangerText,
+ opacity: 0.5,
+ },
+ }}
+ />
+
+ >
+ ) : null}
= ({ jobId, end, onClose }) =
curve={CurveType.LINEAR}
/>
{
- const unitMatch = bucketSpan.match(/[d | h| m | s]/g)!;
- const unit = unitMatch[0];
- const count = Number(bucketSpan.replace(/[^0-9]/g, ''));
-
- const intervalOptions = [];
-
- if (['s', 'ms', 'micros', 'nanos'].includes(unit)) {
- intervalOptions.push(
- {
- value: '1 hour',
- text: i18n.translate('xpack.ml.jobsList.datafeedModal.1hourOption', {
- defaultMessage: '{count} hour',
- values: { count: 1 },
- }),
- },
- {
- value: '2 hours',
- text: i18n.translate('xpack.ml.jobsList.datafeedModal.2hourOption', {
- defaultMessage: '{count} hours',
- values: { count: 2 },
- }),
- }
- );
- }
-
- if ((unit === 'm' && count <= 4) || unit === 'h') {
- intervalOptions.push(
- {
- value: '3 hours',
- text: i18n.translate('xpack.ml.jobsList.datafeedModal.3hourOption', {
- defaultMessage: '{count} hours',
- values: { count: 3 },
- }),
- },
- {
- value: '8 hours',
- text: i18n.translate('xpack.ml.jobsList.datafeedModal.8hourOption', {
- defaultMessage: '{count} hours',
- values: { count: 8 },
- }),
- },
- {
- value: '12 hours',
- text: i18n.translate('xpack.ml.jobsList.datafeedModal.12hourOption', {
- defaultMessage: '{count} hours',
- values: { count: 12 },
- }),
- },
- {
- value: '24 hours',
- text: i18n.translate('xpack.ml.jobsList.datafeedModal.24hourOption', {
- defaultMessage: '{count} hours',
- values: { count: 24 },
- }),
- }
- );
- }
-
- if ((unit === 'm' && count >= 5 && count <= 15) || unit === 'h') {
- intervalOptions.push(
- {
- value: '48 hours',
- text: i18n.translate('xpack.ml.jobsList.datafeedModal.48hourOption', {
- defaultMessage: '{count} hours',
- values: { count: 48 },
- }),
- },
- {
- value: '72 hours',
- text: i18n.translate('xpack.ml.jobsList.datafeedModal.72hourOption', {
- defaultMessage: '{count} hours',
- values: { count: 72 },
- }),
- }
- );
- }
-
- if ((unit === 'm' && count >= 10 && count <= 15) || unit === 'h' || unit === 'd') {
- intervalOptions.push(
- {
- value: '5 days',
- text: i18n.translate('xpack.ml.jobsList.datafeedModal.5daysOption', {
- defaultMessage: '{count} days',
- values: { count: 5 },
- }),
- },
- {
- value: '7 days',
- text: i18n.translate('xpack.ml.jobsList.datafeedModal.7daysOption', {
- defaultMessage: '{count} days',
- values: { count: 7 },
- }),
- }
- );
- }
-
- if (unit === 'h' || unit === 'd') {
- intervalOptions.push({
- value: '14 days',
- text: i18n.translate('xpack.ml.jobsList.datafeedModal.14DaysOption', {
- defaultMessage: '{count} days',
- values: { count: 14 },
- }),
- });
- }
-
- return intervalOptions;
-};
diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/job_details/job_details.js b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/job_details/job_details.js
index b514c8433daf4..d3856e6afa398 100644
--- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/job_details/job_details.js
+++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/job_details/job_details.js
@@ -7,26 +7,29 @@
import PropTypes from 'prop-types';
import React, { Component, Fragment } from 'react';
-
-import { EuiTabbedContent, EuiLoadingSpinner } from '@elastic/eui';
+import { FormattedMessage } from '@kbn/i18n/react';
+import { i18n } from '@kbn/i18n';
+import { EuiButtonIcon, EuiTabbedContent, EuiLoadingSpinner, EuiToolTip } from '@elastic/eui';
import { extractJobDetails } from './extract_job_details';
import { JsonPane } from './json_tab';
import { DatafeedPreviewPane } from './datafeed_preview_tab';
import { AnnotationsTable } from '../../../../components/annotations/annotations_table';
+import { DatafeedModal } from '../datafeed_modal';
import { AnnotationFlyout } from '../../../../components/annotations/annotation_flyout';
import { ModelSnapshotTable } from '../../../../components/model_snapshots';
import { ForecastsTable } from './forecasts_table';
import { JobDetailsPane } from './job_details_pane';
import { JobMessagesPane } from './job_messages_pane';
-import { i18n } from '@kbn/i18n';
import { withKibana } from '../../../../../../../../../src/plugins/kibana_react/public';
export class JobDetailsUI extends Component {
constructor(props) {
super(props);
- this.state = {};
+ this.state = {
+ datafeedModalVisible: false,
+ };
if (this.props.addYourself) {
this.props.addYourself(props.jobId, (j) => this.updateJob(j));
}
@@ -77,6 +80,30 @@ export class JobDetailsUI extends Component {
alertRules,
} = extractJobDetails(job, basePath, refreshJobList);
+ datafeed.titleAction = (
+
+ }
+ >
+
+ this.setState({
+ datafeedModalVisible: true,
+ })
+ }
+ />
+
+ );
+
const tabs = [
{
id: 'job-settings',
@@ -105,6 +132,32 @@ export class JobDetailsUI extends Component {
/>
),
},
+ {
+ id: 'datafeed',
+ 'data-test-subj': 'mlJobListTab-datafeed',
+ name: i18n.translate('xpack.ml.jobsList.jobDetails.tabs.datafeedLabel', {
+ defaultMessage: 'Datafeed',
+ }),
+ content: (
+ <>
+
+ {this.props.jobId && this.state.datafeedModalVisible ? (
+ {
+ this.setState({
+ datafeedModalVisible: false,
+ });
+ }}
+ end={job.data_counts.latest_bucket_timestamp}
+ jobId={this.props.jobId}
+ />
+ ) : null}
+ >
+ ),
+ },
{
id: 'counts',
'data-test-subj': 'mlJobListTab-counts',
@@ -137,21 +190,6 @@ export class JobDetailsUI extends Component {
];
if (showFullDetails && datafeed.items.length) {
- // Datafeed should be at index 2 in tabs array for full details
- tabs.splice(2, 0, {
- id: 'datafeed',
- 'data-test-subj': 'mlJobListTab-datafeed',
- name: i18n.translate('xpack.ml.jobsList.jobDetails.tabs.datafeedLabel', {
- defaultMessage: 'Datafeed',
- }),
- content: (
-
- ),
- });
-
tabs.push(
{
id: 'datafeed-preview',
diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/job_details/job_details_pane.js b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/job_details/job_details_pane.js
index 49d9bcde49052..4046f4d5d8071 100644
--- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/job_details/job_details_pane.js
+++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/job_details/job_details_pane.js
@@ -9,6 +9,8 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import {
+ EuiFlexGroup,
+ EuiFlexItem,
EuiTitle,
EuiTable,
EuiTableBody,
@@ -42,9 +44,14 @@ function Section({ section }) {
return (
-
- {section.title}
-
+
+
+
+ {section.title}
+
+
+ {section.titleAction}
+
diff --git a/x-pack/plugins/ml/public/application/services/ml_api_service/results.ts b/x-pack/plugins/ml/public/application/services/ml_api_service/results.ts
index 19ba5aa304bf0..25ef36782207f 100644
--- a/x-pack/plugins/ml/public/application/services/ml_api_service/results.ts
+++ b/x-pack/plugins/ml/public/application/services/ml_api_service/results.ts
@@ -6,7 +6,10 @@
*/
// Service for obtaining data for the ML Results dashboards.
-import { GetStoppedPartitionResult } from '../../../../common/types/results';
+import {
+ GetStoppedPartitionResult,
+ GetDatafeedResultsChartDataResult,
+} from '../../../../common/types/results';
import { HttpService } from '../http_service';
import { basePath } from './index';
import { JobId } from '../../../../common/types/anomaly_detection_jobs';
@@ -148,7 +151,7 @@ export const resultsApiProvider = (httpService: HttpService) => ({
start,
end,
});
- return httpService.http({
+ return httpService.http({
path: `${basePath()}/results/datafeed_results_chart`,
method: 'POST',
body,
diff --git a/x-pack/plugins/ml/server/models/results_service/results_service.ts b/x-pack/plugins/ml/server/models/results_service/results_service.ts
index 9413ee00184d2..81ee394b99704 100644
--- a/x-pack/plugins/ml/server/models/results_service/results_service.ts
+++ b/x-pack/plugins/ml/server/models/results_service/results_service.ts
@@ -27,6 +27,7 @@ import {
import { MlJobsResponse } from '../../../common/types/job_service';
import type { MlClient } from '../../lib/ml_client';
import { datafeedsProvider } from '../job_service/datafeeds';
+import { annotationServiceProvider } from '../annotation_service';
// Service for carrying out Elasticsearch queries to obtain data for the
// ML Results dashboards.
@@ -620,13 +621,19 @@ export function resultsServiceProvider(mlClient: MlClient, client?: IScopedClust
const finalResults: GetDatafeedResultsChartDataResult = {
bucketResults: [],
datafeedResults: [],
+ annotationResultsRect: [],
+ annotationResultsLine: [],
+ modelSnapshotResultsLine: [],
};
const { getDatafeedByJobId } = datafeedsProvider(client!, mlClient);
- const datafeedConfig = await getDatafeedByJobId(jobId);
- const { body: jobsResponse } = await mlClient.getJobs({ job_id: jobId });
- if (jobsResponse.count === 0 || jobsResponse.jobs === undefined) {
+ const [datafeedConfig, { body: jobsResponse }] = await Promise.all([
+ getDatafeedByJobId(jobId),
+ mlClient.getJobs({ job_id: jobId }),
+ ]);
+
+ if (jobsResponse && (jobsResponse.count === 0 || jobsResponse.jobs === undefined)) {
throw Boom.notFound(`Job with the id "${jobId}" not found`);
}
@@ -696,10 +703,25 @@ export function resultsServiceProvider(mlClient: MlClient, client?: IScopedClust
]) || [];
}
- const bucketResp = await mlClient.getBuckets({
- job_id: jobId,
- body: { desc: true, start: String(start), end: String(end), page: { from: 0, size: 1000 } },
- });
+ const { getAnnotations } = annotationServiceProvider(client!);
+
+ const [bucketResp, annotationResp, { body: modelSnapshotsResp }] = await Promise.all([
+ mlClient.getBuckets({
+ job_id: jobId,
+ body: { desc: true, start: String(start), end: String(end), page: { from: 0, size: 1000 } },
+ }),
+ getAnnotations({
+ jobIds: [jobId],
+ earliestMs: start,
+ latestMs: end,
+ maxAnnotations: 1000,
+ }),
+ mlClient.getModelSnapshots({
+ job_id: jobId,
+ start: String(start),
+ end: String(end),
+ }),
+ ]);
const bucketResults = bucketResp?.body?.buckets ?? [];
bucketResults.forEach((dataForTime) => {
@@ -708,6 +730,36 @@ export function resultsServiceProvider(mlClient: MlClient, client?: IScopedClust
finalResults.bucketResults.push([timestamp, eventCount]);
});
+ const annotationResults = annotationResp.annotations[jobId] || [];
+ annotationResults.forEach((annotation) => {
+ const timestamp = Number(annotation?.timestamp);
+ const endTimestamp = Number(annotation?.end_timestamp);
+ if (timestamp === endTimestamp) {
+ finalResults.annotationResultsLine.push({
+ dataValue: timestamp,
+ details: annotation.annotation,
+ });
+ } else {
+ finalResults.annotationResultsRect.push({
+ coordinates: {
+ x0: timestamp,
+ x1: endTimestamp,
+ },
+ details: annotation.annotation,
+ });
+ }
+ });
+
+ const modelSnapshots = modelSnapshotsResp?.model_snapshots ?? [];
+ modelSnapshots.forEach((modelSnapshot) => {
+ const timestamp = Number(modelSnapshot?.timestamp);
+
+ finalResults.modelSnapshotResultsLine.push({
+ dataValue: timestamp,
+ details: modelSnapshot.description,
+ });
+ });
+
return finalResults;
}
From e580d5a1e2936bb9357d8ec5f12f7c50653937d8 Mon Sep 17 00:00:00 2001
From: Constance
Date: Tue, 22 Jun 2021 14:43:54 -0700
Subject: [PATCH 50/63] [App Search] Convert Result Settings & Relevance Tuning
pages to new page template (#102845)
* Convert Result Settings page to new page template
+ remove wrapper around empty state (auto handled by new page template)
+ update tests w/ new test helpers
* Convert Relevance Tuning page to new page template
- Remove old relevance_tuning_layout (which handled breadcrumbs, page header, flash messages, and callouts) in favor of simply using the new templtate + callouts (yay DRYing)
- Remove panel wrapper around empty state (handled by new page template)
* Update router
* [Polish] Spacing & icon polish from Davey
see https://github.com/elastic/kibana/pull/101958/files
---
.../components/engine/engine_router.tsx | 20 ++--
.../components/empty_state.tsx | 62 ++++++-----
.../relevance_tuning.test.tsx | 57 +++++-----
.../relevance_tuning/relevance_tuning.tsx | 74 +++++++++----
.../relevance_tuning_form.tsx | 2 +-
.../relevance_tuning_layout.test.tsx | 64 -----------
.../relevance_tuning_layout.tsx | 73 -------------
.../relevance_tuning_preview.tsx | 1 +
.../components/empty_state.tsx | 62 ++++++-----
.../result_settings/result_settings.test.tsx | 56 ++++------
.../result_settings/result_settings.tsx | 101 +++++++++---------
11 files changed, 224 insertions(+), 348 deletions(-)
delete mode 100644 x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_layout.test.tsx
delete mode 100644 x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_layout.tsx
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx
index 91a21847107a9..04e252e44270b 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx
@@ -114,6 +114,16 @@ export const EngineRouter: React.FC = () => {
)}
+ {canManageEngineRelevanceTuning && (
+
+
+
+ )}
+ {canManageEngineResultSettings && (
+
+
+
+ )}
{canManageEngineSearchUi && (
@@ -131,21 +141,11 @@ export const EngineRouter: React.FC = () => {
)}
- {canManageEngineRelevanceTuning && (
-
-
-
- )}
{canManageEngineSynonyms && (
)}
- {canManageEngineResultSettings && (
-
-
-
- )}
{canViewMetaEngineSourceEngines && (
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/components/empty_state.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/components/empty_state.tsx
index e6a14d7b5cd72..df29010bd682f 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/components/empty_state.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/components/empty_state.tsx
@@ -7,42 +7,40 @@
import React from 'react';
-import { EuiButton, EuiEmptyPrompt, EuiPanel } from '@elastic/eui';
+import { EuiButton, EuiEmptyPrompt } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { DOCS_PREFIX } from '../../../routes';
export const EmptyState: React.FC = () => (
-
-
- {i18n.translate('xpack.enterpriseSearch.appSearch.engine.relevanceTuning.empty.title', {
- defaultMessage: 'Add documents to tune relevance',
- })}
-
+
+ {i18n.translate('xpack.enterpriseSearch.appSearch.engine.relevanceTuning.empty.title', {
+ defaultMessage: 'Add documents to tune relevance',
+ })}
+
+ }
+ body={i18n.translate(
+ 'xpack.enterpriseSearch.appSearch.engine.relevanceTuning.empty.description',
+ {
+ defaultMessage:
+ 'A schema will be automatically created for you after you index some documents.',
}
- body={i18n.translate(
- 'xpack.enterpriseSearch.appSearch.engine.relevanceTuning.empty.description',
- {
- defaultMessage:
- 'A schema will be automatically created for you after you index some documents.',
- }
- )}
- actions={
-
- {i18n.translate(
- 'xpack.enterpriseSearch.appSearch.engine.relevanceTuning.empty.buttonLabel',
- { defaultMessage: 'Read the relevance tuning guide' }
- )}
-
- }
- />
-
+ )}
+ actions={
+
+ {i18n.translate(
+ 'xpack.enterpriseSearch.appSearch.engine.relevanceTuning.empty.buttonLabel',
+ { defaultMessage: 'Read the relevance tuning guide' }
+ )}
+
+ }
+ />
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning.test.tsx
index 092740ac5d3cc..48b536a954ed5 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning.test.tsx
@@ -13,14 +13,14 @@ import React from 'react';
import { shallow } from 'enzyme';
-import { EuiEmptyPrompt } from '@elastic/eui';
-
-import { Loading } from '../../../shared/loading';
import { UnsavedChangesPrompt } from '../../../shared/unsaved_changes_prompt';
+import { getPageHeaderActions } from '../../../test_helpers';
-import { EmptyState } from './components';
import { RelevanceTuning } from './relevance_tuning';
+
+import { RelevanceTuningCallouts } from './relevance_tuning_callouts';
import { RelevanceTuningForm } from './relevance_tuning_form';
+import { RelevanceTuningPreview } from './relevance_tuning_preview';
describe('RelevanceTuning', () => {
const values = {
@@ -50,9 +50,9 @@ describe('RelevanceTuning', () => {
it('renders', () => {
const wrapper = subject();
+ expect(wrapper.find(RelevanceTuningCallouts).exists()).toBe(true);
expect(wrapper.find(RelevanceTuningForm).exists()).toBe(true);
- expect(wrapper.find(Loading).exists()).toBe(false);
- expect(wrapper.find(EmptyState).exists()).toBe(false);
+ expect(wrapper.find(RelevanceTuningPreview).exists()).toBe(true);
});
it('initializes relevance tuning data', () => {
@@ -60,33 +60,38 @@ describe('RelevanceTuning', () => {
expect(actions.initializeRelevanceTuning).toHaveBeenCalled();
});
- it('will render an empty message when the engine has no schema', () => {
+ it('will prevent user from leaving the page if there are unsaved changes', () => {
setMockValues({
...values,
- engineHasSchemaFields: false,
+ unsavedChanges: true,
});
- const wrapper = subject();
- expect(wrapper.find(EmptyState).dive().find(EuiEmptyPrompt).exists()).toBe(true);
- expect(wrapper.find(Loading).exists()).toBe(false);
- expect(wrapper.find(RelevanceTuningForm).exists()).toBe(false);
+ expect(subject().find(UnsavedChangesPrompt).prop('hasUnsavedChanges')).toBe(true);
});
- it('will show a loading message if data is loading', () => {
- setMockValues({
- ...values,
- dataLoading: true,
+ describe('header actions', () => {
+ it('renders a Save button that will save the current changes', () => {
+ const buttons = getPageHeaderActions(subject());
+ expect(buttons.children().length).toBe(2);
+ const saveButton = buttons.find('[data-test-subj="SaveRelevanceTuning"]');
+ saveButton.simulate('click');
+ expect(actions.updateSearchSettings).toHaveBeenCalled();
});
- const wrapper = subject();
- expect(wrapper.find(Loading).exists()).toBe(true);
- expect(wrapper.find(EmptyState).exists()).toBe(false);
- expect(wrapper.find(RelevanceTuningForm).exists()).toBe(false);
- });
- it('will prevent user from leaving the page if there are unsaved changes', () => {
- setMockValues({
- ...values,
- unsavedChanges: true,
+ it('renders a Reset button that will remove all weights and boosts', () => {
+ const buttons = getPageHeaderActions(subject());
+ expect(buttons.children().length).toBe(2);
+ const resetButton = buttons.find('[data-test-subj="ResetRelevanceTuning"]');
+ resetButton.simulate('click');
+ expect(actions.resetSearchSettings).toHaveBeenCalled();
+ });
+
+ it('will not render buttons if the engine has no schema', () => {
+ setMockValues({
+ ...values,
+ engineHasSchemaFields: false,
+ });
+ const buttons = getPageHeaderActions(subject());
+ expect(buttons.children().length).toBe(0);
});
- expect(subject().find(UnsavedChangesPrompt).prop('hasUnsavedChanges')).toBe(true);
});
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning.tsx
index b98541a963890..2e87d6836199b 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning.tsx
@@ -9,43 +9,77 @@ import React, { useEffect } from 'react';
import { useActions, useValues } from 'kea';
-import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
+import { EuiFlexGroup, EuiFlexItem, EuiButton } from '@elastic/eui';
+import { i18n } from '@kbn/i18n';
-import { Loading } from '../../../shared/loading';
+import { SAVE_BUTTON_LABEL } from '../../../shared/constants';
import { UnsavedChangesPrompt } from '../../../shared/unsaved_changes_prompt';
+import { RESTORE_DEFAULTS_BUTTON_LABEL } from '../../constants';
+import { getEngineBreadcrumbs } from '../engine';
+import { AppSearchPageTemplate } from '../layout';
import { EmptyState } from './components';
+import { RELEVANCE_TUNING_TITLE } from './constants';
+import { RelevanceTuningCallouts } from './relevance_tuning_callouts';
import { RelevanceTuningForm } from './relevance_tuning_form';
-import { RelevanceTuningLayout } from './relevance_tuning_layout';
import { RelevanceTuningPreview } from './relevance_tuning_preview';
import { RelevanceTuningLogic } from '.';
export const RelevanceTuning: React.FC = () => {
const { dataLoading, engineHasSchemaFields, unsavedChanges } = useValues(RelevanceTuningLogic);
- const { initializeRelevanceTuning } = useActions(RelevanceTuningLogic);
+ const { initializeRelevanceTuning, resetSearchSettings, updateSearchSettings } = useActions(
+ RelevanceTuningLogic
+ );
useEffect(() => {
initializeRelevanceTuning();
}, []);
- if (dataLoading) return ;
-
return (
-
+
+ {SAVE_BUTTON_LABEL}
+ ,
+
+ {RESTORE_DEFAULTS_BUTTON_LABEL}
+ ,
+ ]
+ : [],
+ }}
+ isLoading={dataLoading}
+ isEmptyState={!engineHasSchemaFields}
+ emptyState={}
+ >
- {engineHasSchemaFields ? (
-
-
-
-
-
-
-
-
- ) : (
-
- )}
-
+
+
+
+
+
+
+
+
+
+
+
);
};
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.tsx
index 5cbd291f85deb..c35cd280c7a05 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.tsx
@@ -42,7 +42,7 @@ export const RelevanceTuningForm: React.FC = () => {
return (
+ >
);
}
From 4fa3dc46cb14f041d21b1b6a06961eb490602701 Mon Sep 17 00:00:00 2001
From: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Date: Tue, 22 Jun 2021 18:56:33 -0400
Subject: [PATCH 53/63] [RAC] T-Grid is moving to a new home (#100265)
* wip
* First pass at standalone and embedded redux stores and usage
* wip
* First pass at standalone and embedded redux stores and usage
* wip
* clean up
* wip
* refact(NA): remove extra pkg_npm target and add specific target folders on @kbn/i18n
* cleanup
* - fixes type errors in tests
* WIP remove use_manage_timeline
* wip add query + selector
* finishing integrating timeline manage context from redux
* integrating t-grid in security solution
* fix RowRender type
* WIP begin to move components from package to plugin
* integration of t-grid inside of security solution
* wip to make redux work
* little trick to make it render
* - fixes a few type errors
* better integration betwen tgrid and security solutions
* bringing back tsconfig on timeline
* wip integration t-grid in observability
* fix types
* fix type in security solutions
* add type to import + trie dto get the bundle size as small as possible
* fix type in integration test
* fix type in integration test
* - fix tests
* clean up to use technical fields
* - fixes unit tests
* - mocks the `useDateFormat` function of the `useKibana` service to fix unit tests
* fix t-grid settings vs create timeline + fix inspect button
* fix last suites test
* Update unit tests, snapshots and lint
* Fix bad merge
* fix plugin export
* Fix some failing tests
* fix unit tets in timelines plugins
* fix latest test
* fix i18n
* free obs from t-grid
* Fix timeline functional plugin types
* fix store provider
* Update failing defaultHeader test
* Fix i18n usage in security solution
* Fix remaining i18n errors in timelines plugin
* Dedupe common shared types
* move drag and drop utils in package to avoid duplication
* More shared type cleanup
* add feature flag
* review I
* fix merge with master
* fix i18n translation
* More type deduping
* Use @kbn/common-utils, fix remaining types
* fix types
* fix tests
* missing type
* fix cypress tests
Co-authored-by: Kevin Qualters
Co-authored-by: Tiago Costa
Co-authored-by: Andrew Goldstein
---
.eslintrc.js | 12 +-
package.json | 4 +
packages/BUILD.bazel | 3 +-
packages/kbn-optimizer/limits.yml | 4 +-
.../kbn-securitysolution-t-grid/BUILD.bazel | 125 +
.../kbn-securitysolution-t-grid/README.md | 3 +
.../babel.config.js | 19 +
.../jest.config.js | 13 +
.../kbn-securitysolution-t-grid/package.json | 10 +
.../react/package.json | 5 +
.../src/constants/index.ts | 26 +
.../kbn-securitysolution-t-grid/src/index.ts | 11 +
.../src/mock/index.ts | 9 +
.../src/mock}/mock_event_details.ts | 5 +-
.../src/utils/api/index.ts | 42 +
.../src/utils/drag_and_drop/index.ts | 133 +
.../src/utils/index.ts | 10 +
.../tsconfig.browser.json | 23 +
.../kbn-securitysolution-t-grid/tsconfig.json | 19 +
packages/kbn-test/jest-preset.js | 2 +-
tsconfig.json | 1 -
tsconfig.refs.json | 1 +
.../common/experimental_features.ts | 1 +
.../plugins/security_solution/common/index.ts | 4 +
.../common/search_strategy/common/index.ts | 68 +-
.../common/search_strategy/index.ts | 1 +
.../timeline/events/all/index.ts | 41 +-
.../timeline/events/common/index.ts | 24 +-
.../timeline/events/details/index.ts | 29 +-
.../timeline/events/eql/index.ts | 47 +-
.../timeline/events/last_event_time/index.ts | 43 +-
.../common/search_strategy/timeline/index.ts | 26 +-
.../security_solution/common/types/index.ts | 8 +
.../common/types/timeline/actions/index.ts | 14 +
.../common/types/timeline/cells/index.ts | 8 +
.../common/types/timeline/columns/index.ts | 13 +
.../types/timeline/data_provider/index.ts | 15 +
.../common/types/timeline/index.ts | 12 +
.../common/types/timeline/rows/index.ts | 7 +
.../common/types/timeline/store.ts | 97 +
.../common/utils/field_formatters.test.ts | 2 +-
.../integration/overview/overview.spec.ts | 2 +-
.../cypress/support/commands.js | 2 +-
x-pack/plugins/security_solution/kibana.json | 1 +
.../security_solution/public/app/app.tsx | 33 +-
.../common/components/accessibility/index.ts | 8 +
.../tooltip_with_keyboard_shortcut/index.tsx | 4 +-
.../components/alerts_viewer/alerts_table.tsx | 30 +-
.../alerts_viewer/default_headers.ts | 4 +-
.../charts/draggable_legend.test.tsx | 2 +
.../charts/draggable_legend_item.test.tsx | 2 +
.../drag_drop_context_wrapper.test.tsx | 2 +
.../drag_drop_context_wrapper.tsx | 17 +-
.../drag_and_drop/draggable_wrapper.test.tsx | 2 +
.../drag_and_drop/draggable_wrapper.tsx | 8 +-
.../draggable_wrapper_hover_content.test.tsx | 85 +-
.../draggable_wrapper_hover_content.tsx | 27 +-
.../drag_and_drop/droppable_wrapper.test.tsx | 2 +
.../components/drag_and_drop/helpers.test.ts | 2 +-
.../components/drag_and_drop/helpers.ts | 364 +-
.../components/draggables/index.test.tsx | 2 +
.../event_details/alert_summary_view.test.tsx | 2 +
.../components/event_details/columns.tsx | 4 +-
.../event_details/event_details.test.tsx | 2 +
.../event_fields_browser.test.tsx | 2 +
.../event_details/event_fields_browser.tsx | 8 +-
.../components/event_details/helpers.tsx | 4 +-
.../events_viewer/default_headers.tsx | 2 +-
.../events_viewer/events_viewer.test.tsx | 13 +-
.../events_viewer/events_viewer.tsx | 34 +-
.../components/events_viewer/index.test.tsx | 6 +-
.../common/components/events_viewer/index.tsx | 102 +-
.../components/events_viewer/translations.ts | 7 -
.../components/header_page/title.test.tsx | 2 +
.../common/components/inspect/index.tsx | 4 +-
.../components/ml/entity_draggable.test.tsx | 2 +
.../ml/score/anomaly_score.test.tsx | 2 +
.../ml/score/anomaly_scores.test.tsx | 2 +
.../get_anomalies_host_table_columns.test.tsx | 2 +
...t_anomalies_network_table_columns.test.tsx | 2 +
.../common/components/tables/helpers.test.tsx | 3 +
.../common/components/toasters/utils.ts | 2 +-
.../common/components/top_n/index.test.tsx | 38 +-
.../components/with_hover_actions/index.tsx | 8 +-
.../events/last_event_time/index.ts | 2 +-
.../public/common/containers/source/index.tsx | 4 +-
.../common/hooks/use_app_toasts.test.ts | 3 +-
.../public/common/hooks/use_app_toasts.ts | 8 +-
.../lib/clipboard/with_copy_to_clipboard.tsx | 3 +-
.../common/lib/kibana/__mocks__/index.ts | 16 +-
.../public/common/mock/global_state.ts | 1 +
.../public/common/mock/header.ts | 2 +-
.../mock/mock_timeline_control_columns.tsx | 2 +-
.../public/common/mock/utils.ts | 32 +-
.../public/common/store/inputs/model.ts | 1 +
.../public/common/store/types.ts | 12 -
.../components/alerts_table/actions.tsx | 4 +-
.../alerts_utility_bar/index.test.tsx | 1 +
.../alerts_table/default_config.tsx | 4 +-
.../components/alerts_table/index.tsx | 76 +-
.../examples/observablity_alerts/columns.ts | 3 +-
.../render_cell_value.test.tsx | 4 +-
.../examples/security_solution_rac/columns.ts | 3 +-
.../render_cell_value.test.tsx | 4 +-
.../security_solution_detections/columns.ts | 2 +-
.../render_cell_value.test.tsx | 4 +-
.../alerts/use_signal_index.tsx | 2 +-
.../lists/use_lists_index.tsx | 3 +-
.../rules/use_rule_status.tsx | 2 +-
.../rules/use_rule_with_fallback.test.tsx | 2 +-
.../rules/use_rule_with_fallback.tsx | 2 +-
.../detection_engine/detection_engine.tsx | 2 +-
.../all/exceptions/exceptions_table.test.tsx | 3 +
.../rules/all/exceptions/exceptions_table.tsx | 5 +-
.../rules/all/rules_tables.tsx | 12 +-
.../detection_engine/rules/details/index.tsx | 4 +-
.../components/hosts_table/index.test.tsx | 2 +
.../uncommon_process_table/index.test.tsx | 2 +
.../hosts/pages/details/details_tabs.test.tsx | 2 +
.../public/hosts/pages/hosts.tsx | 2 +-
.../navigation/events_query_tab_body.tsx | 15 +-
.../plugins/security_solution/public/index.ts | 1 +
.../network/components/ip/index.test.tsx | 2 +
.../network_dns_table/index.test.tsx | 2 +
.../network_http_table/index.test.tsx | 1 +
.../index.test.tsx | 2 +
.../network_top_n_flow_table/index.test.tsx | 1 +
.../network/components/port/index.test.tsx | 2 +
.../source_destination/index.test.tsx | 2 +
.../source_destination_ip.test.tsx | 2 +
.../components/tls_table/index.test.tsx | 2 +
.../components/users_table/index.test.tsx | 2 +
.../public/network/pages/network.tsx | 2 +-
.../endpoint_overview/index.test.tsx | 2 +
.../security_solution/public/plugin.tsx | 19 +-
.../certificate_fingerprint/index.test.tsx | 2 +
.../components/duration/index.test.tsx | 2 +
.../field_renderers/field_renderers.test.tsx | 2 +
.../fields_browser/categories_pane.tsx | 2 +-
.../fields_browser/category.test.tsx | 3 +
.../components/fields_browser/category.tsx | 4 +-
.../fields_browser/category_columns.tsx | 12 +-
.../fields_browser/category_title.test.tsx | 43 +-
.../fields_browser/field_browser.tsx | 8 +-
.../fields_browser/field_items.test.tsx | 4 +-
.../components/fields_browser/field_items.tsx | 9 +-
.../fields_browser/field_name.test.tsx | 2 +
.../components/fields_browser/field_name.tsx | 2 +-
.../fields_browser/fields_pane.test.tsx | 2 +
.../components/fields_browser/fields_pane.tsx | 2 +-
.../components/fields_browser/header.test.tsx | 3 +-
.../components/fields_browser/header.tsx | 13 +-
.../components/fields_browser/helpers.tsx | 2 +-
.../components/fields_browser/index.test.tsx | 2 +
.../components/fields_browser/types.ts | 2 +-
.../components/flyout/bottom_bar/index.tsx | 2 +-
.../components/ja3_fingerprint/index.test.tsx | 2 +
.../components/manage_timeline/index.test.tsx | 125 -
.../components/manage_timeline/index.tsx | 212 -
.../components/netflow/index.test.tsx | 2 +
.../components/notes/note_cards/index.tsx | 2 +-
.../components/open_timeline/helpers.test.ts | 2 +-
.../components/open_timeline/helpers.ts | 3 +-
.../timeline/body/actions/header_actions.tsx | 25 +-
.../timeline/body/actions/index.test.tsx | 4 -
.../timeline/body/actions/index.tsx | 65 +-
.../body/column_headers/actions/index.tsx | 2 +-
.../body/column_headers/column_header.tsx | 14 +-
.../body/column_headers/default_headers.ts | 3 +-
.../body/column_headers/filter/index.tsx | 2 +-
.../column_headers/header/header_content.tsx | 2 +-
.../body/column_headers/header/helpers.ts | 7 +-
.../body/column_headers/header/index.test.tsx | 12 +-
.../body/column_headers/header/index.tsx | 20 +-
.../header_tooltip_content/index.test.tsx | 3 +-
.../header_tooltip_content/index.tsx | 2 +-
.../timeline/body/column_headers/helpers.ts | 2 +-
.../body/column_headers/index.test.tsx | 2 +
.../timeline/body/column_headers/index.tsx | 11 +-
.../timeline/body/control_columns/index.tsx | 45 +-
.../body/data_driven_columns/index.test.tsx | 2 -
.../body/data_driven_columns/index.tsx | 29 +-
.../stateful_cell.test.tsx | 8 +-
.../data_driven_columns/stateful_cell.tsx | 8 +-
.../body/events/event_column_view.test.tsx | 12 -
.../body/events/event_column_view.tsx | 25 +-
.../components/timeline/body/events/index.tsx | 12 +-
.../timeline/body/events/stateful_event.tsx | 26 +-
.../events/stateful_row_renderer/index.tsx | 6 +-
.../events/use_stateful_event_focus/index.tsx | 2 +-
.../components/timeline/body/index.test.tsx | 8 +-
.../components/timeline/body/index.tsx | 30 +-
.../timeline/body/renderers/args.test.tsx | 2 +
.../renderers/auditd/generic_details.test.tsx | 2 +
.../auditd/generic_file_details.test.tsx | 2 +
.../auditd/generic_row_renderer.test.tsx | 4 +-
.../renderers/auditd/generic_row_renderer.tsx | 4 +-
.../primary_secondary_user_info.test.tsx | 2 +
.../session_user_host_working_dir.test.tsx | 2 +
.../body/renderers/bytes/index.test.tsx | 2 +
.../body/renderers/column_renderer.ts | 2 +-
.../renderers/cti/threat_match_row.test.tsx | 2 +
.../cti/threat_match_row_renderer.tsx | 3 +-
.../body/renderers/cti/threat_match_rows.tsx | 3 +-
.../dns/dns_request_event_details.test.tsx | 2 +
.../dns_request_event_details_line.test.tsx | 2 +
.../renderers/empty_column_renderer.test.tsx | 2 +
.../body/renderers/empty_column_renderer.tsx | 3 +-
.../endgame_security_event_details.test.tsx | 2 +
...dgame_security_event_details_line.test.tsx | 2 +
.../renderers/exit_code_draggable.test.tsx | 2 +
.../body/renderers/file_draggable.test.tsx | 2 +
.../body/renderers/file_hash.test.tsx | 2 +
.../renderers/get_column_renderer.test.tsx | 2 +
.../body/renderers/get_row_renderer.test.tsx | 2 +
.../body/renderers/get_row_renderer.ts | 2 +-
.../body/renderers/host_working_dir.test.tsx | 2 +
.../timeline/body/renderers/index.ts | 2 +-
.../netflow/netflow_row_renderer.test.tsx | 2 +
.../netflow/netflow_row_renderer.tsx | 4 +-
.../parent_process_draggable.test.tsx | 2 +
.../renderers/plain_column_renderer.test.tsx | 2 +
.../body/renderers/plain_column_renderer.tsx | 2 +-
.../body/renderers/plain_row_renderer.tsx | 4 +-
.../body/renderers/process_draggable.test.tsx | 2 +
.../body/renderers/process_hash.test.tsx | 2 +
.../registry/registry_event_details.test.tsx | 2 +
.../registry_event_details_line.test.tsx | 2 +
.../timeline/body/renderers/row_renderer.tsx | 18 -
.../suricata/suricata_details.test.tsx | 2 +
.../suricata/suricata_row_renderer.test.tsx | 2 +
.../suricata/suricata_row_renderer.tsx | 4 +-
.../suricata/suricata_signature.test.tsx | 2 +
.../renderers/system/generic_details.test.tsx | 2 +
.../system/generic_file_details.test.tsx | 2 +
.../system/generic_row_renderer.test.tsx | 4 +-
.../renderers/system/generic_row_renderer.tsx | 4 +-
.../body/renderers/system/package.test.tsx | 2 +
.../renderers/user_host_working_dir.test.tsx | 2 +
.../body/renderers/zeek/zeek_details.test.tsx | 2 +
.../renderers/zeek/zeek_row_renderer.test.tsx | 2 +
.../body/renderers/zeek/zeek_row_renderer.tsx | 4 +-
.../renderers/zeek/zeek_signature.test.tsx | 2 +
.../components/timeline/body/sort/index.ts | 12 +-
.../timeline/body/sort/sort_indicator.tsx | 2 +-
.../default_cell_renderer.test.tsx | 2 +
.../timeline/cell_rendering/index.tsx | 14 +-
.../timeline/data_providers/index.test.tsx | 35 +-
.../timeline/data_providers/index.tsx | 14 +-
.../data_providers/provider_item_badge.tsx | 15 +-
.../data_providers/providers.test.tsx | 85 +-
.../timeline/data_providers/providers.tsx | 11 +-
.../timeline/eql_tab_content/index.test.tsx | 5 +
.../timeline/eql_tab_content/index.tsx | 38 +-
.../timelines/components/timeline/events.ts | 49 +-
.../components/timeline/footer/index.test.tsx | 2 +
.../components/timeline/footer/index.tsx | 36 +-
.../timeline/footer/translations.ts | 7 +
.../timelines/components/timeline/helpers.tsx | 2 +-
.../timelines/components/timeline/index.tsx | 5 +-
.../pinned_tab_content/index.test.tsx | 5 +
.../timeline/pinned_tab_content/index.tsx | 11 +-
.../components/timeline/query_bar/index.tsx | 2 +-
.../timeline/query_tab_content/index.test.tsx | 9 +
.../timeline/query_tab_content/index.tsx | 47 +-
.../timeline/search_or_filter/index.tsx | 8 +-
.../search_or_filter/search_or_filter.tsx | 2 +-
.../timeline/tabs_content/index.tsx | 8 +-
.../timelines/containers/details/index.tsx | 2 +-
.../public/timelines/containers/index.tsx | 8 +-
.../timelines/containers/kpis/index.tsx | 2 +-
.../containers/local_storage/index.tsx | 4 +-
.../timelines/store/timeline/actions.ts | 135 +-
.../timelines/store/timeline/defaults.ts | 3 +-
.../public/timelines/store/timeline/epic.ts | 12 +-
.../timelines/store/timeline/helpers.ts | 57 +-
.../public/timelines/store/timeline/model.ts | 78 +-
.../timelines/store/timeline/reducer.test.ts | 3 +-
.../timelines/store/timeline/reducer.ts | 209 +-
.../timelines/store/timeline/selectors.ts | 3 +
.../plugins/security_solution/public/types.ts | 2 +
.../reference_rules/__mocks__/eql.ts | 791 +
.../reference_rules/eql.test.ts | 4 +-
.../timelines/pick_saved_timeline.test.ts | 27 +-
.../timelines/pick_saved_timeline.ts | 5 +-
.../security_solution/server/plugin.ts | 23 -
.../factory/hosts/details/index.test.tsx | 1 +
.../factory/events/all/helpers.test.ts | 1515 -
.../plugins/security_solution/tsconfig.json | 1 +
x-pack/plugins/timelines/README.md | 4 +-
x-pack/plugins/timelines/common/constants.ts | 8 +
.../timelines/common/ecs/agent/index.ts | 10 +
.../timelines/common/ecs/auditd/index.ts | 46 +
.../timelines/common/ecs/cloud/index.ts | 21 +
.../timelines/common/ecs/destination/index.ts | 22 +
.../plugins/timelines/common/ecs/dns/index.ts | 20 +
.../common/ecs/ecs_fields/extend_map.test.ts | 57 +
.../common/ecs/ecs_fields/extend_map.ts | 15 +
.../timelines/common/ecs/ecs_fields/index.ts | 359 +
.../timelines/common/ecs/endgame/index.ts | 22 +
.../timelines/common/ecs/event/index.ts | 46 +
.../timelines/common/ecs/file/index.ts | 61 +
.../plugins/timelines/common/ecs/geo/index.ts | 21 +
.../timelines/common/ecs/host/index.ts | 36 +
.../timelines/common/ecs/http/index.ts | 38 +
x-pack/plugins/timelines/common/ecs/index.ts | 66 +
.../timelines/common/ecs/network/index.ts | 15 +
.../timelines/common/ecs/process/index.ts | 40 +
.../timelines/common/ecs/ransomware/index.ts | 30 +
.../timelines/common/ecs/registry/index.ts | 13 +
.../timelines/common/ecs/rule/index.ts | 43 +
.../timelines/common/ecs/signal/index.ts | 18 +
.../timelines/common/ecs/source/index.ts | 17 +
.../timelines/common/ecs/suricata/index.ts | 24 +
.../timelines/common/ecs/system/index.ts | 40 +
.../timelines/common/ecs/threat/index.ts | 25 +
.../plugins/timelines/common/ecs/tls/index.ts | 34 +
.../plugins/timelines/common/ecs/url/index.ts | 16 +
.../timelines/common/ecs/user/index.ts | 22 +
.../timelines/common/ecs/winlog/index.ts | 10 +
.../timelines/common/ecs/zeek/index.ts | 134 +
x-pack/plugins/timelines/common/index.ts | 4 +
.../common/search_strategy/common/index.ts | 80 +
.../common/search_strategy/eql/index.ts | 45 +
.../eql/validation/helpers.mock.ts | 70 +
.../eql/validation/helpers.test.ts | 59 +
.../search_strategy/eql/validation/helpers.ts | 35 +
.../search_strategy/eql/validation/index.ts | 8 +
.../timelines/common/search_strategy/index.ts | 11 +
.../search_strategy/index_fields/index.ts | 89 +
.../timeline/events/all/index.ts | 42 +
.../timeline/events/common/index.ts | 26 +
.../timeline/events/details/index.ts | 31 +
.../timeline/events/eql/index.ts | 46 +
.../search_strategy/timeline/events/index.ts | 18 +
.../timeline/events/last_event_time/index.ts | 42 +
.../common/search_strategy/timeline/index.ts | 197 +
x-pack/plugins/timelines/common/typed_json.ts | 57 +
.../plugins/timelines/common/types/index.ts | 8 +
.../common/types/timeline/actions/index.ts | 92 +
.../common/types/timeline/cells/index.ts | 21 +
.../common/types/timeline/columns/index.ts | 54 +
.../types/timeline/data_provider/index.ts | 65 +
.../timelines/common/types/timeline/index.ts | 744 +
.../common/types/timeline/note/index.ts | 127 +
.../types/timeline/pinned_event/index.ts | 85 +
.../common/types/timeline/rows/index.ts | 24 +
.../timelines/common/types/timeline/store.ts | 98 +
.../plugins/timelines/common/utility_types.ts | 53 +
.../utils}/accessibility/helpers.test.tsx | 0
.../common/utils}/accessibility/helpers.ts | 8 +-
.../common/utils/accessibility/index.ts | 8 +
.../common/utils/api.ts} | 0
.../common/utils/field_formatters.test.ts | 196 +
.../common/utils/field_formatters.ts | 153 +
.../timelines/common/utils/to_array.ts | 87 +
x-pack/plugins/timelines/jest.config.js | 12 +
x-pack/plugins/timelines/kibana.json | 3 +-
.../draggable_keyboard_wrapper_hook/index.tsx | 8 +-
.../components/drag_and_drop/helpers.ts | 211 +
.../public/components/drag_and_drop/index.tsx | 93 +
.../draggables/field_badge/index.tsx | 48 +
.../draggables/field_badge/translations.ts | 34 +
.../public/components/draggables/index.tsx | 8 +
.../exit_full_screen/index.test.tsx | 60 +
.../components/exit_full_screen/index.tsx | 64 +
.../exit_full_screen/translations.ts | 12 +
.../timelines/public/components/index.tsx | 57 +-
.../public/components/inspect/index.test.tsx | 105 +
.../public/components/inspect/index.tsx | 114 +
.../public/components/inspect/modal.test.tsx | 282 +
.../public/components/inspect/modal.tsx | 253 +
.../public/components/inspect/translations.ts | 64 +
.../components/last_updated/index.test.tsx | 2 +-
.../public}/components/last_updated/index.tsx | 5 +-
.../components/last_updated/translations.ts | 4 +-
.../public/components/loading/index.tsx | 98 +
.../__snapshots__/index.test.tsx.snap | 526 +
.../body/column_headers/actions/index.tsx | 69 +
.../body/column_headers/column_header.tsx | 310 +
.../common/dragging_container.tsx | 25 +
.../body/column_headers/common/styles.tsx | 19 +
.../body/column_headers/default_headers.ts | 58 +
.../header/__snapshots__/index.test.tsx.snap | 51 +
.../column_headers/header/header_content.tsx | 85 +
.../body/column_headers/header/helpers.ts | 55 +
.../body/column_headers/header/index.test.tsx | 331 +
.../body/column_headers/header/index.tsx | 94 +
.../__snapshots__/index.test.tsx.snap | 66 +
.../header_tooltip_content/index.test.tsx | 72 +
.../header_tooltip_content/index.tsx | 81 +
.../body/column_headers/helpers.test.ts | 116 +
.../t_grid/body/column_headers/helpers.ts | 57 +
.../t_grid/body/column_headers/index.test.tsx | 316 +
.../t_grid/body/column_headers/index.tsx | 295 +
.../body/column_headers/translations.ts | 51 +
.../components/t_grid/body/constants.ts | 29 +
.../__snapshots__/index.test.tsx.snap | 967 +
.../body/data_driven_columns/index.test.tsx | 57 +
.../t_grid/body/data_driven_columns/index.tsx | 394 +
.../stateful_cell.test.tsx | 173 +
.../data_driven_columns/stateful_cell.tsx | 65 +
.../body/data_driven_columns/translations.ts | 28 +
.../body/events/event_column_view.test.tsx | 115 +
.../t_grid/body/events/event_column_view.tsx | 182 +
.../components/t_grid/body/events/index.tsx | 100 +
.../t_grid/body/events/stateful_event.tsx | 207 +
.../body/events/stateful_event_context.tsx | 17 +
.../events/stateful_row_renderer/index.tsx | 104 +
.../t_grid/body/events/translations.ts | 15 +
.../events/use_stateful_event_focus/index.tsx | 96 +
.../components/t_grid/body/helpers.test.ts | 178 +
.../public/components/t_grid/body/helpers.tsx | 64 +
.../components/t_grid/body/index.test.tsx | 132 +
.../public/components/t_grid/body/index.tsx | 334 +
.../plain_row_renderer.test.tsx.snap | 3 +
.../body/renderers/get_column_renderer.ts | 24 +
.../t_grid/body/renderers/get_row_renderer.ts | 12 +
.../renderers/plain_row_renderer.test.tsx | 45 +
.../body/renderers/plain_row_renderer.tsx | 22 +
.../t_grid/body/renderers/row_renderer.tsx | 21 +
.../sort_indicator.test.tsx.snap | 18 +
.../components/t_grid/body/sort/index.ts | 16 +
.../t_grid/body/sort/sort_indicator.test.tsx | 85 +
.../t_grid/body/sort/sort_indicator.tsx | 68 +
.../t_grid/body/sort/sort_number.tsx | 27 +
.../components/t_grid/body/translations.ts | 229 +
.../components/t_grid/footer/index.test.tsx | 259 +
.../public/components/t_grid/footer/index.tsx | 394 +
.../components/t_grid/footer/translations.ts | 39 +
.../__snapshots__/index.test.tsx.snap | 35 +
.../t_grid/header_section/index.test.tsx | 159 +
.../t_grid/header_section/index.tsx | 106 +
.../public/components/t_grid/helpers.test.tsx | 578 +
.../public/components/t_grid/helpers.tsx | 314 +
.../components/t_grid/integrated/index.tsx | 355 +
.../t_grid/integrated/translations.ts | 36 +
.../components/t_grid/standalone/index.tsx | 339 +
.../t_grid/standalone/translations.ts | 36 +
.../public/components/t_grid/styles.tsx | 460 +
.../__snapshots__/index.test.tsx.snap | 11 +
.../components/t_grid/subtitle/index.test.tsx | 71 +
.../components/t_grid/subtitle/index.tsx | 72 +
.../public/components/t_grid/translations.ts | 20 +
.../public/components/t_grid/types.ts | 17 +
.../timelines/public/components/tgrid.tsx | 25 +
.../__snapshots__/index.test.tsx.snap | 19 +
.../truncatable_text/index.test.tsx | 36 +
.../components/truncatable_text/index.tsx | 28 +
.../public/components/utils/helpers.ts | 28 +
.../components/utils/keury/index.test.ts | 65 +
.../public/components/utils/keury/index.ts | 99 +
.../components/utils/use_mount_appended.ts | 31 +
.../timelines/public/container/index.tsx | 346 +
.../public/container/translations.ts | 22 +
.../public/hooks/use_add_to_timeline.ts} | 47 +-
.../timelines/public/hooks/use_app_toasts.ts | 241 +
.../timelines/public/hooks/use_selector.tsx | 20 +
x-pack/plugins/timelines/public/index.scss | 0
x-pack/plugins/timelines/public/index.ts | 47 +-
.../timelines/public/methods/index.tsx | 33 +-
.../timelines/public/mock/browser_fields.ts | 737 +
.../timelines/public/mock/cell_renderer.tsx | 20 +
.../timelines/public/mock/global_state.ts | 53 +
.../plugins/timelines/public/mock/header.ts | 133 +
x-pack/plugins/timelines/public/mock/index.ts | 16 +
.../timelines/public/mock/index_pattern.ts | 112 +
.../public/mock/kibana_react.mock.ts | 36 +
.../public/mock/mock_and_providers.tsx | 93 +
.../public/mock/mock_data_providers.tsx | 59 +
.../public/mock/mock_local_storage.ts | 35 +
.../mock/mock_timeline_control_columns.tsx | 117 +
.../public/mock/mock_timeline_data.ts | 1511 +
.../timelines/public/mock/plugin_mock.tsx | 27 +
.../timelines/public/mock/test_providers.tsx | 57 +
x-pack/plugins/timelines/public/plugin.ts | 62 +-
.../timelines/public/store/t_grid/actions.ts | 103 +
.../timelines/public/store/t_grid/defaults.ts | 103 +
.../timelines/public/store/t_grid/helpers.ts | 424 +
.../timelines/public/store/t_grid/index.ts | 65 +
.../timelines/public/store/t_grid/inputs.ts | 13 +
.../timelines/public/store/t_grid/model.ts | 128 +
.../timelines/public/store/t_grid/reducer.ts | 212 +
.../public/store/t_grid/selectors.ts | 48 +
.../public/store/t_grid/translations.ts | 32 +
.../timelines/public/store/t_grid/types.ts | 67 +
x-pack/plugins/timelines/public/types.ts | 45 +-
x-pack/plugins/timelines/server/config.ts | 2 +-
x-pack/plugins/timelines/server/index.ts | 2 +-
x-pack/plugins/timelines/server/plugin.ts | 24 +-
.../index_fields/index.test.ts | 6 +-
.../search_strategy/index_fields/index.ts | 4 +-
.../search_strategy/index_fields/mock.ts | 0
.../timeline/eql/__mocks__/index.ts | 2 +-
.../timeline/eql/helpers.test.ts | 0
.../search_strategy/timeline/eql/helpers.ts | 4 +-
.../search_strategy/timeline/eql/index.ts | 4 +-
.../timeline/factory/events/all/constants.ts | 35 +-
.../factory/events/all/helpers.test.ts | 570 +
.../timeline/factory/events/all/helpers.ts | 7 +-
.../timeline/factory/events/all/index.ts | 30 +-
.../events/all/query.events_all.dsl.ts | 2 +-
.../timeline/factory/events/details/index.ts | 6 +-
.../details/query.events_details.dsl.test.ts | 0
.../details/query.events_details.dsl.ts | 0
.../timeline/factory/events/index.ts | 4 +-
.../timeline/factory/events/kpi/index.ts | 4 +-
.../factory/events/kpi/query.kpi.dsl.ts | 2 +-
.../factory/events/last_event_time/index.ts | 4 +-
.../query.events_last_event_time.dsl.ts | 0
.../search_strategy/timeline/factory/index.ts | 6 +-
.../search_strategy/timeline/factory/types.ts | 2 +-
.../server/search_strategy/timeline/index.ts | 9 +-
x-pack/plugins/timelines/server/types.ts | 13 +-
.../server/utils/beat_schema/fields.ts | 36119 ++++++++++++++++
.../timelines/server/utils/build_query.ts | 21 +
.../plugins/timelines/server/utils/filters.ts | 12 +
x-pack/plugins/timelines/tsconfig.json | 46 +-
.../translations/translations/ja-JP.json | 4 -
.../translations/translations/zh-CN.json | 4 -
.../apis/security_solution/events.ts | 4 +-
.../apis/security_solution/sources.ts | 14 +-
.../security_solution/timeline_details.ts | 4 +-
.../applications/timelines_test/index.tsx | 30 +-
.../plugins/timelines_test/public/plugin.ts | 23 +-
.../test_suites/timelines/index.ts | 2 +-
x-pack/yarn.lock | 31 +
yarn.lock | 30 +-
528 files changed, 60238 insertions(+), 3994 deletions(-)
create mode 100644 packages/kbn-securitysolution-t-grid/BUILD.bazel
create mode 100644 packages/kbn-securitysolution-t-grid/README.md
create mode 100644 packages/kbn-securitysolution-t-grid/babel.config.js
create mode 100644 packages/kbn-securitysolution-t-grid/jest.config.js
create mode 100644 packages/kbn-securitysolution-t-grid/package.json
create mode 100644 packages/kbn-securitysolution-t-grid/react/package.json
create mode 100644 packages/kbn-securitysolution-t-grid/src/constants/index.ts
create mode 100644 packages/kbn-securitysolution-t-grid/src/index.ts
create mode 100644 packages/kbn-securitysolution-t-grid/src/mock/index.ts
rename {x-pack/plugins/security_solution/common/utils => packages/kbn-securitysolution-t-grid/src/mock}/mock_event_details.ts (97%)
create mode 100644 packages/kbn-securitysolution-t-grid/src/utils/api/index.ts
create mode 100644 packages/kbn-securitysolution-t-grid/src/utils/drag_and_drop/index.ts
create mode 100644 packages/kbn-securitysolution-t-grid/src/utils/index.ts
create mode 100644 packages/kbn-securitysolution-t-grid/tsconfig.browser.json
create mode 100644 packages/kbn-securitysolution-t-grid/tsconfig.json
create mode 100644 x-pack/plugins/security_solution/common/types/index.ts
create mode 100644 x-pack/plugins/security_solution/common/types/timeline/actions/index.ts
create mode 100644 x-pack/plugins/security_solution/common/types/timeline/cells/index.ts
create mode 100644 x-pack/plugins/security_solution/common/types/timeline/columns/index.ts
create mode 100644 x-pack/plugins/security_solution/common/types/timeline/data_provider/index.ts
create mode 100644 x-pack/plugins/security_solution/common/types/timeline/rows/index.ts
create mode 100644 x-pack/plugins/security_solution/common/types/timeline/store.ts
create mode 100644 x-pack/plugins/security_solution/public/common/components/accessibility/index.ts
delete mode 100644 x-pack/plugins/security_solution/public/timelines/components/manage_timeline/index.test.tsx
delete mode 100644 x-pack/plugins/security_solution/public/timelines/components/manage_timeline/index.tsx
create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/__mocks__/eql.ts
delete mode 100644 x-pack/plugins/security_solution/server/search_strategy/timeline/factory/events/all/helpers.test.ts
create mode 100644 x-pack/plugins/timelines/common/constants.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/agent/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/auditd/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/cloud/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/destination/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/dns/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/ecs_fields/extend_map.test.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/ecs_fields/extend_map.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/ecs_fields/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/endgame/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/event/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/file/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/geo/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/host/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/http/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/network/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/process/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/ransomware/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/registry/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/rule/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/signal/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/source/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/suricata/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/system/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/threat/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/tls/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/url/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/user/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/winlog/index.ts
create mode 100644 x-pack/plugins/timelines/common/ecs/zeek/index.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/common/index.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/eql/index.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/eql/validation/helpers.mock.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/eql/validation/helpers.test.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/eql/validation/helpers.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/eql/validation/index.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/index.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/timeline/events/all/index.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/timeline/events/common/index.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/timeline/events/details/index.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/timeline/events/eql/index.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/timeline/events/index.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/timeline/events/last_event_time/index.ts
create mode 100644 x-pack/plugins/timelines/common/search_strategy/timeline/index.ts
create mode 100644 x-pack/plugins/timelines/common/typed_json.ts
create mode 100644 x-pack/plugins/timelines/common/types/index.ts
create mode 100644 x-pack/plugins/timelines/common/types/timeline/actions/index.ts
create mode 100644 x-pack/plugins/timelines/common/types/timeline/cells/index.ts
create mode 100644 x-pack/plugins/timelines/common/types/timeline/columns/index.ts
create mode 100644 x-pack/plugins/timelines/common/types/timeline/data_provider/index.ts
create mode 100644 x-pack/plugins/timelines/common/types/timeline/index.ts
create mode 100644 x-pack/plugins/timelines/common/types/timeline/note/index.ts
create mode 100644 x-pack/plugins/timelines/common/types/timeline/pinned_event/index.ts
create mode 100644 x-pack/plugins/timelines/common/types/timeline/rows/index.ts
create mode 100644 x-pack/plugins/timelines/common/types/timeline/store.ts
create mode 100644 x-pack/plugins/timelines/common/utility_types.ts
rename x-pack/plugins/{security_solution/public/common/components => timelines/common/utils}/accessibility/helpers.test.tsx (100%)
rename x-pack/plugins/{security_solution/public/common/components => timelines/common/utils}/accessibility/helpers.ts (99%)
create mode 100644 x-pack/plugins/timelines/common/utils/accessibility/index.ts
rename x-pack/plugins/{security_solution/public/common/utils/api/index.ts => timelines/common/utils/api.ts} (100%)
create mode 100644 x-pack/plugins/timelines/common/utils/field_formatters.test.ts
create mode 100644 x-pack/plugins/timelines/common/utils/field_formatters.ts
create mode 100644 x-pack/plugins/timelines/common/utils/to_array.ts
create mode 100644 x-pack/plugins/timelines/jest.config.js
rename x-pack/plugins/{security_solution/public/common => timelines/public}/components/drag_and_drop/draggable_keyboard_wrapper_hook/index.tsx (92%)
create mode 100644 x-pack/plugins/timelines/public/components/drag_and_drop/helpers.ts
create mode 100644 x-pack/plugins/timelines/public/components/drag_and_drop/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/draggables/field_badge/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/draggables/field_badge/translations.ts
create mode 100644 x-pack/plugins/timelines/public/components/draggables/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/exit_full_screen/index.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/exit_full_screen/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/exit_full_screen/translations.ts
create mode 100644 x-pack/plugins/timelines/public/components/inspect/index.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/inspect/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/inspect/modal.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/inspect/modal.tsx
create mode 100644 x-pack/plugins/timelines/public/components/inspect/translations.ts
rename x-pack/plugins/{security_solution/public/common => timelines/public}/components/last_updated/index.test.tsx (100%)
rename x-pack/plugins/{security_solution/public/common => timelines/public}/components/last_updated/index.tsx (94%)
rename x-pack/plugins/{security_solution/public/common => timelines/public}/components/last_updated/translations.ts (67%)
create mode 100644 x-pack/plugins/timelines/public/components/loading/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/__snapshots__/index.test.tsx.snap
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/actions/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/column_header.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/common/dragging_container.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/common/styles.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/default_headers.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/header/__snapshots__/index.test.tsx.snap
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/header/header_content.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/header/helpers.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/header/index.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/header/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/header_tooltip_content/__snapshots__/index.test.tsx.snap
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/header_tooltip_content/index.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/header_tooltip_content/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/helpers.test.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/helpers.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/index.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/column_headers/translations.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/constants.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/data_driven_columns/__snapshots__/index.test.tsx.snap
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/data_driven_columns/index.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/data_driven_columns/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/data_driven_columns/stateful_cell.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/data_driven_columns/stateful_cell.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/data_driven_columns/translations.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/events/event_column_view.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/events/event_column_view.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/events/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/events/stateful_event.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/events/stateful_event_context.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/events/stateful_row_renderer/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/events/translations.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/events/use_stateful_event_focus/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/helpers.test.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/helpers.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/index.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/renderers/__snapshots__/plain_row_renderer.test.tsx.snap
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/renderers/get_column_renderer.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/renderers/get_row_renderer.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/renderers/plain_row_renderer.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/renderers/plain_row_renderer.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/renderers/row_renderer.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/sort/__snapshots__/sort_indicator.test.tsx.snap
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/sort/index.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/sort/sort_indicator.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/sort/sort_indicator.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/sort/sort_number.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/body/translations.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/footer/index.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/footer/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/footer/translations.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/header_section/__snapshots__/index.test.tsx.snap
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/header_section/index.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/header_section/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/helpers.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/helpers.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/integrated/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/integrated/translations.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/standalone/translations.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/styles.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/subtitle/__snapshots__/index.test.tsx.snap
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/subtitle/index.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/subtitle/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/translations.ts
create mode 100644 x-pack/plugins/timelines/public/components/t_grid/types.ts
create mode 100644 x-pack/plugins/timelines/public/components/tgrid.tsx
create mode 100644 x-pack/plugins/timelines/public/components/truncatable_text/__snapshots__/index.test.tsx.snap
create mode 100644 x-pack/plugins/timelines/public/components/truncatable_text/index.test.tsx
create mode 100644 x-pack/plugins/timelines/public/components/truncatable_text/index.tsx
create mode 100644 x-pack/plugins/timelines/public/components/utils/helpers.ts
create mode 100644 x-pack/plugins/timelines/public/components/utils/keury/index.test.ts
create mode 100644 x-pack/plugins/timelines/public/components/utils/keury/index.ts
create mode 100644 x-pack/plugins/timelines/public/components/utils/use_mount_appended.ts
create mode 100644 x-pack/plugins/timelines/public/container/index.tsx
create mode 100644 x-pack/plugins/timelines/public/container/translations.ts
rename x-pack/plugins/{security_solution/public/common/hooks/use_add_to_timeline.tsx => timelines/public/hooks/use_add_to_timeline.ts} (90%)
create mode 100644 x-pack/plugins/timelines/public/hooks/use_app_toasts.ts
create mode 100644 x-pack/plugins/timelines/public/hooks/use_selector.tsx
delete mode 100644 x-pack/plugins/timelines/public/index.scss
create mode 100644 x-pack/plugins/timelines/public/mock/browser_fields.ts
create mode 100644 x-pack/plugins/timelines/public/mock/cell_renderer.tsx
create mode 100644 x-pack/plugins/timelines/public/mock/global_state.ts
create mode 100644 x-pack/plugins/timelines/public/mock/header.ts
create mode 100644 x-pack/plugins/timelines/public/mock/index.ts
create mode 100644 x-pack/plugins/timelines/public/mock/index_pattern.ts
create mode 100644 x-pack/plugins/timelines/public/mock/kibana_react.mock.ts
create mode 100644 x-pack/plugins/timelines/public/mock/mock_and_providers.tsx
create mode 100644 x-pack/plugins/timelines/public/mock/mock_data_providers.tsx
create mode 100644 x-pack/plugins/timelines/public/mock/mock_local_storage.ts
create mode 100644 x-pack/plugins/timelines/public/mock/mock_timeline_control_columns.tsx
create mode 100644 x-pack/plugins/timelines/public/mock/mock_timeline_data.ts
create mode 100644 x-pack/plugins/timelines/public/mock/plugin_mock.tsx
create mode 100644 x-pack/plugins/timelines/public/mock/test_providers.tsx
create mode 100644 x-pack/plugins/timelines/public/store/t_grid/actions.ts
create mode 100644 x-pack/plugins/timelines/public/store/t_grid/defaults.ts
create mode 100644 x-pack/plugins/timelines/public/store/t_grid/helpers.ts
create mode 100644 x-pack/plugins/timelines/public/store/t_grid/index.ts
create mode 100644 x-pack/plugins/timelines/public/store/t_grid/inputs.ts
create mode 100644 x-pack/plugins/timelines/public/store/t_grid/model.ts
create mode 100644 x-pack/plugins/timelines/public/store/t_grid/reducer.ts
create mode 100644 x-pack/plugins/timelines/public/store/t_grid/selectors.ts
create mode 100644 x-pack/plugins/timelines/public/store/t_grid/translations.ts
create mode 100644 x-pack/plugins/timelines/public/store/t_grid/types.ts
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/index_fields/index.test.ts (99%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/index_fields/index.ts (99%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/index_fields/mock.ts (100%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/eql/__mocks__/index.ts (99%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/eql/helpers.test.ts (100%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/eql/helpers.ts (96%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/eql/index.ts (91%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/events/all/constants.ts (78%)
create mode 100644 x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/all/helpers.test.ts
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/events/all/helpers.ts (96%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/events/all/index.ts (70%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/events/all/query.events_all.dsl.ts (96%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/events/details/index.ts (89%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/events/details/query.events_details.dsl.test.ts (100%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/events/details/query.events_details.dsl.ts (100%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/events/index.ts (87%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/events/kpi/index.ts (90%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/events/kpi/query.kpi.dsl.ts (96%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/events/last_event_time/index.ts (89%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/events/last_event_time/query.events_last_event_time.dsl.ts (100%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/index.ts (72%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/factory/types.ts (88%)
rename x-pack/plugins/{security_solution => timelines}/server/search_strategy/timeline/index.ts (81%)
create mode 100644 x-pack/plugins/timelines/server/utils/beat_schema/fields.ts
create mode 100644 x-pack/plugins/timelines/server/utils/build_query.ts
create mode 100644 x-pack/plugins/timelines/server/utils/filters.ts
create mode 100644 x-pack/yarn.lock
diff --git a/.eslintrc.js b/.eslintrc.js
index 40dd6a55a2a3f..c64f03a8398e5 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -893,6 +893,8 @@ module.exports = {
files: [
'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}',
+ 'x-pack/plugins/timelines/common/**/*.{js,mjs,ts,tsx}',
],
rules: {
'import/no-nodejs-modules': 'error',
@@ -907,7 +909,10 @@ module.exports = {
},
{
// typescript only for front and back end
- files: ['x-pack/plugins/security_solution/**/*.{ts,tsx}'],
+ files: [
+ 'x-pack/plugins/security_solution/**/*.{ts,tsx}',
+ 'x-pack/plugins/timelines/**/*.{ts,tsx}',
+ ],
rules: {
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-explicit-any': 'error',
@@ -917,7 +922,10 @@ module.exports = {
},
{
// typescript and javascript for front and back end
- files: ['x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}'],
+ files: [
+ 'x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}',
+ 'x-pack/plugins/timelines/**/*.{js,mjs,ts,tsx}',
+ ],
plugins: ['eslint-plugin-node', 'react'],
env: {
jest: true,
diff --git a/package.json b/package.json
index 36fa086657adf..9fc62dd69f1cf 100644
--- a/package.json
+++ b/package.json
@@ -149,6 +149,7 @@
"@kbn/securitysolution-list-api": "link:bazel-bin/packages/kbn-securitysolution-list-api",
"@kbn/securitysolution-list-hooks": "link:bazel-bin/packages/kbn-securitysolution-list-hooks",
"@kbn/securitysolution-list-utils": "link:bazel-bin/packages/kbn-securitysolution-list-utils",
+ "@kbn/securitysolution-t-grid": "link:bazel-bin/packages/kbn-securitysolution-t-grid",
"@kbn/securitysolution-utils": "link:bazel-bin/packages/kbn-securitysolution-utils",
"@kbn/server-http-tools": "link:bazel-bin/packages/kbn-server-http-tools",
"@kbn/server-route-repository": "link:bazel-bin/packages/kbn-server-route-repository",
@@ -217,6 +218,8 @@
"cytoscape-dagre": "^2.2.2",
"d3": "3.5.17",
"d3-array": "1.2.4",
+ "d3-cloud": "1.2.5",
+ "d3-interpolate": "^3.0.1",
"d3-scale": "1.0.7",
"d3-shape": "^1.1.0",
"d3-time": "^1.1.0",
@@ -511,6 +514,7 @@
"@types/cytoscape": "^3.14.0",
"@types/d3": "^3.5.43",
"@types/d3-array": "^1.2.7",
+ "@types/d3-interpolate": "^2.0.0",
"@types/d3-scale": "^2.1.1",
"@types/d3-shape": "^1.3.1",
"@types/d3-time": "^1.0.10",
diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel
index b1c3f580c6baf..801f7cdd7f8dc 100644
--- a/packages/BUILD.bazel
+++ b/packages/BUILD.bazel
@@ -3,7 +3,7 @@
filegroup(
name = "build",
srcs = [
- "//packages/elastic-datemath:build",
+ "//packages/elastic-datemath:build",
"//packages/elastic-eslint-config-kibana:build",
"//packages/elastic-safer-lodash-set:build",
"//packages/kbn-ace:build",
@@ -41,6 +41,7 @@ filegroup(
"//packages/kbn-securitysolution-list-utils:build",
"//packages/kbn-securitysolution-utils:build",
"//packages/kbn-securitysolution-es-utils:build",
+ "//packages/kbn-securitysolution-t-grid:build",
"//packages/kbn-securitysolution-hook-utils:build",
"//packages/kbn-server-http-tools:build",
"//packages/kbn-server-route-repository:build",
diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml
index f9127e4629f43..c6960621359c7 100644
--- a/packages/kbn-optimizer/limits.yml
+++ b/packages/kbn-optimizer/limits.yml
@@ -67,7 +67,7 @@ pageLoadAssetSize:
searchprofiler: 67080
security: 95864
securityOss: 30806
- securitySolution: 76000
+ securitySolution: 217673
share: 99061
snapshotRestore: 79032
spaces: 57868
@@ -107,7 +107,7 @@ pageLoadAssetSize:
dataVisualizer: 27530
banners: 17946
mapsEms: 26072
- timelines: 28613
+ timelines: 230410
screenshotMode: 17856
visTypePie: 35583
cases: 144442
diff --git a/packages/kbn-securitysolution-t-grid/BUILD.bazel b/packages/kbn-securitysolution-t-grid/BUILD.bazel
new file mode 100644
index 0000000000000..5cf1081bdd32e
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/BUILD.bazel
@@ -0,0 +1,125 @@
+load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
+load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
+
+PKG_BASE_NAME = "kbn-securitysolution-t-grid"
+
+PKG_REQUIRE_NAME = "@kbn/securitysolution-t-grid"
+
+SOURCE_FILES = glob(
+ [
+ "src/**/*.ts",
+ "src/**/*.tsx",
+ ],
+ exclude = [
+ "**/*.test.*",
+ "**/*.mock.*",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "react/package.json",
+ "package.json",
+ "README.md",
+]
+
+SRC_DEPS = [
+ "//packages/kbn-babel-preset",
+ "//packages/kbn-dev-utils",
+ "//packages/kbn-i18n",
+ "@npm//@babel/core",
+ "@npm//babel-loader",
+ "@npm//enzyme",
+ "@npm//jest",
+ "@npm//lodash",
+ "@npm//react",
+ "@npm//react-beautiful-dnd",
+ "@npm//tslib",
+]
+
+TYPES_DEPS = [
+ "@npm//typescript",
+ "@npm//@types/enzyme",
+ "@npm//@types/jest",
+ "@npm//@types/lodash",
+ "@npm//@types/node",
+ "@npm//@types/react",
+ "@npm//@types/react-beautiful-dnd",
+]
+
+DEPS = SRC_DEPS + TYPES_DEPS
+
+ts_config(
+ name = "tsconfig",
+ src = "tsconfig.json",
+ deps = [
+ "//:tsconfig.base.json",
+ ],
+)
+
+ts_config(
+ name = "tsconfig_browser",
+ src = "tsconfig.browser.json",
+ deps = [
+ "//:tsconfig.base.json",
+ "//:tsconfig.browser.json",
+ ],
+)
+
+ts_project(
+ name = "tsc",
+ args = ["--pretty"],
+ srcs = SRCS,
+ deps = DEPS,
+ declaration = True,
+ declaration_dir = "target_types",
+ declaration_map = True,
+ incremental = True,
+ out_dir = "target_node",
+ root_dir = "src",
+ source_map = True,
+ tsconfig = ":tsconfig",
+)
+
+ts_project(
+ name = "tsc_browser",
+ args = ['--pretty'],
+ srcs = SRCS,
+ deps = DEPS,
+ allow_js = True,
+ declaration = False,
+ incremental = True,
+ out_dir = "target_web",
+ source_map = True,
+ root_dir = "src",
+ tsconfig = ":tsconfig_browser",
+)
+
+js_library(
+ name = PKG_BASE_NAME,
+ package_name = PKG_REQUIRE_NAME,
+ srcs = NPM_MODULE_EXTRA_FILES,
+ visibility = ["//visibility:public"],
+ deps = [":tsc", ":tsc_browser"] + DEPS,
+)
+
+pkg_npm(
+ name = "npm_module",
+ deps = [
+ ":%s" % PKG_BASE_NAME,
+ ],
+)
+
+filegroup(
+ name = "build",
+ srcs = [
+ ":npm_module",
+ ],
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/kbn-securitysolution-t-grid/README.md b/packages/kbn-securitysolution-t-grid/README.md
new file mode 100644
index 0000000000000..a49669c81689a
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/README.md
@@ -0,0 +1,3 @@
+# kbn-securitysolution-t-grid
+
+We do not want to create circular dependencies between security_solution and timelines plugins. Therefore , we will use this packages to share components between these two plugins.
diff --git a/packages/kbn-securitysolution-t-grid/babel.config.js b/packages/kbn-securitysolution-t-grid/babel.config.js
new file mode 100644
index 0000000000000..b4a118df51af5
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/babel.config.js
@@ -0,0 +1,19 @@
+/*
+ * 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 = {
+ env: {
+ web: {
+ presets: ['@kbn/babel-preset/webpack_preset'],
+ },
+ node: {
+ presets: ['@kbn/babel-preset/node_preset'],
+ },
+ },
+ ignore: ['**/*.test.ts', '**/*.test.tsx'],
+};
diff --git a/packages/kbn-securitysolution-t-grid/jest.config.js b/packages/kbn-securitysolution-t-grid/jest.config.js
new file mode 100644
index 0000000000000..21e7d2d71b61a
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/jest.config.js
@@ -0,0 +1,13 @@
+/*
+ * 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: ['/packages/kbn-securitysolution-t-grid'],
+};
diff --git a/packages/kbn-securitysolution-t-grid/package.json b/packages/kbn-securitysolution-t-grid/package.json
new file mode 100644
index 0000000000000..68d3a8c71e7ca
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/package.json
@@ -0,0 +1,10 @@
+{
+ "name": "@kbn/securitysolution-t-grid",
+ "version": "1.0.0",
+ "description": "security solution t-grid packages will allow sharing components between timelines and security_solution plugin until we transfer all functionality to timelines plugin",
+ "license": "SSPL-1.0 OR Elastic License 2.0",
+ "browser": "./target_web/browser.js",
+ "main": "./target_node/index.js",
+ "types": "./target_types/index.d.ts",
+ "private": true
+}
diff --git a/packages/kbn-securitysolution-t-grid/react/package.json b/packages/kbn-securitysolution-t-grid/react/package.json
new file mode 100644
index 0000000000000..c29ddd45f084d
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/react/package.json
@@ -0,0 +1,5 @@
+{
+ "browser": "../target_web/react",
+ "main": "../target_node/react",
+ "types": "../target_types/react/index.d.ts"
+}
\ No newline at end of file
diff --git a/packages/kbn-securitysolution-t-grid/src/constants/index.ts b/packages/kbn-securitysolution-t-grid/src/constants/index.ts
new file mode 100644
index 0000000000000..c03c0093d9839
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/src/constants/index.ts
@@ -0,0 +1,26 @@
+/*
+ * 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 const HIGHLIGHTED_DROP_TARGET_CLASS_NAME = 'highlighted-drop-target';
+export const EMPTY_PROVIDERS_GROUP_CLASS_NAME = 'empty-providers-group';
+
+/** The draggable will move this many pixels via the keyboard when the arrow key is pressed */
+export const KEYBOARD_DRAG_OFFSET = 20;
+
+export const DRAGGABLE_KEYBOARD_WRAPPER_CLASS_NAME = 'draggable-keyboard-wrapper';
+
+export const ROW_RENDERER_CLASS_NAME = 'row-renderer';
+
+export const NOTES_CONTAINER_CLASS_NAME = 'notes-container';
+
+export const NOTE_CONTENT_CLASS_NAME = 'note-content';
+
+/** This class is added to the document body while dragging */
+export const IS_DRAGGING_CLASS_NAME = 'is-dragging';
+
+export const HOVER_ACTIONS_ALWAYS_SHOW_CLASS_NAME = 'hover-actions-always-show';
diff --git a/packages/kbn-securitysolution-t-grid/src/index.ts b/packages/kbn-securitysolution-t-grid/src/index.ts
new file mode 100644
index 0000000000000..0c2e9a7dbea8b
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/src/index.ts
@@ -0,0 +1,11 @@
+/*
+ * 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 * from './constants';
+export * from './utils';
+export * from './mock';
diff --git a/packages/kbn-securitysolution-t-grid/src/mock/index.ts b/packages/kbn-securitysolution-t-grid/src/mock/index.ts
new file mode 100644
index 0000000000000..dc1b63dfc33b0
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/src/mock/index.ts
@@ -0,0 +1,9 @@
+/*
+ * 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 * from './mock_event_details';
diff --git a/x-pack/plugins/security_solution/common/utils/mock_event_details.ts b/packages/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts
similarity index 97%
rename from x-pack/plugins/security_solution/common/utils/mock_event_details.ts
rename to packages/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts
index 7dc257ebb3fef..167fc9dd17a2a 100644
--- a/x-pack/plugins/security_solution/common/utils/mock_event_details.ts
+++ b/packages/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts
@@ -1,8 +1,9 @@
/*
* 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.
+ * 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 const eventHit = {
diff --git a/packages/kbn-securitysolution-t-grid/src/utils/api/index.ts b/packages/kbn-securitysolution-t-grid/src/utils/api/index.ts
new file mode 100644
index 0000000000000..34e448419693b
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/src/utils/api/index.ts
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+import { has } from 'lodash/fp';
+
+export interface AppError extends Error {
+ body: {
+ message: string;
+ };
+}
+
+export interface KibanaError extends AppError {
+ body: {
+ message: string;
+ statusCode: number;
+ };
+}
+
+export interface SecurityAppError extends AppError {
+ body: {
+ message: string;
+ status_code: number;
+ };
+}
+
+export const isKibanaError = (error: unknown): error is KibanaError =>
+ has('message', error) && has('body.message', error) && has('body.statusCode', error);
+
+export const isSecurityAppError = (error: unknown): error is SecurityAppError =>
+ has('message', error) && has('body.message', error) && has('body.status_code', error);
+
+export const isAppError = (error: unknown): error is AppError =>
+ isKibanaError(error) || isSecurityAppError(error);
+
+export const isNotFoundError = (error: unknown) =>
+ (isKibanaError(error) && error.body.statusCode === 404) ||
+ (isSecurityAppError(error) && error.body.status_code === 404);
diff --git a/packages/kbn-securitysolution-t-grid/src/utils/drag_and_drop/index.ts b/packages/kbn-securitysolution-t-grid/src/utils/drag_and_drop/index.ts
new file mode 100644
index 0000000000000..91b2e88d97358
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/src/utils/drag_and_drop/index.ts
@@ -0,0 +1,133 @@
+/*
+ * 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.
+ */
+
+import type { DropResult } from 'react-beautiful-dnd';
+
+export const draggableIdPrefix = 'draggableId';
+
+export const droppableIdPrefix = 'droppableId';
+
+export const draggableContentPrefix = `${draggableIdPrefix}.content.`;
+
+export const draggableTimelineProvidersPrefix = `${draggableIdPrefix}.timelineProviders.`;
+
+export const draggableFieldPrefix = `${draggableIdPrefix}.field.`;
+
+export const droppableContentPrefix = `${droppableIdPrefix}.content.`;
+
+export const droppableFieldPrefix = `${droppableIdPrefix}.field.`;
+
+export const droppableTimelineProvidersPrefix = `${droppableIdPrefix}.timelineProviders.`;
+
+export const droppableTimelineColumnsPrefix = `${droppableIdPrefix}.timelineColumns.`;
+
+export const droppableTimelineFlyoutBottomBarPrefix = `${droppableIdPrefix}.flyoutButton.`;
+
+export const getDraggableId = (dataProviderId: string): string =>
+ `${draggableContentPrefix}${dataProviderId}`;
+
+export const getDraggableFieldId = ({
+ contextId,
+ fieldId,
+}: {
+ contextId: string;
+ fieldId: string;
+}): string => `${draggableFieldPrefix}${escapeContextId(contextId)}.${escapeFieldId(fieldId)}`;
+
+export const getTimelineProviderDroppableId = ({
+ groupIndex,
+ timelineId,
+}: {
+ groupIndex: number;
+ timelineId: string;
+}): string => `${droppableTimelineProvidersPrefix}${timelineId}.group.${groupIndex}`;
+
+export const getTimelineProviderDraggableId = ({
+ dataProviderId,
+ groupIndex,
+ timelineId,
+}: {
+ dataProviderId: string;
+ groupIndex: number;
+ timelineId: string;
+}): string =>
+ `${draggableTimelineProvidersPrefix}${timelineId}.group.${groupIndex}.${dataProviderId}`;
+
+export const getDroppableId = (visualizationPlaceholderId: string): string =>
+ `${droppableContentPrefix}${visualizationPlaceholderId}`;
+
+export const sourceIsContent = (result: DropResult): boolean =>
+ result.source.droppableId.startsWith(droppableContentPrefix);
+
+export const sourceAndDestinationAreSameTimelineProviders = (result: DropResult): boolean => {
+ const regex = /^droppableId\.timelineProviders\.(\S+)\./;
+ const sourceMatches = result.source.droppableId.match(regex) || [];
+ const destinationMatches =
+ (result.destination && result.destination.droppableId.match(regex)) || [];
+
+ return (
+ sourceMatches.length >= 2 &&
+ destinationMatches.length >= 2 &&
+ sourceMatches[1] === destinationMatches[1]
+ );
+};
+
+export const draggableIsContent = (result: DropResult | { draggableId: string }): boolean =>
+ result.draggableId.startsWith(draggableContentPrefix);
+
+export const draggableIsField = (result: DropResult | { draggableId: string }): boolean =>
+ result.draggableId.startsWith(draggableFieldPrefix);
+
+export const reasonIsDrop = (result: DropResult): boolean => result.reason === 'DROP';
+
+export const destinationIsTimelineProviders = (result: DropResult): boolean =>
+ result.destination != null &&
+ result.destination.droppableId.startsWith(droppableTimelineProvidersPrefix);
+
+export const destinationIsTimelineColumns = (result: DropResult): boolean =>
+ result.destination != null &&
+ result.destination.droppableId.startsWith(droppableTimelineColumnsPrefix);
+
+export const destinationIsTimelineButton = (result: DropResult): boolean =>
+ result.destination != null &&
+ result.destination.droppableId.startsWith(droppableTimelineFlyoutBottomBarPrefix);
+
+export const getProviderIdFromDraggable = (result: DropResult): string =>
+ result.draggableId.substring(result.draggableId.lastIndexOf('.') + 1);
+
+export const getFieldIdFromDraggable = (result: DropResult): string =>
+ unEscapeFieldId(result.draggableId.substring(result.draggableId.lastIndexOf('.') + 1));
+
+export const escapeDataProviderId = (path: string) => path.replace(/\./g, '_');
+
+export const escapeContextId = (path: string) => path.replace(/\./g, '_');
+
+export const escapeFieldId = (path: string) => path.replace(/\./g, '!!!DOT!!!');
+
+export const unEscapeFieldId = (path: string) => path.replace(/!!!DOT!!!/g, '.');
+
+export const providerWasDroppedOnTimeline = (result: DropResult): boolean =>
+ reasonIsDrop(result) &&
+ draggableIsContent(result) &&
+ sourceIsContent(result) &&
+ destinationIsTimelineProviders(result);
+
+export const userIsReArrangingProviders = (result: DropResult): boolean =>
+ reasonIsDrop(result) && sourceAndDestinationAreSameTimelineProviders(result);
+
+export const fieldWasDroppedOnTimelineColumns = (result: DropResult): boolean =>
+ reasonIsDrop(result) && draggableIsField(result) && destinationIsTimelineColumns(result);
+
+/**
+ * Prevents fields from being dragged or dropped to any area other than column
+ * header drop zone in the timeline
+ */
+export const DRAG_TYPE_FIELD = 'drag-type-field';
+
+/** This class is added to the document body while timeline field dragging */
+export const IS_TIMELINE_FIELD_DRAGGING_CLASS_NAME = 'is-timeline-field-dragging';
diff --git a/packages/kbn-securitysolution-t-grid/src/utils/index.ts b/packages/kbn-securitysolution-t-grid/src/utils/index.ts
new file mode 100644
index 0000000000000..39629a990c539
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/src/utils/index.ts
@@ -0,0 +1,10 @@
+/*
+ * 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 * from './api';
+export * from './drag_and_drop';
diff --git a/packages/kbn-securitysolution-t-grid/tsconfig.browser.json b/packages/kbn-securitysolution-t-grid/tsconfig.browser.json
new file mode 100644
index 0000000000000..a5183ba4fd457
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/tsconfig.browser.json
@@ -0,0 +1,23 @@
+{
+ "extends": "../../tsconfig.browser.json",
+ "compilerOptions": {
+ "allowJs": true,
+ "incremental": true,
+ "outDir": "./target_web",
+ "declaration": false,
+ "isolatedModules": true,
+ "sourceMap": true,
+ "sourceRoot": "../../../../../packages/kbn-securitysolution-t-grid/src",
+ "types": [
+ "jest",
+ "node"
+ ],
+ },
+ "include": [
+ "src/**/*.ts",
+ "src/**/*.tsx",
+ ],
+ "exclude": [
+ "**/__fixtures__/**/*"
+ ]
+}
diff --git a/packages/kbn-securitysolution-t-grid/tsconfig.json b/packages/kbn-securitysolution-t-grid/tsconfig.json
new file mode 100644
index 0000000000000..8cda578edede4
--- /dev/null
+++ b/packages/kbn-securitysolution-t-grid/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "extends": "../../tsconfig.base.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "incremental": true,
+ "outDir": "target",
+ "rootDir": "src",
+ "sourceMap": true,
+ "sourceRoot": "../../../../packages/kbn-securitysolution-t-grid/src",
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": [
+ "src/**/*"
+ ]
+}
diff --git a/packages/kbn-test/jest-preset.js b/packages/kbn-test/jest-preset.js
index 225f93d487823..5baff607704c7 100644
--- a/packages/kbn-test/jest-preset.js
+++ b/packages/kbn-test/jest-preset.js
@@ -94,7 +94,7 @@ module.exports = {
transformIgnorePatterns: [
// ignore all node_modules except monaco-editor and react-monaco-editor which requires babel transforms to handle dynamic import()
// since ESM modules are not natively supported in Jest yet (https://github.com/facebook/jest/issues/4842)
- '[/\\\\]node_modules(?![\\/\\\\](monaco-editor|react-monaco-editor))[/\\\\].+\\.js$',
+ '[/\\\\]node_modules(?![\\/\\\\](monaco-editor|react-monaco-editor|d3-interpolate|d3-color))[/\\\\].+\\.js$',
'packages/kbn-pm/dist/index.js',
],
diff --git a/tsconfig.json b/tsconfig.json
index c91f7b768a5c4..f6df8fcbb6406 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -70,7 +70,6 @@
{ "path": "./src/plugins/visualize/tsconfig.json" },
{ "path": "./src/plugins/index_pattern_management/tsconfig.json" },
{ "path": "./src/plugins/index_pattern_field_editor/tsconfig.json" },
-
{ "path": "./x-pack/plugins/actions/tsconfig.json" },
{ "path": "./x-pack/plugins/alerting/tsconfig.json" },
{ "path": "./x-pack/plugins/apm/tsconfig.json" },
diff --git a/tsconfig.refs.json b/tsconfig.refs.json
index 3baf5c323ef81..e08b50cc055c1 100644
--- a/tsconfig.refs.json
+++ b/tsconfig.refs.json
@@ -105,6 +105,7 @@
{ "path": "./x-pack/plugins/stack_alerts/tsconfig.json" },
{ "path": "./x-pack/plugins/task_manager/tsconfig.json" },
{ "path": "./x-pack/plugins/telemetry_collection_xpack/tsconfig.json" },
+ { "path": "./x-pack/plugins/timelines/tsconfig.json" },
{ "path": "./x-pack/plugins/transform/tsconfig.json" },
{ "path": "./x-pack/plugins/translations/tsconfig.json" },
{ "path": "./x-pack/plugins/triggers_actions_ui/tsconfig.json" },
diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts
index b20b1501eecc5..a9a81aa285af7 100644
--- a/x-pack/plugins/security_solution/common/experimental_features.ts
+++ b/x-pack/plugins/security_solution/common/experimental_features.ts
@@ -15,6 +15,7 @@ const allowedExperimentalValues = Object.freeze({
trustedAppsByPolicyEnabled: false,
metricsEntitiesEnabled: false,
ruleRegistryEnabled: false,
+ tGridEnabled: false,
});
type ExperimentalConfigKeys = Array;
diff --git a/x-pack/plugins/security_solution/common/index.ts b/x-pack/plugins/security_solution/common/index.ts
index 1fec1c76430eb..e6d7bcc9bd506 100644
--- a/x-pack/plugins/security_solution/common/index.ts
+++ b/x-pack/plugins/security_solution/common/index.ts
@@ -4,3 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
+
+export * from './types';
+export * from './search_strategy';
+export * from './utility_types';
diff --git a/x-pack/plugins/security_solution/common/search_strategy/common/index.ts b/x-pack/plugins/security_solution/common/search_strategy/common/index.ts
index 4fcfbdac3c1b4..095ba4ca20afc 100644
--- a/x-pack/plugins/security_solution/common/search_strategy/common/index.ts
+++ b/x-pack/plugins/security_solution/common/search_strategy/common/index.ts
@@ -4,52 +4,27 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
-import type { estypes } from '@elastic/elasticsearch';
import { IEsSearchResponse } from '../../../../../../src/plugins/data/common';
+export type {
+ Inspect,
+ SortField,
+ TimerangeInput,
+ PaginationInputPaginated,
+ DocValueFields,
+ CursorType,
+ TotalValue,
+} from '../../../../timelines/common';
+export { Direction } from '../../../../timelines/common';
export type Maybe = T | null;
export type SearchHit = IEsSearchResponse