From 70a1b3892a6d2a3d57cc9851b276087c29b6e1e3 Mon Sep 17 00:00:00 2001
From: Orhan Toy
Date: Thu, 2 Dec 2021 15:52:41 +0100
Subject: [PATCH 01/65] [App Search, Crawler] Use consistent casing for
validation step titles (#120064)
---
.../components/add_domain/add_domain_logic.test.ts | 12 ++++++------
.../components/add_domain/add_domain_validation.tsx | 2 +-
.../crawler/components/add_domain/utils.ts | 6 +++---
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/add_domain/add_domain_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/add_domain/add_domain_logic.test.ts
index 4b229b3687174..466ccc61838f0 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/add_domain/add_domain_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/add_domain/add_domain_logic.test.ts
@@ -507,16 +507,16 @@ describe('AddDomainLogic', () => {
networkConnectivity: {
state: 'invalid',
message:
- 'Unable to establish a network connection because the "Initial Validation" check failed.',
+ 'Unable to establish a network connection because the "Initial validation" check failed.',
},
indexingRestrictions: {
state: 'invalid',
message:
- 'Unable to determine indexing restrictions because the "Network Connectivity" check failed.',
+ 'Unable to determine indexing restrictions because the "Network connectivity" check failed.',
},
contentVerification: {
state: 'invalid',
- message: 'Unable to verify content because the "Indexing Restrictions" check failed.',
+ message: 'Unable to verify content because the "Indexing restrictions" check failed.',
},
});
});
@@ -602,16 +602,16 @@ describe('AddDomainLogic', () => {
networkConnectivity: {
state: 'invalid',
message:
- 'Unable to establish a network connection because the "Initial Validation" check failed.',
+ 'Unable to establish a network connection because the "Initial validation" check failed.',
},
indexingRestrictions: {
state: 'invalid',
message:
- 'Unable to determine indexing restrictions because the "Network Connectivity" check failed.',
+ 'Unable to determine indexing restrictions because the "Network connectivity" check failed.',
},
contentVerification: {
state: 'invalid',
- message: 'Unable to verify content because the "Indexing Restrictions" check failed.',
+ message: 'Unable to verify content because the "Indexing restrictions" check failed.',
},
});
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/add_domain/add_domain_validation.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/add_domain/add_domain_validation.tsx
index 8840b8d355864..817c43df4f8b6 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/add_domain/add_domain_validation.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/add_domain/add_domain_validation.tsx
@@ -86,7 +86,7 @@ export const AddDomainValidation: React.FC = () => {
label={i18n.translate(
'xpack.enterpriseSearch.appSearch.crawler.addDomainForm.contentVerificationLabel',
{
- defaultMessage: 'Content Verification',
+ defaultMessage: 'Content verification',
}
)}
/>
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/add_domain/utils.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/add_domain/utils.ts
index e5886a726f261..1f744d5eabf9b 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/add_domain/utils.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/add_domain/utils.ts
@@ -82,7 +82,7 @@ const allFailureResultChanges: CrawlerDomainValidationResultChange = {
'xpack.enterpriseSearch.appSearch.crawler.addDomainForm.networkConnectivityFailureMessage',
{
defaultMessage:
- 'Unable to establish a network connection because the "Initial Validation" check failed.',
+ 'Unable to establish a network connection because the "Initial validation" check failed.',
}
),
},
@@ -92,7 +92,7 @@ const allFailureResultChanges: CrawlerDomainValidationResultChange = {
'xpack.enterpriseSearch.appSearch.crawler.addDomainForm.indexingRestrictionsFailureMessage',
{
defaultMessage:
- 'Unable to determine indexing restrictions because the "Network Connectivity" check failed.',
+ 'Unable to determine indexing restrictions because the "Network connectivity" check failed.',
}
),
},
@@ -102,7 +102,7 @@ const allFailureResultChanges: CrawlerDomainValidationResultChange = {
'xpack.enterpriseSearch.appSearch.crawler.addDomainForm.contentVerificationFailureMessage',
{
defaultMessage:
- 'Unable to verify content because the "Indexing Restrictions" check failed.',
+ 'Unable to verify content because the "Indexing restrictions" check failed.',
}
),
},
From 8b762138091c4608b66cba2ffa63ab58f9481d6b Mon Sep 17 00:00:00 2001
From: Yaroslav Kuznietsov
Date: Thu, 2 Dec 2021 17:11:06 +0200
Subject: [PATCH 02/65] [Storybook] Fixes Storybook is endlessly refreshed.
(#120216)
---
packages/kbn-storybook/src/lib/theme_switcher.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/kbn-storybook/src/lib/theme_switcher.tsx b/packages/kbn-storybook/src/lib/theme_switcher.tsx
index c06e57035819f..3d6f7999545a0 100644
--- a/packages/kbn-storybook/src/lib/theme_switcher.tsx
+++ b/packages/kbn-storybook/src/lib/theme_switcher.tsx
@@ -20,7 +20,7 @@ export function ThemeSwitcher() {
const [globals, updateGlobals] = useGlobals();
const selectedTheme = globals.euiTheme;
- if (!selectedTheme || selectedTheme === defaultTheme) {
+ if (!selectedTheme) {
updateGlobals({ euiTheme: defaultTheme });
}
From 482aae27686946364c3e6c0b11ea995223a557ce Mon Sep 17 00:00:00 2001
From: Kuldeep M
Date: Thu, 2 Dec 2021 15:49:45 +0000
Subject: [PATCH 03/65] Workplace Search fix overview page spacing (#120224)
---
.../views/content_sources/components/overview.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.tsx
index a33f5ec90e3a0..fd29b5f590967 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.tsx
@@ -257,6 +257,7 @@ export const Overview: React.FC = () => {
const groupsSummary = (
<>
+
{GROUP_ACCESS_TITLE}
@@ -479,7 +480,6 @@ export const Overview: React.FC = () => {
const syncTriggerCallout = (
-
{SOURCE_SYNCHRONIZATION_TITLE}
From 2c4dfde1740ea3456ce905cb8dcb48a4234e7b44 Mon Sep 17 00:00:00 2001
From: Jen Huang
Date: Thu, 2 Dec 2021 08:01:01 -0800
Subject: [PATCH 04/65] [Fleet] Re-enable registry version check (#120045)
* Re-enable registry version check
* Update registry image
* Use dockerized registry for base x-pack api integration and functional tests
* Revert "Use dockerized registry for base x-pack api integration and functional tests"
This reverts commit 2fd4ec17d486a584e729a277c96bca3b66f8971f.
---
x-pack/plugins/apm/ftr_e2e/ftr_config_run.ts | 2 +-
x-pack/plugins/fleet/server/index.ts | 3 +--
x-pack/plugins/fleet/server/services/epm/registry/index.ts | 3 +--
x-pack/test/fleet_api_integration/config.ts | 2 +-
4 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/x-pack/plugins/apm/ftr_e2e/ftr_config_run.ts b/x-pack/plugins/apm/ftr_e2e/ftr_config_run.ts
index a5a0b52e3fbef..8fc87b49a6607 100644
--- a/x-pack/plugins/apm/ftr_e2e/ftr_config_run.ts
+++ b/x-pack/plugins/apm/ftr_e2e/ftr_config_run.ts
@@ -13,7 +13,7 @@ import { packageRegistryPort } from './ftr_config';
import { FtrProviderContext } from './ftr_provider_context';
export const dockerImage =
- 'docker.elastic.co/package-registry/distribution@sha256:13d9996dd24161624784704e080f5f5b7f0ef34ff0d9259f8f05010ccae00058';
+ 'docker.elastic.co/package-registry/distribution@sha256:de952debe048d903fc73e8a4472bb48bb95028d440cba852f21b863d47020c61';
async function ftrConfigRun({ readConfigFile }: FtrConfigProviderContext) {
const kibanaConfig = await readConfigFile(require.resolve('./ftr_config.ts'));
diff --git a/x-pack/plugins/fleet/server/index.ts b/x-pack/plugins/fleet/server/index.ts
index 9fc0edd0b7cf8..8cbfa311081d2 100644
--- a/x-pack/plugins/fleet/server/index.ts
+++ b/x-pack/plugins/fleet/server/index.ts
@@ -94,8 +94,7 @@ export const config: PluginConfigDescriptor = {
outputs: PreconfiguredOutputsSchema,
agentIdVerificationEnabled: schema.boolean({ defaultValue: true }),
developer: schema.object({
- // TODO: change default to false as soon as EPR issue fixed. Blocker for 8.0.
- disableRegistryVersionCheck: schema.boolean({ defaultValue: true }),
+ disableRegistryVersionCheck: schema.boolean({ defaultValue: false }),
}),
}),
};
diff --git a/x-pack/plugins/fleet/server/services/epm/registry/index.ts b/x-pack/plugins/fleet/server/services/epm/registry/index.ts
index ff829eca5ec18..1b6e28a07f8e0 100644
--- a/x-pack/plugins/fleet/server/services/epm/registry/index.ts
+++ b/x-pack/plugins/fleet/server/services/epm/registry/index.ts
@@ -138,9 +138,8 @@ export async function fetchFile(filePath: string): Promise {
}
function setKibanaVersion(url: URL) {
- // TODO: change default to false as soon as EPR issue fixed. Blocker for 8.0.
const disableVersionCheck =
- appContextService.getConfig()?.developer?.disableRegistryVersionCheck ?? true;
+ appContextService.getConfig()?.developer?.disableRegistryVersionCheck ?? false;
if (disableVersionCheck) {
return;
}
diff --git a/x-pack/test/fleet_api_integration/config.ts b/x-pack/test/fleet_api_integration/config.ts
index 308c4ab66f15c..fb9dc7b6b4ce6 100644
--- a/x-pack/test/fleet_api_integration/config.ts
+++ b/x-pack/test/fleet_api_integration/config.ts
@@ -15,7 +15,7 @@ import { defineDockerServersConfig } from '@kbn/test';
// example: https://beats-ci.elastic.co/blue/organizations/jenkins/Ingest-manager%2Fpackage-storage/detail/snapshot/74/pipeline/257#step-302-log-1.
// It should be updated any time there is a new Docker image published for the Snapshot Distribution of the Package Registry.
export const dockerImage =
- 'docker.elastic.co/package-registry/distribution@sha256:13d9996dd24161624784704e080f5f5b7f0ef34ff0d9259f8f05010ccae00058';
+ 'docker.elastic.co/package-registry/distribution@sha256:de952debe048d903fc73e8a4472bb48bb95028d440cba852f21b863d47020c61';
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts'));
From fcb1b9d08a0b02d8a3709f770549702a43454ebd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20S=C3=A1nchez?=
Date: Thu, 2 Dec 2021 17:12:24 +0100
Subject: [PATCH 05/65] [Security Solution] [Endpoint] Adds new artifact hook
to remove policies from endpoint artifacts (#120085)
* Adds new artifact hook to remove policies from endpoint artifacts. Removed dedicated one for Trusted Apps and updated test
* Removes trusted app hook
* Add comment, remove unused async statements and fix wrong test name
* removes unused import
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
---
.../endpoint/endpoint_app_context_services.ts | 5 +-
.../fleet_integration.test.ts | 56 +++++--------
.../fleet_integration/fleet_integration.ts | 10 +--
.../handlers/remove_policy_from_artifacts.ts | 79 +++++++++++++++++++
.../remove_policy_from_trusted_apps.ts | 61 --------------
5 files changed, 104 insertions(+), 107 deletions(-)
create mode 100644 x-pack/plugins/security_solution/server/fleet_integration/handlers/remove_policy_from_artifacts.ts
delete mode 100644 x-pack/plugins/security_solution/server/fleet_integration/handlers/remove_policy_from_trusted_apps.ts
diff --git a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts
index 79436c66d073f..5d6dbeca3e0c6 100644
--- a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts
+++ b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts
@@ -114,10 +114,7 @@ export class EndpointAppContextService {
dependencies.registerIngestCallback(
'postPackagePolicyDelete',
- getPackagePolicyDeleteCallback(
- dependencies.exceptionListsClient,
- dependencies.config.experimentalFeatures
- )
+ getPackagePolicyDeleteCallback(dependencies.exceptionListsClient)
);
}
}
diff --git a/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts b/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts
index 71c093e0781b0..2a4c59f94c8c6 100644
--- a/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts
+++ b/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts
@@ -40,11 +40,8 @@ import { getMockArtifacts, toArtifactRecords } from '../endpoint/lib/artifacts/m
import { Manifest } from '../endpoint/lib/artifacts';
import { NewPackagePolicy } from '../../../fleet/common/types/models';
import { ManifestSchema } from '../../common/endpoint/schema/manifest';
-import {
- allowedExperimentalValues,
- ExperimentalFeatures,
-} from '../../common/experimental_features';
import { DeletePackagePoliciesResponse } from '../../../fleet/common';
+import { ARTIFACT_LISTS_IDS_TO_REMOVE } from './handlers/remove_policy_from_artifacts';
describe('ingest_integration tests ', () => {
let endpointAppContextMock: EndpointAppContextServiceStartContract;
@@ -286,44 +283,41 @@ describe('ingest_integration tests ', () => {
});
});
- describe('package policy delete callback with trusted apps by policy enabled', () => {
- const invokeDeleteCallback = async (
- experimentalFeatures?: ExperimentalFeatures
- ): Promise => {
- const callback = getPackagePolicyDeleteCallback(exceptionListClient, experimentalFeatures);
+ describe('package policy delete callback', () => {
+ const invokeDeleteCallback = async (): Promise => {
+ const callback = getPackagePolicyDeleteCallback(exceptionListClient);
await callback(deletePackagePolicyMock());
};
let removedPolicies: DeletePackagePoliciesResponse;
let policyId: string;
- let fakeTA: ExceptionListSchema;
+ let fakeArtifact: ExceptionListSchema;
beforeEach(() => {
removedPolicies = deletePackagePolicyMock();
policyId = removedPolicies[0].id;
- fakeTA = {
+ fakeArtifact = {
...getExceptionListSchemaMock(),
tags: [`policy:${policyId}`],
};
- exceptionListClient.findExceptionListItem = jest
+ exceptionListClient.findExceptionListsItem = jest
.fn()
- .mockResolvedValueOnce({ data: [fakeTA], total: 1 });
+ .mockResolvedValueOnce({ data: [fakeArtifact], total: 1 });
exceptionListClient.updateExceptionListItem = jest
.fn()
- .mockResolvedValueOnce({ ...fakeTA, tags: [] });
+ .mockResolvedValueOnce({ ...fakeArtifact, tags: [] });
});
- it('removes policy from trusted app FF enabled', async () => {
- await invokeDeleteCallback({
- ...allowedExperimentalValues,
- trustedAppsByPolicyEnabled: true, // Needs to be enabled, it needs also a test with this disabled.
- });
+ it('removes policy from artifact', async () => {
+ await invokeDeleteCallback();
- expect(exceptionListClient.findExceptionListItem).toHaveBeenCalledWith({
- filter: `exception-list-agnostic.attributes.tags:"policy:${policyId}"`,
- listId: 'endpoint_trusted_apps',
- namespaceType: 'agnostic',
+ expect(exceptionListClient.findExceptionListsItem).toHaveBeenCalledWith({
+ listId: ARTIFACT_LISTS_IDS_TO_REMOVE,
+ filter: ARTIFACT_LISTS_IDS_TO_REMOVE.map(
+ () => `exception-list-agnostic.attributes.tags:"policy:${policyId}"`
+ ),
+ namespaceType: ARTIFACT_LISTS_IDS_TO_REMOVE.map(() => 'agnostic'),
page: 1,
perPage: 50,
sortField: undefined,
@@ -331,21 +325,11 @@ describe('ingest_integration tests ', () => {
});
expect(exceptionListClient.updateExceptionListItem).toHaveBeenCalledWith({
- ...fakeTA,
- namespaceType: fakeTA.namespace_type,
- osTypes: fakeTA.os_types,
+ ...fakeArtifact,
+ namespaceType: fakeArtifact.namespace_type,
+ osTypes: fakeArtifact.os_types,
tags: [],
});
});
-
- it("doesn't remove policy from trusted app if feature flag is disabled", async () => {
- await invokeDeleteCallback({
- ...allowedExperimentalValues,
- trustedAppsByPolicyEnabled: false, // since it was changed to `true` by default
- });
-
- expect(exceptionListClient.findExceptionListItem).toHaveBeenCalledTimes(0);
- expect(exceptionListClient.updateExceptionListItem).toHaveBeenCalledTimes(0);
- });
});
});
diff --git a/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.ts b/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.ts
index a53d5d43de524..4c54dcb0f7725 100644
--- a/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.ts
+++ b/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.ts
@@ -17,7 +17,6 @@ import {
import { NewPackagePolicy, UpdatePackagePolicy } from '../../../fleet/common';
import { NewPolicyData, PolicyConfig } from '../../common/endpoint/types';
-import { ExperimentalFeatures } from '../../common/experimental_features';
import { LicenseService } from '../../common/license';
import { ManifestManager } from '../endpoint/services';
import { IRequestContextFactory } from '../request_context_factory';
@@ -25,7 +24,7 @@ import { installPrepackagedRules } from './handlers/install_prepackaged_rules';
import { createPolicyArtifactManifest } from './handlers/create_policy_artifact_manifest';
import { createDefaultPolicy } from './handlers/create_default_policy';
import { validatePolicyAgainstLicense } from './handlers/validate_policy_against_license';
-import { removePolicyFromTrustedApps } from './handlers/remove_policy_from_trusted_apps';
+import { removePolicyFromArtifacts } from './handlers/remove_policy_from_artifacts';
const isEndpointPackagePolicy = (
packagePolicy: T
@@ -131,8 +130,7 @@ export const getPackagePolicyUpdateCallback = (
};
export const getPackagePolicyDeleteCallback = (
- exceptionsClient: ExceptionListClient | undefined,
- experimentalFeatures: ExperimentalFeatures | undefined
+ exceptionsClient: ExceptionListClient | undefined
): PostPackagePolicyDeleteCallback => {
return async (deletePackagePolicy): Promise => {
if (!exceptionsClient) {
@@ -140,8 +138,8 @@ export const getPackagePolicyDeleteCallback = (
}
const policiesToRemove: Array> = [];
for (const policy of deletePackagePolicy) {
- if (isEndpointPackagePolicy(policy) && experimentalFeatures?.trustedAppsByPolicyEnabled) {
- policiesToRemove.push(removePolicyFromTrustedApps(exceptionsClient, policy));
+ if (isEndpointPackagePolicy(policy)) {
+ policiesToRemove.push(removePolicyFromArtifacts(exceptionsClient, policy));
}
}
await Promise.all(policiesToRemove);
diff --git a/x-pack/plugins/security_solution/server/fleet_integration/handlers/remove_policy_from_artifacts.ts b/x-pack/plugins/security_solution/server/fleet_integration/handlers/remove_policy_from_artifacts.ts
new file mode 100644
index 0000000000000..57a23d677e014
--- /dev/null
+++ b/x-pack/plugins/security_solution/server/fleet_integration/handlers/remove_policy_from_artifacts.ts
@@ -0,0 +1,79 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import pMap from 'p-map';
+
+import {
+ ENDPOINT_TRUSTED_APPS_LIST_ID,
+ ENDPOINT_EVENT_FILTERS_LIST_ID,
+ ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID,
+} from '@kbn/securitysolution-list-constants';
+import { ExceptionListClient } from '../../../../lists/server';
+import { PostPackagePolicyDeleteCallback } from '../../../../fleet/server';
+
+export const ARTIFACT_LISTS_IDS_TO_REMOVE = [
+ ENDPOINT_TRUSTED_APPS_LIST_ID,
+ ENDPOINT_EVENT_FILTERS_LIST_ID,
+ ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID,
+];
+
+/**
+ * Removes policy from artifacts
+ */
+export const removePolicyFromArtifacts = async (
+ exceptionsClient: ExceptionListClient,
+ policy: Parameters[0][0]
+) => {
+ let page = 1;
+
+ const findArtifactsByPolicy = (currentPage: number) => {
+ return exceptionsClient.findExceptionListsItem({
+ listId: ARTIFACT_LISTS_IDS_TO_REMOVE,
+ filter: ARTIFACT_LISTS_IDS_TO_REMOVE.map(
+ () => `exception-list-agnostic.attributes.tags:"policy:${policy.id}"`
+ ),
+ namespaceType: ARTIFACT_LISTS_IDS_TO_REMOVE.map(() => 'agnostic'),
+ page: currentPage,
+ perPage: 50,
+ sortField: undefined,
+ sortOrder: undefined,
+ });
+ };
+
+ let findResponse = await findArtifactsByPolicy(page);
+ if (!findResponse) {
+ return;
+ }
+ const artifacts = findResponse.data;
+
+ while (findResponse && (artifacts.length < findResponse.total || findResponse.data.length)) {
+ page += 1;
+ findResponse = await findArtifactsByPolicy(page);
+ if (findResponse) {
+ artifacts.push(...findResponse.data);
+ }
+ }
+
+ await pMap(
+ artifacts,
+ (artifact) =>
+ exceptionsClient.updateExceptionListItem({
+ ...artifact,
+ itemId: artifact.item_id,
+ namespaceType: artifact.namespace_type,
+ osTypes: artifact.os_types,
+ tags: artifact.tags.filter((currentPolicy) => currentPolicy !== `policy:${policy.id}`),
+ }),
+ {
+ /** Number of concurrent executions till the end of the artifacts array */
+ concurrency: 5,
+ /** When set to false, instead of stopping when a promise rejects, it will wait for all the promises to
+ * settle and then reject with an aggregated error containing all the errors from the rejected promises. */
+ stopOnError: false,
+ }
+ );
+};
diff --git a/x-pack/plugins/security_solution/server/fleet_integration/handlers/remove_policy_from_trusted_apps.ts b/x-pack/plugins/security_solution/server/fleet_integration/handlers/remove_policy_from_trusted_apps.ts
deleted file mode 100644
index 88af71508f33a..0000000000000
--- a/x-pack/plugins/security_solution/server/fleet_integration/handlers/remove_policy_from_trusted_apps.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import { ENDPOINT_TRUSTED_APPS_LIST_ID } from '@kbn/securitysolution-list-constants';
-import { ExceptionListClient } from '../../../../lists/server';
-import { PostPackagePolicyDeleteCallback } from '../../../../fleet/server';
-
-/**
- * Removes policy from trusted apps
- */
-export const removePolicyFromTrustedApps = async (
- exceptionsClient: ExceptionListClient,
- policy: Parameters[0][0]
-) => {
- let page = 1;
-
- const findTrustedAppsByPolicy = async (currentPage: number) => {
- return exceptionsClient.findExceptionListItem({
- listId: ENDPOINT_TRUSTED_APPS_LIST_ID,
- filter: `exception-list-agnostic.attributes.tags:"policy:${policy.id}"`,
- namespaceType: 'agnostic',
- page: currentPage,
- perPage: 50,
- sortField: undefined,
- sortOrder: undefined,
- });
- };
-
- let findResponse = await findTrustedAppsByPolicy(page);
- if (!findResponse) {
- return;
- }
- const trustedApps = findResponse.data;
-
- while (findResponse && (trustedApps.length < findResponse.total || findResponse.data.length)) {
- page += 1;
- findResponse = await findTrustedAppsByPolicy(page);
- if (findResponse) {
- trustedApps.push(...findResponse.data);
- }
- }
-
- const updates = [];
- for (const trustedApp of trustedApps) {
- updates.push(
- exceptionsClient.updateExceptionListItem({
- ...trustedApp,
- itemId: trustedApp.item_id,
- namespaceType: trustedApp.namespace_type,
- osTypes: trustedApp.os_types,
- tags: trustedApp.tags.filter((currentPolicy) => currentPolicy !== `policy:${policy.id}`),
- })
- );
- }
-
- await Promise.all(updates);
-};
From d874c4c798f2faaf4219d7568f0c900325fb94bd Mon Sep 17 00:00:00 2001
From: Frank Hassanabad
Date: Thu, 2 Dec 2021 09:42:51 -0700
Subject: [PATCH 06/65] Removes tech debt from export all (#120170)
## Summary
See: https://github.com/elastic/kibana/issues/110903
This removes the `export *` from:
* lists plugin
This also adds `import type` and `export type` in a few areas and fixes the `LicenseType` by changing it from `server` to using the version from `common` to remove the restricted paths. This extra addition prevents more memory leaks when we run jest.
---
x-pack/plugins/lists/public/index.ts | 6 +-
.../security/common/licensing/index.mock.ts | 6 +-
.../add_exception_modal/index.test.tsx | 65 +++++++++++--------
.../exceptions/add_exception_modal/index.tsx | 5 +-
.../edit_exception_modal/index.test.tsx | 60 ++++++++---------
.../exceptions/edit_exception_modal/index.tsx | 4 +-
.../view/components/form/index.tsx | 8 +--
.../security_solution/public/plugin.tsx | 2 +-
.../public/shared_imports.ts | 2 -
.../plugins/security_solution/public/types.ts | 64 +++++++++---------
10 files changed, 109 insertions(+), 113 deletions(-)
diff --git a/x-pack/plugins/lists/public/index.ts b/x-pack/plugins/lists/public/index.ts
index 977b7f462777e..f35de2328714b 100644
--- a/x-pack/plugins/lists/public/index.ts
+++ b/x-pack/plugins/lists/public/index.ts
@@ -5,10 +5,8 @@
* 2.0.
*/
-// TODO: https://github.com/elastic/kibana/issues/110903
-/* eslint-disable @kbn/eslint/no_export_all */
-
-export * from './shared_exports';
+export { getExceptionBuilderComponentLazy } from './exceptions/components/builder/index';
+export type { OnChangeProps } from './exceptions/components/builder/index';
import type { PluginInitializerContext } from '../../../../src/core/public';
diff --git a/x-pack/plugins/security/common/licensing/index.mock.ts b/x-pack/plugins/security/common/licensing/index.mock.ts
index bd85df3dea638..f9e6a0b756d00 100644
--- a/x-pack/plugins/security/common/licensing/index.mock.ts
+++ b/x-pack/plugins/security/common/licensing/index.mock.ts
@@ -7,10 +7,8 @@
import { of } from 'rxjs';
-// eslint-disable-next-line @kbn/eslint/no-restricted-paths
-import { LICENSE_TYPE } from '../../../licensing/server';
-// eslint-disable-next-line @kbn/eslint/no-restricted-paths
-import type { LicenseType } from '../../../licensing/server';
+import type { LicenseType } from '../../../licensing/common/types';
+import { LICENSE_TYPE } from '../../../licensing/common/types';
import type { SecurityLicenseFeatures } from './license_features';
import type { SecurityLicense } from './license_service';
diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.test.tsx
index ac70d5276beb9..0e118d527c69b 100644
--- a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.test.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.test.tsx
@@ -12,7 +12,7 @@ import { waitFor } from '@testing-library/react';
import { AddExceptionModal } from './';
import { useCurrentUser } from '../../../../common/lib/kibana';
-import { ExceptionBuilder } from '../../../../shared_imports';
+import { getExceptionBuilderComponentLazy } from '../../../../../../lists/public';
import { useAsync } from '@kbn/securitysolution-hook-utils';
import { getExceptionListSchemaMock } from '../../../../../../lists/common/schemas/response/exception_list_schema.mock';
import { useFetchIndex } from '../../../containers/source';
@@ -54,47 +54,58 @@ jest.mock('@kbn/securitysolution-hook-utils', () => ({
useAsync: jest.fn(),
}));
jest.mock('../../../../detections/containers/detection_engine/rules/use_rule_async');
+jest.mock('../../../../../../lists/public');
+
+const mockGetExceptionBuilderComponentLazy = getExceptionBuilderComponentLazy as jest.Mock<
+ ReturnType
+>;
+const mockUseAsync = useAsync as jest.Mock>;
+const mockUseAddOrUpdateException = useAddOrUpdateException as jest.Mock<
+ ReturnType
+>;
+const mockUseFetchOrCreateRuleExceptionList = useFetchOrCreateRuleExceptionList as jest.Mock<
+ ReturnType
+>;
+const mockUseSignalIndex = useSignalIndex as jest.Mock>>;
+const mockUseFetchIndex = useFetchIndex as jest.Mock;
+const mockUseCurrentUser = useCurrentUser as jest.Mock>>;
+const mockUseRuleAsync = useRuleAsync as jest.Mock;
describe('When the add exception modal is opened', () => {
const ruleName = 'test rule';
let defaultEndpointItems: jest.SpyInstance<
ReturnType
>;
- let ExceptionBuilderComponent: jest.SpyInstance<
- ReturnType
- >;
beforeEach(() => {
- const emptyComp = ;
+ mockGetExceptionBuilderComponentLazy.mockReturnValue(
+
+ );
defaultEndpointItems = jest.spyOn(helpers, 'defaultEndpointExceptionItems');
- ExceptionBuilderComponent = jest
- .spyOn(ExceptionBuilder, 'getExceptionBuilderComponentLazy')
- .mockReturnValue(emptyComp);
- (useAsync as jest.Mock).mockImplementation(() => ({
+ mockUseAsync.mockImplementation(() => ({
start: jest.fn(),
loading: false,
+ error: {},
+ result: true,
}));
- (useAddOrUpdateException as jest.Mock).mockImplementation(() => [
- { isLoading: false },
- jest.fn(),
- ]);
- (useFetchOrCreateRuleExceptionList as jest.Mock).mockImplementation(() => [
+ mockUseAddOrUpdateException.mockImplementation(() => [{ isLoading: false }, jest.fn()]);
+ mockUseFetchOrCreateRuleExceptionList.mockImplementation(() => [
false,
getExceptionListSchemaMock(),
]);
- (useSignalIndex as jest.Mock).mockImplementation(() => ({
+ mockUseSignalIndex.mockImplementation(() => ({
loading: false,
signalIndexName: 'mock-siem-signals-index',
}));
- (useFetchIndex as jest.Mock).mockImplementation(() => [
+ mockUseFetchIndex.mockImplementation(() => [
false,
{
indexPatterns: stubIndexPattern,
},
]);
- (useCurrentUser as jest.Mock).mockReturnValue({ username: 'test-username' });
- (useRuleAsync as jest.Mock).mockImplementation(() => ({
+ mockUseCurrentUser.mockReturnValue({ username: 'test-username' });
+ mockUseRuleAsync.mockImplementation(() => ({
rule: getRulesSchemaMock(),
}));
});
@@ -108,7 +119,7 @@ describe('When the add exception modal is opened', () => {
let wrapper: ReactWrapper;
beforeEach(() => {
// Mocks one of the hooks as loading
- (useFetchIndex as jest.Mock).mockImplementation(() => [
+ mockUseFetchIndex.mockImplementation(() => [
true,
{
indexPatterns: stubIndexPattern,
@@ -147,7 +158,7 @@ describe('When the add exception modal is opened', () => {
/>
);
- const callProps = ExceptionBuilderComponent.mock.calls[0][0];
+ const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0];
await waitFor(() => callProps.onChange({ exceptionItems: [] }));
});
it('has the add exception button disabled', () => {
@@ -192,7 +203,7 @@ describe('When the add exception modal is opened', () => {
/>
);
- const callProps = ExceptionBuilderComponent.mock.calls[0][0];
+ const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0];
await waitFor(() =>
callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] })
);
@@ -252,7 +263,7 @@ describe('When the add exception modal is opened', () => {
/>
);
- const callProps = ExceptionBuilderComponent.mock.calls[0][0];
+ const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0];
await waitFor(() =>
callProps.onChange({ exceptionItems: [getExceptionListItemSchemaMock()] })
);
@@ -288,7 +299,7 @@ describe('When the add exception modal is opened', () => {
describe('when there is an exception being created on a sequence eql rule type', () => {
let wrapper: ReactWrapper;
beforeEach(async () => {
- (useRuleAsync as jest.Mock).mockImplementation(() => ({
+ mockUseRuleAsync.mockImplementation(() => ({
rule: {
...getRulesEqlSchemaMock(),
query:
@@ -313,7 +324,7 @@ describe('When the add exception modal is opened', () => {
/>
);
- const callProps = ExceptionBuilderComponent.mock.calls[0][0];
+ const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0];
await waitFor(() =>
callProps.onChange({ exceptionItems: [getExceptionListItemSchemaMock()] })
);
@@ -354,7 +365,7 @@ describe('When the add exception modal is opened', () => {
};
beforeEach(async () => {
// Mocks the index patterns to contain the pre-populated endpoint fields so that the exception qualifies as bulk closable
- (useFetchIndex as jest.Mock).mockImplementation(() => [
+ mockUseFetchIndex.mockImplementation(() => [
false,
{
indexPatterns: {
@@ -387,7 +398,7 @@ describe('When the add exception modal is opened', () => {
/>
);
- callProps = ExceptionBuilderComponent.mock.calls[0][0];
+ callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0];
await waitFor(() =>
callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] })
);
@@ -456,7 +467,7 @@ describe('When the add exception modal is opened', () => {
/>
);
- const callProps = ExceptionBuilderComponent.mock.calls[0][0];
+ const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0];
await waitFor(() => callProps.onChange({ exceptionItems: [], errorExists: true }));
expect(
wrapper.find('button[data-test-subj="add-exception-confirm-button"]').getDOMNode()
diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.tsx
index 228b7a2491fde..afff935619740 100644
--- a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.tsx
@@ -38,8 +38,7 @@ import {
isThresholdRule,
} from '../../../../../common/detection_engine/utils';
import { Status } from '../../../../../common/detection_engine/schemas/common/schemas';
-import { ExceptionBuilder } from '../../../../../public/shared_imports';
-
+import { getExceptionBuilderComponentLazy } from '../../../../../../lists/public';
import * as i18nCommon from '../../../translations';
import * as i18n from './translations';
import * as sharedI18n from '../translations';
@@ -475,7 +474,7 @@ export const AddExceptionModal = memo(function AddExceptionModal({
>
)}
- {ExceptionBuilder.getExceptionBuilderComponentLazy({
+ {getExceptionBuilderComponentLazy({
allowLargeValueLists:
!isEqlRule(maybeRule?.type) && !isThresholdRule(maybeRule?.type),
httpService: http,
diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.test.tsx
index 8c719373eda71..7a634b7fe10ec 100644
--- a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.test.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.test.tsx
@@ -24,7 +24,7 @@ import {
} from '../../../../../common/detection_engine/schemas/response/rules_schema.mocks';
import { useRuleAsync } from '../../../../detections/containers/detection_engine/rules/use_rule_async';
import { getMockTheme } from '../../../lib/kibana/kibana_react.mock';
-import { ExceptionBuilder } from '../../../../shared_imports';
+import { getExceptionBuilderComponentLazy } from '../../../../../../lists/public';
const mockTheme = getMockTheme({
eui: {
@@ -44,39 +44,31 @@ jest.mock('../../../containers/source');
jest.mock('../use_fetch_or_create_rule_exception_list');
jest.mock('../../../../detections/containers/detection_engine/alerts/use_signal_index');
jest.mock('../../../../detections/containers/detection_engine/rules/use_rule_async');
-jest.mock('../../../../shared_imports', () => {
- const originalModule = jest.requireActual('../../../../shared_imports');
- const emptyComp = ;
- return {
- ...originalModule,
- ExceptionBuilder: {
- getExceptionBuilderComponentLazy: () => emptyComp,
- },
- };
-});
+jest.mock('../../../../../../lists/public');
+
+const mockGetExceptionBuilderComponentLazy = getExceptionBuilderComponentLazy as jest.Mock<
+ ReturnType
+>;
+const mockUseSignalIndex = useSignalIndex as jest.Mock>>;
+const mockUseAddOrUpdateException = useAddOrUpdateException as jest.Mock<
+ ReturnType
+>;
+const mockUseFetchIndex = useFetchIndex as jest.Mock;
+const mockUseCurrentUser = useCurrentUser as jest.Mock>>;
+const mockUseRuleAsync = useRuleAsync as jest.Mock;
describe('When the edit exception modal is opened', () => {
const ruleName = 'test rule';
- let ExceptionBuilderComponent: jest.SpyInstance<
- ReturnType
- >;
-
beforeEach(() => {
const emptyComp = ;
- ExceptionBuilderComponent = jest
- .spyOn(ExceptionBuilder, 'getExceptionBuilderComponentLazy')
- .mockReturnValue(emptyComp);
-
- (useSignalIndex as jest.Mock).mockReturnValue({
+ mockGetExceptionBuilderComponentLazy.mockReturnValue(emptyComp);
+ mockUseSignalIndex.mockReturnValue({
loading: false,
signalIndexName: 'test-signal',
});
- (useAddOrUpdateException as jest.Mock).mockImplementation(() => [
- { isLoading: false },
- jest.fn(),
- ]);
- (useFetchIndex as jest.Mock).mockImplementation(() => [
+ mockUseAddOrUpdateException.mockImplementation(() => [{ isLoading: false }, jest.fn()]);
+ mockUseFetchIndex.mockImplementation(() => [
false,
{
indexPatterns: createStubIndexPattern({
@@ -96,8 +88,8 @@ describe('When the edit exception modal is opened', () => {
}),
},
]);
- (useCurrentUser as jest.Mock).mockReturnValue({ username: 'test-username' });
- (useRuleAsync as jest.Mock).mockImplementation(() => ({
+ mockUseCurrentUser.mockReturnValue({ username: 'test-username' });
+ mockUseRuleAsync.mockImplementation(() => ({
rule: getRulesSchemaMock(),
}));
});
@@ -109,7 +101,7 @@ describe('When the edit exception modal is opened', () => {
describe('when the modal is loading', () => {
it('renders the loading spinner', async () => {
- (useFetchIndex as jest.Mock).mockImplementation(() => [
+ mockUseFetchIndex.mockImplementation(() => [
true,
{
indexPatterns: stubIndexPattern,
@@ -157,7 +149,7 @@ describe('When the edit exception modal is opened', () => {
/>
);
- const callProps = ExceptionBuilderComponent.mock.calls[0][0];
+ const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0];
await waitFor(() => {
callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] });
});
@@ -202,7 +194,7 @@ describe('When the edit exception modal is opened', () => {
/>
);
- const callProps = ExceptionBuilderComponent.mock.calls[0][0];
+ const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0];
await waitFor(() => {
callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] });
});
@@ -255,7 +247,7 @@ describe('When the edit exception modal is opened', () => {
/>
);
- const callProps = ExceptionBuilderComponent.mock.calls[0][0];
+ const callProps = (getExceptionBuilderComponentLazy as jest.Mock).mock.calls[0][0];
await waitFor(() => {
callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] });
});
@@ -299,7 +291,7 @@ describe('When the edit exception modal is opened', () => {
/>
);
- const callProps = ExceptionBuilderComponent.mock.calls[0][0];
+ const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0];
await waitFor(() => {
callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] });
});
@@ -344,7 +336,7 @@ describe('When the edit exception modal is opened', () => {
/>
);
- const callProps = ExceptionBuilderComponent.mock.calls[0][0];
+ const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0];
await waitFor(() => {
callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] });
});
@@ -380,7 +372,7 @@ describe('When the edit exception modal is opened', () => {
/>
);
- const callProps = ExceptionBuilderComponent.mock.calls[0][0];
+ const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0];
await waitFor(() => callProps.onChange({ exceptionItems: [], errorExists: true }));
expect(
diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.tsx
index 375648e0abc8d..1724f616e7fc8 100644
--- a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.tsx
@@ -37,7 +37,7 @@ import {
import { useFetchIndex } from '../../../containers/source';
import { useSignalIndex } from '../../../../detections/containers/detection_engine/alerts/use_signal_index';
import { useRuleAsync } from '../../../../detections/containers/detection_engine/rules/use_rule_async';
-import { ExceptionBuilder } from '../../../../../public/shared_imports';
+import { getExceptionBuilderComponentLazy } from '../../../../../../lists/public';
import * as i18n from './translations';
import * as sharedI18n from '../translations';
@@ -344,7 +344,7 @@ export const EditExceptionModal = memo(function EditExceptionModal({
>
)}
- {ExceptionBuilder.getExceptionBuilderComponentLazy({
+ {getExceptionBuilderComponentLazy({
allowLargeValueLists:
!isEqlRule(maybeRule?.type) && !isThresholdRule(maybeRule?.type),
httpService: http,
diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form/index.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form/index.tsx
index 8f0737067ec6a..703c6c098d11e 100644
--- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form/index.tsx
+++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form/index.tsx
@@ -30,8 +30,8 @@ import { Loader } from '../../../../../../common/components/loader';
import { useKibana } from '../../../../../../common/lib/kibana';
import { useFetchIndex } from '../../../../../../common/containers/source';
import { AppAction } from '../../../../../../common/store/actions';
-import { ExceptionBuilder } from '../../../../../../shared_imports';
-
+import { getExceptionBuilderComponentLazy } from '../../../../../../../../lists/public';
+import type { OnChangeProps } from '../../../../../../../../lists/public';
import { useEventFiltersSelector } from '../../hooks';
import { getFormEntryStateMutable, getHasNameError, getNewComment } from '../../../store/selector';
import { NAME_LABEL, NAME_ERROR, NAME_PLACEHOLDER, OS_LABEL, RULE_NAME } from './translations';
@@ -67,7 +67,7 @@ export const EventFiltersForm: React.FC = memo(
);
const handleOnBuilderChange = useCallback(
- (arg: ExceptionBuilder.OnChangeProps) => {
+ (arg: OnChangeProps) => {
dispatch({
type: 'eventFiltersChangeForm',
payload: {
@@ -121,7 +121,7 @@ export const EventFiltersForm: React.FC = memo(
const exceptionBuilderComponentMemo = useMemo(
() =>
- ExceptionBuilder.getExceptionBuilderComponentLazy({
+ getExceptionBuilderComponentLazy({
allowLargeValueLists: false,
httpService: http,
autocompleteService: data.autocomplete,
diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx
index 1d60175d56f60..d3a88004bc8dc 100644
--- a/x-pack/plugins/security_solution/public/plugin.tsx
+++ b/x-pack/plugins/security_solution/public/plugin.tsx
@@ -10,7 +10,7 @@ import reduceReducers from 'reduce-reducers';
import { BehaviorSubject, Subject, Subscription } from 'rxjs';
import { pluck } from 'rxjs/operators';
import { AnyAction, Reducer } from 'redux';
-import {
+import type {
PluginSetup,
PluginStart,
SetupPlugins,
diff --git a/x-pack/plugins/security_solution/public/shared_imports.ts b/x-pack/plugins/security_solution/public/shared_imports.ts
index 8934ad9dab4cd..421b92a6e8b7f 100644
--- a/x-pack/plugins/security_solution/public/shared_imports.ts
+++ b/x-pack/plugins/security_solution/public/shared_imports.ts
@@ -30,5 +30,3 @@ export {
export { Field, SelectField } from '../../../../src/plugins/es_ui_shared/static/forms/components';
export { fieldValidators } from '../../../../src/plugins/es_ui_shared/static/forms/helpers';
export type { ERROR_CODE } from '../../../../src/plugins/es_ui_shared/static/forms/helpers/field_validators/types';
-
-export { ExceptionBuilder } from '../../lists/public';
diff --git a/x-pack/plugins/security_solution/public/types.ts b/x-pack/plugins/security_solution/public/types.ts
index cfca95fddc507..6a5a0f3b42e04 100644
--- a/x-pack/plugins/security_solution/public/types.ts
+++ b/x-pack/plugins/security_solution/public/types.ts
@@ -5,43 +5,43 @@
* 2.0.
*/
-import { CoreStart } from '../../../../src/core/public';
-import { HomePublicPluginSetup } from '../../../../src/plugins/home/public';
+import type { CoreStart } from '../../../../src/core/public';
+import type { HomePublicPluginSetup } from '../../../../src/plugins/home/public';
import type { DataPublicPluginStart } from '../../../../src/plugins/data/public';
-import { EmbeddableStart } from '../../../../src/plugins/embeddable/public';
-import { LensPublicStart } from '../../../plugins/lens/public';
-import { NewsfeedPublicPluginStart } from '../../../../src/plugins/newsfeed/public';
-import { Start as InspectorStart } from '../../../../src/plugins/inspector/public';
-import { UiActionsStart } from '../../../../src/plugins/ui_actions/public';
-import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public';
-import { Storage } from '../../../../src/plugins/kibana_utils/public';
-import { FleetStart } from '../../fleet/public';
-import { PluginStart as ListsPluginStart } from '../../lists/public';
-import { SpacesPluginStart } from '../../spaces/public';
-import {
+import type { EmbeddableStart } from '../../../../src/plugins/embeddable/public';
+import type { LensPublicStart } from '../../../plugins/lens/public';
+import type { NewsfeedPublicPluginStart } from '../../../../src/plugins/newsfeed/public';
+import type { Start as InspectorStart } from '../../../../src/plugins/inspector/public';
+import type { UiActionsStart } from '../../../../src/plugins/ui_actions/public';
+import type { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public';
+import type { Storage } from '../../../../src/plugins/kibana_utils/public';
+import type { FleetStart } from '../../fleet/public';
+import type { PluginStart as ListsPluginStart } from '../../lists/public';
+import type { SpacesPluginStart } from '../../spaces/public';
+import type {
TriggersAndActionsUIPublicPluginSetup as TriggersActionsSetup,
TriggersAndActionsUIPublicPluginStart as TriggersActionsStart,
} from '../../triggers_actions_ui/public';
-import { CasesUiStart } from '../../cases/public';
-import { SecurityPluginSetup } from '../../security/public';
-import { TimelinesUIStart } from '../../timelines/public';
-import { ResolverPluginSetup } from './resolver/types';
-import { Inspect } from '../common/search_strategy';
-import { MlPluginSetup, MlPluginStart } from '../../ml/public';
+import type { CasesUiStart } from '../../cases/public';
+import type { SecurityPluginSetup } from '../../security/public';
+import type { TimelinesUIStart } from '../../timelines/public';
+import type { ResolverPluginSetup } from './resolver/types';
+import type { Inspect } from '../common/search_strategy';
+import type { MlPluginSetup, MlPluginStart } from '../../ml/public';
-import { Detections } from './detections';
-import { Cases } from './cases';
-import { Exceptions } from './exceptions';
-import { Hosts } from './hosts';
-import { Network } from './network';
-import { Overview } from './overview';
-import { Rules } from './rules';
-import { Timelines } from './timelines';
-import { Management } from './management';
-import { Ueba } from './ueba';
-import { LicensingPluginStart, LicensingPluginSetup } from '../../licensing/public';
-import { DashboardStart } from '../../../../src/plugins/dashboard/public';
-import { IndexPatternFieldEditorStart } from '../../../../src/plugins/data_view_field_editor/public';
+import type { Detections } from './detections';
+import type { Cases } from './cases';
+import type { Exceptions } from './exceptions';
+import type { Hosts } from './hosts';
+import type { Network } from './network';
+import type { Overview } from './overview';
+import type { Rules } from './rules';
+import type { Timelines } from './timelines';
+import type { Management } from './management';
+import type { Ueba } from './ueba';
+import type { LicensingPluginStart, LicensingPluginSetup } from '../../licensing/public';
+import type { DashboardStart } from '../../../../src/plugins/dashboard/public';
+import type { IndexPatternFieldEditorStart } from '../../../../src/plugins/data_view_field_editor/public';
export interface SetupPlugins {
home?: HomePublicPluginSetup;
From 319fc9fb7f898b50d37d9c8955413d0a31ff65f6 Mon Sep 17 00:00:00 2001
From: Christos Nasikas
Date: Thu, 2 Dec 2021 19:11:10 +0200
Subject: [PATCH 07/65] [Cases] Move disabling features to the cases context
(#119864)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
---
x-pack/plugins/cases/common/constants.ts | 9 +++
x-pack/plugins/cases/common/ui/types.ts | 13 +++++
.../public/common/mock/test_providers.tsx | 41 +++++++++-----
.../all_cases/all_cases_list.test.tsx | 56 +++++++++----------
.../components/all_cases/all_cases_list.tsx | 3 -
.../public/components/all_cases/columns.tsx | 24 +++-----
.../components/all_cases/index.test.tsx | 14 ++---
.../public/components/all_cases/index.tsx | 8 +--
.../cases/public/components/app/routes.tsx | 6 +-
.../cases/public/components/app/types.ts | 2 -
.../components/case_action_bar/index.test.tsx | 4 +-
.../components/case_action_bar/index.tsx | 6 +-
.../public/components/case_view/index.tsx | 5 --
.../public/components/cases_context/index.tsx | 24 ++++----
.../cases_context/use_cases_features.tsx | 22 ++++++++
.../create/flyout/create_case_flyout.tsx | 6 +-
.../public/components/create/form.test.tsx | 12 ++--
.../cases/public/components/create/form.tsx | 21 +++----
.../components/create/form_context.test.tsx | 9 ++-
.../public/components/create/form_context.tsx | 8 +--
.../cases/public/components/create/index.tsx | 2 -
.../cases/public/methods/get_cases.tsx | 7 +--
.../public/methods/get_create_case_flyout.tsx | 5 +-
.../public/pages/cases/cases.tsx | 3 +-
.../timeline/cases/add_to_case_action.tsx | 10 ++--
.../components/t_grid/standalone/index.tsx | 4 +-
26 files changed, 169 insertions(+), 155 deletions(-)
create mode 100644 x-pack/plugins/cases/public/components/cases_context/use_cases_features.tsx
diff --git a/x-pack/plugins/cases/common/constants.ts b/x-pack/plugins/cases/common/constants.ts
index bc0578191f8b7..70ccb1ddebd10 100644
--- a/x-pack/plugins/cases/common/constants.ts
+++ b/x-pack/plugins/cases/common/constants.ts
@@ -5,6 +5,7 @@
* 2.0.
*/
import { ConnectorTypes } from './api';
+import { CasesContextValue } from './ui/types';
export const DEFAULT_DATE_FORMAT = 'dateFormat';
export const DEFAULT_DATE_FORMAT_TZ = 'dateFormat:tz';
@@ -104,3 +105,11 @@ export const MAX_CONCURRENT_SEARCHES = 10;
*/
export const MAX_TITLE_LENGTH = 64;
+
+/**
+ * Cases features
+ */
+
+export const DEFAULT_FEATURES: CasesContextValue['features'] = Object.freeze({
+ alerts: { sync: true },
+});
diff --git a/x-pack/plugins/cases/common/ui/types.ts b/x-pack/plugins/cases/common/ui/types.ts
index 402e44618c7cc..c51c25c5b976c 100644
--- a/x-pack/plugins/cases/common/ui/types.ts
+++ b/x-pack/plugins/cases/common/ui/types.ts
@@ -19,6 +19,19 @@ import {
ActionConnector,
} from '../api';
+interface CasesFeatures {
+ alerts: { sync: boolean };
+}
+
+export interface CasesContextValue {
+ owner: string[];
+ appId: string;
+ appTitle: string;
+ userCanCrud: boolean;
+ basePath: string;
+ features: CasesFeatures;
+}
+
export interface CasesUiConfigType {
markdownPlugins: {
lens: boolean;
diff --git a/x-pack/plugins/cases/public/common/mock/test_providers.tsx b/x-pack/plugins/cases/public/common/mock/test_providers.tsx
index 41754fad836b0..d016dce48a24e 100644
--- a/x-pack/plugins/cases/public/common/mock/test_providers.tsx
+++ b/x-pack/plugins/cases/public/common/mock/test_providers.tsx
@@ -5,11 +5,12 @@
* 2.0.
*/
+import React from 'react';
+import { merge } from 'lodash';
import { euiDarkVars } from '@kbn/ui-shared-deps-src/theme';
import { I18nProvider } from '@kbn/i18n-react';
-import React from 'react';
import { ThemeProvider } from 'styled-components';
-import { SECURITY_SOLUTION_OWNER } from '../../../common';
+import { CasesContextValue, DEFAULT_FEATURES, SECURITY_SOLUTION_OWNER } from '../../../common';
import { CasesProvider } from '../../components/cases_context';
import { createKibanaContextProviderMock } from '../lib/kibana/kibana_react.mock';
import { FieldHook } from '../shared_imports';
@@ -17,23 +18,37 @@ import { FieldHook } from '../shared_imports';
interface Props {
children: React.ReactNode;
userCanCrud?: boolean;
+ features?: CasesContextValue['features'];
}
window.scrollTo = jest.fn();
const MockKibanaContextProvider = createKibanaContextProviderMock();
/** A utility for wrapping children in the providers required to run most tests */
-const TestProvidersComponent: React.FC = ({ children, userCanCrud = true }) => (
-
-
- ({ eui: euiDarkVars, darkMode: true })}>
-
- {children}
-
-
-
-
-);
+const TestProvidersComponent: React.FC = ({
+ children,
+ userCanCrud = true,
+ features = {},
+}) => {
+ /**
+ * The empty object at the beginning avoids the mutation
+ * of the DEFAULT_FEATURES object
+ */
+ const featuresOptions = merge({}, DEFAULT_FEATURES, features);
+ return (
+
+
+ ({ eui: euiDarkVars, darkMode: true })}>
+
+ {children}
+
+
+
+
+ );
+};
export const TestProviders = React.memo(TestProvidersComponent);
diff --git a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx
index 9cde5da159960..bf02202ff83b2 100644
--- a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx
@@ -29,7 +29,7 @@ import { useUpdateCases } from '../../containers/use_bulk_update_case';
import { useGetActionLicense } from '../../containers/use_get_action_license';
import { useConnectors } from '../../containers/configure/use_connectors';
import { useKibana } from '../../common/lib/kibana';
-import { AllCasesList, AllCasesListProps } from './all_cases_list';
+import { AllCasesList } from './all_cases_list';
import { CasesColumns, GetCasesColumn, useCasesColumns } from './columns';
import { triggersActionsUiMock } from '../../../../triggers_actions_ui/public/mocks';
import { registerConnectorsToMockActionRegistry } from '../../common/mock/register_connectors';
@@ -64,10 +64,6 @@ const mockKibana = () => {
};
describe('AllCasesListGeneric', () => {
- const defaultAllCasesListProps: AllCasesListProps = {
- disableAlerts: false,
- };
-
const dispatchResetIsDeleted = jest.fn();
const dispatchResetIsUpdated = jest.fn();
const dispatchUpdateCaseProperty = jest.fn();
@@ -161,7 +157,7 @@ describe('AllCasesListGeneric', () => {
const wrapper = mount(
-
+
);
@@ -215,7 +211,7 @@ describe('AllCasesListGeneric', () => {
});
const wrapper = mount(
-
+
);
const checkIt = (columnName: string, key: number) => {
@@ -245,7 +241,7 @@ describe('AllCasesListGeneric', () => {
});
const wrapper = mount(
-
+
);
await waitFor(() => {
@@ -281,7 +277,7 @@ describe('AllCasesListGeneric', () => {
});
const wrapper = mount(
-
+
);
@@ -293,7 +289,7 @@ describe('AllCasesListGeneric', () => {
it('should tableHeaderSortButton AllCasesList', async () => {
const wrapper = mount(
-
+
);
wrapper.find('[data-test-subj="tableHeaderSortButton"]').first().simulate('click');
@@ -310,7 +306,7 @@ describe('AllCasesListGeneric', () => {
it('Updates status when status context menu is updated', async () => {
const wrapper = mount(
-
+
);
wrapper.find(`[data-test-subj="case-view-status-dropdown"] button`).first().simulate('click');
@@ -351,7 +347,7 @@ describe('AllCasesListGeneric', () => {
const wrapper = mount(
-
+
);
@@ -388,7 +384,7 @@ describe('AllCasesListGeneric', () => {
const wrapper = mount(
-
+
);
@@ -431,7 +427,7 @@ describe('AllCasesListGeneric', () => {
const wrapper = mount(
-
+
);
wrapper.find('[data-test-subj="case-table-bulk-actions"] button').first().simulate('click');
@@ -458,7 +454,7 @@ describe('AllCasesListGeneric', () => {
const wrapper = mount(
-
+
);
wrapper.find('[data-test-subj="case-table-bulk-actions"] button').first().simulate('click');
@@ -481,7 +477,7 @@ describe('AllCasesListGeneric', () => {
const wrapper = mount(
-
+
);
wrapper.find('[data-test-subj="case-table-bulk-actions"] button').first().simulate('click');
@@ -500,7 +496,7 @@ describe('AllCasesListGeneric', () => {
const wrapper = mount(
-
+
);
wrapper.find('[data-test-subj="case-table-bulk-actions"] button').first().simulate('click');
@@ -521,7 +517,7 @@ describe('AllCasesListGeneric', () => {
mount(
-
+
);
await waitFor(() => {
@@ -539,7 +535,7 @@ describe('AllCasesListGeneric', () => {
mount(
-
+
);
await waitFor(() => {
@@ -552,7 +548,7 @@ describe('AllCasesListGeneric', () => {
it('should not render table utility bar when isSelectorView=true', async () => {
const wrapper = mount(
-
+
);
await waitFor(() => {
@@ -566,7 +562,7 @@ describe('AllCasesListGeneric', () => {
it('case table should not be selectable when isSelectorView=true', async () => {
const wrapper = mount(
-
+
);
await waitFor(() => {
@@ -588,7 +584,7 @@ describe('AllCasesListGeneric', () => {
const wrapper = mount(
-
+
);
wrapper.find('[data-test-subj="cases-table-add-case"]').first().simulate('click');
@@ -600,7 +596,7 @@ describe('AllCasesListGeneric', () => {
it('should call onRowClick when clicking a case with modal=true', async () => {
const wrapper = mount(
-
+
);
@@ -657,7 +653,7 @@ describe('AllCasesListGeneric', () => {
it('should NOT call onRowClick when clicking a case with modal=true', async () => {
const wrapper = mount(
-
+
);
wrapper.find('[data-test-subj="cases-table-row-1"]').first().simulate('click');
@@ -669,7 +665,7 @@ describe('AllCasesListGeneric', () => {
it('should change the status to closed', async () => {
const wrapper = mount(
-
+
);
wrapper.find('button[data-test-subj="case-status-filter"]').simulate('click');
@@ -684,7 +680,7 @@ describe('AllCasesListGeneric', () => {
it('should change the status to in-progress', async () => {
const wrapper = mount(
-
+
);
wrapper.find('button[data-test-subj="case-status-filter"]').simulate('click');
@@ -699,7 +695,7 @@ describe('AllCasesListGeneric', () => {
it('should change the status to open', async () => {
const wrapper = mount(
-
+
);
wrapper.find('button[data-test-subj="case-status-filter"]').simulate('click');
@@ -714,7 +710,7 @@ describe('AllCasesListGeneric', () => {
it('should show the correct count on stats', async () => {
const wrapper = mount(
-
+
);
wrapper.find('button[data-test-subj="case-status-filter"]').simulate('click');
@@ -734,7 +730,7 @@ describe('AllCasesListGeneric', () => {
it('should not render status when isSelectorView=true', async () => {
const wrapper = mount(
-
+
);
@@ -769,7 +765,7 @@ describe('AllCasesListGeneric', () => {
const wrapper = mount(
-
+
);
diff --git a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx
index bf42cfe38863e..58c17695d0dfe 100644
--- a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx
@@ -53,7 +53,6 @@ const getSortField = (field: string): SortFieldCase =>
export interface AllCasesListProps {
alertData?: Omit;
- disableAlerts?: boolean;
hiddenStatuses?: CaseStatusWithAllStatus[];
isSelectorView?: boolean;
onRowClick?: (theCase?: Case | SubCase) => void;
@@ -64,7 +63,6 @@ export interface AllCasesListProps {
export const AllCasesList = React.memo(
({
alertData,
- disableAlerts,
hiddenStatuses = [],
isSelectorView = false,
onRowClick,
@@ -168,7 +166,6 @@ export const AllCasesList = React.memo(
const showActions = userCanCrud && !isSelectorView;
const columns = useCasesColumns({
- disableAlerts,
dispatchUpdateCaseProperty,
filterStatus: filterOptions.status,
handleIsLoading,
diff --git a/x-pack/plugins/cases/public/components/all_cases/columns.tsx b/x-pack/plugins/cases/public/components/all_cases/columns.tsx
index 67d4409444016..c30ddd199fc49 100644
--- a/x-pack/plugins/cases/public/components/all_cases/columns.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/columns.tsx
@@ -69,7 +69,6 @@ const renderStringField = (field: string, dataTestSubj: string) =>
field != null ? {field} : getEmptyTagValue();
export interface GetCasesColumn {
- disableAlerts?: boolean;
dispatchUpdateCaseProperty: (u: UpdateCase) => void;
filterStatus: string;
handleIsLoading: (a: boolean) => void;
@@ -84,7 +83,6 @@ export interface GetCasesColumn {
updateCase?: (newCase: Case) => void;
}
export const useCasesColumns = ({
- disableAlerts = false,
dispatchUpdateCaseProperty,
filterStatus,
handleIsLoading,
@@ -246,19 +244,15 @@ export const useCasesColumns = ({
},
truncateText: true,
},
- ...(!disableAlerts
- ? [
- {
- align: RIGHT_ALIGNMENT,
- field: 'totalAlerts',
- name: ALERTS,
- render: (totalAlerts: Case['totalAlerts']) =>
- totalAlerts != null
- ? renderStringField(`${totalAlerts}`, `case-table-column-alertsCount`)
- : getEmptyTagValue(),
- },
- ]
- : []),
+ {
+ align: RIGHT_ALIGNMENT,
+ field: 'totalAlerts',
+ name: ALERTS,
+ render: (totalAlerts: Case['totalAlerts']) =>
+ totalAlerts != null
+ ? renderStringField(`${totalAlerts}`, `case-table-column-alertsCount`)
+ : getEmptyTagValue(),
+ },
{
align: RIGHT_ALIGNMENT,
field: 'totalComment',
diff --git a/x-pack/plugins/cases/public/components/all_cases/index.test.tsx b/x-pack/plugins/cases/public/components/all_cases/index.test.tsx
index 8429712a30f74..681bb65870c1e 100644
--- a/x-pack/plugins/cases/public/components/all_cases/index.test.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/index.test.tsx
@@ -9,7 +9,7 @@ import React from 'react';
import { mount } from 'enzyme';
import { waitFor } from '@testing-library/react';
-import { AllCases, AllCasesProps } from '.';
+import { AllCases } from '.';
import { TestProviders } from '../../common/mock';
import { useGetTags } from '../../containers/use_get_tags';
import { useGetReporters } from '../../containers/use_get_reporters';
@@ -31,10 +31,6 @@ jest.mock('../../common/lib/kibana');
jest.mock('../../containers/use_get_cases');
jest.mock('../../containers/use_get_cases_status');
-const defaultAllCasesProps: AllCasesProps = {
- disableAlerts: false,
-};
-
const useKibanaMock = useKibana as jest.Mocked;
const useConnectorsMock = useConnectors as jest.Mock;
const useGetCasesMock = useGetCases as jest.Mock;
@@ -105,7 +101,7 @@ describe('AllCases', () => {
const wrapper = mount(
-
+
);
@@ -141,7 +137,7 @@ describe('AllCases', () => {
const wrapper = mount(
-
+
);
@@ -173,7 +169,7 @@ describe('AllCases', () => {
const wrapper = mount(
-
+
);
@@ -199,7 +195,7 @@ describe('AllCases', () => {
const wrapper = mount(
-
+
);
diff --git a/x-pack/plugins/cases/public/components/all_cases/index.tsx b/x-pack/plugins/cases/public/components/all_cases/index.tsx
index 7f7de11a3435c..e163d9ada4a51 100644
--- a/x-pack/plugins/cases/public/components/all_cases/index.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/index.tsx
@@ -14,11 +14,7 @@ import { getActionLicenseError } from '../use_push_to_service/helpers';
import { AllCasesList } from './all_cases_list';
import { CasesTableHeader } from './header';
-export interface AllCasesProps {
- disableAlerts?: boolean;
-}
-
-export const AllCases: React.FC = ({ disableAlerts }) => {
+export const AllCases: React.FC = () => {
const { userCanCrud } = useCasesContext();
const [refresh, setRefresh] = useState(0);
useCasesBreadcrumbs(CasesDeepLinkId.cases);
@@ -33,7 +29,7 @@ export const AllCases: React.FC = ({ disableAlerts }) => {
return (
<>
-
+
>
);
};
diff --git a/x-pack/plugins/cases/public/components/app/routes.tsx b/x-pack/plugins/cases/public/components/app/routes.tsx
index bd4450baaf3fb..06387072c2323 100644
--- a/x-pack/plugins/cases/public/components/app/routes.tsx
+++ b/x-pack/plugins/cases/public/components/app/routes.tsx
@@ -28,14 +28,12 @@ import * as i18n from './translations';
import { useReadonlyHeader } from './use_readonly_header';
const CasesRoutesComponent: React.FC = ({
- disableAlerts,
onComponentInitialized,
actionsNavigation,
ruleDetailsNavigation,
showAlertDetails,
useFetchAlertData,
refreshRef,
- hideSyncAlerts,
timelineIntegration,
}) => {
const { basePath, userCanCrud } = useCasesContext();
@@ -51,7 +49,7 @@ const CasesRoutesComponent: React.FC = ({
return (
-
+
@@ -59,7 +57,6 @@ const CasesRoutesComponent: React.FC = ({
) : (
@@ -91,7 +88,6 @@ const CasesRoutesComponent: React.FC = ({
showAlertDetails={showAlertDetails}
useFetchAlertData={useFetchAlertData}
refreshRef={refreshRef}
- hideSyncAlerts={hideSyncAlerts}
timelineIntegration={timelineIntegration}
/>
diff --git a/x-pack/plugins/cases/public/components/app/types.ts b/x-pack/plugins/cases/public/components/app/types.ts
index 943cf5fcad96d..9c825ad95618a 100644
--- a/x-pack/plugins/cases/public/components/app/types.ts
+++ b/x-pack/plugins/cases/public/components/app/types.ts
@@ -11,7 +11,6 @@ import { CasesNavigation } from '../links';
import { CasesTimelineIntegration } from '../timeline_context';
export interface CasesRoutesProps {
- disableAlerts?: boolean;
onComponentInitialized?: () => void;
actionsNavigation?: CasesNavigation;
ruleDetailsNavigation?: CasesNavigation;
@@ -22,6 +21,5 @@ export interface CasesRoutesProps {
* **NOTE**: Do not hold on to the `.current` object, as it could become stale
*/
refreshRef?: MutableRefObject;
- hideSyncAlerts?: boolean;
timelineIntegration?: CasesTimelineIntegration;
}
diff --git a/x-pack/plugins/cases/public/components/case_action_bar/index.test.tsx b/x-pack/plugins/cases/public/components/case_action_bar/index.test.tsx
index 371d6dcf3063e..f36ecd5b6b5d1 100644
--- a/x-pack/plugins/cases/public/components/case_action_bar/index.test.tsx
+++ b/x-pack/plugins/cases/public/components/case_action_bar/index.test.tsx
@@ -118,8 +118,8 @@ describe('CaseActionBar', () => {
it('should not show the sync alerts toggle when alerting is disabled', () => {
const { queryByText } = render(
-
-
+
+
);
diff --git a/x-pack/plugins/cases/public/components/case_action_bar/index.tsx b/x-pack/plugins/cases/public/components/case_action_bar/index.tsx
index e95410c1967b6..9b326f3216084 100644
--- a/x-pack/plugins/cases/public/components/case_action_bar/index.tsx
+++ b/x-pack/plugins/cases/public/components/case_action_bar/index.tsx
@@ -25,6 +25,7 @@ import { StatusContextMenu } from './status_context_menu';
import { getStatusDate, getStatusTitle } from './helpers';
import { SyncAlertsSwitch } from '../case_settings/sync_alerts_switch';
import { OnUpdateFields } from '../case_view';
+import { useCasesFeatures } from '../cases_context/use_cases_features';
const MyDescriptionList = styled(EuiDescriptionList)`
${({ theme }) => css`
@@ -43,7 +44,6 @@ interface CaseActionBarProps {
caseData: Case;
currentExternalIncident: CaseService | null;
userCanCrud: boolean;
- disableAlerting: boolean;
isLoading: boolean;
onRefresh: () => void;
onUpdateField: (args: OnUpdateFields) => void;
@@ -51,12 +51,12 @@ interface CaseActionBarProps {
const CaseActionBarComponent: React.FC = ({
caseData,
currentExternalIncident,
- disableAlerting,
userCanCrud,
isLoading,
onRefresh,
onUpdateField,
}) => {
+ const { isSyncAlertsEnabled } = useCasesFeatures();
const date = useMemo(() => getStatusDate(caseData), [caseData]);
const title = useMemo(() => getStatusTitle(caseData.status), [caseData.status]);
const onStatusChanged = useCallback(
@@ -114,7 +114,7 @@ const CaseActionBarComponent: React.FC = ({
responsive={false}
justifyContent="spaceBetween"
>
- {userCanCrud && !disableAlerting && (
+ {userCanCrud && isSyncAlertsEnabled && (
;
- hideSyncAlerts?: boolean;
}
export interface CaseViewProps extends Omit {
@@ -98,7 +97,6 @@ export const CaseComponent = React.memo(
updateCase,
useFetchAlertData,
refreshRef,
- hideSyncAlerts = false,
}) => {
const { userCanCrud } = useCasesContext();
const { getCaseViewUrl } = useCaseViewNavigation();
@@ -388,7 +386,6 @@ export const CaseComponent = React.memo(
caseData={caseData}
currentExternalIncident={currentExternalIncident}
userCanCrud={userCanCrud}
- disableAlerting={ruleDetailsNavigation == null || hideSyncAlerts}
isLoading={isLoading && (updateKey === 'status' || updateKey === 'settings')}
onRefresh={handleRefresh}
onUpdateField={onUpdateField}
@@ -506,7 +503,6 @@ export const CaseView = React.memo(
timelineIntegration,
useFetchAlertData,
refreshRef,
- hideSyncAlerts,
}: CaseViewProps) => {
const { spaces: spacesApi } = useKibana().services;
const { detailName: caseId, subCaseId } = useCaseViewParams();
@@ -562,7 +558,6 @@ export const CaseView = React.memo(
updateCase={updateCase}
useFetchAlertData={useFetchAlertData}
refreshRef={refreshRef}
- hideSyncAlerts={hideSyncAlerts}
/>
)
diff --git a/x-pack/plugins/cases/public/components/cases_context/index.tsx b/x-pack/plugins/cases/public/components/cases_context/index.tsx
index 932ce69372110..588bda245b044 100644
--- a/x-pack/plugins/cases/public/components/cases_context/index.tsx
+++ b/x-pack/plugins/cases/public/components/cases_context/index.tsx
@@ -6,40 +6,38 @@
*/
import React, { useState, useEffect } from 'react';
+import { merge } from 'lodash';
+import { CasesContextValue, DEFAULT_FEATURES } from '../../../common';
import { DEFAULT_BASE_PATH } from '../../common/navigation';
import { useApplication } from './use_application';
-export interface CasesContextValue {
- owner: string[];
- appId: string;
- appTitle: string;
- userCanCrud: boolean;
- basePath: string;
-}
-
export const CasesContext = React.createContext(undefined);
export interface CasesContextProps
- extends Omit {
+ extends Omit {
basePath?: string;
+ features?: Partial;
}
-export interface CasesContextStateValue
- extends Omit {
+export interface CasesContextStateValue extends Omit {
appId?: string;
appTitle?: string;
- userCanCrud?: boolean;
}
export const CasesProvider: React.FC<{ value: CasesContextProps }> = ({
children,
- value: { owner, userCanCrud, basePath = DEFAULT_BASE_PATH },
+ value: { owner, userCanCrud, basePath = DEFAULT_BASE_PATH, features = {} },
}) => {
const { appId, appTitle } = useApplication();
const [value, setValue] = useState({
owner,
userCanCrud,
basePath,
+ /**
+ * The empty object at the beginning avoids the mutation
+ * of the DEFAULT_FEATURES object
+ */
+ features: merge({}, DEFAULT_FEATURES, features),
});
/**
diff --git a/x-pack/plugins/cases/public/components/cases_context/use_cases_features.tsx b/x-pack/plugins/cases/public/components/cases_context/use_cases_features.tsx
new file mode 100644
index 0000000000000..93efdcabd8c38
--- /dev/null
+++ b/x-pack/plugins/cases/public/components/cases_context/use_cases_features.tsx
@@ -0,0 +1,22 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { useMemo } from 'react';
+import { useCasesContext } from './use_cases_context';
+
+interface UseCasesFeaturesReturn {
+ isSyncAlertsEnabled: boolean;
+}
+
+export const useCasesFeatures = (): UseCasesFeaturesReturn => {
+ const { features } = useCasesContext();
+ const memoizedReturnValue = useMemo(
+ () => ({ isSyncAlertsEnabled: features.alerts.sync }),
+ [features]
+ );
+ return memoizedReturnValue;
+};
diff --git a/x-pack/plugins/cases/public/components/create/flyout/create_case_flyout.tsx b/x-pack/plugins/cases/public/components/create/flyout/create_case_flyout.tsx
index 5723f78649b5c..e77f72929ecd8 100644
--- a/x-pack/plugins/cases/public/components/create/flyout/create_case_flyout.tsx
+++ b/x-pack/plugins/cases/public/components/create/flyout/create_case_flyout.tsx
@@ -17,7 +17,6 @@ export interface CreateCaseFlyoutProps {
afterCaseCreated?: (theCase: Case) => Promise;
onClose: () => void;
onSuccess: (theCase: Case) => Promise;
- disableAlerts?: boolean;
}
const StyledFlyout = styled(EuiFlyout)`
@@ -50,7 +49,7 @@ const StyledEuiFlyoutBody = styled(EuiFlyoutBody)`
overflow-y: auto;
overflow-x: hidden;
}
-
+
&& .euiFlyoutBody__overflowContent {
display: block;
padding: ${theme.eui.paddingSizes.l} ${theme.eui.paddingSizes.l} 70px;
@@ -64,7 +63,7 @@ const FormWrapper = styled.div`
`;
export const CreateCaseFlyout = React.memo(
- ({ afterCaseCreated, onClose, onSuccess, disableAlerts }) => (
+ ({ afterCaseCreated, onClose, onSuccess }) => (
<>
(
onCancel={onClose}
onSuccess={onSuccess}
withSteps={false}
- disableAlerts={disableAlerts}
/>
diff --git a/x-pack/plugins/cases/public/components/create/form.test.tsx b/x-pack/plugins/cases/public/components/create/form.test.tsx
index 06b07ebd396a8..9f1e2e6c6dda3 100644
--- a/x-pack/plugins/cases/public/components/create/form.test.tsx
+++ b/x-pack/plugins/cases/public/components/create/form.test.tsx
@@ -44,7 +44,10 @@ const casesFormProps: CreateCaseFormProps = {
describe('CreateCaseForm', () => {
let globalForm: FormHook;
- const MockHookWrapperComponent: React.FC = ({ children }) => {
+ const MockHookWrapperComponent: React.FC<{ testProviderProps?: unknown }> = ({
+ children,
+ testProviderProps = {},
+ }) => {
const { form } = useForm({
defaultValue: initialCaseValue,
options: { stripEmptyFields: false },
@@ -54,7 +57,7 @@ describe('CreateCaseForm', () => {
globalForm = form;
return (
-
+
);
@@ -103,8 +106,8 @@ describe('CreateCaseForm', () => {
it('hides the sync alerts toggle', () => {
const { queryByText } = render(
-
-
+
+
);
@@ -118,7 +121,6 @@ describe('CreateCaseForm', () => {
diff --git a/x-pack/plugins/cases/public/components/create/form.tsx b/x-pack/plugins/cases/public/components/create/form.tsx
index 6105fdbb2aef3..2c775cb5fd86d 100644
--- a/x-pack/plugins/cases/public/components/create/form.tsx
+++ b/x-pack/plugins/cases/public/components/create/form.tsx
@@ -30,6 +30,7 @@ import { InsertTimeline } from '../insert_timeline';
import { UsePostComment } from '../../containers/use_post_comment';
import { SubmitCaseButton } from './submit_button';
import { FormContext } from './form_context';
+import { useCasesFeatures } from '../cases_context/use_cases_features';
interface ContainerProps {
big?: boolean;
@@ -51,15 +52,11 @@ const MySpinner = styled(EuiLoadingSpinner)`
export interface CreateCaseFormFieldsProps {
connectors: ActionConnector[];
isLoadingConnectors: boolean;
- disableAlerts: boolean;
hideConnectorServiceNowSir: boolean;
withSteps: boolean;
}
export interface CreateCaseFormProps
- extends Pick<
- Partial,
- 'disableAlerts' | 'hideConnectorServiceNowSir' | 'withSteps'
- > {
+ extends Pick, 'hideConnectorServiceNowSir' | 'withSteps'> {
onCancel: () => void;
onSuccess: (theCase: Case) => Promise;
afterCaseCreated?: (theCase: Case, postComment: UsePostComment['postComment']) => Promise;
@@ -69,8 +66,10 @@ export interface CreateCaseFormProps
const empty: ActionConnector[] = [];
export const CreateCaseFormFields: React.FC = React.memo(
- ({ connectors, disableAlerts, isLoadingConnectors, hideConnectorServiceNowSir, withSteps }) => {
+ ({ connectors, isLoadingConnectors, hideConnectorServiceNowSir, withSteps }) => {
const { isSubmitting } = useFormContext();
+ const { isSyncAlertsEnabled } = useCasesFeatures();
+
const firstStep = useMemo(
() => ({
title: i18n.STEP_ONE_TITLE,
@@ -119,8 +118,8 @@ export const CreateCaseFormFields: React.FC = React.m
);
const allSteps = useMemo(
- () => [firstStep, ...(!disableAlerts ? [secondStep] : []), thirdStep],
- [disableAlerts, firstStep, secondStep, thirdStep]
+ () => [firstStep, ...(isSyncAlertsEnabled ? [secondStep] : []), thirdStep],
+ [isSyncAlertsEnabled, firstStep, secondStep, thirdStep]
);
return (
@@ -135,7 +134,7 @@ export const CreateCaseFormFields: React.FC = React.m
) : (
<>
{firstStep.children}
- {!disableAlerts && secondStep.children}
+ {isSyncAlertsEnabled && secondStep.children}
{thirdStep.children}
>
)}
@@ -148,7 +147,6 @@ CreateCaseFormFields.displayName = 'CreateCaseFormFields';
export const CreateCaseForm: React.FC = React.memo(
({
- disableAlerts = false,
hideConnectorServiceNowSir = false,
withSteps = true,
afterCaseCreated,
@@ -163,12 +161,9 @@ export const CreateCaseForm: React.FC = React.memo(
caseType={caseType}
hideConnectorServiceNowSir={hideConnectorServiceNowSir}
onSuccess={onSuccess}
- // if we are disabling alerts, then we should not sync alerts
- syncAlertsDefaultValue={!disableAlerts}
>
{
);
});
- it('should set sync alerts to false when the sync setting is passed in as false and alerts are disabled', async () => {
+ it('should set sync alerts to false when the sync feature setting is false', async () => {
useConnectorsMock.mockReturnValue({
...sampleConnectorData,
connectors: connectorsMock,
});
const wrapper = mount(
-
-
-
+
+
+
diff --git a/x-pack/plugins/cases/public/components/create/form_context.tsx b/x-pack/plugins/cases/public/components/create/form_context.tsx
index 10bfa2e78acc4..a513056ba31a5 100644
--- a/x-pack/plugins/cases/public/components/create/form_context.tsx
+++ b/x-pack/plugins/cases/public/components/create/form_context.tsx
@@ -17,6 +17,7 @@ import { Case } from '../../containers/types';
import { CaseType } from '../../../common';
import { UsePostComment, usePostComment } from '../../containers/use_post_comment';
import { useCasesContext } from '../cases_context/use_cases_context';
+import { useCasesFeatures } from '../cases_context/use_cases_features';
import { getConnectorById } from '../utils';
const initialCaseValue: FormProps = {
@@ -34,7 +35,6 @@ interface Props {
children?: JSX.Element | JSX.Element[];
hideConnectorServiceNowSir?: boolean;
onSuccess?: (theCase: Case) => Promise;
- syncAlertsDefaultValue?: boolean;
}
export const FormContext: React.FC = ({
@@ -43,10 +43,10 @@ export const FormContext: React.FC = ({
children,
hideConnectorServiceNowSir,
onSuccess,
- syncAlertsDefaultValue = true,
}) => {
const { connectors, loading: isLoadingConnectors } = useConnectors();
const { owner } = useCasesContext();
+ const { isSyncAlertsEnabled } = useCasesFeatures();
const { postCase } = usePostCase();
const { postComment } = usePostComment();
const { pushCaseToExternalService } = usePostPushToService();
@@ -56,7 +56,7 @@ export const FormContext: React.FC = ({
{
connectorId: dataConnectorId,
fields,
- syncAlerts = syncAlertsDefaultValue,
+ syncAlerts = isSyncAlertsEnabled,
...dataWithoutConnectorId
},
isValid
@@ -93,6 +93,7 @@ export const FormContext: React.FC = ({
}
},
[
+ isSyncAlertsEnabled,
connectors,
postCase,
caseType,
@@ -101,7 +102,6 @@ export const FormContext: React.FC = ({
onSuccess,
postComment,
pushCaseToExternalService,
- syncAlertsDefaultValue,
]
);
diff --git a/x-pack/plugins/cases/public/components/create/index.tsx b/x-pack/plugins/cases/public/components/create/index.tsx
index 97a1c1d2e8ff3..76c31d6f8c4c4 100644
--- a/x-pack/plugins/cases/public/components/create/index.tsx
+++ b/x-pack/plugins/cases/public/components/create/index.tsx
@@ -21,7 +21,6 @@ export const CreateCase = React.memo(
afterCaseCreated,
caseType,
hideConnectorServiceNowSir,
- disableAlerts,
onCancel,
onSuccess,
timelineIntegration,
@@ -40,7 +39,6 @@ export const CreateCase = React.memo(
afterCaseCreated={afterCaseCreated}
caseType={caseType}
hideConnectorServiceNowSir={hideConnectorServiceNowSir}
- disableAlerts={disableAlerts}
onCancel={onCancel}
onSuccess={onSuccess}
timelineIntegration={timelineIntegration}
diff --git a/x-pack/plugins/cases/public/methods/get_cases.tsx b/x-pack/plugins/cases/public/methods/get_cases.tsx
index 432c2d9fc5b2b..94e7d321840a8 100644
--- a/x-pack/plugins/cases/public/methods/get_cases.tsx
+++ b/x-pack/plugins/cases/public/methods/get_cases.tsx
@@ -17,27 +17,24 @@ export const getCasesLazy = ({
owner,
userCanCrud,
basePath,
- disableAlerts,
onComponentInitialized,
actionsNavigation,
ruleDetailsNavigation,
showAlertDetails,
useFetchAlertData,
refreshRef,
- hideSyncAlerts,
timelineIntegration,
+ features,
}: GetCasesProps) => (
-
+
}>
diff --git a/x-pack/plugins/cases/public/methods/get_create_case_flyout.tsx b/x-pack/plugins/cases/public/methods/get_create_case_flyout.tsx
index 2128063ea9084..1e2143888bf1e 100644
--- a/x-pack/plugins/cases/public/methods/get_create_case_flyout.tsx
+++ b/x-pack/plugins/cases/public/methods/get_create_case_flyout.tsx
@@ -18,18 +18,17 @@ const CreateCaseFlyoutLazy: React.FC = lazy(
export const getCreateCaseFlyoutLazy = ({
owner,
userCanCrud,
+ features,
afterCaseCreated,
onClose,
onSuccess,
- disableAlerts,
}: GetCreateCaseFlyoutProps) => (
-
+
}>
diff --git a/x-pack/plugins/observability/public/pages/cases/cases.tsx b/x-pack/plugins/observability/public/pages/cases/cases.tsx
index d947f9aa86489..19eb16a3bd52b 100644
--- a/x-pack/plugins/observability/public/pages/cases/cases.tsx
+++ b/x-pack/plugins/observability/public/pages/cases/cases.tsx
@@ -43,9 +43,9 @@ export const Cases = React.memo(({ userCanCrud }) => {
)}
{casesUi.getCases({
basePath: CASES_PATH,
- disableAlerts: true,
userCanCrud,
owner: [CASES_OWNER],
+ features: { alerts: { sync: false } },
useFetchAlertData,
showAlertDetails: (alertId: string) => {
setSelectedAlertId(alertId);
@@ -65,7 +65,6 @@ export const Cases = React.memo(({ userCanCrud }) => {
});
},
},
- hideSyncAlerts: true,
})}
>
);
diff --git a/x-pack/plugins/timelines/public/components/actions/timeline/cases/add_to_case_action.tsx b/x-pack/plugins/timelines/public/components/actions/timeline/cases/add_to_case_action.tsx
index 05b18da3293bd..c734442d5a77b 100644
--- a/x-pack/plugins/timelines/public/components/actions/timeline/cases/add_to_case_action.tsx
+++ b/x-pack/plugins/timelines/public/components/actions/timeline/cases/add_to_case_action.tsx
@@ -7,7 +7,7 @@
import React, { memo, useMemo, useCallback } from 'react';
import { useDispatch } from 'react-redux';
-import { CaseStatuses, StatusAll } from '../../../../../../cases/common';
+import { CaseStatuses, StatusAll, CasesContextValue } from '../../../../../../cases/common';
import { TimelineItem } from '../../../../../common/';
import { useAddToCase, normalizedEventFields } from '../../../../hooks/use_add_to_case';
import { useKibana } from '../../../../../../../../src/plugins/kibana_react/public';
@@ -24,7 +24,7 @@ export interface AddToCaseActionProps {
appId: string;
owner: string;
onClose?: Function;
- disableAlerts?: boolean;
+ casesFeatures?: CasesContextValue['features'];
}
const AddToCaseActionComponent: React.FC = ({
@@ -34,7 +34,7 @@ const AddToCaseActionComponent: React.FC = ({
appId,
owner,
onClose,
- disableAlerts,
+ casesFeatures,
}) => {
const eventId = event?.ecs._id ?? '';
const eventIndex = event?.ecs._index ?? '';
@@ -94,8 +94,8 @@ const AddToCaseActionComponent: React.FC = ({
onSuccess: onCaseSuccess,
useInsertTimeline,
owner: [owner],
- disableAlerts,
userCanCrud: casePermissions?.crud ?? false,
+ features: casesFeatures,
};
}, [
attachAlertToCase,
@@ -103,8 +103,8 @@ const AddToCaseActionComponent: React.FC = ({
onCaseSuccess,
useInsertTimeline,
owner,
- disableAlerts,
casePermissions,
+ casesFeatures,
]);
return (
diff --git a/x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx
index a95683e7de4aa..18009d9e176a8 100644
--- a/x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx
+++ b/x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx
@@ -75,6 +75,8 @@ const ScrollableFlexItem = styled(EuiFlexItem)`
overflow: auto;
`;
+const casesFeatures = { alerts: { sync: false } };
+
export interface TGridStandaloneProps {
appId: string;
casesOwner: string;
@@ -416,7 +418,7 @@ const TGridStandaloneComponent: React.FC = ({
) : null}
-
+
);
From 9e12416d32a86a5b9cc136d66528096a3e642b76 Mon Sep 17 00:00:00 2001
From: Liza Katz
Date: Thu, 2 Dec 2021 19:27:15 +0200
Subject: [PATCH 08/65] Normalize apm transaction names (#119740)
* update task manager apm transactions
* normalize reporting apm transaction names
* update core transaction names
* fix tests
* typo + test
* task manager types
* consts
* reporting transaction type
* dummy
* dummy
* remove unused consts
* Update src/core/server/server.ts
Co-authored-by: Mikhail Shustov
* Update src/core/server/server.ts
Co-authored-by: Mikhail Shustov
* Update src/core/server/server.ts
Co-authored-by: Mikhail Shustov
* new line
* Update x-pack/plugins/task_manager/server/task_running/ephemeral_task_runner.ts
Co-authored-by: ymao1
* Update x-pack/plugins/task_manager/server/task_running/ephemeral_task_runner.ts
Co-authored-by: ymao1
* alerting code review
* ok
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Mikhail Shustov
Co-authored-by: ymao1
---
dev_docs/contributing/standards.mdx | 8 ++++++++
src/core/public/apm_system.ts | 2 +-
src/core/server/server.ts | 6 +++---
x-pack/plugins/reporting/common/constants.ts | 2 ++
.../export_types/common/generate_png.ts | 11 ++++++-----
.../export_types/png/execute_job/index.ts | 8 ++++----
.../server/export_types/png_v2/execute_job.ts | 8 ++++----
.../printable_pdf/execute_job/index.ts | 8 ++++----
.../export_types/printable_pdf/lib/tracker.ts | 17 +++++++++--------
.../printable_pdf_v2/execute_job.ts | 8 ++++----
.../printable_pdf_v2/lib/tracker.ts | 17 +++++++++--------
.../server/lib/screenshots/observable.ts | 5 +++--
.../lib/screenshots/observable_handler.ts | 2 +-
.../server/queries/task_claiming.test.ts | 16 +++++++++++-----
.../server/queries/task_claiming.ts | 8 ++++++--
.../task_running/ephemeral_task_runner.ts | 13 +++++++++++--
.../server/task_running/task_runner.test.ts | 19 +++++++++++++------
.../server/task_running/task_runner.ts | 12 ++++++++++--
18 files changed, 109 insertions(+), 61 deletions(-)
diff --git a/dev_docs/contributing/standards.mdx b/dev_docs/contributing/standards.mdx
index 172a83935b966..d2f31f3a4faa2 100644
--- a/dev_docs/contributing/standards.mdx
+++ b/dev_docs/contributing/standards.mdx
@@ -67,6 +67,14 @@ Every public API should have a release tag specified at the top of it’s docume
Every team should be collecting telemetry metrics on it’s public API usage. This will be important for knowing when it’s safe to make breaking changes. The Core team will be looking into ways to make this easier and an automatic part of registration (see [#112291](https://github.com/elastic/kibana/issues/112291)).
+### APM
+
+Kibana server and client are instrumented with APM node and APM RUM clients respectively, tracking serveral types of transactions by default, such as `page-load`, `request`, etc.
+You may introduce custom transactions. Please refer to the [APM documentation](https://www.elastic.co/guide/en/apm/get-started/current/index.html) and follow these guidelines when doing so:
+
+- Use dashed syntax for transaction types and names: `my-transaction-type` and `my-transaction-name`
+- [Refrain from adding too many custom labels](https://www.elastic.co/guide/en/apm/get-started/current/metadata.html)
+
### Documentation
Every public API should be documented inside the [docs/api](https://github.com/elastic/kibana/tree/main/docs/api) folder in asciidoc (this content will eventually be migrated to mdx to support the new docs system). If a public REST API is undocumented, you should either document it, or make it internal.
diff --git a/src/core/public/apm_system.ts b/src/core/public/apm_system.ts
index 5201b7005c66e..f15a317f9f934 100644
--- a/src/core/public/apm_system.ts
+++ b/src/core/public/apm_system.ts
@@ -71,7 +71,7 @@ export class ApmSystem {
start.application.currentAppId$.subscribe((appId) => {
if (appId && this.apm) {
this.closePageLoadTransaction();
- this.apm.startTransaction(`/app/${appId}`, 'route-change', {
+ this.apm.startTransaction(appId, 'app-change', {
managed: true,
canReuse: true,
});
diff --git a/src/core/server/server.ts b/src/core/server/server.ts
index e8c7ce6abb029..c35fde302578a 100644
--- a/src/core/server/server.ts
+++ b/src/core/server/server.ts
@@ -128,7 +128,7 @@ export class Server {
public async preboot() {
this.log.debug('prebooting server');
- const prebootTransaction = apm.startTransaction('server_preboot', 'kibana_platform');
+ const prebootTransaction = apm.startTransaction('server-preboot', 'kibana-platform');
const environmentPreboot = await this.environment.preboot();
@@ -184,7 +184,7 @@ export class Server {
public async setup() {
this.log.debug('setting up server');
- const setupTransaction = apm.startTransaction('server_setup', 'kibana_platform');
+ const setupTransaction = apm.startTransaction('server-setup', 'kibana-platform');
const environmentSetup = this.environment.setup();
@@ -291,7 +291,7 @@ export class Server {
public async start() {
this.log.debug('starting server');
- const startTransaction = apm.startTransaction('server_start', 'kibana_platform');
+ const startTransaction = apm.startTransaction('server-start', 'kibana-platform');
const executionContextStart = this.executionContext.start();
const elasticsearchStart = await this.elasticsearch.start();
diff --git a/x-pack/plugins/reporting/common/constants.ts b/x-pack/plugins/reporting/common/constants.ts
index 1eef032945e69..65d196b6e068a 100644
--- a/x-pack/plugins/reporting/common/constants.ts
+++ b/x-pack/plugins/reporting/common/constants.ts
@@ -7,6 +7,8 @@
export const PLUGIN_ID = 'reporting';
+export const REPORTING_TRANSACTION_TYPE = PLUGIN_ID;
+
export const REPORTING_SYSTEM_INDEX = '.reporting';
export const JOB_COMPLETION_NOTIFICATIONS_SESSION_KEY =
diff --git a/x-pack/plugins/reporting/server/export_types/common/generate_png.ts b/x-pack/plugins/reporting/server/export_types/common/generate_png.ts
index 5ad39a3f91303..c5e70a6c93eff 100644
--- a/x-pack/plugins/reporting/server/export_types/common/generate_png.ts
+++ b/x-pack/plugins/reporting/server/export_types/common/generate_png.ts
@@ -8,6 +8,7 @@
import apm from 'elastic-apm-node';
import * as Rx from 'rxjs';
import { finalize, map, tap } from 'rxjs/operators';
+import { REPORTING_TRANSACTION_TYPE } from '../../../common/constants';
import { ReportingCore } from '../../';
import { UrlOrUrlLocatorTuple } from '../../../common/types';
import { LevelLogger } from '../../lib';
@@ -27,8 +28,8 @@ export async function generatePngObservableFactory(reporting: ReportingCore) {
conditionalHeaders: ConditionalHeaders,
layoutParams: LayoutParams & { selectors?: Partial }
): Rx.Observable<{ buffer: Buffer; warnings: string[] }> {
- const apmTrans = apm.startTransaction('reporting generate_png', 'reporting');
- const apmLayout = apmTrans?.startSpan('create_layout', 'setup');
+ const apmTrans = apm.startTransaction('generate-png', REPORTING_TRANSACTION_TYPE);
+ const apmLayout = apmTrans?.startSpan('create-layout', 'setup');
if (!layoutParams || !layoutParams.dimensions) {
throw new Error(`LayoutParams.Dimensions is undefined.`);
}
@@ -36,7 +37,7 @@ export async function generatePngObservableFactory(reporting: ReportingCore) {
if (apmLayout) apmLayout.end();
- const apmScreenshots = apmTrans?.startSpan('screenshots_pipeline', 'setup');
+ const apmScreenshots = apmTrans?.startSpan('screenshots-pipeline', 'setup');
let apmBuffer: typeof apm.currentSpan;
const screenshots$ = getScreenshots$(captureConfig, browserDriverFactory, {
logger,
@@ -47,7 +48,7 @@ export async function generatePngObservableFactory(reporting: ReportingCore) {
}).pipe(
tap(() => {
apmScreenshots?.end();
- apmBuffer = apmTrans?.startSpan('get_buffer', 'output') ?? null;
+ apmBuffer = apmTrans?.startSpan('get-buffer', 'output') ?? null;
}),
map((results: ScreenshotResults[]) => ({
buffer: results[0].screenshots[0].data,
@@ -63,7 +64,7 @@ export async function generatePngObservableFactory(reporting: ReportingCore) {
})),
tap(({ buffer }) => {
logger.debug(`PNG buffer byte length: ${buffer.byteLength}`);
- apmTrans?.setLabel('byte_length', buffer.byteLength, false);
+ apmTrans?.setLabel('byte-length', buffer.byteLength, false);
}),
finalize(() => {
apmBuffer?.end();
diff --git a/x-pack/plugins/reporting/server/export_types/png/execute_job/index.ts b/x-pack/plugins/reporting/server/export_types/png/execute_job/index.ts
index fba6ea7b491c6..2446e7a7d1c51 100644
--- a/x-pack/plugins/reporting/server/export_types/png/execute_job/index.ts
+++ b/x-pack/plugins/reporting/server/export_types/png/execute_job/index.ts
@@ -8,7 +8,7 @@
import apm from 'elastic-apm-node';
import * as Rx from 'rxjs';
import { catchError, finalize, map, mergeMap, takeUntil, tap } from 'rxjs/operators';
-import { PNG_JOB_TYPE } from '../../../../common/constants';
+import { PNG_JOB_TYPE, REPORTING_TRANSACTION_TYPE } from '../../../../common/constants';
import { TaskRunResult } from '../../../lib/tasks';
import { RunTaskFn, RunTaskFnFactory } from '../../../types';
import {
@@ -26,8 +26,8 @@ export const runTaskFnFactory: RunTaskFnFactory> =
const encryptionKey = config.get('encryptionKey');
return async function runTask(jobId, job, cancellationToken, stream) {
- const apmTrans = apm.startTransaction('reporting execute_job png', 'reporting');
- const apmGetAssets = apmTrans?.startSpan('get_assets', 'setup');
+ const apmTrans = apm.startTransaction('execute-job-png', REPORTING_TRANSACTION_TYPE);
+ const apmGetAssets = apmTrans?.startSpan('get-assets', 'setup');
let apmGeneratePng: { end: () => void } | null | undefined;
const generatePngObservable = await generatePngObservableFactory(reporting);
@@ -41,7 +41,7 @@ export const runTaskFnFactory: RunTaskFnFactory> =
const hashUrl = urls[0];
if (apmGetAssets) apmGetAssets.end();
- apmGeneratePng = apmTrans?.startSpan('generate_png_pipeline', 'execute');
+ apmGeneratePng = apmTrans?.startSpan('generate-png-pipeline', 'execute');
return generatePngObservable(
jobLogger,
hashUrl,
diff --git a/x-pack/plugins/reporting/server/export_types/png_v2/execute_job.ts b/x-pack/plugins/reporting/server/export_types/png_v2/execute_job.ts
index a7478de1cc96e..00652309b88c1 100644
--- a/x-pack/plugins/reporting/server/export_types/png_v2/execute_job.ts
+++ b/x-pack/plugins/reporting/server/export_types/png_v2/execute_job.ts
@@ -8,7 +8,7 @@
import apm from 'elastic-apm-node';
import * as Rx from 'rxjs';
import { catchError, finalize, map, mergeMap, takeUntil, tap } from 'rxjs/operators';
-import { PNG_JOB_TYPE_V2 } from '../../../common/constants';
+import { PNG_JOB_TYPE_V2, REPORTING_TRANSACTION_TYPE } from '../../../common/constants';
import { TaskRunResult } from '../../lib/tasks';
import { RunTaskFn, RunTaskFnFactory } from '../../types';
import {
@@ -26,8 +26,8 @@ export const runTaskFnFactory: RunTaskFnFactory> =
const encryptionKey = config.get('encryptionKey');
return async function runTask(jobId, job, cancellationToken, stream) {
- const apmTrans = apm.startTransaction('reporting execute_job pngV2', 'reporting');
- const apmGetAssets = apmTrans?.startSpan('get_assets', 'setup');
+ const apmTrans = apm.startTransaction('execute-job-png-v2', REPORTING_TRANSACTION_TYPE);
+ const apmGetAssets = apmTrans?.startSpan('get-assets', 'setup');
let apmGeneratePng: { end: () => void } | null | undefined;
const generatePngObservable = await generatePngObservableFactory(reporting);
@@ -42,7 +42,7 @@ export const runTaskFnFactory: RunTaskFnFactory> =
apmGetAssets?.end();
- apmGeneratePng = apmTrans?.startSpan('generate_png_pipeline', 'execute');
+ apmGeneratePng = apmTrans?.startSpan('generate-png-pipeline', 'execute');
return generatePngObservable(
jobLogger,
[url, locatorParams],
diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/execute_job/index.ts b/x-pack/plugins/reporting/server/export_types/printable_pdf/execute_job/index.ts
index f4b95e0e20e51..2358333bbe7ef 100644
--- a/x-pack/plugins/reporting/server/export_types/printable_pdf/execute_job/index.ts
+++ b/x-pack/plugins/reporting/server/export_types/printable_pdf/execute_job/index.ts
@@ -8,7 +8,7 @@
import apm from 'elastic-apm-node';
import * as Rx from 'rxjs';
import { catchError, map, mergeMap, takeUntil, tap } from 'rxjs/operators';
-import { PDF_JOB_TYPE } from '../../../../common/constants';
+import { PDF_JOB_TYPE, REPORTING_TRANSACTION_TYPE } from '../../../../common/constants';
import { TaskRunResult } from '../../../lib/tasks';
import { RunTaskFn, RunTaskFnFactory } from '../../../types';
import {
@@ -28,8 +28,8 @@ export const runTaskFnFactory: RunTaskFnFactory> =
return async function runTask(jobId, job, cancellationToken, stream) {
const jobLogger = parentLogger.clone([PDF_JOB_TYPE, 'execute-job', jobId]);
- const apmTrans = apm.startTransaction('reporting execute_job pdf', 'reporting');
- const apmGetAssets = apmTrans?.startSpan('get_assets', 'setup');
+ const apmTrans = apm.startTransaction('execute-job-pdf', REPORTING_TRANSACTION_TYPE);
+ const apmGetAssets = apmTrans?.startSpan('get-assets', 'setup');
let apmGeneratePdf: { end: () => void } | null | undefined;
const generatePdfObservable = await generatePdfObservableFactory(reporting);
@@ -47,7 +47,7 @@ export const runTaskFnFactory: RunTaskFnFactory> =
const { browserTimezone, layout, title } = job;
apmGetAssets?.end();
- apmGeneratePdf = apmTrans?.startSpan('generate_pdf_pipeline', 'execute');
+ apmGeneratePdf = apmTrans?.startSpan('generate-pdf-pipeline', 'execute');
return generatePdfObservable(
jobLogger,
title,
diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/tracker.ts b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/tracker.ts
index 4b5a0a7bdade7..3d720ccade546 100644
--- a/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/tracker.ts
+++ b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/tracker.ts
@@ -6,6 +6,7 @@
*/
import apm from 'elastic-apm-node';
+import { REPORTING_TRANSACTION_TYPE } from '../../../../common/constants';
interface PdfTracker {
setByteLength: (byteLength: number) => void;
@@ -32,7 +33,7 @@ interface ApmSpan {
}
export function getTracker(): PdfTracker {
- const apmTrans = apm.startTransaction('reporting generate_pdf', 'reporting');
+ const apmTrans = apm.startTransaction('generate-pdf', REPORTING_TRANSACTION_TYPE);
let apmLayout: ApmSpan | null = null;
let apmScreenshots: ApmSpan | null = null;
@@ -43,43 +44,43 @@ export function getTracker(): PdfTracker {
return {
startLayout() {
- apmLayout = apmTrans?.startSpan('create_layout', SPANTYPE_SETUP) || null;
+ apmLayout = apmTrans?.startSpan('create-layout', SPANTYPE_SETUP) || null;
},
endLayout() {
if (apmLayout) apmLayout.end();
},
startScreenshots() {
- apmScreenshots = apmTrans?.startSpan('screenshots_pipeline', SPANTYPE_SETUP) || null;
+ apmScreenshots = apmTrans?.startSpan('screenshots-pipeline', SPANTYPE_SETUP) || null;
},
endScreenshots() {
if (apmScreenshots) apmScreenshots.end();
},
startSetup() {
- apmSetup = apmTrans?.startSpan('setup_pdf', SPANTYPE_SETUP) || null;
+ apmSetup = apmTrans?.startSpan('setup-pdf', SPANTYPE_SETUP) || null;
},
endSetup() {
if (apmSetup) apmSetup.end();
},
startAddImage() {
- apmAddImage = apmTrans?.startSpan('add_pdf_image', SPANTYPE_OUTPUT) || null;
+ apmAddImage = apmTrans?.startSpan('add-pdf-image', SPANTYPE_OUTPUT) || null;
},
endAddImage() {
if (apmAddImage) apmAddImage.end();
},
startCompile() {
- apmCompilePdf = apmTrans?.startSpan('compile_pdf', SPANTYPE_OUTPUT) || null;
+ apmCompilePdf = apmTrans?.startSpan('compile-pdf', SPANTYPE_OUTPUT) || null;
},
endCompile() {
if (apmCompilePdf) apmCompilePdf.end();
},
startGetBuffer() {
- apmGetBuffer = apmTrans?.startSpan('get_buffer', SPANTYPE_OUTPUT) || null;
+ apmGetBuffer = apmTrans?.startSpan('get-buffer', SPANTYPE_OUTPUT) || null;
},
endGetBuffer() {
if (apmGetBuffer) apmGetBuffer.end();
},
setByteLength(byteLength: number) {
- apmTrans?.setLabel('byte_length', byteLength, false);
+ apmTrans?.setLabel('byte-length', byteLength, false);
},
end() {
if (apmTrans) apmTrans.end();
diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf_v2/execute_job.ts b/x-pack/plugins/reporting/server/export_types/printable_pdf_v2/execute_job.ts
index 2c553295aa840..b1b6f3f79aee3 100644
--- a/x-pack/plugins/reporting/server/export_types/printable_pdf_v2/execute_job.ts
+++ b/x-pack/plugins/reporting/server/export_types/printable_pdf_v2/execute_job.ts
@@ -8,7 +8,7 @@
import apm from 'elastic-apm-node';
import * as Rx from 'rxjs';
import { catchError, map, mergeMap, takeUntil, tap } from 'rxjs/operators';
-import { PDF_JOB_TYPE_V2 } from '../../../common/constants';
+import { PDF_JOB_TYPE_V2, REPORTING_TRANSACTION_TYPE } from '../../../common/constants';
import { TaskRunResult } from '../../lib/tasks';
import { RunTaskFn, RunTaskFnFactory } from '../../types';
import {
@@ -27,8 +27,8 @@ export const runTaskFnFactory: RunTaskFnFactory> =
return async function runTask(jobId, job, cancellationToken, stream) {
const jobLogger = parentLogger.clone([PDF_JOB_TYPE_V2, 'execute-job', jobId]);
- const apmTrans = apm.startTransaction('reporting execute_job pdf_v2', 'reporting');
- const apmGetAssets = apmTrans?.startSpan('get_assets', 'setup');
+ const apmTrans = apm.startTransaction('execute-job-pdf-v2', REPORTING_TRANSACTION_TYPE);
+ const apmGetAssets = apmTrans?.startSpan('get-assets', 'setup');
let apmGeneratePdf: { end: () => void } | null | undefined;
const generatePdfObservable = await generatePdfObservableFactory(reporting);
@@ -44,7 +44,7 @@ export const runTaskFnFactory: RunTaskFnFactory> =
const { browserTimezone, layout, title, locatorParams } = job;
apmGetAssets?.end();
- apmGeneratePdf = apmTrans?.startSpan('generate_pdf_pipeline', 'execute');
+ apmGeneratePdf = apmTrans?.startSpan('generate-pdf-pipeline', 'execute');
return generatePdfObservable(
jobLogger,
job,
diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf_v2/lib/tracker.ts b/x-pack/plugins/reporting/server/export_types/printable_pdf_v2/lib/tracker.ts
index 4b5a0a7bdade7..3d720ccade546 100644
--- a/x-pack/plugins/reporting/server/export_types/printable_pdf_v2/lib/tracker.ts
+++ b/x-pack/plugins/reporting/server/export_types/printable_pdf_v2/lib/tracker.ts
@@ -6,6 +6,7 @@
*/
import apm from 'elastic-apm-node';
+import { REPORTING_TRANSACTION_TYPE } from '../../../../common/constants';
interface PdfTracker {
setByteLength: (byteLength: number) => void;
@@ -32,7 +33,7 @@ interface ApmSpan {
}
export function getTracker(): PdfTracker {
- const apmTrans = apm.startTransaction('reporting generate_pdf', 'reporting');
+ const apmTrans = apm.startTransaction('generate-pdf', REPORTING_TRANSACTION_TYPE);
let apmLayout: ApmSpan | null = null;
let apmScreenshots: ApmSpan | null = null;
@@ -43,43 +44,43 @@ export function getTracker(): PdfTracker {
return {
startLayout() {
- apmLayout = apmTrans?.startSpan('create_layout', SPANTYPE_SETUP) || null;
+ apmLayout = apmTrans?.startSpan('create-layout', SPANTYPE_SETUP) || null;
},
endLayout() {
if (apmLayout) apmLayout.end();
},
startScreenshots() {
- apmScreenshots = apmTrans?.startSpan('screenshots_pipeline', SPANTYPE_SETUP) || null;
+ apmScreenshots = apmTrans?.startSpan('screenshots-pipeline', SPANTYPE_SETUP) || null;
},
endScreenshots() {
if (apmScreenshots) apmScreenshots.end();
},
startSetup() {
- apmSetup = apmTrans?.startSpan('setup_pdf', SPANTYPE_SETUP) || null;
+ apmSetup = apmTrans?.startSpan('setup-pdf', SPANTYPE_SETUP) || null;
},
endSetup() {
if (apmSetup) apmSetup.end();
},
startAddImage() {
- apmAddImage = apmTrans?.startSpan('add_pdf_image', SPANTYPE_OUTPUT) || null;
+ apmAddImage = apmTrans?.startSpan('add-pdf-image', SPANTYPE_OUTPUT) || null;
},
endAddImage() {
if (apmAddImage) apmAddImage.end();
},
startCompile() {
- apmCompilePdf = apmTrans?.startSpan('compile_pdf', SPANTYPE_OUTPUT) || null;
+ apmCompilePdf = apmTrans?.startSpan('compile-pdf', SPANTYPE_OUTPUT) || null;
},
endCompile() {
if (apmCompilePdf) apmCompilePdf.end();
},
startGetBuffer() {
- apmGetBuffer = apmTrans?.startSpan('get_buffer', SPANTYPE_OUTPUT) || null;
+ apmGetBuffer = apmTrans?.startSpan('get-buffer', SPANTYPE_OUTPUT) || null;
},
endGetBuffer() {
if (apmGetBuffer) apmGetBuffer.end();
},
setByteLength(byteLength: number) {
- apmTrans?.setLabel('byte_length', byteLength, false);
+ apmTrans?.setLabel('byte-length', byteLength, false);
},
end() {
if (apmTrans) apmTrans.end();
diff --git a/x-pack/plugins/reporting/server/lib/screenshots/observable.ts b/x-pack/plugins/reporting/server/lib/screenshots/observable.ts
index d400c423c5e04..8ba2a125a5504 100644
--- a/x-pack/plugins/reporting/server/lib/screenshots/observable.ts
+++ b/x-pack/plugins/reporting/server/lib/screenshots/observable.ts
@@ -9,6 +9,7 @@ import apm from 'elastic-apm-node';
import * as Rx from 'rxjs';
import { catchError, concatMap, first, mergeMap, take, takeUntil, toArray } from 'rxjs/operators';
import { durationToNumber } from '../../../common/schema_utils';
+import { REPORTING_TRANSACTION_TYPE } from '../../../common/constants';
import { HeadlessChromiumDriverFactory } from '../../browsers';
import { CaptureConfig } from '../../types';
import {
@@ -46,8 +47,8 @@ export function getScreenshots$(
browserDriverFactory: HeadlessChromiumDriverFactory,
opts: ScreenshotObservableOpts
): Rx.Observable {
- const apmTrans = apm.startTransaction(`reporting screenshot pipeline`, 'reporting');
- const apmCreatePage = apmTrans?.startSpan('create_page', 'wait');
+ const apmTrans = apm.startTransaction('screenshot-pipeline', REPORTING_TRANSACTION_TYPE);
+ const apmCreatePage = apmTrans?.startSpan('create-page', 'wait');
const { browserTimezone, logger } = opts;
return browserDriverFactory.createPage({ browserTimezone }, logger).pipe(
diff --git a/x-pack/plugins/reporting/server/lib/screenshots/observable_handler.ts b/x-pack/plugins/reporting/server/lib/screenshots/observable_handler.ts
index cdbddb8d89c89..c241a529818fa 100644
--- a/x-pack/plugins/reporting/server/lib/screenshots/observable_handler.ts
+++ b/x-pack/plugins/reporting/server/lib/screenshots/observable_handler.ts
@@ -110,7 +110,7 @@ export class ScreenshotObservableHandler {
// allows for them to be displayed properly in many cases
await injectCustomCss(driver, layout, logger);
- const apmPositionElements = apmTrans?.startSpan('position_elements', 'correction');
+ const apmPositionElements = apmTrans?.startSpan('position-elements', 'correction');
// position panel elements for print layout
await layout.positionElements?.(driver, logger);
apmPositionElements?.end();
diff --git a/x-pack/plugins/task_manager/server/queries/task_claiming.test.ts b/x-pack/plugins/task_manager/server/queries/task_claiming.test.ts
index eed8858dc95d8..ed656b5144956 100644
--- a/x-pack/plugins/task_manager/server/queries/task_claiming.test.ts
+++ b/x-pack/plugins/task_manager/server/queries/task_claiming.test.ts
@@ -17,10 +17,16 @@ import { asOk, asErr } from '../lib/result_type';
import { TaskTypeDictionary } from '../task_type_dictionary';
import type { MustNotCondition } from '../queries/query_clauses';
import { mockLogger } from '../test_utils';
-import { TaskClaiming, OwnershipClaimingOpts, TaskClaimingOpts } from './task_claiming';
+import {
+ TaskClaiming,
+ OwnershipClaimingOpts,
+ TaskClaimingOpts,
+ TASK_MANAGER_MARK_AS_CLAIMED,
+} from './task_claiming';
import { Observable } from 'rxjs';
import { taskStoreMock } from '../task_store.mock';
import apm from 'elastic-apm-node';
+import { TASK_MANAGER_TRANSACTION_TYPE } from '../task_running';
const taskManagerLogger = mockLogger();
@@ -190,8 +196,8 @@ describe('TaskClaiming', () => {
const results = await getAllAsPromise(taskClaiming.claimAvailableTasks(claimingOpts));
expect(apm.startTransaction).toHaveBeenCalledWith(
- 'markAvailableTasksAsClaimed',
- 'taskManager markAvailableTasksAsClaimed'
+ TASK_MANAGER_MARK_AS_CLAIMED,
+ TASK_MANAGER_TRANSACTION_TYPE
);
expect(mockApmTrans.end).toHaveBeenCalledWith('success');
@@ -250,8 +256,8 @@ describe('TaskClaiming', () => {
).rejects.toMatchInlineSnapshot(`[Error: Oh no]`);
expect(apm.startTransaction).toHaveBeenCalledWith(
- 'markAvailableTasksAsClaimed',
- 'taskManager markAvailableTasksAsClaimed'
+ TASK_MANAGER_MARK_AS_CLAIMED,
+ TASK_MANAGER_TRANSACTION_TYPE
);
expect(mockApmTrans.end).toHaveBeenCalledWith('failure');
});
diff --git a/x-pack/plugins/task_manager/server/queries/task_claiming.ts b/x-pack/plugins/task_manager/server/queries/task_claiming.ts
index fb0b92e87a424..b45591a233e19 100644
--- a/x-pack/plugins/task_manager/server/queries/task_claiming.ts
+++ b/x-pack/plugins/task_manager/server/queries/task_claiming.ts
@@ -52,6 +52,7 @@ import {
SearchOpts,
} from '../task_store';
import { FillPoolResult } from '../lib/fill_pool';
+import { TASK_MANAGER_TRANSACTION_TYPE } from '../task_running';
export interface TaskClaimingOpts {
logger: Logger;
@@ -106,6 +107,8 @@ interface TaskClaimingBatch {
type UnlimitedBatch = TaskClaimingBatch>;
type LimitedBatch = TaskClaimingBatch;
+export const TASK_MANAGER_MARK_AS_CLAIMED = 'mark-available-tasks-as-claimed';
+
export class TaskClaiming {
public readonly errors$ = new Subject();
public readonly maxAttempts: number;
@@ -412,9 +415,10 @@ export class TaskClaiming {
);
const apmTrans = apm.startTransaction(
- 'markAvailableTasksAsClaimed',
- `taskManager markAvailableTasksAsClaimed`
+ TASK_MANAGER_MARK_AS_CLAIMED,
+ TASK_MANAGER_TRANSACTION_TYPE
);
+
try {
const result = await this.taskStore.updateByQuery(
{
diff --git a/x-pack/plugins/task_manager/server/task_running/ephemeral_task_runner.ts b/x-pack/plugins/task_manager/server/task_running/ephemeral_task_runner.ts
index 0695ed149c9a4..0085329cd66e6 100644
--- a/x-pack/plugins/task_manager/server/task_running/ephemeral_task_runner.ts
+++ b/x-pack/plugins/task_manager/server/task_running/ephemeral_task_runner.ts
@@ -48,6 +48,9 @@ import {
TaskRunner,
TaskRunningInstance,
TaskRunResult,
+ TASK_MANAGER_RUN_TRANSACTION_TYPE,
+ TASK_MANAGER_TRANSACTION_TYPE,
+ TASK_MANAGER_TRANSACTION_TYPE_MARK_AS_RUNNING,
} from './task_runner';
type Opts = {
@@ -206,9 +209,11 @@ export class EphemeralTaskManagerRunner implements TaskRunner {
);
}
this.logger.debug(`Running ephemeral task ${this}`);
- const apmTrans = apm.startTransaction(this.taskType, 'taskManager ephemeral run', {
+ const apmTrans = apm.startTransaction(this.taskType, TASK_MANAGER_RUN_TRANSACTION_TYPE, {
childOf: this.instance.task.traceparent,
});
+ apmTrans?.addLabels({ ephemeral: true });
+
const modifiedContext = await this.beforeRun({
taskInstance: asConcreteInstance(this.instance.task),
});
@@ -261,7 +266,11 @@ export class EphemeralTaskManagerRunner implements TaskRunner {
);
}
- const apmTrans = apm.startTransaction('taskManager', 'taskManager markTaskAsRunning');
+ const apmTrans = apm.startTransaction(
+ TASK_MANAGER_TRANSACTION_TYPE_MARK_AS_RUNNING,
+ TASK_MANAGER_TRANSACTION_TYPE
+ );
+ apmTrans?.addLabels({ entityId: this.taskType });
const now = new Date();
try {
diff --git a/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts b/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts
index 02be86c3db0c2..1408fadc102e4 100644
--- a/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts
+++ b/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts
@@ -26,6 +26,11 @@ import { throwUnrecoverableError } from './errors';
import { taskStoreMock } from '../task_store.mock';
import apm from 'elastic-apm-node';
import { executionContextServiceMock } from '../../../../../src/core/server/mocks';
+import {
+ TASK_MANAGER_RUN_TRANSACTION_TYPE,
+ TASK_MANAGER_TRANSACTION_TYPE,
+ TASK_MANAGER_TRANSACTION_TYPE_MARK_AS_RUNNING,
+} from './task_runner';
const executionContext = executionContextServiceMock.createSetupContract();
const minutesFromNow = (mins: number): Date => secondsFromNow(mins * 60);
@@ -47,6 +52,8 @@ describe('TaskManagerRunner', () => {
const readyToRunStageSetup = (opts: TestOpts) => testOpts(TaskRunningStage.READY_TO_RUN, opts);
const mockApmTrans = {
end: jest.fn(),
+ addLabels: jest.fn(),
+ setLabel: jest.fn(),
};
test('execution ID', async () => {
@@ -88,8 +95,8 @@ describe('TaskManagerRunner', () => {
});
await runner.markTaskAsRunning();
expect(apm.startTransaction).toHaveBeenCalledWith(
- 'taskManager',
- 'taskManager markTaskAsRunning'
+ TASK_MANAGER_TRANSACTION_TYPE_MARK_AS_RUNNING,
+ TASK_MANAGER_TRANSACTION_TYPE
);
expect(mockApmTrans.end).toHaveBeenCalledWith('success');
});
@@ -117,8 +124,8 @@ describe('TaskManagerRunner', () => {
);
// await runner.markTaskAsRunning();
expect(apm.startTransaction).toHaveBeenCalledWith(
- 'taskManager',
- 'taskManager markTaskAsRunning'
+ TASK_MANAGER_TRANSACTION_TYPE_MARK_AS_RUNNING,
+ TASK_MANAGER_TRANSACTION_TYPE
);
expect(mockApmTrans.end).toHaveBeenCalledWith('failure');
});
@@ -706,7 +713,7 @@ describe('TaskManagerRunner', () => {
},
});
await runner.run();
- expect(apm.startTransaction).toHaveBeenCalledWith('bar', 'taskManager run', {
+ expect(apm.startTransaction).toHaveBeenCalledWith('bar', TASK_MANAGER_RUN_TRANSACTION_TYPE, {
childOf: 'apmTraceparent',
});
expect(mockApmTrans.end).toHaveBeenCalledWith('success');
@@ -729,7 +736,7 @@ describe('TaskManagerRunner', () => {
},
});
await runner.run();
- expect(apm.startTransaction).toHaveBeenCalledWith('bar', 'taskManager run', {
+ expect(apm.startTransaction).toHaveBeenCalledWith('bar', TASK_MANAGER_RUN_TRANSACTION_TYPE, {
childOf: 'apmTraceparent',
});
expect(mockApmTrans.end).toHaveBeenCalledWith('failure');
diff --git a/x-pack/plugins/task_manager/server/task_running/task_runner.ts b/x-pack/plugins/task_manager/server/task_running/task_runner.ts
index cd07b4db728c4..cf5ee80d2a82a 100644
--- a/x-pack/plugins/task_manager/server/task_running/task_runner.ts
+++ b/x-pack/plugins/task_manager/server/task_running/task_runner.ts
@@ -60,6 +60,10 @@ import { isUnrecoverableError } from './errors';
const defaultBackoffPerFailure = 5 * 60 * 1000;
export const EMPTY_RUN_RESULT: SuccessfulRunResult = { state: {} };
+export const TASK_MANAGER_RUN_TRANSACTION_TYPE = 'task-run';
+export const TASK_MANAGER_TRANSACTION_TYPE = 'task-manager';
+export const TASK_MANAGER_TRANSACTION_TYPE_MARK_AS_RUNNING = 'mark-task-as-running';
+
export interface TaskRunner {
isExpired: boolean;
expiration: Date;
@@ -276,7 +280,7 @@ export class TaskManagerRunner implements TaskRunner {
}
this.logger.debug(`Running task ${this}`);
- const apmTrans = apm.startTransaction(this.taskType, 'taskManager run', {
+ const apmTrans = apm.startTransaction(this.taskType, TASK_MANAGER_RUN_TRANSACTION_TYPE, {
childOf: this.instance.task.traceparent,
});
@@ -333,7 +337,11 @@ export class TaskManagerRunner implements TaskRunner {
);
}
- const apmTrans = apm.startTransaction('taskManager', 'taskManager markTaskAsRunning');
+ const apmTrans = apm.startTransaction(
+ TASK_MANAGER_TRANSACTION_TYPE_MARK_AS_RUNNING,
+ TASK_MANAGER_TRANSACTION_TYPE
+ );
+ apmTrans?.addLabels({ entityId: this.taskType });
const now = new Date();
try {
From 41cc382269afecee2de4da60238c1959cddbbeb7 Mon Sep 17 00:00:00 2001
From: Scotty Bollinger
Date: Thu, 2 Dec 2021 11:42:14 -0600
Subject: [PATCH 09/65] [Enterprise Search] Remove `external_id` from UI code
(#120143)
* [Enterprise Search] Remove `external_id` from UI code
Ports https://github.com/elastic/ent-search/pull/5441 to Kibana. `external_id` was an alias for regular `id` was removed in the Enterprise Search API.
* Add path to logic file
Not really related to this PR, but needed for debugging in the Redux dev tools
* Rename missed argument name
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
---
.../components/schema/reindex_job/reindex_job_logic.test.ts | 4 ++--
.../shared/schema/errors_accordion/index.test.tsx | 4 ++--
.../applications/shared/schema/errors_accordion/index.tsx | 4 ++--
.../public/applications/shared/schema/types.ts | 2 +-
.../workplace_search/__mocks__/content_sources.mock.ts | 2 +-
.../public/applications/workplace_search/types.ts | 2 +-
.../components/display_settings/display_settings_logic.ts | 1 +
.../content_sources/components/schema/schema_logic.test.ts | 2 +-
8 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/reindex_job/reindex_job_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/reindex_job/reindex_job_logic.test.ts
index 706dc3549badc..bb8156a8b55fa 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/reindex_job/reindex_job_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/reindex_job/reindex_job_logic.test.ts
@@ -25,13 +25,13 @@ describe('ReindexJobLogic', () => {
fieldCoercionErrors: {
some_erroring_field: [
{
- external_id: 'document-1',
+ id: 'document-1',
error: "Value 'some text' cannot be parsed as a number",
},
],
another_erroring_field: [
{
- external_id: 'document-2',
+ id: 'document-2',
error: "Value '123' cannot be parsed as a date",
},
],
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/schema/errors_accordion/index.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/schema/errors_accordion/index.test.tsx
index 5413da9d56161..19d04ea3de17e 100644
--- a/x-pack/plugins/enterprise_search/public/applications/shared/schema/errors_accordion/index.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/schema/errors_accordion/index.test.tsx
@@ -22,11 +22,11 @@ describe('SchemaErrorsAccordion', () => {
fieldCoercionErrors: {
id: [
{
- external_id: 'foo',
+ id: 'foo',
error: 'this is an error',
},
{
- external_id: 'bar',
+ id: 'bar',
error: 'this is another error',
},
],
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/schema/errors_accordion/index.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/schema/errors_accordion/index.tsx
index 35675d246a15e..99f3d30c6caae 100644
--- a/x-pack/plugins/enterprise_search/public/applications/shared/schema/errors_accordion/index.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/schema/errors_accordion/index.tsx
@@ -36,7 +36,7 @@ import './schema_errors_accordion.scss';
interface Props {
fieldCoercionErrors: FieldCoercionErrors;
schema: Schema;
- generateViewPath?(externalId: string): string;
+ generateViewPath?(id: string): string;
}
export const SchemaErrorsAccordion: React.FC = ({
@@ -89,7 +89,7 @@ export const SchemaErrorsAccordion: React.FC = ({
{errors.map((error) => {
- const { external_id: id, error: errorMessage } = error;
+ const { id, error: errorMessage } = error;
return (
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/schema/types.ts b/x-pack/plugins/enterprise_search/public/applications/shared/schema/types.ts
index 5a423ad510af1..58ad584fd5b60 100644
--- a/x-pack/plugins/enterprise_search/public/applications/shared/schema/types.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/schema/types.ts
@@ -58,7 +58,7 @@ export interface IndexJob extends IIndexingStatus {
}
export interface FieldCoercionError {
- external_id: string;
+ id: string;
error: string;
}
export type FieldCoercionErrors = Record;
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/content_sources.mock.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/content_sources.mock.ts
index 48cbf4ba00d87..85ffde0acfea3 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/content_sources.mock.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/content_sources.mock.ts
@@ -370,7 +370,7 @@ export const exampleResult = {
myLink: 'http://foo',
otherTitle: 'foo',
content_source_id: '60e85e7ea2564c265a88a4f0',
- external_id: 'doc-60e85eb7a2564c937a88a4f3',
+ id: 'doc-60e85eb7a2564c937a88a4f3',
last_updated: '2021-07-09T14:35:35+00:00',
updated_at: '2021-07-09T14:35:35+00:00',
source: 'custom',
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/types.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/types.ts
index 2a982c2be1cfc..0fa8c00409d1a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/types.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/types.ts
@@ -257,7 +257,7 @@ export type CustomAPIFieldValue =
export interface Result {
content_source_id: string;
last_updated: string;
- external_id: string;
+ id: string;
updated_at: string;
source: string;
[key: string]: CustomAPIFieldValue;
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/display_settings_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/display_settings_logic.ts
index d62bd6252f130..f7076b4d02afb 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/display_settings_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/display_settings_logic.ts
@@ -123,6 +123,7 @@ export const defaultSearchResultConfig = {
export const DisplaySettingsLogic = kea<
MakeLogicType
>({
+ path: ['enterprise_search', 'workplace_search', 'display_settings_logic'],
actions: {
onInitializeDisplaySettings: (displaySettingsProps: DisplaySettingsInitialData) =>
displaySettingsProps,
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/schema/schema_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/schema/schema_logic.test.ts
index d284f5c741eb3..748e5068833cf 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/schema/schema_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/schema/schema_logic.test.ts
@@ -67,7 +67,7 @@ describe('SchemaLogic', () => {
const fieldCoercionErrors = [
{
- external_id: '123',
+ id: '123',
error: 'error',
},
] as any;
From 392325ceae5de27739b7967e706a98866b259d93 Mon Sep 17 00:00:00 2001
From: Oleksiy Kovyrin
Date: Thu, 2 Dec 2021 13:29:31 -0500
Subject: [PATCH 10/65] Remove links to docs about different auth methods in
Enterprise Search (#120127)
* Remove links to docs about different auth methods in Enterprise Search
---
...-plugin-core-public.doclinksstart.links.md | 4 -
...kibana-plugin-core-public.doclinksstart.md | 2 +-
.../public/doc_links/doc_links_service.ts | 8 --
src/core/public/public.api.md | 4 -
.../components/setup_guide/setup_guide.tsx | 8 +-
.../public/applications/app_search/routes.ts | 2 -
.../components/setup_guide/setup_guide.tsx | 3 -
.../shared/doc_links/doc_links.ts | 12 ---
.../shared/setup_guide/instructions.test.tsx | 17 +---
.../shared/setup_guide/instructions.tsx | 80 +------------------
.../shared/setup_guide/setup_guide.tsx | 16 +---
.../applications/workplace_search/routes.ts | 2 -
.../views/setup_guide/setup_guide.tsx | 8 +-
.../translations/translations/ja-JP.json | 5 --
.../translations/translations/zh-CN.json | 5 --
15 files changed, 7 insertions(+), 169 deletions(-)
diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md
index 7669b9b644916..403d8594999a7 100644
--- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md
+++ b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md
@@ -72,13 +72,11 @@ readonly links: {
readonly indexingDocumentsSchema: string;
readonly logSettings: string;
readonly metaEngines: string;
- readonly nativeAuth: string;
readonly precisionTuning: string;
readonly relevanceTuning: string;
readonly resultSettings: string;
readonly searchUI: string;
readonly security: string;
- readonly standardAuth: string;
readonly synonyms: string;
readonly webCrawler: string;
readonly webCrawlerEventLogs: string;
@@ -105,7 +103,6 @@ readonly links: {
readonly indexingSchedule: string;
readonly jiraCloud: string;
readonly jiraServer: string;
- readonly nativeAuth: string;
readonly oneDrive: string;
readonly permissions: string;
readonly salesforce: string;
@@ -113,7 +110,6 @@ readonly links: {
readonly serviceNow: string;
readonly sharePoint: string;
readonly slack: string;
- readonly standardAuth: string;
readonly synch: string;
readonly zendesk: string;
};
diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
index 6aa528d4f04d1..131d4452c980c 100644
--- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
+++ b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
@@ -17,5 +17,5 @@ export interface DocLinksStart
| --- | --- | --- |
| [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md) | string | |
| [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md) | string | |
-| [links](./kibana-plugin-core-public.doclinksstart.links.md) | { readonly settings: string; readonly elasticStackGetStarted: string; readonly upgrade: { readonly upgradingElasticStack: string; }; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; readonly customLinks: string; readonly droppedTransactionSpans: string; readonly upgrading: string; readonly metaData: string; }; readonly canvas: { readonly guide: string; }; readonly cloud: { readonly indexManagement: string; }; readonly dashboard: { readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }; readonly discover: Record<string, string>; readonly filebeat: { readonly base: string; readonly installation: string; readonly configuration: string; readonly elasticsearchOutput: string; readonly elasticsearchModule: string; readonly startup: string; readonly exportedFields: string; readonly suricataModule: string; readonly zeekModule: string; }; readonly auditbeat: { readonly base: string; readonly auditdModule: string; readonly systemModule: string; }; readonly metricbeat: { readonly base: string; readonly configure: string; readonly httpEndpoint: string; readonly install: string; readonly start: string; }; readonly appSearch: { readonly apiRef: string; readonly apiClients: string; readonly apiKeys: string; readonly authentication: string; readonly crawlRules: string; readonly curations: string; readonly duplicateDocuments: string; readonly entryPoints: string; readonly guide: string; readonly indexingDocuments: string; readonly indexingDocumentsSchema: string; readonly logSettings: string; readonly metaEngines: string; readonly nativeAuth: string; readonly precisionTuning: string; readonly relevanceTuning: string; readonly resultSettings: string; readonly searchUI: string; readonly security: string; readonly standardAuth: string; readonly synonyms: string; readonly webCrawler: string; readonly webCrawlerEventLogs: string; }; readonly enterpriseSearch: { readonly configuration: string; readonly licenseManagement: string; readonly mailService: string; readonly usersAccess: string; }; readonly workplaceSearch: { readonly box: string; readonly confluenceCloud: string; readonly confluenceServer: string; readonly customSources: string; readonly customSourcePermissions: string; readonly documentPermissions: string; readonly dropbox: string; readonly externalIdentities: string; readonly gitHub: string; readonly gettingStarted: string; readonly gmail: string; readonly googleDrive: string; readonly indexingSchedule: string; readonly jiraCloud: string; readonly jiraServer: string; readonly nativeAuth: string; readonly oneDrive: string; readonly permissions: string; readonly salesforce: string; readonly security: string; readonly serviceNow: string; readonly sharePoint: string; readonly slack: string; readonly standardAuth: string; readonly synch: string; readonly zendesk: string; }; readonly heartbeat: { readonly base: string; }; readonly libbeat: { readonly getStarted: string; }; readonly logstash: { readonly base: string; }; readonly functionbeat: { readonly base: string; }; readonly winlogbeat: { readonly base: string; }; readonly aggs: { readonly composite: string; readonly composite\_missing\_bucket: string; readonly date\_histogram: string; readonly date\_range: string; readonly date\_format\_pattern: string; readonly filter: string; readonly filters: string; readonly geohash\_grid: string; readonly histogram: string; readonly ip\_range: string; readonly range: string; readonly significant\_terms: string; readonly terms: string; readonly terms\_doc\_count\_error: string; readonly avg: string; readonly avg\_bucket: string; readonly max\_bucket: string; readonly min\_bucket: string; readonly sum\_bucket: string; readonly cardinality: string; readonly count: string; readonly cumulative\_sum: string; readonly derivative: string; readonly geo\_bounds: string; readonly geo\_centroid: string; readonly max: string; readonly median: string; readonly min: string; readonly moving\_avg: string; readonly percentile\_ranks: string; readonly serial\_diff: string; readonly std\_dev: string; readonly sum: string; readonly top\_hits: string; }; readonly runtimeFields: { readonly overview: string; readonly mapping: string; }; readonly scriptedFields: { readonly scriptFields: string; readonly scriptAggs: string; readonly painless: string; readonly painlessApi: string; readonly painlessLangSpec: string; readonly painlessSyntax: string; readonly painlessWalkthrough: string; readonly luceneExpressions: string; }; readonly search: { readonly sessions: string; readonly sessionLimits: string; }; readonly indexPatterns: { readonly introduction: string; readonly fieldFormattersNumber: string; readonly fieldFormattersString: string; readonly runtimeFields: string; }; readonly addData: string; readonly kibana: string; readonly upgradeAssistant: { readonly overview: string; readonly batchReindex: string; readonly remoteReindex: string; }; readonly rollupJobs: string; readonly elasticsearch: Record<string, string>; readonly siem: { readonly privileges: string; readonly guide: string; readonly gettingStarted: string; readonly ml: string; readonly ruleChangeLog: string; readonly detectionsReq: string; readonly networkMap: string; readonly troubleshootGaps: string; }; readonly securitySolution: { readonly trustedApps: string; }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; readonly luceneQuerySyntax: string; readonly percolate: string; readonly queryDsl: string; }; readonly date: { readonly dateMath: string; readonly dateMathIndexNames: string; }; readonly management: Record<string, string>; readonly ml: Record<string, string>; readonly transforms: Record<string, string>; readonly visualize: Record<string, string>; readonly apis: Readonly<{ bulkIndexAlias: string; byteSizeUnits: string; createAutoFollowPattern: string; createFollower: string; createIndex: string; createSnapshotLifecyclePolicy: string; createRoleMapping: string; createRoleMappingTemplates: string; createRollupJobsRequest: string; createApiKey: string; createPipeline: string; createTransformRequest: string; cronExpressions: string; executeWatchActionModes: string; indexExists: string; openIndex: string; putComponentTemplate: string; painlessExecute: string; painlessExecuteAPIContexts: string; putComponentTemplateMetadata: string; putSnapshotLifecyclePolicy: string; putIndexTemplateV1: string; putWatch: string; simulatePipeline: string; timeUnits: string; updateTransform: string; }>; readonly observability: Readonly<{ guide: string; infrastructureThreshold: string; logsThreshold: string; metricsThreshold: string; monitorStatus: string; monitorUptime: string; tlsCertificate: string; uptimeDurationAnomaly: string; }>; readonly alerting: Record<string, string>; readonly maps: Readonly<{ guide: string; importGeospatialPrivileges: string; gdalTutorial: string; }>; readonly monitoring: Record<string, string>; readonly security: Readonly<{ apiKeyServiceSettings: string; clusterPrivileges: string; elasticsearchSettings: string; elasticsearchEnableSecurity: string; elasticsearchEnableApiKeys: string; indicesPrivileges: string; kibanaTLS: string; kibanaPrivileges: string; mappingRoles: string; mappingRolesFieldRules: string; runAsPrivilege: string; }>; readonly spaces: Readonly<{ kibanaLegacyUrlAliases: string; kibanaDisableLegacyUrlAliasesApi: string; }>; readonly watcher: Record<string, string>; readonly ccs: Record<string, string>; readonly plugins: Record<string, string>; readonly snapshotRestore: Record<string, string>; readonly ingest: Record<string, string>; readonly fleet: Readonly<{ beatsAgentComparison: string; guide: string; fleetServer: string; fleetServerAddFleetServer: string; settings: string; settingsFleetServerHostSettings: string; settingsFleetServerProxySettings: string; troubleshooting: string; elasticAgent: string; datastreams: string; datastreamsNamingScheme: string; installElasticAgent: string; installElasticAgentStandalone: string; upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; apiKeysLearnMore: string; onPremRegistry: string; }>; readonly ecs: { readonly guide: string; }; readonly clients: { readonly guide: string; readonly goOverview: string; readonly javaIndex: string; readonly jsIntro: string; readonly netGuide: string; readonly perlGuide: string; readonly phpGuide: string; readonly pythonGuide: string; readonly rubyOverview: string; readonly rustGuide: string; }; readonly endpoints: { readonly troubleshooting: string; }; } | |
+| [links](./kibana-plugin-core-public.doclinksstart.links.md) | { readonly settings: string; readonly elasticStackGetStarted: string; readonly upgrade: { readonly upgradingElasticStack: string; }; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; readonly customLinks: string; readonly droppedTransactionSpans: string; readonly upgrading: string; readonly metaData: string; }; readonly canvas: { readonly guide: string; }; readonly cloud: { readonly indexManagement: string; }; readonly dashboard: { readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }; readonly discover: Record<string, string>; readonly filebeat: { readonly base: string; readonly installation: string; readonly configuration: string; readonly elasticsearchOutput: string; readonly elasticsearchModule: string; readonly startup: string; readonly exportedFields: string; readonly suricataModule: string; readonly zeekModule: string; }; readonly auditbeat: { readonly base: string; readonly auditdModule: string; readonly systemModule: string; }; readonly metricbeat: { readonly base: string; readonly configure: string; readonly httpEndpoint: string; readonly install: string; readonly start: string; }; readonly appSearch: { readonly apiRef: string; readonly apiClients: string; readonly apiKeys: string; readonly authentication: string; readonly crawlRules: string; readonly curations: string; readonly duplicateDocuments: string; readonly entryPoints: string; readonly guide: string; readonly indexingDocuments: string; readonly indexingDocumentsSchema: string; readonly logSettings: string; readonly metaEngines: string; readonly precisionTuning: string; readonly relevanceTuning: string; readonly resultSettings: string; readonly searchUI: string; readonly security: string; readonly synonyms: string; readonly webCrawler: string; readonly webCrawlerEventLogs: string; }; readonly enterpriseSearch: { readonly configuration: string; readonly licenseManagement: string; readonly mailService: string; readonly usersAccess: string; }; readonly workplaceSearch: { readonly box: string; readonly confluenceCloud: string; readonly confluenceServer: string; readonly customSources: string; readonly customSourcePermissions: string; readonly documentPermissions: string; readonly dropbox: string; readonly externalIdentities: string; readonly gitHub: string; readonly gettingStarted: string; readonly gmail: string; readonly googleDrive: string; readonly indexingSchedule: string; readonly jiraCloud: string; readonly jiraServer: string; readonly oneDrive: string; readonly permissions: string; readonly salesforce: string; readonly security: string; readonly serviceNow: string; readonly sharePoint: string; readonly slack: string; readonly synch: string; readonly zendesk: string; }; readonly heartbeat: { readonly base: string; }; readonly libbeat: { readonly getStarted: string; }; readonly logstash: { readonly base: string; }; readonly functionbeat: { readonly base: string; }; readonly winlogbeat: { readonly base: string; }; readonly aggs: { readonly composite: string; readonly composite\_missing\_bucket: string; readonly date\_histogram: string; readonly date\_range: string; readonly date\_format\_pattern: string; readonly filter: string; readonly filters: string; readonly geohash\_grid: string; readonly histogram: string; readonly ip\_range: string; readonly range: string; readonly significant\_terms: string; readonly terms: string; readonly terms\_doc\_count\_error: string; readonly avg: string; readonly avg\_bucket: string; readonly max\_bucket: string; readonly min\_bucket: string; readonly sum\_bucket: string; readonly cardinality: string; readonly count: string; readonly cumulative\_sum: string; readonly derivative: string; readonly geo\_bounds: string; readonly geo\_centroid: string; readonly max: string; readonly median: string; readonly min: string; readonly moving\_avg: string; readonly percentile\_ranks: string; readonly serial\_diff: string; readonly std\_dev: string; readonly sum: string; readonly top\_hits: string; }; readonly runtimeFields: { readonly overview: string; readonly mapping: string; }; readonly scriptedFields: { readonly scriptFields: string; readonly scriptAggs: string; readonly painless: string; readonly painlessApi: string; readonly painlessLangSpec: string; readonly painlessSyntax: string; readonly painlessWalkthrough: string; readonly luceneExpressions: string; }; readonly search: { readonly sessions: string; readonly sessionLimits: string; }; readonly indexPatterns: { readonly introduction: string; readonly fieldFormattersNumber: string; readonly fieldFormattersString: string; readonly runtimeFields: string; }; readonly addData: string; readonly kibana: string; readonly upgradeAssistant: { readonly overview: string; readonly batchReindex: string; readonly remoteReindex: string; }; readonly rollupJobs: string; readonly elasticsearch: Record<string, string>; readonly siem: { readonly privileges: string; readonly guide: string; readonly gettingStarted: string; readonly ml: string; readonly ruleChangeLog: string; readonly detectionsReq: string; readonly networkMap: string; readonly troubleshootGaps: string; }; readonly securitySolution: { readonly trustedApps: string; }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; readonly luceneQuerySyntax: string; readonly percolate: string; readonly queryDsl: string; }; readonly date: { readonly dateMath: string; readonly dateMathIndexNames: string; }; readonly management: Record<string, string>; readonly ml: Record<string, string>; readonly transforms: Record<string, string>; readonly visualize: Record<string, string>; readonly apis: Readonly<{ bulkIndexAlias: string; byteSizeUnits: string; createAutoFollowPattern: string; createFollower: string; createIndex: string; createSnapshotLifecyclePolicy: string; createRoleMapping: string; createRoleMappingTemplates: string; createRollupJobsRequest: string; createApiKey: string; createPipeline: string; createTransformRequest: string; cronExpressions: string; executeWatchActionModes: string; indexExists: string; openIndex: string; putComponentTemplate: string; painlessExecute: string; painlessExecuteAPIContexts: string; putComponentTemplateMetadata: string; putSnapshotLifecyclePolicy: string; putIndexTemplateV1: string; putWatch: string; simulatePipeline: string; timeUnits: string; updateTransform: string; }>; readonly observability: Readonly<{ guide: string; infrastructureThreshold: string; logsThreshold: string; metricsThreshold: string; monitorStatus: string; monitorUptime: string; tlsCertificate: string; uptimeDurationAnomaly: string; }>; readonly alerting: Record<string, string>; readonly maps: Readonly<{ guide: string; importGeospatialPrivileges: string; gdalTutorial: string; }>; readonly monitoring: Record<string, string>; readonly security: Readonly<{ apiKeyServiceSettings: string; clusterPrivileges: string; elasticsearchSettings: string; elasticsearchEnableSecurity: string; elasticsearchEnableApiKeys: string; indicesPrivileges: string; kibanaTLS: string; kibanaPrivileges: string; mappingRoles: string; mappingRolesFieldRules: string; runAsPrivilege: string; }>; readonly spaces: Readonly<{ kibanaLegacyUrlAliases: string; kibanaDisableLegacyUrlAliasesApi: string; }>; readonly watcher: Record<string, string>; readonly ccs: Record<string, string>; readonly plugins: Record<string, string>; readonly snapshotRestore: Record<string, string>; readonly ingest: Record<string, string>; readonly fleet: Readonly<{ beatsAgentComparison: string; guide: string; fleetServer: string; fleetServerAddFleetServer: string; settings: string; settingsFleetServerHostSettings: string; settingsFleetServerProxySettings: string; troubleshooting: string; elasticAgent: string; datastreams: string; datastreamsNamingScheme: string; installElasticAgent: string; installElasticAgentStandalone: string; upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; apiKeysLearnMore: string; onPremRegistry: string; }>; readonly ecs: { readonly guide: string; }; readonly clients: { readonly guide: string; readonly goOverview: string; readonly javaIndex: string; readonly jsIntro: string; readonly netGuide: string; readonly perlGuide: string; readonly phpGuide: string; readonly pythonGuide: string; readonly rubyOverview: string; readonly rustGuide: string; }; readonly endpoints: { readonly troubleshooting: string; }; } | |
diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts
index 7a599e7c84acf..f99f621a52c83 100644
--- a/src/core/public/doc_links/doc_links_service.ts
+++ b/src/core/public/doc_links/doc_links_service.ts
@@ -97,13 +97,11 @@ export class DocLinksService {
indexingDocumentsSchema: `${APP_SEARCH_DOCS}indexing-documents-guide.html#indexing-documents-guide-schema`,
logSettings: `${APP_SEARCH_DOCS}logs.html`,
metaEngines: `${APP_SEARCH_DOCS}meta-engines-guide.html`,
- nativeAuth: `${APP_SEARCH_DOCS}security-and-users.html#app-search-self-managed-security-and-user-management-elasticsearch-native-realm`,
precisionTuning: `${APP_SEARCH_DOCS}precision-tuning.html`,
relevanceTuning: `${APP_SEARCH_DOCS}relevance-tuning-guide.html`,
resultSettings: `${APP_SEARCH_DOCS}result-settings-guide.html`,
searchUI: `${APP_SEARCH_DOCS}reference-ui-guide.html`,
security: `${APP_SEARCH_DOCS}security-and-users.html`,
- standardAuth: `${APP_SEARCH_DOCS}security-and-users.html#app-search-self-managed-security-and-user-management-standard`,
synonyms: `${APP_SEARCH_DOCS}synonyms-guide.html`,
webCrawler: `${APP_SEARCH_DOCS}web-crawler.html`,
webCrawlerEventLogs: `${APP_SEARCH_DOCS}view-web-crawler-events-logs.html`,
@@ -130,7 +128,6 @@ export class DocLinksService {
indexingSchedule: `${WORKPLACE_SEARCH_DOCS}workplace-search-customizing-indexing-rules.html#_indexing_schedule`,
jiraCloud: `${WORKPLACE_SEARCH_DOCS}workplace-search-jira-cloud-connector.html`,
jiraServer: `${WORKPLACE_SEARCH_DOCS}workplace-search-jira-server-connector.html`,
- nativeAuth: `${WORKPLACE_SEARCH_DOCS}workplace-search-security.html#elasticsearch-native-realm`,
oneDrive: `${WORKPLACE_SEARCH_DOCS}workplace-search-onedrive-connector.html`,
permissions: `${WORKPLACE_SEARCH_DOCS}workplace-search-permissions.html#organizational-sources-private-sources`,
salesforce: `${WORKPLACE_SEARCH_DOCS}workplace-search-salesforce-connector.html`,
@@ -138,7 +135,6 @@ export class DocLinksService {
serviceNow: `${WORKPLACE_SEARCH_DOCS}workplace-search-servicenow-connector.html`,
sharePoint: `${WORKPLACE_SEARCH_DOCS}workplace-search-sharepoint-online-connector.html`,
slack: `${WORKPLACE_SEARCH_DOCS}workplace-search-slack-connector.html`,
- standardAuth: `${WORKPLACE_SEARCH_DOCS}workplace-search-security.html#standard`,
synch: `${WORKPLACE_SEARCH_DOCS}workplace-search-customizing-indexing-rules.html`,
zendesk: `${WORKPLACE_SEARCH_DOCS}workplace-search-zendesk-connector.html`,
},
@@ -659,13 +655,11 @@ export interface DocLinksStart {
readonly indexingDocumentsSchema: string;
readonly logSettings: string;
readonly metaEngines: string;
- readonly nativeAuth: string;
readonly precisionTuning: string;
readonly relevanceTuning: string;
readonly resultSettings: string;
readonly searchUI: string;
readonly security: string;
- readonly standardAuth: string;
readonly synonyms: string;
readonly webCrawler: string;
readonly webCrawlerEventLogs: string;
@@ -692,7 +686,6 @@ export interface DocLinksStart {
readonly indexingSchedule: string;
readonly jiraCloud: string;
readonly jiraServer: string;
- readonly nativeAuth: string;
readonly oneDrive: string;
readonly permissions: string;
readonly salesforce: string;
@@ -700,7 +693,6 @@ export interface DocLinksStart {
readonly serviceNow: string;
readonly sharePoint: string;
readonly slack: string;
- readonly standardAuth: string;
readonly synch: string;
readonly zendesk: string;
};
diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md
index cec80af843c4c..9bb65a9dd0b57 100644
--- a/src/core/public/public.api.md
+++ b/src/core/public/public.api.md
@@ -554,13 +554,11 @@ export interface DocLinksStart {
readonly indexingDocumentsSchema: string;
readonly logSettings: string;
readonly metaEngines: string;
- readonly nativeAuth: string;
readonly precisionTuning: string;
readonly relevanceTuning: string;
readonly resultSettings: string;
readonly searchUI: string;
readonly security: string;
- readonly standardAuth: string;
readonly synonyms: string;
readonly webCrawler: string;
readonly webCrawlerEventLogs: string;
@@ -587,7 +585,6 @@ export interface DocLinksStart {
readonly indexingSchedule: string;
readonly jiraCloud: string;
readonly jiraServer: string;
- readonly nativeAuth: string;
readonly oneDrive: string;
readonly permissions: string;
readonly salesforce: string;
@@ -595,7 +592,6 @@ export interface DocLinksStart {
readonly serviceNow: string;
readonly sharePoint: string;
readonly slack: string;
- readonly standardAuth: string;
readonly synch: string;
readonly zendesk: string;
};
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/setup_guide/setup_guide.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/setup_guide/setup_guide.tsx
index f1d9beaca5136..1cf1cf8a0d5bd 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/setup_guide/setup_guide.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/setup_guide/setup_guide.tsx
@@ -15,17 +15,11 @@ import { APP_SEARCH_PLUGIN } from '../../../../../common/constants';
import { SetAppSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
import { SetupGuideLayout, SETUP_GUIDE_TITLE } from '../../../shared/setup_guide';
import { SendAppSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
-import { NATIVE_AUTH_DOCS_URL, STANDARD_AUTH_DOCS_URL } from '../../routes';
import GettingStarted from './assets/getting_started.png';
export const SetupGuide: React.FC = () => (
-
+
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts
index 1f2e7c883e1cb..1a41004c882e3 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts
@@ -20,13 +20,11 @@ export const INDEXING_DOCS_URL = docLinks.appSearchIndexingDocs;
export const INDEXING_SCHEMA_DOCS_URL = docLinks.appSearchIndexingDocsSchema;
export const LOG_SETTINGS_DOCS_URL = docLinks.appSearchLogSettings;
export const META_ENGINES_DOCS_URL = docLinks.appSearchMetaEngines;
-export const NATIVE_AUTH_DOCS_URL = docLinks.appSearchNativeAuth;
export const PRECISION_DOCS_URL = docLinks.appSearchPrecision;
export const RELEVANCE_DOCS_URL = docLinks.appSearchRelevance;
export const RESULT_SETTINGS_DOCS_URL = docLinks.appSearchResultSettings;
export const SEARCH_UI_DOCS_URL = docLinks.appSearchSearchUI;
export const SECURITY_DOCS_URL = docLinks.appSearchSecurity;
-export const STANDARD_AUTH_DOCS_URL = docLinks.appSearchStandardAuth;
export const SYNONYMS_DOCS_URL = docLinks.appSearchSynonyms;
export const WEB_CRAWLER_DOCS_URL = docLinks.appSearchWebCrawler;
export const WEB_CRAWLER_LOG_DOCS_URL = docLinks.appSearchWebCrawlerEventLogs;
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/setup_guide/setup_guide.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/setup_guide/setup_guide.tsx
index c7c85fdd49359..1a25d1a7a8d1e 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/setup_guide/setup_guide.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/setup_guide/setup_guide.tsx
@@ -12,7 +12,6 @@ import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import { ENTERPRISE_SEARCH_PLUGIN } from '../../../../../common/constants';
-import { NATIVE_AUTH_DOCS_URL, STANDARD_AUTH_DOCS_URL } from '../../../app_search/routes';
import { SetEnterpriseSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
import { SetupGuideLayout, SETUP_GUIDE_TITLE } from '../../../shared/setup_guide';
import { SendEnterpriseSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
@@ -23,8 +22,6 @@ export const SetupGuide: React.FC = () => (
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts
index 93bead4d31f4c..8cd5b86314a2c 100644
--- a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts
@@ -21,13 +21,11 @@ class DocLinks {
public appSearchIndexingDocsSchema: string;
public appSearchLogSettings: string;
public appSearchMetaEngines: string;
- public appSearchNativeAuth: string;
public appSearchPrecision: string;
public appSearchRelevance: string;
public appSearchResultSettings: string;
public appSearchSearchUI: string;
public appSearchSecurity: string;
- public appSearchStandardAuth: string;
public appSearchSynonyms: string;
public appSearchWebCrawler: string;
public appSearchWebCrawlerEventLogs: string;
@@ -51,7 +49,6 @@ class DocLinks {
public workplaceSearchIndexingSchedule: string;
public workplaceSearchJiraCloud: string;
public workplaceSearchJiraServer: string;
- public workplaceSearchNativeAuth: string;
public workplaceSearchOneDrive: string;
public workplaceSearchPermissions: string;
public workplaceSearchSalesforce: string;
@@ -59,7 +56,6 @@ class DocLinks {
public workplaceSearchServiceNow: string;
public workplaceSearchSharePoint: string;
public workplaceSearchSlack: string;
- public workplaceSearchStandardAuth: string;
public workplaceSearchSynch: string;
public workplaceSearchZendesk: string;
@@ -77,13 +73,11 @@ class DocLinks {
this.appSearchIndexingDocsSchema = '';
this.appSearchLogSettings = '';
this.appSearchMetaEngines = '';
- this.appSearchNativeAuth = '';
this.appSearchPrecision = '';
this.appSearchRelevance = '';
this.appSearchResultSettings = '';
this.appSearchSearchUI = '';
this.appSearchSecurity = '';
- this.appSearchStandardAuth = '';
this.appSearchSynonyms = '';
this.appSearchWebCrawler = '';
this.appSearchWebCrawlerEventLogs = '';
@@ -107,7 +101,6 @@ class DocLinks {
this.workplaceSearchIndexingSchedule = '';
this.workplaceSearchJiraCloud = '';
this.workplaceSearchJiraServer = '';
- this.workplaceSearchNativeAuth = '';
this.workplaceSearchOneDrive = '';
this.workplaceSearchPermissions = '';
this.workplaceSearchSalesforce = '';
@@ -115,7 +108,6 @@ class DocLinks {
this.workplaceSearchServiceNow = '';
this.workplaceSearchSharePoint = '';
this.workplaceSearchSlack = '';
- this.workplaceSearchStandardAuth = '';
this.workplaceSearchSynch = '';
this.workplaceSearchZendesk = '';
}
@@ -134,13 +126,11 @@ class DocLinks {
this.appSearchIndexingDocsSchema = docLinks.links.appSearch.indexingDocumentsSchema;
this.appSearchLogSettings = docLinks.links.appSearch.logSettings;
this.appSearchMetaEngines = docLinks.links.appSearch.metaEngines;
- this.appSearchNativeAuth = docLinks.links.appSearch.nativeAuth;
this.appSearchPrecision = docLinks.links.appSearch.precisionTuning;
this.appSearchRelevance = docLinks.links.appSearch.relevanceTuning;
this.appSearchResultSettings = docLinks.links.appSearch.resultSettings;
this.appSearchSearchUI = docLinks.links.appSearch.searchUI;
this.appSearchSecurity = docLinks.links.appSearch.security;
- this.appSearchStandardAuth = docLinks.links.appSearch.standardAuth;
this.appSearchSynonyms = docLinks.links.appSearch.synonyms;
this.appSearchWebCrawler = docLinks.links.appSearch.webCrawler;
this.appSearchWebCrawlerEventLogs = docLinks.links.appSearch.webCrawlerEventLogs;
@@ -165,7 +155,6 @@ class DocLinks {
this.workplaceSearchIndexingSchedule = docLinks.links.workplaceSearch.indexingSchedule;
this.workplaceSearchJiraCloud = docLinks.links.workplaceSearch.jiraCloud;
this.workplaceSearchJiraServer = docLinks.links.workplaceSearch.jiraServer;
- this.workplaceSearchNativeAuth = docLinks.links.workplaceSearch.nativeAuth;
this.workplaceSearchOneDrive = docLinks.links.workplaceSearch.oneDrive;
this.workplaceSearchPermissions = docLinks.links.workplaceSearch.permissions;
this.workplaceSearchSalesforce = docLinks.links.workplaceSearch.salesforce;
@@ -173,7 +162,6 @@ class DocLinks {
this.workplaceSearchServiceNow = docLinks.links.workplaceSearch.serviceNow;
this.workplaceSearchSharePoint = docLinks.links.workplaceSearch.sharePoint;
this.workplaceSearchSlack = docLinks.links.workplaceSearch.slack;
- this.workplaceSearchStandardAuth = docLinks.links.workplaceSearch.standardAuth;
this.workplaceSearchSynch = docLinks.links.workplaceSearch.synch;
this.workplaceSearchZendesk = docLinks.links.workplaceSearch.zendesk;
}
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/setup_guide/instructions.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/setup_guide/instructions.test.tsx
index 9f65e6b599a98..e162b126c0679 100644
--- a/x-pack/plugins/enterprise_search/public/applications/shared/setup_guide/instructions.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/setup_guide/instructions.test.tsx
@@ -9,9 +9,7 @@ import React from 'react';
import { shallow } from 'enzyme';
-import { EuiSteps, EuiLink } from '@elastic/eui';
-
-import { mountWithIntl } from '../../test_helpers';
+import { EuiSteps } from '@elastic/eui';
import { SetupInstructions } from './instructions';
@@ -20,17 +18,4 @@ describe('SetupInstructions', () => {
const wrapper = shallow();
expect(wrapper.find(EuiSteps)).toHaveLength(1);
});
-
- it('renders with auth links', () => {
- const wrapper = mountWithIntl(
-
- );
-
- expect(wrapper.find(EuiLink).first().prop('href')).toEqual('http://bar.com');
- expect(wrapper.find(EuiLink).last().prop('href')).toEqual('http://foo.com');
- });
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/setup_guide/instructions.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/setup_guide/instructions.tsx
index aa8bbd6970f86..4fc12f62305fa 100644
--- a/x-pack/plugins/enterprise_search/public/applications/shared/setup_guide/instructions.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/setup_guide/instructions.tsx
@@ -9,28 +9,20 @@ import React from 'react';
import {
EuiPageContent,
- EuiSpacer,
EuiText,
EuiSteps,
EuiCode,
EuiCodeBlock,
EuiAccordion,
- EuiLink,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
interface Props {
productName: string;
- standardAuthLink?: string;
- elasticsearchNativeAuthLink?: string;
}
-export const SetupInstructions: React.FC = ({
- productName,
- standardAuthLink,
- elasticsearchNativeAuthLink,
-}) => (
+export const SetupInstructions: React.FC = ({ productName }) => (
= ({
defaultMessage="Restart Kibana to pick up the configuration changes from the previous step."
/>
-
-
- Elasticsearch Native Auth
-
- ) : (
- 'Elasticsearch Native Auth'
- ),
- }}
- />
-
),
},
@@ -118,60 +94,6 @@ export const SetupInstructions: React.FC = ({
-
-
-
-
-
-
-
-
-
-
-
-
-
- Standard Auth
-
- ) : (
- 'Standard Auth'
- ),
- }}
- />
-
-
-
>
),
},
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/setup_guide/setup_guide.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/setup_guide/setup_guide.tsx
index d041f1b294e7a..4314dc1465f94 100644
--- a/x-pack/plugins/enterprise_search/public/applications/shared/setup_guide/setup_guide.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/setup_guide/setup_guide.tsx
@@ -37,17 +37,9 @@ interface Props {
children: React.ReactNode;
productName: string;
productEuiIcon: 'logoAppSearch' | 'logoWorkplaceSearch' | 'logoEnterpriseSearch';
- standardAuthLink?: string;
- elasticsearchNativeAuthLink?: string;
}
-export const SetupGuideLayout: React.FC = ({
- children,
- productName,
- productEuiIcon,
- standardAuthLink,
- elasticsearchNativeAuthLink,
-}) => {
+export const SetupGuideLayout: React.FC = ({ children, productName, productEuiIcon }) => {
const { cloud } = useValues(KibanaLogic);
const isCloudEnabled = Boolean(cloud.isCloudEnabled);
const cloudDeploymentLink = cloud.deploymentUrl || '';
@@ -81,11 +73,7 @@ export const SetupGuideLayout: React.FC = ({
cloudDeploymentLink={cloudDeploymentLink}
/>
) : (
-
+
)}
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/routes.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/routes.ts
index b28343f37ea25..5f3c79f9432e7 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/routes.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/routes.ts
@@ -35,7 +35,6 @@ export const GMAIL_DOCS_URL = docLinks.workplaceSearchGmail;
export const GOOGLE_DRIVE_DOCS_URL = docLinks.workplaceSearchGoogleDrive;
export const JIRA_DOCS_URL = docLinks.workplaceSearchJiraCloud;
export const JIRA_SERVER_DOCS_URL = docLinks.workplaceSearchJiraServer;
-export const NATIVE_AUTH_DOCS_URL = docLinks.workplaceSearchNativeAuth;
export const OBJECTS_AND_ASSETS_DOCS_URL = docLinks.workplaceSearchSynch;
export const ONEDRIVE_DOCS_URL = docLinks.workplaceSearchOneDrive;
export const PRIVATE_SOURCES_DOCS_URL = docLinks.workplaceSearchPermissions;
@@ -44,7 +43,6 @@ export const SECURITY_DOCS_URL = docLinks.workplaceSearchSecurity;
export const SERVICENOW_DOCS_URL = docLinks.workplaceSearchServiceNow;
export const SHAREPOINT_DOCS_URL = docLinks.workplaceSearchSharePoint;
export const SLACK_DOCS_URL = docLinks.workplaceSearchSlack;
-export const STANDARD_AUTH_DOCS_URL = docLinks.workplaceSearchStandardAuth;
export const SYNCHRONIZATION_DOCS_URL = docLinks.workplaceSearchSynch;
export const ZENDESK_DOCS_URL = docLinks.workplaceSearchZendesk;
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/setup_guide/setup_guide.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/setup_guide/setup_guide.tsx
index e52a174850c4c..009dbffafebd8 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/setup_guide/setup_guide.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/setup_guide/setup_guide.tsx
@@ -15,11 +15,7 @@ import { WORKPLACE_SEARCH_PLUGIN } from '../../../../../common/constants';
import { SetWorkplaceSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
import { SetupGuideLayout, SETUP_GUIDE_TITLE } from '../../../shared/setup_guide';
import { SendWorkplaceSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
-import {
- GETTING_STARTED_DOCS_URL,
- NATIVE_AUTH_DOCS_URL,
- STANDARD_AUTH_DOCS_URL,
-} from '../../routes';
+import { GETTING_STARTED_DOCS_URL } from '../../routes';
import GettingStarted from './assets/getting_started.png';
@@ -30,8 +26,6 @@ export const SetupGuide: React.FC = () => {
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index 409caee7d4b4b..76d3f07facf05 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -9354,19 +9354,14 @@
"xpack.enterpriseSearch.setupGuide.step1.instruction1": "{configFile} ファイルで、{configSetting} を {productName} インスタンスの URL に設定します。例:",
"xpack.enterpriseSearch.setupGuide.step1.title": "{productName}ホストURLをKibana構成に追加",
"xpack.enterpriseSearch.setupGuide.step2.instruction1": "Kibanaを再起動して、前のステップから構成変更を取得します。",
- "xpack.enterpriseSearch.setupGuide.step2.instruction2": "{productName}で{elasticsearchNativeAuthLink}を使用している場合は、すべて設定済みです。ユーザーは、現在の{productName}アクセスおよび権限を使用して、Kibanaで{productName}にアクセスできます。",
"xpack.enterpriseSearch.setupGuide.step2.title": "Kibanaインスタンスの再読み込み",
"xpack.enterpriseSearch.setupGuide.step3.title": "トラブルシューティングのヒント",
"xpack.enterpriseSearch.setupGuide.title": "セットアップガイド",
"xpack.enterpriseSearch.shared.flashMessages.defaultErrorMessage": "予期しないエラーが発生しました",
"xpack.enterpriseSearch.shared.unsavedChangesMessage": "変更は保存されていません。終了してよろしいですか?",
"xpack.enterpriseSearch.trialCalloutLink": "Elastic Stackライセンスの詳細を参照してください。",
- "xpack.enterpriseSearch.troubleshooting.differentAuth.description": "このプラグインは現在、異なる認証方法で運用されている{productName}およびKibanaをサポートしています。たとえば、Kibana以外のSAMLプロバイダーを使用している{productName}はサポートされません。",
- "xpack.enterpriseSearch.troubleshooting.differentAuth.title": "{productName}とKibanaは別の認証方法を使用しています",
"xpack.enterpriseSearch.troubleshooting.differentEsClusters.description": "このプラグインは現在、異なるクラスターで実行されている{productName}とKibanaをサポートしていません。",
"xpack.enterpriseSearch.troubleshooting.differentEsClusters.title": "{productName}とKibanaは別のElasticsearchクラスターにあります",
- "xpack.enterpriseSearch.troubleshooting.standardAuth.description": "このプラグインは、{standardAuthLink}の{productName}を完全にはサポートしていません。{productName}で作成されたユーザーはKibanaアクセス権が必要です。Kibanaで作成されたユーザーは、ナビゲーションメニューに{productName}が表示されません。",
- "xpack.enterpriseSearch.troubleshooting.standardAuth.title": "標準認証の{productName}はサポートされていません",
"xpack.enterpriseSearch.units.allDaysLabel": "すべての日",
"xpack.enterpriseSearch.units.daysLabel": "日",
"xpack.enterpriseSearch.units.daysOfWeekLabel.friday": "金曜日",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index cf24a857c9723..01997e32f243e 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -9440,7 +9440,6 @@
"xpack.enterpriseSearch.setupGuide.step1.instruction1": "在 {configFile} 文件中,将 {configSetting} 设置为 {productName} 实例的 URL。例如:",
"xpack.enterpriseSearch.setupGuide.step1.title": "将 {productName} 主机 URL 添加到 Kibana 配置",
"xpack.enterpriseSearch.setupGuide.step2.instruction1": "重新启动 Kibana 以应用上一步骤中的配置更改。",
- "xpack.enterpriseSearch.setupGuide.step2.instruction2": "如果正在 {productName} 中使用 {elasticsearchNativeAuthLink},则全部就绪。您的用户现在可以使用自己当前的 {productName} 访问权限在 Kibana 中访问 {productName}。",
"xpack.enterpriseSearch.setupGuide.step2.title": "重新加载 Kibana 实例",
"xpack.enterpriseSearch.setupGuide.step3.title": "解决问题",
"xpack.enterpriseSearch.setupGuide.title": "设置指南",
@@ -9448,12 +9447,8 @@
"xpack.enterpriseSearch.shared.unsavedChangesMessage": "您的更改尚未更改。是否确定要离开?",
"xpack.enterpriseSearch.trialCalloutLink": "详细了解 Elastic Stack 许可证。",
"xpack.enterpriseSearch.trialCalloutTitle": "您的可启用白金级功能的 Elastic Stack 试用版许可证将 {days, plural, other {# 天}}后过期。",
- "xpack.enterpriseSearch.troubleshooting.differentAuth.description": "此插件当前不支持使用不同身份验证方法的 {productName} 和 Kibana,例如 {productName} 使用与 Kibana 不同的 SAML 提供程序。",
- "xpack.enterpriseSearch.troubleshooting.differentAuth.title": "{productName} 和 Kibana 使用不同的身份验证方法",
"xpack.enterpriseSearch.troubleshooting.differentEsClusters.description": "此插件当前不支持在不同集群中运行的 {productName} 和 Kibana。",
"xpack.enterpriseSearch.troubleshooting.differentEsClusters.title": "{productName} 和 Kibana 在不同的 Elasticsearch 集群中",
- "xpack.enterpriseSearch.troubleshooting.standardAuth.description": "此插件不完全支持使用 {standardAuthLink} 的 {productName}。{productName} 中创建的用户必须具有 Kibana 访问权限。Kibana 中创建的用户在导航菜单中将看不到 {productName}。",
- "xpack.enterpriseSearch.troubleshooting.standardAuth.title": "不支持使用标准身份验证的 {productName}",
"xpack.enterpriseSearch.units.allDaysLabel": "所有日期",
"xpack.enterpriseSearch.units.daysLabel": "天",
"xpack.enterpriseSearch.units.daysOfWeekLabel.friday": "星期五",
From 3360b6a53c836d138d588ef4f96012a6cb9b7171 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cau=C3=AA=20Marcondes?=
<55978943+cauemarcondes@users.noreply.github.com>
Date: Thu, 2 Dec 2021 13:55:50 -0500
Subject: [PATCH 11/65] [APM] Service maps: Add sparklines to the detail
popover (#120021)
* adding error rate and latency timeseries
* adding sparklines
* fixing ui
* fixing spaces
* adjusting error color
* fixing api tests
* deleting unnecessary test
* changing loading spinner
* addressing pr comments
* fixing ci
---
x-pack/plugins/apm/common/service_map.ts | 28 +-
.../service_map/Popover/backend_contents.tsx | 3 +-
.../app/service_map/Popover/index.tsx | 2 +-
.../service_map/Popover/service_contents.tsx | 8 +-
.../app/service_map/Popover/stats_list.tsx | 196 ++++----
.../app/service_map/cytoscape_options.ts | 2 +-
.../server/lib/helpers/transactions/index.ts | 2 +-
.../lib/transaction_groups/get_error_rate.ts | 3 +
.../get_transaction_group_stats.ts | 10 +-
.../chart_preview/get_transaction_duration.ts | 4 +-
...egister_transaction_duration_alert_type.ts | 4 +-
.../get_service_map_backend_node_info.ts | 91 +++-
.../get_service_map_service_node_info.test.ts | 96 ----
.../get_service_map_service_node_info.ts | 161 +++++--
...ervice_instances_transaction_statistics.ts | 6 +-
...e_transaction_group_detailed_statistics.ts | 6 +-
.../get_service_transaction_groups.ts | 6 +-
.../get_service_transaction_stats.ts | 6 +-
...service_transaction_detailed_statistics.ts | 6 +-
.../transactions/get_latency_charts/index.ts | 4 +-
.../tests/service_maps/service_maps.spec.ts | 439 ++++++++++--------
21 files changed, 615 insertions(+), 468 deletions(-)
delete mode 100644 x-pack/plugins/apm/server/routes/service_map/get_service_map_service_node_info.test.ts
diff --git a/x-pack/plugins/apm/common/service_map.ts b/x-pack/plugins/apm/common/service_map.ts
index b8e6922414ebf..d10785d614cd3 100644
--- a/x-pack/plugins/apm/common/service_map.ts
+++ b/x-pack/plugins/apm/common/service_map.ts
@@ -7,6 +7,7 @@
import { i18n } from '@kbn/i18n';
import cytoscape from 'cytoscape';
+import { Coordinate } from '../typings/timeseries';
import { ServiceAnomalyStats } from './anomaly_detection';
// These should be imported, but until TypeScript 4.2 we're inlining them here.
@@ -59,13 +60,28 @@ export interface Connection {
}
export interface NodeStats {
- avgMemoryUsage?: number | null;
- avgCpuUsage?: number | null;
- transactionStats: {
- avgTransactionDuration: number | null;
- avgRequestsPerMinute: number | null;
+ transactionStats?: {
+ latency?: {
+ value: number | null;
+ timeseries?: Coordinate[];
+ };
+ throughput?: {
+ value: number | null;
+ timeseries?: Coordinate[];
+ };
+ };
+ failedTransactionsRate?: {
+ value: number | null;
+ timeseries?: Coordinate[];
+ };
+ cpuUsage?: {
+ value?: number | null;
+ timeseries?: Coordinate[];
+ };
+ memoryUsage?: {
+ value?: number | null;
+ timeseries?: Coordinate[];
};
- avgErrorRate: number | null;
}
export const invalidLicenseMessage = i18n.translate(
diff --git a/x-pack/plugins/apm/public/components/app/service_map/Popover/backend_contents.tsx b/x-pack/plugins/apm/public/components/app/service_map/Popover/backend_contents.tsx
index 6b9954465f39d..b61b225c2fe94 100644
--- a/x-pack/plugins/apm/public/components/app/service_map/Popover/backend_contents.tsx
+++ b/x-pack/plugins/apm/public/components/app/service_map/Popover/backend_contents.tsx
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { EuiButton, EuiFlexItem } from '@elastic/eui';
+import { EuiButton, EuiFlexItem, EuiSpacer } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { TypeOf } from '@kbn/typed-react-router-config';
import { METRIC_TYPE } from '@kbn/analytics';
@@ -73,6 +73,7 @@ export function BackendContents({
+
{/* eslint-disable-next-line @elastic/eui/href-or-on-click*/}
diff --git a/x-pack/plugins/apm/public/components/app/service_map/Popover/service_contents.tsx b/x-pack/plugins/apm/public/components/app/service_map/Popover/service_contents.tsx
index 5c41a1b4db7e6..10d558e648376 100644
--- a/x-pack/plugins/apm/public/components/app/service_map/Popover/service_contents.tsx
+++ b/x-pack/plugins/apm/public/components/app/service_map/Popover/service_contents.tsx
@@ -7,7 +7,12 @@
/* eslint-disable @elastic/eui/href-or-on-click */
-import { EuiButton, EuiFlexItem, EuiHorizontalRule } from '@elastic/eui';
+import {
+ EuiButton,
+ EuiFlexItem,
+ EuiHorizontalRule,
+ EuiSpacer,
+} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import { useApmParams } from '../../../../hooks/use_apm_params';
@@ -89,6 +94,7 @@ export function ServiceContents({
)}
+
{i18n.translate('xpack.apm.serviceMap.serviceDetailsButtonText', {
diff --git a/x-pack/plugins/apm/public/components/app/service_map/Popover/stats_list.tsx b/x-pack/plugins/apm/public/components/app/service_map/Popover/stats_list.tsx
index b46b7a0986179..002c480503454 100644
--- a/x-pack/plugins/apm/public/components/app/service_map/Popover/stats_list.tsx
+++ b/x-pack/plugins/apm/public/components/app/service_map/Popover/stats_list.tsx
@@ -5,30 +5,23 @@
* 2.0.
*/
-import { EuiFlexGroup, EuiLoadingSpinner, EuiText } from '@elastic/eui';
+import {
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiLoadingChart,
+ EuiText,
+} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { isNumber } from 'lodash';
-import React from 'react';
-import { euiStyled } from '../../../../../../../../src/plugins/kibana_react/common';
+import React, { useMemo } from 'react';
import { NodeStats } from '../../../../../common/service_map';
import {
asDuration,
asPercent,
asTransactionRate,
} from '../../../../../common/utils/formatters';
-
-export const ItemRow = euiStyled.tr`
- line-height: 2;
-`;
-
-export const ItemTitle = euiStyled.td`
- color: ${({ theme }) => theme.eui.euiTextSubduedColor};
- padding-right: 1rem;
-`;
-
-export const ItemDescription = euiStyled.td`
- text-align: right;
-`;
+import { Coordinate } from '../../../../../typings/timeseries';
+import { SparkPlot, Color } from '../../../shared/charts/spark_plot';
function LoadingSpinner() {
return (
@@ -37,7 +30,7 @@ function LoadingSpinner() {
justifyContent="spaceAround"
style={{ height: 170 }}
>
-
+
);
}
@@ -57,22 +50,82 @@ interface StatsListProps {
data: NodeStats;
}
+interface Item {
+ title: string;
+ valueLabel: string | null;
+ timeseries?: Coordinate[];
+ color: Color;
+}
+
export function StatsList({ data, isLoading }: StatsListProps) {
- const {
- avgCpuUsage,
- avgErrorRate,
- avgMemoryUsage,
- transactionStats: { avgRequestsPerMinute, avgTransactionDuration },
- } = data;
+ const { cpuUsage, failedTransactionsRate, memoryUsage, transactionStats } =
+ data;
const hasData = [
- avgCpuUsage,
- avgErrorRate,
- avgMemoryUsage,
- avgRequestsPerMinute,
- avgTransactionDuration,
+ cpuUsage?.value,
+ failedTransactionsRate?.value,
+ memoryUsage?.value,
+ transactionStats?.throughput?.value,
+ transactionStats?.latency?.value,
].some((stat) => isNumber(stat));
+ const items: Item[] = useMemo(
+ () => [
+ {
+ title: i18n.translate(
+ 'xpack.apm.serviceMap.avgTransDurationPopoverStat',
+ {
+ defaultMessage: 'Latency (avg.)',
+ }
+ ),
+ valueLabel: isNumber(transactionStats?.latency?.value)
+ ? asDuration(transactionStats?.latency?.value)
+ : null,
+ timeseries: transactionStats?.latency?.timeseries,
+ color: 'euiColorVis1',
+ },
+ {
+ title: i18n.translate(
+ 'xpack.apm.serviceMap.avgReqPerMinutePopoverMetric',
+ {
+ defaultMessage: 'Throughput (avg.)',
+ }
+ ),
+ valueLabel: asTransactionRate(transactionStats?.throughput?.value),
+ timeseries: transactionStats?.throughput?.timeseries,
+ color: 'euiColorVis0',
+ },
+ {
+ title: i18n.translate('xpack.apm.serviceMap.errorRatePopoverStat', {
+ defaultMessage: 'Failed transaction rate (avg.)',
+ }),
+ valueLabel: asPercent(failedTransactionsRate?.value, 1, ''),
+ timeseries: failedTransactionsRate?.timeseries,
+ color: 'euiColorVis7',
+ },
+ {
+ title: i18n.translate('xpack.apm.serviceMap.avgCpuUsagePopoverStat', {
+ defaultMessage: 'CPU usage (avg.)',
+ }),
+ valueLabel: asPercent(cpuUsage?.value, 1, ''),
+ timeseries: cpuUsage?.timeseries,
+ color: 'euiColorVis3',
+ },
+ {
+ title: i18n.translate(
+ 'xpack.apm.serviceMap.avgMemoryUsagePopoverStat',
+ {
+ defaultMessage: 'Memory usage (avg.)',
+ }
+ ),
+ valueLabel: asPercent(memoryUsage?.value, 1, ''),
+ timeseries: memoryUsage?.timeseries,
+ color: 'euiColorVis8',
+ },
+ ],
+ [cpuUsage, failedTransactionsRate, memoryUsage, transactionStats]
+ );
+
if (isLoading) {
return ;
}
@@ -81,59 +134,40 @@ export function StatsList({ data, isLoading }: StatsListProps) {
return ;
}
- const items = [
- {
- title: i18n.translate(
- 'xpack.apm.serviceMap.avgTransDurationPopoverStat',
- {
- defaultMessage: 'Latency (avg.)',
- }
- ),
- description: isNumber(avgTransactionDuration)
- ? asDuration(avgTransactionDuration)
- : null,
- },
- {
- title: i18n.translate(
- 'xpack.apm.serviceMap.avgReqPerMinutePopoverMetric',
- {
- defaultMessage: 'Throughput (avg.)',
- }
- ),
- description: asTransactionRate(avgRequestsPerMinute),
- },
- {
- title: i18n.translate('xpack.apm.serviceMap.errorRatePopoverStat', {
- defaultMessage: 'Failed transaction rate (avg.)',
- }),
- description: asPercent(avgErrorRate, 1, ''),
- },
- {
- title: i18n.translate('xpack.apm.serviceMap.avgCpuUsagePopoverStat', {
- defaultMessage: 'CPU usage (avg.)',
- }),
- description: asPercent(avgCpuUsage, 1, ''),
- },
- {
- title: i18n.translate('xpack.apm.serviceMap.avgMemoryUsagePopoverStat', {
- defaultMessage: 'Memory usage (avg.)',
- }),
- description: asPercent(avgMemoryUsage, 1, ''),
- },
- ];
-
return (
-
-
- {items.map(({ title, description }) => {
- return description ? (
-
- {title}
- {description}
-
- ) : null;
- })}
-
-
+
+ {items.map(({ title, valueLabel, timeseries, color }) => {
+ if (!valueLabel) {
+ return null;
+ }
+ return (
+
+
+
+
+ {title}
+
+
+
+ {timeseries ? (
+
+ ) : (
+ {valueLabel}
+ )}
+
+
+
+ );
+ })}
+
);
}
diff --git a/x-pack/plugins/apm/public/components/app/service_map/cytoscape_options.ts b/x-pack/plugins/apm/public/components/app/service_map/cytoscape_options.ts
index 1e2386c8743fe..e137f2dbb0f78 100644
--- a/x-pack/plugins/apm/public/components/app/service_map/cytoscape_options.ts
+++ b/x-pack/plugins/apm/public/components/app/service_map/cytoscape_options.ts
@@ -20,7 +20,7 @@ import {
import { FETCH_STATUS } from '../../../hooks/use_fetcher';
import { iconForNode } from './icons';
-export const popoverWidth = 280;
+export const popoverWidth = 350;
function getServiceAnomalyStats(el: cytoscape.NodeSingular) {
const serviceAnomalyStats: ServiceAnomalyStats | undefined = el.data(
diff --git a/x-pack/plugins/apm/server/lib/helpers/transactions/index.ts b/x-pack/plugins/apm/server/lib/helpers/transactions/index.ts
index edaae8cadc1d5..577a7544d93ea 100644
--- a/x-pack/plugins/apm/server/lib/helpers/transactions/index.ts
+++ b/x-pack/plugins/apm/server/lib/helpers/transactions/index.ts
@@ -82,7 +82,7 @@ export async function getSearchAggregatedTransactions({
}
}
-export function getTransactionDurationFieldForTransactions(
+export function getDurationFieldForTransactions(
searchAggregatedTransactions: boolean
) {
return searchAggregatedTransactions
diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/get_error_rate.ts b/x-pack/plugins/apm/server/lib/transaction_groups/get_error_rate.ts
index 328d2da0f6df0..e1dde61bfc3ff 100644
--- a/x-pack/plugins/apm/server/lib/transaction_groups/get_error_rate.ts
+++ b/x-pack/plugins/apm/server/lib/transaction_groups/get_error_rate.ts
@@ -42,6 +42,7 @@ export async function getErrorRate({
searchAggregatedTransactions,
start,
end,
+ numBuckets,
}: {
environment: string;
kuery: string;
@@ -52,6 +53,7 @@ export async function getErrorRate({
searchAggregatedTransactions: boolean;
start: number;
end: number;
+ numBuckets?: number;
}): Promise<{
timeseries: Coordinate[];
average: number | null;
@@ -91,6 +93,7 @@ export async function getErrorRate({
start,
end,
searchAggregatedTransactions,
+ numBuckets,
}).intervalString,
min_doc_count: 0,
extended_bounds: { min: start, max: end },
diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/get_transaction_group_stats.ts b/x-pack/plugins/apm/server/lib/transaction_groups/get_transaction_group_stats.ts
index fd638a6731c63..04cee211c78db 100644
--- a/x-pack/plugins/apm/server/lib/transaction_groups/get_transaction_group_stats.ts
+++ b/x-pack/plugins/apm/server/lib/transaction_groups/get_transaction_group_stats.ts
@@ -13,7 +13,7 @@ import {
} from '../../../common/elasticsearch_fieldnames';
import { arrayUnionToCallable } from '../../../common/utils/array_union_to_callable';
import { TransactionGroupRequestBase, TransactionGroupSetup } from './fetcher';
-import { getTransactionDurationFieldForTransactions } from '../helpers/transactions';
+import { getDurationFieldForTransactions } from '../helpers/transactions';
import { AgentName } from '../../../typings/es_schemas/ui/fields/agent';
interface MetricParams {
request: TransactionGroupRequestBase;
@@ -49,9 +49,7 @@ export async function getAverages({
const params = mergeRequestWithAggs(request, {
avg: {
avg: {
- field: getTransactionDurationFieldForTransactions(
- searchAggregatedTransactions
- ),
+ field: getDurationFieldForTransactions(searchAggregatedTransactions),
},
},
});
@@ -119,9 +117,7 @@ export async function getSums({
const params = mergeRequestWithAggs(request, {
sum: {
sum: {
- field: getTransactionDurationFieldForTransactions(
- searchAggregatedTransactions
- ),
+ field: getDurationFieldForTransactions(searchAggregatedTransactions),
},
},
});
diff --git a/x-pack/plugins/apm/server/routes/alerts/chart_preview/get_transaction_duration.ts b/x-pack/plugins/apm/server/routes/alerts/chart_preview/get_transaction_duration.ts
index 0338f78a0a892..6b5fb0c5fb1b4 100644
--- a/x-pack/plugins/apm/server/routes/alerts/chart_preview/get_transaction_duration.ts
+++ b/x-pack/plugins/apm/server/routes/alerts/chart_preview/get_transaction_duration.ts
@@ -16,7 +16,7 @@ import { AlertParams } from '../route';
import {
getSearchAggregatedTransactions,
getDocumentTypeFilterForTransactions,
- getTransactionDurationFieldForTransactions,
+ getDurationFieldForTransactions,
getProcessorEventForTransactions,
} from '../../../lib/helpers/transactions';
import { Setup } from '../../../lib/helpers/setup_request';
@@ -55,7 +55,7 @@ export async function getTransactionDurationChartPreview({
},
};
- const transactionDurationField = getTransactionDurationFieldForTransactions(
+ const transactionDurationField = getDurationFieldForTransactions(
searchAggregatedTransactions
);
diff --git a/x-pack/plugins/apm/server/routes/alerts/register_transaction_duration_alert_type.ts b/x-pack/plugins/apm/server/routes/alerts/register_transaction_duration_alert_type.ts
index 1e39b02655ada..7ad78cdff9545 100644
--- a/x-pack/plugins/apm/server/routes/alerts/register_transaction_duration_alert_type.ts
+++ b/x-pack/plugins/apm/server/routes/alerts/register_transaction_duration_alert_type.ts
@@ -36,7 +36,7 @@ import { environmentQuery } from '../../../common/utils/environment_query';
import { getDurationFormatter } from '../../../common/utils/formatters';
import {
getDocumentTypeFilterForTransactions,
- getTransactionDurationFieldForTransactions,
+ getDurationFieldForTransactions,
} from '../../lib/helpers/transactions';
import { getApmIndices } from '../../routes/settings/apm_indices/get_apm_indices';
import { apmActionVariables } from './action_variables';
@@ -110,7 +110,7 @@ export function registerTransactionDurationAlertType({
? indices.metric
: indices.transaction;
- const field = getTransactionDurationFieldForTransactions(
+ const field = getDurationFieldForTransactions(
searchAggregatedTransactions
);
diff --git a/x-pack/plugins/apm/server/routes/service_map/get_service_map_backend_node_info.ts b/x-pack/plugins/apm/server/routes/service_map/get_service_map_backend_node_info.ts
index 3866bac88ef44..6922fc04f2e71 100644
--- a/x-pack/plugins/apm/server/routes/service_map/get_service_map_backend_node_info.ts
+++ b/x-pack/plugins/apm/server/routes/service_map/get_service_map_backend_node_info.ts
@@ -16,8 +16,11 @@ import { EventOutcome } from '../../../common/event_outcome';
import { ProcessorEvent } from '../../../common/processor_event';
import { environmentQuery } from '../../../common/utils/environment_query';
import { withApmSpan } from '../../utils/with_apm_span';
-import { calculateThroughput } from '../../lib/helpers/calculate_throughput';
+import { calculateThroughputWithRange } from '../../lib/helpers/calculate_throughput';
import { Setup } from '../../lib/helpers/setup_request';
+import { getBucketSize } from '../../lib/helpers/get_bucket_size';
+import { getFailedTransactionRateTimeSeries } from '../../lib/helpers/transaction_error_rate';
+import { NodeStats } from '../../../common/service_map';
interface Options {
setup: Setup;
@@ -33,10 +36,24 @@ export function getServiceMapBackendNodeInfo({
setup,
start,
end,
-}: Options) {
+}: Options): Promise {
return withApmSpan('get_service_map_backend_node_stats', async () => {
const { apmEventClient } = setup;
+ const { intervalString } = getBucketSize({ start, end, numBuckets: 20 });
+
+ const subAggs = {
+ latency_sum: {
+ sum: { field: SPAN_DESTINATION_SERVICE_RESPONSE_TIME_SUM },
+ },
+ count: {
+ sum: { field: SPAN_DESTINATION_SERVICE_RESPONSE_TIME_COUNT },
+ },
+ outcomes: {
+ terms: { field: EVENT_OUTCOME, include: [EventOutcome.failure] },
+ },
+ };
+
const response = await apmEventClient.search(
'get_service_map_backend_node_stats',
{
@@ -55,18 +72,15 @@ export function getServiceMapBackendNodeInfo({
},
},
aggs: {
- latency_sum: {
- sum: {
- field: SPAN_DESTINATION_SERVICE_RESPONSE_TIME_SUM,
+ ...subAggs,
+ timeseries: {
+ date_histogram: {
+ field: '@timestamp',
+ fixed_interval: intervalString,
+ min_doc_count: 0,
+ extended_bounds: { min: start, max: end },
},
- },
- count: {
- sum: {
- field: SPAN_DESTINATION_SERVICE_RESPONSE_TIME_COUNT,
- },
- },
- [EVENT_OUTCOME]: {
- terms: { field: EVENT_OUTCOME, include: [EventOutcome.failure] },
+ aggs: subAggs,
},
},
},
@@ -74,13 +88,13 @@ export function getServiceMapBackendNodeInfo({
);
const count = response.aggregations?.count.value ?? 0;
- const errorCount =
- response.aggregations?.[EVENT_OUTCOME].buckets[0]?.doc_count ?? 0;
+ const failedTransactionsRateCount =
+ response.aggregations?.outcomes.buckets[0]?.doc_count ?? 0;
const latencySum = response.aggregations?.latency_sum.value ?? 0;
- const avgErrorRate = errorCount / count;
- const avgTransactionDuration = latencySum / count;
- const avgRequestsPerMinute = calculateThroughput({
+ const avgFailedTransactionsRate = failedTransactionsRateCount / count;
+ const latency = latencySum / count;
+ const throughput = calculateThroughputWithRange({
start,
end,
value: count,
@@ -88,19 +102,48 @@ export function getServiceMapBackendNodeInfo({
if (count === 0) {
return {
- avgErrorRate: null,
+ failedTransactionsRate: undefined,
transactionStats: {
- avgRequestsPerMinute: null,
- avgTransactionDuration: null,
+ throughput: undefined,
+ latency: undefined,
},
};
}
return {
- avgErrorRate,
+ failedTransactionsRate: {
+ value: avgFailedTransactionsRate,
+ timeseries: response.aggregations?.timeseries
+ ? getFailedTransactionRateTimeSeries(
+ response.aggregations.timeseries.buckets
+ )
+ : undefined,
+ },
transactionStats: {
- avgRequestsPerMinute,
- avgTransactionDuration,
+ throughput: {
+ value: throughput,
+ timeseries: response.aggregations?.timeseries.buckets.map(
+ (bucket) => {
+ return {
+ x: bucket.key,
+ y: calculateThroughputWithRange({
+ start,
+ end,
+ value: bucket.doc_count ?? 0,
+ }),
+ };
+ }
+ ),
+ },
+ latency: {
+ value: latency,
+ timeseries: response.aggregations?.timeseries.buckets.map(
+ (bucket) => ({
+ x: bucket.key,
+ y: bucket.latency_sum.value,
+ })
+ ),
+ },
},
};
});
diff --git a/x-pack/plugins/apm/server/routes/service_map/get_service_map_service_node_info.test.ts b/x-pack/plugins/apm/server/routes/service_map/get_service_map_service_node_info.test.ts
deleted file mode 100644
index 9f65481d07489..0000000000000
--- a/x-pack/plugins/apm/server/routes/service_map/get_service_map_service_node_info.test.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import { getServiceMapServiceNodeInfo } from './get_service_map_service_node_info';
-import { Setup } from '../../lib/helpers/setup_request';
-import * as getErrorRateModule from '../../lib/transaction_groups/get_error_rate';
-import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values';
-
-describe('getServiceMapServiceNodeInfo', () => {
- describe('with no results', () => {
- it('returns null data', async () => {
- const setup = {
- apmEventClient: {
- search: () =>
- Promise.resolve({
- hits: { total: { value: 0 } },
- }),
- },
- indices: {},
- uiFilters: {},
- } as unknown as Setup;
- const serviceName = 'test service name';
- const result = await getServiceMapServiceNodeInfo({
- environment: 'test environment',
- setup,
- serviceName,
- searchAggregatedTransactions: false,
- start: 1528113600000,
- end: 1528977600000,
- });
-
- expect(result).toEqual({
- avgCpuUsage: null,
- avgErrorRate: null,
- avgMemoryUsage: null,
- transactionStats: {
- avgRequestsPerMinute: null,
- avgTransactionDuration: null,
- },
- });
- });
- });
-
- describe('with some results', () => {
- it('returns data', async () => {
- jest.spyOn(getErrorRateModule, 'getErrorRate').mockResolvedValueOnce({
- average: 0.5,
- timeseries: [{ x: 1634808240000, y: 0 }],
- });
-
- const setup = {
- apmEventClient: {
- search: () =>
- Promise.resolve({
- hits: {
- total: { value: 1 },
- },
- aggregations: {
- duration: { value: null },
- avgCpuUsage: { value: null },
- avgMemoryUsage: { value: null },
- },
- }),
- },
- indices: {},
- start: 1593460053026000,
- end: 1593497863217000,
- config: { metricsInterval: 30 },
- uiFilters: { environment: 'test environment' },
- } as unknown as Setup;
- const serviceName = 'test service name';
- const result = await getServiceMapServiceNodeInfo({
- setup,
- serviceName,
- searchAggregatedTransactions: false,
- environment: ENVIRONMENT_ALL.value,
- start: 1593460053026000,
- end: 1593497863217000,
- });
-
- expect(result).toEqual({
- avgCpuUsage: null,
- avgErrorRate: 0.5,
- avgMemoryUsage: null,
- transactionStats: {
- avgRequestsPerMinute: 0.000001586873761097901,
- avgTransactionDuration: null,
- },
- });
- });
- });
-});
diff --git a/x-pack/plugins/apm/server/routes/service_map/get_service_map_service_node_info.ts b/x-pack/plugins/apm/server/routes/service_map/get_service_map_service_node_info.ts
index d6eb7729effaf..ad2ab74098c22 100644
--- a/x-pack/plugins/apm/server/routes/service_map/get_service_map_service_node_info.ts
+++ b/x-pack/plugins/apm/server/routes/service_map/get_service_map_service_node_info.ts
@@ -6,6 +6,7 @@
*/
import { ESFilter } from '../../../../../../src/core/types/elasticsearch';
+import { rangeQuery } from '../../../../observability/server';
import {
METRIC_CGROUP_MEMORY_USAGE_BYTES,
METRIC_SYSTEM_CPU_PERCENT,
@@ -15,24 +16,25 @@ import {
TRANSACTION_TYPE,
} from '../../../common/elasticsearch_fieldnames';
import { ProcessorEvent } from '../../../common/processor_event';
+import { NodeStats } from '../../../common/service_map';
import {
TRANSACTION_PAGE_LOAD,
TRANSACTION_REQUEST,
} from '../../../common/transaction_types';
-import { rangeQuery } from '../../../../observability/server';
import { environmentQuery } from '../../../common/utils/environment_query';
-import { withApmSpan } from '../../utils/with_apm_span';
+import { getBucketSizeForAggregatedTransactions } from '../../lib/helpers/get_bucket_size_for_aggregated_transactions';
+import { Setup } from '../../lib/helpers/setup_request';
import {
getDocumentTypeFilterForTransactions,
- getTransactionDurationFieldForTransactions,
+ getDurationFieldForTransactions,
getProcessorEventForTransactions,
} from '../../lib/helpers/transactions';
-import { Setup } from '../../lib/helpers/setup_request';
+import { getErrorRate } from '../../lib/transaction_groups/get_error_rate';
+import { withApmSpan } from '../../utils/with_apm_span';
import {
percentCgroupMemoryUsedScript,
percentSystemMemoryUsedScript,
} from '../metrics/by_agent/shared/memory';
-import { getErrorRate } from '../../lib/transaction_groups/get_error_rate';
interface Options {
setup: Setup;
@@ -48,8 +50,13 @@ interface TaskParameters {
filter: ESFilter[];
searchAggregatedTransactions: boolean;
minutes: number;
- serviceName?: string;
+ serviceName: string;
setup: Setup;
+ start: number;
+ end: number;
+ intervalString: string;
+ bucketSize: number;
+ numBuckets: number;
}
export function getServiceMapServiceNodeInfo({
@@ -59,7 +66,7 @@ export function getServiceMapServiceNodeInfo({
searchAggregatedTransactions,
start,
end,
-}: Options) {
+}: Options): Promise {
return withApmSpan('get_service_map_node_stats', async () => {
const filter: ESFilter[] = [
{ term: { [SERVICE_NAME]: serviceName } },
@@ -68,6 +75,14 @@ export function getServiceMapServiceNodeInfo({
];
const minutes = Math.abs((end - start) / (1000 * 60));
+ const numBuckets = 20;
+ const { intervalString, bucketSize } =
+ getBucketSizeForAggregatedTransactions({
+ start,
+ end,
+ searchAggregatedTransactions,
+ numBuckets,
+ });
const taskParams = {
environment,
filter,
@@ -77,34 +92,38 @@ export function getServiceMapServiceNodeInfo({
setup,
start,
end,
+ intervalString,
+ bucketSize,
+ numBuckets,
};
- const [errorStats, transactionStats, cpuStats, memoryStats] =
+ const [failedTransactionsRate, transactionStats, cpuUsage, memoryUsage] =
await Promise.all([
- getErrorStats(taskParams),
+ getFailedTransactionsRateStats(taskParams),
getTransactionStats(taskParams),
getCpuStats(taskParams),
getMemoryStats(taskParams),
]);
return {
- ...errorStats,
+ failedTransactionsRate,
transactionStats,
- ...cpuStats,
- ...memoryStats,
+ cpuUsage,
+ memoryUsage,
};
});
}
-async function getErrorStats({
+async function getFailedTransactionsRateStats({
setup,
serviceName,
environment,
searchAggregatedTransactions,
start,
end,
-}: Options) {
+ numBuckets,
+}: TaskParameters): Promise {
return withApmSpan('get_error_rate_for_service_map_node', async () => {
- const { average } = await getErrorRate({
+ const { average, timeseries } = await getErrorRate({
environment,
setup,
serviceName,
@@ -112,8 +131,9 @@ async function getErrorStats({
start,
end,
kuery: '',
+ numBuckets,
});
- return { avgErrorRate: average };
+ return { value: average, timeseries };
});
}
@@ -122,12 +142,16 @@ async function getTransactionStats({
filter,
minutes,
searchAggregatedTransactions,
-}: TaskParameters): Promise<{
- avgTransactionDuration: number | null;
- avgRequestsPerMinute: number | null;
-}> {
+ start,
+ end,
+ intervalString,
+}: TaskParameters): Promise {
const { apmEventClient } = setup;
+ const durationField = getDurationFieldForTransactions(
+ searchAggregatedTransactions
+ );
+
const params = {
apm: {
events: [getProcessorEventForTransactions(searchAggregatedTransactions)],
@@ -154,11 +178,16 @@ async function getTransactionStats({
},
track_total_hits: true,
aggs: {
- duration: {
- avg: {
- field: getTransactionDurationFieldForTransactions(
- searchAggregatedTransactions
- ),
+ duration: { avg: { field: durationField } },
+ timeseries: {
+ date_histogram: {
+ field: '@timestamp',
+ fixed_interval: intervalString,
+ min_doc_count: 0,
+ extended_bounds: { min: start, max: end },
+ },
+ aggs: {
+ latency: { avg: { field: durationField } },
},
},
},
@@ -172,15 +201,32 @@ async function getTransactionStats({
const totalRequests = response.hits.total.value;
return {
- avgTransactionDuration: response.aggregations?.duration.value ?? null,
- avgRequestsPerMinute: totalRequests > 0 ? totalRequests / minutes : null,
+ latency: {
+ value: response.aggregations?.duration.value ?? null,
+ timeseries: response.aggregations?.timeseries.buckets.map((bucket) => ({
+ x: bucket.key,
+ y: bucket.latency.value,
+ })),
+ },
+ throughput: {
+ value: totalRequests > 0 ? totalRequests / minutes : null,
+ timeseries: response.aggregations?.timeseries.buckets.map((bucket) => {
+ return {
+ x: bucket.key,
+ y: bucket.doc_count ?? 0,
+ };
+ }),
+ },
};
}
async function getCpuStats({
setup,
filter,
-}: TaskParameters): Promise<{ avgCpuUsage: number | null }> {
+ intervalString,
+ start,
+ end,
+}: TaskParameters): Promise {
const { apmEventClient } = setup;
const response = await apmEventClient.search(
@@ -199,22 +245,44 @@ async function getCpuStats({
],
},
},
- aggs: { avgCpuUsage: { avg: { field: METRIC_SYSTEM_CPU_PERCENT } } },
+ aggs: {
+ avgCpuUsage: { avg: { field: METRIC_SYSTEM_CPU_PERCENT } },
+ timeseries: {
+ date_histogram: {
+ field: '@timestamp',
+ fixed_interval: intervalString,
+ min_doc_count: 0,
+ extended_bounds: { min: start, max: end },
+ },
+ aggs: {
+ cpuAvg: { avg: { field: METRIC_SYSTEM_CPU_PERCENT } },
+ },
+ },
+ },
},
}
);
- return { avgCpuUsage: response.aggregations?.avgCpuUsage.value ?? null };
+ return {
+ value: response.aggregations?.avgCpuUsage.value ?? null,
+ timeseries: response.aggregations?.timeseries.buckets.map((bucket) => ({
+ x: bucket.key,
+ y: bucket.cpuAvg.value,
+ })),
+ };
}
function getMemoryStats({
setup,
filter,
-}: TaskParameters): Promise<{ avgMemoryUsage: number | null }> {
+ intervalString,
+ start,
+ end,
+}: TaskParameters) {
return withApmSpan('get_memory_stats_for_service_map_node', async () => {
const { apmEventClient } = setup;
- const getAvgMemoryUsage = async ({
+ const getMemoryUsage = async ({
additionalFilters,
script,
}: {
@@ -222,7 +290,7 @@ function getMemoryStats({
script:
| typeof percentCgroupMemoryUsedScript
| typeof percentSystemMemoryUsedScript;
- }) => {
+ }): Promise => {
const response = await apmEventClient.search(
'get_avg_memory_for_service_map_node',
{
@@ -238,22 +306,39 @@ function getMemoryStats({
},
aggs: {
avgMemoryUsage: { avg: { script } },
+ timeseries: {
+ date_histogram: {
+ field: '@timestamp',
+ fixed_interval: intervalString,
+ min_doc_count: 0,
+ extended_bounds: { min: start, max: end },
+ },
+ aggs: {
+ memoryAvg: { avg: { script } },
+ },
+ },
},
},
}
);
- return response.aggregations?.avgMemoryUsage.value ?? null;
+ return {
+ value: response.aggregations?.avgMemoryUsage.value ?? null,
+ timeseries: response.aggregations?.timeseries.buckets.map((bucket) => ({
+ x: bucket.key,
+ y: bucket.memoryAvg.value,
+ })),
+ };
};
- let avgMemoryUsage = await getAvgMemoryUsage({
+ let memoryUsage = await getMemoryUsage({
additionalFilters: [
{ exists: { field: METRIC_CGROUP_MEMORY_USAGE_BYTES } },
],
script: percentCgroupMemoryUsedScript,
});
- if (!avgMemoryUsage) {
- avgMemoryUsage = await getAvgMemoryUsage({
+ if (!memoryUsage) {
+ memoryUsage = await getMemoryUsage({
additionalFilters: [
{ exists: { field: METRIC_SYSTEM_FREE_MEMORY } },
{ exists: { field: METRIC_SYSTEM_TOTAL_MEMORY } },
@@ -262,6 +347,6 @@ function getMemoryStats({
});
}
- return { avgMemoryUsage };
+ return memoryUsage;
});
}
diff --git a/x-pack/plugins/apm/server/routes/services/get_service_instances/get_service_instances_transaction_statistics.ts b/x-pack/plugins/apm/server/routes/services/get_service_instances/get_service_instances_transaction_statistics.ts
index 166e8d61142ea..ec081916f455d 100644
--- a/x-pack/plugins/apm/server/routes/services/get_service_instances/get_service_instances_transaction_statistics.ts
+++ b/x-pack/plugins/apm/server/routes/services/get_service_instances/get_service_instances_transaction_statistics.ts
@@ -18,7 +18,7 @@ import { kqlQuery, rangeQuery } from '../../../../../observability/server';
import { environmentQuery } from '../../../../common/utils/environment_query';
import {
getDocumentTypeFilterForTransactions,
- getTransactionDurationFieldForTransactions,
+ getDurationFieldForTransactions,
getProcessorEventForTransactions,
} from '../../../lib/helpers/transactions';
import { calculateThroughput } from '../../../lib/helpers/calculate_throughput';
@@ -89,9 +89,7 @@ export async function getServiceInstancesTransactionStatistics<
}
);
- const field = getTransactionDurationFieldForTransactions(
- searchAggregatedTransactions
- );
+ const field = getDurationFieldForTransactions(searchAggregatedTransactions);
const subAggs = {
...getLatencyAggregation(latencyAggregationType, field),
diff --git a/x-pack/plugins/apm/server/routes/services/get_service_transaction_group_detailed_statistics.ts b/x-pack/plugins/apm/server/routes/services/get_service_transaction_group_detailed_statistics.ts
index 70f77c26fdbf9..b14329985db90 100644
--- a/x-pack/plugins/apm/server/routes/services/get_service_transaction_group_detailed_statistics.ts
+++ b/x-pack/plugins/apm/server/routes/services/get_service_transaction_group_detailed_statistics.ts
@@ -20,7 +20,7 @@ import { environmentQuery } from '../../../common/utils/environment_query';
import { Coordinate } from '../../../typings/timeseries';
import {
getDocumentTypeFilterForTransactions,
- getTransactionDurationFieldForTransactions,
+ getDurationFieldForTransactions,
getProcessorEventForTransactions,
} from '../../lib/helpers/transactions';
import { getBucketSizeForAggregatedTransactions } from '../../lib/helpers/get_bucket_size_for_aggregated_transactions';
@@ -72,9 +72,7 @@ export async function getServiceTransactionGroupDetailedStatistics({
searchAggregatedTransactions,
});
- const field = getTransactionDurationFieldForTransactions(
- searchAggregatedTransactions
- );
+ const field = getDurationFieldForTransactions(searchAggregatedTransactions);
const response = await apmEventClient.search(
'get_service_transaction_group_detailed_statistics',
diff --git a/x-pack/plugins/apm/server/routes/services/get_service_transaction_groups.ts b/x-pack/plugins/apm/server/routes/services/get_service_transaction_groups.ts
index 711d6964221bd..979d79c84578a 100644
--- a/x-pack/plugins/apm/server/routes/services/get_service_transaction_groups.ts
+++ b/x-pack/plugins/apm/server/routes/services/get_service_transaction_groups.ts
@@ -17,7 +17,7 @@ import { rangeQuery, kqlQuery } from '../../../../observability/server';
import { environmentQuery } from '../../../common/utils/environment_query';
import {
getDocumentTypeFilterForTransactions,
- getTransactionDurationFieldForTransactions,
+ getDurationFieldForTransactions,
getProcessorEventForTransactions,
} from '../../lib/helpers/transactions';
import { calculateThroughput } from '../../lib/helpers/calculate_throughput';
@@ -59,9 +59,7 @@ export async function getServiceTransactionGroups({
const { apmEventClient, config } = setup;
const bucketSize = config.ui.transactionGroupBucketSize;
- const field = getTransactionDurationFieldForTransactions(
- searchAggregatedTransactions
- );
+ const field = getDurationFieldForTransactions(searchAggregatedTransactions);
const response = await apmEventClient.search(
'get_service_transaction_groups',
diff --git a/x-pack/plugins/apm/server/routes/services/get_services/get_service_transaction_stats.ts b/x-pack/plugins/apm/server/routes/services/get_services/get_service_transaction_stats.ts
index 3eaa8053b6709..9576c018c1c27 100644
--- a/x-pack/plugins/apm/server/routes/services/get_services/get_service_transaction_stats.ts
+++ b/x-pack/plugins/apm/server/routes/services/get_services/get_service_transaction_stats.ts
@@ -20,7 +20,7 @@ import { environmentQuery } from '../../../../common/utils/environment_query';
import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent';
import {
getDocumentTypeFilterForTransactions,
- getTransactionDurationFieldForTransactions,
+ getDurationFieldForTransactions,
getProcessorEventForTransactions,
} from '../../../lib/helpers/transactions';
import { calculateThroughput } from '../../../lib/helpers/calculate_throughput';
@@ -56,9 +56,7 @@ export async function getServiceTransactionStats({
const metrics = {
avg_duration: {
avg: {
- field: getTransactionDurationFieldForTransactions(
- searchAggregatedTransactions
- ),
+ field: getDurationFieldForTransactions(searchAggregatedTransactions),
},
},
outcomes,
diff --git a/x-pack/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_transaction_detailed_statistics.ts b/x-pack/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_transaction_detailed_statistics.ts
index 95f2c6f400de9..744cd70e9eeb2 100644
--- a/x-pack/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_transaction_detailed_statistics.ts
+++ b/x-pack/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_transaction_detailed_statistics.ts
@@ -19,7 +19,7 @@ import { environmentQuery } from '../../../../common/utils/environment_query';
import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms';
import {
getDocumentTypeFilterForTransactions,
- getTransactionDurationFieldForTransactions,
+ getDurationFieldForTransactions,
getProcessorEventForTransactions,
} from '../../../lib/helpers/transactions';
import { calculateThroughput } from '../../../lib/helpers/calculate_throughput';
@@ -61,9 +61,7 @@ export async function getServiceTransactionDetailedStatistics({
const metrics = {
avg_duration: {
avg: {
- field: getTransactionDurationFieldForTransactions(
- searchAggregatedTransactions
- ),
+ field: getDurationFieldForTransactions(searchAggregatedTransactions),
},
},
outcomes,
diff --git a/x-pack/plugins/apm/server/routes/transactions/get_latency_charts/index.ts b/x-pack/plugins/apm/server/routes/transactions/get_latency_charts/index.ts
index 5375da3606f18..5c9e4892866cb 100644
--- a/x-pack/plugins/apm/server/routes/transactions/get_latency_charts/index.ts
+++ b/x-pack/plugins/apm/server/routes/transactions/get_latency_charts/index.ts
@@ -21,7 +21,7 @@ import {
import { environmentQuery } from '../../../../common/utils/environment_query';
import {
getDocumentTypeFilterForTransactions,
- getTransactionDurationFieldForTransactions,
+ getDurationFieldForTransactions,
getProcessorEventForTransactions,
} from '../../../lib/helpers/transactions';
import { Setup } from '../../../lib/helpers/setup_request';
@@ -64,7 +64,7 @@ function searchLatency({
searchAggregatedTransactions,
});
- const transactionDurationField = getTransactionDurationFieldForTransactions(
+ const transactionDurationField = getDurationFieldForTransactions(
searchAggregatedTransactions
);
diff --git a/x-pack/test/apm_api_integration/tests/service_maps/service_maps.spec.ts b/x-pack/test/apm_api_integration/tests/service_maps/service_maps.spec.ts
index bf607030c07d3..d4f0e350071bf 100644
--- a/x-pack/test/apm_api_integration/tests/service_maps/service_maps.spec.ts
+++ b/x-pack/test/apm_api_integration/tests/service_maps/service_maps.spec.ts
@@ -5,46 +5,63 @@
* 2.0.
*/
-import querystring from 'querystring';
-import url from 'url';
import expect from '@kbn/expect';
import { isEmpty, orderBy, uniq } from 'lodash';
+import { ServiceConnectionNode } from '../../../../plugins/apm/common/service_map';
+import { ApmApiError, SupertestReturnType } from '../../common/apm_api_supertest';
import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata';
-import { PromiseReturnType } from '../../../../plugins/observability/typings/common';
import { FtrProviderContext } from '../../common/ftr_provider_context';
+type BackendResponse = SupertestReturnType<'GET /internal/apm/service-map/backend'>;
+type ServiceNodeResponse =
+ SupertestReturnType<'GET /internal/apm/service-map/service/{serviceName}'>;
+type ServiceMapResponse = SupertestReturnType<'GET /internal/apm/service-map'>;
+
export default function serviceMapsApiTests({ getService }: FtrProviderContext) {
+ const apmApiClient = getService('apmApiClient');
const registry = getService('registry');
- const supertest = getService('legacySupertestAsApmReadUser');
- const supertestAsApmReadUserWithoutMlAccess = getService(
- 'legacySupertestAsApmReadUserWithoutMlAccess'
- );
const archiveName = 'apm_8.0.0';
const metadata = archives_metadata[archiveName];
- const start = encodeURIComponent(metadata.start);
- const end = encodeURIComponent(metadata.end);
registry.when('Service map with a basic license', { config: 'basic', archives: [] }, () => {
it('is only be available to users with Platinum license (or higher)', async () => {
- const response = await supertest.get(
- `/internal/apm/service-map?start=${start}&end=${end}&environment=ENVIRONMENT_ALL`
- );
-
- expect(response.status).to.be(403);
+ try {
+ await apmApiClient.readUser({
+ endpoint: `GET /internal/apm/service-map`,
+ params: {
+ query: {
+ start: metadata.start,
+ end: metadata.end,
+ environment: 'ENVIRONMENT_ALL',
+ },
+ },
+ });
- expectSnapshot(response.body.message).toMatchInline(
- `"In order to access Service Maps, you must be subscribed to an Elastic Platinum license. With it, you'll have the ability to visualize your entire application stack along with your APM data."`
- );
+ expect(true).to.be(false);
+ } catch (e) {
+ const err = e as ApmApiError;
+ expect(err.res.status).to.be(403);
+ expectSnapshot(err.res.body.message).toMatchInline(
+ `"In order to access Service Maps, you must be subscribed to an Elastic Platinum license. With it, you'll have the ability to visualize your entire application stack along with your APM data."`
+ );
+ }
});
});
registry.when('Service map without data', { config: 'trial', archives: [] }, () => {
describe('/internal/apm/service-map', () => {
it('returns an empty list', async () => {
- const response = await supertest.get(
- `/internal/apm/service-map?start=${start}&end=${end}&environment=ENVIRONMENT_ALL`
- );
+ const response = await apmApiClient.readUser({
+ endpoint: `GET /internal/apm/service-map`,
+ params: {
+ query: {
+ start: metadata.start,
+ end: metadata.end,
+ environment: 'ENVIRONMENT_ALL',
+ },
+ },
+ });
expect(response.status).to.be(200);
expect(response.body.elements.length).to.be(0);
@@ -52,63 +69,78 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext)
});
describe('/internal/apm/service-map/service/{serviceName}', () => {
- it('returns an object with nulls', async () => {
- const q = querystring.stringify({
- start: metadata.start,
- end: metadata.end,
- environment: 'ENVIRONMENT_ALL',
+ let response: ServiceNodeResponse;
+ before(async () => {
+ response = await apmApiClient.readUser({
+ endpoint: `GET /internal/apm/service-map/service/{serviceName}`,
+ params: {
+ path: { serviceName: 'opbeans-node' },
+ query: {
+ start: metadata.start,
+ end: metadata.end,
+ environment: 'ENVIRONMENT_ALL',
+ },
+ },
});
- const response = await supertest.get(`/internal/apm/service-map/service/opbeans-node?${q}`);
+ });
+ it('retuns status code 200', () => {
expect(response.status).to.be(200);
+ });
- expectSnapshot(response.body).toMatchInline(`
- Object {
- "avgCpuUsage": null,
- "avgErrorRate": null,
- "avgMemoryUsage": null,
- "transactionStats": Object {
- "avgRequestsPerMinute": null,
- "avgTransactionDuration": null,
- },
- }
- `);
+ it('returns an object with nulls', async () => {
+ [
+ response.body.failedTransactionsRate?.value,
+ response.body.memoryUsage?.value,
+ response.body.cpuUsage?.value,
+ response.body.transactionStats?.latency?.value,
+ response.body.transactionStats?.throughput?.value,
+ ].forEach((value) => {
+ expect(value).to.be.eql(null);
+ });
});
});
describe('/internal/apm/service-map/backend', () => {
- it('returns an object with nulls', async () => {
- const q = querystring.stringify({
- backendName: 'postgres',
- start: metadata.start,
- end: metadata.end,
- environment: 'ENVIRONMENT_ALL',
+ let response: BackendResponse;
+ before(async () => {
+ response = await apmApiClient.readUser({
+ endpoint: `GET /internal/apm/service-map/backend`,
+ params: {
+ query: {
+ backendName: 'postgres',
+ start: metadata.start,
+ end: metadata.end,
+ environment: 'ENVIRONMENT_ALL',
+ },
+ },
});
- const response = await supertest.get(`/internal/apm/service-map/backend?${q}`);
+ });
+ it('retuns status code 200', () => {
expect(response.status).to.be(200);
+ });
- expectSnapshot(response.body).toMatchInline(`
- Object {
- "avgErrorRate": null,
- "transactionStats": Object {
- "avgRequestsPerMinute": null,
- "avgTransactionDuration": null,
- },
- }
- `);
+ it('returns undefined values', () => {
+ expect(response.body).to.eql({ transactionStats: {} });
});
});
});
registry.when('Service Map with data', { config: 'trial', archives: ['apm_8.0.0'] }, () => {
describe('/internal/apm/service-map', () => {
- let response: PromiseReturnType;
-
+ let response: ServiceMapResponse;
before(async () => {
- response = await supertest.get(
- `/internal/apm/service-map?start=${start}&end=${end}&environment=ENVIRONMENT_ALL`
- );
+ response = await apmApiClient.readUser({
+ endpoint: `GET /internal/apm/service-map`,
+ params: {
+ query: {
+ environment: 'ENVIRONMENT_ALL',
+ start: metadata.start,
+ end: metadata.end,
+ },
+ },
+ });
});
it('returns service map elements', () => {
@@ -126,17 +158,17 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext)
).sort();
expectSnapshot(serviceNames).toMatchInline(`
- Array [
- "auditbeat",
- "opbeans-dotnet",
- "opbeans-go",
- "opbeans-java",
- "opbeans-node",
- "opbeans-python",
- "opbeans-ruby",
- "opbeans-rum",
- ]
- `);
+ Array [
+ "auditbeat",
+ "opbeans-dotnet",
+ "opbeans-go",
+ "opbeans-java",
+ "opbeans-node",
+ "opbeans-python",
+ "opbeans-ruby",
+ "opbeans-rum",
+ ]
+ `);
const externalDestinations = uniq(
elements
@@ -145,115 +177,119 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext)
).sort();
expectSnapshot(externalDestinations).toMatchInline(`
- Array [
- ">elasticsearch",
- ">postgresql",
- ">redis",
- ">sqlite",
- ]
- `);
+ Array [
+ ">elasticsearch",
+ ">postgresql",
+ ">redis",
+ ">sqlite",
+ ]
+ `);
});
describe('with ML data', () => {
describe('with the default apm user', () => {
before(async () => {
- response = await supertest.get(
- `/internal/apm/service-map?start=${start}&end=${end}&environment=ENVIRONMENT_ALL`
- );
+ response = await apmApiClient.readUser({
+ endpoint: `GET /internal/apm/service-map`,
+ params: {
+ query: {
+ environment: 'ENVIRONMENT_ALL',
+ start: metadata.start,
+ end: metadata.end,
+ },
+ },
+ });
});
-
it('returns service map elements with anomaly stats', () => {
expect(response.status).to.be(200);
const dataWithAnomalies = response.body.elements.filter(
- (el: { data: { serviceAnomalyStats?: {} } }) => !isEmpty(el.data.serviceAnomalyStats)
+ (el) => !isEmpty((el.data as ServiceConnectionNode).serviceAnomalyStats)
);
-
expect(dataWithAnomalies).not.to.be.empty();
-
dataWithAnomalies.forEach(({ data }: any) => {
expect(
Object.values(data.serviceAnomalyStats).filter((value) => isEmpty(value))
).to.not.empty();
});
});
-
it('returns the correct anomaly stats', () => {
const dataWithAnomalies = response.body.elements.filter(
- (el: { data: { serviceAnomalyStats?: {} } }) => !isEmpty(el.data.serviceAnomalyStats)
+ (el) => !isEmpty((el.data as ServiceConnectionNode).serviceAnomalyStats)
);
-
expect(dataWithAnomalies).not.to.be.empty();
-
expectSnapshot(dataWithAnomalies.length).toMatchInline(`7`);
expectSnapshot(orderBy(dataWithAnomalies, 'data.id').slice(0, 3)).toMatchInline(`
- Array [
- Object {
- "data": Object {
- "agent.name": "dotnet",
- "id": "opbeans-dotnet",
- "service.environment": "production",
- "service.name": "opbeans-dotnet",
- "serviceAnomalyStats": Object {
- "actualValue": 868025.86875,
- "anomalyScore": 0,
- "healthStatus": "healthy",
- "jobId": "apm-production-6117-high_mean_transaction_duration",
- "serviceName": "opbeans-dotnet",
- "transactionType": "request",
- },
- },
- },
- Object {
- "data": Object {
- "agent.name": "go",
- "id": "opbeans-go",
- "service.environment": "testing",
- "service.name": "opbeans-go",
- "serviceAnomalyStats": Object {
- "actualValue": 102786.319148936,
- "anomalyScore": 0,
- "healthStatus": "healthy",
- "jobId": "apm-testing-41e5-high_mean_transaction_duration",
- "serviceName": "opbeans-go",
- "transactionType": "request",
- },
- },
- },
- Object {
- "data": Object {
- "agent.name": "java",
- "id": "opbeans-java",
- "service.environment": "production",
- "service.name": "opbeans-java",
- "serviceAnomalyStats": Object {
- "actualValue": 175568.855769231,
- "anomalyScore": 0,
- "healthStatus": "healthy",
- "jobId": "apm-production-6117-high_mean_transaction_duration",
- "serviceName": "opbeans-java",
- "transactionType": "request",
- },
- },
- },
- ]
- `);
+ Array [
+ Object {
+ "data": Object {
+ "agent.name": "dotnet",
+ "id": "opbeans-dotnet",
+ "service.environment": "production",
+ "service.name": "opbeans-dotnet",
+ "serviceAnomalyStats": Object {
+ "actualValue": 868025.86875,
+ "anomalyScore": 0,
+ "healthStatus": "healthy",
+ "jobId": "apm-production-6117-high_mean_transaction_duration",
+ "serviceName": "opbeans-dotnet",
+ "transactionType": "request",
+ },
+ },
+ },
+ Object {
+ "data": Object {
+ "agent.name": "go",
+ "id": "opbeans-go",
+ "service.environment": "testing",
+ "service.name": "opbeans-go",
+ "serviceAnomalyStats": Object {
+ "actualValue": 102786.319148936,
+ "anomalyScore": 0,
+ "healthStatus": "healthy",
+ "jobId": "apm-testing-41e5-high_mean_transaction_duration",
+ "serviceName": "opbeans-go",
+ "transactionType": "request",
+ },
+ },
+ },
+ Object {
+ "data": Object {
+ "agent.name": "java",
+ "id": "opbeans-java",
+ "service.environment": "production",
+ "service.name": "opbeans-java",
+ "serviceAnomalyStats": Object {
+ "actualValue": 175568.855769231,
+ "anomalyScore": 0,
+ "healthStatus": "healthy",
+ "jobId": "apm-production-6117-high_mean_transaction_duration",
+ "serviceName": "opbeans-java",
+ "transactionType": "request",
+ },
+ },
+ },
+ ]
+ `);
});
});
-
describe('with a user that does not have access to ML', () => {
before(async () => {
- response = await supertestAsApmReadUserWithoutMlAccess.get(
- `/internal/apm/service-map?start=${start}&end=${end}&environment=ENVIRONMENT_ALL`
- );
+ response = await apmApiClient.noMlAccessUser({
+ endpoint: `GET /internal/apm/service-map`,
+ params: {
+ query: {
+ environment: 'ENVIRONMENT_ALL',
+ start: metadata.start,
+ end: metadata.end,
+ },
+ },
+ });
});
-
it('returns service map elements without anomaly stats', () => {
expect(response.status).to.be(200);
-
const dataWithAnomalies = response.body.elements.filter(
- (el: { data: { serviceAnomalyStats?: {} } }) => !isEmpty(el.data.serviceAnomalyStats)
+ (el) => !isEmpty((el.data as ServiceConnectionNode).serviceAnomalyStats)
);
-
expect(dataWithAnomalies).to.be.empty();
});
});
@@ -261,20 +297,25 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext)
describe('with a single service', () => {
describe('when ENVIRONMENT_ALL is selected', () => {
- it('returns service map elements', async () => {
- response = await supertest.get(
- url.format({
- pathname: '/internal/apm/service-map',
+ before(async () => {
+ response = await apmApiClient.readUser({
+ endpoint: `GET /internal/apm/service-map`,
+ params: {
query: {
environment: 'ENVIRONMENT_ALL',
start: metadata.start,
end: metadata.end,
serviceName: 'opbeans-java',
},
- })
- );
+ },
+ });
+ });
+ it('retuns status code 200', () => {
expect(response.status).to.be(200);
+ });
+
+ it('returns some elements', () => {
expect(response.body.elements.length).to.be.greaterThan(1);
});
});
@@ -282,51 +323,79 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext)
});
describe('/internal/apm/service-map/service/{serviceName}', () => {
- it('returns an object with data', async () => {
- const q = querystring.stringify({
- start: metadata.start,
- end: metadata.end,
- environment: 'ENVIRONMENT_ALL',
+ let response: ServiceNodeResponse;
+ before(async () => {
+ response = await apmApiClient.readUser({
+ endpoint: `GET /internal/apm/service-map/service/{serviceName}`,
+ params: {
+ path: { serviceName: 'opbeans-node' },
+ query: {
+ start: metadata.start,
+ end: metadata.end,
+ environment: 'ENVIRONMENT_ALL',
+ },
+ },
});
- const response = await supertest.get(`/internal/apm/service-map/service/opbeans-node?${q}`);
+ });
+ it('retuns status code 200', () => {
expect(response.status).to.be(200);
+ });
- expectSnapshot(response.body).toMatchInline(`
- Object {
- "avgCpuUsage": 0.240216666666667,
- "avgErrorRate": 0,
- "avgMemoryUsage": 0.202572668763642,
- "transactionStats": Object {
- "avgRequestsPerMinute": 5.2,
- "avgTransactionDuration": 53906.6603773585,
- },
- }
- `);
+ it('returns some error rate', () => {
+ expect(response.body.failedTransactionsRate?.value).to.eql(0);
+ expect(response.body.failedTransactionsRate?.timeseries?.length).to.be.greaterThan(0);
+ });
+
+ it('returns some latency', () => {
+ expect(response.body.transactionStats?.latency?.value).to.be.greaterThan(0);
+ expect(response.body.transactionStats?.latency?.timeseries?.length).to.be.greaterThan(0);
+ });
+
+ it('returns some throughput', () => {
+ expect(response.body.transactionStats?.throughput?.value).to.be.greaterThan(0);
+ expect(response.body.transactionStats?.throughput?.timeseries?.length).to.be.greaterThan(0);
+ });
+
+ it('returns some cpu usage', () => {
+ expect(response.body.cpuUsage?.value).to.be.greaterThan(0);
+ expect(response.body.cpuUsage?.timeseries?.length).to.be.greaterThan(0);
});
});
describe('/internal/apm/service-map/backend', () => {
- it('returns an object with data', async () => {
- const q = querystring.stringify({
- backendName: 'postgresql',
- start: metadata.start,
- end: metadata.end,
- environment: 'ENVIRONMENT_ALL',
+ let response: BackendResponse;
+ before(async () => {
+ response = await apmApiClient.readUser({
+ endpoint: `GET /internal/apm/service-map/backend`,
+ params: {
+ query: {
+ backendName: 'postgresql',
+ start: metadata.start,
+ end: metadata.end,
+ environment: 'ENVIRONMENT_ALL',
+ },
+ },
});
- const response = await supertest.get(`/internal/apm/service-map/backend?${q}`);
+ });
+ it('retuns status code 200', () => {
expect(response.status).to.be(200);
+ });
- expectSnapshot(response.body).toMatchInline(`
- Object {
- "avgErrorRate": 0,
- "transactionStats": Object {
- "avgRequestsPerMinute": 82.9666666666667,
- "avgTransactionDuration": 18307.583366814,
- },
- }
- `);
+ it('returns some error rate', () => {
+ expect(response.body.failedTransactionsRate?.value).to.eql(0);
+ expect(response.body.failedTransactionsRate?.timeseries?.length).to.be.greaterThan(0);
+ });
+
+ it('returns some latency', () => {
+ expect(response.body.transactionStats?.latency?.value).to.be.greaterThan(0);
+ expect(response.body.transactionStats?.latency?.timeseries?.length).to.be.greaterThan(0);
+ });
+
+ it('returns some throughput', () => {
+ expect(response.body.transactionStats?.throughput?.value).to.be.greaterThan(0);
+ expect(response.body.transactionStats?.throughput?.timeseries?.length).to.be.greaterThan(0);
});
});
});
From 44f3f92682515b71b65311a8b59d0b585bb14e20 Mon Sep 17 00:00:00 2001
From: Scotty Bollinger
Date: Thu, 2 Dec 2021 12:58:02 -0600
Subject: [PATCH 12/65] Replace `EuiThemeProvider` with `KibanaThemeProvider`
(#120244)
---
.../enterprise_search/public/applications/index.tsx | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/x-pack/plugins/enterprise_search/public/applications/index.tsx b/x-pack/plugins/enterprise_search/public/applications/index.tsx
index f8db22563ec5a..de112dd60863f 100644
--- a/x-pack/plugins/enterprise_search/public/applications/index.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/index.tsx
@@ -16,8 +16,10 @@ import { Store } from 'redux';
import { I18nProvider } from '@kbn/i18n-react';
import { AppMountParameters, CoreStart } from '../../../../../src/core/public';
-import { EuiThemeProvider } from '../../../../../src/plugins/kibana_react/common';
-import { KibanaContextProvider } from '../../../../../src/plugins/kibana_react/public';
+import {
+ KibanaContextProvider,
+ KibanaThemeProvider,
+} from '../../../../../src/plugins/kibana_react/public';
import { InitialAppData } from '../../common/types';
import { PluginsStart, ClientConfigType, ClientData } from '../plugin';
@@ -70,7 +72,7 @@ export const renderApp = (
ReactDOM.render(
-
+
@@ -79,7 +81,7 @@ export const renderApp = (
-
+
,
params.element
);
From 553928c4e18eefdaa2d2d5e94e236a8999093d11 Mon Sep 17 00:00:00 2001
From: Nathan Reese
Date: Thu, 2 Dec 2021 12:04:55 -0700
Subject: [PATCH 13/65] [Maps] remove getIndexPatternsService from
server.kibana_server_services (#120156)
* [Maps] remove getIndexPatternsService from server.kibana_server_services
* eslint
---
.../maps/server/kibana_server_services.ts | 40 +++++++------------
.../maps_telemetry/maps_telemetry.test.js | 30 +++++++++-----
.../server/maps_telemetry/maps_telemetry.ts | 17 +++++++-
x-pack/plugins/maps/server/plugin.ts | 11 +----
4 files changed, 52 insertions(+), 46 deletions(-)
diff --git a/x-pack/plugins/maps/server/kibana_server_services.ts b/x-pack/plugins/maps/server/kibana_server_services.ts
index f5bd4dad085d8..28c7caf3c50e3 100644
--- a/x-pack/plugins/maps/server/kibana_server_services.ts
+++ b/x-pack/plugins/maps/server/kibana_server_services.ts
@@ -5,32 +5,20 @@
* 2.0.
*/
-import { ElasticsearchClient, ISavedObjectsRepository } from 'kibana/server';
-import { SavedObjectsClient } from '../../../../src/core/server';
-import {
- IndexPatternsCommonService,
- IndexPatternsServiceStart,
-} from '../../../../src/plugins/data/server';
+import { CoreStart } from '../../../../src/core/server';
+import { StartDeps } from './plugin';
-let internalRepository: ISavedObjectsRepository;
-export const setInternalRepository = (
- createInternalRepository: (extraTypes?: string[]) => ISavedObjectsRepository
-) => {
- internalRepository = createInternalRepository();
-};
-export const getInternalRepository = () => internalRepository;
+let coreStart: CoreStart;
+let pluginsStart: StartDeps;
+export function setStartServices(core: CoreStart, plugins: StartDeps) {
+ coreStart = core;
+ pluginsStart = plugins;
+}
-let esClient: ElasticsearchClient;
-let indexPatternsService: IndexPatternsCommonService;
-export const setIndexPatternsService = async (
- indexPatternsServiceFactory: IndexPatternsServiceStart['indexPatternsServiceFactory'],
- elasticsearchClient: ElasticsearchClient
-) => {
- esClient = elasticsearchClient;
- indexPatternsService = await indexPatternsServiceFactory(
- new SavedObjectsClient(getInternalRepository()),
- elasticsearchClient
- );
+export const getSavedObjectClient = (extraTypes?: string[]) => {
+ return coreStart.savedObjects.createInternalRepository(extraTypes);
};
-export const getIndexPatternsService = () => indexPatternsService;
-export const getESClient = () => esClient;
+
+export const getIndexPatternsServiceFactory = () =>
+ pluginsStart.data.indexPatterns.indexPatternsServiceFactory;
+export const getElasticsearch = () => coreStart.elasticsearch;
diff --git a/x-pack/plugins/maps/server/maps_telemetry/maps_telemetry.test.js b/x-pack/plugins/maps/server/maps_telemetry/maps_telemetry.test.js
index c9720063290b0..a415d181900d7 100644
--- a/x-pack/plugins/maps/server/maps_telemetry/maps_telemetry.test.js
+++ b/x-pack/plugins/maps/server/maps_telemetry/maps_telemetry.test.js
@@ -54,19 +54,31 @@ jest.mock('../kibana_server_services', () => {
},
};
return {
- getIndexPatternsService() {
+ getSavedObjectClient: () => {
+ return {};
+ },
+ getElasticsearch: () => {
return {
- async get(x) {
- return x === testAggIndexPatternId ? testAggIndexPattern : testIndexPatterns[x];
- },
- async getIds() {
- return Object.values(testIndexPatterns).map((x) => x.id);
- },
- async getFieldsForIndexPattern(x) {
- return x.fields;
+ client: {
+ asInternalUser: {},
},
};
},
+ getIndexPatternsServiceFactory() {
+ return function () {
+ return {
+ async get(x) {
+ return x === testAggIndexPatternId ? testAggIndexPattern : testIndexPatterns[x];
+ },
+ async getIds() {
+ return Object.values(testIndexPatterns).map((x) => x.id);
+ },
+ async getFieldsForIndexPattern(x) {
+ return x.fields;
+ },
+ };
+ };
+ },
};
});
diff --git a/x-pack/plugins/maps/server/maps_telemetry/maps_telemetry.ts b/x-pack/plugins/maps/server/maps_telemetry/maps_telemetry.ts
index 5041cb997ff58..93a9a118d23bc 100644
--- a/x-pack/plugins/maps/server/maps_telemetry/maps_telemetry.ts
+++ b/x-pack/plugins/maps/server/maps_telemetry/maps_telemetry.ts
@@ -22,7 +22,11 @@ import {
LayerDescriptor,
} from '../../common/descriptor_types';
import { MapSavedObject, MapSavedObjectAttributes } from '../../common/map_saved_object_type';
-import { getIndexPatternsService, getInternalRepository } from '../kibana_server_services';
+import {
+ getElasticsearch,
+ getIndexPatternsServiceFactory,
+ getSavedObjectClient,
+} from '../kibana_server_services';
import { injectReferences } from '././../../common/migrations/references';
import {
getBaseMapsPerCluster,
@@ -36,6 +40,15 @@ import {
TELEMETRY_SCALING_OPTION_COUNTS_PER_CLUSTER,
TELEMETRY_TERM_JOIN_COUNTS_PER_CLUSTER,
} from './util';
+import { SavedObjectsClient } from '../../../../../src/core/server';
+
+async function getIndexPatternsService() {
+ const factory = getIndexPatternsServiceFactory();
+ return factory(
+ new SavedObjectsClient(getSavedObjectClient()),
+ getElasticsearch().client.asInternalUser
+ );
+}
interface IStats {
[key: string]: {
@@ -302,7 +315,7 @@ export async function execTransformOverMultipleSavedObjectPages(
savedObjectType: string,
transform: (savedObjects: Array>) => void
) {
- const savedObjectsClient = getInternalRepository();
+ const savedObjectsClient = getSavedObjectClient();
let currentPage = 1;
// Seed values
diff --git a/x-pack/plugins/maps/server/plugin.ts b/x-pack/plugins/maps/server/plugin.ts
index b35f680df457c..ec9b3652fddbd 100644
--- a/x-pack/plugins/maps/server/plugin.ts
+++ b/x-pack/plugins/maps/server/plugin.ts
@@ -25,8 +25,7 @@ import { registerMapsUsageCollector } from './maps_telemetry/collectors/register
import { APP_ID, APP_ICON, MAP_SAVED_OBJECT_TYPE, getFullPath } from '../common/constants';
import { mapSavedObjects, mapsTelemetrySavedObjects } from './saved_objects';
import { MapsXPackConfig } from '../config';
-// @ts-ignore
-import { setIndexPatternsService, setInternalRepository } from './kibana_server_services';
+import { setStartServices } from './kibana_server_services';
import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/server';
import { emsBoundariesSpecProvider } from './tutorials/ems';
// @ts-ignore
@@ -160,7 +159,6 @@ export class MapsPlugin implements Plugin {
);
}
- // @ts-ignore
setup(core: CoreSetup, plugins: SetupDeps) {
const { usageCollection, home, licensing, features, mapsEms, customIntegrations } = plugins;
const mapsEmsConfig = mapsEms.config;
@@ -230,12 +228,7 @@ export class MapsPlugin implements Plugin {
};
}
- // @ts-ignore
start(core: CoreStart, plugins: StartDeps) {
- setInternalRepository(core.savedObjects.createInternalRepository);
- setIndexPatternsService(
- plugins.data.indexPatterns.indexPatternsServiceFactory,
- core.elasticsearch.client.asInternalUser
- );
+ setStartServices(core, plugins);
}
}
From 915206531bc35d127fec88e8b2e44811ace47596 Mon Sep 17 00:00:00 2001
From: Frank Hassanabad
Date: Thu, 2 Dec 2021 12:10:48 -0700
Subject: [PATCH 14/65] [Security Solutions] Removes tech debt of exporting all
from linter rule for security_solution plugin (#120188)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Summary
See: https://github.com/elastic/kibana/issues/110903
This removes the top level API `export *` spots from:
* `security_solution` plugin
by removing _all_ the exports from `security_solution/common/index.ts` since non of those were shared outside this plugin. Look at the metrics from the build below and you will see _huge_ drops off numbers across the board for required API documentation to the page load size.
In the file `security_solution/common/index.ts` I now put the advice of:
```
// Careful of exporting anything from this file as any file(s) you export here will cause your page bundle size to increase.
// If you're using functions/types/etc... internally it's best to import directly from their paths than expose the functions/types/etc... here.
// You should _only_ expose functions/types/etc... that need to be shared with other plugins here.
```
But really I doubt we will have to share anything from `security_solutions` plugin to another plugin or expose it for anyone else. So I think this is 👍 the way forward to not expose anything directly from `security_solution/common/index.ts` anymore.
---
x-pack/plugins/lists/common/index.ts | 4 ++++
x-pack/plugins/security_solution/common/index.ts | 9 +++------
.../components/event_details/alert_summary_view.test.tsx | 2 +-
.../components/event_details/alert_summary_view.tsx | 3 ++-
.../public/common/components/event_details/columns.tsx | 3 ++-
.../event_details/cti_details/enrichment_summary.tsx | 6 +++++-
.../event_details/cti_details/threat_summary_view.tsx | 6 +++++-
.../public/common/components/event_details/helpers.tsx | 2 +-
.../event_details/investigation_guide_view.tsx | 2 +-
.../public/common/components/event_details/reason.tsx | 2 +-
.../common/components/events_viewer/default_headers.tsx | 2 +-
.../public/common/containers/sourcerer/index.tsx | 2 +-
.../security_solution/public/common/mock/header.ts | 2 +-
.../alerts_kpis/alerts_count_panel/alerts_count.tsx | 2 +-
.../components/alerts_kpis/alerts_count_panel/types.ts | 2 +-
.../timeline_actions/alert_context_menu.test.tsx | 2 +-
.../alerts_table/timeline_actions/alert_context_menu.tsx | 2 +-
.../timeline_actions/investigate_in_resolver.tsx | 2 +-
.../timeline_actions/use_add_to_case_actions.tsx | 3 ++-
.../detections/components/host_isolation/helpers.ts | 2 +-
.../host_isolation/use_host_isolation_action.tsx | 2 +-
.../detections/components/rules/query_preview/index.tsx | 2 +-
.../rules/rule_preview/use_preview_histogram.tsx | 2 +-
.../components/take_action_dropdown/index.test.tsx | 3 ++-
.../detections/components/take_action_dropdown/index.tsx | 2 +-
.../examples/observablity_alerts/columns.ts | 2 +-
.../observablity_alerts/render_cell_value.test.tsx | 2 +-
.../examples/security_solution_rac/columns.ts | 2 +-
.../security_solution_rac/render_cell_value.test.tsx | 2 +-
.../security_solution_detections/columns.ts | 2 +-
.../render_cell_value.test.tsx | 2 +-
.../risky_hosts_enabled_module.tsx | 2 +-
.../overview_risky_host_links/use_hosts_risk_score.ts | 2 +-
.../use_hosts_risk_score_complete.ts | 2 +-
.../components/create_field_button/index.test.tsx | 2 +-
.../timelines/components/fields_browser/field_items.tsx | 2 +-
.../timelines/components/fields_browser/field_name.tsx | 2 +-
.../timelines/components/formatted_ip/index.test.tsx | 2 +-
.../components/side_panel/event_details/footer.tsx | 3 ++-
.../components/side_panel/event_details/index.tsx | 2 +-
.../timeline/body/column_headers/actions/index.tsx | 2 +-
.../timeline/body/column_headers/default_headers.ts | 2 +-
.../timeline/body/column_headers/filter/index.tsx | 2 +-
.../timeline/body/column_headers/header/index.tsx | 2 +-
.../column_headers/header_tooltip_content/index.test.tsx | 2 +-
.../body/column_headers/header_tooltip_content/index.tsx | 2 +-
.../components/timeline/body/column_headers/helpers.ts | 2 +-
.../timeline/body/events/stateful_row_renderer/index.tsx | 2 +-
.../body/renderers/auditd/generic_row_renderer.test.tsx | 2 +-
.../timeline/body/renderers/column_renderer.ts | 2 +-
.../timeline/body/renderers/cti/threat_match_rows.tsx | 2 +-
.../timeline/body/renderers/empty_column_renderer.tsx | 2 +-
.../timeline/body/renderers/get_row_renderer.ts | 2 +-
.../timeline/body/renderers/host_name.test.tsx | 2 +-
.../components/timeline/body/renderers/index.ts | 2 +-
.../timeline/body/renderers/plain_column_renderer.tsx | 2 +-
.../body/renderers/reason_column_renderer.test.tsx | 9 +++------
.../timeline/body/renderers/reason_column_renderer.tsx | 3 ++-
.../body/renderers/system/generic_row_renderer.test.tsx | 2 +-
.../public/ueba/components/host_rules_table/columns.tsx | 2 +-
.../public/ueba/components/host_rules_table/index.tsx | 7 +++----
.../ueba/components/host_tactics_table/columns.tsx | 2 +-
.../public/ueba/components/host_tactics_table/index.tsx | 4 ++--
.../public/ueba/components/risk_score_table/index.tsx | 7 +++----
.../public/ueba/containers/host_rules/index.tsx | 2 +-
.../public/ueba/containers/host_tactics/index.tsx | 2 +-
.../public/ueba/containers/risk_score/index.tsx | 2 +-
.../public/ueba/containers/user_rules/index.tsx | 2 +-
.../ueba/pages/navigation/user_rules_query_tab_body.tsx | 2 +-
.../plugins/security_solution/public/ueba/pages/ueba.tsx | 2 +-
.../source_fields_merging/strategies/get_strategy.ts | 2 +-
.../routes/timelines/create_timelines/helpers.test.ts | 2 +-
.../security_solution/factory/hosts/risk_score/index.ts | 2 +-
.../factory/hosts/risk_score/query.hosts_risk.dsl.ts | 2 +-
.../factory/matrix_histogram/alerts/index.ts | 2 +-
.../factory/matrix_histogram/anomalies/index.ts | 2 +-
.../factory/matrix_histogram/authentications/index.ts | 2 +-
.../factory/matrix_histogram/dns/index.ts | 2 +-
.../factory/matrix_histogram/events/index.ts | 2 +-
.../factory/matrix_histogram/preview/__mocks__/index.ts | 2 +-
.../factory/matrix_histogram/preview/index.ts | 2 +-
.../security_solution/factory/ueba/host_rules/helpers.ts | 6 +++++-
.../security_solution/factory/ueba/host_rules/index.ts | 2 +-
.../factory/ueba/host_tactics/helpers.ts | 2 +-
.../security_solution/factory/ueba/host_tactics/index.ts | 4 ++--
.../security_solution/factory/ueba/risk_score/helpers.ts | 2 +-
.../security_solution/factory/ueba/risk_score/index.ts | 4 ++--
.../security_solution/factory/ueba/user_rules/helpers.ts | 6 +++++-
.../security_solution/factory/ueba/user_rules/index.ts | 2 +-
.../services/security_solution/roles_users_utils.ts | 2 +-
90 files changed, 126 insertions(+), 108 deletions(-)
diff --git a/x-pack/plugins/lists/common/index.ts b/x-pack/plugins/lists/common/index.ts
index 1fec1c76430eb..a9aa96c2d9c60 100644
--- a/x-pack/plugins/lists/common/index.ts
+++ b/x-pack/plugins/lists/common/index.ts
@@ -4,3 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
+
+// Careful of exporting anything from this file as any file(s) you export here will cause your page bundle size to increase.
+// If you're using functions/types/etc... internally it's best to import directly from their paths than expose the functions/types/etc... here.
+// You should _only_ expose functions/types/etc... that need to be shared with other plugins here.
diff --git a/x-pack/plugins/security_solution/common/index.ts b/x-pack/plugins/security_solution/common/index.ts
index 19ce0d45e2485..a9aa96c2d9c60 100644
--- a/x-pack/plugins/security_solution/common/index.ts
+++ b/x-pack/plugins/security_solution/common/index.ts
@@ -5,9 +5,6 @@
* 2.0.
*/
-// TODO: https://github.com/elastic/kibana/issues/110904
-/* eslint-disable @kbn/eslint/no_export_all */
-
-export * from './types';
-export * from './search_strategy';
-export * from './utility_types';
+// Careful of exporting anything from this file as any file(s) you export here will cause your page bundle size to increase.
+// If you're using functions/types/etc... internally it's best to import directly from their paths than expose the functions/types/etc... here.
+// You should _only_ expose functions/types/etc... that need to be shared with other plugins here.
diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.test.tsx
index f7522cb4dd585..7e1e71a01642f 100644
--- a/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.test.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.test.tsx
@@ -14,7 +14,7 @@ import { TimelineEventsDetailsItem } from '../../../../common/search_strategy';
import { useRuleWithFallback } from '../../../detections/containers/detection_engine/rules/use_rule_with_fallback';
import { TestProviders, TestProvidersComponent } from '../../mock';
-import { TimelineId } from '../../../../common';
+import { TimelineId } from '../../../../common/types';
import { mockBrowserFields } from '../../containers/source/mock';
jest.mock('../../lib/kibana');
diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.tsx
index 82259aa2312ae..b42a0425355cc 100644
--- a/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.tsx
@@ -14,7 +14,8 @@ import { AlertSummaryRow, getSummaryColumns, SummaryRow } from './helpers';
import { ActionCell } from './table/action_cell';
import { FieldValueCell } from './table/field_value_cell';
-import { TimelineEventsDetailsItem, TimelineId } from '../../../../common';
+import { TimelineId } from '../../../../common/types';
+import { TimelineEventsDetailsItem } from '../../../../common/search_strategy';
import { getSummaryRows } from './get_alert_summary_rows';
diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx
index dbb52ade2652c..811c43fdfc5b9 100644
--- a/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx
@@ -14,7 +14,8 @@ import { BrowserFields } from '../../containers/source';
import { OnUpdateColumns } from '../../../timelines/components/timeline/events';
import * as i18n from './translations';
import { EventFieldsData } from './types';
-import { BrowserField, ColumnHeaderOptions } from '../../../../common';
+import { ColumnHeaderOptions } from '../../../../common/types';
+import { BrowserField } from '../../../../common/search_strategy';
import { FieldValueCell } from './table/field_value_cell';
import { FieldNameCell } from './table/field_name_cell';
import { ActionCell } from './table/action_cell';
diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx
index 37fbab924afa3..c2254c18f4364 100644
--- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx
@@ -16,7 +16,11 @@ import { getEnrichmentIdentifiers, isInvestigationTimeEnrichment } from './helpe
import { FieldsData } from '../types';
import { ActionCell } from '../table/action_cell';
-import { BrowserField, BrowserFields, TimelineEventsDetailsItem } from '../../../../../common';
+import {
+ BrowserField,
+ BrowserFields,
+ TimelineEventsDetailsItem,
+} from '../../../../../common/search_strategy';
import { FormattedFieldValue } from '../../../../timelines/components/timeline/body/renderers/formatted_field';
import { EnrichedDataRow, ThreatSummaryPanelHeader } from './threat_summary_view';
diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx
index bdd342934eeb6..c4d7902e151b4 100644
--- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx
@@ -23,7 +23,11 @@ import { CtiEnrichment } from '../../../../../common/search_strategy/security_so
import { FieldsData } from '../types';
-import { BrowserField, BrowserFields, TimelineEventsDetailsItem } from '../../../../../common';
+import {
+ BrowserField,
+ BrowserFields,
+ TimelineEventsDetailsItem,
+} from '../../../../../common/search_strategy';
import { HostRisk } from '../../../../overview/containers/overview_risky_host_links/use_hosts_risk_score';
import { HostRiskSummary } from './host_risk_summary';
import { EnrichmentSummary } from './enrichment_summary';
diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx
index 47d0ccf5ba3b2..648bc96b5c9e7 100644
--- a/x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx
@@ -25,7 +25,7 @@ import {
import { FieldsData } from './types';
import * as i18n from './translations';
-import { ColumnHeaderOptions } from '../../../../common';
+import { ColumnHeaderOptions } from '../../../../common/types';
/**
* Defines the behavior of the search input that appears above the table of data
diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/investigation_guide_view.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/investigation_guide_view.tsx
index f845e8ecba6b6..b4abd253b4a96 100644
--- a/x-pack/plugins/security_solution/public/common/components/event_details/investigation_guide_view.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/event_details/investigation_guide_view.tsx
@@ -15,7 +15,7 @@ import * as i18n from './translations';
import { useRuleWithFallback } from '../../../detections/containers/detection_engine/rules/use_rule_with_fallback';
import { MarkdownRenderer } from '../markdown_editor';
import { LineClamp } from '../line_clamp';
-import { TimelineEventsDetailsItem } from '../../../../common';
+import { TimelineEventsDetailsItem } from '../../../../common/search_strategy';
export const Indent = styled.div`
padding: 0 8px;
diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/reason.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/reason.tsx
index cf69e4ba02c3e..d06f4d3ea105b 100644
--- a/x-pack/plugins/security_solution/public/common/components/event_details/reason.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/event_details/reason.tsx
@@ -13,7 +13,7 @@ import React, { useMemo } from 'react';
import styled from 'styled-components';
import { getRuleDetailsUrl, useFormatUrl } from '../link_to';
import * as i18n from './translations';
-import { TimelineEventsDetailsItem } from '../../../../common';
+import { TimelineEventsDetailsItem } from '../../../../common/search_strategy';
import { LinkAnchor } from '../links';
import { useKibana } from '../../lib/kibana';
import { APP_UI_ID, SecurityPageName } from '../../../../common/constants';
diff --git a/x-pack/plugins/security_solution/public/common/components/events_viewer/default_headers.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/default_headers.tsx
index a511af16bbf71..1578c77f283fb 100644
--- a/x-pack/plugins/security_solution/public/common/components/events_viewer/default_headers.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/events_viewer/default_headers.tsx
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { ColumnHeaderOptions } from '../../../../common';
+import { ColumnHeaderOptions } from '../../../../common/types';
import { defaultColumnHeaderType } from '../../../timelines/components/timeline/body/column_headers/default_headers';
import { DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../../../timelines/components/timeline/body/constants';
diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx b/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx
index 7aea1e881bb52..3311207eb1420 100644
--- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx
+++ b/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx
@@ -22,7 +22,7 @@ import {
RULES_PATH,
UEBA_PATH,
} from '../../../../common/constants';
-import { TimelineId } from '../../../../common';
+import { TimelineId } from '../../../../common/types';
import { useDeepEqualSelector } from '../../hooks/use_selector';
import { checkIfIndicesExist, getScopePatternListSelection } from '../../store/sourcerer/helpers';
import { useAppToasts } from '../../hooks/use_app_toasts';
diff --git a/x-pack/plugins/security_solution/public/common/mock/header.ts b/x-pack/plugins/security_solution/public/common/mock/header.ts
index 029ddb00d1832..66bfda1a02619 100644
--- a/x-pack/plugins/security_solution/public/common/mock/header.ts
+++ b/x-pack/plugins/security_solution/public/common/mock/header.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { ColumnHeaderOptions } from '../../../common';
+import { ColumnHeaderOptions } from '../../../common/types';
import { defaultColumnHeaderType } from '../../timelines/components/timeline/body/column_headers/default_headers';
import {
DEFAULT_COLUMN_MIN_WIDTH,
diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.tsx
index d6b1afea98592..764a13c17ce84 100644
--- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.tsx
@@ -13,7 +13,7 @@ import { useUiSetting$ } from '../../../../common/lib/kibana';
import { DEFAULT_NUMBER_FORMAT } from '../../../../../common/constants';
import * as i18n from './translations';
import { DefaultDraggable } from '../../../../common/components/draggables';
-import type { GenericBuckets } from '../../../../../common';
+import type { GenericBuckets } from '../../../../../common/search_strategy';
import type { AlertSearchResponse } from '../../../containers/detection_engine/alerts/types';
import type { AlertsCountAggregation } from './types';
diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/types.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/types.ts
index 06cdee581d3fd..b541c7234f08e 100644
--- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/types.ts
+++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/types.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import type { GenericBuckets } from '../../../../../common';
+import type { GenericBuckets } from '../../../../../common/search_strategy';
export interface AlertsCountAggregation {
alertsByGroupingCount: {
diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx
index 9568f9c894e24..a1684d6564a0a 100644
--- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx
@@ -7,7 +7,7 @@
import { mount } from 'enzyme';
import { AlertContextMenu } from './alert_context_menu';
-import { TimelineId } from '../../../../../common';
+import { TimelineId } from '../../../../../common/types';
import { TestProviders } from '../../../../common/mock';
import React from 'react';
import { Ecs } from '../../../../../common/ecs';
diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx
index 7a6ff229fbcd9..c95006866194b 100644
--- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx
@@ -23,7 +23,7 @@ import {
} from '../../../../common/components/exceptions/add_exception_modal';
import * as i18n from '../translations';
import { inputsModel, inputsSelectors, State } from '../../../../common/store';
-import { TimelineId } from '../../../../../common';
+import { TimelineId } from '../../../../../common/types';
import { AlertData, EcsHit } from '../../../../common/components/exceptions/types';
import { useQueryAlerts } from '../../../containers/detection_engine/alerts/use_query';
import { useSignalIndex } from '../../../containers/detection_engine/alerts/use_signal_index';
diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.tsx
index 21d0e132599fb..db7ba367d0ace 100644
--- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.tsx
@@ -17,7 +17,7 @@ import {
useGlobalFullScreen,
useTimelineFullScreen,
} from '../../../../common/containers/use_full_screen';
-import { TimelineId, TimelineTabs } from '../../../../../common';
+import { TimelineId, TimelineTabs } from '../../../../../common/types';
import { ACTION_INVESTIGATE_IN_RESOLVER } from '../../../../timelines/components/timeline/body/translations';
import { Ecs } from '../../../../../common/ecs';
diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_to_case_actions.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_to_case_actions.tsx
index 708c3c396d0d1..cc0ef8d4e8b79 100644
--- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_to_case_actions.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_to_case_actions.tsx
@@ -7,7 +7,8 @@
import { useMemo } from 'react';
import { useGetUserCasesPermissions, useKibana } from '../../../../common/lib/kibana';
-import { TimelineId, TimelineNonEcsData } from '../../../../../common';
+import type { TimelineNonEcsData } from '../../../../../common/search_strategy';
+import { TimelineId } from '../../../../../common/types';
import { APP_ID, APP_UI_ID } from '../../../../../common/constants';
import { useInsertTimeline } from '../../../../cases/components/use_insert_timeline';
import { Ecs } from '../../../../../common/ecs';
diff --git a/x-pack/plugins/security_solution/public/detections/components/host_isolation/helpers.ts b/x-pack/plugins/security_solution/public/detections/components/host_isolation/helpers.ts
index d0951172c21a9..32fa616831dfb 100644
--- a/x-pack/plugins/security_solution/public/detections/components/host_isolation/helpers.ts
+++ b/x-pack/plugins/security_solution/public/detections/components/host_isolation/helpers.ts
@@ -6,7 +6,7 @@
*/
import { find } from 'lodash/fp';
-import type { TimelineEventsDetailsItem } from '../../../../common';
+import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy';
export const getFieldValues = (
{
diff --git a/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.tsx b/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.tsx
index 4282a584ea9f3..a7c3cb900d7c9 100644
--- a/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.tsx
@@ -6,7 +6,7 @@
*/
import React, { useCallback, useMemo } from 'react';
import { EuiContextMenuItem } from '@elastic/eui';
-import type { TimelineEventsDetailsItem } from '../../../../common';
+import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy';
import { isIsolationSupported } from '../../../../common/endpoint/service/host_isolation/utils';
import { HostStatus } from '../../../../common/endpoint/types';
import { useIsolationPrivileges } from '../../../common/hooks/endpoint/use_isolate_privileges';
diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/query_preview/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/query_preview/index.tsx
index ca4fba4a908ff..e7cc34ef49bef 100644
--- a/x-pack/plugins/security_solution/public/detections/components/rules/query_preview/index.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/rules/query_preview/index.tsx
@@ -23,7 +23,7 @@ import { debounce } from 'lodash/fp';
import { Type } from '@kbn/securitysolution-io-ts-alerting-types';
import * as i18n from '../rule_preview/translations';
import { useMatrixHistogram } from '../../../../common/containers/matrix_histogram';
-import { MatrixHistogramType } from '../../../../../common';
+import { MatrixHistogramType } from '../../../../../common/search_strategy';
import { FieldValueQueryBar } from '../query_bar';
import { PreviewEqlQueryHistogram } from './eql_histogram';
import { useEqlPreview } from '../../../../common/hooks/eql/';
diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_histogram.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_histogram.tsx
index b7c415615f97a..5d8a787929acf 100644
--- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_histogram.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_histogram.tsx
@@ -6,7 +6,7 @@
*/
import { useMemo } from 'react';
import { useMatrixHistogram } from '../../../../common/containers/matrix_histogram';
-import { MatrixHistogramType } from '../../../../../common';
+import { MatrixHistogramType } from '../../../../../common/search_strategy';
import { convertToBuildEsQuery } from '../../../../common/lib/keury';
import { getEsQueryConfig } from '../../../../../../../../src/plugins/data/common';
import { useKibana } from '../../../../common/lib/kibana';
diff --git a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx
index a2f2ba331d959..ab9d4a6344aec 100644
--- a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx
@@ -11,7 +11,8 @@ import { waitFor } from '@testing-library/react';
import { TakeActionDropdown, TakeActionDropdownProps } from '.';
import { mockAlertDetailsData } from '../../../common/components/event_details/__mocks__';
import { mockEcsDataWithAlert } from '../../../common/mock/mock_detection_alerts';
-import { TimelineEventsDetailsItem, TimelineId } from '../../../../common';
+import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy';
+import { TimelineId } from '../../../../common/types';
import { TestProviders } from '../../../common/mock';
import { mockTimelines } from '../../../common/mock/mock_timelines_plugin';
import { createStartServicesMock } from '../../../common/lib/kibana/kibana_react.mock';
diff --git a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.tsx b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.tsx
index 84cca38014fde..3a388104d926e 100644
--- a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.tsx
@@ -9,7 +9,7 @@ import React, { useState, useCallback, useMemo } from 'react';
import { EuiContextMenuPanel, EuiButton, EuiPopover } from '@elastic/eui';
import type { ExceptionListType } from '@kbn/securitysolution-io-ts-list-types';
import { isEmpty } from 'lodash/fp';
-import { TimelineEventsDetailsItem } from '../../../../common';
+import { TimelineEventsDetailsItem } from '../../../../common/search_strategy';
import { TAKE_ACTION } from '../alerts_table/alerts_utility_bar/translations';
import { useExceptionActions } from '../alerts_table/timeline_actions/use_add_exception_actions';
import { useAlertsActions } from '../alerts_table/timeline_actions/use_alerts_actions';
diff --git a/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/columns.ts b/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/columns.ts
index 37199840ae3fb..d3ba561bcd699 100644
--- a/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/columns.ts
+++ b/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/columns.ts
@@ -12,7 +12,7 @@ import {
ALERT_STATUS,
} from '@kbn/rule-data-utils/technical_field_names';
-import { ColumnHeaderOptions } from '../../../../../common';
+import { ColumnHeaderOptions } from '../../../../../common/types';
import { defaultColumnHeaderType } from '../../../../timelines/components/timeline/body/column_headers/default_headers';
import { DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../../../../timelines/components/timeline/body/constants';
diff --git a/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.test.tsx b/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.test.tsx
index 685bc8f42b1d8..95787629079fa 100644
--- a/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.test.tsx
+++ b/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.test.tsx
@@ -17,7 +17,7 @@ import { defaultHeaders, mockTimelineData, TestProviders } from '../../../../com
import { TimelineNonEcsData } from '../../../../../common/search_strategy/timeline';
import { CellValueElementProps } from '../../../../timelines/components/timeline/cell_rendering';
import { DefaultCellRenderer } from '../../../../timelines/components/timeline/cell_rendering/default_cell_renderer';
-import { ColumnHeaderOptions } from '../../../../../common';
+import { ColumnHeaderOptions } from '../../../../../common/types';
import { RenderCellValue } from '.';
diff --git a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/columns.ts b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/columns.ts
index 45433a39d8b97..7ae54e60944cc 100644
--- a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/columns.ts
+++ b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/columns.ts
@@ -6,7 +6,7 @@
*/
import { EuiDataGridColumn } from '@elastic/eui';
-import { ColumnHeaderOptions } from '../../../../../common';
+import { ColumnHeaderOptions } from '../../../../../common/types';
import { defaultColumnHeaderType } from '../../../../timelines/components/timeline/body/column_headers/default_headers';
import { DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../../../../timelines/components/timeline/body/constants';
diff --git a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.test.tsx b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.test.tsx
index ccd71404a2216..f9dfc0625ac17 100644
--- a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.test.tsx
+++ b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.test.tsx
@@ -17,7 +17,7 @@ import { CellValueElementProps } from '../../../../timelines/components/timeline
import { DefaultCellRenderer } from '../../../../timelines/components/timeline/cell_rendering/default_cell_renderer';
import { RenderCellValue } from '.';
-import { ColumnHeaderOptions } from '../../../../../common';
+import { ColumnHeaderOptions } from '../../../../../common/types';
jest.mock('../../../../common/lib/kibana/');
diff --git a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/columns.ts b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/columns.ts
index 72aba6e186fcb..a9e5679c5b831 100644
--- a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/columns.ts
+++ b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/columns.ts
@@ -6,7 +6,7 @@
*/
import { EuiDataGridColumn } from '@elastic/eui';
-import { ColumnHeaderOptions } from '../../../../common';
+import { ColumnHeaderOptions } from '../../../../common/types';
import { defaultColumnHeaderType } from '../../../timelines/components/timeline/body/column_headers/default_headers';
import {
diff --git a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx
index a7def2a23ef1d..6087553522eb8 100644
--- a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx
+++ b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx
@@ -9,7 +9,7 @@ import { mount } from 'enzyme';
import { cloneDeep } from 'lodash/fp';
import React from 'react';
-import { ColumnHeaderOptions } from '../../../../common';
+import { ColumnHeaderOptions } from '../../../../common/types';
import { mockBrowserFields } from '../../../common/containers/source/mock';
import { DragDropContextWrapper } from '../../../common/components/drag_and_drop/drag_drop_context_wrapper';
import { defaultHeaders, mockTimelineData, TestProviders } from '../../../common/mock';
diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.tsx
index 4db6f67acb265..412c4a69ec2f5 100644
--- a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.tsx
+++ b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.tsx
@@ -11,7 +11,7 @@ import { LinkPanelListItem } from '../link_panel';
import { useRiskyHostsDashboardButtonHref } from '../../containers/overview_risky_host_links/use_risky_hosts_dashboard_button_href';
import { useRiskyHostsDashboardLinks } from '../../containers/overview_risky_host_links/use_risky_hosts_dashboard_links';
import { HostRisk } from '../../containers/overview_risky_host_links/use_hosts_risk_score';
-import { HostsRiskScore } from '../../../../common';
+import { HostsRiskScore } from '../../../../common/search_strategy';
const getListItemsFromHits = (items: HostsRiskScore[]): LinkPanelListItem[] => {
return items.map(({ host, risk_score: count, risk: copy }) => ({
diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_hosts_risk_score.ts b/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_hosts_risk_score.ts
index 15cb7ef7b1c46..eb363f4f77067 100644
--- a/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_hosts_risk_score.ts
+++ b/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_hosts_risk_score.ts
@@ -13,7 +13,7 @@ import { useAppToasts } from '../../../common/hooks/use_app_toasts';
import { useKibana } from '../../../common/lib/kibana';
import { inputsActions } from '../../../common/store/actions';
import { isIndexNotFoundError } from '../../../common/utils/exceptions';
-import { HostsRiskScore } from '../../../../common';
+import { HostsRiskScore } from '../../../../common/search_strategy';
import { useHostsRiskScoreComplete } from './use_hosts_risk_score_complete';
import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features';
import { getHostRiskIndex } from '../../../helpers';
diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_hosts_risk_score_complete.ts b/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_hosts_risk_score_complete.ts
index f925339e68490..959fb94c5bbd7 100644
--- a/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_hosts_risk_score_complete.ts
+++ b/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_hosts_risk_score_complete.ts
@@ -16,7 +16,7 @@ import {
HostsQueries,
HostsRiskScoreRequestOptions,
HostsRiskScoreStrategyResponse,
-} from '../../../../common';
+} from '../../../../common/search_strategy';
type GetHostsRiskScoreProps = HostsRiskScoreRequestOptions & {
data: DataPublicPluginStart;
diff --git a/x-pack/plugins/security_solution/public/timelines/components/create_field_button/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/create_field_button/index.test.tsx
index 1708509b31864..59dcf350e9aba 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/create_field_button/index.test.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/create_field_button/index.test.tsx
@@ -16,7 +16,7 @@ import {
import { TestProviders } from '../../../common/mock';
import { useKibana } from '../../../common/lib/kibana';
import type { DataView } from '../../../../../../../src/plugins/data/common';
-import { TimelineId } from '../../../../common';
+import { TimelineId } from '../../../../common/types';
const useKibanaMock = useKibana as jest.Mocked;
diff --git a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_items.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_items.tsx
index 73fb7c19a6f46..bb95c615d874e 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_items.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_items.tsx
@@ -17,7 +17,7 @@ import type { BrowserFields } from '../../../common/containers/source';
import { getColumnsWithTimestamp } from '../../../common/components/event_details/helpers';
import type { OnUpdateColumns } from '../timeline/events';
import { FieldName } from './field_name';
-import type { ColumnHeaderOptions } from '../../../../common';
+import type { ColumnHeaderOptions } from '../../../../common/types';
import { useKibana } from '../../../common/lib/kibana';
const DraggableFieldsBrowserFieldComponent = ({
diff --git a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_name.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_name.tsx
index e833b8411cd9f..6e9672d08b366 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_name.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_name.tsx
@@ -11,7 +11,7 @@ import styled from 'styled-components';
import { OnUpdateColumns } from '../timeline/events';
import { WithHoverActions } from '../../../common/components/with_hover_actions';
-import { ColumnHeaderOptions } from '../../../../common';
+import { ColumnHeaderOptions } from '../../../../common/types';
import { HoverActions } from '../../../common/components/hover_actions';
import { TimelineContext } from '../../../../../timelines/public';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.test.tsx
index 7dc0a98461760..f5086fd1a83da 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.test.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.test.tsx
@@ -10,7 +10,7 @@ import { waitFor } from '@testing-library/react';
import { FormattedIp } from './index';
import { TestProviders } from '../../../common/mock';
-import { TimelineId, TimelineTabs } from '../../../../common';
+import { TimelineId, TimelineTabs } from '../../../../common/types';
import { StatefulEventContext } from '../../../../../timelines/public';
import { timelineActions } from '../../store/timeline';
import { activeTimeline } from '../../containers/active_timeline_context';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/footer.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/footer.tsx
index 50fe19f4d804a..70f3e7004fb8e 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/footer.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/footer.tsx
@@ -10,7 +10,8 @@ import { EuiFlyoutFooter, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { find, get, isEmpty } from 'lodash/fp';
import { connect, ConnectedProps } from 'react-redux';
import { TakeActionDropdown } from '../../../../detections/components/take_action_dropdown';
-import { TimelineEventsDetailsItem, TimelineId } from '../../../../../common';
+import type { TimelineEventsDetailsItem } from '../../../../../common/search_strategy';
+import { TimelineId } from '../../../../../common/types';
import { useExceptionModal } from '../../../../detections/components/alerts_table/timeline_actions/use_add_exception_modal';
import { AddExceptionModalWrapper } from '../../../../detections/components/alerts_table/timeline_actions/alert_context_menu';
import { EventFiltersFlyout } from '../../../../management/pages/event_filters/view/components/flyout';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx
index 947786695ded3..224662f0fd6ab 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx
@@ -31,7 +31,7 @@ import {
import { getFieldValue } from '../../../../detections/components/host_isolation/helpers';
import { ALERT_DETAILS } from './translations';
import { useWithCaseDetailsRefresh } from '../../../../common/components/endpoint/host_isolation/endpoint_host_isolation_cases_context';
-import { TimelineNonEcsData } from '../../../../../common';
+import { TimelineNonEcsData } from '../../../../../common/search_strategy';
import { Ecs } from '../../../../../common/ecs';
import { EventDetailsFooter } from './footer';
import { EntityType } from '../../../../../../timelines/common';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/actions/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/actions/index.tsx
index 8795255dfcfd4..1306509a87a54 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/actions/index.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/actions/index.tsx
@@ -8,7 +8,7 @@
import { EuiButtonIcon } from '@elastic/eui';
import React, { useCallback } from 'react';
-import { ColumnHeaderOptions } from '../../../../../../../common';
+import { ColumnHeaderOptions } from '../../../../../../../common/types';
import { OnColumnRemoved } from '../../../events';
import { EventsHeadingExtra, EventsLoading } from '../../../styles';
import { Sort } from '../../sort';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/default_headers.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/default_headers.ts
index 7eb98b7475952..58e8d1869233f 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/default_headers.ts
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/default_headers.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { ColumnHeaderOptions } from '../../../../../../common';
+import { ColumnHeaderOptions } from '../../../../../../common/types';
import { ColumnHeaderType } from '../../../../store/timeline/model';
import { DEFAULT_COLUMN_MIN_WIDTH, DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../constants';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.tsx
index 828b8d8701188..b897fef57f076 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.tsx
@@ -8,7 +8,7 @@
import { noop } from 'lodash/fp';
import React from 'react';
-import { ColumnHeaderOptions } from '../../../../../../../common';
+import { ColumnHeaderOptions } from '../../../../../../../common/types';
import { DEFAULT_COLUMN_MIN_WIDTH } from '../../constants';
import { OnFilterChange } from '../../../events';
import { TextFilter } from '../text_filter';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.tsx
index 18b407a035708..166a4c2da871c 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.tsx
@@ -10,7 +10,7 @@ import React, { useCallback, useMemo } from 'react';
import { useDispatch } from 'react-redux';
import { isDataViewFieldSubtypeNested } from '@kbn/es-query';
-import { ColumnHeaderOptions } from '../../../../../../../common';
+import { ColumnHeaderOptions } from '../../../../../../../common/types';
import {
useDeepEqualSelector,
useShallowEqualSelector,
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx
index b33e47dd27b96..8f64b4e7e6db3 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx
@@ -9,7 +9,7 @@ import { mount, shallow } from 'enzyme';
import { cloneDeep } from 'lodash/fp';
import React from 'react';
-import { ColumnHeaderOptions } from '../../../../../../../common';
+import { ColumnHeaderOptions } from '../../../../../../../common/types';
import { defaultHeaders } from '../../../../../../common/mock';
import { HeaderToolTipContent } from '.';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.tsx
index 017ba82e8e33c..4be37de54b365 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.tsx
@@ -10,7 +10,7 @@ import { isEmpty } from 'lodash/fp';
import React from 'react';
import styled from 'styled-components';
-import { ColumnHeaderOptions } from '../../../../../../../common';
+import { ColumnHeaderOptions } from '../../../../../../../common/types';
import { getIconFromType } from '../../../../../../common/components/event_details/helpers';
import * as i18n from '../translations';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts
index 60118b1e55e58..b1ea4899615a6 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts
@@ -6,7 +6,7 @@
*/
import { get } from 'lodash/fp';
-import { ColumnHeaderOptions } from '../../../../../../common';
+import { ColumnHeaderOptions } from '../../../../../../common/types';
import { BrowserFields } from '../../../../../common/containers/source';
import { DEFAULT_COLUMN_MIN_WIDTH, DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../constants';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_row_renderer/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_row_renderer/index.tsx
index 7124a3de968ba..d71dfcae1b4e6 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_row_renderer/index.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_row_renderer/index.tsx
@@ -14,7 +14,7 @@ import {
ARIA_ROWINDEX_ATTRIBUTE,
getRowRendererClassName,
} from '../../../../../../../../timelines/public';
-import { RowRenderer } from '../../../../../../../common';
+import { RowRenderer } from '../../../../../../../common/types';
import { BrowserFields } from '../../../../../../common/containers/source';
import { TimelineItem } from '../../../../../../../common/search_strategy/timeline';
import { getRowRenderer } from '../../renderers/get_row_renderer';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx
index 79836b0ac1e4e..dcfb0efc11455 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx
@@ -9,7 +9,7 @@ import { shallow } from 'enzyme';
import { cloneDeep } from 'lodash/fp';
import React from 'react';
-import { RowRenderer } from '../../../../../../../common';
+import { RowRenderer } from '../../../../../../../common/types';
import { BrowserFields } from '../../../../../../common/containers/source';
import { mockBrowserFields } from '../../../../../../common/containers/source/mock';
import { Ecs } from '../../../../../../../common/ecs';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts
index d05386c2504c5..9dd17ee9ffed9 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts
@@ -9,7 +9,7 @@ import type React from 'react';
import type { Filter } from '@kbn/es-query';
import { BrowserFields } from '../../../../../../../timelines/common/search_strategy';
-import { ColumnHeaderOptions, RowRenderer } from '../../../../../../common';
+import { ColumnHeaderOptions, RowRenderer } from '../../../../../../common/types';
import { Ecs } from '../../../../../../common/ecs';
import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_rows.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_rows.tsx
index 8de9692a116fa..cc4d3eeee2533 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_rows.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_rows.tsx
@@ -11,7 +11,7 @@ import React, { Fragment } from 'react';
import styled from 'styled-components';
import { ENRICHMENT_DESTINATION_PATH } from '../../../../../../../common/constants';
-import { RowRenderer } from '../../../../../../../common';
+import { RowRenderer } from '../../../../../../../common/types';
import { Fields } from '../../../../../../../common/search_strategy';
import { ID_FIELD_NAME } from '../../../../../../common/components/event_details/event_id';
import { RowRendererContainer } from '../row_renderer';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.tsx
index a3a6618e7d07a..334bfa76b84e1 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.tsx
@@ -6,7 +6,7 @@
*/
import React from 'react';
-import { ColumnHeaderOptions } from '../../../../../../common';
+import { ColumnHeaderOptions } from '../../../../../../common/types';
import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline';
import {
DraggableWrapper,
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.ts
index 2d1be6ee7914a..cb6ea7760842b 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.ts
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { RowRenderer } from '../../../../../../common';
+import { RowRenderer } from '../../../../../../common/types';
import { Ecs } from '../../../../../../common/ecs';
export const getRowRenderer = (ecs: Ecs, rowRenderers: RowRenderer[]): RowRenderer | null =>
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_name.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_name.test.tsx
index 1bbfc837ebd62..bf92417c8023a 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_name.test.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_name.test.tsx
@@ -10,7 +10,7 @@ import { waitFor } from '@testing-library/react';
import { HostName } from './host_name';
import { TestProviders } from '../../../../../common/mock';
-import { TimelineId, TimelineTabs } from '../../../../../../common';
+import { TimelineId, TimelineTabs } from '../../../../../../common/types';
import { StatefulEventContext } from '../../../../../../../timelines/public';
import { timelineActions } from '../../../../store/timeline';
import { activeTimeline } from '../../../../containers/active_timeline_context';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/index.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/index.ts
index 11c501f9426f4..9a68a8b658149 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/index.ts
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/index.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { RowRenderer } from '../../../../../../common';
+import { RowRenderer } from '../../../../../../common/types';
import { auditdRowRenderers } from './auditd/generic_row_renderer';
import { ColumnRenderer } from './column_renderer';
import { emptyColumnRenderer } from './empty_column_renderer';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx
index f00eb332c564b..35e8647bc413d 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx
@@ -9,7 +9,7 @@ import { head } from 'lodash/fp';
import React from 'react';
import type { Filter } from '@kbn/es-query';
-import { ColumnHeaderOptions } from '../../../../../../common';
+import { ColumnHeaderOptions } from '../../../../../../common/types';
import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline';
import { getEmptyTagValue } from '../../../../../common/components/empty_value';
import { ColumnRenderer } from './column_renderer';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.test.tsx
index 8fdd6483a14f8..f71db57c1b42a 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.test.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.test.tsx
@@ -13,12 +13,9 @@ import { REASON_FIELD_NAME } from './constants';
import { reasonColumnRenderer } from './reason_column_renderer';
import { plainColumnRenderer } from './plain_column_renderer';
-import {
- BrowserFields,
- ColumnHeaderOptions,
- RowRenderer,
- RowRendererId,
-} from '../../../../../../common';
+import { RowRendererId, ColumnHeaderOptions, RowRenderer } from '../../../../../../common/types';
+import { BrowserFields } from '../../../../../../common/search_strategy';
+
import { render } from '@testing-library/react';
import { TestProviders } from '../../../../../../../timelines/public/mock';
import { useDraggableKeyboardWrapper as mockUseDraggableKeyboardWrapper } from '../../../../../../../timelines/public/components';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.tsx
index b3f145beb886b..a5ba7360c966f 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.tsx
@@ -9,7 +9,8 @@ import { EuiSpacer, EuiPanel } from '@elastic/eui';
import { isEqual } from 'lodash/fp';
import React, { useMemo } from 'react';
-import { BrowserFields, ColumnHeaderOptions, RowRenderer } from '../../../../../../common';
+import { ColumnHeaderOptions, RowRenderer } from '../../../../../../common/types';
+import { BrowserFields } from '../../../../../../common/search_strategy';
import { Ecs } from '../../../../../../common/ecs';
import { eventRendererNames } from '../../../row_renderers_browser/catalog/constants';
import { ColumnRenderer } from './column_renderer';
diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.test.tsx
index 983ee00ef9b6b..ae2caa8ce8401 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.test.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.test.tsx
@@ -81,7 +81,7 @@ import {
EndpointAlertCriteria,
} from './generic_row_renderer';
import * as i18n from './translations';
-import { RowRenderer } from '../../../../../../../common';
+import { RowRenderer } from '../../../../../../../common/types';
jest.mock('../../../../../../common/lib/kibana');
diff --git a/x-pack/plugins/security_solution/public/ueba/components/host_rules_table/columns.tsx b/x-pack/plugins/security_solution/public/ueba/components/host_rules_table/columns.tsx
index 456a0bbe898ea..1393f11189cca 100644
--- a/x-pack/plugins/security_solution/public/ueba/components/host_rules_table/columns.tsx
+++ b/x-pack/plugins/security_solution/public/ueba/components/host_rules_table/columns.tsx
@@ -17,7 +17,7 @@ import { Provider } from '../../../timelines/components/timeline/data_providers/
import { HostRulesColumns } from './';
import * as i18n from './translations';
-import { HostRulesFields } from '../../../../common';
+import { HostRulesFields } from '../../../../common/search_strategy';
export const getHostRulesColumns = (): HostRulesColumns => [
{
diff --git a/x-pack/plugins/security_solution/public/ueba/components/host_rules_table/index.tsx b/x-pack/plugins/security_solution/public/ueba/components/host_rules_table/index.tsx
index 3d369a56a7bc0..540ad05d1da8b 100644
--- a/x-pack/plugins/security_solution/public/ueba/components/host_rules_table/index.tsx
+++ b/x-pack/plugins/security_solution/public/ueba/components/host_rules_table/index.tsx
@@ -18,13 +18,12 @@ import { useDeepEqualSelector } from '../../../common/hooks/use_selector';
import { uebaActions, uebaModel, uebaSelectors } from '../../store';
import { getHostRulesColumns } from './columns';
import * as i18n from './translations';
-import {
+import type {
HostRulesEdges,
HostRulesItem,
HostRulesSortField,
- HostRulesFields,
-} from '../../../../common';
-import { Direction } from '../../../../common/search_strategy';
+} from '../../../../common/search_strategy';
+import { Direction, HostRulesFields } from '../../../../common/search_strategy';
import { HOST_RULES } from '../../pages/translations';
import { rowItems } from '../utils';
diff --git a/x-pack/plugins/security_solution/public/ueba/components/host_tactics_table/columns.tsx b/x-pack/plugins/security_solution/public/ueba/components/host_tactics_table/columns.tsx
index 68e1195a9c7eb..0f635cc8cd198 100644
--- a/x-pack/plugins/security_solution/public/ueba/components/host_tactics_table/columns.tsx
+++ b/x-pack/plugins/security_solution/public/ueba/components/host_tactics_table/columns.tsx
@@ -17,7 +17,7 @@ import { Provider } from '../../../timelines/components/timeline/data_providers/
import { HostTacticsColumns } from './';
import * as i18n from './translations';
-import { HostTacticsFields } from '../../../../common';
+import { HostTacticsFields } from '../../../../common/search_strategy';
export const getHostTacticsColumns = (): HostTacticsColumns => [
{
diff --git a/x-pack/plugins/security_solution/public/ueba/components/host_tactics_table/index.tsx b/x-pack/plugins/security_solution/public/ueba/components/host_tactics_table/index.tsx
index 28bd3d6ad43a0..8b5d9bbd65635 100644
--- a/x-pack/plugins/security_solution/public/ueba/components/host_tactics_table/index.tsx
+++ b/x-pack/plugins/security_solution/public/ueba/components/host_tactics_table/index.tsx
@@ -23,8 +23,8 @@ import {
HostTacticsItem,
HostTacticsSortField,
HostTacticsFields,
-} from '../../../../common';
-import { Direction } from '../../../../common/search_strategy';
+ Direction,
+} from '../../../../common/search_strategy';
import { HOST_TACTICS } from '../../pages/translations';
import { rowItems } from '../utils';
diff --git a/x-pack/plugins/security_solution/public/ueba/components/risk_score_table/index.tsx b/x-pack/plugins/security_solution/public/ueba/components/risk_score_table/index.tsx
index 9e9c6f81a43bb..516068d40eb0e 100644
--- a/x-pack/plugins/security_solution/public/ueba/components/risk_score_table/index.tsx
+++ b/x-pack/plugins/security_solution/public/ueba/components/risk_score_table/index.tsx
@@ -18,13 +18,12 @@ import { useDeepEqualSelector } from '../../../common/hooks/use_selector';
import { uebaActions, uebaModel, uebaSelectors } from '../../store';
import { getRiskScoreColumns } from './columns';
import * as i18n from './translations';
-import {
+import type {
RiskScoreEdges,
RiskScoreItem,
RiskScoreSortField,
- RiskScoreFields,
-} from '../../../../common';
-import { Direction } from '../../../../common/search_strategy';
+} from '../../../../common/search_strategy';
+import { RiskScoreFields, Direction } from '../../../../common/search_strategy';
import { rowItems } from '../utils';
const tableType = uebaModel.UebaTableType.riskScore;
diff --git a/x-pack/plugins/security_solution/public/ueba/containers/host_rules/index.tsx b/x-pack/plugins/security_solution/public/ueba/containers/host_rules/index.tsx
index 7db1a77244bbe..7771d470b1556 100644
--- a/x-pack/plugins/security_solution/public/ueba/containers/host_rules/index.tsx
+++ b/x-pack/plugins/security_solution/public/ueba/containers/host_rules/index.tsx
@@ -23,7 +23,7 @@ import {
UebaQueries,
HostRulesRequestOptions,
HostRulesStrategyResponse,
-} from '../../../../common';
+} from '../../../../common/search_strategy';
import { ESTermQuery } from '../../../../common/typed_json';
import * as i18n from './translations';
diff --git a/x-pack/plugins/security_solution/public/ueba/containers/host_tactics/index.tsx b/x-pack/plugins/security_solution/public/ueba/containers/host_tactics/index.tsx
index 35dd2a0b08d4e..42f5707bae6e3 100644
--- a/x-pack/plugins/security_solution/public/ueba/containers/host_tactics/index.tsx
+++ b/x-pack/plugins/security_solution/public/ueba/containers/host_tactics/index.tsx
@@ -23,7 +23,7 @@ import {
UebaQueries,
HostTacticsRequestOptions,
HostTacticsStrategyResponse,
-} from '../../../../common';
+} from '../../../../common/search_strategy';
import { ESTermQuery } from '../../../../common/typed_json';
import * as i18n from './translations';
diff --git a/x-pack/plugins/security_solution/public/ueba/containers/risk_score/index.tsx b/x-pack/plugins/security_solution/public/ueba/containers/risk_score/index.tsx
index f2f353ffc0cff..cc27c614f5897 100644
--- a/x-pack/plugins/security_solution/public/ueba/containers/risk_score/index.tsx
+++ b/x-pack/plugins/security_solution/public/ueba/containers/risk_score/index.tsx
@@ -23,7 +23,7 @@ import {
UebaQueries,
RiskScoreRequestOptions,
RiskScoreStrategyResponse,
-} from '../../../../common';
+} from '../../../../common/search_strategy';
import { ESTermQuery } from '../../../../common/typed_json';
import * as i18n from './translations';
diff --git a/x-pack/plugins/security_solution/public/ueba/containers/user_rules/index.tsx b/x-pack/plugins/security_solution/public/ueba/containers/user_rules/index.tsx
index 3c4e45bd3a1e5..21376d82eb17a 100644
--- a/x-pack/plugins/security_solution/public/ueba/containers/user_rules/index.tsx
+++ b/x-pack/plugins/security_solution/public/ueba/containers/user_rules/index.tsx
@@ -22,7 +22,7 @@ import {
UserRulesRequestOptions,
UserRulesStrategyResponse,
UserRulesStrategyUserResponse,
-} from '../../../../common';
+} from '../../../../common/search_strategy';
import { ESTermQuery } from '../../../../common/typed_json';
import * as i18n from './translations';
diff --git a/x-pack/plugins/security_solution/public/ueba/pages/navigation/user_rules_query_tab_body.tsx b/x-pack/plugins/security_solution/public/ueba/pages/navigation/user_rules_query_tab_body.tsx
index f7542b7b4b8a6..684b5cc12eaf9 100644
--- a/x-pack/plugins/security_solution/public/ueba/pages/navigation/user_rules_query_tab_body.tsx
+++ b/x-pack/plugins/security_solution/public/ueba/pages/navigation/user_rules_query_tab_body.tsx
@@ -13,7 +13,7 @@ import { HostQueryProps } from './types';
import { manageQuery } from '../../../common/components/page/manage_query';
import { HostRulesTable } from '../../components/host_rules_table';
import { uebaModel } from '../../store';
-import { UserRulesFields } from '../../../../common';
+import { UserRulesFields } from '../../../../common/search_strategy';
const UserRulesTableManage = manageQuery(HostRulesTable);
diff --git a/x-pack/plugins/security_solution/public/ueba/pages/ueba.tsx b/x-pack/plugins/security_solution/public/ueba/pages/ueba.tsx
index 0c837e60cd2dc..c553052b35319 100644
--- a/x-pack/plugins/security_solution/public/ueba/pages/ueba.tsx
+++ b/x-pack/plugins/security_solution/public/ueba/pages/ueba.tsx
@@ -21,7 +21,7 @@ import { SiemSearchBar } from '../../common/components/search_bar';
import { SecuritySolutionPageWrapper } from '../../common/components/page_wrapper';
import { useGlobalFullScreen } from '../../common/containers/use_full_screen';
import { useGlobalTime } from '../../common/containers/use_global_time';
-import { TimelineId } from '../../../common';
+import { TimelineId } from '../../../common/types';
import { LastEventIndexKey } from '../../../common/search_strategy';
import { useKibana } from '../../common/lib/kibana';
import { convertToBuildEsQuery } from '../../common/lib/keury';
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/get_strategy.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/get_strategy.ts
index 3c4b1cd0ef373..15164842fe0d6 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/get_strategy.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/get_strategy.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { assertUnreachable } from '../../../../../../common';
+import { assertUnreachable } from '../../../../../../common/utility_types';
import type { ConfigType } from '../../../../../config';
import { MergeStrategyFunction } from '../types';
import { mergeAllFieldsWithSource } from './merge_all_fields_with_source';
diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.test.ts
index 1d4d9b1e0f2ea..18dcdfe103b1f 100644
--- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.test.ts
+++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.test.ts
@@ -9,7 +9,7 @@ import * as module from './helpers';
import { savePinnedEvents } from '../../../saved_object/pinned_events';
import { getNote } from '../../../saved_object/notes';
import { FrameworkRequest } from '../../../../framework';
-import { SavedTimeline } from '../../../../../../common';
+import { SavedTimeline } from '../../../../../../common/types';
import { mockTemplate, mockTimeline } from '../../../__mocks__/create_timelines';
import { buildFrameworkRequest } from '../../../utils/common';
import { SecurityPluginSetup } from '../../../../../../../security/server';
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/risk_score/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/risk_score/index.ts
index a609a8b356f10..94504afcc6c02 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/risk_score/index.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/risk_score/index.ts
@@ -10,7 +10,7 @@ import {
HostsRiskScoreRequestOptions,
HostsQueries,
HostsRiskScoreStrategyResponse,
-} from '../../../../../../common';
+} from '../../../../../../common/search_strategy';
import type { IEsSearchResponse } from '../../../../../../../../../src/plugins/data/common';
import { inspectStringifyObject } from '../../../../../utils/build_query';
import { buildHostsRiskScoreQuery } from './query.hosts_risk.dsl';
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/risk_score/query.hosts_risk.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/risk_score/query.hosts_risk.dsl.ts
index 5bbc9b7726002..05bb496a7444e 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/risk_score/query.hosts_risk.dsl.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/risk_score/query.hosts_risk.dsl.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { HostsRiskScoreRequestOptions } from '../../../../../../common';
+import { HostsRiskScoreRequestOptions } from '../../../../../../common/search_strategy';
export const buildHostsRiskScoreQuery = ({
timerange,
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/index.ts
index b97b8ed4f6549..59985a927aa8f 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/index.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/index.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { MatrixHistogramTypeToAggName } from '../../../../../../common';
+import { MatrixHistogramTypeToAggName } from '../../../../../../common/search_strategy';
import { buildAlertsHistogramQuery } from './query.alerts_histogram.dsl';
export const alertsMatrixHistogramConfig = {
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/index.ts
index ec307173ec20c..c7e67566acfc2 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/index.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/index.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { MatrixHistogramTypeToAggName } from '../../../../../../common';
+import { MatrixHistogramTypeToAggName } from '../../../../../../common/search_strategy';
import { buildAnomaliesHistogramQuery } from './query.anomalies_histogram.dsl';
export const anomaliesMatrixHistogramConfig = {
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/index.ts
index 17f7d78167232..bde058942f2bb 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/index.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/index.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { MatrixHistogramTypeToAggName } from '../../../../../../common';
+import { MatrixHistogramTypeToAggName } from '../../../../../../common/search_strategy';
import { getEntitiesParser } from '../helpers';
import { buildAuthenticationsHistogramQuery } from './query.authentications_histogram.dsl';
import { buildAuthenticationsHistogramQueryEntities } from './query.authentications_histogram_entities.dsl';
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/index.ts
index 643b3f657ef0c..f52a760db842e 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/index.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/index.ts
@@ -7,7 +7,7 @@
import { buildDnsHistogramQuery } from './query.dns_histogram.dsl';
import { getDnsParsedData } from './helpers';
-import { MatrixHistogramTypeToAggName } from '../../../../../../common';
+import { MatrixHistogramTypeToAggName } from '../../../../../../common/search_strategy';
export const dnsMatrixHistogramConfig = {
buildDsl: buildDnsHistogramQuery,
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/index.ts
index a280950c37cd6..954cd6509e2b0 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/index.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/index.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { MatrixHistogramTypeToAggName } from '../../../../../../common';
+import { MatrixHistogramTypeToAggName } from '../../../../../../common/search_strategy';
import { buildEventsHistogramQuery } from './query.events_histogram.dsl';
export const eventsMatrixHistogramConfig = {
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/preview/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/preview/__mocks__/index.ts
index 2ff4831616ab9..12d46c4be2282 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/preview/__mocks__/index.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/preview/__mocks__/index.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { MatrixHistogramType } from '../../../../../../../common';
+import { MatrixHistogramType } from '../../../../../../../common/search_strategy';
export const mockOptions = {
defaultIndex: ['.siem-preview-signals-default'],
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/preview/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/preview/index.ts
index 51e45035f420d..0ca14c5489c56 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/preview/index.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/preview/index.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { MatrixHistogramTypeToAggName } from '../../../../../../common';
+import { MatrixHistogramTypeToAggName } from '../../../../../../common/search_strategy';
import { buildPreviewHistogramQuery } from './query.preview_histogram.dsl';
export const previewMatrixHistogramConfig = {
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_rules/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_rules/helpers.ts
index f9c94eea3ff29..8b8f6ec204e98 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_rules/helpers.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_rules/helpers.ts
@@ -6,7 +6,11 @@
*/
import { getOr } from 'lodash/fp';
-import { HostRulesHit, HostRulesEdges, HostRulesFields } from '../../../../../../common';
+import {
+ HostRulesHit,
+ HostRulesEdges,
+ HostRulesFields,
+} from '../../../../../../common/search_strategy';
export const formatHostRulesData = (buckets: HostRulesHit[]): HostRulesEdges[] =>
buckets.map((bucket) => ({
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_rules/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_rules/index.ts
index 78a1cfe20d212..fb1416070ddc0 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_rules/index.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_rules/index.ts
@@ -12,7 +12,7 @@ import {
HostRulesRequestOptions,
HostRulesStrategyResponse,
UebaQueries,
-} from '../../../../../../common';
+} from '../../../../../../common/search_strategy';
import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants';
import { buildHostRulesQuery } from './query.host_rules.dsl';
import type { IEsSearchResponse } from '../../../../../../../../../src/plugins/data/common';
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_tactics/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_tactics/helpers.ts
index b20cf4582c824..6e8a9e0f43b2f 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_tactics/helpers.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_tactics/helpers.ts
@@ -11,7 +11,7 @@ import {
HostTacticsEdges,
HostTacticsFields,
HostTechniqueHit,
-} from '../../../../../../common';
+} from '../../../../../../common/search_strategy';
export const formatHostTacticsData = (buckets: HostTacticsHit[]): HostTacticsEdges[] =>
buckets.reduce((acc: HostTacticsEdges[], bucket) => {
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_tactics/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_tactics/index.ts
index c90ad5a311790..86d6bc6f75b6f 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_tactics/index.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_tactics/index.ts
@@ -8,11 +8,11 @@
import { getOr } from 'lodash/fp';
import { SecuritySolutionFactory } from '../../types';
import {
+ UebaQueries,
HostTacticsEdges,
HostTacticsRequestOptions,
HostTacticsStrategyResponse,
- UebaQueries,
-} from '../../../../../../common';
+} from '../../../../../../common/search_strategy';
import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants';
import { buildHostTacticsQuery } from './query.host_tactics.dsl';
import type { IEsSearchResponse } from '../../../../../../../../../src/plugins/data/common';
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/risk_score/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/risk_score/helpers.ts
index ace2faf819877..4ef866f2fd705 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/risk_score/helpers.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/risk_score/helpers.ts
@@ -6,7 +6,7 @@
*/
import { getOr } from 'lodash/fp';
-import { RiskScoreHit, RiskScoreEdges } from '../../../../../../common';
+import { RiskScoreHit, RiskScoreEdges } from '../../../../../../common/search_strategy';
export const formatRiskScoreData = (buckets: RiskScoreHit[]): RiskScoreEdges[] =>
buckets.map((bucket) => ({
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/risk_score/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/risk_score/index.ts
index 8e65b53c3e68d..cc55d83828426 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/risk_score/index.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/risk_score/index.ts
@@ -8,11 +8,11 @@
import { getOr } from 'lodash/fp';
import { SecuritySolutionFactory } from '../../types';
import {
+ UebaQueries,
RiskScoreEdges,
RiskScoreRequestOptions,
RiskScoreStrategyResponse,
- UebaQueries,
-} from '../../../../../../common';
+} from '../../../../../../common/search_strategy';
import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants';
import { buildRiskScoreQuery } from './query.risk_score.dsl';
import type { IEsSearchResponse } from '../../../../../../../../../src/plugins/data/common';
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/user_rules/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/user_rules/helpers.ts
index c0f38af37c1f5..02b284e6bd200 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/user_rules/helpers.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/user_rules/helpers.ts
@@ -6,7 +6,11 @@
*/
import { getOr } from 'lodash/fp';
-import { UserRulesHit, UserRulesFields, UserRulesByUser } from '../../../../../../common';
+import {
+ UserRulesHit,
+ UserRulesFields,
+ UserRulesByUser,
+} from '../../../../../../common/search_strategy';
import { formatHostRulesData } from '../host_rules/helpers';
export const formatUserRulesData = (buckets: UserRulesHit[]): UserRulesByUser[] =>
diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/user_rules/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/user_rules/index.ts
index 8a5099618d109..872aa546d6553 100644
--- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/user_rules/index.ts
+++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/user_rules/index.ts
@@ -14,7 +14,7 @@ import {
UserRulesRequestOptions,
UserRulesStrategyResponse,
UsersRulesHit,
-} from '../../../../../../common';
+} from '../../../../../../common/search_strategy';
import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants';
import { buildUserRulesQuery } from './query.user_rules.dsl';
import type { IEsSearchResponse } from '../../../../../../../../../src/plugins/data/common';
diff --git a/x-pack/test/common/services/security_solution/roles_users_utils.ts b/x-pack/test/common/services/security_solution/roles_users_utils.ts
index dd184c6a94b46..681e710aa896c 100644
--- a/x-pack/test/common/services/security_solution/roles_users_utils.ts
+++ b/x-pack/test/common/services/security_solution/roles_users_utils.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { assertUnreachable } from '../../../../plugins/security_solution/common';
+import { assertUnreachable } from '../../../../plugins/security_solution/common/utility_types';
import { FtrProviderContext } from '../../ftr_provider_context';
import {
t1AnalystUser,
From 2ef888f3e3636f06a126804619344b44846ac96e Mon Sep 17 00:00:00 2001
From: Paul Tavares <56442535+paul-tavares@users.noreply.github.com>
Date: Thu, 2 Dec 2021 14:19:09 -0500
Subject: [PATCH 15/65] [Security Solution][Endpoint] Remove (don't register)
Endpoint Trusted Apps specific APIs (#120134)
* change trusted apps data loader script to use exceptions API
* Comment out registration of Trusted Apps API routes
---
.../scripts/endpoint/trusted_apps/index.ts | 49 ++++-
.../endpoint/routes/trusted_apps/index.ts | 173 +++++++++---------
2 files changed, 127 insertions(+), 95 deletions(-)
diff --git a/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts b/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts
index 97695ec60062c..ad0f9cb5dae49 100644
--- a/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts
+++ b/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts
@@ -11,7 +11,14 @@ import { KbnClient } from '@kbn/test';
import pMap from 'p-map';
import { basename } from 'path';
import { AxiosResponse } from 'axios';
-import { TRUSTED_APPS_CREATE_API, TRUSTED_APPS_LIST_API } from '../../../common/endpoint/constants';
+import {
+ ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION,
+ ENDPOINT_TRUSTED_APPS_LIST_ID,
+ ENDPOINT_TRUSTED_APPS_LIST_NAME,
+ EXCEPTION_LIST_ITEM_URL,
+ EXCEPTION_LIST_URL,
+} from '@kbn/securitysolution-list-constants';
+import { CreateExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types';
import { TrustedApp } from '../../../common/endpoint/types';
import { TrustedAppGenerator } from '../../../common/endpoint/data_generators/trusted_app_generator';
import { indexFleetEndpointPolicy } from '../../../common/endpoint/data_loaders/index_fleet_endpoint_policy';
@@ -21,6 +28,7 @@ import {
PACKAGE_POLICY_API_ROUTES,
PACKAGE_POLICY_SAVED_OBJECT_TYPE,
} from '../../../../fleet/common';
+import { newTrustedAppToCreateExceptionListItem } from '../../../public/management/pages/trusted_apps/service/mappers';
const defaultLogger = new ToolingLog({ level: 'info', writeTo: process.stdout });
const separator = '----------------------------------------';
@@ -76,17 +84,14 @@ export const run: (options?: RunOptions) => Promise = async ({
url: kibana,
});
- // touch the Trusted Apps List so it can be created
- // and
// setup fleet with endpoint integrations
+ // and
+ // and ensure the trusted apps list is created
logger.info('setting up Fleet with endpoint and creating trusted apps list');
const [installedEndpointPackage] = await Promise.all([
setupFleetForEndpoint(kbnClient).then((response) => response.endpointPackage),
- kbnClient.request({
- method: 'GET',
- path: TRUSTED_APPS_LIST_API,
- }),
+ ensureCreateEndpointTrustedAppsList(kbnClient),
]);
// Setup a list of real endpoint policies and return a method to randomly select one
@@ -125,8 +130,8 @@ export const run: (options?: RunOptions) => Promise = async ({
return kbnClient
.request({
method: 'POST',
- path: TRUSTED_APPS_CREATE_API,
- body,
+ path: EXCEPTION_LIST_ITEM_URL,
+ body: newTrustedAppToCreateExceptionListItem(body),
})
.then(({ data }) => {
logger.write(data.id);
@@ -176,3 +181,29 @@ const fetchEndpointPolicies = (
},
});
};
+
+const ensureCreateEndpointTrustedAppsList = async (kbn: KbnClient) => {
+ const newListDefinition: CreateExceptionListSchema = {
+ description: ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION,
+ list_id: ENDPOINT_TRUSTED_APPS_LIST_ID,
+ meta: undefined,
+ name: ENDPOINT_TRUSTED_APPS_LIST_NAME,
+ os_types: [],
+ tags: [],
+ type: 'endpoint',
+ namespace_type: 'agnostic',
+ };
+
+ await kbn
+ .request({
+ method: 'POST',
+ path: EXCEPTION_LIST_URL,
+ body: newListDefinition,
+ })
+ .catch((e) => {
+ // Ignore if list was already created
+ if (e.response.status !== 409) {
+ throw e;
+ }
+ });
+};
diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/index.ts b/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/index.ts
index 1d5df9c6e88b8..d00e1fc555b17 100644
--- a/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/index.ts
+++ b/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/index.ts
@@ -5,95 +5,96 @@
* 2.0.
*/
-import {
- DeleteTrustedAppsRequestSchema,
- GetOneTrustedAppRequestSchema,
- GetTrustedAppsRequestSchema,
- PostTrustedAppCreateRequestSchema,
- PutTrustedAppUpdateRequestSchema,
- GetTrustedAppsSummaryRequestSchema,
-} from '../../../../common/endpoint/schema/trusted_apps';
-import {
- TRUSTED_APPS_CREATE_API,
- TRUSTED_APPS_DELETE_API,
- TRUSTED_APPS_GET_API,
- TRUSTED_APPS_LIST_API,
- TRUSTED_APPS_UPDATE_API,
- TRUSTED_APPS_SUMMARY_API,
-} from '../../../../common/endpoint/constants';
-
-import {
- getTrustedAppsCreateRouteHandler,
- getTrustedAppsDeleteRouteHandler,
- getTrustedAppsGetOneHandler,
- getTrustedAppsListRouteHandler,
- getTrustedAppsSummaryRouteHandler,
- getTrustedAppsUpdateRouteHandler,
-} from './handlers';
+// import {
+// DeleteTrustedAppsRequestSchema,
+// GetOneTrustedAppRequestSchema,
+// GetTrustedAppsRequestSchema,
+// PostTrustedAppCreateRequestSchema,
+// PutTrustedAppUpdateRequestSchema,
+// GetTrustedAppsSummaryRequestSchema,
+// } from '../../../../common/endpoint/schema/trusted_apps';
+// import {
+// TRUSTED_APPS_CREATE_API,
+// TRUSTED_APPS_DELETE_API,
+// TRUSTED_APPS_GET_API,
+// TRUSTED_APPS_LIST_API,
+// TRUSTED_APPS_UPDATE_API,
+// TRUSTED_APPS_SUMMARY_API,
+// } from '../../../../common/endpoint/constants';
+//
+// import {
+// getTrustedAppsCreateRouteHandler,
+// getTrustedAppsDeleteRouteHandler,
+// getTrustedAppsGetOneHandler,
+// getTrustedAppsListRouteHandler,
+// getTrustedAppsSummaryRouteHandler,
+// getTrustedAppsUpdateRouteHandler,
+// } from './handlers';
import { SecuritySolutionPluginRouter } from '../../../types';
import { EndpointAppContext } from '../../types';
export const registerTrustedAppsRoutes = (
- router: SecuritySolutionPluginRouter,
- endpointAppContext: EndpointAppContext
+ _router: SecuritySolutionPluginRouter,
+ _endpointAppContext: EndpointAppContext
) => {
- // DELETE one
- router.delete(
- {
- path: TRUSTED_APPS_DELETE_API,
- validate: DeleteTrustedAppsRequestSchema,
- options: { authRequired: true },
- },
- getTrustedAppsDeleteRouteHandler(endpointAppContext)
- );
-
- // GET one
- router.get(
- {
- path: TRUSTED_APPS_GET_API,
- validate: GetOneTrustedAppRequestSchema,
- options: { authRequired: true },
- },
- getTrustedAppsGetOneHandler(endpointAppContext)
- );
-
- // GET list
- router.get(
- {
- path: TRUSTED_APPS_LIST_API,
- validate: GetTrustedAppsRequestSchema,
- options: { authRequired: true },
- },
- getTrustedAppsListRouteHandler(endpointAppContext)
- );
-
- // CREATE
- router.post(
- {
- path: TRUSTED_APPS_CREATE_API,
- validate: PostTrustedAppCreateRequestSchema,
- options: { authRequired: true },
- },
- getTrustedAppsCreateRouteHandler(endpointAppContext)
- );
-
- // PUT
- router.put(
- {
- path: TRUSTED_APPS_UPDATE_API,
- validate: PutTrustedAppUpdateRequestSchema,
- options: { authRequired: true },
- },
- getTrustedAppsUpdateRouteHandler(endpointAppContext)
- );
-
- // SUMMARY
- router.get(
- {
- path: TRUSTED_APPS_SUMMARY_API,
- validate: GetTrustedAppsSummaryRequestSchema,
- options: { authRequired: true },
- },
- getTrustedAppsSummaryRouteHandler(endpointAppContext)
- );
+ // FIXME: DELETE all trusted apps api related modules (#2148)
+ // // DELETE one
+ // router.delete(
+ // {
+ // path: TRUSTED_APPS_DELETE_API,
+ // validate: DeleteTrustedAppsRequestSchema,
+ // options: { authRequired: true },
+ // },
+ // getTrustedAppsDeleteRouteHandler(endpointAppContext)
+ // );
+ //
+ // // GET one
+ // router.get(
+ // {
+ // path: TRUSTED_APPS_GET_API,
+ // validate: GetOneTrustedAppRequestSchema,
+ // options: { authRequired: true },
+ // },
+ // getTrustedAppsGetOneHandler(endpointAppContext)
+ // );
+ //
+ // // GET list
+ // router.get(
+ // {
+ // path: TRUSTED_APPS_LIST_API,
+ // validate: GetTrustedAppsRequestSchema,
+ // options: { authRequired: true },
+ // },
+ // getTrustedAppsListRouteHandler(endpointAppContext)
+ // );
+ //
+ // // CREATE
+ // router.post(
+ // {
+ // path: TRUSTED_APPS_CREATE_API,
+ // validate: PostTrustedAppCreateRequestSchema,
+ // options: { authRequired: true },
+ // },
+ // getTrustedAppsCreateRouteHandler(endpointAppContext)
+ // );
+ //
+ // // PUT
+ // router.put(
+ // {
+ // path: TRUSTED_APPS_UPDATE_API,
+ // validate: PutTrustedAppUpdateRequestSchema,
+ // options: { authRequired: true },
+ // },
+ // getTrustedAppsUpdateRouteHandler(endpointAppContext)
+ // );
+ //
+ // // SUMMARY
+ // router.get(
+ // {
+ // path: TRUSTED_APPS_SUMMARY_API,
+ // validate: GetTrustedAppsSummaryRequestSchema,
+ // options: { authRequired: true },
+ // },
+ // getTrustedAppsSummaryRouteHandler(endpointAppContext)
+ // );
};
From 2d13b7be3c41778ace6083b1bcf3a5df03da4ed6 Mon Sep 17 00:00:00 2001
From: Maja Grubic
Date: Thu, 2 Dec 2021 20:39:03 +0100
Subject: [PATCH 16/65] [Graph] Add KibanaThemeProvider (#119802)
* [Graph] Add ThemeProvider
* Wrap top_nav_menu in kibana theme
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
---
.../graph/public/{application.ts => application.tsx} | 7 +++++--
.../workspace_layout/workspace_top_nav_menu.tsx | 11 +++++++----
2 files changed, 12 insertions(+), 6 deletions(-)
rename x-pack/plugins/graph/public/{application.ts => application.tsx} (93%)
diff --git a/x-pack/plugins/graph/public/application.ts b/x-pack/plugins/graph/public/application.tsx
similarity index 93%
rename from x-pack/plugins/graph/public/application.ts
rename to x-pack/plugins/graph/public/application.tsx
index 5a7f931538bf6..235c9aa843797 100644
--- a/x-pack/plugins/graph/public/application.ts
+++ b/x-pack/plugins/graph/public/application.tsx
@@ -20,6 +20,7 @@ import {
ScopedHistory,
} from 'kibana/public';
import ReactDOM from 'react-dom';
+import React from 'react';
import { DataPlugin, IndexPatternsContract } from '../../../../src/plugins/data/public';
import { LicensingPluginStart } from '../../licensing/public';
import { checkLicense } from '../common/check_license';
@@ -32,6 +33,7 @@ import { SavedObjectsStart } from '../../../../src/plugins/saved_objects/public'
import { GraphSavePolicy } from './types';
import { graphRouter } from './router';
import { SpacesApi } from '../../spaces/public';
+import { KibanaThemeProvider } from '../../../../src/plugins/kibana_react/public';
/**
* These are dependencies of the Graph app besides the base dependencies
@@ -69,7 +71,8 @@ export interface GraphDependencies {
export type GraphServices = Omit;
export const renderApp = ({ history, element, ...deps }: GraphDependencies) => {
- const { chrome, capabilities } = deps;
+ const { chrome, capabilities, core } = deps;
+ const { theme$ } = core.theme;
if (!capabilities.graph.save) {
chrome.setBadge({
@@ -107,7 +110,7 @@ export const renderApp = ({ history, element, ...deps }: GraphDependencies) => {
window.dispatchEvent(new HashChangeEvent('hashchange'));
});
- const app = graphRouter(deps);
+ const app = {graphRouter(deps)};
ReactDOM.render(app, element);
element.setAttribute('class', 'gphAppWrapper');
diff --git a/x-pack/plugins/graph/public/components/workspace_layout/workspace_top_nav_menu.tsx b/x-pack/plugins/graph/public/components/workspace_layout/workspace_top_nav_menu.tsx
index dc7365672ffa2..f3bebfa68ca4a 100644
--- a/x-pack/plugins/graph/public/components/workspace_layout/workspace_top_nav_menu.tsx
+++ b/x-pack/plugins/graph/public/components/workspace_layout/workspace_top_nav_menu.tsx
@@ -11,7 +11,7 @@ import { Provider, useStore } from 'react-redux';
import { AppMountParameters, Capabilities, CoreStart } from 'kibana/public';
import { useHistory, useLocation } from 'react-router-dom';
import { NavigationPublicPluginStart as NavigationStart } from '../../../../../../src/plugins/navigation/public';
-import { toMountPoint } from '../../../../../../src/plugins/kibana_react/public';
+import { toMountPoint, wrapWithTheme } from '../../../../../../src/plugins/kibana_react/public';
import { datasourceSelector, hasFieldsSelector } from '../../state_management';
import { GraphSavePolicy, GraphWorkspaceSavedObject, Workspace } from '../../types';
import { AsObservable, Settings, SettingsWorkspaceProps } from '../settings';
@@ -145,9 +145,12 @@ export const WorkspaceTopNavMenu = (props: WorkspaceTopNavMenuProps) => {
props.coreStart.overlays.openFlyout(
toMountPoint(
-
-
-
+ wrapWithTheme(
+
+
+ ,
+ props.coreStart.theme.theme$
+ )
),
{
size: 'm',
From a88ac0c2e6be4913a0c39c4fb01a4480f1f8fded Mon Sep 17 00:00:00 2001
From: Tiago Costa
Date: Thu, 2 Dec 2021 19:56:40 +0000
Subject: [PATCH 17/65] chore(NA): splits types from code on @kbn/cli-dev-mode
(#120248)
---
package.json | 1 +
packages/BUILD.bazel | 1 +
packages/kbn-cli-dev-mode/BUILD.bazel | 26 ++++++++++++++++++++++----
packages/kbn-cli-dev-mode/package.json | 1 -
yarn.lock | 4 ++++
5 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/package.json b/package.json
index c8da0bf051390..75da2784a391b 100644
--- a/package.json
+++ b/package.json
@@ -560,6 +560,7 @@
"@types/kbn__analytics": "link:bazel-bin/packages/kbn-analytics/npm_module_types",
"@types/kbn__apm-config-loader": "link:bazel-bin/packages/kbn-apm-config-loader/npm_module_types",
"@types/kbn__apm-utils": "link:bazel-bin/packages/kbn-apm-utils/npm_module_types",
+ "@types/kbn__cli-dev-mode": "link:bazel-bin/packages/kbn-cli-dev-mode/npm_module_types",
"@types/kbn__i18n": "link:bazel-bin/packages/kbn-i18n/npm_module_types",
"@types/kbn__i18n-react": "link:bazel-bin/packages/kbn-i18n-react/npm_module_types",
"@types/license-checker": "15.0.0",
diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel
index f10044a68def9..9e124cf63a391 100644
--- a/packages/BUILD.bazel
+++ b/packages/BUILD.bazel
@@ -82,6 +82,7 @@ filegroup(
"//packages/kbn-analytics:build_types",
"//packages/kbn-apm-config-loader:build_types",
"//packages/kbn-apm-utils:build_types",
+ "//packages/kbn-cli-dev-mode:build_types",
"//packages/kbn-i18n:build_types",
"//packages/kbn-i18n-react:build_types",
],
diff --git a/packages/kbn-cli-dev-mode/BUILD.bazel b/packages/kbn-cli-dev-mode/BUILD.bazel
index e66a621781234..686866ce7bc88 100644
--- a/packages/kbn-cli-dev-mode/BUILD.bazel
+++ b/packages/kbn-cli-dev-mode/BUILD.bazel
@@ -1,9 +1,10 @@
-load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
-load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
-load("//src/dev/bazel:index.bzl", "jsts_transpiler")
+load("@npm//@bazel/typescript:index.bzl", "ts_config")
+load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
+load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
PKG_BASE_NAME = "kbn-cli-dev-mode"
PKG_REQUIRE_NAME = "@kbn/cli-dev-mode"
+TYPES_PKG_REQUIRE_NAME = "@types/kbn__cli-dev-mode"
SOURCE_FILES = glob(
[
@@ -103,7 +104,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
- deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
+ deps = RUNTIME_DEPS + [":target_node"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
@@ -122,3 +123,20 @@ filegroup(
],
visibility = ["//visibility:public"],
)
+
+pkg_npm_types(
+ name = "npm_module_types",
+ srcs = SRCS,
+ deps = [":tsc_types"],
+ package_name = TYPES_PKG_REQUIRE_NAME,
+ tsconfig = ":tsconfig",
+ visibility = ["//visibility:public"],
+)
+
+filegroup(
+ name = "build_types",
+ srcs = [
+ ":npm_module_types",
+ ],
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/kbn-cli-dev-mode/package.json b/packages/kbn-cli-dev-mode/package.json
index ac5ec227e92c5..80076a9851087 100644
--- a/packages/kbn-cli-dev-mode/package.json
+++ b/packages/kbn-cli-dev-mode/package.json
@@ -1,7 +1,6 @@
{
"name": "@kbn/cli-dev-mode",
"main": "./target_node/index.js",
- "types": "./target_types/index.d.ts",
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0",
"private": true,
diff --git a/yarn.lock b/yarn.lock
index 85dba79953939..7a1afe15ddd33 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5825,6 +5825,10 @@
version "0.0.0"
uid ""
+"@types/kbn__cli-dev-mode@link:bazel-bin/packages/kbn-cli-dev-mode/npm_module_types":
+ version "0.0.0"
+ uid ""
+
"@types/kbn__i18n-react@link:bazel-bin/packages/kbn-i18n-react/npm_module_types":
version "0.0.0"
uid ""
From 23652de60551279ea23c5ab41071dea65d893951 Mon Sep 17 00:00:00 2001
From: Stratoula Kalafateli
Date: Thu, 2 Dec 2021 22:13:53 +0200
Subject: [PATCH 18/65] [Visualize] Fixes wrong display of split warning
callout (#120199)
---
.../visualize_editor_common.test.tsx | 83 +++++++++++++++++++
.../components/visualize_editor_common.tsx | 4 +-
2 files changed, 86 insertions(+), 1 deletion(-)
diff --git a/src/plugins/visualize/public/application/components/visualize_editor_common.test.tsx b/src/plugins/visualize/public/application/components/visualize_editor_common.test.tsx
index dbe658b8b2d3c..d0c7b56638bc2 100644
--- a/src/plugins/visualize/public/application/components/visualize_editor_common.test.tsx
+++ b/src/plugins/visualize/public/application/components/visualize_editor_common.test.tsx
@@ -10,6 +10,7 @@ import React from 'react';
import { shallowWithIntl, mountWithIntl } from '@kbn/test/jest';
import { VisualizeEditorCommon } from './visualize_editor_common';
import { VisualizeEditorVisInstance } from '../types';
+import { SplitChartWarning } from './split_chart_warning';
const mockGetLegacyUrlConflict = jest.fn();
const mockRedirectLegacyUrl = jest.fn(() => Promise.resolve());
@@ -115,4 +116,86 @@ describe('VisualizeEditorCommon', () => {
'TSVB visualization'
);
});
+
+ it('should display a warning callout for new heatmap implementation with split aggs', async () => {
+ const wrapper = shallowWithIntl(
+ {}}
+ hasUnappliedChanges={false}
+ isEmbeddableRendered={false}
+ onAppLeave={() => {}}
+ visEditorRef={React.createRef()}
+ visInstance={
+ {
+ savedVis: {
+ id: 'test',
+ sharingSavedObjectProps: {
+ outcome: 'conflict',
+ aliasTargetId: 'alias_id',
+ },
+ },
+ vis: {
+ type: {
+ title: 'Heatmap',
+ name: 'heatmap',
+ },
+ data: {
+ aggs: {
+ aggs: [
+ {
+ schema: 'split',
+ },
+ ],
+ },
+ },
+ },
+ } as unknown as VisualizeEditorVisInstance
+ }
+ />
+ );
+ expect(wrapper.find(SplitChartWarning).length).toBe(1);
+ });
+
+ it('should not display a warning callout for XY charts with split aggs', async () => {
+ const wrapper = shallowWithIntl(
+ {}}
+ hasUnappliedChanges={false}
+ isEmbeddableRendered={false}
+ onAppLeave={() => {}}
+ visEditorRef={React.createRef()}
+ visInstance={
+ {
+ savedVis: {
+ id: 'test',
+ sharingSavedObjectProps: {
+ outcome: 'conflict',
+ aliasTargetId: 'alias_id',
+ },
+ },
+ vis: {
+ type: {
+ title: 'XY',
+ name: 'line',
+ },
+ data: {
+ aggs: {
+ aggs: [
+ {
+ schema: 'split',
+ },
+ ],
+ },
+ },
+ },
+ } as unknown as VisualizeEditorVisInstance
+ }
+ />
+ );
+ expect(wrapper.find(SplitChartWarning).length).toBe(0);
+ });
});
diff --git a/src/plugins/visualize/public/application/components/visualize_editor_common.tsx b/src/plugins/visualize/public/application/components/visualize_editor_common.tsx
index b764c9de48346..706fe55d0754e 100644
--- a/src/plugins/visualize/public/application/components/visualize_editor_common.tsx
+++ b/src/plugins/visualize/public/application/components/visualize_editor_common.tsx
@@ -134,7 +134,9 @@ export const VisualizeEditorCommon = ({
/>
)}
{visInstance?.vis?.type?.stage === 'experimental' && }
- {!hasHeatmapLegacyhartsEnabled && isSplitChart && }
+ {!hasHeatmapLegacyhartsEnabled &&
+ isSplitChart &&
+ visInstance?.vis.type.name === 'heatmap' && }
{visInstance?.vis?.type?.getInfoMessage?.(visInstance.vis)}
{getLegacyUrlConflictCallout()}
{visInstance && (
From f01106c100c3af70fc6fd32938a39e69ed27dd05 Mon Sep 17 00:00:00 2001
From: gchaps <33642766+gchaps@users.noreply.github.com>
Date: Thu, 2 Dec 2021 13:17:51 -0800
Subject: [PATCH 19/65] [DOCS] Updates security section of intro doc (#120036)
* Updates security section of intro doc
* Update docs/user/introduction.asciidoc
Co-authored-by: Adam Locke
Co-authored-by: Adam Locke
---
docs/user/introduction.asciidoc | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/docs/user/introduction.asciidoc b/docs/user/introduction.asciidoc
index 8972f92831717..89a21b0424ed0 100644
--- a/docs/user/introduction.asciidoc
+++ b/docs/user/introduction.asciidoc
@@ -169,9 +169,8 @@ them in bulk operations.
=== Secure {kib}
{kib} offers a range of security features for you to control who has access to what.
-The security features are automatically turned on when
-{ref}/security-minimal-setup.html[security is enabled in
-{es}]. For a description of all available configuration options,
+{ref}/configuring-stack-security.html[Security is enabled automatically] when you enroll {kib} with a secured {es} cluster.
+For a description of all available configuration options,
refer to <>.
[float]
From ea37dbb6c3c8620853267ff09c1716657f2c4eff Mon Sep 17 00:00:00 2001
From: nastasha-solomon <79124755+nastasha-solomon@users.noreply.github.com>
Date: Thu, 2 Dec 2021 17:20:05 -0500
Subject: [PATCH 20/65] [Security Solution] Doc pre-reqs for using the SN ITSM,
SecOps, and ITOM connectors (#117122)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
---
.../action-types/servicenow-itom.asciidoc | 32 ++++---
.../action-types/servicenow-sir.asciidoc | 87 ++++++++++++++---
.../action-types/servicenow.asciidoc | 88 +++++++++++++++---
.../images/servicenow-params-test.png | Bin 184611 -> 233010 bytes
.../servicenow-sir-update-connector.png | Bin 0 -> 250246 bytes
5 files changed, 167 insertions(+), 40 deletions(-)
create mode 100644 docs/management/connectors/images/servicenow-sir-update-connector.png
diff --git a/docs/management/connectors/action-types/servicenow-itom.asciidoc b/docs/management/connectors/action-types/servicenow-itom.asciidoc
index 017290dde9b15..af231c327f955 100644
--- a/docs/management/connectors/action-types/servicenow-itom.asciidoc
+++ b/docs/management/connectors/action-types/servicenow-itom.asciidoc
@@ -1,25 +1,31 @@
[role="xpack"]
[[servicenow-itom-action-type]]
-=== ServiceNow connector and action
+=== ServiceNow ITOM connector and action
++++
ServiceNow ITOM
++++
-The ServiceNow ITOM connector uses the https://docs.servicenow.com/bundle/rome-it-operations-management/page/product/event-management/task/send-events-via-web-service.html[Event API] to create ServiceNow events.
+The {sn} ITOM connector uses the https://docs.servicenow.com/bundle/rome-it-operations-management/page/product/event-management/task/send-events-via-web-service.html[Event API] to create {sn} events.
+
+[float]
+[[servicenow-itom-connector-prerequisites]]
+==== Prerequisites
+Create an integration user in {sn} and assign it the following roles.
+
+* `personalize_choices`: Allows the user to retrieve Choice element options, such as Severity.
+* `evt_mgmt_integration`: Enables integration with external event sources by allowing the user to create events.
[float]
[[servicenow-itom-connector-configuration]]
==== Connector configuration
-ServiceNow ITOM connectors have the following configuration properties.
+{sn} ITOM connectors have the following configuration properties.
-Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** UI connector listing, and in the connector list when configuring an action.
-URL:: ServiceNow instance URL.
+Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** connector listing, and in the connector list when configuring an action.
+URL:: {sn} instance URL.
Username:: Username for HTTP Basic authentication.
Password:: Password for HTTP Basic authentication.
-The ServiceNow user requires at minimum read, create, and update access to the Event table and read access to the https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/localization/reference/r_ChoicesTable.html[sys_choice]. If you don't provide access to sys_choice, then the choices will not render.
-
[float]
[[servicenow-itom-connector-networking-configuration]]
==== Connector networking configuration
@@ -55,12 +61,12 @@ Secrets defines sensitive information for the connector type.
[[define-servicenow-itom-ui]]
==== Define connector in Stack Management
-Define ServiceNow ITOM connector properties.
+Define {sn} ITOM connector properties.
[role="screenshot"]
image::management/connectors/images/servicenow-itom-connector.png[ServiceNow ITOM connector]
-Test ServiceNow ITOM action parameters.
+Test {sn} ITOM action parameters.
[role="screenshot"]
image::management/connectors/images/servicenow-itom-params-test.png[ServiceNow ITOM params test]
@@ -69,7 +75,7 @@ image::management/connectors/images/servicenow-itom-params-test.png[ServiceNow I
[[servicenow-itom-action-configuration]]
==== Action configuration
-ServiceNow ITOM actions have the following configuration properties.
+{sn} ITOM actions have the following configuration properties.
Source:: The name of the event source type.
Node:: The Host that the event was triggered for.
@@ -77,7 +83,7 @@ Type:: The type of event.
Resource:: The name of the resource.
Metric name:: Name of the metric.
Source instance (event_class):: Specific instance of the source.
-Message key:: All actions sharing this key will be associated with the same ServiceNow alert. Default value: `:`.
+Message key:: All actions sharing this key will be associated with the same {sn} alert. Default value: `:`.
Severity:: The severity of the event.
Description:: The details about the event.
@@ -85,6 +91,6 @@ Refer to https://docs.servicenow.com/bundle/rome-it-operations-management/page/p
[float]
[[configuring-servicenow-itom]]
-==== Configure ServiceNow ITOM
+==== Configure {sn} ITOM
-ServiceNow offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents.
+{sn} offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents.
diff --git a/docs/management/connectors/action-types/servicenow-sir.asciidoc b/docs/management/connectors/action-types/servicenow-sir.asciidoc
index 8847a99fe3af0..70500b26c16e6 100644
--- a/docs/management/connectors/action-types/servicenow-sir.asciidoc
+++ b/docs/management/connectors/action-types/servicenow-sir.asciidoc
@@ -1,25 +1,83 @@
[role="xpack"]
[[servicenow-sir-action-type]]
-=== ServiceNow connector and action
+=== ServiceNow SecOps connector and action
++++
ServiceNow SecOps
++++
-The ServiceNow SecOps connector uses the https://docs.servicenow.com/bundle/orlando-application-development/page/integrate/inbound-rest/concept/c_TableAPI.html[V2 Table API] to create ServiceNow security incidents.
+The {sn} SecOps connector uses the https://docs.servicenow.com/bundle/orlando-application-development/page/integrate/inbound-rest/concept/c_TableAPI.html[V2 Table API] to create {sn} security incidents.
+
+[float]
+[[servicenow-sir-connector-prerequisites]]
+==== Prerequisites
+After upgrading from {stack} version 7.15.0 or earlier to version 7.16.0 or later, you must complete the following within your {sn} instance before creating a new {sn} SecOps connector or <>:
+
+* Install https://store.servicenow.com/sn_appstore_store.do#!/store/application/2f0746801baeb01019ae54e4604bcb0f[Elastic for Security Operations (SecOps)] from the {sn} Store.
+* Create a {sn} integration user and assign it the appropriate roles.
+* Create a Cross-Origin Resource Sharing (CORS) rule.
+
+*Create a {sn} integration user*
+
+To ensure authenticated communication between Elastic and {sn}, create a {sn} integration user and assign it the appropriate roles.
+
+. In your {sn} instance, go to *System Security -> Users and Groups -> Users*.
+. Click *New*.
+. Complete the form, then right-click on the menu bar and click *Save*.
+. Go to the *Roles* tab and click *Edit*.
+. Assign the integration user the following roles:
+* `import_set_loader`
+* `import_transformer`
+* `personalize_choices`
+* `sn_si.basic`
+* `x_elas2_sir_int.integration_user`
+. Click *Save*.
+
+*Create a CORS rule*
+
+A CORS rule is required for communication between Elastic and {sn}. To create a CORS rule:
+
+. In your {sn} instance, go to *System Web Services -> REST -> CORS Rules*.
+. Click *New*.
+. Configure the rule as follows:
+* *Name*: Name the rule.
+* *REST API*: Set the rule to use the Elastic SecOps API by choosing `Elastic SIR API [x_elas2_sir_int/elastic_api]`.
+* *Domain*: Enter the Kibana URL.
+. Go to the *HTTP methods* tab and select *GET*.
+. Click *Submit* to create the rule.
+
+[float]
+[[servicenow-sir-connector-update]]
+==== Update a deprecated {sn} SecOps connector
+
+{sn} SecOps connectors created in {stack} version 7.15.0 or earlier are marked as deprecated after you upgrade to version 7.16.0 or later. Deprecated connectors have a yellow icon after their name and display a warning message when selected.
+
+[role="screenshot"]
+image::management/connectors/images/servicenow-sir-update-connector.png[Shows deprecated ServiceNow connectors]
+
+IMPORTANT: Deprecated connectors will continue to function with the rules they were added to and can be assigned to new rules. However, it is strongly recommended to update deprecated connectors or <> to ensure you have access to connector enhancements, such as updating incidents.
+
+To update a deprecated connector:
+
+. Open the main menu and go to *Stack Management -> Rules and connectors -> Connectors*.
+. Select the deprecated connector to open the *Edit connector* flyout.
+. In the warning message, click *Update this connector*.
+. Complete the guided steps in the *Edit connector* flyout.
+.. Install https://store.servicenow.com/sn_appstore_store.do#!/store/application/2f0746801baeb01019ae54e4604bcb0f[Elastic for Security Operations (SecOps)] from the {sn} Store and complete the <>.
+.. Enter the URL of your {sn} instance.
+.. Enter the username and password of your {sn} instance.
+. Click *Update*.
[float]
[[servicenow-sir-connector-configuration]]
==== Connector configuration
-ServiceNow SecOps connectors have the following configuration properties.
+{sn} SecOps connectors have the following configuration properties.
Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** UI connector listing, and in the connector list when configuring an action.
-URL:: ServiceNow instance URL.
+URL:: {sn} instance URL.
Username:: Username for HTTP Basic authentication.
Password:: Password for HTTP Basic authentication.
-The ServiceNow user requires at minimum read, create, and update access to the Security Incident table and read access to the https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/localization/reference/r_ChoicesTable.html[sys_choice]. If you don't provide access to sys_choice, then the choices will not render.
-
[float]
[[servicenow-sir-connector-networking-configuration]]
==== Connector networking configuration
@@ -48,7 +106,7 @@ Config defines information for the connector type.
`apiUrl`:: An address that corresponds to *URL*.
`usesTableApi`:: A boolean that indicates if the connector uses the Table API or the Import Set API.
-Note: If `usesTableApi` is set to false the Elastic application should be installed in ServiceNow.
+NOTE: If `usesTableApi` is set to false, the Elastic application should be installed in {sn}.
Secrets defines sensitive information for the connector type.
@@ -59,12 +117,12 @@ Secrets defines sensitive information for the connector type.
[[define-servicenow-sir-ui]]
==== Define connector in Stack Management
-Define ServiceNow SecOps connector properties.
+Define {sn} SecOps connector properties.
[role="screenshot"]
image::management/connectors/images/servicenow-sir-connector.png[ServiceNow SecOps connector]
-Test ServiceNow SecOps action parameters.
+Test {sn} SecOps action parameters.
[role="screenshot"]
image::management/connectors/images/servicenow-sir-params-test.png[ServiceNow SecOps params test]
@@ -79,13 +137,16 @@ Short description:: A short description for the incident, used for searching
Priority:: The priority of the incident.
Category:: The category of the incident.
Subcategory:: The subcategory of the incident.
-Correlation ID:: All actions sharing this ID will be associated with the same ServiceNow security incident. If an incident exists in ServiceNow with the same correlation ID the security incident will be updated. Default value: `:`.
-Correlation Display:: A descriptive label of the alert for correlation purposes in ServiceNow.
+Correlation ID:: Connectors using the same Correlation ID will be associated with the same {sn} incident. This value determines whether a new {sn} incident will be created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the Correlation ID value in {sn}. The maximum character length for this value is 100 characters.
+
+NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that {sn} will create a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, {sn} creates and continually updates a single incident record for the alert.
+
+Correlation Display:: A descriptive label of the alert for correlation purposes in {sn}.
Description:: The details about the incident.
Additional comments:: Additional information for the client, such as how to troubleshoot the issue.
[float]
[[configuring-servicenow-sir]]
-==== Configure ServiceNow SecOps
+==== Configure {sn} SecOps
-ServiceNow offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents.
+{sn} offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents.
diff --git a/docs/management/connectors/action-types/servicenow.asciidoc b/docs/management/connectors/action-types/servicenow.asciidoc
index bfa8c7db657d0..73e3baaca2ad1 100644
--- a/docs/management/connectors/action-types/servicenow.asciidoc
+++ b/docs/management/connectors/action-types/servicenow.asciidoc
@@ -1,25 +1,82 @@
[role="xpack"]
[[servicenow-action-type]]
-=== ServiceNow connector and action
+=== ServiceNow ITSM connector and action
++++
ServiceNow ITSM
++++
-The ServiceNow ITSM connector uses the https://docs.servicenow.com/bundle/orlando-application-development/page/integrate/inbound-rest/concept/c_TableAPI.html[V2 Table API] to create ServiceNow incidents.
+The {sn} ITSM connector uses the https://docs.servicenow.com/bundle/orlando-application-development/page/integrate/inbound-rest/concept/c_TableAPI.html[V2 Table API] to create {sn} incidents.
+
+[float]
+[[servicenow-itsm-connector-prerequisites]]
+==== Prerequisites
+After upgrading from {stack} version 7.15.0 or earlier to version 7.16.0 or later, you must complete the following within your {sn} instance before creating a new {sn} ITSM connector or <>:
+
+* Install https://store.servicenow.com/sn_appstore_store.do#!/store/application/7148dbc91bf1f450ced060a7234bcb88[Elastic for ITSM] from the {sn} Store.
+* Create a {sn} integration user and assign it the appropriate roles.
+* Create a Cross-Origin Resource Sharing (CORS) rule.
+
+*Create a {sn} integration user*
+
+To ensure authenticated communication between Elastic and {sn}, create a {sn} integration user and assign it the appropriate roles.
+
+. In your {sn} instance, go to *System Security -> Users and Groups -> Users*.
+. Click *New*.
+. Complete the form, then right-click on the menu bar and click *Save*.
+. Go to the *Roles* tab and click *Edit*.
+. Assign the integration user the following roles:
+* `import_set_loader`
+* `import_transformer`
+* `personalize_choices`
+* `x_elas2_inc_int.integration_user`
+. Click *Save*.
+
+*Create a CORS rule*
+
+A CORS rule is required for communication between Elastic and {sn}. To create a CORS rule:
+
+. In your {sn} instance, go to *System Web Services -> REST -> CORS Rules*.
+. Click *New*.
+. Configure the rule as follows:
+* *Name*: Name the rule.
+* *REST API*: Set the rule to use the Elastic ITSM API by choosing `Elastic ITSM API [x_elas2_inc_int/elastic_api]`.
+* *Domain*: Enter the Kibana URL.
+. Go to the *HTTP methods* tab and select *GET*.
+. Click *Submit* to create the rule.
+
+[float]
+[[servicenow-itsm-connector-update]]
+==== Update a deprecated {sn} ITSM connector
+
+{sn} ITSM connectors created in {stack} version 7.15.0 or earlier are marked as deprecated after you upgrade to version 7.16.0 or later. Deprecated connectors have a yellow icon after their name and display a warning message when selected.
+
+[role="screenshot"]
+image::management/connectors/images/servicenow-sir-update-connector.png[Shows deprecated ServiceNow connectors]
+
+IMPORTANT: Deprecated connectors will continue to function with the rules they were added to and can be assigned to new rules. However, it is strongly recommended to update deprecated connectors or <> to ensure you have access to connector enhancements, such as updating incidents.
+
+To update a deprecated connector:
+
+. Open the main menu and go to *Stack Management -> Rules and connectors -> Connectors*.
+. Select the deprecated connector to open the *Edit connector* flyout.
+. In the warning message, click *Update this connector*.
+. Complete the guided steps in the *Edit connector* flyout.
+.. Install https://store.servicenow.com/sn_appstore_store.do#!/store/application/7148dbc91bf1f450ced060a7234bcb88[Elastic for ITSM] and complete the <>.
+.. Enter the URL of your {sn} instance.
+.. Enter the username and password of your {sn} instance.
+. Click *Update*.
[float]
[[servicenow-connector-configuration]]
==== Connector configuration
-ServiceNow ITSM connectors have the following configuration properties.
+{sn} ITSM connectors have the following configuration properties.
Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** UI connector listing, and in the connector list when configuring an action.
-URL:: ServiceNow instance URL.
+URL:: {sn} instance URL.
Username:: Username for HTTP Basic authentication.
Password:: Password for HTTP Basic authentication.
-The ServiceNow user requires at minimum read, create, and update access to the Incident table and read access to the https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/localization/reference/r_ChoicesTable.html[sys_choice]. If you don't provide access to sys_choice, then the choices will not render.
-
[float]
[[servicenow-connector-networking-configuration]]
==== Connector networking configuration
@@ -48,7 +105,7 @@ Config defines information for the connector type.
`apiUrl`:: An address that corresponds to *URL*.
`usesTableApi`:: A boolean that indicates if the connector uses the Table API or the Import Set API.
-Note: If `usesTableApi` is set to false the Elastic application should be installed in ServiceNow.
+NOTE: If `usesTableApi` is set to false, the Elastic application should be installed in {sn}.
Secrets defines sensitive information for the connector type.
@@ -59,12 +116,12 @@ Secrets defines sensitive information for the connector type.
[[define-servicenow-ui]]
==== Define connector in Stack Management
-Define ServiceNow ITSM connector properties.
+Define {sn} ITSM connector properties.
[role="screenshot"]
image::management/connectors/images/servicenow-connector.png[ServiceNow connector]
-Test ServiceNow ITSM action parameters.
+Test {sn} ITSM action parameters.
[role="screenshot"]
image::management/connectors/images/servicenow-params-test.png[ServiceNow params test]
@@ -73,21 +130,24 @@ image::management/connectors/images/servicenow-params-test.png[ServiceNow params
[[servicenow-action-configuration]]
==== Action configuration
-ServiceNow ITSM actions have the following configuration properties.
+{sn} ITSM actions have the following configuration properties.
Urgency:: The extent to which the incident resolution can delay.
Severity:: The severity of the incident.
Impact:: The effect an incident has on business. Can be measured by the number of affected users or by how critical it is to the business in question.
Category:: The category of the incident.
Subcategory:: The category of the incident.
-Correlation ID:: All actions sharing this ID will be associated with the same ServiceNow incident. If an incident exists in ServiceNow with the same correlation ID the incident will be updated. Default value: `:`.
-Correlation Display:: A descriptive label of the alert for correlation purposes in ServiceNow.
+Correlation ID:: Connectors using the same Correlation ID will be associated with the same {sn} incident. This value determines whether a new {sn} incident will be created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the Correlation ID value in {sn}. The maximum character length for this value is 100 characters.
+
+NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that {sn} will create a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, {sn} creates and continually updates a single incident record for the alert.
+
+Correlation Display:: A descriptive label of the alert for correlation purposes in {sn}.
Short description:: A short description for the incident, used for searching the contents of the knowledge base.
Description:: The details about the incident.
Additional comments:: Additional information for the client, such as how to troubleshoot the issue.
[float]
[[configuring-servicenow]]
-==== Configure ServiceNow
+==== Configure {sn}
-ServiceNow offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents.
+{sn} offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents.
diff --git a/docs/management/connectors/images/servicenow-params-test.png b/docs/management/connectors/images/servicenow-params-test.png
index 79f1580c873d2647de495089041ac11814011ada..d8a85608bd40e0990da212db3cb54d37e436ff59 100644
GIT binary patch
literal 233010
zcmeFZcT|&K*DXpDu^=c-I!cq?K{|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