= {
+ [type]: formattedDefaultConfigForMonitorType,
+ };
+
+ return {
+ fullConfig: formattedDefaultConfig,
+ monitorTypeConfig: formattedDefaultConfigForMonitorType,
+ tlsConfig,
+ monitorType: type,
+ enableTLS,
+ enableZipUrlTLS,
+ };
+ };
+
+ return getDefaultConfig();
+ }, []);
+
+ return (
+
+
+
+ );
};
diff --git a/x-pack/plugins/uptime/server/kibana.index.ts b/x-pack/plugins/uptime/server/kibana.index.ts
index 945a4295148a26..3afdd7729c7174 100644
--- a/x-pack/plugins/uptime/server/kibana.index.ts
+++ b/x-pack/plugins/uptime/server/kibana.index.ts
@@ -11,7 +11,7 @@ import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/server';
import { PLUGIN } from '../common/constants/plugin';
import { compose } from './lib/compose/kibana';
import { initUptimeServer } from './uptime_server';
-import { UptimeCorePluginsSetup, UptimeCoreSetup } from './lib/adapters/framework';
+import { UptimeCorePluginsSetup, UptimeServerSetup } from './lib/adapters/framework';
import { umDynamicSettings } from './lib/saved_objects/uptime_settings';
import { UptimeRuleRegistry } from './plugin';
@@ -28,7 +28,7 @@ export interface KibanaServer extends Server {
}
export const initServerWithKibana = (
- server: UptimeCoreSetup,
+ server: UptimeServerSetup,
plugins: UptimeCorePluginsSetup,
ruleRegistry: UptimeRuleRegistry,
logger: Logger
diff --git a/x-pack/plugins/uptime/server/lib/adapters/framework/adapter_types.ts b/x-pack/plugins/uptime/server/lib/adapters/framework/adapter_types.ts
index 029c6164c04812..64063633d12e70 100644
--- a/x-pack/plugins/uptime/server/lib/adapters/framework/adapter_types.ts
+++ b/x-pack/plugins/uptime/server/lib/adapters/framework/adapter_types.ts
@@ -6,11 +6,7 @@
*/
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
-import type {
- SavedObjectsClientContract,
- ISavedObjectsRepository,
- IScopedClusterClient,
-} from 'src/core/server';
+import type { SavedObjectsClientContract, IScopedClusterClient } from 'src/core/server';
import { ObservabilityPluginSetup } from '../../../../../observability/server';
import {
EncryptedSavedObjectsPluginSetup,
@@ -35,16 +31,17 @@ export type UMElasticsearchQueryFn = (
) => Promise;
export type UMSavedObjectsQueryFn = (
- client: SavedObjectsClientContract | ISavedObjectsRepository,
+ client: SavedObjectsClientContract,
params?: P
) => Promise | T;
-export interface UptimeCoreSetup {
+export interface UptimeServerSetup {
router: UptimeRouter;
config: UptimeConfig;
cloud?: CloudSetup;
fleet: FleetStartContract;
security: SecurityPluginStart;
+ savedObjectsClient: SavedObjectsClientContract;
encryptedSavedObjects: EncryptedSavedObjectsPluginStart;
}
diff --git a/x-pack/plugins/uptime/server/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/plugins/uptime/server/lib/adapters/framework/kibana_framework_adapter.ts
index eae9dd5e73cae7..ae83c8365a9253 100644
--- a/x-pack/plugins/uptime/server/lib/adapters/framework/kibana_framework_adapter.ts
+++ b/x-pack/plugins/uptime/server/lib/adapters/framework/kibana_framework_adapter.ts
@@ -5,12 +5,12 @@
* 2.0.
*/
-import { UptimeCoreSetup } from './adapter_types';
+import { UptimeServerSetup } from './adapter_types';
import { UMBackendFrameworkAdapter } from './adapter_types';
import { UMKibanaRoute } from '../../../rest_api';
export class UMKibanaBackendFrameworkAdapter implements UMBackendFrameworkAdapter {
- constructor(private readonly server: UptimeCoreSetup) {
+ constructor(private readonly server: UptimeServerSetup) {
this.server = server;
}
@@ -20,6 +20,7 @@ export class UMKibanaBackendFrameworkAdapter implements UMBackendFrameworkAdapte
validate,
options,
};
+
switch (method) {
case 'GET':
this.server.router.get(routeDefinition, handler);
@@ -27,6 +28,12 @@ export class UMKibanaBackendFrameworkAdapter implements UMBackendFrameworkAdapte
case 'POST':
this.server.router.post(routeDefinition, handler);
break;
+ case 'PUT':
+ this.server.router.put(routeDefinition, handler);
+ break;
+ case 'DELETE':
+ this.server.router.delete(routeDefinition, handler);
+ break;
default:
throw new Error(`Handler for method ${method} is not defined`);
}
diff --git a/x-pack/plugins/uptime/server/lib/adapters/telemetry/kibana_telemetry_adapter.ts b/x-pack/plugins/uptime/server/lib/adapters/telemetry/kibana_telemetry_adapter.ts
index d829044da50474..f72af3311affe0 100644
--- a/x-pack/plugins/uptime/server/lib/adapters/telemetry/kibana_telemetry_adapter.ts
+++ b/x-pack/plugins/uptime/server/lib/adapters/telemetry/kibana_telemetry_adapter.ts
@@ -6,7 +6,7 @@
*/
import moment from 'moment';
-import { ISavedObjectsRepository, SavedObjectsClientContract } from 'kibana/server';
+import { SavedObjectsClientContract } from 'kibana/server';
import { CollectorFetchContext, UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { PageViewParams, UptimeTelemetry, Usage } from './types';
import { savedObjectsAdapter } from '../../saved_objects/saved_objects';
@@ -23,7 +23,7 @@ const BUCKET_NUMBER = 24;
export class KibanaTelemetryAdapter {
public static registerUsageCollector = (
usageCollector: UsageCollectionSetup,
- getSavedObjectsClient: () => ISavedObjectsRepository | undefined
+ getSavedObjectsClient: () => SavedObjectsClientContract | undefined
) => {
if (!usageCollector) {
return;
@@ -37,7 +37,7 @@ export class KibanaTelemetryAdapter {
public static initUsageCollector(
usageCollector: UsageCollectionSetup,
- getSavedObjectsClient: () => ISavedObjectsRepository | undefined
+ getSavedObjectsClient: () => SavedObjectsClientContract | undefined
) {
return usageCollector.makeUsageCollector({
type: 'uptime',
@@ -212,7 +212,7 @@ export class KibanaTelemetryAdapter {
public static async countNoOfUniqueMonitorAndLocations(
callCluster: UptimeESClient,
- savedObjectsClient: ISavedObjectsRepository | SavedObjectsClientContract
+ savedObjectsClient: SavedObjectsClientContract
) {
const dynamicSettings = await savedObjectsAdapter.getUptimeDynamicSettings(savedObjectsClient);
const params = {
diff --git a/x-pack/plugins/uptime/server/lib/alerts/test_utils/index.ts b/x-pack/plugins/uptime/server/lib/alerts/test_utils/index.ts
index 6481a1e2ebdcf0..826259cfa1405c 100644
--- a/x-pack/plugins/uptime/server/lib/alerts/test_utils/index.ts
+++ b/x-pack/plugins/uptime/server/lib/alerts/test_utils/index.ts
@@ -7,7 +7,7 @@
import { Logger } from 'kibana/server';
import { UMServerLibs } from '../../lib';
-import { UptimeCorePluginsSetup, UptimeCoreSetup } from '../../adapters';
+import { UptimeCorePluginsSetup, UptimeServerSetup } from '../../adapters';
import type { UptimeRouter } from '../../../types';
import type { IRuleDataClient } from '../../../../../rule_registry/server';
import { ruleRegistryMocks } from '../../../../../rule_registry/server/mocks';
@@ -27,7 +27,7 @@ export const bootstrapDependencies = (customRequests?: any, customPlugins: any =
const router = {} as UptimeRouter;
// these server/libs parameters don't have any functionality, which is fine
// because we aren't testing them here
- const server = { router, config: {} } as UptimeCoreSetup;
+ const server = { router, config: {} } as UptimeServerSetup;
const plugins: UptimeCorePluginsSetup = customPlugins as any;
const libs: UMServerLibs = { requests: {} } as UMServerLibs;
libs.requests = { ...libs.requests, ...customRequests };
diff --git a/x-pack/plugins/uptime/server/lib/alerts/types.ts b/x-pack/plugins/uptime/server/lib/alerts/types.ts
index f734628e61b958..e8e496cba997e8 100644
--- a/x-pack/plugins/uptime/server/lib/alerts/types.ts
+++ b/x-pack/plugins/uptime/server/lib/alerts/types.ts
@@ -4,7 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
-import { UptimeCorePluginsSetup, UptimeCoreSetup } from '../adapters';
+import { UptimeCorePluginsSetup, UptimeServerSetup } from '../adapters';
import { UMServerLibs } from '../lib';
import { AlertTypeWithExecutor } from '../../../../rule_registry/server';
import { AlertInstanceContext, AlertTypeState } from '../../../../alerting/common';
@@ -30,7 +30,7 @@ export type DefaultUptimeAlertInstance = AlertTy
>;
export type UptimeAlertTypeFactory = (
- server: UptimeCoreSetup,
+ server: UptimeServerSetup,
libs: UMServerLibs,
plugins: UptimeCorePluginsSetup
) => DefaultUptimeAlertInstance;
diff --git a/x-pack/plugins/uptime/server/lib/compose/kibana.ts b/x-pack/plugins/uptime/server/lib/compose/kibana.ts
index 6cdee92c40dbe4..42c88a69bf849b 100644
--- a/x-pack/plugins/uptime/server/lib/compose/kibana.ts
+++ b/x-pack/plugins/uptime/server/lib/compose/kibana.ts
@@ -9,9 +9,9 @@ import { UMKibanaBackendFrameworkAdapter } from '../adapters/framework';
import { requests } from '../requests';
import { licenseCheck } from '../domains';
import { UMServerLibs } from '../lib';
-import { UptimeCoreSetup } from '../adapters/framework';
+import { UptimeServerSetup } from '../adapters/framework';
-export function compose(server: UptimeCoreSetup): UMServerLibs {
+export function compose(server: UptimeServerSetup): UMServerLibs {
const framework = new UMKibanaBackendFrameworkAdapter(server);
return {
diff --git a/x-pack/plugins/uptime/server/lib/lib.ts b/x-pack/plugins/uptime/server/lib/lib.ts
index 151f7b25adc1eb..577013e9cc5e8d 100644
--- a/x-pack/plugins/uptime/server/lib/lib.ts
+++ b/x-pack/plugins/uptime/server/lib/lib.ts
@@ -5,12 +5,7 @@
* 2.0.
*/
-import {
- ElasticsearchClient,
- SavedObjectsClientContract,
- KibanaRequest,
- ISavedObjectsRepository,
-} from 'kibana/server';
+import { ElasticsearchClient, SavedObjectsClientContract, KibanaRequest } from 'kibana/server';
import chalk from 'chalk';
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { UMBackendFrameworkAdapter } from './adapters';
@@ -57,7 +52,7 @@ export function createUptimeESClient({
}: {
esClient: ElasticsearchClient;
request?: KibanaRequest;
- savedObjectsClient: SavedObjectsClientContract | ISavedObjectsRepository;
+ savedObjectsClient: SavedObjectsClientContract;
}) {
return {
baseESClient: esClient,
diff --git a/x-pack/plugins/uptime/server/lib/synthetics_service/get_api_key.test.ts b/x-pack/plugins/uptime/server/lib/synthetics_service/get_api_key.test.ts
index 1d164f5dd5b625..f9ba0ce545bad0 100644
--- a/x-pack/plugins/uptime/server/lib/synthetics_service/get_api_key.test.ts
+++ b/x-pack/plugins/uptime/server/lib/synthetics_service/get_api_key.test.ts
@@ -11,13 +11,20 @@ import { securityMock } from '../../../../security/server/mocks';
import { coreMock } from '../../../../../../src/core/server/mocks';
import { syntheticsServiceApiKey } from '../saved_objects/service_api_key';
import { KibanaRequest } from 'kibana/server';
+import { UptimeServerSetup } from '../adapters';
describe('getAPIKeyTest', function () {
const core = coreMock.createStart();
const security = securityMock.createStart();
- const encryptedSavedObject = encryptedSavedObjectsMock.createStart();
+ const encryptedSavedObjects = encryptedSavedObjectsMock.createStart();
const request = {} as KibanaRequest;
+ const server = {
+ security,
+ encryptedSavedObjects,
+ savedObjectsClient: core.savedObjects.getScopedClient(request),
+ } as unknown as UptimeServerSetup;
+
security.authc.apiKeys.areAPIKeysEnabled = jest.fn().mockReturnValue(true);
security.authc.apiKeys.create = jest.fn().mockReturnValue({
id: 'test',
@@ -29,9 +36,7 @@ describe('getAPIKeyTest', function () {
it('should generate an api key and return it', async () => {
const apiKey = await getAPIKeyForSyntheticsService({
request,
- security,
- encryptedSavedObject,
- savedObjectsClient: core.savedObjects.getScopedClient(request),
+ server,
});
expect(security.authc.apiKeys.areAPIKeysEnabled).toHaveBeenCalledTimes(1);
@@ -65,21 +70,19 @@ describe('getAPIKeyTest', function () {
.fn()
.mockReturnValue({ attributes: { apiKey: 'qwerty', id: 'test', name: 'service-api-key' } });
- encryptedSavedObject.getClient = jest.fn().mockReturnValue({
+ encryptedSavedObjects.getClient = jest.fn().mockReturnValue({
getDecryptedAsInternalUser: getObject,
});
const apiKey = await getAPIKeyForSyntheticsService({
request,
- security,
- encryptedSavedObject,
- savedObjectsClient: core.savedObjects.getScopedClient(request),
+ server,
});
expect(apiKey).toEqual({ apiKey: 'qwerty', id: 'test', name: 'service-api-key' });
- expect(encryptedSavedObject.getClient).toHaveBeenCalledTimes(1);
+ expect(encryptedSavedObjects.getClient).toHaveBeenCalledTimes(1);
expect(getObject).toHaveBeenCalledTimes(1);
- expect(encryptedSavedObject.getClient).toHaveBeenCalledWith({
+ expect(encryptedSavedObjects.getClient).toHaveBeenCalledWith({
includedHiddenTypes: [syntheticsServiceApiKey.name],
});
expect(getObject).toHaveBeenCalledWith(
diff --git a/x-pack/plugins/uptime/server/lib/synthetics_service/get_api_key.ts b/x-pack/plugins/uptime/server/lib/synthetics_service/get_api_key.ts
index 2a291c64ca2b28..015442dd3c4fe8 100644
--- a/x-pack/plugins/uptime/server/lib/synthetics_service/get_api_key.ts
+++ b/x-pack/plugins/uptime/server/lib/synthetics_service/get_api_key.ts
@@ -6,7 +6,6 @@
*/
import { KibanaRequest, SavedObjectsClientContract } from '../../../../../../src/core/server';
-import { EncryptedSavedObjectsPluginStart } from '../../../../encrypted_saved_objects/server';
import { SecurityPluginStart } from '../../../../security/server';
import {
getSyntheticsServiceAPIKey,
@@ -14,19 +13,18 @@ import {
syntheticsServiceApiKey,
} from '../saved_objects/service_api_key';
import { SyntheticsServiceApiKey } from '../../../common/runtime_types/synthetics_service_api_key';
+import { UptimeServerSetup } from '../adapters';
export const getAPIKeyForSyntheticsService = async ({
- encryptedSavedObject,
- savedObjectsClient,
request,
- security,
+ server,
}: {
- encryptedSavedObject: EncryptedSavedObjectsPluginStart;
- request: KibanaRequest;
- security: SecurityPluginStart;
- savedObjectsClient: SavedObjectsClientContract;
-}): Promise => {
- const encryptedClient = encryptedSavedObject.getClient({
+ server: UptimeServerSetup;
+ request?: KibanaRequest;
+}): Promise => {
+ const { security, encryptedSavedObjects, savedObjectsClient } = server;
+
+ const encryptedClient = encryptedSavedObjects.getClient({
includedHiddenTypes: [syntheticsServiceApiKey.name],
});
@@ -42,44 +40,44 @@ export const generateAndSaveAPIKey = async ({
request,
savedObjectsClient,
}: {
+ request?: KibanaRequest;
security: SecurityPluginStart;
- request: KibanaRequest;
savedObjectsClient: SavedObjectsClientContract;
}) => {
- try {
- const isApiKeysEnabled = await security.authc.apiKeys?.areAPIKeysEnabled();
+ const isApiKeysEnabled = await security.authc.apiKeys?.areAPIKeysEnabled();
- if (!isApiKeysEnabled) {
- return new Error('Please enable API keys in kibana to use synthetics service.');
- }
+ if (!isApiKeysEnabled) {
+ throw new Error('Please enable API keys in kibana to use synthetics service.');
+ }
- const apiKeyResult = await security.authc.apiKeys?.create(request, {
- name: 'synthetics-api-key',
- role_descriptors: {
- synthetics_writer: {
- cluster: ['monitor', 'read_ilm', 'read_pipeline'],
- index: [
- {
- names: ['synthetics-*'],
- privileges: ['view_index_metadata', 'create_doc', 'auto_configure'],
- },
- ],
- },
- },
- metadata: {
- description:
- 'Created for synthetics service to be passed to the heartbeat to communicate with ES',
+ if (!request) {
+ throw new Error('User authorization is needed for api key generation');
+ }
+
+ const apiKeyResult = await security.authc.apiKeys?.create(request, {
+ name: 'synthetics-api-key',
+ role_descriptors: {
+ synthetics_writer: {
+ cluster: ['monitor', 'read_ilm', 'read_pipeline'],
+ index: [
+ {
+ names: ['synthetics-*'],
+ privileges: ['view_index_metadata', 'create_doc', 'auto_configure'],
+ },
+ ],
},
- });
+ },
+ metadata: {
+ description:
+ 'Created for synthetics service to be passed to the heartbeat to communicate with ES',
+ },
+ });
- if (apiKeyResult) {
- const { id, name, api_key: apiKey } = apiKeyResult;
- const apiKeyObject = { id, name, apiKey };
- // discard decoded key and rest of the keys
- await setSyntheticsServiceApiKey(savedObjectsClient, apiKeyObject);
- return apiKeyObject;
- }
- } catch (e) {
- throw e;
+ if (apiKeyResult) {
+ const { id, name, api_key: apiKey } = apiKeyResult;
+ const apiKeyObject = { id, name, apiKey };
+ // discard decoded key and rest of the keys
+ await setSyntheticsServiceApiKey(savedObjectsClient, apiKeyObject);
+ return apiKeyObject;
}
};
diff --git a/x-pack/plugins/uptime/server/lib/synthetics_service/synthetics_service.ts b/x-pack/plugins/uptime/server/lib/synthetics_service/synthetics_service.ts
new file mode 100644
index 00000000000000..75c72ef8299076
--- /dev/null
+++ b/x-pack/plugins/uptime/server/lib/synthetics_service/synthetics_service.ts
@@ -0,0 +1,153 @@
+/*
+ * 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.
+ */
+
+/* eslint-disable max-classes-per-file */
+
+import axios from 'axios';
+import {
+ CoreStart,
+ KibanaRequest,
+ Logger,
+ SavedObjectsClient,
+} from '../../../../../../src/core/server';
+import { UptimeServerSetup } from '../adapters';
+import { installSyntheticsIndexTemplates } from '../../rest_api/synthetics_service/install_index_templates';
+import { SyntheticsServiceApiKey } from '../../../common/runtime_types/synthetics_service_api_key';
+import { getAPIKeyForSyntheticsService } from './get_api_key';
+import { SyntheticsMonitorSavedObject } from '../../../common/types';
+import { syntheticsMonitorType } from '../saved_objects/synthetics_monitor';
+import { getEsHosts } from './get_es_hosts';
+import { UptimeConfig } from '../../../common/config';
+
+export class SyntheticsService {
+ private logger: Logger;
+ private readonly server: UptimeServerSetup;
+
+ private readonly config: UptimeConfig;
+ private readonly esHosts: string[];
+
+ private apiKey: SyntheticsServiceApiKey | undefined;
+
+ constructor(logger: Logger, server: UptimeServerSetup) {
+ this.logger = logger;
+ this.server = server;
+ this.config = server.config;
+
+ this.esHosts = getEsHosts({ config: this.config, cloud: server.cloud });
+ }
+
+ public init(coreStart: CoreStart) {
+ getAPIKeyForSyntheticsService({ server: this.server }).then((apiKey) => {
+ if (apiKey) {
+ this.apiKey = apiKey;
+ }
+ });
+
+ this.setupIndexTemplates(coreStart);
+ }
+
+ private setupIndexTemplates(coreStart: CoreStart) {
+ const esClient = coreStart.elasticsearch.client.asInternalUser;
+ const savedObjectsClient = new SavedObjectsClient(
+ coreStart.savedObjects.createInternalRepository()
+ );
+
+ installSyntheticsIndexTemplates({
+ esClient,
+ server: this.server,
+ savedObjectsClient,
+ }).then(
+ (result) => {
+ if (result.name === 'synthetics' && result.install_status === 'installed') {
+ this.logger.info('Installed synthetics index templates');
+ } else if (result.name === 'synthetics' && result.install_status === 'install_failed') {
+ this.logger.warn(new IndexTemplateInstallationError());
+ }
+ },
+ () => {
+ this.logger.warn(new IndexTemplateInstallationError());
+ }
+ );
+ }
+
+ public registerSyncTask() {
+ // handler for registering kibana task manager task
+ }
+
+ public scheduleSyncTask() {
+ // handler for scheduling task
+ }
+
+ async pushConfigs(request: KibanaRequest) {
+ if (!this.apiKey) {
+ try {
+ this.apiKey = await getAPIKeyForSyntheticsService({ server: this.server, request });
+ } catch (err) {
+ throw err;
+ }
+ }
+
+ if (!this.apiKey) {
+ const error = new APIKeyMissingError();
+ this.logger.error(error);
+ throw error;
+ }
+
+ const monitors = await this.getMonitorConfigs();
+ const data = {
+ monitors,
+ output: {
+ hosts: this.esHosts,
+ api_key: `${this.apiKey.id}:${this.apiKey.apiKey}`,
+ },
+ };
+
+ const { url, username, password } = this.config.unsafe.service;
+
+ try {
+ await axios({
+ method: 'POST',
+ url: url + '/monitors',
+ data,
+ headers: {
+ Authorization: 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64'),
+ },
+ });
+ } catch (e) {
+ this.logger.error(e);
+ }
+ }
+
+ async getMonitorConfigs() {
+ const savedObjectsClient = this.server.savedObjectsClient;
+ const monitorsSavedObjects = await savedObjectsClient.find({
+ type: syntheticsMonitorType,
+ });
+
+ const savedObjectsList = monitorsSavedObjects.saved_objects;
+ return savedObjectsList.map(({ attributes, id }) => ({
+ ...attributes,
+ id,
+ }));
+ }
+}
+
+class APIKeyMissingError extends Error {
+ constructor() {
+ super();
+ this.message = 'API key is needed for synthetics service.';
+ this.name = 'APIKeyMissingError';
+ }
+}
+
+class IndexTemplateInstallationError extends Error {
+ constructor() {
+ super();
+ this.message = 'Failed to install synthetics index templates.';
+ this.name = 'IndexTemplateInstallationError';
+ }
+}
diff --git a/x-pack/plugins/uptime/server/plugin.ts b/x-pack/plugins/uptime/server/plugin.ts
index 42764972571112..e7aa57da06ffdb 100644
--- a/x-pack/plugins/uptime/server/plugin.ts
+++ b/x-pack/plugins/uptime/server/plugin.ts
@@ -10,9 +10,9 @@ import {
CoreStart,
CoreSetup,
Plugin as PluginType,
- ISavedObjectsRepository,
Logger,
SavedObjectsClient,
+ SavedObjectsClientContract,
} from '../../../../src/core/server';
import { uptimeRuleFieldMap } from '../common/rules/uptime_rule_field_map';
import { initServerWithKibana } from './kibana.index';
@@ -20,21 +20,22 @@ import {
KibanaTelemetryAdapter,
UptimeCorePluginsSetup,
UptimeCorePluginsStart,
- UptimeCoreSetup,
+ UptimeServerSetup,
} from './lib/adapters';
import { registerUptimeSavedObjects, savedObjectsAdapter } from './lib/saved_objects/saved_objects';
import { mappingFromFieldMap } from '../../rule_registry/common/mapping_from_field_map';
import { Dataset } from '../../rule_registry/server';
import { UptimeConfig } from '../common/config';
-import { installSyntheticsIndexTemplates } from './rest_api/synthetics_service/install_index_templates';
+import { SyntheticsService } from './lib/synthetics_service/synthetics_service';
export type UptimeRuleRegistry = ReturnType['ruleRegistry'];
export class Plugin implements PluginType {
- private savedObjectsClient?: ISavedObjectsRepository;
+ private savedObjectsClient?: SavedObjectsClientContract;
private initContext: PluginInitializerContext;
private logger: Logger;
- private server?: UptimeCoreSetup;
+ private server?: UptimeServerSetup;
+ private syntheticService?: SyntheticsService;
constructor(initializerContext: PluginInitializerContext) {
this.initContext = initializerContext;
@@ -66,7 +67,11 @@ export class Plugin implements PluginType {
config,
router: core.http.createRouter(),
cloud: plugins.cloud,
- } as UptimeCoreSetup;
+ } as UptimeServerSetup;
+
+ if (this.server?.config?.unsafe?.service.enabled) {
+ this.syntheticService = new SyntheticsService(this.logger, this.server);
+ }
initServerWithKibana(this.server, plugins, ruleDataClient, this.logger);
@@ -82,32 +87,19 @@ export class Plugin implements PluginType {
};
}
- public start(core: CoreStart, plugins: UptimeCorePluginsStart) {
- this.savedObjectsClient = core.savedObjects.createInternalRepository();
+ public start(coreStart: CoreStart, plugins: UptimeCorePluginsStart) {
+ this.savedObjectsClient = new SavedObjectsClient(
+ coreStart.savedObjects.createInternalRepository()
+ );
if (this.server) {
this.server.security = plugins.security;
this.server.fleet = plugins.fleet;
this.server.encryptedSavedObjects = plugins.encryptedSavedObjects;
+ this.server.savedObjectsClient = this.savedObjectsClient;
}
if (this.server?.config?.unsafe?.service.enabled) {
- const esClient = core.elasticsearch.client.asInternalUser;
- installSyntheticsIndexTemplates({
- esClient,
- server: this.server,
- savedObjectsClient: new SavedObjectsClient(core.savedObjects.createInternalRepository()),
- }).then(
- (result) => {
- if (result.name === 'synthetics' && result.install_status === 'installed') {
- this.logger.info('Installed synthetics index templates');
- } else if (result.name === 'synthetics' && result.install_status === 'install_failed') {
- this.logger.warn('Failed to install synthetics index templates');
- }
- },
- () => {
- this.logger.warn('Failed to install synthetics index templates');
- }
- );
+ this.syntheticService?.init(coreStart);
}
}
diff --git a/x-pack/plugins/uptime/server/rest_api/index.ts b/x-pack/plugins/uptime/server/rest_api/index.ts
index 344dd4d203d8d5..4eb6ae30712562 100644
--- a/x-pack/plugins/uptime/server/rest_api/index.ts
+++ b/x-pack/plugins/uptime/server/rest_api/index.ts
@@ -28,6 +28,13 @@ import { createNetworkEventsRoute } from './network_events';
import { createJourneyFailedStepsRoute } from './pings/journeys';
import { createLastSuccessfulStepRoute } from './synthetics/last_successful_step';
import { installIndexTemplatesRoute } from './synthetics_service/install_index_templates';
+import {
+ getAllSyntheticsMonitorRoute,
+ getSyntheticsMonitorRoute,
+} from './synthetics_service/get_monitors';
+import { addSyntheticsMonitorRoute } from './synthetics_service/add_monitor';
+import { editSyntheticsMonitorRoute } from './synthetics_service/edit_monitor';
+import { deleteSyntheticsMonitorRoute } from './synthetics_service/delete_monitor';
export * from './types';
export { createRouteWithAuth } from './create_route_with_auth';
@@ -53,4 +60,9 @@ export const restApiRoutes: UMRestApiRouteFactory[] = [
createLastSuccessfulStepRoute,
createJourneyScreenshotBlocksRoute,
installIndexTemplatesRoute,
+ getSyntheticsMonitorRoute,
+ getAllSyntheticsMonitorRoute,
+ addSyntheticsMonitorRoute,
+ editSyntheticsMonitorRoute,
+ deleteSyntheticsMonitorRoute,
];
diff --git a/x-pack/plugins/uptime/server/rest_api/synthetics_service/add_monitor.ts b/x-pack/plugins/uptime/server/rest_api/synthetics_service/add_monitor.ts
new file mode 100644
index 00000000000000..11d7dcedcaa34e
--- /dev/null
+++ b/x-pack/plugins/uptime/server/rest_api/synthetics_service/add_monitor.ts
@@ -0,0 +1,26 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+import { schema } from '@kbn/config-schema';
+import { UMRestApiRouteFactory } from '../types';
+import { API_URLS } from '../../../common/constants';
+import { SyntheticsMonitorSavedObject } from '../../../common/types';
+import { syntheticsMonitorType } from '../../lib/saved_objects/synthetics_monitor';
+
+export const addSyntheticsMonitorRoute: UMRestApiRouteFactory = () => ({
+ method: 'POST',
+ path: API_URLS.SYNTHETICS_MONITORS,
+ validate: {
+ body: schema.any(),
+ },
+ handler: async ({ request, savedObjectsClient }): Promise => {
+ const monitor = request.body as SyntheticsMonitorSavedObject;
+
+ const newMonitor = await savedObjectsClient.create(syntheticsMonitorType, monitor);
+ // TODO: call to service sync
+ return newMonitor;
+ },
+});
diff --git a/x-pack/plugins/uptime/server/rest_api/synthetics_service/delete_monitor.ts b/x-pack/plugins/uptime/server/rest_api/synthetics_service/delete_monitor.ts
new file mode 100644
index 00000000000000..68eb8aa130d2e5
--- /dev/null
+++ b/x-pack/plugins/uptime/server/rest_api/synthetics_service/delete_monitor.ts
@@ -0,0 +1,34 @@
+/*
+ * 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 { schema } from '@kbn/config-schema';
+import { SavedObjectsErrorHelpers } from '../../../../../../src/core/server';
+import { UMRestApiRouteFactory } from '../types';
+import { API_URLS } from '../../../common/constants';
+import { syntheticsMonitorType } from '../../lib/saved_objects/synthetics_monitor';
+
+export const deleteSyntheticsMonitorRoute: UMRestApiRouteFactory = () => ({
+ method: 'DELETE',
+ path: API_URLS.SYNTHETICS_MONITORS + '/{monitorId}',
+ validate: {
+ params: schema.object({
+ monitorId: schema.string(),
+ }),
+ },
+ handler: async ({ request, savedObjectsClient }): Promise => {
+ const { monitorId } = request.params;
+
+ try {
+ await savedObjectsClient.delete(syntheticsMonitorType, monitorId);
+ // TODO: call to service sync
+ return monitorId;
+ } catch (getErr) {
+ if (SavedObjectsErrorHelpers.isNotFoundError(getErr)) {
+ return 'Not found';
+ }
+ }
+ },
+});
diff --git a/x-pack/plugins/uptime/server/rest_api/synthetics_service/edit_monitor.ts b/x-pack/plugins/uptime/server/rest_api/synthetics_service/edit_monitor.ts
new file mode 100644
index 00000000000000..46a91738c380d0
--- /dev/null
+++ b/x-pack/plugins/uptime/server/rest_api/synthetics_service/edit_monitor.ts
@@ -0,0 +1,31 @@
+/*
+ * 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 { schema } from '@kbn/config-schema';
+import { UMRestApiRouteFactory } from '../types';
+import { API_URLS } from '../../../common/constants';
+import { SyntheticsMonitorSavedObject } from '../../../common/types';
+import { syntheticsMonitorType } from '../../lib/saved_objects/synthetics_monitor';
+
+export const editSyntheticsMonitorRoute: UMRestApiRouteFactory = () => ({
+ method: 'PUT',
+ path: API_URLS.SYNTHETICS_MONITORS + '/{monitorId}',
+ validate: {
+ params: schema.object({
+ monitorId: schema.string(),
+ }),
+ body: schema.any(),
+ },
+ handler: async ({ request, savedObjectsClient }): Promise => {
+ const monitor = request.body as SyntheticsMonitorSavedObject['attributes'];
+
+ const { monitorId } = request.params;
+
+ const editMonitor = await savedObjectsClient.update(syntheticsMonitorType, monitorId, monitor);
+ // TODO: call to service sync
+ return editMonitor;
+ },
+});
diff --git a/x-pack/plugins/uptime/server/rest_api/synthetics_service/get_monitors.ts b/x-pack/plugins/uptime/server/rest_api/synthetics_service/get_monitors.ts
new file mode 100644
index 00000000000000..537d6c77195cac
--- /dev/null
+++ b/x-pack/plugins/uptime/server/rest_api/synthetics_service/get_monitors.ts
@@ -0,0 +1,40 @@
+/*
+ * 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 { schema } from '@kbn/config-schema';
+import { UMRestApiRouteFactory } from '../types';
+import { API_URLS } from '../../../common/constants';
+import { syntheticsMonitorType } from '../../lib/saved_objects/synthetics_monitor';
+
+export const getSyntheticsMonitorRoute: UMRestApiRouteFactory = () => ({
+ method: 'GET',
+ path: API_URLS.SYNTHETICS_MONITORS + '/{monitorId}',
+ validate: {
+ params: schema.object({
+ monitorId: schema.string(),
+ }),
+ },
+ handler: async ({ request, savedObjectsClient }): Promise => {
+ const { monitorId } = request.params;
+ return await savedObjectsClient.get(syntheticsMonitorType, monitorId);
+ },
+});
+
+export const getAllSyntheticsMonitorRoute: UMRestApiRouteFactory = () => ({
+ method: 'GET',
+ path: API_URLS.SYNTHETICS_MONITORS,
+ validate: {
+ query: schema.object({
+ page: schema.maybe(schema.number()),
+ perPage: schema.maybe(schema.number()),
+ }),
+ },
+ handler: async ({ request, savedObjectsClient }): Promise => {
+ const { perPage = 50, page } = request.query;
+ // TODO: add query/filtering params
+ return await savedObjectsClient.find({ type: syntheticsMonitorType, perPage, page });
+ },
+});
diff --git a/x-pack/plugins/uptime/server/rest_api/synthetics_service/install_index_templates.ts b/x-pack/plugins/uptime/server/rest_api/synthetics_service/install_index_templates.ts
index b40c6018f966bb..185e526d148feb 100644
--- a/x-pack/plugins/uptime/server/rest_api/synthetics_service/install_index_templates.ts
+++ b/x-pack/plugins/uptime/server/rest_api/synthetics_service/install_index_templates.ts
@@ -7,7 +7,7 @@
import { ElasticsearchClient, SavedObjectsClientContract } from 'kibana/server';
import { UMRestApiRouteFactory } from '../types';
import { API_URLS } from '../../../common/constants';
-import { UptimeCoreSetup } from '../../lib/adapters';
+import { UptimeServerSetup } from '../../lib/adapters';
export const installIndexTemplatesRoute: UMRestApiRouteFactory = () => ({
method: 'GET',
@@ -27,7 +27,7 @@ export async function installSyntheticsIndexTemplates({
server,
savedObjectsClient,
}: {
- server: UptimeCoreSetup;
+ server: UptimeServerSetup;
esClient: ElasticsearchClient;
savedObjectsClient: SavedObjectsClientContract;
}) {
diff --git a/x-pack/plugins/uptime/server/rest_api/types.ts b/x-pack/plugins/uptime/server/rest_api/types.ts
index f8027cefd3f589..48e3f58ae0ad52 100644
--- a/x-pack/plugins/uptime/server/rest_api/types.ts
+++ b/x-pack/plugins/uptime/server/rest_api/types.ts
@@ -17,7 +17,7 @@ import {
} from 'kibana/server';
import { UMServerLibs, UptimeESClient } from '../lib/lib';
import type { UptimeRequestHandlerContext } from '../types';
-import { UptimeCoreSetup } from '../lib/adapters';
+import { UptimeServerSetup } from '../lib/adapters';
/**
* Defines the basic properties employed by Uptime routes.
@@ -61,7 +61,7 @@ export type UMRestApiRouteFactory = (libs: UMServerLibs) => UptimeRoute;
*/
export type UMKibanaRouteWrapper = (
uptimeRoute: UptimeRoute,
- server: UptimeCoreSetup
+ server: UptimeServerSetup
) => UMKibanaRoute;
/**
@@ -80,5 +80,5 @@ export type UMRouteHandler = ({
request: KibanaRequest, Record, Record>;
response: KibanaResponseFactory;
savedObjectsClient: SavedObjectsClientContract;
- server: UptimeCoreSetup;
+ server: UptimeServerSetup;
}) => IKibanaResponse | Promise>;
diff --git a/x-pack/plugins/uptime/server/uptime_server.ts b/x-pack/plugins/uptime/server/uptime_server.ts
index ae606d7d4c3bf2..fd16e8243c2cd9 100644
--- a/x-pack/plugins/uptime/server/uptime_server.ts
+++ b/x-pack/plugins/uptime/server/uptime_server.ts
@@ -9,7 +9,7 @@ import { Logger } from 'kibana/server';
import { createLifecycleRuleTypeFactory, IRuleDataClient } from '../../rule_registry/server';
import { UMServerLibs } from './lib/lib';
import { createRouteWithAuth, restApiRoutes, uptimeRouteWrapper } from './rest_api';
-import { UptimeCoreSetup, UptimeCorePluginsSetup } from './lib/adapters';
+import { UptimeServerSetup, UptimeCorePluginsSetup } from './lib/adapters';
import { statusCheckAlertFactory } from './lib/alerts/status_check';
import { tlsAlertFactory } from './lib/alerts/tls';
@@ -17,7 +17,7 @@ import { tlsLegacyAlertFactory } from './lib/alerts/tls_legacy';
import { durationAnomalyAlertFactory } from './lib/alerts/duration_anomaly';
export const initUptimeServer = (
- server: UptimeCoreSetup,
+ server: UptimeServerSetup,
libs: UMServerLibs,
plugins: UptimeCorePluginsSetup,
ruleDataClient: IRuleDataClient,
diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/event_log.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/event_log.ts
index 9bf7baf95d8d24..806c1fa3a4ea7a 100644
--- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/event_log.ts
+++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/event_log.ts
@@ -490,8 +490,11 @@ export default function eventLogTests({ getService }: FtrProviderContext) {
});
});
- const startEvent = events[0];
- const executeEvent = events[1];
+ const executeEvents = getEventsByAction(events, 'execute');
+ const executeStartEvents = getEventsByAction(events, 'execute-start');
+
+ const startEvent = executeStartEvents[0];
+ const executeEvent = executeEvents[0];
expect(startEvent).to.be.ok();
expect(executeEvent).to.be.ok();
diff --git a/x-pack/test/api_integration/apis/uptime/rest/add_monitor.ts b/x-pack/test/api_integration/apis/uptime/rest/add_monitor.ts
new file mode 100644
index 00000000000000..a57a03fd3a1f57
--- /dev/null
+++ b/x-pack/test/api_integration/apis/uptime/rest/add_monitor.ts
@@ -0,0 +1,29 @@
+/*
+ * 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 expect from '@kbn/expect';
+import { FtrProviderContext } from '../../../ftr_provider_context';
+import { API_URLS } from '../../../../../plugins/uptime/common/constants';
+
+export default function ({ getService }: FtrProviderContext) {
+ describe('add synthetics monitor', () => {
+ const supertest = getService('supertest');
+ const newMonitor = {
+ type: 'http',
+ name: 'Test monitor',
+ urls: 'https://www.elastic.co',
+ };
+
+ it('returns the newly added monitor', async () => {
+ const apiResponse = await supertest
+ .post(API_URLS.SYNTHETICS_MONITORS)
+ .set('kbn-xsrf', 'true')
+ .send(newMonitor);
+
+ expect(apiResponse.body.attributes).eql(newMonitor);
+ });
+ });
+}
diff --git a/x-pack/test/api_integration/apis/uptime/rest/delete_monitor.ts b/x-pack/test/api_integration/apis/uptime/rest/delete_monitor.ts
new file mode 100644
index 00000000000000..bc49587fab872a
--- /dev/null
+++ b/x-pack/test/api_integration/apis/uptime/rest/delete_monitor.ts
@@ -0,0 +1,36 @@
+/*
+ * 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 expect from '@kbn/expect';
+import { FtrProviderContext } from '../../../ftr_provider_context';
+import { API_URLS } from '../../../../../plugins/uptime/common/constants';
+
+export default function ({ getService }: FtrProviderContext) {
+ describe('delete synthetics monitor', () => {
+ const supertest = getService('supertest');
+ const newMonitor = {
+ type: 'http',
+ name: 'Test monitor',
+ urls: 'https://www.elastic.co',
+ };
+
+ it('deleted monitor by id', async () => {
+ const apiResponse = await supertest
+ .post(API_URLS.SYNTHETICS_MONITORS)
+ .set('kbn-xsrf', 'true')
+ .send(newMonitor);
+
+ const monitorId = apiResponse.body.id;
+
+ const deleteResponse = await supertest
+ .delete(API_URLS.SYNTHETICS_MONITORS + '/' + monitorId)
+ .set('kbn-xsrf', 'true');
+ //
+ expect(deleteResponse.body).eql(monitorId);
+ });
+ });
+}
diff --git a/x-pack/test/api_integration/apis/uptime/rest/edit_monitor.ts b/x-pack/test/api_integration/apis/uptime/rest/edit_monitor.ts
new file mode 100644
index 00000000000000..f5d54c40a86468
--- /dev/null
+++ b/x-pack/test/api_integration/apis/uptime/rest/edit_monitor.ts
@@ -0,0 +1,37 @@
+/*
+ * 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 expect from '@kbn/expect';
+import { FtrProviderContext } from '../../../ftr_provider_context';
+import { API_URLS } from '../../../../../plugins/uptime/common/constants';
+export default function ({ getService }: FtrProviderContext) {
+ describe('edit synthetics monitor', () => {
+ const supertest = getService('supertest');
+ const newMonitor = {
+ type: 'http',
+ name: 'Test monitor',
+ urls: 'https://www.elastic.co',
+ };
+
+ it('edits the monitor', async () => {
+ const apiResponse = await supertest
+ .post(API_URLS.SYNTHETICS_MONITORS)
+ .set('kbn-xsrf', 'true')
+ .send(newMonitor);
+
+ const monitorId = apiResponse.body.id;
+
+ expect(apiResponse.body.attributes).eql(newMonitor);
+
+ const editResponse = await supertest
+ .put(API_URLS.SYNTHETICS_MONITORS + '/' + monitorId)
+ .set('kbn-xsrf', 'true')
+ .send({ ...newMonitor, name: 'New name' });
+
+ expect(editResponse.body.attributes.name).eql('New name');
+ });
+ });
+}
diff --git a/x-pack/test/api_integration/apis/uptime/rest/get_monitor.ts b/x-pack/test/api_integration/apis/uptime/rest/get_monitor.ts
new file mode 100644
index 00000000000000..76d27ff8a9d1d4
--- /dev/null
+++ b/x-pack/test/api_integration/apis/uptime/rest/get_monitor.ts
@@ -0,0 +1,51 @@
+/*
+ * 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 expect from '@kbn/expect';
+import { FtrProviderContext } from '../../../ftr_provider_context';
+import { API_URLS } from '../../../../../plugins/uptime/common/constants';
+
+export default function ({ getService }: FtrProviderContext) {
+ describe('get synthetics monitor', () => {
+ const newMonitor = {
+ type: 'http',
+ name: 'Test monitor',
+ urls: 'https://www.elastic.co',
+ };
+
+ const addMonitor = async () => {
+ const res = await supertest
+ .post(API_URLS.SYNTHETICS_MONITORS)
+ .set('kbn-xsrf', 'true')
+ .send(newMonitor);
+ return res.body.id;
+ };
+
+ const supertest = getService('supertest');
+
+ it('get all monitors', async () => {
+ const id1 = await addMonitor();
+ const id2 = await addMonitor();
+
+ const apiResponse = await supertest.get(API_URLS.SYNTHETICS_MONITORS);
+
+ const monitor1 = apiResponse.body.saved_objects.find((obj: any) => obj.id === id1);
+ const monitor2 = apiResponse.body.saved_objects.find((obj: any) => obj.id === id2);
+
+ expect(monitor1.id).eql(id1);
+ expect(monitor2.id).eql(id2);
+ });
+
+ it('get monitor by id', async () => {
+ const monitorId = await addMonitor();
+
+ const apiResponse = await supertest.get(API_URLS.SYNTHETICS_MONITORS + '/' + monitorId);
+
+ expect(apiResponse.body.id).eql(monitorId);
+ });
+ });
+}
diff --git a/x-pack/test/api_integration/apis/uptime/rest/index.ts b/x-pack/test/api_integration/apis/uptime/rest/index.ts
index dc3c00b03f7125..f674879552d6a6 100644
--- a/x-pack/test/api_integration/apis/uptime/rest/index.ts
+++ b/x-pack/test/api_integration/apis/uptime/rest/index.ts
@@ -71,5 +71,12 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
loadTestFile(require.resolve('./index_status'));
loadTestFile(require.resolve('./monitor_states_real_data'));
});
+
+ describe('uptime CRUD routes', () => {
+ loadTestFile(require.resolve('./get_monitor'));
+ loadTestFile(require.resolve('./add_monitor'));
+ loadTestFile(require.resolve('./edit_monitor'));
+ loadTestFile(require.resolve('./delete_monitor'));
+ });
});
}
diff --git a/x-pack/test/api_integration/config.ts b/x-pack/test/api_integration/config.ts
index e2c2e0b52dfdc9..bf42a5b0865a21 100644
--- a/x-pack/test/api_integration/config.ts
+++ b/x-pack/test/api_integration/config.ts
@@ -35,6 +35,10 @@ export async function getApiIntegrationConfig({ readConfigFile }: FtrConfigProvi
'--xpack.ruleRegistry.write.enabled=true',
'--xpack.ruleRegistry.write.enabled=true',
'--xpack.ruleRegistry.write.cache.enabled=false',
+ '--xpack.uptime.unsafe.service.enabled=true',
+ '--xpack.uptime.unsafe.service.password=test',
+ '--xpack.uptime.unsafe.service.manifestUrl=http://test.com',
+ '--xpack.uptime.unsafe.service.username=user',
`--xpack.securitySolution.enableExperimental=${JSON.stringify(['ruleRegistryEnabled'])}`,
],
},
diff --git a/x-pack/test/apm_api_integration/tests/traces/__snapshots__/top_traces.spec.snap b/x-pack/test/apm_api_integration/tests/traces/__snapshots__/top_traces.spec.snap
index 604348355f38c8..528963709712d5 100644
--- a/x-pack/test/apm_api_integration/tests/traces/__snapshots__/top_traces.spec.snap
+++ b/x-pack/test/apm_api_integration/tests/traces/__snapshots__/top_traces.spec.snap
@@ -3,6 +3,7 @@
exports[`APM API tests basic apm_8.0.0 Top traces when data is loaded returns the correct buckets 1`] = `
Array [
Object {
+ "agentName": "java",
"averageResponseTime": 1639,
"impact": 0,
"key": Object {
@@ -15,6 +16,7 @@ Array [
"transactionsPerMinute": 0.0333333333333333,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 3279,
"impact": 0.00144735571024101,
"key": Object {
@@ -27,6 +29,7 @@ Array [
"transactionsPerMinute": 0.0333333333333333,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 6175,
"impact": 0.00400317408637392,
"key": Object {
@@ -39,6 +42,7 @@ Array [
"transactionsPerMinute": 0.0333333333333333,
},
Object {
+ "agentName": "dotnet",
"averageResponseTime": 3495,
"impact": 0.00472243927164613,
"key": Object {
@@ -51,6 +55,7 @@ Array [
"transactionsPerMinute": 0.0666666666666667,
},
Object {
+ "agentName": "python",
"averageResponseTime": 7039,
"impact": 0.00476568343615943,
"key": Object {
@@ -63,6 +68,7 @@ Array [
"transactionsPerMinute": 0.0333333333333333,
},
Object {
+ "agentName": "ruby",
"averageResponseTime": 6303,
"impact": 0.00967875004525193,
"key": Object {
@@ -75,6 +81,7 @@ Array [
"transactionsPerMinute": 0.0666666666666667,
},
Object {
+ "agentName": "java",
"averageResponseTime": 7209.66666666667,
"impact": 0.0176418540534865,
"key": Object {
@@ -87,6 +94,7 @@ Array [
"transactionsPerMinute": 0.1,
},
Object {
+ "agentName": "java",
"averageResponseTime": 4511,
"impact": 0.0224401912465233,
"key": Object {
@@ -99,6 +107,7 @@ Array [
"transactionsPerMinute": 0.2,
},
Object {
+ "agentName": "python",
"averageResponseTime": 7607,
"impact": 0.0254072704525173,
"key": Object {
@@ -111,6 +120,7 @@ Array [
"transactionsPerMinute": 0.133333333333333,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 10143,
"impact": 0.025408152986487,
"key": Object {
@@ -123,6 +133,7 @@ Array [
"transactionsPerMinute": 0.1,
},
Object {
+ "agentName": "ruby",
"averageResponseTime": 6105.66666666667,
"impact": 0.0308842762682221,
"key": Object {
@@ -135,6 +146,7 @@ Array [
"transactionsPerMinute": 0.2,
},
Object {
+ "agentName": "java",
"averageResponseTime": 6116.33333333333,
"impact": 0.0309407584422802,
"key": Object {
@@ -147,6 +159,7 @@ Array [
"transactionsPerMinute": 0.2,
},
Object {
+ "agentName": "java",
"averageResponseTime": 12543,
"impact": 0.0317623975680329,
"key": Object {
@@ -159,6 +172,7 @@ Array [
"transactionsPerMinute": 0.1,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 5551,
"impact": 0.0328461492827744,
"key": Object {
@@ -171,6 +185,7 @@ Array [
"transactionsPerMinute": 0.233333333333333,
},
Object {
+ "agentName": "java",
"averageResponseTime": 13183,
"impact": 0.0334568627897785,
"key": Object {
@@ -183,6 +198,7 @@ Array [
"transactionsPerMinute": 0.1,
},
Object {
+ "agentName": "go",
"averageResponseTime": 8050.2,
"impact": 0.0340764016364792,
"key": Object {
@@ -195,6 +211,7 @@ Array [
"transactionsPerMinute": 0.166666666666667,
},
Object {
+ "agentName": "ruby",
"averageResponseTime": 10079,
"impact": 0.0341337663445071,
"key": Object {
@@ -207,6 +224,7 @@ Array [
"transactionsPerMinute": 0.133333333333333,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 8463,
"impact": 0.0358979517498557,
"key": Object {
@@ -219,6 +237,7 @@ Array [
"transactionsPerMinute": 0.166666666666667,
},
Object {
+ "agentName": "ruby",
"averageResponseTime": 10799,
"impact": 0.0366754641771254,
"key": Object {
@@ -231,6 +250,7 @@ Array [
"transactionsPerMinute": 0.133333333333333,
},
Object {
+ "agentName": "ruby",
"averageResponseTime": 7428.33333333333,
"impact": 0.0378880658514371,
"key": Object {
@@ -243,6 +263,7 @@ Array [
"transactionsPerMinute": 0.2,
},
Object {
+ "agentName": "java",
"averageResponseTime": 3105.13333333333,
"impact": 0.039659311528543,
"key": Object {
@@ -255,6 +276,7 @@ Array [
"transactionsPerMinute": 0.5,
},
Object {
+ "agentName": "java",
"averageResponseTime": 6883.57142857143,
"impact": 0.0410784261517549,
"key": Object {
@@ -267,6 +289,7 @@ Array [
"transactionsPerMinute": 0.233333333333333,
},
Object {
+ "agentName": "dotnet",
"averageResponseTime": 3505,
"impact": 0.0480460318422139,
"key": Object {
@@ -279,6 +302,7 @@ Array [
"transactionsPerMinute": 0.533333333333333,
},
Object {
+ "agentName": "java",
"averageResponseTime": 5621.4,
"impact": 0.0481642913941483,
"key": Object {
@@ -291,6 +315,7 @@ Array [
"transactionsPerMinute": 0.333333333333333,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 8428.71428571429,
"impact": 0.0506239135675883,
"key": Object {
@@ -303,6 +328,7 @@ Array [
"transactionsPerMinute": 0.233333333333333,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 8520.14285714286,
"impact": 0.0511887353081702,
"key": Object {
@@ -315,6 +341,7 @@ Array [
"transactionsPerMinute": 0.233333333333333,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 6683.44444444444,
"impact": 0.0516388276326964,
"key": Object {
@@ -327,6 +354,7 @@ Array [
"transactionsPerMinute": 0.3,
},
Object {
+ "agentName": "dotnet",
"averageResponseTime": 3482.78947368421,
"impact": 0.0569534471979838,
"key": Object {
@@ -339,6 +367,7 @@ Array [
"transactionsPerMinute": 0.633333333333333,
},
Object {
+ "agentName": "python",
"averageResponseTime": 16703,
"impact": 0.057517386404596,
"key": Object {
@@ -351,6 +380,7 @@ Array [
"transactionsPerMinute": 0.133333333333333,
},
Object {
+ "agentName": "dotnet",
"averageResponseTime": 4943,
"impact": 0.0596266425920813,
"key": Object {
@@ -363,6 +393,7 @@ Array [
"transactionsPerMinute": 0.466666666666667,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 7892.33333333333,
"impact": 0.0612407972225879,
"key": Object {
@@ -375,6 +406,7 @@ Array [
"transactionsPerMinute": 0.3,
},
Object {
+ "agentName": "dotnet",
"averageResponseTime": 6346.42857142857,
"impact": 0.0769666700279444,
"key": Object {
@@ -387,6 +419,7 @@ Array [
"transactionsPerMinute": 0.466666666666667,
},
Object {
+ "agentName": "go",
"averageResponseTime": 7052.84615384615,
"impact": 0.0794704188998674,
"key": Object {
@@ -399,6 +432,7 @@ Array [
"transactionsPerMinute": 0.433333333333333,
},
Object {
+ "agentName": "java",
"averageResponseTime": 10484.3333333333,
"impact": 0.0818285496667966,
"key": Object {
@@ -411,6 +445,7 @@ Array [
"transactionsPerMinute": 0.3,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 23711,
"impact": 0.0822565786420813,
"key": Object {
@@ -423,6 +458,7 @@ Array [
"transactionsPerMinute": 0.133333333333333,
},
Object {
+ "agentName": "dotnet",
"averageResponseTime": 4491.36363636364,
"impact": 0.0857567083657495,
"key": Object {
@@ -435,6 +471,7 @@ Array [
"transactionsPerMinute": 0.733333333333333,
},
Object {
+ "agentName": "python",
"averageResponseTime": 20715.8,
"impact": 0.089965512867054,
"key": Object {
@@ -447,6 +484,7 @@ Array [
"transactionsPerMinute": 0.166666666666667,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 9036.33333333333,
"impact": 0.0942519803576885,
"key": Object {
@@ -459,6 +497,7 @@ Array [
"transactionsPerMinute": 0.4,
},
Object {
+ "agentName": "java",
"averageResponseTime": 7504.06666666667,
"impact": 0.0978924329825326,
"key": Object {
@@ -471,6 +510,7 @@ Array [
"transactionsPerMinute": 0.5,
},
Object {
+ "agentName": "go",
"averageResponseTime": 4250.55555555556,
"impact": 0.0998375378516613,
"key": Object {
@@ -483,6 +523,7 @@ Array [
"transactionsPerMinute": 0.9,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 21343,
"impact": 0.11156906191034,
"key": Object {
@@ -495,6 +536,7 @@ Array [
"transactionsPerMinute": 0.2,
},
Object {
+ "agentName": "ruby",
"averageResponseTime": 16655,
"impact": 0.116142352941114,
"key": Object {
@@ -507,6 +549,7 @@ Array [
"transactionsPerMinute": 0.266666666666667,
},
Object {
+ "agentName": "go",
"averageResponseTime": 5749,
"impact": 0.12032203382142,
"key": Object {
@@ -519,6 +562,7 @@ Array [
"transactionsPerMinute": 0.8,
},
Object {
+ "agentName": "ruby",
"averageResponseTime": 9951,
"impact": 0.121502864272824,
"key": Object {
@@ -531,6 +575,7 @@ Array [
"transactionsPerMinute": 0.466666666666667,
},
Object {
+ "agentName": "go",
"averageResponseTime": 14040.6,
"impact": 0.122466591367692,
"key": Object {
@@ -543,6 +588,7 @@ Array [
"transactionsPerMinute": 0.333333333333333,
},
Object {
+ "agentName": "ruby",
"averageResponseTime": 20963.5714285714,
"impact": 0.128060974201361,
"key": Object {
@@ -555,6 +601,7 @@ Array [
"transactionsPerMinute": 0.233333333333333,
},
Object {
+ "agentName": "python",
"averageResponseTime": 22874.4285714286,
"impact": 0.139865748579522,
"key": Object {
@@ -567,6 +614,7 @@ Array [
"transactionsPerMinute": 0.233333333333333,
},
Object {
+ "agentName": "python",
"averageResponseTime": 32203.8,
"impact": 0.140658264084276,
"key": Object {
@@ -579,6 +627,7 @@ Array [
"transactionsPerMinute": 0.166666666666667,
},
Object {
+ "agentName": "go",
"averageResponseTime": 4482.11111111111,
"impact": 0.140955678032051,
"key": Object {
@@ -591,6 +640,7 @@ Array [
"transactionsPerMinute": 1.2,
},
Object {
+ "agentName": "ruby",
"averageResponseTime": 12582.3846153846,
"impact": 0.142910490774846,
"key": Object {
@@ -603,6 +653,7 @@ Array [
"transactionsPerMinute": 0.433333333333333,
},
Object {
+ "agentName": "ruby",
"averageResponseTime": 10009.9473684211,
"impact": 0.166401779979233,
"key": Object {
@@ -615,6 +666,7 @@ Array [
"transactionsPerMinute": 0.633333333333333,
},
Object {
+ "agentName": "python",
"averageResponseTime": 27825.2857142857,
"impact": 0.170450845832029,
"key": Object {
@@ -627,6 +679,7 @@ Array [
"transactionsPerMinute": 0.233333333333333,
},
Object {
+ "agentName": "python",
"averageResponseTime": 20562.2,
"impact": 0.180021926732983,
"key": Object {
@@ -639,6 +692,7 @@ Array [
"transactionsPerMinute": 0.333333333333333,
},
Object {
+ "agentName": "dotnet",
"averageResponseTime": 7106.76470588235,
"impact": 0.21180020991247,
"key": Object {
@@ -651,6 +705,7 @@ Array [
"transactionsPerMinute": 1.13333333333333,
},
Object {
+ "agentName": "go",
"averageResponseTime": 8612.51724137931,
"impact": 0.218977858687708,
"key": Object {
@@ -663,6 +718,7 @@ Array [
"transactionsPerMinute": 0.966666666666667,
},
Object {
+ "agentName": "ruby",
"averageResponseTime": 11295,
"impact": 0.277663720068132,
"key": Object {
@@ -675,6 +731,7 @@ Array [
"transactionsPerMinute": 0.933333333333333,
},
Object {
+ "agentName": "python",
"averageResponseTime": 65035.8,
"impact": 0.285535040543522,
"key": Object {
@@ -687,6 +744,7 @@ Array [
"transactionsPerMinute": 0.166666666666667,
},
Object {
+ "agentName": "go",
"averageResponseTime": 30999.4705882353,
"impact": 0.463640986028375,
"key": Object {
@@ -699,6 +757,7 @@ Array [
"transactionsPerMinute": 0.566666666666667,
},
Object {
+ "agentName": "go",
"averageResponseTime": 20197.4,
"impact": 0.622424732781511,
"key": Object {
@@ -711,6 +770,7 @@ Array [
"transactionsPerMinute": 1.16666666666667,
},
Object {
+ "agentName": "python",
"averageResponseTime": 64681.6666666667,
"impact": 0.68355874339377,
"key": Object {
@@ -723,6 +783,7 @@ Array [
"transactionsPerMinute": 0.4,
},
Object {
+ "agentName": "dotnet",
"averageResponseTime": 41416.1428571429,
"impact": 0.766127739061111,
"key": Object {
@@ -735,6 +796,7 @@ Array [
"transactionsPerMinute": 0.7,
},
Object {
+ "agentName": "go",
"averageResponseTime": 19429,
"impact": 0.821597646656097,
"key": Object {
@@ -747,6 +809,7 @@ Array [
"transactionsPerMinute": 1.6,
},
Object {
+ "agentName": "dotnet",
"averageResponseTime": 62390.652173913,
"impact": 1.26497653527507,
"key": Object {
@@ -759,6 +822,7 @@ Array [
"transactionsPerMinute": 0.766666666666667,
},
Object {
+ "agentName": "python",
"averageResponseTime": 33266.2,
"impact": 1.76006661931225,
"key": Object {
@@ -771,6 +835,7 @@ Array [
"transactionsPerMinute": 2,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 38491.4444444444,
"impact": 1.83293391905112,
"key": Object {
@@ -783,6 +848,7 @@ Array [
"transactionsPerMinute": 1.8,
},
Object {
+ "agentName": "dotnet",
"averageResponseTime": 118488.6,
"impact": 2.08995781717084,
"key": Object {
@@ -795,6 +861,7 @@ Array [
"transactionsPerMinute": 0.666666666666667,
},
Object {
+ "agentName": "dotnet",
"averageResponseTime": 250440.142857143,
"impact": 4.64001412901584,
"key": Object {
@@ -807,6 +874,7 @@ Array [
"transactionsPerMinute": 0.7,
},
Object {
+ "agentName": "java",
"averageResponseTime": 312096.523809524,
"impact": 5.782704992387,
"key": Object {
@@ -819,6 +887,7 @@ Array [
"transactionsPerMinute": 0.7,
},
Object {
+ "agentName": "ruby",
"averageResponseTime": 91519.7032967033,
"impact": 7.34855500859826,
"key": Object {
@@ -831,6 +900,7 @@ Array [
"transactionsPerMinute": 3.03333333333333,
},
Object {
+ "agentName": "rum-js",
"averageResponseTime": 648269.769230769,
"impact": 7.43611473386403,
"key": Object {
@@ -843,6 +913,7 @@ Array [
"transactionsPerMinute": 0.433333333333333,
},
Object {
+ "agentName": "python",
"averageResponseTime": 1398919.72727273,
"impact": 13.5790895084132,
"key": Object {
@@ -855,6 +926,7 @@ Array [
"transactionsPerMinute": 0.366666666666667,
},
Object {
+ "agentName": "rum-js",
"averageResponseTime": 1199907.57142857,
"impact": 14.8239822181408,
"key": Object {
@@ -867,6 +939,7 @@ Array [
"transactionsPerMinute": 0.466666666666667,
},
Object {
+ "agentName": "rum-js",
"averageResponseTime": 955876.052631579,
"impact": 16.026822184214,
"key": Object {
@@ -879,6 +952,7 @@ Array [
"transactionsPerMinute": 0.633333333333333,
},
Object {
+ "agentName": "go",
"averageResponseTime": 965009.526315789,
"impact": 16.1799735991728,
"key": Object {
@@ -891,6 +965,7 @@ Array [
"transactionsPerMinute": 0.633333333333333,
},
Object {
+ "agentName": "rum-js",
"averageResponseTime": 1213675.30769231,
"impact": 27.8474053933734,
"key": Object {
@@ -903,6 +978,7 @@ Array [
"transactionsPerMinute": 0.866666666666667,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 924019.363636364,
"impact": 35.8796065162284,
"key": Object {
@@ -915,6 +991,7 @@ Array [
"transactionsPerMinute": 1.46666666666667,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 1060469.15384615,
"impact": 36.498655556576,
"key": Object {
@@ -927,6 +1004,7 @@ Array [
"transactionsPerMinute": 1.3,
},
Object {
+ "agentName": "python",
"averageResponseTime": 118686.822222222,
"impact": 37.7068083771466,
"key": Object {
@@ -939,6 +1017,7 @@ Array [
"transactionsPerMinute": 12,
},
Object {
+ "agentName": "nodejs",
"averageResponseTime": 1039228.27659574,
"impact": 43.1048035741496,
"key": Object {
@@ -951,6 +1030,7 @@ Array [
"transactionsPerMinute": 1.56666666666667,
},
Object {
+ "agentName": "python",
"averageResponseTime": 1949922.55555556,
"impact": 61.9499776921889,
"key": Object {
@@ -963,6 +1043,7 @@ Array [
"transactionsPerMinute": 1.2,
},
Object {
+ "agentName": "dotnet",
"averageResponseTime": 5963775,
"impact": 100,
"key": Object {
diff --git a/x-pack/test/apm_api_integration/tests/traces/top_traces.spec.ts b/x-pack/test/apm_api_integration/tests/traces/top_traces.spec.ts
index 51b14809982d81..06a24cbd34a4bc 100644
--- a/x-pack/test/apm_api_integration/tests/traces/top_traces.spec.ts
+++ b/x-pack/test/apm_api_integration/tests/traces/top_traces.spec.ts
@@ -63,6 +63,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(firstItem).toMatchInline(`
Object {
+ "agentName": "java",
"averageResponseTime": 1639,
"impact": 0,
"key": Object {
@@ -78,6 +79,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(lastItem).toMatchInline(`
Object {
+ "agentName": "dotnet",
"averageResponseTime": 5963775,
"impact": 100,
"key": Object {
diff --git a/x-pack/test/functional_with_es_ssl/apps/uptime/alert_flyout.ts b/x-pack/test/functional_with_es_ssl/apps/uptime/alert_flyout.ts
index bb89fa8f683fac..1d8a172e57b78b 100644
--- a/x-pack/test/functional_with_es_ssl/apps/uptime/alert_flyout.ts
+++ b/x-pack/test/functional_with_es_ssl/apps/uptime/alert_flyout.ts
@@ -142,7 +142,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
});
});
- describe('tls alert', function () {
+ // FLAKY: https://github.com/elastic/kibana/issues/116865
+ describe.skip('tls alert', function () {
const DEFAULT_DATE_START = 'Sep 10, 2019 @ 12:40:08.078';
const DEFAULT_DATE_END = 'Sep 11, 2019 @ 19:40:08.078';
let alerts: any;
diff --git a/x-pack/test/observability_functional/apps/observability/alerts/add_to_case.ts b/x-pack/test/observability_functional/apps/observability/alerts/add_to_case.ts
index 67dbf2368c044e..276fab1f1cb444 100644
--- a/x-pack/test/observability_functional/apps/observability/alerts/add_to_case.ts
+++ b/x-pack/test/observability_functional/apps/observability/alerts/add_to_case.ts
@@ -68,7 +68,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => {
});
});
- describe('When user has read permissions for cases', () => {
+ describe.skip('When user has read permissions for cases', () => {
before(async () => {
await observability.users.setTestUserRole(
observability.users.defineBasicObservabilityRole({
@@ -83,6 +83,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => {
await observability.users.restoreDefaultTestUserRole();
});
+ // Hide the WorkFlow filter, but keep its code as required in https://github.com/elastic/kibana/issues/117686
it('does not render case options in the overflow menu', async () => {
await observability.alerts.common.openActionsMenuForRow(0);
await retry.try(async () => {
diff --git a/x-pack/test/observability_functional/apps/observability/alerts/bulk_actions.ts b/x-pack/test/observability_functional/apps/observability/alerts/bulk_actions.ts
index 749324a39ba207..3784890e5a8093 100644
--- a/x-pack/test/observability_functional/apps/observability/alerts/bulk_actions.ts
+++ b/x-pack/test/observability_functional/apps/observability/alerts/bulk_actions.ts
@@ -25,7 +25,8 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => {
const retry = getService('retry');
- describe('Observability alerts / Bulk actions', function () {
+ // Hide the WorkFlow filter, but keep its code as required in https://github.com/elastic/kibana/issues/117686
+ describe.skip('Observability alerts / Bulk actions', function () {
this.tags('includeFirefox');
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/observability/alerts');
diff --git a/x-pack/test/observability_functional/apps/observability/alerts/index.ts b/x-pack/test/observability_functional/apps/observability/alerts/index.ts
index 4d2f4b971f0808..048c007dcb6a46 100644
--- a/x-pack/test/observability_functional/apps/observability/alerts/index.ts
+++ b/x-pack/test/observability_functional/apps/observability/alerts/index.ts
@@ -15,8 +15,8 @@ async function asyncForEach(array: T[], callback: (item: T, index: number) =>
}
const ACTIVE_ALERTS_CELL_COUNT = 78;
-const RECOVERED_ALERTS_CELL_COUNT = 120;
-const TOTAL_ALERTS_CELL_COUNT = 198;
+const RECOVERED_ALERTS_CELL_COUNT = 100;
+const TOTAL_ALERTS_CELL_COUNT = 165;
export default ({ getService }: FtrProviderContext) => {
const esArchiver = getService('esArchiver');
@@ -205,7 +205,7 @@ export default ({ getService }: FtrProviderContext) => {
await observability.alerts.common.submitQuery('');
});
- it('Filter for value works', async () => {
+ it.skip('Filter for value works', async () => {
await (await observability.alerts.common.getFilterForValueButton()).click();
const queryBarValue = await (
await observability.alerts.common.getQueryBar()
diff --git a/x-pack/test/saved_object_api_integration/common/suites/bulk_create.ts b/x-pack/test/saved_object_api_integration/common/suites/bulk_create.ts
index 45a96f8ebd8b44..d53afdbddd6ed3 100644
--- a/x-pack/test/saved_object_api_integration/common/suites/bulk_create.ts
+++ b/x-pack/test/saved_object_api_integration/common/suites/bulk_create.ts
@@ -109,17 +109,30 @@ export function bulkCreateTestSuiteFactory(esArchiver: any, supertest: SuperTest
const { type, id } = testCase;
expect(object.type).to.eql(type);
expect(object.id).to.eql(id);
- let metadata;
+ let expectedMetadata;
if (testCase.fail409Param === 'unresolvableConflict') {
- metadata = { isNotOverwritable: true };
+ expectedMetadata = { isNotOverwritable: true };
} else if (testCase.fail409Param === 'aliasConflictSpace1') {
- metadata = { spacesWithConflictingAliases: ['space_1'] };
+ expectedMetadata = { spacesWithConflictingAliases: ['space_1'] };
} else if (testCase.fail409Param === 'aliasConflictAllSpaces') {
- metadata = { spacesWithConflictingAliases: ['space_1', 'space_x'] };
+ expectedMetadata = { spacesWithConflictingAliases: ['space_1', 'space_x'] };
+ }
+ const expectedError = SavedObjectsErrorHelpers.createConflictError(type, id).output
+ .payload;
+ expect(object.error).be.an('object');
+ expect(object.error.statusCode).to.eql(expectedError.statusCode);
+ expect(object.error.error).to.eql(expectedError.error);
+ expect(object.error.message).to.eql(expectedError.message);
+ if (expectedMetadata) {
+ const actualMetadata = object.error.metadata ?? {};
+ if (actualMetadata.spacesWithConflictingAliases) {
+ actualMetadata.spacesWithConflictingAliases =
+ actualMetadata.spacesWithConflictingAliases.sort();
+ }
+ expect(actualMetadata).to.eql(expectedMetadata);
+ } else {
+ expect(object.error.metadata).to.be(undefined);
}
- const error = SavedObjectsErrorHelpers.createConflictError(type, id);
- const payload = { ...error.output.payload, ...(metadata && { metadata }) };
- expect(object.error).to.eql(payload);
continue;
}
await expectResponses.permitted(object, testCase);
diff --git a/x-pack/test/security_functional/fixtures/common/test_endpoints/public/plugin.tsx b/x-pack/test/security_functional/fixtures/common/test_endpoints/public/plugin.tsx
index b0264998db17df..745a8852968c01 100644
--- a/x-pack/test/security_functional/fixtures/common/test_endpoints/public/plugin.tsx
+++ b/x-pack/test/security_functional/fixtures/common/test_endpoints/public/plugin.tsx
@@ -8,21 +8,34 @@
import type { CoreSetup, Plugin } from 'src/core/public';
import ReactDOM from 'react-dom';
import React from 'react';
+import { debounce, filter, first } from 'rxjs/operators';
+import { timer } from 'rxjs';
export class TestEndpointsPlugin implements Plugin {
public setup(core: CoreSetup) {
// Prevent auto-logout on server `401` errors.
core.http.anonymousPaths.register('/authentication/app');
+
+ const networkIdle$ = core.http.getLoadingCount$().pipe(
+ debounce(() => timer(3000)),
+ filter((count) => count === 0),
+ first()
+ );
+
core.application.register({
id: 'authentication_app',
title: 'Authentication app',
appRoute: '/authentication/app',
chromeless: true,
async mount({ element }) {
- ReactDOM.render(
- Authenticated!
,
- element
- );
+ // Promise is resolved as soon there are no requests has been made in the last 3 seconds. We need this to make
+ // sure none of the unrelated requests interferes with the test logic.
+ networkIdle$.toPromise().then(() => {
+ ReactDOM.render(
+ Authenticated!
,
+ element
+ );
+ });
return () => ReactDOM.unmountComponentAtNode(element);
},
});
diff --git a/x-pack/test/upgrade/apps/dashboard/dashboard_smoke_tests.ts b/x-pack/test/upgrade/apps/dashboard/dashboard_smoke_tests.ts
index c9833610711701..2f35f0e1e12d36 100644
--- a/x-pack/test/upgrade/apps/dashboard/dashboard_smoke_tests.ts
+++ b/x-pack/test/upgrade/apps/dashboard/dashboard_smoke_tests.ts
@@ -25,7 +25,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
];
const dashboardTests = [
- { name: 'flights', numPanels: 17 },
+ { name: 'flights', numPanels: 16 },
{ name: 'logs', numPanels: 10 },
{ name: 'ecommerce', numPanels: 11 },
];
diff --git a/x-pack/test/upgrade/apps/maps/maps_smoke_tests.ts b/x-pack/test/upgrade/apps/maps/maps_smoke_tests.ts
index 53acb8b016313a..22e081e88bfc4d 100644
--- a/x-pack/test/upgrade/apps/maps/maps_smoke_tests.ts
+++ b/x-pack/test/upgrade/apps/maps/maps_smoke_tests.ts
@@ -167,7 +167,7 @@ export default function ({
);
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.maps.waitForLayersToLoad();
- await PageObjects.maps.toggleLayerVisibility('Road map - desaturated');
+ await PageObjects.maps.toggleLayerVisibility('Road map');
await PageObjects.maps.toggleLayerVisibility('Total Requests by Country');
await PageObjects.timePicker.setCommonlyUsedTime('sample_data range');
await PageObjects.maps.enterFullScreen();
diff --git a/yarn.lock b/yarn.lock
index 44185306ca38f2..71b82ffdf5af63 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5259,10 +5259,10 @@
resolved "https://registry.yarnpkg.com/@types/classnames/-/classnames-2.2.9.tgz#d868b6febb02666330410fe7f58f3c4b8258be7b"
integrity sha512-MNl+rT5UmZeilaPxAVs6YaPC2m6aA8rofviZbhbxpPpl61uKodfdQVsBtgJGTqGizEf02oW3tsVe7FYB8kK14A==
-"@types/clone@~2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@types/clone/-/clone-2.1.0.tgz#cb888a3fe5319275b566ae3a9bc606e310c533d4"
- integrity sha512-d/aS/lPOnUSruPhgNtT8jW39fHRVTLQy9sodysP1kkG8EdAtdZu1vt8NJaYA8w/6Z9j8izkAsx1A/yJhcYR1CA==
+"@types/clone@~2.1.1":
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/@types/clone/-/clone-2.1.1.tgz#9b880d0ce9b1f209b5e0bd6d9caa38209db34024"
+ integrity sha512-BZIU34bSYye0j/BFcPraiDZ5ka6MJADjcDVELGf7glr9K+iE8NYVjFslJFVWzskSxkLLyCrSPScE82/UUoBSvg==
"@types/cmd-shim@^2.0.0":
version "2.0.0"
@@ -5424,7 +5424,7 @@
"@types/estree" "*"
"@types/json-schema" "*"
-"@types/estree@*":
+"@types/estree@*", "@types/estree@^0.0.50":
version "0.0.50"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83"
integrity sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==
@@ -5468,11 +5468,6 @@
resolved "https://registry.yarnpkg.com/@types/fancy-log/-/fancy-log-1.3.1.tgz#dd94fbc8c2e2ab8ab402ca8d04bb8c34965f0696"
integrity sha512-31Dt9JaGfHretvwVxCBrCFL5iC9MQ3zOXpu+8C4qzW0cxc5rJJVGxB5c/vZ+wmeTk/JjPz/D0gv8BZ+Ip6iCqQ==
-"@types/fast-json-stable-stringify@^2.0.0":
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/@types/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#40363bb847cb86b2c2e1599f1398d11e8329c921"
- integrity sha512-mky/O83TXmGY39P1H9YbUpjV6l6voRYlufqfFCvel8l1phuy8HRjdWc1rrPuN53ITBJlbyMSV6z3niOySO5pgQ==
-
"@types/fetch-mock@^7.3.1":
version "7.3.1"
resolved "https://registry.yarnpkg.com/@types/fetch-mock/-/fetch-mock-7.3.1.tgz#df7421e8bcb351b430bfbfa5c52bb353826ac94f"
@@ -5814,6 +5809,10 @@
version "0.0.0"
uid ""
+"@types/kbn__alerts@link:bazel-bin/packages/kbn-alerts/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 ""
@@ -27558,16 +27557,11 @@ tslib@^2.0.0, tslib@^2.0.1, tslib@^2.2.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c"
integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==
-tslib@^2.3.0:
+tslib@^2.3.0, tslib@~2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==
-tslib@~2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"
- integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==
-
tsutils@2.27.2:
version "2.27.2"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.27.2.tgz#60ba88a23d6f785ec4b89c6e8179cac9b431f1c7"
@@ -28574,14 +28568,14 @@ vega-crossfilter@~4.0.5:
vega-dataflow "^5.7.3"
vega-util "^1.15.2"
-vega-dataflow@^5.7.3, vega-dataflow@~5.7.3:
- version "5.7.3"
- resolved "https://registry.yarnpkg.com/vega-dataflow/-/vega-dataflow-5.7.3.tgz#66ca06a61f72a210b0732e3b6cc1eec5117197f7"
- integrity sha512-2ipzKgQUmbSXcQBH+9XF0BYbXyZrHvjlbJ8ifyRWYQk78w8kMvE6wy/rcdXYK6iVZ6aAbEDDT7jTI+rFt3tGLA==
+vega-dataflow@^5.7.3, vega-dataflow@^5.7.4, vega-dataflow@~5.7.4:
+ version "5.7.4"
+ resolved "https://registry.yarnpkg.com/vega-dataflow/-/vega-dataflow-5.7.4.tgz#7cafc0a41b9d0b11dd2e34a513f8b7ca345dfd74"
+ integrity sha512-JGHTpUo8XGETH3b1V892we6hdjzCWB977ybycIu8DPqRoyrZuj6t1fCVImazfMgQD1LAfJlQybWP+alwKDpKig==
dependencies:
vega-format "^1.0.4"
vega-loader "^4.3.2"
- vega-util "^1.15.2"
+ vega-util "^1.16.1"
vega-encode@~4.8.3:
version "4.8.3"
@@ -28594,16 +28588,17 @@ vega-encode@~4.8.3:
vega-scale "^7.0.3"
vega-util "^1.15.2"
-vega-event-selector@^2.0.6, vega-event-selector@~2.0.6:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/vega-event-selector/-/vega-event-selector-2.0.6.tgz#6beb00e066b78371dde1a0f40cb5e0bbaecfd8bc"
- integrity sha512-UwCu50Sqd8kNZ1X/XgiAY+QAyQUmGFAwyDu7y0T5fs6/TPQnDo/Bo346NgSgINBEhEKOAMY1Nd/rPOk4UEm/ew==
+vega-event-selector@^3.0.0, vega-event-selector@~3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/vega-event-selector/-/vega-event-selector-3.0.0.tgz#7b855ac0c3ddb59bc5b5caa0d96dbbc9fbd33a4c"
+ integrity sha512-Gls93/+7tEJGE3kUuUnxrBIxtvaNeF01VIFB2Q2Of2hBIBvtHX74jcAdDtkh5UhhoYGD8Q1J30P5cqEBEwtPoQ==
-vega-expression@^4.0.1, vega-expression@~4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/vega-expression/-/vega-expression-4.0.1.tgz#c03e4fc68a00acac49557faa4e4ed6ac8a59c5fd"
- integrity sha512-ZrDj0hP8NmrCpdLFf7Rd/xMUHGoSYsAOTaYp7uXZ2dkEH5x0uPy5laECMc8TiQvL8W+8IrN2HAWCMRthTSRe2Q==
+vega-expression@^5.0.0, vega-expression@~5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/vega-expression/-/vega-expression-5.0.0.tgz#938f26689693a1e0d26716030cdaed43ca7abdfb"
+ integrity sha512-y5+c2frq0tGwJ7vYXzZcfVcIRF/QGfhf2e+bV1Z0iQs+M2lI1II1GPDdmOcMKimpoCVp/D61KUJDIGE1DSmk2w==
dependencies:
+ "@types/estree" "^0.0.50"
vega-util "^1.16.0"
vega-force@~4.0.7:
@@ -28626,19 +28621,19 @@ vega-format@^1.0.4, vega-format@~1.0.4:
vega-time "^2.0.3"
vega-util "^1.15.2"
-vega-functions@^5.10.0, vega-functions@^5.12.0, vega-functions@~5.12.0:
- version "5.12.0"
- resolved "https://registry.yarnpkg.com/vega-functions/-/vega-functions-5.12.0.tgz#44bf08a7b20673dc8cf51d6781c8ea1399501668"
- integrity sha512-3hljmGs+gR7TbO/yYuvAP9P5laKISf1GKk4yRHLNdM61fWgKm8pI3f6LY2Hvq9cHQFTiJ3/5/Bx2p1SX5R4quQ==
+vega-functions@^5.10.0, vega-functions@^5.12.1, vega-functions@~5.12.1:
+ version "5.12.1"
+ resolved "https://registry.yarnpkg.com/vega-functions/-/vega-functions-5.12.1.tgz#b69f9ad4cd9f777dbc942587c02261b2f4cdba2c"
+ integrity sha512-7cHfcjXOj27qEbh2FTzWDl7FJK4xGcMFF7+oiyqa0fp7BU/wNT5YdNV0t5kCX9WjV7mfJWACKV74usLJbyM6GA==
dependencies:
d3-array "^2.7.1"
d3-color "^2.0.0"
d3-geo "^2.0.1"
vega-dataflow "^5.7.3"
- vega-expression "^4.0.1"
+ vega-expression "^5.0.0"
vega-scale "^7.1.1"
vega-scenegraph "^4.9.3"
- vega-selections "^5.3.0"
+ vega-selections "^5.3.1"
vega-statistics "^1.7.9"
vega-time "^2.0.4"
vega-util "^1.16.0"
@@ -28671,38 +28666,37 @@ vega-interpreter@^1.0.4:
resolved "https://registry.yarnpkg.com/vega-interpreter/-/vega-interpreter-1.0.4.tgz#291ebf85bc2d1c3550a3da22ff75b3ba0d326a39"
integrity sha512-6tpYIa/pJz0cZo5fSxDSkZkAA51pID2LjOtQkOQvbzn+sJiCaWKPFhur8MBqbcmYZ9bnap1OYNwlrvpd2qBLvg==
-vega-label@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/vega-label/-/vega-label-1.0.0.tgz#c3bea3a608a62217ca554ecc0f7fe0395d81bd1b"
- integrity sha512-hCdm2pcHgkKgxnzW9GvX5JmYNiUMlOXOibtMmBzvFBQHX3NiV9giQ5nsPiQiFbV08VxEPtM+VYXr2HyrIcq5zQ==
+vega-label@~1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/vega-label/-/vega-label-1.1.0.tgz#0a11ae3ba18d7aed909c51ec67c2a9dde4426c6f"
+ integrity sha512-LAThIiDEsZxYvbSkvPLJ93eJF+Ts8RXv1IpBh8gmew8XGmaLJvVkzdsMe7WJJwuaVEsK7ZZFyB/Inkp842GW6w==
dependencies:
vega-canvas "^1.2.5"
vega-dataflow "^5.7.3"
vega-scenegraph "^4.9.2"
vega-util "^1.15.2"
-vega-lite@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/vega-lite/-/vega-lite-5.0.0.tgz#93898a910702736da41048f590882b907d78ac65"
- integrity sha512-CrMAy3D2E662qtShrOeGttwwthRxUOZUfdu39THyxkOfLNJBCLkNjfQpFekEidxwbtFTO1zMZzyFIP3AE2I8kQ==
+vega-lite@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/vega-lite/-/vega-lite-5.2.0.tgz#bc3c5c70a38d9de8f3fb9644c7dd52f3b9f47a1b"
+ integrity sha512-Yxcg8MvYfxHcG6BbkaKT0oVCIMIcE19UvqIsEwBmyd/7h2nzW7oRnID81T8UrY7hpDrIr6wa2JADOT2dhGNErw==
dependencies:
- "@types/clone" "~2.1.0"
- "@types/fast-json-stable-stringify" "^2.0.0"
+ "@types/clone" "~2.1.1"
array-flat-polyfill "^1.0.1"
clone "~2.1.2"
fast-deep-equal "~3.1.3"
fast-json-stable-stringify "~2.1.0"
json-stringify-pretty-compact "~3.0.0"
- tslib "~2.1.0"
- vega-event-selector "~2.0.6"
- vega-expression "~4.0.1"
- vega-util "~1.16.0"
- yargs "~16.2.0"
+ tslib "~2.3.1"
+ vega-event-selector "~3.0.0"
+ vega-expression "~5.0.0"
+ vega-util "~1.17.0"
+ yargs "~17.2.1"
-vega-loader@^4.3.2, vega-loader@^4.3.3, vega-loader@~4.4.0:
- version "4.4.0"
- resolved "https://registry.yarnpkg.com/vega-loader/-/vega-loader-4.4.0.tgz#fc515b7368c46b2be8df1fcf3c35c696c13c453d"
- integrity sha512-e5enQECdau7rJob0NFB5pGumh3RaaSWWm90+boxMy3ay2b4Ki/3XIvo+C4F1Lx04qSxvQF7tO2LJcklRm6nqRA==
+vega-loader@^4.3.2, vega-loader@^4.3.3, vega-loader@~4.4.1:
+ version "4.4.1"
+ resolved "https://registry.yarnpkg.com/vega-loader/-/vega-loader-4.4.1.tgz#8f9de46202f33659d1a2737f6e322a9fc3364275"
+ integrity sha512-dj65i4qlNhK0mOmjuchHgUrF5YUaWrYpx0A8kXA68lBk5Hkx8FNRztkcl07CZJ1+8V81ymEyJii9jzGbhEX0ag==
dependencies:
d3-dsv "^2.0.0"
node-fetch "^2.6.1"
@@ -28710,14 +28704,14 @@ vega-loader@^4.3.2, vega-loader@^4.3.3, vega-loader@~4.4.0:
vega-format "^1.0.4"
vega-util "^1.16.0"
-vega-parser@~6.1.3:
- version "6.1.3"
- resolved "https://registry.yarnpkg.com/vega-parser/-/vega-parser-6.1.3.tgz#df72785e4b086eceb90ee6219a399210933b507b"
- integrity sha512-8oiVhhW26GQ4GZBvolId8FVFvhn3s1KGgPlD7Z+4P2wkV+xe5Nqu0TEJ20F/cn3b88fd0Vj48X3BH3dlSeKNFg==
+vega-parser@~6.1.4:
+ version "6.1.4"
+ resolved "https://registry.yarnpkg.com/vega-parser/-/vega-parser-6.1.4.tgz#4868e41af2c9645b6d7daeeb205cfad06b9d465c"
+ integrity sha512-tORdpWXiH/kkXcpNdbSVEvtaxBuuDtgYp9rBunVW9oLsjFvFXbSWlM1wvJ9ZFSaTfx6CqyTyGMiJemmr1QnTjQ==
dependencies:
vega-dataflow "^5.7.3"
- vega-event-selector "^2.0.6"
- vega-functions "^5.12.0"
+ vega-event-selector "^3.0.0"
+ vega-functions "^5.12.1"
vega-scale "^7.1.1"
vega-util "^1.16.0"
@@ -28758,10 +28752,10 @@ vega-scale@^7.0.3, vega-scale@^7.1.1, vega-scale@~7.1.1:
vega-time "^2.0.4"
vega-util "^1.15.2"
-vega-scenegraph@^4.9.2, vega-scenegraph@^4.9.3, vega-scenegraph@~4.9.3:
- version "4.9.3"
- resolved "https://registry.yarnpkg.com/vega-scenegraph/-/vega-scenegraph-4.9.3.tgz#c4720550ea7ff5c8d9d0690f47fe2640547cfc6b"
- integrity sha512-lBvqLbXqrqRCTGJmSgzZC/tLR/o+TXfakbdhDzNdpgTavTaQ65S/67Gpj5hPpi77DvsfZUIY9lCEeO37aJhy0Q==
+vega-scenegraph@^4.9.2, vega-scenegraph@^4.9.3, vega-scenegraph@^4.9.4, vega-scenegraph@~4.9.4:
+ version "4.9.4"
+ resolved "https://registry.yarnpkg.com/vega-scenegraph/-/vega-scenegraph-4.9.4.tgz#468408c1e89703fa9d3450445daabff623de2757"
+ integrity sha512-QaegQzbFE2yhYLNWAmHwAuguW3yTtQrmwvfxYT8tk0g+KKodrQ5WSmNrphWXhqwtsgVSvtdZkfp2IPeumcOQJg==
dependencies:
d3-path "^2.0.0"
d3-shape "^2.0.0"
@@ -28770,17 +28764,17 @@ vega-scenegraph@^4.9.2, vega-scenegraph@^4.9.3, vega-scenegraph@~4.9.3:
vega-scale "^7.1.1"
vega-util "^1.15.2"
-vega-schema-url-parser@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/vega-schema-url-parser/-/vega-schema-url-parser-2.1.0.tgz#847f9cf9f1624f36f8a51abc1adb41ebc6673cb4"
- integrity sha512-JHT1PfOyVzOohj89uNunLPirs05Nf59isPT5gnwIkJph96rRgTIBJE7l7yLqndd7fLjr3P8JXHGAryRp74sCaQ==
+vega-schema-url-parser@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/vega-schema-url-parser/-/vega-schema-url-parser-2.2.0.tgz#a0d1e02915adfbfcb1fd517c8c2ebe2419985c1e"
+ integrity sha512-yAtdBnfYOhECv9YC70H2gEiqfIbVkq09aaE4y/9V/ovEFmH9gPKaEgzIZqgT7PSPQjKhsNkb6jk6XvSoboxOBw==
-vega-selections@^5.3.0:
- version "5.3.0"
- resolved "https://registry.yarnpkg.com/vega-selections/-/vega-selections-5.3.0.tgz#810f2e7b7642fa836cf98b2e5dcc151093b1f6a7"
- integrity sha512-vC4NPsuN+IffruFXfH0L3i2A51RgG4PqpLv85TvrEAIYnSkyKDE4bf+wVraR3aPdnLLkc3+tYuMi6le5FmThIA==
+vega-selections@^5.3.1:
+ version "5.3.1"
+ resolved "https://registry.yarnpkg.com/vega-selections/-/vega-selections-5.3.1.tgz#af5c3cc6532a55a5b692eb0fcc2a1d8d521605a4"
+ integrity sha512-cm4Srw1WHjcLGXX7GpxiUlfESv8XPu5b6Vh3mqMDPU94P2FO91SR9gei+EtRdt+KCFgIjr//MnRUjg/hAWwjkQ==
dependencies:
- vega-expression "^4.0.1"
+ vega-expression "^5.0.0"
vega-util "^1.16.0"
vega-spec-injector@^0.0.2:
@@ -28788,10 +28782,10 @@ vega-spec-injector@^0.0.2:
resolved "https://registry.yarnpkg.com/vega-spec-injector/-/vega-spec-injector-0.0.2.tgz#f1d990109dd9d845c524738f818baa4b72a60ca6"
integrity sha512-wOMMqmpssn0/ZFPW7wl1v26vbseRX7zHPWzEyS9TwNXTRCu1TcjIBIR+X23lCWocxhoBqFxmqyn8UowMhlGtAg==
-vega-statistics@^1.7.9, vega-statistics@~1.7.9:
- version "1.7.9"
- resolved "https://registry.yarnpkg.com/vega-statistics/-/vega-statistics-1.7.9.tgz#feec01d463e1b50593d890d20631f72138fcb65d"
- integrity sha512-T0sd2Z08k/mHxr1Vb4ajLWytPluLFYnsYqyk4SIS5czzUs4errpP2gUu63QJ0B7CKNu33vnS9WdOMOo/Eprr/Q==
+vega-statistics@^1.7.9, vega-statistics@~1.7.10:
+ version "1.7.10"
+ resolved "https://registry.yarnpkg.com/vega-statistics/-/vega-statistics-1.7.10.tgz#4353637402e5e96bff2ebd16bd58e2c15cac3018"
+ integrity sha512-QLb12gcfpDZ9K5h3TLGrlz4UXDH9wSPyg9LLfOJZacxvvJEPohacUQNrGEAVtFO9ccUCerRfH9cs25ZtHsOZrw==
dependencies:
d3-array "^2.7.1"
@@ -28804,35 +28798,37 @@ vega-time@^2.0.3, vega-time@^2.0.4, vega-time@~2.0.4:
d3-time "^2.0.0"
vega-util "^1.15.2"
-vega-tooltip@^0.25.1:
- version "0.25.1"
- resolved "https://registry.yarnpkg.com/vega-tooltip/-/vega-tooltip-0.25.1.tgz#cb7e438438649eb46896e7bee6f54e25d25b3c09"
- integrity sha512-ugGwGi2/p3OpB8N15xieuzP8DyV5DreqMWcmJ9zpWT8GlkyKtef4dGRXnvHeHQ+iJFmWrq4oZJ+kLTrdiECjAg==
+vega-tooltip@^0.27.0:
+ version "0.27.0"
+ resolved "https://registry.yarnpkg.com/vega-tooltip/-/vega-tooltip-0.27.0.tgz#e03c150cdec78f68938a0dab5ef67a24e6d685da"
+ integrity sha512-FRcHNfMNo9D/7an5nZuP6JC2JGEsc85qcGjyMU7VlPpjQj9eBj1P+sZSNbb54Z20g7inVSBRyd8qgNn5EYTxJA==
dependencies:
vega-util "^1.16.0"
-vega-transforms@~4.9.3:
- version "4.9.3"
- resolved "https://registry.yarnpkg.com/vega-transforms/-/vega-transforms-4.9.3.tgz#40e5234b956a68eaa03eedf489ed03293075bbfb"
- integrity sha512-PdqQd5oPlRyD405M2w+Sz9Bo+i7Rwi8o03SVK7RaeQsJC2FffKGJ6acIaSEgOq+yD1Q2k/1SePmCXcmLUlIiEA==
+vega-transforms@~4.9.4:
+ version "4.9.4"
+ resolved "https://registry.yarnpkg.com/vega-transforms/-/vega-transforms-4.9.4.tgz#5cf6b91bda9f184bbbaba63838be8e5e6a571235"
+ integrity sha512-JGBhm5Bf6fiGTUSB5Qr5ckw/KU9FJcSV5xIe/y4IobM/i/KNwI1i1fP45LzP4F4yZc0DMTwJod2UvFHGk9plKA==
dependencies:
d3-array "^2.7.1"
- vega-dataflow "^5.7.3"
+ vega-dataflow "^5.7.4"
vega-statistics "^1.7.9"
vega-time "^2.0.4"
- vega-util "^1.15.2"
+ vega-util "^1.16.1"
-vega-typings@~0.19.2:
- version "0.19.2"
- resolved "https://registry.yarnpkg.com/vega-typings/-/vega-typings-0.19.2.tgz#374fc1020c1abb263a0be87de28d1a4bd0526c3f"
- integrity sha512-YU/S9rDk4d+t4+4eTa9fzuw87PMNteeVtpcL51kUO8H7HvGaoW7ll8RHKLkR0NYBEGPRoFDKUxnoyMvhgjsdYw==
+vega-typings@~0.22.0:
+ version "0.22.1"
+ resolved "https://registry.yarnpkg.com/vega-typings/-/vega-typings-0.22.1.tgz#287c646cfa93b1822d0fb6ea11d5543632f8b56e"
+ integrity sha512-88cIrjmoTxo/0nWTf+GuitkFhirHWVWCfymADiCUXt6s9arpQ6XPP5xjrN5KDc0LZd9xr7p4FIiEgADghgLTgw==
dependencies:
+ vega-event-selector "^3.0.0"
+ vega-expression "^5.0.0"
vega-util "^1.15.2"
-vega-util@^1.15.2, vega-util@^1.16.0, vega-util@~1.16.0:
- version "1.16.0"
- resolved "https://registry.yarnpkg.com/vega-util/-/vega-util-1.16.0.tgz#77405d8df0a94944d106bdc36015f0d43aa2caa3"
- integrity sha512-6mmz6mI+oU4zDMeKjgvE2Fjz0Oh6zo6WGATcvCfxH2gXBzhBHmy5d25uW5Zjnkc6QBXSWPLV9Xa6SiqMsrsKog==
+vega-util@^1.15.2, vega-util@^1.16.0, vega-util@^1.16.1, vega-util@~1.17.0:
+ version "1.17.0"
+ resolved "https://registry.yarnpkg.com/vega-util/-/vega-util-1.17.0.tgz#b72ae0baa97f943bf591f8f5bb27ceadf06834ac"
+ integrity sha512-HTaydZd9De3yf+8jH66zL4dXJ1d1p5OIFyoBzFiOli4IJbwkL1jrefCKz6AHDm1kYBzDJ0X4bN+CzZSCTvNk1w==
vega-view-transforms@~4.5.8:
version "4.5.8"
@@ -28843,10 +28839,10 @@ vega-view-transforms@~4.5.8:
vega-scenegraph "^4.9.2"
vega-util "^1.15.2"
-vega-view@~5.9.2:
- version "5.9.2"
- resolved "https://registry.yarnpkg.com/vega-view/-/vega-view-5.9.2.tgz#cb957e481a952abbe7b3a11aa2d58cc728f295e7"
- integrity sha512-XAwKWyVjLClR3aCbTLCWdZj7aZozOULNg7078GxJIgVcBJOENCAidceI/H7JieyUZ96p3AiEHLQdWr167InBpg==
+vega-view@~5.10.1:
+ version "5.10.1"
+ resolved "https://registry.yarnpkg.com/vega-view/-/vega-view-5.10.1.tgz#b69348bb32a9845a1bd341fdd946df98684fadc3"
+ integrity sha512-4xvQ5KZcgKdZx1Z7jjenCUumvlyr/j4XcHLRf9gyeFrFvvS596dVpL92V8twhV6O++DmS2+fj+rHagO8Di4nMg==
dependencies:
d3-array "^2.7.1"
d3-timer "^2.0.0"
@@ -28854,8 +28850,8 @@ vega-view@~5.9.2:
vega-format "^1.0.4"
vega-functions "^5.10.0"
vega-runtime "^6.1.3"
- vega-scenegraph "^4.9.2"
- vega-util "^1.15.2"
+ vega-scenegraph "^4.9.4"
+ vega-util "^1.16.1"
vega-voronoi@~4.1.5:
version "4.1.5"
@@ -28877,35 +28873,35 @@ vega-wordcloud@~4.1.3:
vega-statistics "^1.7.9"
vega-util "^1.15.2"
-vega@^5.19.1:
- version "5.19.1"
- resolved "https://registry.yarnpkg.com/vega/-/vega-5.19.1.tgz#64c8350740fe1a11d56cc6617ab3a76811fd704c"
- integrity sha512-UE6/c9q9kzuz4HULFuU9HscBASoZa+zcXqGKdbQP545Nwmhd078QpcH+wZsq9lYfiTxmFtzLK/a0OH0zhkghvA==
+vega@^5.21.0:
+ version "5.21.0"
+ resolved "https://registry.yarnpkg.com/vega/-/vega-5.21.0.tgz#f3d858d7544bfe4ffa3d8cd43d9ea978bf7391e8"
+ integrity sha512-yqqRa9nAqYoAxe7sVhRpsh0b001fly7Yx05klPkXmrvzjxXd07gClW1mOuGgSnVQqo7jTp/LYgbO1bD37FbEig==
dependencies:
vega-crossfilter "~4.0.5"
- vega-dataflow "~5.7.3"
+ vega-dataflow "~5.7.4"
vega-encode "~4.8.3"
- vega-event-selector "~2.0.6"
- vega-expression "~4.0.1"
+ vega-event-selector "~3.0.0"
+ vega-expression "~5.0.0"
vega-force "~4.0.7"
vega-format "~1.0.4"
- vega-functions "~5.12.0"
+ vega-functions "~5.12.1"
vega-geo "~4.3.8"
vega-hierarchy "~4.0.9"
- vega-label "~1.0.0"
- vega-loader "~4.4.0"
- vega-parser "~6.1.3"
+ vega-label "~1.1.0"
+ vega-loader "~4.4.1"
+ vega-parser "~6.1.4"
vega-projection "~1.4.5"
vega-regression "~1.0.9"
vega-runtime "~6.1.3"
vega-scale "~7.1.1"
- vega-scenegraph "~4.9.3"
- vega-statistics "~1.7.9"
+ vega-scenegraph "~4.9.4"
+ vega-statistics "~1.7.10"
vega-time "~2.0.4"
- vega-transforms "~4.9.3"
- vega-typings "~0.19.2"
- vega-util "~1.16.0"
- vega-view "~5.9.2"
+ vega-transforms "~4.9.4"
+ vega-typings "~0.22.0"
+ vega-util "~1.17.0"
+ vega-view "~5.10.1"
vega-view-transforms "~4.5.8"
vega-voronoi "~4.1.5"
vega-wordcloud "~4.1.3"
@@ -29881,7 +29877,7 @@ yargs@^15.0.2, yargs@^15.3.1, yargs@^15.4.1:
y18n "^4.0.0"
yargs-parser "^18.1.2"
-yargs@^16.2.0, yargs@~16.2.0:
+yargs@^16.2.0:
version "16.2.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
@@ -29939,6 +29935,19 @@ yargs@^7.1.0:
y18n "^3.2.1"
yargs-parser "5.0.0-security.0"
+yargs@~17.2.1:
+ version "17.2.1"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.2.1.tgz#e2c95b9796a0e1f7f3bf4427863b42e0418191ea"
+ integrity sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q==
+ dependencies:
+ cliui "^7.0.2"
+ escalade "^3.1.1"
+ get-caller-file "^2.0.5"
+ require-directory "^2.1.1"
+ string-width "^4.2.0"
+ y18n "^5.0.5"
+ yargs-parser "^20.2.2"
+
yargs@~3.10.0:
version "3.10.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"