diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index fff20275b2cf2..d5fc40a4d34fd 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -695,7 +695,7 @@ packages/analytics/shippers/elastic_v3/common @elastic/kibana-core packages/analytics/shippers/elastic_v3/server @elastic/kibana-core packages/analytics/shippers/fullstory @elastic/kibana-core packages/analytics/shippers/gainsight @elastic/kibana-core -packages/content-management/inspector @elastic/kibana-global-experience +packages/content-management/content_editor @elastic/kibana-global-experience packages/content-management/table_list @elastic/kibana-global-experience packages/core/analytics/core-analytics-browser @elastic/kibana-core packages/core/analytics/core-analytics-browser-internal @elastic/kibana-core diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 0c93a90e7b5f9..6a98b3ab929c6 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index fac37527f9bf4..c872e7f34a140 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index b7eacadc2aaaf..6c671e9a34f27 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json index 4e3608a725473..bb2631b0e32e1 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -3018,7 +3018,7 @@ }, ">; muteAll: (options: { id: string; }) => Promise; getAlertState: (params: ", "GetAlertStateParams", - ") => Promise; getAlertSummary: (params: ", + ") => Promise; getAlertSummary: (params: ", "GetAlertSummaryParams", ") => Promise<", { @@ -6517,21 +6517,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "alerting", - "id": "def-common.AlertActions", - "type": "Type", - "tags": [], - "label": "AlertActions", - "description": [], - "signature": [ - "{ [x: string]: { date?: Date | undefined; }; }" - ], - "path": "x-pack/plugins/alerting/common/alert_instance.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "alerting", "id": "def-common.AlertInstanceContext", @@ -6555,7 +6540,7 @@ "label": "AlertInstanceMeta", "description": [], "signature": [ - "{ lastScheduledActions?: ({ subgroup?: string | undefined; } & { group: string; date: Date; } & { actions?: { [x: string]: { date?: Date | undefined; }; } | undefined; }) | undefined; flappingHistory?: boolean[] | undefined; flapping?: boolean | undefined; }" + "{ lastScheduledActions?: ({ subgroup?: string | undefined; } & { group: string; date: Date; } & { actions?: { [x: string]: { date: Date; }; } | undefined; }) | undefined; flappingHistory?: boolean[] | undefined; flapping?: boolean | undefined; }" ], "path": "x-pack/plugins/alerting/common/alert_instance.ts", "deprecated": false, @@ -6690,7 +6675,7 @@ "label": "LastScheduledActions", "description": [], "signature": [ - "{ subgroup?: string | undefined; } & { group: string; date: Date; } & { actions?: { [x: string]: { date?: Date | undefined; }; } | undefined; }" + "{ subgroup?: string | undefined; } & { group: string; date: Date; } & { actions?: { [x: string]: { date: Date; }; } | undefined; }" ], "path": "x-pack/plugins/alerting/common/alert_instance.ts", "deprecated": false, @@ -6764,7 +6749,7 @@ "label": "RawAlertInstance", "description": [], "signature": [ - "{ state?: { [x: string]: unknown; } | undefined; meta?: { lastScheduledActions?: ({ subgroup?: string | undefined; } & { group: string; date: Date; } & { actions?: { [x: string]: { date?: Date | undefined; }; } | undefined; }) | undefined; flappingHistory?: boolean[] | undefined; flapping?: boolean | undefined; } | undefined; }" + "{ state?: { [x: string]: unknown; } | undefined; meta?: { lastScheduledActions?: ({ subgroup?: string | undefined; } & { group: string; date: Date; } & { actions?: { [x: string]: { date: Date; }; } | undefined; }) | undefined; flappingHistory?: boolean[] | undefined; flapping?: boolean | undefined; } | undefined; }" ], "path": "x-pack/plugins/alerting/common/alert_instance.ts", "deprecated": false, @@ -7024,7 +7009,7 @@ "label": "RuleTaskState", "description": [], "signature": [ - "{ alertTypeState?: { [x: string]: unknown; } | undefined; alertInstances?: { [x: string]: { state?: { [x: string]: unknown; } | undefined; meta?: { lastScheduledActions?: ({ subgroup?: string | undefined; } & { group: string; date: Date; } & { actions?: { [x: string]: { date?: Date | undefined; }; } | undefined; }) | undefined; flappingHistory?: boolean[] | undefined; flapping?: boolean | undefined; } | undefined; }; } | undefined; alertRecoveredInstances?: { [x: string]: { state?: { [x: string]: unknown; } | undefined; meta?: { lastScheduledActions?: ({ subgroup?: string | undefined; } & { group: string; date: Date; } & { actions?: { [x: string]: { date?: Date | undefined; }; } | undefined; }) | undefined; flappingHistory?: boolean[] | undefined; flapping?: boolean | undefined; } | undefined; }; } | undefined; previousStartedAt?: Date | null | undefined; }" + "{ alertTypeState?: { [x: string]: unknown; } | undefined; alertInstances?: { [x: string]: { state?: { [x: string]: unknown; } | undefined; meta?: { lastScheduledActions?: ({ subgroup?: string | undefined; } & { group: string; date: Date; } & { actions?: { [x: string]: { date: Date; }; } | undefined; }) | undefined; flappingHistory?: boolean[] | undefined; flapping?: boolean | undefined; } | undefined; }; } | undefined; alertRecoveredInstances?: { [x: string]: { state?: { [x: string]: unknown; } | undefined; meta?: { lastScheduledActions?: ({ subgroup?: string | undefined; } & { group: string; date: Date; } & { actions?: { [x: string]: { date: Date; }; } | undefined; }) | undefined; flappingHistory?: boolean[] | undefined; flapping?: boolean | undefined; } | undefined; }; } | undefined; previousStartedAt?: Date | null | undefined; summaryActions?: { [x: string]: { date: Date; }; } | undefined; }" ], "path": "x-pack/plugins/alerting/common/rule_task_instance.ts", "deprecated": false, @@ -7155,6 +7140,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "alerting", + "id": "def-common.ThrottledActions", + "type": "Type", + "tags": [], + "label": "ThrottledActions", + "description": [], + "signature": [ + "{ [x: string]: { date: Date; }; }" + ], + "path": "x-pack/plugins/alerting/common/alert_instance.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "alerting", "id": "def-common.WithoutReservedActionGroups", @@ -7180,28 +7180,6 @@ } ], "objects": [ - { - "parentPluginId": "alerting", - "id": "def-common.actionsSchema", - "type": "Object", - "tags": [], - "label": "actionsSchema", - "description": [], - "signature": [ - "RecordC", - "<", - "StringC", - ", ", - "PartialC", - "<{ date: ", - "Type", - "; }>>" - ], - "path": "x-pack/plugins/alerting/common/alert_instance.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "alerting", "id": "def-common.DisabledActionTypeIdsForActionGroup", @@ -7381,7 +7359,7 @@ "<", "StringC", ", ", - "PartialC", + "TypeC", "<{ date: ", "Type", "; }>>; }>]>; flappingHistory: ", @@ -7529,7 +7507,7 @@ "<", "StringC", ", ", - "PartialC", + "TypeC", "<{ date: ", "Type", "; }>>; }>]>; flappingHistory: ", @@ -7571,7 +7549,7 @@ "<", "StringC", ", ", - "PartialC", + "TypeC", "<{ date: ", "Type", "; }>>; }>]>; flappingHistory: ", @@ -7586,12 +7564,42 @@ "NullC", ", ", "Type", - "]>; }>" + "]>; summaryActions: ", + "RecordC", + "<", + "StringC", + ", ", + "TypeC", + "<{ date: ", + "Type", + "; }>>; }>" ], "path": "x-pack/plugins/alerting/common/rule_task_instance.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "alerting", + "id": "def-common.throttledActionSchema", + "type": "Object", + "tags": [], + "label": "throttledActionSchema", + "description": [], + "signature": [ + "RecordC", + "<", + "StringC", + ", ", + "TypeC", + "<{ date: ", + "Type", + "; }>>" + ], + "path": "x-pack/plugins/alerting/common/alert_instance.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ] } diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 43d20c7c9dbd3..25c277a4b55de 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.devdocs.json b/api_docs/apm.devdocs.json index fe4765ddb9b7a..ade152a680a3a 100644 --- a/api_docs/apm.devdocs.json +++ b/api_docs/apm.devdocs.json @@ -202,9 +202,9 @@ "APMPluginSetupDependencies", ") => { config$: ", "Observable", - "; autoCreateApmDataView: boolean; serviceMapEnabled: boolean; serviceMapFingerprintBucketSize: number; serviceMapFingerprintGlobalBucketSize: number; serviceMapTraceIdBucketSize: number; serviceMapTraceIdGlobalBucketSize: number; serviceMapMaxTracesPerRequest: number; ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; searchAggregatedTransactions: ", + "; autoCreateApmDataView: boolean; serviceMapEnabled: boolean; serviceMapFingerprintBucketSize: number; serviceMapFingerprintGlobalBucketSize: number; serviceMapTraceIdBucketSize: number; serviceMapTraceIdGlobalBucketSize: number; serviceMapMaxTracesPerRequest: number; ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; searchAggregatedTransactions: ", "SearchAggregatedTransactionSetting", - "; telemetryCollectionEnabled: boolean; metricsInterval: number; agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; forceSyntheticSource: boolean; }>>; getApmIndices: () => Promise>; createApmEventClient: ({ request, context, debug, }: { debug?: boolean | undefined; request: ", + "; telemetryCollectionEnabled: boolean; metricsInterval: number; agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; forceSyntheticSource: boolean; }>>; getApmIndices: () => Promise>; createApmEventClient: ({ request, context, debug, }: { debug?: boolean | undefined; request: ", { "pluginId": "@kbn/core-http-server", "scope": "server", @@ -280,6 +280,8 @@ "section": "def-server.CoreStart", "text": "CoreStart" }, + ", plugins: ", + "APMPluginStartDependencies", ") => void" ], "path": "x-pack/plugins/apm/server/plugin.ts", @@ -306,6 +308,21 @@ "deprecated": false, "trackAdoption": false, "isRequired": true + }, + { + "parentPluginId": "apm", + "id": "def-server.APMPlugin.start.$2", + "type": "Object", + "tags": [], + "label": "plugins", + "description": [], + "signature": [ + "APMPluginStartDependencies" + ], + "path": "x-pack/plugins/apm/server/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true } ], "returnComment": [] @@ -431,7 +448,7 @@ "label": "config", "description": [], "signature": [ - "{ readonly indices: Readonly<{} & { metric: string; error: string; span: string; transaction: string; sourcemap: string; onboarding: string; }>; readonly autoCreateApmDataView: boolean; readonly serviceMapEnabled: boolean; readonly serviceMapFingerprintBucketSize: number; readonly serviceMapFingerprintGlobalBucketSize: number; readonly serviceMapTraceIdBucketSize: number; readonly serviceMapTraceIdGlobalBucketSize: number; readonly serviceMapMaxTracesPerRequest: number; readonly ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; readonly searchAggregatedTransactions: ", + "{ readonly indices: Readonly<{} & { metric: string; error: string; span: string; transaction: string; onboarding: string; }>; readonly autoCreateApmDataView: boolean; readonly serviceMapEnabled: boolean; readonly serviceMapFingerprintBucketSize: number; readonly serviceMapFingerprintGlobalBucketSize: number; readonly serviceMapTraceIdBucketSize: number; readonly serviceMapTraceIdGlobalBucketSize: number; readonly serviceMapMaxTracesPerRequest: number; readonly ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; readonly searchAggregatedTransactions: ", "SearchAggregatedTransactionSetting", "; readonly telemetryCollectionEnabled: boolean; readonly metricsInterval: number; readonly agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; readonly forceSyntheticSource: boolean; }" ], @@ -793,7 +810,7 @@ "label": "APIEndpoint", "description": [], "signature": [ - "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/title\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/nodes\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/summary\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/functions_overview\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/active_instances\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/dependency\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search\" | \"POST /api/apm/services/{serviceName}/annotation\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/sorted_and_filtered_services\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/service-group/counts\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"POST /internal/apm/traces/aggregated_critical_path\" | \"GET /internal/apm/traces/{traceId}/transactions/{transactionId}\" | \"GET /internal/apm/traces/{traceId}/spans/{spanId}\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/rule_types/transaction_error_rate/chart_preview\" | \"GET /internal/apm/rule_types/transaction_duration/chart_preview\" | \"GET /internal/apm/rule_types/error_count/chart_preview\" | \"GET /api/apm/settings/agent-configuration\" | \"GET /api/apm/settings/agent-configuration/view\" | \"DELETE /api/apm/settings/agent-configuration\" | \"PUT /api/apm/settings/agent-configuration\" | \"POST /api/apm/settings/agent-configuration/search\" | \"GET /api/apm/settings/agent-configuration/environments\" | \"GET /api/apm/settings/agent-configuration/agent_name\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps\" | \"POST /api/apm/sourcemaps\" | \"DELETE /api/apm/sourcemaps/{id}\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/dependencies/top_dependencies\" | \"GET /internal/apm/dependencies/upstream_services\" | \"GET /internal/apm/dependencies/metadata\" | \"GET /internal/apm/dependencies/charts/latency\" | \"GET /internal/apm/dependencies/charts/throughput\" | \"GET /internal/apm/dependencies/charts/error_rate\" | \"GET /internal/apm/dependencies/operations\" | \"GET /internal/apm/dependencies/charts/distribution\" | \"GET /internal/apm/dependencies/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys\" | \"GET /internal/apm/storage_explorer\" | \"GET /internal/apm/services/{serviceName}/storage_details\" | \"GET /internal/apm/storage_chart\" | \"GET /internal/apm/storage_explorer/privileges\" | \"GET /internal/apm/storage_explorer_summary_stats\" | \"GET /internal/apm/storage_explorer/is_cross_cluster_search\" | \"GET /internal/apm/storage_explorer/get_services\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\" | \"GET /internal/apm/settings/labs\" | \"GET /internal/apm/get_agents_per_service\" | \"GET /internal/apm/services/{serviceName}/agent_instances\" | \"GET /internal/apm/services/{serviceName}/mobile/filters\"" + "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/title\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/nodes\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/summary\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/functions_overview\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/active_instances\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/dependency\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search\" | \"POST /api/apm/services/{serviceName}/annotation\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/sorted_and_filtered_services\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/service-group/counts\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"POST /internal/apm/traces/aggregated_critical_path\" | \"GET /internal/apm/traces/{traceId}/transactions/{transactionId}\" | \"GET /internal/apm/traces/{traceId}/spans/{spanId}\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/rule_types/transaction_error_rate/chart_preview\" | \"GET /internal/apm/rule_types/transaction_duration/chart_preview\" | \"GET /internal/apm/rule_types/error_count/chart_preview\" | \"GET /api/apm/settings/agent-configuration\" | \"GET /api/apm/settings/agent-configuration/view\" | \"DELETE /api/apm/settings/agent-configuration\" | \"PUT /api/apm/settings/agent-configuration\" | \"POST /api/apm/settings/agent-configuration/search\" | \"GET /api/apm/settings/agent-configuration/environments\" | \"GET /api/apm/settings/agent-configuration/agent_name\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps\" | \"POST /api/apm/sourcemaps\" | \"DELETE /api/apm/sourcemaps/{id}\" | \"POST /internal/apm/sourcemaps/migrate_fleet_artifacts\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/dependencies/top_dependencies\" | \"GET /internal/apm/dependencies/upstream_services\" | \"GET /internal/apm/dependencies/metadata\" | \"GET /internal/apm/dependencies/charts/latency\" | \"GET /internal/apm/dependencies/charts/throughput\" | \"GET /internal/apm/dependencies/charts/error_rate\" | \"GET /internal/apm/dependencies/operations\" | \"GET /internal/apm/dependencies/charts/distribution\" | \"GET /internal/apm/dependencies/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys\" | \"GET /internal/apm/storage_explorer\" | \"GET /internal/apm/services/{serviceName}/storage_details\" | \"GET /internal/apm/storage_chart\" | \"GET /internal/apm/storage_explorer/privileges\" | \"GET /internal/apm/storage_explorer_summary_stats\" | \"GET /internal/apm/storage_explorer/is_cross_cluster_search\" | \"GET /internal/apm/storage_explorer/get_services\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\" | \"GET /internal/apm/settings/labs\" | \"GET /internal/apm/get_agents_per_service\" | \"GET /internal/apm/services/{serviceName}/agent_instances\" | \"GET /internal/apm/services/{serviceName}/mobile/filters\"" ], "path": "x-pack/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts", "deprecated": false, @@ -823,7 +840,7 @@ "label": "APMConfig", "description": [], "signature": [ - "{ readonly indices: Readonly<{} & { metric: string; error: string; span: string; transaction: string; sourcemap: string; onboarding: string; }>; readonly autoCreateApmDataView: boolean; readonly serviceMapEnabled: boolean; readonly serviceMapFingerprintBucketSize: number; readonly serviceMapFingerprintGlobalBucketSize: number; readonly serviceMapTraceIdBucketSize: number; readonly serviceMapTraceIdGlobalBucketSize: number; readonly serviceMapMaxTracesPerRequest: number; readonly ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; readonly searchAggregatedTransactions: ", + "{ readonly indices: Readonly<{} & { metric: string; error: string; span: string; transaction: string; onboarding: string; }>; readonly autoCreateApmDataView: boolean; readonly serviceMapEnabled: boolean; readonly serviceMapFingerprintBucketSize: number; readonly serviceMapFingerprintGlobalBucketSize: number; readonly serviceMapTraceIdBucketSize: number; readonly serviceMapTraceIdGlobalBucketSize: number; readonly serviceMapMaxTracesPerRequest: number; readonly ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; readonly searchAggregatedTransactions: ", "SearchAggregatedTransactionSetting", "; readonly telemetryCollectionEnabled: boolean; readonly metricsInterval: number; readonly agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; readonly forceSyntheticSource: boolean; }" ], @@ -840,7 +857,7 @@ "label": "ApmIndicesConfigName", "description": [], "signature": [ - "\"metric\" | \"error\" | \"span\" | \"transaction\" | \"sourcemap\" | \"onboarding\"" + "\"metric\" | \"error\" | \"span\" | \"transaction\" | \"onboarding\"" ], "path": "x-pack/plugins/apm/server/index.ts", "deprecated": false, @@ -3053,6 +3070,24 @@ }, ", { hasApmPolicies: boolean; }, ", "APMRouteCreateOptions", + ">; \"POST /internal/apm/sourcemaps/migrate_fleet_artifacts\": ", + { + "pluginId": "@kbn/server-route-repository", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryPluginApi", + "section": "def-common.ServerRoute", + "text": "ServerRoute" + }, + "<\"POST /internal/apm/sourcemaps/migrate_fleet_artifacts\", undefined, ", + { + "pluginId": "apm", + "scope": "server", + "docId": "kibApmPluginApi", + "section": "def-server.APMRouteHandlerResources", + "text": "APMRouteHandlerResources" + }, + ", void, ", + "APMRouteCreateOptions", ">; \"DELETE /api/apm/sourcemaps/{id}\": ", { "pluginId": "@kbn/server-route-repository", @@ -3405,7 +3440,7 @@ "section": "def-server.APMRouteHandlerResources", "text": "APMRouteHandlerResources" }, - ", { apmIndexSettings: { configurationName: \"metric\" | \"error\" | \"span\" | \"transaction\" | \"sourcemap\" | \"onboarding\"; defaultValue: string; savedValue: string | undefined; }[]; }, ", + ", { apmIndexSettings: { configurationName: \"metric\" | \"error\" | \"span\" | \"transaction\" | \"onboarding\"; defaultValue: string; savedValue: string | undefined; }[]; }, ", "APMRouteCreateOptions", ">; \"POST /internal/apm/settings/anomaly-detection/update_to_v3\": ", { @@ -7328,7 +7363,7 @@ "description": [], "signature": [ "Observable", - "; autoCreateApmDataView: boolean; serviceMapEnabled: boolean; serviceMapFingerprintBucketSize: number; serviceMapFingerprintGlobalBucketSize: number; serviceMapTraceIdBucketSize: number; serviceMapTraceIdGlobalBucketSize: number; serviceMapMaxTracesPerRequest: number; ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; searchAggregatedTransactions: ", + "; autoCreateApmDataView: boolean; serviceMapEnabled: boolean; serviceMapFingerprintBucketSize: number; serviceMapFingerprintGlobalBucketSize: number; serviceMapTraceIdBucketSize: number; serviceMapTraceIdGlobalBucketSize: number; serviceMapMaxTracesPerRequest: number; ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; searchAggregatedTransactions: ", "SearchAggregatedTransactionSetting", "; telemetryCollectionEnabled: boolean; metricsInterval: number; agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; forceSyntheticSource: boolean; }>>" ], @@ -7344,7 +7379,7 @@ "label": "getApmIndices", "description": [], "signature": [ - "() => Promise>" + "() => Promise>" ], "path": "x-pack/plugins/apm/server/types.ts", "deprecated": false, diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index dff4c3d545ea7..40e55fd4ce915 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; @@ -21,7 +21,7 @@ Contact [APM UI](https://github.com/orgs/elastic/teams/apm-ui) for questions reg | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 41 | 0 | 41 | 58 | +| 42 | 0 | 42 | 58 | ## Client diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 2a939efbe312e..53be76bed12a8 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.devdocs.json b/api_docs/bfetch.devdocs.json index 466493ad34651..5ef66ed9f631c 100644 --- a/api_docs/bfetch.devdocs.json +++ b/api_docs/bfetch.devdocs.json @@ -1,7 +1,81 @@ { "id": "bfetch", "client": { - "classes": [], + "classes": [ + { + "parentPluginId": "bfetch", + "id": "def-public.BfetchRequestError", + "type": "Class", + "tags": [], + "label": "BfetchRequestError", + "description": [ + "\nError thrown when xhr request fails" + ], + "signature": [ + { + "pluginId": "bfetch", + "scope": "common", + "docId": "kibBfetchPluginApi", + "section": "def-common.BfetchRequestError", + "text": "BfetchRequestError" + }, + " extends Error" + ], + "path": "src/plugins/bfetch/common/bfetch_error.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "bfetch", + "id": "def-public.BfetchRequestError.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [ + "\nconstructor" + ], + "signature": [ + "any" + ], + "path": "src/plugins/bfetch/common/bfetch_error.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "bfetch", + "id": "def-public.BfetchRequestError.Unnamed.$1", + "type": "number", + "tags": [], + "label": "code", + "description": [ + "- Xhr error code" + ], + "signature": [ + "number" + ], + "path": "src/plugins/bfetch/common/bfetch_error.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "bfetch", + "id": "def-public.BfetchRequestError.code", + "type": "number", + "tags": [], + "label": "code", + "description": [], + "path": "src/plugins/bfetch/common/bfetch_error.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], "functions": [ { "parentPluginId": "bfetch", @@ -565,6 +639,79 @@ }, "common": { "classes": [ + { + "parentPluginId": "bfetch", + "id": "def-common.BfetchRequestError", + "type": "Class", + "tags": [], + "label": "BfetchRequestError", + "description": [ + "\nError thrown when xhr request fails" + ], + "signature": [ + { + "pluginId": "bfetch", + "scope": "common", + "docId": "kibBfetchPluginApi", + "section": "def-common.BfetchRequestError", + "text": "BfetchRequestError" + }, + " extends Error" + ], + "path": "src/plugins/bfetch/common/bfetch_error.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "bfetch", + "id": "def-common.BfetchRequestError.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [ + "\nconstructor" + ], + "signature": [ + "any" + ], + "path": "src/plugins/bfetch/common/bfetch_error.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "bfetch", + "id": "def-common.BfetchRequestError.Unnamed.$1", + "type": "number", + "tags": [], + "label": "code", + "description": [ + "- Xhr error code" + ], + "signature": [ + "number" + ], + "path": "src/plugins/bfetch/common/bfetch_error.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "bfetch", + "id": "def-common.BfetchRequestError.code", + "type": "number", + "tags": [], + "label": "code", + "description": [], + "path": "src/plugins/bfetch/common/bfetch_error.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "bfetch", "id": "def-common.ItemBuffer", diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index ba59022f44ed5..fd0c7d2e91449 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; @@ -21,7 +21,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 81 | 1 | 72 | 2 | +| 89 | 1 | 74 | 2 | ## Client @@ -31,6 +31,9 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services ### Functions +### Classes + + ### Consts, variables and types diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index db6dcf51cfde8..269ed0537221c 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 83b4684c967ca..376bfdc4b23ad 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 8bd1d5d81d4d0..2beb9b1ebebeb 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index 57c676dab4d74..1b3c5a5e12203 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_chat.mdx b/api_docs/cloud_chat.mdx index 041034b63ea84..09db63dfe877b 100644 --- a/api_docs/cloud_chat.mdx +++ b/api_docs/cloud_chat.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudChat title: "cloudChat" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudChat plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudChat'] --- import cloudChatObj from './cloud_chat.devdocs.json'; diff --git a/api_docs/cloud_data_migration.devdocs.json b/api_docs/cloud_data_migration.devdocs.json new file mode 100644 index 0000000000000..be8d01e527096 --- /dev/null +++ b/api_docs/cloud_data_migration.devdocs.json @@ -0,0 +1,141 @@ +{ + "id": "cloudDataMigration", + "client": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "cloudDataMigration", + "id": "def-public.CloudDataMigrationPluginSetup", + "type": "Interface", + "tags": [], + "label": "CloudDataMigrationPluginSetup", + "description": [], + "path": "x-pack/plugins/cloud_integrations/cloud_data_migration/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "cloudDataMigration", + "id": "def-public.CloudDataMigrationPluginSetup.cloud", + "type": "Object", + "tags": [], + "label": "cloud", + "description": [], + "signature": [ + { + "pluginId": "cloud", + "scope": "public", + "docId": "kibCloudPluginApi", + "section": "def-public.CloudSetup", + "text": "CloudSetup" + } + ], + "path": "x-pack/plugins/cloud_integrations/cloud_data_migration/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloudDataMigration", + "id": "def-public.CloudDataMigrationPluginSetup.management", + "type": "Object", + "tags": [], + "label": "management", + "description": [], + "signature": [ + { + "pluginId": "management", + "scope": "public", + "docId": "kibManagementPluginApi", + "section": "def-public.ManagementSetup", + "text": "ManagementSetup" + } + ], + "path": "x-pack/plugins/cloud_integrations/cloud_data_migration/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "cloudDataMigration", + "id": "def-public.CloudDataMigrationPluginSetup.breadcrumbService", + "type": "Object", + "tags": [], + "label": "breadcrumbService", + "description": [], + "signature": [ + "BreadcrumbService" + ], + "path": "x-pack/plugins/cloud_integrations/cloud_data_migration/public/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [], + "start": { + "parentPluginId": "cloudDataMigration", + "id": "def-public.CloudDataMigrationPluginStart", + "type": "Interface", + "tags": [], + "label": "CloudDataMigrationPluginStart", + "description": [], + "path": "x-pack/plugins/cloud_integrations/cloud_data_migration/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "cloudDataMigration", + "id": "def-common.PLUGIN_ID", + "type": "string", + "tags": [], + "label": "PLUGIN_ID", + "description": [], + "signature": [ + "\"migrate_data\"" + ], + "path": "x-pack/plugins/cloud_integrations/cloud_data_migration/common/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cloudDataMigration", + "id": "def-common.PLUGIN_NAME", + "type": "Any", + "tags": [], + "label": "PLUGIN_NAME", + "description": [], + "signature": [ + "any" + ], + "path": "x-pack/plugins/cloud_integrations/cloud_data_migration/common/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx new file mode 100644 index 0000000000000..dd5cfb5f96955 --- /dev/null +++ b/api_docs/cloud_data_migration.mdx @@ -0,0 +1,38 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibCloudDataMigrationPluginApi +slug: /kibana-dev-docs/api/cloudDataMigration +title: "cloudDataMigration" +image: https://source.unsplash.com/400x175/?github +description: API docs for the cloudDataMigration plugin +date: 2022-12-19 +tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration'] +--- +import cloudDataMigrationObj from './cloud_data_migration.devdocs.json'; + +Static migration page where self-managed users can see text/copy about migrating to Elastic Cloud + +Contact [Platform Onboarding](https://github.com/orgs/elastic/teams/platform-onboarding) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 7 | 1 | 7 | 1 | + +## Client + +### Start + + +### Interfaces + + +## Common + +### Consts, variables and types + + diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index 5101075970f3d..8d907a029b64a 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index 1d45708a076e4..d7fec137ee6a8 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; diff --git a/api_docs/console.mdx b/api_docs/console.mdx index 088aafa168739..67aad2a99e5b5 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/controls.devdocs.json b/api_docs/controls.devdocs.json index 4ad1f3165c5dc..7f408645b5cc3 100644 --- a/api_docs/controls.devdocs.json +++ b/api_docs/controls.devdocs.json @@ -3429,7 +3429,7 @@ "description": [], "signature": [ "() => ", - "ReduxContainerContext", + "ReduxEmbeddableContext", "<", "ControlGroupReduxState", ", { setControlStyle: (state: ", @@ -3474,7 +3474,31 @@ "WritableDraft", "<", "ControlGroupReduxState", - ">, action: { payload: { ids: string[]; }; type: string; }) => void; }>" + ">, action: { payload: { ids: string[]; }; type: string; }) => void; }, ", + { + "pluginId": "embeddable", + "scope": "public", + "docId": "kibEmbeddablePluginApi", + "section": "def-public.Embeddable", + "text": "Embeddable" + }, + "<", + { + "pluginId": "controls", + "scope": "common", + "docId": "kibControlsPluginApi", + "section": "def-common.ControlGroupInput", + "text": "ControlGroupInput" + }, + ", ", + { + "pluginId": "controls", + "scope": "public", + "docId": "kibControlsPluginApi", + "section": "def-public.ControlGroupOutput", + "text": "ControlGroupOutput" + }, + ", any>>" ], "path": "src/plugins/controls/public/control_group/control_group_renderer.tsx", "deprecated": false, diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 55e779671d098..53ecaa2ea25c1 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/core.devdocs.json b/api_docs/core.devdocs.json index 45456cf49ce87..b651421a73903 100644 --- a/api_docs/core.devdocs.json +++ b/api_docs/core.devdocs.json @@ -1826,7 +1826,7 @@ }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/public/types.ts" + "path": "src/plugins/dashboard/public/dashboard_app/types.ts" }, { "plugin": "dashboard", @@ -4565,10 +4565,12 @@ "parentPluginId": "core", "id": "def-public.CoreSetup.uiSettings", "type": "Object", - "tags": [], + "tags": [ + "Deprecated" + ], "label": "uiSettings", "description": [ - "{@link IUiSettingsClient}" + "{@link IUiSettingsClient}\n" ], "signature": [ { @@ -4583,6 +4585,28 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "core", + "id": "def-public.CoreSetup.settings", + "type": "Object", + "tags": [], + "label": "settings", + "description": [ + "{@link SettingsStart}" + ], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.SettingsStart", + "text": "SettingsStart" + } + ], + "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "core", "id": "def-public.CoreSetup.executionContext", @@ -4927,10 +4951,12 @@ "parentPluginId": "core", "id": "def-public.CoreStart.uiSettings", "type": "Object", - "tags": [], + "tags": [ + "Deprecated" + ], "label": "uiSettings", "description": [ - "{@link IUiSettingsClient}" + "{@link IUiSettingsClient}\n" ], "signature": [ { @@ -4945,6 +4971,28 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "core", + "id": "def-public.CoreStart.settings", + "type": "Object", + "tags": [], + "label": "settings", + "description": [ + "{@link SettingsStart}" + ], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.SettingsStart", + "text": "SettingsStart" + } + ], + "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "core", "id": "def-public.CoreStart.fatalErrors", @@ -7879,6 +7927,10 @@ "plugin": "fleet", "path": "x-pack/plugins/fleet/server/services/telemetry/fleet_usage_sender.ts" }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/server/services/telemetry/fleet_usage_sender.ts" + }, { "plugin": "osquery", "path": "x-pack/plugins/osquery/server/lib/telemetry/sender.ts" @@ -13278,11 +13330,11 @@ }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts" + "path": "src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts" + "path": "src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts" }, { "plugin": "dashboard", @@ -13330,35 +13382,35 @@ }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "ml", @@ -23332,9 +23384,9 @@ ], "signature": [ { - "pluginId": "@kbn/logging", + "pluginId": "@kbn/ecs", "scope": "server", - "docId": "kibKbnLoggingPluginApi", + "docId": "kibKbnEcsPluginApi", "section": "def-server.EcsEventOutcome", "text": "EcsEventOutcome" }, @@ -31996,6 +32048,10 @@ "plugin": "fleet", "path": "x-pack/plugins/fleet/server/services/telemetry/fleet_usage_sender.ts" }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/server/services/telemetry/fleet_usage_sender.ts" + }, { "plugin": "osquery", "path": "x-pack/plugins/osquery/server/lib/telemetry/sender.ts" @@ -35309,6 +35365,22 @@ "path": "packages/core/http/core-http-server/src/router/socket.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "core", + "id": "def-server.IKibanaSocket.remoteAddress", + "type": "string", + "tags": [], + "label": "remoteAddress", + "description": [ + "\nThe string representation of the remote IP address. For example,`'74.125.127.100'` or\n`'2001:4860:a005::68'`. Value may be `undefined` if the socket is destroyed (for example, if\nthe client disconnected)." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/http/core-http-server/src/router/socket.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -49177,11 +49249,11 @@ }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts" + "path": "src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts" + "path": "src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts" }, { "plugin": "dashboard", @@ -49229,35 +49301,35 @@ }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "ml", @@ -55201,11 +55273,11 @@ }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts" + "path": "src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts" + "path": "src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts" }, { "plugin": "@kbn/core-saved-objects-migration-server-internal", @@ -61235,7 +61307,7 @@ "EcsVulnerability", " | undefined; }" ], - "path": "packages/kbn-logging/src/ecs/index.ts", + "path": "packages/kbn-ecs/src/ecs/index.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -61250,7 +61322,7 @@ "signature": [ "\"host\" | \"database\" | \"email\" | \"package\" | \"network\" | \"web\" | \"file\" | \"session\" | \"registry\" | \"process\" | \"authentication\" | \"configuration\" | \"driver\" | \"iam\" | \"intrusion_detection\" | \"malware\"" ], - "path": "packages/kbn-logging/src/ecs/event.ts", + "path": "packages/kbn-ecs/src/ecs/event.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -61265,7 +61337,7 @@ "signature": [ "\"metric\" | \"alert\" | \"signal\" | \"state\" | \"event\" | \"pipeline_error\"" ], - "path": "packages/kbn-logging/src/ecs/event.ts", + "path": "packages/kbn-ecs/src/ecs/event.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -61280,7 +61352,7 @@ "signature": [ "\"success\" | \"unknown\" | \"failure\"" ], - "path": "packages/kbn-logging/src/ecs/event.ts", + "path": "packages/kbn-ecs/src/ecs/event.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -61295,7 +61367,7 @@ "signature": [ "\"start\" | \"error\" | \"connection\" | \"user\" | \"info\" | \"group\" | \"end\" | \"admin\" | \"protocol\" | \"access\" | \"allowed\" | \"change\" | \"creation\" | \"deletion\" | \"denied\" | \"installation\"" ], - "path": "packages/kbn-logging/src/ecs/event.ts", + "path": "packages/kbn-ecs/src/ecs/event.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/core.mdx b/api_docs/core.mdx index 408bacb587c10..af3ccd167cca4 100644 --- a/api_docs/core.mdx +++ b/api_docs/core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/core title: "core" image: https://source.unsplash.com/400x175/?github description: API docs for the core plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core'] --- import coreObj from './core.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2806 | 17 | 1013 | 0 | +| 2809 | 17 | 1013 | 0 | ## Client diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index f582a84376252..8aaa7b1f1c3d9 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.devdocs.json b/api_docs/dashboard.devdocs.json index 4b2a5f4235d2a..cdf25089f8415 100644 --- a/api_docs/dashboard.devdocs.json +++ b/api_docs/dashboard.devdocs.json @@ -13,7 +13,7 @@ "signature": [ "(stateObj: Record) => Record" ], - "path": "src/plugins/dashboard/public/locator.ts", + "path": "src/plugins/dashboard/public/dashboard_app/locator/locator.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -27,7 +27,7 @@ "signature": [ "Record" ], - "path": "src/plugins/dashboard/public/locator.ts", + "path": "src/plugins/dashboard/public/dashboard_app/locator/locator.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -88,492 +88,23 @@ "interfaces": [ { "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput", - "type": "Interface", - "tags": [], - "label": "DashboardContainerInput", - "description": [], - "signature": [ - { - "pluginId": "dashboard", - "scope": "public", - "docId": "kibDashboardPluginApi", - "section": "def-public.DashboardContainerInput", - "text": "DashboardContainerInput" - }, - " extends ", - { - "pluginId": "embeddable", - "scope": "public", - "docId": "kibEmbeddablePluginApi", - "section": "def-public.ContainerInput", - "text": "ContainerInput" - }, - "<{}>" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.controlGroupInput", - "type": "Object", - "tags": [], - "label": "controlGroupInput", - "description": [], - "signature": [ - { - "pluginId": "controls", - "scope": "common", - "docId": "kibControlsPluginApi", - "section": "def-common.PersistableControlGroupInput", - "text": "PersistableControlGroupInput" - }, - " | undefined" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.refreshConfig", - "type": "Object", - "tags": [], - "label": "refreshConfig", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataQueryPluginApi", - "section": "def-common.RefreshInterval", - "text": "RefreshInterval" - }, - " | undefined" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.isEmbeddedExternally", - "type": "CompoundType", - "tags": [], - "label": "isEmbeddedExternally", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.isFullScreenMode", - "type": "boolean", - "tags": [], - "label": "isFullScreenMode", - "description": [], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.expandedPanelId", - "type": "string", - "tags": [], - "label": "expandedPanelId", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.timeRange", - "type": "Object", - "tags": [], - "label": "timeRange", - "description": [], - "signature": [ - "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.timeslice", - "type": "Object", - "tags": [], - "label": "timeslice", - "description": [], - "signature": [ - "[number, number] | undefined" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.timeRestore", - "type": "boolean", - "tags": [], - "label": "timeRestore", - "description": [], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.description", - "type": "string", - "tags": [], - "label": "description", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.useMargins", - "type": "boolean", - "tags": [], - "label": "useMargins", - "description": [], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.syncColors", - "type": "CompoundType", - "tags": [], - "label": "syncColors", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.syncTooltips", - "type": "CompoundType", - "tags": [], - "label": "syncTooltips", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.syncCursor", - "type": "CompoundType", - "tags": [], - "label": "syncCursor", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.viewMode", - "type": "Enum", - "tags": [], - "label": "viewMode", - "description": [], - "signature": [ - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.ViewMode", - "text": "ViewMode" - } - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.filters", - "type": "Array", - "tags": [], - "label": "filters", - "description": [], - "signature": [ - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[]" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.title", - "type": "string", - "tags": [], - "label": "title", - "description": [], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.query", - "type": "Object", - "tags": [], - "label": "query", - "description": [], - "signature": [ - "{ query: string | { [key: string]: any; }; language: string; }" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.panels", - "type": "Object", - "tags": [], - "label": "panels", - "description": [], - "signature": [ - "{ [panelId: string]: ", - { - "pluginId": "dashboard", - "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.DashboardPanelState", - "text": "DashboardPanelState" - }, - "<", - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddableInput", - "text": "EmbeddableInput" - }, - " & { [k: string]: unknown; }>; }" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainerInput.executionContext", - "type": "Object", - "tags": [], - "label": "executionContext", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-execution-context-common", - "scope": "common", - "docId": "kibKbnCoreExecutionContextCommonPluginApi", - "section": "def-common.KibanaExecutionContext", - "text": "KibanaExecutionContext" - }, - " | undefined" - ], - "path": "src/plugins/dashboard/public/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardFeatureFlagConfig", - "type": "Interface", - "tags": [], - "label": "DashboardFeatureFlagConfig", - "description": [], - "path": "src/plugins/dashboard/public/plugin.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardFeatureFlagConfig.allowByValueEmbeddables", - "type": "boolean", - "tags": [], - "label": "allowByValueEmbeddables", - "description": [], - "path": "src/plugins/dashboard/public/plugin.tsx", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.SavedDashboardPanel", - "type": "Interface", - "tags": [], - "label": "SavedDashboardPanel", - "description": [ - "\nA saved dashboard panel parsed directly from the Dashboard Attributes panels JSON" - ], - "path": "src/plugins/dashboard/common/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "dashboard", - "id": "def-public.SavedDashboardPanel.embeddableConfig", - "type": "Object", - "tags": [], - "label": "embeddableConfig", - "description": [], - "signature": [ - "{ [key: string]: ", - { - "pluginId": "@kbn/utility-types", - "scope": "server", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-server.Serializable", - "text": "Serializable" - }, - "; }" - ], - "path": "src/plugins/dashboard/common/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.SavedDashboardPanel.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/dashboard/common/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.SavedDashboardPanel.type", - "type": "string", - "tags": [], - "label": "type", - "description": [], - "path": "src/plugins/dashboard/common/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.SavedDashboardPanel.panelRefName", - "type": "string", - "tags": [], - "label": "panelRefName", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/dashboard/common/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.SavedDashboardPanel.gridData", - "type": "Object", - "tags": [], - "label": "gridData", - "description": [], - "signature": [ - { - "pluginId": "dashboard", - "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.GridData", - "text": "GridData" - } - ], - "path": "src/plugins/dashboard/common/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.SavedDashboardPanel.panelIndex", - "type": "string", - "tags": [], - "label": "panelIndex", - "description": [], - "path": "src/plugins/dashboard/common/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.SavedDashboardPanel.version", - "type": "string", - "tags": [], - "label": "version", - "description": [], - "path": "src/plugins/dashboard/common/types.ts", - "deprecated": false, - "trackAdoption": false - }, + "id": "def-public.DashboardFeatureFlagConfig", + "type": "Interface", + "tags": [], + "label": "DashboardFeatureFlagConfig", + "description": [], + "path": "src/plugins/dashboard/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "dashboard", - "id": "def-public.SavedDashboardPanel.title", - "type": "string", + "id": "def-public.DashboardFeatureFlagConfig.allowByValueEmbeddables", + "type": "boolean", "tags": [], - "label": "title", + "label": "allowByValueEmbeddables", "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/public/plugin.tsx", "deprecated": false, "trackAdoption": false } @@ -585,13 +116,13 @@ "misc": [ { "parentPluginId": "dashboard", - "id": "def-public.DASHBOARD_CONTAINER_TYPE", + "id": "def-public.DASHBOARD_APP_ID", "type": "string", "tags": [], - "label": "DASHBOARD_CONTAINER_TYPE", + "label": "DASHBOARD_APP_ID", "description": [], "signature": [ - "\"dashboard\"" + "\"dashboards\"" ], "path": "src/plugins/dashboard/public/dashboard_constants.ts", "deprecated": false, @@ -600,266 +131,113 @@ }, { "parentPluginId": "dashboard", - "id": "def-public.DashboardAppLocator", - "type": "Type", + "id": "def-public.DASHBOARD_CONTAINER_TYPE", + "type": "string", "tags": [], - "label": "DashboardAppLocator", + "label": "DASHBOARD_CONTAINER_TYPE", "description": [], "signature": [ - { - "pluginId": "share", - "scope": "common", - "docId": "kibSharePluginApi", - "section": "def-common.LocatorPublic", - "text": "LocatorPublic" - }, - "<", - { - "pluginId": "dashboard", - "scope": "public", - "docId": "kibDashboardPluginApi", - "section": "def-public.DashboardAppLocatorParams", - "text": "DashboardAppLocatorParams" - }, - ">" + "\"dashboard\"" ], - "path": "src/plugins/dashboard/public/locator.ts", + "path": "src/plugins/dashboard/public/dashboard_container/index.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "dashboard", - "id": "def-public.DashboardAppLocatorParams", + "id": "def-public.DashboardAppLocator", "type": "Type", "tags": [], - "label": "DashboardAppLocatorParams", - "description": [ - "\nWe use `type` instead of `interface` to avoid having to extend this type with\n`SerializableRecord`. See https://github.com/microsoft/TypeScript/issues/15300." - ], + "label": "DashboardAppLocator", + "description": [], "signature": [ - "{ dashboardId?: string | undefined; timeRange?: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined; refreshInterval?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataQueryPluginApi", - "section": "def-common.RefreshInterval", - "text": "RefreshInterval" - }, - " | undefined; filters?: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined; query?: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | undefined; useHash?: boolean | undefined; preserveSavedFilters?: boolean | undefined; viewMode?: ", - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.ViewMode", - "text": "ViewMode" - }, - " | undefined; searchSessionId?: string | undefined; panels?: (", - { - "pluginId": "dashboard", - "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.SavedDashboardPanel", - "text": "SavedDashboardPanel" - }, - " & ", - { - "pluginId": "@kbn/utility-types", - "scope": "server", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-server.SerializableRecord", - "text": "SerializableRecord" - }, - ")[] | undefined; savedQuery?: string | undefined; tags?: string[] | undefined; options?: ", - "DashboardOptions", - " | undefined; controlGroupInput?: ", { - "pluginId": "controls", + "pluginId": "share", "scope": "common", - "docId": "kibControlsPluginApi", - "section": "def-common.SerializableControlGroupInput", - "text": "SerializableControlGroupInput" - }, - " | undefined; }" - ], - "path": "src/plugins/dashboard/public/locator.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - } - ], - "objects": [ - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardConstants", - "type": "Object", - "tags": [], - "label": "DashboardConstants", - "description": [], - "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardConstants.LANDING_PAGE_PATH", - "type": "string", - "tags": [], - "label": "LANDING_PAGE_PATH", - "description": [], - "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardConstants.CREATE_NEW_DASHBOARD_URL", - "type": "string", - "tags": [], - "label": "CREATE_NEW_DASHBOARD_URL", - "description": [], - "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardConstants.VIEW_DASHBOARD_URL", - "type": "string", - "tags": [], - "label": "VIEW_DASHBOARD_URL", - "description": [], - "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardConstants.PRINT_DASHBOARD_URL", - "type": "string", - "tags": [], - "label": "PRINT_DASHBOARD_URL", - "description": [], - "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardConstants.ADD_EMBEDDABLE_ID", - "type": "string", - "tags": [], - "label": "ADD_EMBEDDABLE_ID", - "description": [], - "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardConstants.ADD_EMBEDDABLE_TYPE", - "type": "string", - "tags": [], - "label": "ADD_EMBEDDABLE_TYPE", - "description": [], - "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardConstants.DASHBOARDS_ID", - "type": "string", - "tags": [], - "label": "DASHBOARDS_ID", - "description": [], - "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "deprecated": false, - "trackAdoption": false + "docId": "kibSharePluginApi", + "section": "def-common.LocatorPublic", + "text": "LocatorPublic" }, + "<", { - "parentPluginId": "dashboard", - "id": "def-public.DashboardConstants.DASHBOARD_ID", - "type": "string", - "tags": [], - "label": "DASHBOARD_ID", - "description": [], - "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "deprecated": false, - "trackAdoption": false + "pluginId": "dashboard", + "scope": "public", + "docId": "kibDashboardPluginApi", + "section": "def-public.DashboardAppLocatorParams", + "text": "DashboardAppLocatorParams" }, + ">" + ], + "path": "src/plugins/dashboard/public/dashboard_app/locator/locator.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dashboard", + "id": "def-public.DashboardAppLocatorParams", + "type": "Type", + "tags": [], + "label": "DashboardAppLocatorParams", + "description": [], + "signature": [ + "Partial> & { dashboardId?: string | undefined; useHash?: boolean | undefined; preserveSavedFilters?: boolean | undefined; searchSessionId?: string | undefined; panels?: (", { - "parentPluginId": "dashboard", - "id": "def-public.DashboardConstants.SEARCH_SESSION_ID", - "type": "string", - "tags": [], - "label": "SEARCH_SESSION_ID", - "description": [], - "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "deprecated": false, - "trackAdoption": false + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.SavedDashboardPanel", + "text": "SavedDashboardPanel" }, + " & ", { - "parentPluginId": "dashboard", - "id": "def-public.DashboardConstants.CHANGE_CHECK_DEBOUNCE", - "type": "number", - "tags": [], - "label": "CHANGE_CHECK_DEBOUNCE", - "description": [], - "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "deprecated": false, - "trackAdoption": false + "pluginId": "@kbn/utility-types", + "scope": "server", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-server.SerializableRecord", + "text": "SerializableRecord" }, + ")[] | undefined; controlGroupInput?: ", { - "parentPluginId": "dashboard", - "id": "def-public.DashboardConstants.CHANGE_APPLY_DEBOUNCE", - "type": "number", - "tags": [], - "label": "CHANGE_APPLY_DEBOUNCE", - "description": [], - "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "deprecated": false, - "trackAdoption": false - } + "pluginId": "controls", + "scope": "common", + "docId": "kibControlsPluginApi", + "section": "def-common.SerializableControlGroupInput", + "text": "SerializableControlGroupInput" + }, + " | undefined; }" + ], + "path": "src/plugins/dashboard/public/dashboard_app/locator/locator.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dashboard", + "id": "def-public.LEGACY_DASHBOARD_APP_ID", + "type": "string", + "tags": [], + "label": "LEGACY_DASHBOARD_APP_ID", + "description": [], + "signature": [ + "\"dashboard\"" ], + "path": "src/plugins/dashboard/public/dashboard_constants.ts", + "deprecated": false, + "trackAdoption": false, "initialIsOpen": false } ], + "objects": [], "setup": { "parentPluginId": "dashboard", "id": "def-public.DashboardSetup", @@ -907,22 +285,6 @@ "deprecated": false, "trackAdoption": false, "children": [ - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardStart.getDashboardContainerByValueRenderer", - "type": "Function", - "tags": [], - "label": "getDashboardContainerByValueRenderer", - "description": [], - "signature": [ - "() => React.FC" - ], - "path": "src/plugins/dashboard/public/plugin.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, { "parentPluginId": "dashboard", "id": "def-public.DashboardStart.locator", @@ -974,68 +336,261 @@ "functions": [ { "parentPluginId": "dashboard", - "id": "def-server.findByValueEmbeddables", + "id": "def-server.findByValueEmbeddables", + "type": "Function", + "tags": [], + "label": "findByValueEmbeddables", + "description": [], + "signature": [ + "(savedObjectClient: Pick<", + { + "pluginId": "@kbn/core-saved-objects-api-server", + "scope": "server", + "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", + "section": "def-server.ISavedObjectsRepository", + "text": "ISavedObjectsRepository" + }, + ", \"find\">, embeddableType: string) => Promise<{ [key: string]: ", + { + "pluginId": "@kbn/utility-types", + "scope": "server", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-server.Serializable", + "text": "Serializable" + }, + "; }[]>" + ], + "path": "src/plugins/dashboard/server/usage/find_by_value_embeddables.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dashboard", + "id": "def-server.findByValueEmbeddables.$1", + "type": "Object", + "tags": [], + "label": "savedObjectClient", + "description": [], + "signature": [ + "Pick<", + { + "pluginId": "@kbn/core-saved-objects-api-server", + "scope": "server", + "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", + "section": "def-server.ISavedObjectsRepository", + "text": "ISavedObjectsRepository" + }, + ", \"find\">" + ], + "path": "src/plugins/dashboard/server/usage/find_by_value_embeddables.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "dashboard", + "id": "def-server.findByValueEmbeddables.$2", + "type": "string", + "tags": [], + "label": "embeddableType", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/dashboard/server/usage/find_by_value_embeddables.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [], + "setup": { + "parentPluginId": "dashboard", + "id": "def-server.DashboardPluginSetup", + "type": "Interface", + "tags": [], + "label": "DashboardPluginSetup", + "description": [], + "path": "src/plugins/dashboard/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "lifecycle": "setup", + "initialIsOpen": true + }, + "start": { + "parentPluginId": "dashboard", + "id": "def-server.DashboardPluginStart", + "type": "Interface", + "tags": [], + "label": "DashboardPluginStart", + "description": [], + "path": "src/plugins/dashboard/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "common": { + "classes": [], + "functions": [ + { + "parentPluginId": "dashboard", + "id": "def-common.convertPanelMapToSavedPanels", + "type": "Function", + "tags": [], + "label": "convertPanelMapToSavedPanels", + "description": [], + "signature": [ + "(panels: ", + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.DashboardPanelMap", + "text": "DashboardPanelMap" + }, + ", version: string) => ", + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.SavedDashboardPanel", + "text": "SavedDashboardPanel" + }, + "[]" + ], + "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dashboard", + "id": "def-common.convertPanelMapToSavedPanels.$1", + "type": "Object", + "tags": [], + "label": "panels", + "description": [], + "signature": [ + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.DashboardPanelMap", + "text": "DashboardPanelMap" + } + ], + "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "dashboard", + "id": "def-common.convertPanelMapToSavedPanels.$2", + "type": "string", + "tags": [], + "label": "version", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.convertPanelStateToSavedDashboardPanel", "type": "Function", "tags": [], - "label": "findByValueEmbeddables", + "label": "convertPanelStateToSavedDashboardPanel", "description": [], "signature": [ - "(savedObjectClient: Pick<", + "(panelState: ", { - "pluginId": "@kbn/core-saved-objects-api-server", - "scope": "server", - "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", - "section": "def-server.ISavedObjectsRepository", - "text": "ISavedObjectsRepository" + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.DashboardPanelState", + "text": "DashboardPanelState" }, - ", \"find\">, embeddableType: string) => Promise<{ [key: string]: ", + "<", { - "pluginId": "@kbn/utility-types", - "scope": "server", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-server.Serializable", - "text": "Serializable" + "pluginId": "embeddable", + "scope": "common", + "docId": "kibEmbeddablePluginApi", + "section": "def-common.SavedObjectEmbeddableInput", + "text": "SavedObjectEmbeddableInput" }, - "; }[]>" + ">, version: string) => ", + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.SavedDashboardPanel", + "text": "SavedDashboardPanel" + } ], - "path": "src/plugins/dashboard/server/usage/find_by_value_embeddables.ts", + "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "dashboard", - "id": "def-server.findByValueEmbeddables.$1", + "id": "def-common.convertPanelStateToSavedDashboardPanel.$1", "type": "Object", "tags": [], - "label": "savedObjectClient", + "label": "panelState", "description": [], "signature": [ - "Pick<", { - "pluginId": "@kbn/core-saved-objects-api-server", - "scope": "server", - "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", - "section": "def-server.ISavedObjectsRepository", - "text": "ISavedObjectsRepository" + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.DashboardPanelState", + "text": "DashboardPanelState" }, - ", \"find\">" + "<", + { + "pluginId": "embeddable", + "scope": "common", + "docId": "kibEmbeddablePluginApi", + "section": "def-common.SavedObjectEmbeddableInput", + "text": "SavedObjectEmbeddableInput" + }, + ">" ], - "path": "src/plugins/dashboard/server/usage/find_by_value_embeddables.ts", + "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", "deprecated": false, "trackAdoption": false, "isRequired": true }, { "parentPluginId": "dashboard", - "id": "def-server.findByValueEmbeddables.$2", + "id": "def-common.convertPanelStateToSavedDashboardPanel.$2", "type": "string", "tags": [], - "label": "embeddableType", + "label": "version", "description": [], "signature": [ "string" ], - "path": "src/plugins/dashboard/server/usage/find_by_value_embeddables.ts", + "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1043,106 +598,180 @@ ], "returnComment": [], "initialIsOpen": false - } - ], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [], - "setup": { - "parentPluginId": "dashboard", - "id": "def-server.DashboardPluginSetup", - "type": "Interface", - "tags": [], - "label": "DashboardPluginSetup", - "description": [], - "path": "src/plugins/dashboard/server/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "lifecycle": "setup", - "initialIsOpen": true - }, - "start": { - "parentPluginId": "dashboard", - "id": "def-server.DashboardPluginStart", - "type": "Interface", - "tags": [], - "label": "DashboardPluginStart", - "description": [], - "path": "src/plugins/dashboard/server/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "lifecycle": "start", - "initialIsOpen": true - } - }, - "common": { - "classes": [], - "functions": [ + }, { "parentPluginId": "dashboard", - "id": "def-common.convertPanelMapToSavedPanels", + "id": "def-common.convertSavedDashboardPanelToPanelState", "type": "Function", "tags": [], - "label": "convertPanelMapToSavedPanels", + "label": "convertSavedDashboardPanelToPanelState", "description": [], "signature": [ - "(panels: ", + "(savedDashboardPanel: ", + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.SavedDashboardPanel", + "text": "SavedDashboardPanel" + }, + ") => ", + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.DashboardPanelState", + "text": "DashboardPanelState" + }, + "" + ], + "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dashboard", + "id": "def-common.convertSavedDashboardPanelToPanelState.$1", + "type": "Object", + "tags": [], + "label": "savedDashboardPanel", + "description": [], + "signature": [ + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.SavedDashboardPanel", + "text": "SavedDashboardPanel" + } + ], + "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.convertSavedPanelsToPanelMap", + "type": "Function", + "tags": [], + "label": "convertSavedPanelsToPanelMap", + "description": [], + "signature": [ + "(panels?: ", + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.SavedDashboardPanel", + "text": "SavedDashboardPanel" + }, + "[] | undefined) => ", + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.DashboardPanelMap", + "text": "DashboardPanelMap" + } + ], + "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dashboard", + "id": "def-common.convertSavedPanelsToPanelMap.$1", + "type": "Array", + "tags": [], + "label": "panels", + "description": [], + "signature": [ + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.SavedDashboardPanel", + "text": "SavedDashboardPanel" + }, + "[] | undefined" + ], + "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.createExtract", + "type": "Function", + "tags": [], + "label": "createExtract", + "description": [], + "signature": [ + "(persistableStateService: ", + { + "pluginId": "embeddable", + "scope": "common", + "docId": "kibEmbeddablePluginApi", + "section": "def-common.EmbeddablePersistableStateService", + "text": "EmbeddablePersistableStateService" + }, + ") => (state: ", { - "pluginId": "dashboard", + "pluginId": "embeddable", "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.DashboardPanelMap", - "text": "DashboardPanelMap" + "docId": "kibEmbeddablePluginApi", + "section": "def-common.EmbeddableStateWithType", + "text": "EmbeddableStateWithType" }, - ", version: string) => ", + ") => { state: ", { - "pluginId": "dashboard", + "pluginId": "embeddable", "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.SavedDashboardPanel", - "text": "SavedDashboardPanel" + "docId": "kibEmbeddablePluginApi", + "section": "def-common.EmbeddableStateWithType", + "text": "EmbeddableStateWithType" }, - "[]" + "; references: ", + { + "pluginId": "@kbn/core-saved-objects-common", + "scope": "common", + "docId": "kibKbnCoreSavedObjectsCommonPluginApi", + "section": "def-common.SavedObjectReference", + "text": "SavedObjectReference" + }, + "[]; }" ], - "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "path": "src/plugins/dashboard/common/dashboard_container/persistable_state/dashboard_container_references.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "dashboard", - "id": "def-common.convertPanelMapToSavedPanels.$1", + "id": "def-common.createExtract.$1", "type": "Object", "tags": [], - "label": "panels", + "label": "persistableStateService", "description": [], "signature": [ { - "pluginId": "dashboard", + "pluginId": "embeddable", "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.DashboardPanelMap", - "text": "DashboardPanelMap" + "docId": "kibEmbeddablePluginApi", + "section": "def-common.EmbeddablePersistableStateService", + "text": "EmbeddablePersistableStateService" } ], - "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "dashboard", - "id": "def-common.convertPanelMapToSavedPanels.$2", - "type": "string", - "tags": [], - "label": "version", - "description": [], - "signature": [ - "string" - ], - "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "path": "src/plugins/dashboard/common/dashboard_container/persistable_state/dashboard_container_references.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1153,82 +782,116 @@ }, { "parentPluginId": "dashboard", - "id": "def-common.convertPanelStateToSavedDashboardPanel", + "id": "def-common.createInject", "type": "Function", "tags": [], - "label": "convertPanelStateToSavedDashboardPanel", + "label": "createInject", "description": [], "signature": [ - "(panelState: ", + "(persistableStateService: ", { - "pluginId": "dashboard", + "pluginId": "embeddable", "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.DashboardPanelState", - "text": "DashboardPanelState" + "docId": "kibEmbeddablePluginApi", + "section": "def-common.EmbeddablePersistableStateService", + "text": "EmbeddablePersistableStateService" }, - "<", + ") => (state: ", { "pluginId": "embeddable", "scope": "common", "docId": "kibEmbeddablePluginApi", - "section": "def-common.SavedObjectEmbeddableInput", - "text": "SavedObjectEmbeddableInput" + "section": "def-common.EmbeddableStateWithType", + "text": "EmbeddableStateWithType" }, - ">, version: string) => ", + ", references: ", { - "pluginId": "dashboard", + "pluginId": "@kbn/core-saved-objects-common", "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.SavedDashboardPanel", - "text": "SavedDashboardPanel" + "docId": "kibKbnCoreSavedObjectsCommonPluginApi", + "section": "def-common.SavedObjectReference", + "text": "SavedObjectReference" + }, + "[]) => ", + { + "pluginId": "embeddable", + "scope": "common", + "docId": "kibEmbeddablePluginApi", + "section": "def-common.EmbeddableStateWithType", + "text": "EmbeddableStateWithType" } ], - "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "path": "src/plugins/dashboard/common/dashboard_container/persistable_state/dashboard_container_references.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "dashboard", - "id": "def-common.convertPanelStateToSavedDashboardPanel.$1", + "id": "def-common.createInject.$1", "type": "Object", "tags": [], - "label": "panelState", + "label": "persistableStateService", "description": [], "signature": [ - { - "pluginId": "dashboard", - "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.DashboardPanelState", - "text": "DashboardPanelState" - }, - "<", { "pluginId": "embeddable", "scope": "common", "docId": "kibEmbeddablePluginApi", - "section": "def-common.SavedObjectEmbeddableInput", - "text": "SavedObjectEmbeddableInput" - }, - ">" + "section": "def-common.EmbeddablePersistableStateService", + "text": "EmbeddablePersistableStateService" + } ], - "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "path": "src/plugins/dashboard/common/dashboard_container/persistable_state/dashboard_container_references.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.extractReferences", + "type": "Function", + "tags": [], + "label": "extractReferences", + "description": [], + "signature": [ + "({ attributes, references = [] }: SavedObjectAttributesAndReferences, deps: ", + "ExtractDeps", + ") => SavedObjectAttributesAndReferences" + ], + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dashboard", + "id": "def-common.extractReferences.$1", + "type": "Object", + "tags": [], + "label": "{ attributes, references = [] }", + "description": [], + "signature": [ + "SavedObjectAttributesAndReferences" + ], + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts", "deprecated": false, "trackAdoption": false, "isRequired": true }, { "parentPluginId": "dashboard", - "id": "def-common.convertPanelStateToSavedDashboardPanel.$2", - "type": "string", + "id": "def-common.extractReferences.$2", + "type": "Object", "tags": [], - "label": "version", + "label": "deps", "description": [], "signature": [ - "string" + "ExtractDeps" ], - "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1239,51 +902,53 @@ }, { "parentPluginId": "dashboard", - "id": "def-common.convertSavedDashboardPanelToPanelState", + "id": "def-common.injectReferences", "type": "Function", "tags": [], - "label": "convertSavedDashboardPanelToPanelState", + "label": "injectReferences", "description": [], "signature": [ - "(savedDashboardPanel: ", - { - "pluginId": "dashboard", - "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.SavedDashboardPanel", - "text": "SavedDashboardPanel" - }, + "({ attributes, references = [] }: SavedObjectAttributesAndReferences, deps: ", + "InjectDeps", ") => ", { - "pluginId": "dashboard", + "pluginId": "@kbn/core-saved-objects-common", "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.DashboardPanelState", - "text": "DashboardPanelState" - }, - "" + "docId": "kibKbnCoreSavedObjectsCommonPluginApi", + "section": "def-common.SavedObjectAttributes", + "text": "SavedObjectAttributes" + } ], - "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "dashboard", - "id": "def-common.convertSavedDashboardPanelToPanelState.$1", + "id": "def-common.injectReferences.$1", "type": "Object", "tags": [], - "label": "savedDashboardPanel", + "label": "{ attributes, references = [] }", "description": [], "signature": [ - { - "pluginId": "dashboard", - "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.SavedDashboardPanel", - "text": "SavedDashboardPanel" - } + "SavedObjectAttributesAndReferences" ], - "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "dashboard", + "id": "def-common.injectReferences.$2", + "type": "Object", + "tags": [], + "label": "deps", + "description": [], + "signature": [ + "InjectDeps" + ], + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1291,349 +956,376 @@ ], "returnComment": [], "initialIsOpen": false - }, + } + ], + "interfaces": [ { "parentPluginId": "dashboard", - "id": "def-common.convertSavedPanelsToPanelMap", - "type": "Function", + "id": "def-common.DashboardAttributes", + "type": "Interface", "tags": [], - "label": "convertSavedPanelsToPanelMap", - "description": [], - "signature": [ - "(panels?: ", - { - "pluginId": "dashboard", - "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.SavedDashboardPanel", - "text": "SavedDashboardPanel" - }, - "[] | undefined) => ", - { - "pluginId": "dashboard", - "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.DashboardPanelMap", - "text": "DashboardPanelMap" - } + "label": "DashboardAttributes", + "description": [ + "\nThe attributes of the dashboard saved object. This interface should be the\nsource of truth for the latest dashboard attributes shape after all migrations." ], - "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "dashboard", - "id": "def-common.convertSavedPanelsToPanelMap.$1", - "type": "Array", + "id": "def-common.DashboardAttributes.controlGroupInput", + "type": "CompoundType", + "tags": [], + "label": "controlGroupInput", + "description": [], + "signature": [ + { + "pluginId": "controls", + "scope": "common", + "docId": "kibControlsPluginApi", + "section": "def-common.RawControlGroupAttributes", + "text": "RawControlGroupAttributes" + }, + " | undefined" + ], + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardAttributes.refreshInterval", + "type": "Object", "tags": [], - "label": "panels", + "label": "refreshInterval", "description": [], "signature": [ { - "pluginId": "dashboard", + "pluginId": "data", "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.SavedDashboardPanel", - "text": "SavedDashboardPanel" + "docId": "kibDataQueryPluginApi", + "section": "def-common.RefreshInterval", + "text": "RefreshInterval" }, - "[] | undefined" + " | undefined" ], - "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "dashboard", - "id": "def-common.createExtract", - "type": "Function", - "tags": [], - "label": "createExtract", - "description": [], - "signature": [ - "(persistableStateService: ", + "trackAdoption": false + }, { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddablePersistableStateService", - "text": "EmbeddablePersistableStateService" + "parentPluginId": "dashboard", + "id": "def-common.DashboardAttributes.timeRestore", + "type": "boolean", + "tags": [], + "label": "timeRestore", + "description": [], + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", + "deprecated": false, + "trackAdoption": false }, - ") => (state: ", { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddableStateWithType", - "text": "EmbeddableStateWithType" + "parentPluginId": "dashboard", + "id": "def-common.DashboardAttributes.optionsJSON", + "type": "string", + "tags": [], + "label": "optionsJSON", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", + "deprecated": false, + "trackAdoption": false }, - ") => { state: ", { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddableStateWithType", - "text": "EmbeddableStateWithType" + "parentPluginId": "dashboard", + "id": "def-common.DashboardAttributes.useMargins", + "type": "CompoundType", + "tags": [], + "label": "useMargins", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", + "deprecated": false, + "trackAdoption": false }, - "; references: ", { - "pluginId": "@kbn/core-saved-objects-common", - "scope": "common", - "docId": "kibKbnCoreSavedObjectsCommonPluginApi", - "section": "def-common.SavedObjectReference", - "text": "SavedObjectReference" + "parentPluginId": "dashboard", + "id": "def-common.DashboardAttributes.description", + "type": "string", + "tags": [], + "label": "description", + "description": [], + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", + "deprecated": false, + "trackAdoption": false }, - "[]; }" - ], - "path": "src/plugins/dashboard/common/persistable_state/dashboard_container_references.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { "parentPluginId": "dashboard", - "id": "def-common.createExtract.$1", - "type": "Object", + "id": "def-common.DashboardAttributes.panelsJSON", + "type": "string", "tags": [], - "label": "persistableStateService", + "label": "panelsJSON", + "description": [], + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardAttributes.timeFrom", + "type": "string", + "tags": [], + "label": "timeFrom", "description": [], "signature": [ - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddablePersistableStateService", - "text": "EmbeddablePersistableStateService" - } + "string | undefined" ], - "path": "src/plugins/dashboard/common/persistable_state/dashboard_container_references.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "dashboard", - "id": "def-common.createInject", - "type": "Function", - "tags": [], - "label": "createInject", - "description": [], - "signature": [ - "(persistableStateService: ", - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddablePersistableStateService", - "text": "EmbeddablePersistableStateService" + "trackAdoption": false }, - ") => (state: ", { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddableStateWithType", - "text": "EmbeddableStateWithType" + "parentPluginId": "dashboard", + "id": "def-common.DashboardAttributes.version", + "type": "number", + "tags": [], + "label": "version", + "description": [], + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", + "deprecated": false, + "trackAdoption": false }, - ", references: ", { - "pluginId": "@kbn/core-saved-objects-common", - "scope": "common", - "docId": "kibKbnCoreSavedObjectsCommonPluginApi", - "section": "def-common.SavedObjectReference", - "text": "SavedObjectReference" + "parentPluginId": "dashboard", + "id": "def-common.DashboardAttributes.timeTo", + "type": "string", + "tags": [], + "label": "timeTo", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", + "deprecated": false, + "trackAdoption": false }, - "[]) => ", { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddableStateWithType", - "text": "EmbeddableStateWithType" - } - ], - "path": "src/plugins/dashboard/common/persistable_state/dashboard_container_references.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "parentPluginId": "dashboard", + "id": "def-common.DashboardAttributes.title", + "type": "string", + "tags": [], + "label": "title", + "description": [], + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "dashboard", - "id": "def-common.createInject.$1", + "id": "def-common.DashboardAttributes.kibanaSavedObjectMeta", "type": "Object", "tags": [], - "label": "persistableStateService", + "label": "kibanaSavedObjectMeta", "description": [], "signature": [ - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddablePersistableStateService", - "text": "EmbeddablePersistableStateService" - } + "{ searchSourceJSON: string; }" ], - "path": "src/plugins/dashboard/common/persistable_state/dashboard_container_references.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", "deprecated": false, - "trackAdoption": false, - "isRequired": true + "trackAdoption": false } ], - "returnComment": [], "initialIsOpen": false }, { "parentPluginId": "dashboard", - "id": "def-common.extractReferences", - "type": "Function", + "id": "def-common.DashboardCapabilities", + "type": "Interface", "tags": [], - "label": "extractReferences", + "label": "DashboardCapabilities", "description": [], - "signature": [ - "({ attributes, references = [] }: SavedObjectAttributesAndReferences, deps: ", - "ExtractDeps", - ") => SavedObjectAttributesAndReferences" - ], - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts", + "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "dashboard", - "id": "def-common.extractReferences.$1", - "type": "Object", + "id": "def-common.DashboardCapabilities.showWriteControls", + "type": "boolean", + "tags": [], + "label": "showWriteControls", + "description": [], + "path": "src/plugins/dashboard/common/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardCapabilities.saveQuery", + "type": "boolean", + "tags": [], + "label": "saveQuery", + "description": [], + "path": "src/plugins/dashboard/common/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardCapabilities.createNew", + "type": "boolean", + "tags": [], + "label": "createNew", + "description": [], + "path": "src/plugins/dashboard/common/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardCapabilities.show", + "type": "boolean", "tags": [], - "label": "{ attributes, references = [] }", + "label": "show", "description": [], - "signature": [ - "SavedObjectAttributesAndReferences" - ], - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts", + "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, - "trackAdoption": false, - "isRequired": true + "trackAdoption": false }, { "parentPluginId": "dashboard", - "id": "def-common.extractReferences.$2", - "type": "Object", + "id": "def-common.DashboardCapabilities.Unnamed", + "type": "IndexSignature", "tags": [], - "label": "deps", + "label": "[key: string]: boolean", "description": [], "signature": [ - "ExtractDeps" + "[key: string]: boolean" ], - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts", + "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, - "trackAdoption": false, - "isRequired": true + "trackAdoption": false } ], - "returnComment": [], "initialIsOpen": false }, { "parentPluginId": "dashboard", - "id": "def-common.injectReferences", - "type": "Function", + "id": "def-common.DashboardContainerByValueInput", + "type": "Interface", "tags": [], - "label": "injectReferences", + "label": "DashboardContainerByValueInput", "description": [], "signature": [ - "({ attributes, references = [] }: SavedObjectAttributesAndReferences, deps: ", - "InjectDeps", - ") => ", { - "pluginId": "@kbn/core-saved-objects-common", + "pluginId": "dashboard", "scope": "common", - "docId": "kibKbnCoreSavedObjectsCommonPluginApi", - "section": "def-common.SavedObjectAttributes", - "text": "SavedObjectAttributes" + "docId": "kibDashboardPluginApi", + "section": "def-common.DashboardContainerByValueInput", + "text": "DashboardContainerByValueInput" + }, + " extends ", + { + "pluginId": "embeddable", + "scope": "common", + "docId": "kibEmbeddablePluginApi", + "section": "def-common.EmbeddableInput", + "text": "EmbeddableInput" } ], - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "dashboard", - "id": "def-common.injectReferences.$1", + "id": "def-common.DashboardContainerByValueInput.query", "type": "Object", "tags": [], - "label": "{ attributes, references = [] }", + "label": "query", "description": [], "signature": [ - "SavedObjectAttributesAndReferences" + "{ query: string | { [key: string]: any; }; language: string; }" ], - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, - "trackAdoption": false, - "isRequired": true + "trackAdoption": false }, { "parentPluginId": "dashboard", - "id": "def-common.injectReferences.$2", - "type": "Object", + "id": "def-common.DashboardContainerByValueInput.filters", + "type": "Array", "tags": [], - "label": "deps", + "label": "filters", "description": [], "signature": [ - "InjectDeps" + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[]" ], - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - } - ], - "interfaces": [ - { - "parentPluginId": "dashboard", - "id": "def-common.DashboardAttributes", - "type": "Interface", - "tags": [], - "label": "DashboardAttributes", - "description": [ - "\nThe attributes of the dashboard saved object. This interface should be the\nsource of truth for the latest dashboard attributes shape after all migrations." - ], - "path": "src/plugins/dashboard/common/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + "trackAdoption": false + }, { "parentPluginId": "dashboard", - "id": "def-common.DashboardAttributes.controlGroupInput", - "type": "CompoundType", + "id": "def-common.DashboardContainerByValueInput.timeRestore", + "type": "boolean", "tags": [], - "label": "controlGroupInput", + "label": "timeRestore", + "description": [], + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardContainerByValueInput.timeRange", + "type": "Object", + "tags": [], + "label": "timeRange", "description": [], "signature": [ { - "pluginId": "controls", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibControlsPluginApi", - "section": "def-common.RawControlGroupAttributes", - "text": "RawControlGroupAttributes" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" }, " | undefined" ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "dashboard", - "id": "def-common.DashboardAttributes.refreshInterval", + "id": "def-common.DashboardContainerByValueInput.timeslice", + "type": "Object", + "tags": [], + "label": "timeslice", + "description": [], + "signature": [ + "[number, number] | undefined" + ], + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardContainerByValueInput.refreshInterval", "type": "Object", "tags": [], "label": "refreshInterval", @@ -1648,116 +1340,231 @@ }, " | undefined" ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "dashboard", - "id": "def-common.DashboardAttributes.timeRestore", - "type": "boolean", + "id": "def-common.DashboardContainerByValueInput.title", + "type": "string", "tags": [], - "label": "timeRestore", + "label": "title", "description": [], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "dashboard", - "id": "def-common.DashboardAttributes.optionsJSON", + "id": "def-common.DashboardContainerByValueInput.tags", + "type": "Array", + "tags": [], + "label": "tags", + "description": [], + "signature": [ + "string[]" + ], + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardContainerByValueInput.viewMode", + "type": "Enum", + "tags": [], + "label": "viewMode", + "description": [], + "signature": [ + { + "pluginId": "embeddable", + "scope": "common", + "docId": "kibEmbeddablePluginApi", + "section": "def-common.ViewMode", + "text": "ViewMode" + } + ], + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardContainerByValueInput.description", "type": "string", "tags": [], - "label": "optionsJSON", + "label": "description", "description": [], "signature": [ "string | undefined" ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "dashboard", - "id": "def-common.DashboardAttributes.useMargins", + "id": "def-common.DashboardContainerByValueInput.isEmbeddedExternally", "type": "CompoundType", "tags": [], - "label": "useMargins", + "label": "isEmbeddedExternally", "description": [], "signature": [ "boolean | undefined" ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "dashboard", - "id": "def-common.DashboardAttributes.description", - "type": "string", + "id": "def-common.DashboardContainerByValueInput.executionContext", + "type": "Object", "tags": [], - "label": "description", + "label": "executionContext", "description": [], - "path": "src/plugins/dashboard/common/types.ts", + "signature": [ + { + "pluginId": "@kbn/core-execution-context-common", + "scope": "common", + "docId": "kibKbnCoreExecutionContextCommonPluginApi", + "section": "def-common.KibanaExecutionContext", + "text": "KibanaExecutionContext" + }, + " | undefined" + ], + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "dashboard", - "id": "def-common.DashboardAttributes.panelsJSON", - "type": "string", + "id": "def-common.DashboardContainerByValueInput.hidePanelTitles", + "type": "boolean", "tags": [], - "label": "panelsJSON", + "label": "hidePanelTitles", "description": [], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "dashboard", - "id": "def-common.DashboardAttributes.timeFrom", - "type": "string", + "id": "def-common.DashboardContainerByValueInput.syncTooltips", + "type": "boolean", "tags": [], - "label": "timeFrom", + "label": "syncTooltips", + "description": [], + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardContainerByValueInput.useMargins", + "type": "boolean", + "tags": [], + "label": "useMargins", + "description": [], + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardContainerByValueInput.syncColors", + "type": "boolean", + "tags": [], + "label": "syncColors", + "description": [], + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardContainerByValueInput.syncCursor", + "type": "boolean", + "tags": [], + "label": "syncCursor", + "description": [], + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardContainerByValueInput.controlGroupInput", + "type": "Object", + "tags": [], + "label": "controlGroupInput", "description": [], "signature": [ - "string | undefined" + { + "pluginId": "controls", + "scope": "common", + "docId": "kibControlsPluginApi", + "section": "def-common.PersistableControlGroupInput", + "text": "PersistableControlGroupInput" + }, + " | undefined" ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "dashboard", - "id": "def-common.DashboardAttributes.version", - "type": "number", + "id": "def-common.DashboardContainerByValueInput.panels", + "type": "Object", "tags": [], - "label": "version", + "label": "panels", "description": [], - "path": "src/plugins/dashboard/common/types.ts", + "signature": [ + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.DashboardPanelMap", + "text": "DashboardPanelMap" + } + ], + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false - }, + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardOptions", + "type": "Interface", + "tags": [], + "label": "DashboardOptions", + "description": [], + "path": "src/plugins/dashboard/common/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "dashboard", - "id": "def-common.DashboardAttributes.timeTo", - "type": "string", + "id": "def-common.DashboardOptions.hidePanelTitles", + "type": "boolean", "tags": [], - "label": "timeTo", + "label": "hidePanelTitles", "description": [], - "signature": [ - "string | undefined" - ], "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "dashboard", - "id": "def-common.DashboardAttributes.title", - "type": "string", + "id": "def-common.DashboardOptions.useMargins", + "type": "boolean", "tags": [], - "label": "title", + "label": "useMargins", "description": [], "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, @@ -1765,98 +1572,33 @@ }, { "parentPluginId": "dashboard", - "id": "def-common.DashboardAttributes.kibanaSavedObjectMeta", - "type": "Object", + "id": "def-common.DashboardOptions.syncColors", + "type": "boolean", "tags": [], - "label": "kibanaSavedObjectMeta", + "label": "syncColors", "description": [], - "signature": [ - "{ searchSourceJSON: string; }" - ], "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "dashboard", - "id": "def-common.DashboardContainerStateWithType", - "type": "Interface", - "tags": [], - "label": "DashboardContainerStateWithType", - "description": [ - "--------------------------------------------------------------------\nDashboard container types\n -----------------------------------------------------------------------\n\nTypes below this line are copied here because so many important types are tied up in public. These types should be\nmoved from public into common." - ], - "signature": [ - { - "pluginId": "dashboard", - "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.DashboardContainerStateWithType", - "text": "DashboardContainerStateWithType" }, - " extends ", - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddableStateWithType", - "text": "EmbeddableStateWithType" - } - ], - "path": "src/plugins/dashboard/common/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { "parentPluginId": "dashboard", - "id": "def-common.DashboardContainerStateWithType.panels", - "type": "Object", + "id": "def-common.DashboardOptions.syncTooltips", + "type": "boolean", "tags": [], - "label": "panels", + "label": "syncTooltips", "description": [], - "signature": [ - "{ [panelId: string]: ", - { - "pluginId": "dashboard", - "scope": "common", - "docId": "kibDashboardPluginApi", - "section": "def-common.DashboardPanelState", - "text": "DashboardPanelState" - }, - "<", - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddableInput", - "text": "EmbeddableInput" - }, - " & { [k: string]: unknown; }>; }" - ], "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "dashboard", - "id": "def-common.DashboardContainerStateWithType.controlGroupInput", - "type": "Object", + "id": "def-common.DashboardOptions.syncCursor", + "type": "boolean", "tags": [], - "label": "controlGroupInput", + "label": "syncCursor", "description": [], - "signature": [ - { - "pluginId": "controls", - "scope": "common", - "docId": "kibControlsPluginApi", - "section": "def-common.PersistableControlGroupInput", - "text": "PersistableControlGroupInput" - }, - " | undefined" - ], "path": "src/plugins/dashboard/common/types.ts", "deprecated": false, "trackAdoption": false @@ -1871,7 +1613,7 @@ "tags": [], "label": "DashboardPanelMap", "description": [], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1901,7 +1643,7 @@ }, ">" ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false } @@ -1914,9 +1656,7 @@ "type": "Interface", "tags": [], "label": "DashboardPanelState", - "description": [ - "--------------------------------------------------------------------\nDashboard panel types\n -----------------------------------------------------------------------\n\nThe dashboard panel format expected by the embeddable container." - ], + "description": [], "signature": [ { "pluginId": "dashboard", @@ -1935,7 +1675,7 @@ }, "" ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1955,7 +1695,7 @@ "text": "GridData" } ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false }, @@ -1969,7 +1709,7 @@ "signature": [ "string | undefined" ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, "trackAdoption": false } @@ -2056,7 +1796,7 @@ "description": [ "\nA saved dashboard panel parsed directly from the Dashboard Attributes panels JSON" ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2078,7 +1818,7 @@ }, "; }" ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2092,7 +1832,7 @@ "signature": [ "string | undefined" ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2103,7 +1843,7 @@ "tags": [], "label": "type", "description": [], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2117,7 +1857,7 @@ "signature": [ "string | undefined" ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2137,7 +1877,7 @@ "text": "GridData" } ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2148,7 +1888,7 @@ "tags": [], "label": "panelIndex", "description": [], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2159,7 +1899,7 @@ "tags": [], "label": "version", "description": [], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2173,7 +1913,7 @@ "signature": [ "string | undefined" ], - "path": "src/plugins/dashboard/common/types.ts", + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", "deprecated": false, "trackAdoption": false } @@ -2182,7 +1922,187 @@ } ], "enums": [], - "misc": [], + "misc": [ + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardContainerByReferenceInput", + "type": "Type", + "tags": [], + "label": "DashboardContainerByReferenceInput", + "description": [], + "signature": [ + { + "pluginId": "embeddable", + "scope": "common", + "docId": "kibEmbeddablePluginApi", + "section": "def-common.SavedObjectEmbeddableInput", + "text": "SavedObjectEmbeddableInput" + }, + " & { panels: never; }" + ], + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.DashboardContainerInput", + "type": "Type", + "tags": [], + "label": "DashboardContainerInput", + "description": [], + "signature": [ + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.DashboardContainerByValueInput", + "text": "DashboardContainerByValueInput" + }, + " | ", + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.DashboardContainerByReferenceInput", + "text": "DashboardContainerByReferenceInput" + } + ], + "path": "src/plugins/dashboard/common/dashboard_container/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.ParsedDashboardAttributes", + "type": "Type", + "tags": [], + "label": "ParsedDashboardAttributes", + "description": [], + "signature": [ + "Omit<", + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.DashboardAttributes", + "text": "DashboardAttributes" + }, + ", \"panelsJSON\" | \"optionsJSON\"> & { panels: ", + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.SavedDashboardPanel", + "text": "SavedDashboardPanel" + }, + "[]; options: ", + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.DashboardOptions", + "text": "DashboardOptions" + }, + "; }" + ], + "path": "src/plugins/dashboard/common/dashboard_saved_object/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dashboard", + "id": "def-common.SharedDashboardState", + "type": "Type", + "tags": [], + "label": "SharedDashboardState", + "description": [ + "\nFor BWC reasons, dashboard state is stored with panels as an array instead of a map" + ], + "signature": [ + "{ description?: string | undefined; query?: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | undefined; tags?: string[] | undefined; id?: string | undefined; title?: string | undefined; viewMode?: ", + { + "pluginId": "embeddable", + "scope": "common", + "docId": "kibEmbeddablePluginApi", + "section": "def-common.ViewMode", + "text": "ViewMode" + }, + " | undefined; lastReloadRequestTime?: number | undefined; hidePanelTitles?: boolean | undefined; enhancements?: ", + { + "pluginId": "@kbn/utility-types", + "scope": "server", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-server.SerializableRecord", + "text": "SerializableRecord" + }, + " | undefined; disabledActions?: string[] | undefined; disableTriggers?: boolean | undefined; searchSessionId?: string | undefined; syncColors?: boolean | undefined; syncCursor?: boolean | undefined; syncTooltips?: boolean | undefined; executionContext?: ", + { + "pluginId": "@kbn/core-execution-context-common", + "scope": "common", + "docId": "kibKbnCoreExecutionContextCommonPluginApi", + "section": "def-common.KibanaExecutionContext", + "text": "KibanaExecutionContext" + }, + " | undefined; filters?: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined; timeRange?: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined; timeslice?: [number, number] | undefined; controlGroupInput?: ", + { + "pluginId": "controls", + "scope": "common", + "docId": "kibControlsPluginApi", + "section": "def-common.PersistableControlGroupInput", + "text": "PersistableControlGroupInput" + }, + " | undefined; isEmbeddedExternally?: boolean | undefined; timeRestore?: boolean | undefined; refreshInterval?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.RefreshInterval", + "text": "RefreshInterval" + }, + " | undefined; useMargins?: boolean | undefined; panels?: ", + { + "pluginId": "dashboard", + "scope": "common", + "docId": "kibDashboardPluginApi", + "section": "def-common.SavedDashboardPanel", + "text": "SavedDashboardPanel" + }, + "[] | undefined; }" + ], + "path": "src/plugins/dashboard/common/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], "objects": [ { "parentPluginId": "dashboard", diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index ef75aee991b3d..140793152439c 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-prese | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 121 | 0 | 114 | 3 | +| 113 | 0 | 109 | 2 | ## Client @@ -31,9 +31,6 @@ Contact [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-prese ### Start -### Objects - - ### Functions @@ -65,3 +62,6 @@ Contact [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-prese ### Interfaces +### Consts, variables and types + + diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 2088b82d402ae..6f5261bc7a6c0 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json index 41ffa2a2bc478..ced8ea708db74 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -12935,10 +12935,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx" @@ -12951,6 +12947,10 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts" @@ -20637,10 +20637,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx" @@ -20653,6 +20649,10 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts" diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 18d0a547d54ec..9993762661870 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-disco | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3279 | 119 | 2561 | 27 | +| 3286 | 119 | 2568 | 27 | ## Client diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index f4877a21837e0..9b86339b353da 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-disco | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3279 | 119 | 2561 | 27 | +| 3286 | 119 | 2568 | 27 | ## Client diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json index ef2a95934d53a..34683f5d2b99a 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -12064,6 +12064,23 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.aggRate", + "type": "Function", + "tags": [], + "label": "aggRate", + "description": [], + "signature": [ + "() => FunctionDefinition" + ], + "path": "src/plugins/data/common/search/aggs/metrics/rate_fn.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.aggregateQueryToAst", @@ -14862,6 +14879,39 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.getRateMetricAgg", + "type": "Function", + "tags": [], + "label": "getRateMetricAgg", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.MetricAggType", + "text": "MetricAggType" + }, + "<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IMetricAggConfig", + "text": "IMetricAggConfig" + }, + ">" + ], + "path": "src/plugins/data/common/search/aggs/metrics/rate.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.getResponseInspectorStats", @@ -22737,6 +22787,26 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "data", + "id": "def-common.AggParamsMapping.METRIC_TYPES.RATE", + "type": "Object", + "tags": [], + "label": "[METRIC_TYPES.RATE]", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggParamsRate", + "text": "AggParamsRate" + } + ], + "path": "src/plugins/data/common/search/aggs/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "data", "id": "def-common.AggParamsMapping.METRIC_TYPES.SERIAL_DIFF", @@ -23353,6 +23423,62 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.AggParamsRate", + "type": "Interface", + "tags": [], + "label": "AggParamsRate", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggParamsRate", + "text": "AggParamsRate" + }, + " extends ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.BaseAggParams", + "text": "BaseAggParams" + } + ], + "path": "src/plugins/data/common/search/aggs/metrics/rate.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.AggParamsRate.unit", + "type": "string", + "tags": [], + "label": "unit", + "description": [], + "path": "src/plugins/data/common/search/aggs/metrics/rate.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "data", + "id": "def-common.AggParamsRate.field", + "type": "string", + "tags": [], + "label": "field", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/data/common/search/aggs/metrics/rate.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.AggParamsSampler", @@ -31799,6 +31925,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.aggRateFnName", + "type": "string", + "tags": [], + "label": "aggRateFnName", + "description": [], + "signature": [ + "\"aggRate\"" + ], + "path": "src/plugins/data/common/search/aggs/metrics/rate_fn.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.aggSamplerFnName", diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index e95a86fae3f25..51aa208e630f6 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-disco | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3279 | 119 | 2561 | 27 | +| 3286 | 119 | 2568 | 27 | ## Client diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 0d3acb151a685..ffecfb65a6543 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index 42008d40a5071..e100fd7b1b63d 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index 908f3a117e342..2ef632b6a3254 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.devdocs.json b/api_docs/data_views.devdocs.json index 445e80d1b4524..3df29041f2824 100644 --- a/api_docs/data_views.devdocs.json +++ b/api_docs/data_views.devdocs.json @@ -75,10 +75,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx" @@ -91,6 +87,10 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts" @@ -8376,10 +8376,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx" @@ -8392,6 +8388,10 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts" @@ -15758,10 +15758,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx" @@ -15774,6 +15770,10 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts" diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index f6ce569d1d932..a20d552f2f46b 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index 927159f119a7d..b1f8b5e89bde0 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index b90368b3021f7..76e4d640decf0 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index caab93041b0d4..fe214a1aef2b2 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -330,14 +330,14 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/data/types.ts#:~:text=fieldFormats), [data_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/data/data_service.ts#:~:text=fieldFormats) | - | -| | [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | -| | [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject) | 8.8.0 | -| | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/types.ts#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave) | 8.8.0 | -| | [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes)+ 11 more | - | -| | [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes)+ 11 more | - | -| | [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts#:~:text=warning) | 8.8.0 | -| | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/types.ts#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave) | 8.8.0 | -| | [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes)+ 11 more | - | +| | [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/api/overlays/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/api/overlays/save_modal.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | +| | [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.tsx#:~:text=SavedObject) | 8.8.0 | +| | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_app/types.ts#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave) | 8.8.0 | +| | [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes)+ 11 more | - | +| | [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes)+ 11 more | - | +| | [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts#:~:text=warning) | 8.8.0 | +| | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_app/types.ts#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave) | 8.8.0 | +| | [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes)+ 11 more | - | @@ -847,12 +847,12 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [wrap_search_source_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.ts#:~:text=create) | - | | | [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.test.ts#:~:text=fetch) | - | | | [dependencies_start_mock.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts#:~:text=indexPatterns) | - | -| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=title), [use_rule_from_timeline.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx#:~:text=title), [get_es_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts#:~:text=title), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts#:~:text=title), [get_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts#:~:text=title), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts#:~:text=title), [validators.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts#:~:text=title)+ 20 more | - | +| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [use_rule_from_timeline.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx#:~:text=title), [get_es_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts#:~:text=title), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts#:~:text=title), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=title), [get_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts#:~:text=title), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts#:~:text=title), [validators.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts#:~:text=title)+ 20 more | - | | | [wrap_search_source_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.ts#:~:text=create) | - | | | [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/wrap_search_source_client.test.ts#:~:text=fetch) | - | | | [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/hooks/eql/api.ts#:~:text=options) | - | -| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=title), [use_rule_from_timeline.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx#:~:text=title), [get_es_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts#:~:text=title), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts#:~:text=title), [get_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts#:~:text=title), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts#:~:text=title), [validators.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts#:~:text=title)+ 20 more | - | -| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=title), [use_rule_from_timeline.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx#:~:text=title), [get_es_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts#:~:text=title), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts#:~:text=title), [get_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts#:~:text=title), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts#:~:text=title), [validators.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts#:~:text=title)+ 5 more | - | +| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [use_rule_from_timeline.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx#:~:text=title), [get_es_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts#:~:text=title), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts#:~:text=title), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=title), [get_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts#:~:text=title), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts#:~:text=title), [validators.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts#:~:text=title)+ 20 more | - | +| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=title), [use_rule_from_timeline.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx#:~:text=title), [get_es_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/containers/detection_engine/exceptions/get_es_query_filter.ts#:~:text=title), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts#:~:text=title), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=title), [get_query_filter.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_query_filter.ts#:~:text=title), [index_pattern.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts#:~:text=title), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/alerts_actions/utils.test.ts#:~:text=title), [validators.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts#:~:text=title)+ 5 more | - | | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | | | [query.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/query.ts#:~:text=license%24) | 8.8.0 | @@ -864,7 +864,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [policy_hooks.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [policy_hooks.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [api_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/api_client.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [api_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/api_client.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [api_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/api_client.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [lists.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/lists.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [manifest_manager.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID), [manifest_manager.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_ID)+ 34 more | - | | | [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_NAME), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_NAME), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_NAME), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_NAME) | - | | | [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts#:~:text=ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION) | - | -| | [policy_hooks.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [policy_hooks.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.tsx#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.tsx#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/view/utils.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/view/utils.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [service_actions.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/service/service_actions.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID)+ 32 more | - | +| | [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.tsx#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [form.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.tsx#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/view/utils.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/view/utils.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [service_actions.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/service/service_actions.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [service_actions.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/service/service_actions.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID), [service_actions.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/service/service_actions.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_ID)+ 32 more | - | | | [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_NAME), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_NAME), [create_event_filters.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_event_filters.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_NAME), [create_event_filters.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_event_filters.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_NAME), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/scripts/endpoint/event_filters/index.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_NAME), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/scripts/endpoint/event_filters/index.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_NAME) | - | | | [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_DESCRIPTION), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_DESCRIPTION), [create_event_filters.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_event_filters.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_DESCRIPTION), [create_event_filters.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_event_filters.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_DESCRIPTION), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/scripts/endpoint/event_filters/index.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_DESCRIPTION), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/scripts/endpoint/event_filters/index.ts#:~:text=ENDPOINT_EVENT_FILTERS_LIST_DESCRIPTION) | - | | | [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/constants.ts#:~:text=ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID), [constants.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/constants.ts#:~:text=ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID), [host_isolation_exceptions_api_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/host_isolation_exceptions_api_client.ts#:~:text=ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID), [host_isolation_exceptions_api_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/host_isolation_exceptions_api_client.ts#:~:text=ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID), [host_isolation_exceptions_api_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/host_isolation_exceptions_api_client.ts#:~:text=ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID), [lists.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/lists.ts#:~:text=ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID), [manifest_manager.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts#:~:text=ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID), [manifest_manager.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts#:~:text=ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID), [host_isolation_exceptions_validator.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts#:~:text=ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID), [host_isolation_exceptions_validator.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts#:~:text=ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID)+ 16 more | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index e4340ed74b3b5..af3f25c75d1e9 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -103,11 +103,11 @@ so TS and code-reference navigation might not highlight them. | | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| dashboard | | [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal), [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal), [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | -| dashboard | | [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject) | 8.8.0 | -| dashboard | | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/types.ts#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave) | 8.8.0 | -| dashboard | | [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts#:~:text=warning) | 8.8.0 | -| dashboard | | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/types.ts#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave) | 8.8.0 | +| dashboard | | [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/api/overlays/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_container/embeddable/api/overlays/save_modal.tsx#:~:text=SavedObjectSaveModal), [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal), [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 | +| dashboard | | [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.tsx#:~:text=SavedObject) | 8.8.0 | +| dashboard | | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_app/types.ts#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave) | 8.8.0 | +| dashboard | | [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts#:~:text=warning) | 8.8.0 | +| dashboard | | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/dashboard_app/types.ts#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave) | 8.8.0 | diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 043485b8d88ef..8a3694acb49af 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index c8be89623c2f2..238bd9e21fb84 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 2aa6171e9cd75..69b5c2db6c08e 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/embeddable.devdocs.json b/api_docs/embeddable.devdocs.json index f276b7806e715..cb912b4de95a8 100644 --- a/api_docs/embeddable.devdocs.json +++ b/api_docs/embeddable.devdocs.json @@ -1053,7 +1053,7 @@ "section": "def-public.EmbeddableContainerSettings", "text": "EmbeddableContainerSettings" }, - " | undefined" + " | undefined" ], "path": "src/plugins/embeddable/public/lib/containers/container.ts", "deprecated": false, @@ -6311,6 +6311,66 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "embeddable", + "id": "def-public.CellValueContext", + "type": "Interface", + "tags": [], + "label": "CellValueContext", + "description": [], + "signature": [ + { + "pluginId": "embeddable", + "scope": "public", + "docId": "kibEmbeddablePluginApi", + "section": "def-public.CellValueContext", + "text": "CellValueContext" + }, + "" + ], + "path": "src/plugins/embeddable/public/lib/triggers/triggers.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "embeddable", + "id": "def-public.CellValueContext.embeddable", + "type": "Uncategorized", + "tags": [], + "label": "embeddable", + "description": [], + "signature": [ + "T" + ], + "path": "src/plugins/embeddable/public/lib/triggers/triggers.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "embeddable", + "id": "def-public.CellValueContext.data", + "type": "Array", + "tags": [], + "label": "data", + "description": [], + "signature": [ + "{ value?: any; eventId?: string | undefined; columnMeta?: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumnMeta", + "text": "DatatableColumnMeta" + }, + " | undefined; }[]" + ], + "path": "src/plugins/embeddable/public/lib/triggers/triggers.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "embeddable", "id": "def-public.ContainerInput", @@ -6685,6 +6745,16 @@ "tags": [], "label": "EmbeddableContainerSettings", "description": [], + "signature": [ + { + "pluginId": "embeddable", + "scope": "public", + "docId": "kibEmbeddablePluginApi", + "section": "def-public.EmbeddableContainerSettings", + "text": "EmbeddableContainerSettings" + }, + "" + ], "path": "src/plugins/embeddable/public/lib/containers/i_container.ts", "deprecated": false, "trackAdoption": false, @@ -6720,6 +6790,23 @@ "path": "src/plugins/embeddable/public/lib/containers/i_container.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "embeddable", + "id": "def-public.EmbeddableContainerSettings.readyToInitializeChildren$", + "type": "Object", + "tags": [], + "label": "readyToInitializeChildren$", + "description": [ + "\n" + ], + "signature": [ + "Observable", + " | undefined" + ], + "path": "src/plugins/embeddable/public/lib/containers/i_container.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -9845,6 +9932,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "embeddable", + "id": "def-public.CELL_VALUE_TRIGGER", + "type": "string", + "tags": [], + "label": "CELL_VALUE_TRIGGER", + "description": [], + "signature": [ + "\"CELL_VALUE_TRIGGER\"" + ], + "path": "src/plugins/embeddable/public/lib/triggers/triggers.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "embeddable", "id": "def-public.ChartActionContext", @@ -10139,6 +10241,59 @@ } ], "objects": [ + { + "parentPluginId": "embeddable", + "id": "def-public.cellValueTrigger", + "type": "Object", + "tags": [], + "label": "cellValueTrigger", + "description": [], + "path": "src/plugins/embeddable/public/lib/triggers/triggers.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "embeddable", + "id": "def-public.cellValueTrigger.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "src/plugins/embeddable/public/lib/triggers/triggers.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "embeddable", + "id": "def-public.cellValueTrigger.title", + "type": "Any", + "tags": [], + "label": "title", + "description": [], + "signature": [ + "any" + ], + "path": "src/plugins/embeddable/public/lib/triggers/triggers.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "embeddable", + "id": "def-public.cellValueTrigger.description", + "type": "Any", + "tags": [], + "label": "description", + "description": [], + "signature": [ + "any" + ], + "path": "src/plugins/embeddable/public/lib/triggers/triggers.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "embeddable", "id": "def-public.contextMenuTrigger", diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 1d1d221acf43e..9036b1713f6e0 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; @@ -21,7 +21,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 513 | 6 | 413 | 4 | +| 522 | 8 | 421 | 4 | ## Client diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index beb700808413d..cbf80d4882130 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 1e04bc43ce634..5f0808b340566 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 596dda08913fc..a0fcf90959eeb 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 9287b090bc060..305179b2aa871 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index d42dec5463e26..0436f1c723079 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 153be192fc01b..fa42d391bf715 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 47e2f0540f016..ab70290265cad 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index d98d3644ba658..2c589527edd48 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index 5c64139fb9ff6..1799e407926a4 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 52a6a48dae31b..8da3e9661bdd1 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index de4021bead1be..b344d9c694217 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index a2ad0989e401c..5ae7ae44489ee 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index a5a9fef5aa65e..f8597b25487fb 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 5c5d3fd9e5bd0..7630444c201c6 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 3dedac66636b0..9e68c12721dc2 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index e9e29bafe83ad..adf7f87deff1b 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 9c9967edef3d9..48ebfdbf411dc 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index 722dddbe0b001..69e8b934c868d 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index aa3e3f78af1bc..8c9214ff3fcdf 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.devdocs.json b/api_docs/expressions.devdocs.json index ac65def6fbf5a..72480db6105c4 100644 --- a/api_docs/expressions.devdocs.json +++ b/api_docs/expressions.devdocs.json @@ -3802,7 +3802,7 @@ "id": "def-public.ExpressionRenderHandler.Unnamed.$2", "type": "Object", "tags": [], - "label": "{\n onRenderError,\n renderMode,\n syncColors,\n syncTooltips,\n syncCursor,\n interactive,\n hasCompatibleActions = async () => false,\n executionContext,\n }", + "label": "{\n onRenderError,\n renderMode,\n syncColors,\n syncTooltips,\n syncCursor,\n interactive,\n hasCompatibleActions = async () => false,\n getCompatibleCellValueActions = async () => [],\n executionContext,\n }", "description": [], "signature": [ "ExpressionRenderHandlerParams" @@ -10900,6 +10900,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "expressions", + "id": "def-public.IExpressionLoaderParams.getCompatibleCellValueActions", + "type": "Function", + "tags": [], + "label": "getCompatibleCellValueActions", + "description": [], + "signature": [ + "((data: object[]) => Promise) | undefined" + ], + "path": "src/plugins/expressions/public/types/index.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "expressions", "id": "def-public.IExpressionLoaderParams.executionContext", @@ -11174,6 +11188,38 @@ ], "returnComment": [] }, + { + "parentPluginId": "expressions", + "id": "def-public.IInterpreterRenderHandlers.getCompatibleCellValueActions", + "type": "Function", + "tags": [], + "label": "getCompatibleCellValueActions", + "description": [], + "signature": [ + "((data: object[]) => Promise) | undefined" + ], + "path": "src/plugins/expressions/common/expression_renderers/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "expressions", + "id": "def-public.IInterpreterRenderHandlers.getCompatibleCellValueActions.$1", + "type": "Array", + "tags": [], + "label": "data", + "description": [], + "signature": [ + "object[]" + ], + "path": "src/plugins/expressions/common/expression_renderers/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "expressions", "id": "def-public.IInterpreterRenderHandlers.getRenderMode", @@ -21172,6 +21218,38 @@ ], "returnComment": [] }, + { + "parentPluginId": "expressions", + "id": "def-server.IInterpreterRenderHandlers.getCompatibleCellValueActions", + "type": "Function", + "tags": [], + "label": "getCompatibleCellValueActions", + "description": [], + "signature": [ + "((data: object[]) => Promise) | undefined" + ], + "path": "src/plugins/expressions/common/expression_renderers/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "expressions", + "id": "def-server.IInterpreterRenderHandlers.getCompatibleCellValueActions.$1", + "type": "Array", + "tags": [], + "label": "data", + "description": [], + "signature": [ + "object[]" + ], + "path": "src/plugins/expressions/common/expression_renderers/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "expressions", "id": "def-server.IInterpreterRenderHandlers.getRenderMode", @@ -35418,6 +35496,38 @@ ], "returnComment": [] }, + { + "parentPluginId": "expressions", + "id": "def-common.IInterpreterRenderHandlers.getCompatibleCellValueActions", + "type": "Function", + "tags": [], + "label": "getCompatibleCellValueActions", + "description": [], + "signature": [ + "((data: object[]) => Promise) | undefined" + ], + "path": "src/plugins/expressions/common/expression_renderers/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "expressions", + "id": "def-common.IInterpreterRenderHandlers.getCompatibleCellValueActions.$1", + "type": "Array", + "tags": [], + "label": "data", + "description": [], + "signature": [ + "object[]" + ], + "path": "src/plugins/expressions/common/expression_renderers/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "expressions", "id": "def-common.IInterpreterRenderHandlers.getRenderMode", diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index e4c7b652af96b..7fe9c4c3d2610 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Visualizations](https://github.com/orgs/elastic/teams/kibana-visualizat | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2198 | 74 | 1739 | 5 | +| 2205 | 74 | 1746 | 5 | ## Client diff --git a/api_docs/features.mdx b/api_docs/features.mdx index 0afe14ef978d2..74dbfa020e1cb 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index c52c1df16f32a..72d4408e11fc4 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index 6697e5eb9fe39..51264e812068f 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index 2f6b82c1af173..1ae4e984f6ebc 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index 26daa27e2f856..580137f8e29ba 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index 7dbe768a37a6c..5a82c71e0252c 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -14828,7 +14828,7 @@ "label": "AgentStatus", "description": [], "signature": [ - "\"error\" | \"warning\" | \"offline\" | \"online\" | \"inactive\" | \"enrolling\" | \"unenrolling\" | \"updating\" | \"degraded\"" + "\"error\" | \"offline\" | \"online\" | \"inactive\" | \"enrolling\" | \"unenrolling\" | \"updating\" | \"degraded\"" ], "path": "x-pack/plugins/fleet/common/types/models/agent.ts", "deprecated": false, @@ -16520,17 +16520,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "fleet", - "id": "def-common.AGENT_API_ROUTES.CURRENT_UPGRADES_PATTERN", - "type": "string", - "tags": [], - "label": "CURRENT_UPGRADES_PATTERN", - "description": [], - "path": "x-pack/plugins/fleet/common/constants/routes.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "fleet", "id": "def-common.AGENT_API_ROUTES.ACTION_STATUS_PATTERN", @@ -17275,22 +17264,6 @@ "children": [], "returnComment": [] }, - { - "parentPluginId": "fleet", - "id": "def-common.agentRouteService.getCurrentUpgradesPath", - "type": "Function", - "tags": [], - "label": "getCurrentUpgradesPath", - "description": [], - "signature": [ - "() => string" - ], - "path": "x-pack/plugins/fleet/common/services/routes.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, { "parentPluginId": "fleet", "id": "def-common.agentRouteService.getCancelActionPath", diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index c6232687219ed..f8db6924db67a 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Fleet](https://github.com/orgs/elastic/teams/fleet) for questions regar | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1027 | 3 | 922 | 20 | +| 1025 | 3 | 920 | 20 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 53752f95b8eb3..776d9689ebbf5 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.devdocs.json b/api_docs/guided_onboarding.devdocs.json index 8ff0a5ea7ecbf..bb97b8874edc4 100644 --- a/api_docs/guided_onboarding.devdocs.json +++ b/api_docs/guided_onboarding.devdocs.json @@ -506,6 +506,83 @@ ], "returnComment": [] }, + { + "parentPluginId": "guidedOnboarding", + "id": "def-public.GuidedOnboardingApi.isGuideStepReadyToComplete$", + "type": "Function", + "tags": [], + "label": "isGuideStepReadyToComplete$", + "description": [], + "signature": [ + "(guideId: ", + { + "pluginId": "@kbn/guided-onboarding", + "scope": "common", + "docId": "kibKbnGuidedOnboardingPluginApi", + "section": "def-common.GuideId", + "text": "GuideId" + }, + ", stepId: ", + { + "pluginId": "@kbn/guided-onboarding", + "scope": "common", + "docId": "kibKbnGuidedOnboardingPluginApi", + "section": "def-common.GuideStepIds", + "text": "GuideStepIds" + }, + ") => ", + "Observable", + "" + ], + "path": "src/plugins/guided_onboarding/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "guidedOnboarding", + "id": "def-public.GuidedOnboardingApi.isGuideStepReadyToComplete$.$1", + "type": "CompoundType", + "tags": [], + "label": "guideId", + "description": [], + "signature": [ + { + "pluginId": "@kbn/guided-onboarding", + "scope": "common", + "docId": "kibKbnGuidedOnboardingPluginApi", + "section": "def-common.GuideId", + "text": "GuideId" + } + ], + "path": "src/plugins/guided_onboarding/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "guidedOnboarding", + "id": "def-public.GuidedOnboardingApi.isGuideStepReadyToComplete$.$2", + "type": "CompoundType", + "tags": [], + "label": "stepId", + "description": [], + "signature": [ + { + "pluginId": "@kbn/guided-onboarding", + "scope": "common", + "docId": "kibKbnGuidedOnboardingPluginApi", + "section": "def-common.GuideStepIds", + "text": "GuideStepIds" + } + ], + "path": "src/plugins/guided_onboarding/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "guidedOnboarding", "id": "def-public.GuidedOnboardingApi.startGuideStep", @@ -785,6 +862,21 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "guidedOnboarding", + "id": "def-public.GuidedOnboardingApi.isLoading$", + "type": "Object", + "tags": [], + "label": "isLoading$", + "description": [], + "signature": [ + "Observable", + "" + ], + "path": "src/plugins/guided_onboarding/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "guidedOnboarding", "id": "def-public.GuidedOnboardingApi.getGuideConfig", @@ -1037,7 +1129,7 @@ "label": "steps", "description": [], "signature": [ - "({ id: \"step1\"; title: string; descriptionList: string[]; location: { appID: string; path: string; }; integration: string; } | { id: \"step2\"; title: string; descriptionList: string[]; location: { appID: string; path: string; }; manualCompletion: { title: string; description: string; readyToCompleteOnNavigation: true; }; } | { id: \"step3\"; title: string; description: string; manualCompletion: { title: string; description: string; }; location: { appID: string; path: string; }; })[]" + "({ id: \"step1\"; title: string; descriptionList: string[]; location: { appID: string; path: string; }; integration: string; } | { id: \"step2\"; title: string; descriptionList: (string | { descriptionText: string; linkText: string; linkUrl: string; isLinkExternal: true; })[]; location: { appID: string; path: string; }; manualCompletion: { title: string; description: string; readyToCompleteOnNavigation: true; }; } | { id: \"step3\"; title: string; description: string; manualCompletion: { title: string; description: string; }; location: { appID: string; path: string; }; })[]" ], "path": "src/plugins/guided_onboarding/common/test_guide_config.ts", "deprecated": false, @@ -1362,12 +1454,20 @@ { "parentPluginId": "guidedOnboarding", "id": "def-common.StepConfig.description", - "type": "string", + "type": "CompoundType", "tags": [], "label": "description", "description": [], "signature": [ - "string | undefined" + "string | ", + { + "pluginId": "guidedOnboarding", + "scope": "common", + "docId": "kibGuidedOnboardingPluginApi", + "section": "def-common.StepDescriptionWithLink", + "text": "StepDescriptionWithLink" + }, + " | undefined" ], "path": "src/plugins/guided_onboarding/common/types.ts", "deprecated": false, @@ -1381,7 +1481,15 @@ "label": "descriptionList", "description": [], "signature": [ - "React.ReactNode[] | undefined" + "(string | ", + { + "pluginId": "guidedOnboarding", + "scope": "common", + "docId": "kibGuidedOnboardingPluginApi", + "section": "def-common.StepDescriptionWithLink", + "text": "StepDescriptionWithLink" + }, + ")[] | undefined" ], "path": "src/plugins/guided_onboarding/common/types.ts", "deprecated": false, @@ -1452,6 +1560,67 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "guidedOnboarding", + "id": "def-common.StepDescriptionWithLink", + "type": "Interface", + "tags": [], + "label": "StepDescriptionWithLink", + "description": [], + "path": "src/plugins/guided_onboarding/common/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "guidedOnboarding", + "id": "def-common.StepDescriptionWithLink.descriptionText", + "type": "string", + "tags": [], + "label": "descriptionText", + "description": [], + "path": "src/plugins/guided_onboarding/common/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "guidedOnboarding", + "id": "def-common.StepDescriptionWithLink.linkText", + "type": "string", + "tags": [], + "label": "linkText", + "description": [], + "path": "src/plugins/guided_onboarding/common/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "guidedOnboarding", + "id": "def-common.StepDescriptionWithLink.linkUrl", + "type": "string", + "tags": [], + "label": "linkUrl", + "description": [], + "path": "src/plugins/guided_onboarding/common/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "guidedOnboarding", + "id": "def-common.StepDescriptionWithLink.isLinkExternal", + "type": "CompoundType", + "tags": [], + "label": "isLinkExternal", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/guided_onboarding/common/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false } ], "enums": [], @@ -1715,7 +1884,7 @@ "label": "steps", "description": [], "signature": [ - "({ id: \"step1\"; title: string; descriptionList: string[]; location: { appID: string; path: string; }; integration: string; } | { id: \"step2\"; title: string; descriptionList: string[]; location: { appID: string; path: string; }; manualCompletion: { title: string; description: string; readyToCompleteOnNavigation: true; }; } | { id: \"step3\"; title: string; description: string; manualCompletion: { title: string; description: string; }; location: { appID: string; path: string; }; })[]" + "({ id: \"step1\"; title: string; descriptionList: string[]; location: { appID: string; path: string; }; integration: string; } | { id: \"step2\"; title: string; descriptionList: (string | { descriptionText: string; linkText: string; linkUrl: string; isLinkExternal: true; })[]; location: { appID: string; path: string; }; manualCompletion: { title: string; description: string; readyToCompleteOnNavigation: true; }; } | { id: \"step3\"; title: string; description: string; manualCompletion: { title: string; description: string; }; location: { appID: string; path: string; }; })[]" ], "path": "src/plugins/guided_onboarding/common/test_guide_config.ts", "deprecated": false, diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index fa4d2c2d4f93f..bff609ac08a29 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Journey Onboarding](https://github.com/orgs/elastic/teams/platform-onbo | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 94 | 0 | 93 | 0 | +| 103 | 0 | 102 | 0 | ## Client diff --git a/api_docs/home.devdocs.json b/api_docs/home.devdocs.json index a60733edeaecb..0c2b70ce5bf97 100644 --- a/api_docs/home.devdocs.json +++ b/api_docs/home.devdocs.json @@ -1752,7 +1752,7 @@ "section": "def-server.Writable", "text": "Writable" }, - "[]; previewImagePath: string; overviewDashboard: string; defaultIndex: string; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", + "[]; previewImagePath: string; overviewDashboard: string; defaultIndex: string; dataIndices: Readonly<{ isDataStream?: boolean | undefined; } & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", { "pluginId": "@kbn/core-saved-objects-common", "scope": "common", @@ -1799,7 +1799,7 @@ "section": "def-server.Writable", "text": "Writable" }, - "[]; previewImagePath: string; overviewDashboard: string; defaultIndex: string; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>" + "[]; previewImagePath: string; overviewDashboard: string; defaultIndex: string; dataIndices: Readonly<{ isDataStream?: boolean | undefined; } & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>" ], "path": "src/plugins/home/server/services/sample_data/lib/sample_dataset_registry_types.ts", "deprecated": false, @@ -2192,7 +2192,7 @@ "section": "def-server.Writable", "text": "Writable" }, - "[]; previewImagePath: string; overviewDashboard: string; defaultIndex: string; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", + "[]; previewImagePath: string; overviewDashboard: string; defaultIndex: string; dataIndices: Readonly<{ isDataStream?: boolean | undefined; } & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", { "pluginId": "@kbn/core-saved-objects-common", "scope": "common", diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 0e80cccce52ca..4a99fb03335b7 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index df292fb24960c..63c23d9f326f1 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 8304a05623f42..7cfa122744dbd 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index d138ef36dd028..44228b7b5e5fc 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index d24ff1fe679e7..b6c6d0b212703 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 4b7afa427c5da..e3b723cffbff3 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index cbbf12af7a614..00a1abc16a8bb 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 0c89ce831d53d..5be7193df271c 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index 91095e0b80cc5..ad2bc808fb55c 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] --- import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx index 29e653c42b222..762c68662f6fc 100644 --- a/api_docs/kbn_alerts.mdx +++ b/api_docs/kbn_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts title: "@kbn/alerts" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts'] --- import kbnAlertsObj from './kbn_alerts.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index d28813217d5a9..9b51869f2f860 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.devdocs.json b/api_docs/kbn_analytics_client.devdocs.json index 9e814756aa658..079137d661c38 100644 --- a/api_docs/kbn_analytics_client.devdocs.json +++ b/api_docs/kbn_analytics_client.devdocs.json @@ -706,6 +706,10 @@ "plugin": "fleet", "path": "x-pack/plugins/fleet/server/services/telemetry/fleet_usage_sender.ts" }, + { + "plugin": "fleet", + "path": "x-pack/plugins/fleet/server/services/telemetry/fleet_usage_sender.ts" + }, { "plugin": "osquery", "path": "x-pack/plugins/osquery/server/lib/telemetry/sender.ts" diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index ea80e523b923a..0fc22fc6a3dee 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index 3d418505ddbfa..d5f5ff9cd0400 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] --- import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index c7742e3b454c0..fd8c25dae28fb 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] --- import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index b3635a41a4f46..ef0f8a14f2715 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] --- import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index 19acdcd414876..a3d6354d92ba6 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_gainsight.mdx b/api_docs/kbn_analytics_shippers_gainsight.mdx index e57bc170e4d09..fac93033a0b02 100644 --- a/api_docs/kbn_analytics_shippers_gainsight.mdx +++ b/api_docs/kbn_analytics_shippers_gainsight.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-gainsight title: "@kbn/analytics-shippers-gainsight" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-gainsight plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-gainsight'] --- import kbnAnalyticsShippersGainsightObj from './kbn_analytics_shippers_gainsight.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index f22ddf8a415ab..e3b37a0be3275 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 4de747bf5b179..785acc7b96fec 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index e800ee95fcc91..d9b06a61054f7 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index 9cdb5f6b38129..f52f12fddbed6 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index 21dbee87e461b..6ce576b5dcf12 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index 3640fa391aaee..b4c4ddef5e1e7 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index 509de3c408ace..52241910be723 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 611fc59f7c4b5..1123449eb7455 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index e1d98dff18d2b..888b05c42cdaf 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index 898b17778b008..f6b70aa1cf95b 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index dea1d3e06cc6e..39b1d65a747a9 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index a4a1a393a47cb..49bdaff30bab5 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index 1274053424a74..8c3e780c70842 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index b63c0c940c8fb..1c2a816c234f3 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_inspector.devdocs.json b/api_docs/kbn_content_management_content_editor.devdocs.json similarity index 62% rename from api_docs/kbn_content_management_inspector.devdocs.json rename to api_docs/kbn_content_management_content_editor.devdocs.json index c4c6c0b3b991c..fcb0098985b47 100644 --- a/api_docs/kbn_content_management_inspector.devdocs.json +++ b/api_docs/kbn_content_management_content_editor.devdocs.json @@ -1,5 +1,5 @@ { - "id": "@kbn/content-management-inspector", + "id": "@kbn/content-management-content-editor", "client": { "classes": [], "functions": [], @@ -20,36 +20,36 @@ "classes": [], "functions": [ { - "parentPluginId": "@kbn/content-management-inspector", - "id": "def-common.InspectorKibanaProvider", + "parentPluginId": "@kbn/content-management-content-editor", + "id": "def-common.ContentEditorKibanaProvider", "type": "Function", "tags": [], - "label": "InspectorKibanaProvider", + "label": "ContentEditorKibanaProvider", "description": [ "\nKibana-specific Provider that maps to known dependency types." ], "signature": [ "({ children, ...services }: React.PropsWithChildren<", - "InspectorKibanaDependencies", + "ContentEditorKibanaDependencies", ">) => JSX.Element" ], - "path": "packages/content-management/inspector/src/services.tsx", + "path": "packages/content-management/content_editor/src/services.tsx", "deprecated": false, "trackAdoption": false, "children": [ { - "parentPluginId": "@kbn/content-management-inspector", - "id": "def-common.InspectorKibanaProvider.$1", + "parentPluginId": "@kbn/content-management-content-editor", + "id": "def-common.ContentEditorKibanaProvider.$1", "type": "CompoundType", "tags": [], "label": "{\n children,\n ...services\n}", "description": [], "signature": [ "React.PropsWithChildren<", - "InspectorKibanaDependencies", + "ContentEditorKibanaDependencies", ">" ], - "path": "packages/content-management/inspector/src/services.tsx", + "path": "packages/content-management/content_editor/src/services.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -59,11 +59,11 @@ "initialIsOpen": false }, { - "parentPluginId": "@kbn/content-management-inspector", - "id": "def-common.InspectorProvider", + "parentPluginId": "@kbn/content-management-content-editor", + "id": "def-common.ContentEditorProvider", "type": "Function", "tags": [], - "label": "InspectorProvider", + "label": "ContentEditorProvider", "description": [ "\nAbstract external service Provider." ], @@ -72,13 +72,13 @@ "Services", ">) => JSX.Element" ], - "path": "packages/content-management/inspector/src/services.tsx", + "path": "packages/content-management/content_editor/src/services.tsx", "deprecated": false, "trackAdoption": false, "children": [ { - "parentPluginId": "@kbn/content-management-inspector", - "id": "def-common.InspectorProvider.$1", + "parentPluginId": "@kbn/content-management-content-editor", + "id": "def-common.ContentEditorProvider.$1", "type": "CompoundType", "tags": [], "label": "{ children, ...services }", @@ -88,7 +88,7 @@ "Services", ">" ], - "path": "packages/content-management/inspector/src/services.tsx", + "path": "packages/content-management/content_editor/src/services.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -98,24 +98,24 @@ "initialIsOpen": false }, { - "parentPluginId": "@kbn/content-management-inspector", - "id": "def-common.useOpenInspector", + "parentPluginId": "@kbn/content-management-content-editor", + "id": "def-common.useOpenContentEditor", "type": "Function", "tags": [], - "label": "useOpenInspector", + "label": "useOpenContentEditor", "description": [], "signature": [ "() => (args: ", { - "pluginId": "@kbn/content-management-inspector", + "pluginId": "@kbn/content-management-content-editor", "scope": "common", - "docId": "kibKbnContentManagementInspectorPluginApi", - "section": "def-common.OpenInspectorParams", - "text": "OpenInspectorParams" + "docId": "kibKbnContentManagementContentEditorPluginApi", + "section": "def-common.OpenContentEditorParams", + "text": "OpenContentEditorParams" }, ") => () => void" ], - "path": "packages/content-management/inspector/src/open_inspector.tsx", + "path": "packages/content-management/content_editor/src/open_content_editor.tsx", "deprecated": false, "trackAdoption": false, "children": [], @@ -127,11 +127,11 @@ "enums": [], "misc": [ { - "parentPluginId": "@kbn/content-management-inspector", - "id": "def-common.OpenInspectorParams", + "parentPluginId": "@kbn/content-management-content-editor", + "id": "def-common.OpenContentEditorParams", "type": "Type", "tags": [], - "label": "OpenInspectorParams", + "label": "OpenContentEditorParams", "description": [], "signature": [ "{ onSave?: ((args: { id: string; title: string; description?: string | undefined; tags: string[]; }) => Promise) | undefined; item: ", @@ -140,7 +140,7 @@ "CustomValidators", " | undefined; }" ], - "path": "packages/content-management/inspector/src/open_inspector.tsx", + "path": "packages/content-management/content_editor/src/open_content_editor.tsx", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/kbn_content_management_inspector.mdx b/api_docs/kbn_content_management_content_editor.mdx similarity index 52% rename from api_docs/kbn_content_management_inspector.mdx rename to api_docs/kbn_content_management_content_editor.mdx index cf557fc419d4e..bb301b345eb10 100644 --- a/api_docs/kbn_content_management_inspector.mdx +++ b/api_docs/kbn_content_management_content_editor.mdx @@ -3,15 +3,15 @@ #### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. #### Reach out in #docs-engineering for more info. #### -id: kibKbnContentManagementInspectorPluginApi -slug: /kibana-dev-docs/api/kbn-content-management-inspector -title: "@kbn/content-management-inspector" +id: kibKbnContentManagementContentEditorPluginApi +slug: /kibana-dev-docs/api/kbn-content-management-content-editor +title: "@kbn/content-management-content-editor" image: https://source.unsplash.com/400x175/?github -description: API docs for the @kbn/content-management-inspector plugin -date: 2022-12-15 -tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-inspector'] +description: API docs for the @kbn/content-management-content-editor plugin +date: 2022-12-19 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- -import kbnContentManagementInspectorObj from './kbn_content_management_inspector.devdocs.json'; +import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; @@ -26,8 +26,8 @@ Contact [Owner missing] for questions regarding this plugin. ## Common ### Functions - + ### Consts, variables and types - + diff --git a/api_docs/kbn_content_management_table_list.devdocs.json b/api_docs/kbn_content_management_table_list.devdocs.json index 652ed556390cd..cd7801e4b598c 100644 --- a/api_docs/kbn_content_management_table_list.devdocs.json +++ b/api_docs/kbn_content_management_table_list.devdocs.json @@ -35,7 +35,7 @@ "section": "def-common.UserContentCommonSchema", "text": "UserContentCommonSchema" }, - ">({ tableListTitle, tableListDescription, entityName, entityNamePlural, initialFilter: initialQuery, headingId, initialPageSize, listingLimit, customTableColumn, emptyPrompt, findItems, createItem, editItem, deleteItems, getDetailViewLink, onClickTitle, id, inspector, children, titleColumnName, additionalRightSideActions, withoutPageTemplateWrapper, }: ", + ">({ tableListTitle, tableListDescription, entityName, entityNamePlural, initialFilter: initialQuery, headingId, initialPageSize, listingLimit, customTableColumn, emptyPrompt, findItems, createItem, editItem, deleteItems, getDetailViewLink, onClickTitle, id, contentEditor, children, titleColumnName, additionalRightSideActions, withoutPageTemplateWrapper, }: ", "Props", ") => JSX.Element | null" ], diff --git a/api_docs/kbn_content_management_table_list.mdx b/api_docs/kbn_content_management_table_list.mdx index 72eb7d0cb84e7..7698b1d89ebbc 100644 --- a/api_docs/kbn_content_management_table_list.mdx +++ b/api_docs/kbn_content_management_table_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list title: "@kbn/content-management-table-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list'] --- import kbnContentManagementTableListObj from './kbn_content_management_table_list.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index d983d56f49ee1..88a678e379437 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index 29e8c3834851d..201fbd7991207 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index 4cabc580e87f1..96683f7c57013 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index a127b69c5f7ce..0cd5b193f2df7 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index bc8553d192571..d04d60b4104f2 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index d8620c4a94e98..c8627bcdddcad 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.devdocs.json b/api_docs/kbn_core_application_browser.devdocs.json index 3617d74cf3736..759b5a5c5c861 100644 --- a/api_docs/kbn_core_application_browser.devdocs.json +++ b/api_docs/kbn_core_application_browser.devdocs.json @@ -1249,7 +1249,7 @@ }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/public/types.ts" + "path": "src/plugins/dashboard/public/dashboard_app/types.ts" }, { "plugin": "dashboard", diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index 6e18afeee2d88..4a993213a6b8d 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index 32b32cb1e61d3..eecaae2a75c71 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index 2067fcf0c8226..6735afdc39bbd 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index 90bc0d0d49db5..c6e54877757c5 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index c22d791b690ef..8e570ae9eec80 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index 766bacf1b7685..f84073a754021 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index 5397d4eab1327..b92ff5eca4747 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index b2b8262a63051..543ed49186acc 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 7f06171d25bfb..1a1d14632e577 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index 211eea4efaf68..46a6e8b06a16c 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index 27de5e1fa1d92..86d2ede64224d 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index 0de3bda52c578..3c4f3da18512d 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index 7631c73830e68..bb8500abcd53e 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index e487452cda67c..345b7519c0c90 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index 0a09ce8031038..23c1cc1b06d5a 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index 948cf50b0f3b5..08c57ef7827b8 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index e53cbd02f9223..384aec1c07acc 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index 51da6ea59507a..2dbcfb76b16c0 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index 91754233120f8..cf72cc2da6a8c 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index cc3169962a7d0..d1d52e3121925 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index 1b1a815a43a08..fee1ebaf16c52 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index 639f6ec8df6b1..b3be2ff3190a5 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index 5e12957fa796d..4292e02b240d8 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index a9215f2bd22aa..326cc39006187 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index 650f8452eeaac..27c82ae4554a6 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 79ce4c0c9693b..41976eabc63f5 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index 83198decd6f89..acee56307cd6d 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index c671a33bfd225..94c46ed3ba9f2 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index e50e99a22c582..b4f90ff3d7697 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index 39cdfe775d273..9fc552d295350 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index d8dd523a5f98a..723de8e8a81aa 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index 0517c138d0a25..8fa3caf66527a 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index 15c0823c343bd..f8c012aebbbc1 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index c2f7bf364ba9e..8215ec1868aa6 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index 2cfb042dd3f3b..25659141fd964 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index fec1909f48772..7c16b1b88d0be 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index f9a1079c03b4b..c3e4bc90bcd6b 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index a6dbf68aca252..74bfb732cfa0d 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index 4d01639633469..3a3bde1ee7d53 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index 48f1770282bbd..c767ec003d6c6 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index 0ef9cb64a2324..91fadda5fa8c1 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index c3c60e429ebe5..123caba955169 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index cef226a836393..d2c079445d1f4 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 901d37ca999af..b95d4f4045da2 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index ec1479ff0df67..5fc132c687107 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index 0a9434c05beeb..fe2c7ad8921f8 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index e5d8b2233f820..cff8db8b7d581 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index b1aa1ce0bae94..29b4791b2c8ac 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 90f89e5640201..5e1c8fa7b1fcf 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index eba5b28785f12..b8df949947cc5 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index f7f3908a9caed..01b5432f9b2ae 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index 217c3139f846d..fb5c8f6ecda5e 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index 503776dcac1e6..c05dc0186bcd4 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index cc71e24f14785..715da6905354d 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index 096b76b6aa5c0..2a2abd4584c98 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index 521d63304feb5..4d9136b928e34 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.devdocs.json b/api_docs/kbn_core_http_server.devdocs.json index 67d50befff8cf..54f2b180ee848 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -2665,6 +2665,22 @@ "path": "packages/core/http/core-http-server/src/router/socket.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-http-server", + "id": "def-server.IKibanaSocket.remoteAddress", + "type": "string", + "tags": [], + "label": "remoteAddress", + "description": [ + "\nThe string representation of the remote IP address. For example,`'74.125.127.100'` or\n`'2001:4860:a005::68'`. Value may be `undefined` if the socket is destroyed (for example, if\nthe client disconnected)." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/http/core-http-server/src/router/socket.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 90ae008194d93..b75f7749b9fc8 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; @@ -21,7 +21,7 @@ Contact Kibana Core for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 392 | 1 | 154 | 0 | +| 393 | 1 | 154 | 0 | ## Server diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index abd63c8682d49..c8764c3f90809 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index e1e8315fe079b..52c54c9238ecd 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index a2e735cff1503..b444d8beedcca 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index a4c3e397dd2c1..1f7db30f4378b 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index f9e4be3288b55..d43fd1317bf57 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index fb5003dfaec22..e756009ae883e 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index b10132bba5136..6ee8acdb7557e 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser.mdx b/api_docs/kbn_core_injected_metadata_browser.mdx index b3a5f255712c5..70a5c808f2375 100644 --- a/api_docs/kbn_core_injected_metadata_browser.mdx +++ b/api_docs/kbn_core_injected_metadata_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser title: "@kbn/core-injected-metadata-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser'] --- import kbnCoreInjectedMetadataBrowserObj from './kbn_core_injected_metadata_browser.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 5ace041bb06c7..c7f2c060777aa 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index 25c32098ff1b2..e1b66d01654b0 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index dadce5976f4e0..e1f41dabe99be 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.devdocs.json b/api_docs/kbn_core_lifecycle_browser.devdocs.json index aec95c7c6a5f4..0d4ec8b19a102 100644 --- a/api_docs/kbn_core_lifecycle_browser.devdocs.json +++ b/api_docs/kbn_core_lifecycle_browser.devdocs.json @@ -209,10 +209,12 @@ "parentPluginId": "@kbn/core-lifecycle-browser", "id": "def-common.CoreSetup.uiSettings", "type": "Object", - "tags": [], + "tags": [ + "Deprecated" + ], "label": "uiSettings", "description": [ - "{@link IUiSettingsClient}" + "{@link IUiSettingsClient}\n" ], "signature": [ { @@ -227,6 +229,28 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/core-lifecycle-browser", + "id": "def-common.CoreSetup.settings", + "type": "Object", + "tags": [], + "label": "settings", + "description": [ + "{@link SettingsStart}" + ], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.SettingsStart", + "text": "SettingsStart" + } + ], + "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-lifecycle-browser", "id": "def-common.CoreSetup.executionContext", @@ -571,10 +595,12 @@ "parentPluginId": "@kbn/core-lifecycle-browser", "id": "def-common.CoreStart.uiSettings", "type": "Object", - "tags": [], + "tags": [ + "Deprecated" + ], "label": "uiSettings", "description": [ - "{@link IUiSettingsClient}" + "{@link IUiSettingsClient}\n" ], "signature": [ { @@ -589,6 +615,28 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/core-lifecycle-browser", + "id": "def-common.CoreStart.settings", + "type": "Object", + "tags": [], + "label": "settings", + "description": [ + "{@link SettingsStart}" + ], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.SettingsStart", + "text": "SettingsStart" + } + ], + "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-lifecycle-browser", "id": "def-common.CoreStart.fatalErrors", diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index b39cab428a922..202cf93826869 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; @@ -21,7 +21,7 @@ Contact Kibana Core for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 28 | 0 | 0 | 0 | +| 30 | 0 | 0 | 0 | ## Common diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json b/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json index 02bd77f9b7a66..aff8d6a9b0b4f 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json +++ b/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json @@ -172,7 +172,23 @@ "section": "def-common.IUiSettingsClient", "text": "IUiSettingsClient" }, - ">; savedObjects: jest.Mocked<", + ">; settings: { client: jest.Mocked<", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + }, + ">; globalClient: jest.Mocked<", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + }, + ">; }; savedObjects: jest.Mocked<", { "pluginId": "@kbn/core-saved-objects-browser", "scope": "common", @@ -236,7 +252,23 @@ "section": "def-common.IUiSettingsClient", "text": "IUiSettingsClient" }, - ">; deprecations: undefined; injectedMetadata: { getInjectedVar: jest.MockInstance & ((name: string, defaultValue?: any) => unknown); }; theme: jest.Mocked<", + ">; settings: { client: jest.Mocked<", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + }, + ">; globalClient: jest.Mocked<", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + }, + ">; }; deprecations: undefined; injectedMetadata: { getInjectedVar: jest.MockInstance & ((name: string, defaultValue?: any) => unknown); }; theme: jest.Mocked<", { "pluginId": "@kbn/core-theme-browser", "scope": "common", @@ -373,7 +405,23 @@ "section": "def-common.IUiSettingsClient", "text": "IUiSettingsClient" }, - ">; savedObjects: jest.Mocked<", + ">; settings: { client: jest.Mocked<", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + }, + ">; globalClient: jest.Mocked<", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + }, + ">; }; savedObjects: jest.Mocked<", { "pluginId": "@kbn/core-saved-objects-browser", "scope": "common", diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index 5dbfcad227a46..42e6b8934c240 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index 8caedb7ddfd6e..672040caa0499 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index c3c649c59cebb..a8901afd4a5c7 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index 497e9b7b1ed7b..2cbe09170cc78 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index 2e1c9b9b298fd..d4fbf54d20904 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index aee1bc97bdd7a..26de41f176295 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index f3bc2c1f382b1..517e66e88b75e 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index 7cec1e2bb3dc1..3c08d03d94c83 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index 68d4791981142..48624f02556b2 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index cb7d24791071b..c45d44df6c7d6 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index b8f5f6afd6f6f..496e7cabc4b6e 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index 7d64a7a3f12a5..2733ab2d6abd7 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index 3f5150096bbaa..e04ccc2485178 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index abd92ad63462a..d0343bd586ac3 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 90ea37eb5b292..a15fecedbc1fc 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index d9872071926ee..3b9825e23530e 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index c31fcc678e227..068ea73beb5c8 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index 3a6b3543d28c8..74a9cb5533e94 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index 9a39d3ff28f65..55ec31ef08a4d 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index a7ca611c3863c..d5cce1c4a9de1 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index d288f8f3b05f6..aefe154a497de 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index c1a623b2ecb13..11c46d08e672f 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index bfcfe1728c0d6..5e2f048c75ac6 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index 177be5239c8e0..3bd28ecd1eaab 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index b52065b1dc5c1..97ee8cdba4052 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index 7272cccde3593..2ccd337a0d049 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index ea065e4e02449..e271d309f5938 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index a6a14f8e1d9c9..a3c42026043ce 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index ddef17168aab8..57656a23ba32d 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index c386ed8794884..bf6439509558a 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index 1820c9f4a89ac..ddfe22e54e4b1 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index 07732d14a07ea..da68abb3cd0a5 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index 4e9c83c5d2cdc..13310806c251b 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index 45f2340ef7585..445b76871e070 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index 45378f6a4a38b..3472fb1d0e556 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_internal.mdx b/api_docs/kbn_core_saved_objects_api_server_internal.mdx index ac6e8d11d5724..573ada980ab13 100644 --- a/api_docs/kbn_core_saved_objects_api_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-internal title: "@kbn/core-saved-objects-api-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-internal'] --- import kbnCoreSavedObjectsApiServerInternalObj from './kbn_core_saved_objects_api_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index f40e0719e8ea4..84ba363fc4abf 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index 1b7dbe4fe10df..e92a126af1bc7 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index 21d3df325a07a..77048023b7e0c 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index b04abc14378d3..49fb2311c59b6 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index a3f977bd8865c..be9b42ac53903 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index b3fcfdc024010..f448abdf3e2cb 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.devdocs.json b/api_docs/kbn_core_saved_objects_common.devdocs.json index 8e671decaa977..983d666049736 100644 --- a/api_docs/kbn_core_saved_objects_common.devdocs.json +++ b/api_docs/kbn_core_saved_objects_common.devdocs.json @@ -760,11 +760,11 @@ }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts" + "path": "src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts" + "path": "src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_extract_panel_references.ts" }, { "plugin": "dashboard", @@ -816,35 +816,35 @@ }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts" + "path": "src/plugins/dashboard/common/dashboard_saved_object/persistable_state/dashboard_saved_object_references.ts" }, { "plugin": "ml", diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index 9ee1c51d79c28..c35dda2a42e3c 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index eb2e7ad8ebd58..9e5c9709fdd39 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index 775d3ee01e248..7572a2334921c 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index 929148644c9ed..c9b6050fb01c4 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index 8e78268897868..7d8ed4ab6ab1a 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.devdocs.json b/api_docs/kbn_core_saved_objects_server.devdocs.json index c01a7792188f0..40177ae597173 100644 --- a/api_docs/kbn_core_saved_objects_server.devdocs.json +++ b/api_docs/kbn_core_saved_objects_server.devdocs.json @@ -58,9 +58,9 @@ ], "signature": [ { - "pluginId": "@kbn/logging", + "pluginId": "@kbn/ecs", "scope": "server", - "docId": "kibKbnLoggingPluginApi", + "docId": "kibKbnEcsPluginApi", "section": "def-server.EcsEventOutcome", "text": "EcsEventOutcome" }, @@ -3059,11 +3059,11 @@ }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts" + "path": "src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts" + "path": "src/plugins/dashboard/server/dashboard_saved_object/migrations/migrate_to_730/migrations_730.ts" }, { "plugin": "@kbn/core-saved-objects-migration-server-internal", diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 058e96396f2a0..340ec57719a8a 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index f0da9f553826b..e9122731f70dd 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index fd0b98e723c22..c250d95d9bb92 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index 3518a0332acbd..a43dfa3595939 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index d1fedf5b80ef5..9fd68a492605d 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index 944fb65ce1c9c..7ec5660168700 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index b67c391487649..1afb674c91312 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index c66c15b251f0c..c3920856026f5 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index ae8b1a8b8c454..da4f0474c2206 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 24d46038bb29e..7d5089cf7518f 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.devdocs.json b/api_docs/kbn_core_test_helpers_http_setup_browser.devdocs.json index 2b85357c8f13d..d15212aedffd6 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.devdocs.json +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.devdocs.json @@ -129,7 +129,7 @@ "InjectedMetadataClusterInfo", ", []>; getPlugins: jest.MockInstance<", "InjectedMetadataPlugin", - "[], []>; getAnonymousStatusPage: jest.MockInstance; getLegacyMetadata: jest.MockInstance<{ uiSettings: { defaults: Record; user?: Record | undefined; }; }, []>; getInjectedVar: jest.MockInstance; getInjectedVars: jest.MockInstance<{ [key: string]: unknown; }, []>; } & ", + "[], []>; getAnonymousStatusPage: jest.MockInstance; getLegacyMetadata: jest.MockInstance<{ uiSettings: { defaults: Record; user?: Record | undefined; }; globalUiSettings: { defaults: Record; user?: Record | undefined; }; }, []>; getInjectedVar: jest.MockInstance; getInjectedVars: jest.MockInstance<{ [key: string]: unknown; }, []>; } & ", "InternalInjectedMetadataSetup" ], "path": "packages/core/test-helpers/core-test-helpers-http-setup-browser/src/http_test_setup.ts", diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index edc231fe6167f..041eb1c184ed1 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index 713e0e1b2a048..1dd2f1f348a5c 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index fd46e183794a9..22e61b2935dfd 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index 0a2b14c58f102..8852b0bc4398d 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 9e056a3c4b585..018bab1a11719 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_internal.mdx b/api_docs/kbn_core_theme_browser_internal.mdx index f77bb6252ede2..7f47cf85060ee 100644 --- a/api_docs/kbn_core_theme_browser_internal.mdx +++ b/api_docs/kbn_core_theme_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal title: "@kbn/core-theme-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-internal'] --- import kbnCoreThemeBrowserInternalObj from './kbn_core_theme_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index addf8baa23207..fda918fae7cb0 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.devdocs.json b/api_docs/kbn_core_ui_settings_browser.devdocs.json index 312846b09f5e5..62b0b1f08a943 100644 --- a/api_docs/kbn_core_ui_settings_browser.devdocs.json +++ b/api_docs/kbn_core_ui_settings_browser.devdocs.json @@ -429,6 +429,60 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.SettingsStart", + "type": "Interface", + "tags": [], + "label": "SettingsStart", + "description": [], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.SettingsStart.client", + "type": "Object", + "tags": [], + "label": "client", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + } + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.SettingsStart.globalClient", + "type": "Object", + "tags": [], + "label": "globalClient", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + } + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/core-ui-settings-browser", "id": "def-common.UiSettingsState", @@ -475,7 +529,29 @@ } ], "enums": [], - "misc": [], + "misc": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.SettingsSetup", + "type": "Type", + "tags": [], + "label": "SettingsSetup", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.SettingsStart", + "text": "SettingsStart" + } + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], "objects": [] } } \ No newline at end of file diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index 8eb92c6c29f93..95909bf0f4ece 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; @@ -21,10 +21,13 @@ Contact Kibana Core for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 25 | 1 | 13 | 0 | +| 29 | 1 | 17 | 0 | ## Common ### Interfaces +### Consts, variables and types + + diff --git a/api_docs/kbn_core_ui_settings_browser_internal.devdocs.json b/api_docs/kbn_core_ui_settings_browser_internal.devdocs.json index ce945a9de4752..c4ff0d9c22d32 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.devdocs.json +++ b/api_docs/kbn_core_ui_settings_browser_internal.devdocs.json @@ -121,6 +121,103 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsService", + "type": "Class", + "tags": [ + "Internal", + "Deprecated" + ], + "label": "UiSettingsService", + "description": [], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsService.setup", + "type": "Function", + "tags": [], + "label": "setup", + "description": [], + "signature": [ + "({ http, injectedMetadata }: ", + "UiSettingsServiceDeps", + ") => ", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + } + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsService.setup.$1", + "type": "Object", + "tags": [], + "label": "{ http, injectedMetadata }", + "description": [], + "signature": [ + "UiSettingsServiceDeps" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsService.start", + "type": "Function", + "tags": [], + "label": "start", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + } + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsService.stop", + "type": "Function", + "tags": [], + "label": "stop", + "description": [], + "signature": [ + "() => void" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false } ], "functions": [], diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index aed3b3ea686f6..c604349c6b7ea 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; @@ -21,7 +21,7 @@ Contact Kibana Core for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 6 | 1 | 6 | 2 | +| 11 | 1 | 11 | 3 | ## Common diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.devdocs.json b/api_docs/kbn_core_ui_settings_browser_mocks.devdocs.json index 36d284b3d050c..cc729a537edb9 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.devdocs.json +++ b/api_docs/kbn_core_ui_settings_browser_mocks.devdocs.json @@ -23,6 +23,100 @@ "enums": [], "misc": [], "objects": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-mocks", + "id": "def-common.settingsServiceMock", + "type": "Object", + "tags": [], + "label": "settingsServiceMock", + "description": [], + "path": "packages/core/ui-settings/core-ui-settings-browser-mocks/src/settings_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-mocks", + "id": "def-common.settingsServiceMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => any" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-mocks/src/settings_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-mocks", + "id": "def-common.settingsServiceMock.createSetupContract", + "type": "Function", + "tags": [], + "label": "createSetupContract", + "description": [], + "signature": [ + "() => { client: jest.Mocked<", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + }, + ">; globalClient: jest.Mocked<", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + }, + ">; }" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-mocks/src/settings_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-mocks", + "id": "def-common.settingsServiceMock.createStartContract", + "type": "Function", + "tags": [], + "label": "createStartContract", + "description": [], + "signature": [ + "() => { client: jest.Mocked<", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + }, + ">; globalClient: jest.Mocked<", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + }, + ">; }" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-mocks/src/settings_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/core-ui-settings-browser-mocks", "id": "def-common.uiSettingsServiceMock", @@ -42,7 +136,7 @@ "label": "create", "description": [], "signature": [ - "() => jest.Mocked" + "() => any" ], "path": "packages/core/ui-settings/core-ui-settings-browser-mocks/src/ui_settings_service.mock.ts", "deprecated": false, diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index 7b3f2b792bbd6..2687e7287c052 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; @@ -21,7 +21,7 @@ Contact Kibana Core for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 4 | 0 | 4 | 0 | +| 8 | 0 | 8 | 0 | ## Common diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 0fe09eb2fdbe3..68da8cc9a72ad 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index a30142653f61f..53b64c38f5223 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index 0c288515169b2..cb7600fa57aeb 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index a4997c5217abc..7dd1fe9b2ef80 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index 8059ceb401b92..f895d15c8f0a8 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index 770d668322507..a14c69c09aa8d 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index a18c8b25b7699..0f21fd3a41dbb 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index f5abec34c91f0..0ec5a65affeb4 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index 70d982d3fcf90..35660b45c08da 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index bec6da45afce8..84262c02b8309 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index 590b242e15c71..cc51a043d63e2 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 38598fead9151..1cb6d4ae3d002 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index c145a291d2b6c..13c93864d004d 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index 6d7c4ea295666..35672c983875e 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index 365342a2ddf99..974d2ba08474d 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 672456a2f43c3..6980ed1b6016a 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index c7922117596ee..c15da8a640e64 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs.devdocs.json b/api_docs/kbn_ecs.devdocs.json new file mode 100644 index 0000000000000..161ef1f269435 --- /dev/null +++ b/api_docs/kbn_ecs.devdocs.json @@ -0,0 +1,178 @@ +{ + "id": "@kbn/ecs", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/ecs", + "id": "def-server.Ecs", + "type": "Type", + "tags": [], + "label": "Ecs", + "description": [ + "\nRepresents the full ECS schema.\n" + ], + "signature": [ + "EcsBase", + " & ", + "EcsTracing", + " & { ecs: EcsField; agent?: ", + "EcsAgent", + " | undefined; as?: ", + "EcsAutonomousSystem", + " | undefined; client?: ", + "EcsClient", + " | undefined; cloud?: ", + "EcsCloud", + " | undefined; container?: ", + "EcsContainer", + " | undefined; data_stream?: ", + "EcsDataStream", + " | undefined; destination?: ", + "EcsDestination", + " | undefined; dns?: ", + "EcsDns", + " | undefined; email?: ", + "EcsEmail", + " | undefined; error?: ", + "EcsError", + " | undefined; event?: ", + "EcsEvent", + " | undefined; faas?: ", + "EcsFaas", + " | undefined; file?: ", + "EcsFile", + " | undefined; group?: ", + "EcsGroup", + " | undefined; host?: ", + "EcsHost", + " | undefined; http?: ", + "EcsHttp", + " | undefined; log?: ", + "EcsLog", + " | undefined; network?: ", + "EcsNetwork", + " | undefined; observer?: ", + "EcsObserver", + " | undefined; orchestrator?: ", + "EcsOrchestrator", + " | undefined; organization?: ", + "EcsOrganization", + " | undefined; package?: ", + "EcsPackage", + " | undefined; process?: ", + "EcsProcess", + " | undefined; registry?: ", + "EcsRegistry", + " | undefined; related?: ", + "EcsRelated", + " | undefined; rule?: ", + "EcsRule", + " | undefined; server?: ", + "EcsServer", + " | undefined; service?: ", + "EcsService", + " | undefined; source?: ", + "EcsSource", + " | undefined; threat?: ", + "EcsThreat", + " | undefined; tls?: ", + "EcsTls", + " | undefined; url?: ", + "EcsUrl", + " | undefined; user?: ", + "EcsUser", + " | undefined; user_agent?: ", + "EcsUserAgent", + " | undefined; vulnerability?: ", + "EcsVulnerability", + " | undefined; }" + ], + "path": "packages/kbn-ecs/src/ecs/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/ecs", + "id": "def-server.EcsEventCategory", + "type": "Type", + "tags": [], + "label": "EcsEventCategory", + "description": [], + "signature": [ + "\"host\" | \"database\" | \"email\" | \"package\" | \"network\" | \"web\" | \"file\" | \"session\" | \"registry\" | \"process\" | \"authentication\" | \"configuration\" | \"driver\" | \"iam\" | \"intrusion_detection\" | \"malware\"" + ], + "path": "packages/kbn-ecs/src/ecs/event.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/ecs", + "id": "def-server.EcsEventKind", + "type": "Type", + "tags": [], + "label": "EcsEventKind", + "description": [], + "signature": [ + "\"metric\" | \"alert\" | \"signal\" | \"state\" | \"event\" | \"pipeline_error\"" + ], + "path": "packages/kbn-ecs/src/ecs/event.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/ecs", + "id": "def-server.EcsEventOutcome", + "type": "Type", + "tags": [], + "label": "EcsEventOutcome", + "description": [], + "signature": [ + "\"success\" | \"unknown\" | \"failure\"" + ], + "path": "packages/kbn-ecs/src/ecs/event.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/ecs", + "id": "def-server.EcsEventType", + "type": "Type", + "tags": [], + "label": "EcsEventType", + "description": [], + "signature": [ + "\"start\" | \"error\" | \"connection\" | \"user\" | \"info\" | \"group\" | \"end\" | \"admin\" | \"protocol\" | \"access\" | \"allowed\" | \"change\" | \"creation\" | \"deletion\" | \"denied\" | \"installation\"" + ], + "path": "packages/kbn-ecs/src/ecs/event.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_ecs.mdx b/api_docs/kbn_ecs.mdx new file mode 100644 index 0000000000000..4086cb00f8adf --- /dev/null +++ b/api_docs/kbn_ecs.mdx @@ -0,0 +1,30 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnEcsPluginApi +slug: /kibana-dev-docs/api/kbn-ecs +title: "@kbn/ecs" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/ecs plugin +date: 2022-12-19 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs'] +--- +import kbnEcsObj from './kbn_ecs.devdocs.json'; + + + +Contact Kibana Core for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 5 | 0 | 4 | 37 | + +## Server + +### Consts, variables and types + + diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 5eddad838e282..915d748ac9bd5 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 8255c40f1c665..519d4dbfd4587 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index 1e6fe11aae1f8..66d841b40ac1c 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index f4e5edeaacbb7..4f4ab188bec84 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 8d9b903640fd4..8187e89551b1d 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index c68768f9447a7..baf3287c90516 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 011add756673f..52d8b5e105018 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 3ffd1e16ddc46..541bf851c33ee 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index 8ccfadadfa55d..88eab33246f01 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index a15b59ce98113..e9519b4d8a6ec 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_get_repo_files.mdx b/api_docs/kbn_get_repo_files.mdx index a2728482ea92c..07cf276e22e72 100644 --- a/api_docs/kbn_get_repo_files.mdx +++ b/api_docs/kbn_get_repo_files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-get-repo-files title: "@kbn/get-repo-files" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/get-repo-files plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/get-repo-files'] --- import kbnGetRepoFilesObj from './kbn_get_repo_files.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index 2d977062ca6d0..7bb6e1ee0212e 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index d705e13aa34f2..60313a4acaa6c 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index eb85576e5f28c..04ced3f69aaad 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index c1824eec5ccc1..504aaff37622c 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index 8fdd0aedbb7be..4f72351f61c45 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index 4beb255a45b63..4d716dbf81496 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index 12e8d0a338c88..6bc49f4c57040 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index 31f691de68164..b7189e763b31a 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index a45d22024c65d..99b12c47578fb 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 61a17ca410d7e..40e1062458edf 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.devdocs.json b/api_docs/kbn_io_ts_utils.devdocs.json index d6bef46b1ce92..1ffbfca120dda 100644 --- a/api_docs/kbn_io_ts_utils.devdocs.json +++ b/api_docs/kbn_io_ts_utils.devdocs.json @@ -19,6 +19,41 @@ "common": { "classes": [], "functions": [ + { + "parentPluginId": "@kbn/io-ts-utils", + "id": "def-common.createLiteralValueFromUndefinedRT", + "type": "Function", + "tags": [], + "label": "createLiteralValueFromUndefinedRT", + "description": [], + "signature": [ + "(literalValue: LiteralValue) => ", + "Type", + "" + ], + "path": "packages/kbn-io-ts-utils/src/literal_value_from_undefined_rt/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/io-ts-utils", + "id": "def-common.createLiteralValueFromUndefinedRT.$1", + "type": "Uncategorized", + "tags": [], + "label": "literalValue", + "description": [], + "signature": [ + "LiteralValue" + ], + "path": "packages/kbn-io-ts-utils/src/literal_value_from_undefined_rt/index.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/io-ts-utils", "id": "def-common.deepExactRt", diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index c41905b75f553..6db565a62a420 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 22 | 0 | 22 | 3 | +| 24 | 0 | 24 | 3 | ## Common diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index d44286fdcefd4..0fd889f000209 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index acc2de4a379b3..68ded90705bf9 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 330b4ced21392..c5c7499caab16 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index fb276c9ef9d54..038855e8feec6 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_logging.devdocs.json b/api_docs/kbn_logging.devdocs.json index c4b55ec411dce..82e13202130ec 100644 --- a/api_docs/kbn_logging.devdocs.json +++ b/api_docs/kbn_logging.devdocs.json @@ -583,156 +583,6 @@ ], "enums": [], "misc": [ - { - "parentPluginId": "@kbn/logging", - "id": "def-server.Ecs", - "type": "Type", - "tags": [], - "label": "Ecs", - "description": [ - "\nRepresents the full ECS schema.\n" - ], - "signature": [ - "EcsBase", - " & ", - "EcsTracing", - " & { ecs: EcsField; agent?: ", - "EcsAgent", - " | undefined; as?: ", - "EcsAutonomousSystem", - " | undefined; client?: ", - "EcsClient", - " | undefined; cloud?: ", - "EcsCloud", - " | undefined; container?: ", - "EcsContainer", - " | undefined; data_stream?: ", - "EcsDataStream", - " | undefined; destination?: ", - "EcsDestination", - " | undefined; dns?: ", - "EcsDns", - " | undefined; email?: ", - "EcsEmail", - " | undefined; error?: ", - "EcsError", - " | undefined; event?: ", - "EcsEvent", - " | undefined; faas?: ", - "EcsFaas", - " | undefined; file?: ", - "EcsFile", - " | undefined; group?: ", - "EcsGroup", - " | undefined; host?: ", - "EcsHost", - " | undefined; http?: ", - "EcsHttp", - " | undefined; log?: ", - "EcsLog", - " | undefined; network?: ", - "EcsNetwork", - " | undefined; observer?: ", - "EcsObserver", - " | undefined; orchestrator?: ", - "EcsOrchestrator", - " | undefined; organization?: ", - "EcsOrganization", - " | undefined; package?: ", - "EcsPackage", - " | undefined; process?: ", - "EcsProcess", - " | undefined; registry?: ", - "EcsRegistry", - " | undefined; related?: ", - "EcsRelated", - " | undefined; rule?: ", - "EcsRule", - " | undefined; server?: ", - "EcsServer", - " | undefined; service?: ", - "EcsService", - " | undefined; source?: ", - "EcsSource", - " | undefined; threat?: ", - "EcsThreat", - " | undefined; tls?: ", - "EcsTls", - " | undefined; url?: ", - "EcsUrl", - " | undefined; user?: ", - "EcsUser", - " | undefined; user_agent?: ", - "EcsUserAgent", - " | undefined; vulnerability?: ", - "EcsVulnerability", - " | undefined; }" - ], - "path": "packages/kbn-logging/src/ecs/index.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/logging", - "id": "def-server.EcsEventCategory", - "type": "Type", - "tags": [], - "label": "EcsEventCategory", - "description": [], - "signature": [ - "\"host\" | \"database\" | \"email\" | \"package\" | \"network\" | \"web\" | \"file\" | \"session\" | \"registry\" | \"process\" | \"authentication\" | \"configuration\" | \"driver\" | \"iam\" | \"intrusion_detection\" | \"malware\"" - ], - "path": "packages/kbn-logging/src/ecs/event.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/logging", - "id": "def-server.EcsEventKind", - "type": "Type", - "tags": [], - "label": "EcsEventKind", - "description": [], - "signature": [ - "\"metric\" | \"alert\" | \"signal\" | \"state\" | \"event\" | \"pipeline_error\"" - ], - "path": "packages/kbn-logging/src/ecs/event.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/logging", - "id": "def-server.EcsEventOutcome", - "type": "Type", - "tags": [], - "label": "EcsEventOutcome", - "description": [], - "signature": [ - "\"success\" | \"unknown\" | \"failure\"" - ], - "path": "packages/kbn-logging/src/ecs/event.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/logging", - "id": "def-server.EcsEventType", - "type": "Type", - "tags": [], - "label": "EcsEventType", - "description": [], - "signature": [ - "\"start\" | \"error\" | \"connection\" | \"user\" | \"info\" | \"group\" | \"end\" | \"admin\" | \"protocol\" | \"access\" | \"allowed\" | \"change\" | \"creation\" | \"deletion\" | \"denied\" | \"installation\"" - ], - "path": "packages/kbn-logging/src/ecs/event.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "@kbn/logging", "id": "def-server.LogMeta", diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index 15051c2a89250..5a0f39e270d14 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; @@ -21,7 +21,7 @@ Contact Kibana Core for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 32 | 0 | 5 | 39 | +| 27 | 0 | 1 | 2 | ## Server diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index 70e85bdbbc853..7d1ad8ac6c59f 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index 4bcee17ed7cbb..022f0ae822ff7 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 709226972469e..e3fc07ecc0e02 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 6067aec8fc495..3441c6bbab497 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index 5ad757518c07a..da5e56431bd86 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index b8acedb030ea9..2b17074ace877 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 7b4b3798e84b8..1be624bd1f9eb 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index c92030887c831..9bc7303759d95 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index 817745fab0282..f59a7e1df2e60 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index b122b04f8c2bf..01c51a68e033c 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_peggy.mdx b/api_docs/kbn_peggy.mdx index b9dfba62c7c4a..45d7104ba481b 100644 --- a/api_docs/kbn_peggy.mdx +++ b/api_docs/kbn_peggy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-peggy title: "@kbn/peggy" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/peggy plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/peggy'] --- import kbnPeggyObj from './kbn_peggy.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index a963292b481d7..56651bdaa727f 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 453e04539ae66..86c771b4f76e0 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 242a53b6fbba3..fb2f0d3843c7c 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 033f322d5005f..293b61c515d11 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 3698718faa9c0..dbfb09ce10d6d 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index cde337c735029..ef1f05d58c4da 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.devdocs.json b/api_docs/kbn_rule_data_utils.devdocs.json index 5e6f6cf54b5bb..02fdc483391ff 100644 --- a/api_docs/kbn_rule_data_utils.devdocs.json +++ b/api_docs/kbn_rule_data_utils.devdocs.json @@ -208,6 +208,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.ALERT_CASE_IDS", + "type": "string", + "tags": [], + "label": "ALERT_CASE_IDS", + "description": [], + "signature": [ + "\"kibana.alert.case_ids\"" + ], + "path": "packages/kbn-rule-data-utils/src/technical_field_names.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/rule-data-utils", "id": "def-common.ALERT_DURATION", @@ -1401,7 +1416,7 @@ "label": "TechnicalRuleDataFieldName", "description": [], "signature": [ - "\"tags\" | \"kibana\" | \"@timestamp\" | \"event.action\" | \"kibana.alert.rule.execution.uuid\" | \"kibana.alert.rule.rule_type_id\" | \"kibana.alert.rule.consumer\" | \"kibana.alert\" | \"kibana.alert.rule\" | \"kibana.alert.rule.parameters\" | \"kibana.alert.rule.producer\" | \"kibana.space_ids\" | \"kibana.alert.uuid\" | \"kibana.alert.instance.id\" | \"kibana.alert.start\" | \"kibana.alert.time_range\" | \"kibana.alert.end\" | \"kibana.alert.duration.us\" | \"kibana.alert.severity\" | \"kibana.alert.status\" | \"kibana.alert.flapping\" | \"kibana.version\" | \"ecs.version\" | \"kibana.alert.risk_score\" | \"kibana.alert.workflow_status\" | \"kibana.alert.workflow_user\" | \"kibana.alert.workflow_reason\" | \"kibana.alert.system_status\" | \"kibana.alert.action_group\" | \"kibana.alert.reason\" | \"kibana.alert.rule.author\" | \"kibana.alert.rule.category\" | \"kibana.alert.rule.uuid\" | \"kibana.alert.rule.created_at\" | \"kibana.alert.rule.created_by\" | \"kibana.alert.rule.description\" | \"kibana.alert.rule.enabled\" | \"kibana.alert.rule.from\" | \"kibana.alert.rule.interval\" | \"kibana.alert.rule.license\" | \"kibana.alert.rule.name\" | \"kibana.alert.rule.note\" | \"kibana.alert.rule.references\" | \"kibana.alert.rule.rule_id\" | \"kibana.alert.rule.rule_name_override\" | \"kibana.alert.rule.tags\" | \"kibana.alert.rule.to\" | \"kibana.alert.rule.type\" | \"kibana.alert.rule.updated_at\" | \"kibana.alert.rule.updated_by\" | \"kibana.alert.rule.version\" | \"kibana.alert.suppression.terms\" | \"kibana.alert.suppression.terms.field\" | \"kibana.alert.suppression.terms.value\" | \"kibana.alert.suppression.start\" | \"kibana.alert.suppression.end\" | \"kibana.alert.suppression.docs_count\" | \"event.kind\" | \"event.module\" | \"kibana.alert.evaluation.threshold\" | \"kibana.alert.evaluation.value\" | \"kibana.alert.building_block_type\" | \"kibana.alert.rule.exceptions_list\" | \"kibana.alert.rule.namespace\" | \"kibana.alert.rule.threat.framework\" | \"kibana.alert.rule.threat.tactic.id\" | \"kibana.alert.rule.threat.tactic.name\" | \"kibana.alert.rule.threat.tactic.reference\" | \"kibana.alert.rule.threat.technique.id\" | \"kibana.alert.rule.threat.technique.name\" | \"kibana.alert.rule.threat.technique.reference\" | \"kibana.alert.rule.threat.technique.subtechnique.id\" | \"kibana.alert.rule.threat.technique.subtechnique.name\" | \"kibana.alert.rule.threat.technique.subtechnique.reference\"" + "\"tags\" | \"kibana\" | \"@timestamp\" | \"event.action\" | \"kibana.alert.rule.execution.uuid\" | \"kibana.alert.rule.rule_type_id\" | \"kibana.alert.rule.consumer\" | \"kibana.alert\" | \"kibana.alert.rule\" | \"kibana.alert.rule.parameters\" | \"kibana.alert.rule.producer\" | \"kibana.space_ids\" | \"kibana.alert.uuid\" | \"kibana.alert.instance.id\" | \"kibana.alert.start\" | \"kibana.alert.time_range\" | \"kibana.alert.end\" | \"kibana.alert.duration.us\" | \"kibana.alert.severity\" | \"kibana.alert.status\" | \"kibana.alert.flapping\" | \"kibana.version\" | \"ecs.version\" | \"kibana.alert.risk_score\" | \"kibana.alert.workflow_status\" | \"kibana.alert.workflow_user\" | \"kibana.alert.workflow_reason\" | \"kibana.alert.system_status\" | \"kibana.alert.action_group\" | \"kibana.alert.reason\" | \"kibana.alert.case_ids\" | \"kibana.alert.rule.author\" | \"kibana.alert.rule.category\" | \"kibana.alert.rule.uuid\" | \"kibana.alert.rule.created_at\" | \"kibana.alert.rule.created_by\" | \"kibana.alert.rule.description\" | \"kibana.alert.rule.enabled\" | \"kibana.alert.rule.from\" | \"kibana.alert.rule.interval\" | \"kibana.alert.rule.license\" | \"kibana.alert.rule.name\" | \"kibana.alert.rule.note\" | \"kibana.alert.rule.references\" | \"kibana.alert.rule.rule_id\" | \"kibana.alert.rule.rule_name_override\" | \"kibana.alert.rule.tags\" | \"kibana.alert.rule.to\" | \"kibana.alert.rule.type\" | \"kibana.alert.rule.updated_at\" | \"kibana.alert.rule.updated_by\" | \"kibana.alert.rule.version\" | \"kibana.alert.suppression.terms\" | \"kibana.alert.suppression.terms.field\" | \"kibana.alert.suppression.terms.value\" | \"kibana.alert.suppression.start\" | \"kibana.alert.suppression.end\" | \"kibana.alert.suppression.docs_count\" | \"event.kind\" | \"event.module\" | \"kibana.alert.evaluation.threshold\" | \"kibana.alert.evaluation.value\" | \"kibana.alert.building_block_type\" | \"kibana.alert.rule.exceptions_list\" | \"kibana.alert.rule.namespace\" | \"kibana.alert.rule.threat.framework\" | \"kibana.alert.rule.threat.tactic.id\" | \"kibana.alert.rule.threat.tactic.name\" | \"kibana.alert.rule.threat.tactic.reference\" | \"kibana.alert.rule.threat.technique.id\" | \"kibana.alert.rule.threat.technique.name\" | \"kibana.alert.rule.threat.technique.reference\" | \"kibana.alert.rule.threat.technique.subtechnique.id\" | \"kibana.alert.rule.threat.technique.subtechnique.name\" | \"kibana.alert.rule.threat.technique.subtechnique.reference\"" ], "path": "packages/kbn-rule-data-utils/src/technical_field_names.ts", "deprecated": false, diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index f18acf004b9c9..fdf82c4ebaf55 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 96 | 0 | 93 | 0 | +| 97 | 0 | 94 | 0 | ## Common diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index f8b848846a86b..0a6d134eb0390 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index ca4327fca23ea..cd19859bb8a9d 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index 3f15d77d0c22a..901b07dffb108 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 6256412cbad37..ba704518f3aa4 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index 153d24802ac43..faa9c0bdcfbd2 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 14ef6adad86ee..bd40712f2549e 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index 09821025cbbbe..43d49558967ad 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 72977de2682ab..2322fdd4bc55e 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index b8c4848819d9c..4614a604d7ac6 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.devdocs.json b/api_docs/kbn_securitysolution_list_constants.devdocs.json index 33636a6103033..4b06a6e96b7c8 100644 --- a/api_docs/kbn_securitysolution_list_constants.devdocs.json +++ b/api_docs/kbn_securitysolution_list_constants.devdocs.json @@ -251,14 +251,6 @@ "deprecated": true, "trackAdoption": false, "references": [ - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts" @@ -311,6 +303,14 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/management/pages/event_filters/service/api_client.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/endpoint/lib/artifacts/lists.ts" diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 7fc8f6ff5495a..2f3ca398d0891 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index a1d14692e93bc..f8d217e49d873 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 922d1c3bed38f..e4e6bbd44d255 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index e8d3dab8afac5..8ba4ee8620304 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 00591486401ae..aa6da391be60c 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 8f4dd802ffba5..19fe46791acb5 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index cc1cb81958bd9..056e7af1b5a87 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 3ee61d61068de..1df12a9ec37da 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index 5ccfa05fcfbc7..8bd240a3dafbd 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index 458353153b293..b5ce21e93b1a0 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx index ba4f5af3ebc4d..e7d472df2430e 100644 --- a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx +++ b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-user-profile-components title: "@kbn/shared-ux-avatar-user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-user-profile-components plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-user-profile-components'] --- import kbnSharedUxAvatarUserProfileComponentsObj from './kbn_shared_ux_avatar_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index 535894d18b9a1..96e2d273b6657 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx index c9214bc417098..4c38237946242 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen-mocks title: "@kbn/shared-ux-button-exit-full-screen-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen-mocks'] --- import kbnSharedUxButtonExitFullScreenMocksObj from './kbn_shared_ux_button_exit_full_screen_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 1f216105de9ba..01ff67d0c8421 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index 5e03809663a94..343c7d2455377 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index 8f93358f3ecef..1a8cb9db55452 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index 78a6f38adcca5..88cdd9329013f 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context'] --- import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx index 58bf4a356f36d..f6c3b2222f10d 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image'] --- import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx index d55dcb60a7c10..d352c6a294d0b 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks'] --- import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx index 9a151f6e6ba8f..10f021f630d81 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks'] --- import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx index 4ba211834b9e7..27d117fca04f3 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util'] --- import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index 64c868e6e3f39..ac700a7bedfb9 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index 8f32505c3985e..feea6e1a141cc 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index 2d7509770dfc7..23e93ec55ea29 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index e33ed4296101b..2166c49a80530 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index b5663a9a37690..3ff966b6b56b3 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index 804e02bcc2e60..95c559adb248b 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index e38dab1ff313e..b34d7f51a0bef 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index 255bc42b313e9..62c8ccb60a3b1 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index a553d89816bda..c2a0e4bbd01df 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index f6afbd5eb95c4..4cb982e3273fe 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index a023ad568213a..cae30e936a812 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index e520307d79a2d..4bc9d6c326d3b 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index 50a1fc0796bd2..62b4f763f5048 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index a42ba00ab88ae..a040de01964cf 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index 28f6d73c284b5..de1a3fa83a89b 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index ea8baf1caa33e..0f512561cb2cf 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index 158863c72c867..ac95aba4ab510 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index 23284cc33cdc0..9d65c5285faac 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found'] --- import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index e832ba90f7c0f..245a31755891c 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index 8bc1adb2947d8..b3715a2c47404 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index bb2ebc1af4be9..6bb393de688f6 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index 72c13e9c32a41..aefe3c6212c12 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 681945a2dedc2..d13f831531fc7 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 1ff6f3fe4c608..31153cfed22ae 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_package_json.mdx b/api_docs/kbn_sort_package_json.mdx index fafd5222ebca6..f546c7979c3ad 100644 --- a/api_docs/kbn_sort_package_json.mdx +++ b/api_docs/kbn_sort_package_json.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-package-json title: "@kbn/sort-package-json" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-package-json plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-package-json'] --- import kbnSortPackageJsonObj from './kbn_sort_package_json.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index ccca313fd0b1e..73db87176f065 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index d72dd1355a7ce..ae89f4a2dbaff 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index 933eb9ccffea6..edd6f369f6c4c 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index e97be58439a9a..33fb5832312ae 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index a22ccbe4a750a..b22dfd8cbb80e 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 896d38b052882..2af333c5df418 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index 8c883152d4c17..102939154a183 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index e3ca461de4c33..10bcb686fe5e9 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer.mdx b/api_docs/kbn_type_summarizer.mdx index aad25cadde895..8c3a086534bdb 100644 --- a/api_docs/kbn_type_summarizer.mdx +++ b/api_docs/kbn_type_summarizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer title: "@kbn/type-summarizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer'] --- import kbnTypeSummarizerObj from './kbn_type_summarizer.devdocs.json'; diff --git a/api_docs/kbn_type_summarizer_core.mdx b/api_docs/kbn_type_summarizer_core.mdx index 0277db1f3b47d..d161f612db9d3 100644 --- a/api_docs/kbn_type_summarizer_core.mdx +++ b/api_docs/kbn_type_summarizer_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer-core title: "@kbn/type-summarizer-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/type-summarizer-core plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer-core'] --- import kbnTypeSummarizerCoreObj from './kbn_type_summarizer_core.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index a4100dc0d0494..e53680ec54f67 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index 05e0217cb438c..41406cb76bdbd 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 86dfb083a68d7..7f1b7f8ad5753 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index 27218f9634b17..1f9af806acf70 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 1246cebf09e9b..019d9645672b1 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index 24311ab5c297a..461696662bc25 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index ee944d150a207..c2198ec85a251 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index 1d7a3b7c98490..e5f6da1a82c4e 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index d5a080693fcb8..27e4d54fa6ec5 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.devdocs.json b/api_docs/kibana_react.devdocs.json index 97ad6547643bd..8ed0bf40a4098 100644 --- a/api_docs/kibana_react.devdocs.json +++ b/api_docs/kibana_react.devdocs.json @@ -3302,6 +3302,14 @@ "section": "def-common.IUiSettingsClient", "text": "IUiSettingsClient" }, + " | undefined; settings?: ", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.SettingsStart", + "text": "SettingsStart" + }, " | undefined; fatalErrors?: ", { "pluginId": "@kbn/core-fatal-errors-browser", diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 1a5685c2ba56f..210675dae533c 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index bdb3368ccfe03..1b278651cb7d6 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index 73be637c8b55a..893ea884909bc 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.devdocs.json b/api_docs/lens.devdocs.json index 30753b6ceae20..e41d0eeb3f8da 100644 --- a/api_docs/lens.devdocs.json +++ b/api_docs/lens.devdocs.json @@ -9338,6 +9338,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "lens", + "id": "def-public.LENS_EMBEDDABLE_TYPE", + "type": "string", + "tags": [], + "label": "LENS_EMBEDDABLE_TYPE", + "description": [], + "signature": [ + "\"lens\"" + ], + "path": "x-pack/plugins/lens/common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "lens", "id": "def-public.LensEmbeddableInput", diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 7ebb44c161712..c77cfd90650af 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-visualization | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 694 | 0 | 598 | 50 | +| 695 | 0 | 599 | 50 | ## Client diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index e842258298305..fb0e02d2ad2ce 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index 4ba5de7ce3f21..c7c658d2dd271 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index e49b9998f22a7..340af45ca3dde 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index b290cf013ca85..73f376c20957e 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 79f43d14fe9cc..2d4879b74b7f2 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 804e4e4c46800..0c7b2b21621c2 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 4b0b12d0e940a..d22af86f594be 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 14dbc8fdb9f6b..b9869a16cb43e 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index 1e3fb18b74ad0..b41f347a51d94 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index aca427dda1cf4..1919198e89cc9 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index d06437a3cdc75..2fbda74a9425a 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index 84ea320d18735..5e46a2f57e74e 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index b078a0d4d579e..c494d12518e73 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index 69292c8238dcb..786ceac2aa929 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -849,7 +849,7 @@ { "parentPluginId": "observability", "id": "def-public.ObservabilityAlertSearchBar.$1", - "type": "CompoundType", + "type": "Object", "tags": [], "label": "props", "description": [], @@ -865,43 +865,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "observability", - "id": "def-public.ObservabilityAlertSearchBarProvider", - "type": "Function", - "tags": [], - "label": "ObservabilityAlertSearchBarProvider", - "description": [], - "signature": [ - "({ children, data: { query: { timefilter: { timefilter: timeFilterService }, }, }, useToasts, triggersActionsUi: { getAlertsSearchBar: AlertsSearchBar }, }: React.PropsWithChildren<", - "Dependencies", - ">) => JSX.Element" - ], - "path": "x-pack/plugins/observability/public/components/shared/alert_search_bar/services.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "observability", - "id": "def-public.ObservabilityAlertSearchBarProvider.$1", - "type": "CompoundType", - "tags": [], - "label": "{\n children,\n data: {\n query: {\n timefilter: { timefilter: timeFilterService },\n },\n },\n useToasts,\n triggersActionsUi: { getAlertsSearchBar: AlertsSearchBar },\n}", - "description": [], - "signature": [ - "React.PropsWithChildren<", - "Dependencies", - ">" - ], - "path": "x-pack/plugins/observability/public/components/shared/alert_search_bar/services.tsx", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "observability", "id": "def-public.Prompt", @@ -4073,7 +4036,7 @@ "label": "format", "description": [], "signature": [ - "(options: { fields: OutputOf> & Record; formatters: { asDuration: (value: ", + "(options: { fields: OutputOf> & Record; formatters: { asDuration: (value: ", "Maybe", ", { defaultValue, extended }?: FormatterOptions) => string; asPercent: (numerator: ", "Maybe", @@ -4092,7 +4055,7 @@ "label": "options", "description": [], "signature": [ - "{ fields: OutputOf> & Record; formatters: { asDuration: (value: ", + "{ fields: OutputOf> & Record; formatters: { asDuration: (value: ", "Maybe", ", { defaultValue, extended }?: FormatterOptions) => string; asPercent: (numerator: ", "Maybe", @@ -5799,7 +5762,7 @@ "label": "ObservabilityRuleTypeFormatter", "description": [], "signature": [ - "(options: { fields: OutputOf> & Record; formatters: { asDuration: (value: ", + "(options: { fields: OutputOf> & Record; formatters: { asDuration: (value: ", "Maybe", ", { defaultValue, extended }?: FormatterOptions) => string; asPercent: (numerator: ", "Maybe", @@ -5818,7 +5781,7 @@ "label": "options", "description": [], "signature": [ - "{ fields: OutputOf> & Record; formatters: { asDuration: (value: ", + "{ fields: OutputOf> & Record; formatters: { asDuration: (value: ", "Maybe", ", { defaultValue, extended }?: FormatterOptions) => string; asPercent: (numerator: ", "Maybe", @@ -7614,6 +7577,1291 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "observability", + "id": "def-server.createOrUpdateIndexTemplate", + "type": "Function", + "tags": [], + "label": "createOrUpdateIndexTemplate", + "description": [], + "signature": [ + "({\n indexTemplate,\n client,\n logger,\n}: { indexTemplate: ", + "IndicesPutIndexTemplateRequest", + "; client: ", + { + "pluginId": "@kbn/core-elasticsearch-server", + "scope": "server", + "docId": "kibKbnCoreElasticsearchServerPluginApi", + "section": "def-server.ElasticsearchClient", + "text": "ElasticsearchClient" + }, + "; logger: ", + { + "pluginId": "@kbn/logging", + "scope": "server", + "docId": "kibKbnLoggingPluginApi", + "section": "def-server.Logger", + "text": "Logger" + }, + "; }) => Promise<", + "AcknowledgedResponseBase", + " | undefined>" + ], + "path": "x-pack/plugins/observability/server/utils/create_or_update_index_template.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "observability", + "id": "def-server.createOrUpdateIndexTemplate.$1", + "type": "Object", + "tags": [], + "label": "{\n indexTemplate,\n client,\n logger,\n}", + "description": [], + "path": "x-pack/plugins/observability/server/utils/create_or_update_index_template.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "observability", + "id": "def-server.createOrUpdateIndexTemplate.$1.indexTemplate", + "type": "Object", + "tags": [], + "label": "indexTemplate", + "description": [], + "signature": [ + "IndicesPutIndexTemplateRequest" + ], + "path": "x-pack/plugins/observability/server/utils/create_or_update_index_template.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "observability", + "id": "def-server.createOrUpdateIndexTemplate.$1.client", + "type": "Object", + "tags": [], + "label": "client", + "description": [], + "signature": [ + "{ name: string | symbol; get: { (this: That, params: ", + "GetRequest", + " | ", + "GetRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "GetResponse", + ">; (this: That, params: ", + "GetRequest", + " | ", + "GetRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "GetResponse", + ", unknown>>; (this: That, params: ", + "GetRequest", + " | ", + "GetRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "GetResponse", + ">; }; delete: { (this: That, params: ", + "DeleteRequest", + " | ", + "DeleteRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "WriteResponseBase", + ">; (this: That, params: ", + "DeleteRequest", + " | ", + "DeleteRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "WriteResponseBase", + ", unknown>>; (this: That, params: ", + "DeleteRequest", + " | ", + "DeleteRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "WriteResponseBase", + ">; }; cluster: ", + "default", + "; eql: ", + "default", + "; search: { >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchResponse", + ">; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchResponse", + ", unknown>>; >(this: That, params?: ", + "SearchRequest", + " | ", + "SearchRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchResponse", + ">; }; create: { (this: That, params: ", + "CreateRequest", + " | ", + "CreateRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "WriteResponseBase", + ">; (this: That, params: ", + "CreateRequest", + " | ", + "CreateRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "WriteResponseBase", + ", unknown>>; (this: That, params: ", + "CreateRequest", + " | ", + "CreateRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "WriteResponseBase", + ">; }; monitoring: ", + "default", + "; security: ", + "default", + "; index: { (this: That, params: ", + "IndexRequest", + " | ", + "IndexRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "WriteResponseBase", + ">; (this: That, params: ", + "IndexRequest", + " | ", + "IndexRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "WriteResponseBase", + ", unknown>>; (this: That, params: ", + "IndexRequest", + " | ", + "IndexRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "WriteResponseBase", + ">; }; update: { (this: That, params: ", + "UpdateRequest", + " | ", + "UpdateRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "UpdateResponse", + ">; (this: That, params: ", + "UpdateRequest", + " | ", + "UpdateRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "UpdateResponse", + ", unknown>>; (this: That, params: ", + "UpdateRequest", + " | ", + "UpdateRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "UpdateResponse", + ">; }; asyncSearch: ", + "default", + "; [kAsyncSearch]: symbol | null; [kAutoscaling]: symbol | null; [kCat]: symbol | null; [kCcr]: symbol | null; [kCluster]: symbol | null; [kDanglingIndices]: symbol | null; [kEnrich]: symbol | null; [kEql]: symbol | null; [kFeatures]: symbol | null; [kFleet]: symbol | null; [kGraph]: symbol | null; [kIlm]: symbol | null; [kIndices]: symbol | null; [kIngest]: symbol | null; [kLicense]: symbol | null; [kLogstash]: symbol | null; [kMigration]: symbol | null; [kMl]: symbol | null; [kMonitoring]: symbol | null; [kNodes]: symbol | null; [kRollup]: symbol | null; [kSearchableSnapshots]: symbol | null; [kSecurity]: symbol | null; [kShutdown]: symbol | null; [kSlm]: symbol | null; [kSnapshot]: symbol | null; [kSql]: symbol | null; [kSsl]: symbol | null; [kTasks]: symbol | null; [kTextStructure]: symbol | null; [kTransform]: symbol | null; [kWatcher]: symbol | null; [kXpack]: symbol | null; transport: ", + "default", + "; helpers: ", + "default", + "; child: (opts: ", + "ClientOptions", + ") => ", + "default", + "; autoscaling: ", + "default", + "; bulk: { (this: That, params: ", + "BulkRequest", + " | ", + "BulkRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "BulkResponse", + ">; (this: That, params: ", + "BulkRequest", + " | ", + "BulkRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "BulkResponse", + ", unknown>>; (this: That, params: ", + "BulkRequest", + " | ", + "BulkRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "BulkResponse", + ">; }; cat: ", + "default", + "; ccr: ", + "default", + "; clearScroll: { (this: That, params?: ", + "ClearScrollRequest", + " | ", + "ClearScrollRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ClearScrollResponse", + ">; (this: That, params?: ", + "ClearScrollRequest", + " | ", + "ClearScrollRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ClearScrollResponse", + ", unknown>>; (this: That, params?: ", + "ClearScrollRequest", + " | ", + "ClearScrollRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ClearScrollResponse", + ">; }; closePointInTime: { (this: That, params: ", + "ClosePointInTimeRequest", + " | ", + "ClosePointInTimeRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ClosePointInTimeResponse", + ">; (this: That, params: ", + "ClosePointInTimeRequest", + " | ", + "ClosePointInTimeRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ClosePointInTimeResponse", + ", unknown>>; (this: That, params: ", + "ClosePointInTimeRequest", + " | ", + "ClosePointInTimeRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ClosePointInTimeResponse", + ">; }; count: { (this: That, params?: ", + "CountRequest", + " | ", + "CountRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "CountResponse", + ">; (this: That, params?: ", + "CountRequest", + " | ", + "CountRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "CountResponse", + ", unknown>>; (this: That, params?: ", + "CountRequest", + " | ", + "CountRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "CountResponse", + ">; }; danglingIndices: ", + "default", + "; deleteByQuery: { (this: That, params: ", + "DeleteByQueryRequest", + " | ", + "DeleteByQueryRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "DeleteByQueryResponse", + ">; (this: That, params: ", + "DeleteByQueryRequest", + " | ", + "DeleteByQueryRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "DeleteByQueryResponse", + ", unknown>>; (this: That, params: ", + "DeleteByQueryRequest", + " | ", + "DeleteByQueryRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "DeleteByQueryResponse", + ">; }; deleteByQueryRethrottle: { (this: That, params: ", + "DeleteByQueryRethrottleRequest", + " | ", + "DeleteByQueryRethrottleRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "TasksTaskListResponseBase", + ">; (this: That, params: ", + "DeleteByQueryRethrottleRequest", + " | ", + "DeleteByQueryRethrottleRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "TasksTaskListResponseBase", + ", unknown>>; (this: That, params: ", + "DeleteByQueryRethrottleRequest", + " | ", + "DeleteByQueryRethrottleRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "TasksTaskListResponseBase", + ">; }; deleteScript: { (this: That, params: ", + "DeleteScriptRequest", + " | ", + "DeleteScriptRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "AcknowledgedResponseBase", + ">; (this: That, params: ", + "DeleteScriptRequest", + " | ", + "DeleteScriptRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "AcknowledgedResponseBase", + ", unknown>>; (this: That, params: ", + "DeleteScriptRequest", + " | ", + "DeleteScriptRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "AcknowledgedResponseBase", + ">; }; enrich: ", + "default", + "; exists: { (this: That, params: ", + "ExistsRequest", + " | ", + "ExistsRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise; (this: That, params: ", + "ExistsRequest", + " | ", + "ExistsRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + ">; (this: That, params: ", + "ExistsRequest", + " | ", + "ExistsRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise; }; existsSource: { (this: That, params: ", + "ExistsSourceRequest", + " | ", + "ExistsSourceRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise; (this: That, params: ", + "ExistsSourceRequest", + " | ", + "ExistsSourceRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + ">; (this: That, params: ", + "ExistsSourceRequest", + " | ", + "ExistsSourceRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise; }; explain: { (this: That, params: ", + "ExplainRequest", + " | ", + "ExplainRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ExplainResponse", + ">; (this: That, params: ", + "ExplainRequest", + " | ", + "ExplainRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ExplainResponse", + ", unknown>>; (this: That, params: ", + "ExplainRequest", + " | ", + "ExplainRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ExplainResponse", + ">; }; features: ", + "default", + "; fieldCaps: { (this: That, params?: ", + "FieldCapsRequest", + " | ", + "FieldCapsRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "FieldCapsResponse", + ">; (this: That, params?: ", + "FieldCapsRequest", + " | ", + "FieldCapsRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "FieldCapsResponse", + ", unknown>>; (this: That, params?: ", + "FieldCapsRequest", + " | ", + "FieldCapsRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "FieldCapsResponse", + ">; }; fleet: ", + "default", + "; getScript: { (this: That, params: ", + "GetScriptRequest", + " | ", + "GetScriptRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "GetScriptResponse", + ">; (this: That, params: ", + "GetScriptRequest", + " | ", + "GetScriptRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "GetScriptResponse", + ", unknown>>; (this: That, params: ", + "GetScriptRequest", + " | ", + "GetScriptRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "GetScriptResponse", + ">; }; getScriptContext: { (this: That, params?: ", + "GetScriptContextRequest", + " | ", + "GetScriptContextRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "GetScriptContextResponse", + ">; (this: That, params?: ", + "GetScriptContextRequest", + " | ", + "GetScriptContextRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "GetScriptContextResponse", + ", unknown>>; (this: That, params?: ", + "GetScriptContextRequest", + " | ", + "GetScriptContextRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "GetScriptContextResponse", + ">; }; getScriptLanguages: { (this: That, params?: ", + "GetScriptLanguagesRequest", + " | ", + "GetScriptLanguagesRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "GetScriptLanguagesResponse", + ">; (this: That, params?: ", + "GetScriptLanguagesRequest", + " | ", + "GetScriptLanguagesRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "GetScriptLanguagesResponse", + ", unknown>>; (this: That, params?: ", + "GetScriptLanguagesRequest", + " | ", + "GetScriptLanguagesRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "GetScriptLanguagesResponse", + ">; }; getSource: { (this: That, params: ", + "GetSourceRequest", + " | ", + "GetSourceRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise; (this: That, params: ", + "GetSourceRequest", + " | ", + "GetSourceRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + ">; (this: That, params: ", + "GetSourceRequest", + " | ", + "GetSourceRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise; }; graph: ", + "default", + "; ilm: ", + "default", + "; indices: ", + "default", + "; info: { (this: That, params?: ", + "InfoRequest", + " | ", + "InfoRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "InfoResponse", + ">; (this: That, params?: ", + "InfoRequest", + " | ", + "InfoRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "InfoResponse", + ", unknown>>; (this: That, params?: ", + "InfoRequest", + " | ", + "InfoRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "InfoResponse", + ">; }; ingest: ", + "default", + "; knnSearch: { (this: That, params: ", + "KnnSearchRequest", + " | ", + "KnnSearchRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "KnnSearchResponse", + ">; (this: That, params: ", + "KnnSearchRequest", + " | ", + "KnnSearchRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "KnnSearchResponse", + ", unknown>>; (this: That, params: ", + "KnnSearchRequest", + " | ", + "KnnSearchRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "KnnSearchResponse", + ">; }; license: ", + "default", + "; logstash: ", + "default", + "; mget: { (this: That, params?: ", + "MgetRequest", + " | ", + "MgetRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "MgetResponse", + ">; (this: That, params?: ", + "MgetRequest", + " | ", + "MgetRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "MgetResponse", + ", unknown>>; (this: That, params?: ", + "MgetRequest", + " | ", + "MgetRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "MgetResponse", + ">; }; migration: ", + "default", + "; ml: ", + "default", + "; msearch: { >(this: That, params: ", + "MsearchRequest", + " | ", + "MsearchRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "MsearchResponse", + ">; >(this: That, params: ", + "MsearchRequest", + " | ", + "MsearchRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "MsearchResponse", + ", unknown>>; >(this: That, params: ", + "MsearchRequest", + " | ", + "MsearchRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "MsearchResponse", + ">; }; msearchTemplate: { >(this: That, params: ", + "MsearchTemplateRequest", + " | ", + "MsearchTemplateRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "MsearchTemplateResponse", + ">; >(this: That, params: ", + "MsearchTemplateRequest", + " | ", + "MsearchTemplateRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "MsearchTemplateResponse", + ", unknown>>; >(this: That, params: ", + "MsearchTemplateRequest", + " | ", + "MsearchTemplateRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "MsearchTemplateResponse", + ">; }; mtermvectors: { (this: That, params?: ", + "MtermvectorsRequest", + " | ", + "MtermvectorsRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "MtermvectorsResponse", + ">; (this: That, params?: ", + "MtermvectorsRequest", + " | ", + "MtermvectorsRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "MtermvectorsResponse", + ", unknown>>; (this: That, params?: ", + "MtermvectorsRequest", + " | ", + "MtermvectorsRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "MtermvectorsResponse", + ">; }; nodes: ", + "default", + "; openPointInTime: { (this: That, params: ", + "OpenPointInTimeRequest", + " | ", + "OpenPointInTimeRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "OpenPointInTimeResponse", + ">; (this: That, params: ", + "OpenPointInTimeRequest", + " | ", + "OpenPointInTimeRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "OpenPointInTimeResponse", + ", unknown>>; (this: That, params: ", + "OpenPointInTimeRequest", + " | ", + "OpenPointInTimeRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "OpenPointInTimeResponse", + ">; }; ping: { (this: That, params?: ", + "PingRequest", + " | ", + "PingRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise; (this: That, params?: ", + "PingRequest", + " | ", + "PingRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + ">; (this: That, params?: ", + "PingRequest", + " | ", + "PingRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise; }; putScript: { (this: That, params: ", + "PutScriptRequest", + " | ", + "PutScriptRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "AcknowledgedResponseBase", + ">; (this: That, params: ", + "PutScriptRequest", + " | ", + "PutScriptRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "AcknowledgedResponseBase", + ", unknown>>; (this: That, params: ", + "PutScriptRequest", + " | ", + "PutScriptRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "AcknowledgedResponseBase", + ">; }; rankEval: { (this: That, params: ", + "RankEvalRequest", + " | ", + "RankEvalRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "RankEvalResponse", + ">; (this: That, params: ", + "RankEvalRequest", + " | ", + "RankEvalRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "RankEvalResponse", + ", unknown>>; (this: That, params: ", + "RankEvalRequest", + " | ", + "RankEvalRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "RankEvalResponse", + ">; }; reindex: { (this: That, params: ", + "ReindexRequest", + " | ", + "ReindexRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ReindexResponse", + ">; (this: That, params: ", + "ReindexRequest", + " | ", + "ReindexRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ReindexResponse", + ", unknown>>; (this: That, params: ", + "ReindexRequest", + " | ", + "ReindexRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ReindexResponse", + ">; }; reindexRethrottle: { (this: That, params: ", + "ReindexRethrottleRequest", + " | ", + "ReindexRethrottleRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ReindexRethrottleResponse", + ">; (this: That, params: ", + "ReindexRethrottleRequest", + " | ", + "ReindexRethrottleRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ReindexRethrottleResponse", + ", unknown>>; (this: That, params: ", + "ReindexRethrottleRequest", + " | ", + "ReindexRethrottleRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ReindexRethrottleResponse", + ">; }; renderSearchTemplate: { (this: That, params?: ", + "RenderSearchTemplateRequest", + " | ", + "RenderSearchTemplateRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "RenderSearchTemplateResponse", + ">; (this: That, params?: ", + "RenderSearchTemplateRequest", + " | ", + "RenderSearchTemplateRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "RenderSearchTemplateResponse", + ", unknown>>; (this: That, params?: ", + "RenderSearchTemplateRequest", + " | ", + "RenderSearchTemplateRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "RenderSearchTemplateResponse", + ">; }; rollup: ", + "default", + "; scriptsPainlessExecute: { (this: That, params?: ", + "ScriptsPainlessExecuteRequest", + " | ", + "ScriptsPainlessExecuteRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ScriptsPainlessExecuteResponse", + ">; (this: That, params?: ", + "ScriptsPainlessExecuteRequest", + " | ", + "ScriptsPainlessExecuteRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ScriptsPainlessExecuteResponse", + ", unknown>>; (this: That, params?: ", + "ScriptsPainlessExecuteRequest", + " | ", + "ScriptsPainlessExecuteRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ScriptsPainlessExecuteResponse", + ">; }; scroll: { >(this: That, params: ", + "ScrollRequest", + " | ", + "ScrollRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "ScrollResponse", + ">; >(this: That, params: ", + "ScrollRequest", + " | ", + "ScrollRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "ScrollResponse", + ", unknown>>; >(this: That, params: ", + "ScrollRequest", + " | ", + "ScrollRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "ScrollResponse", + ">; }; searchMvt: { (this: That, params: ", + "SearchMvtRequest", + " | ", + "SearchMvtRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise; (this: That, params: ", + "SearchMvtRequest", + " | ", + "SearchMvtRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + ">; (this: That, params: ", + "SearchMvtRequest", + " | ", + "SearchMvtRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise; }; searchShards: { (this: That, params?: ", + "SearchShardsRequest", + " | ", + "SearchShardsRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchShardsResponse", + ">; (this: That, params?: ", + "SearchShardsRequest", + " | ", + "SearchShardsRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchShardsResponse", + ", unknown>>; (this: That, params?: ", + "SearchShardsRequest", + " | ", + "SearchShardsRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchShardsResponse", + ">; }; searchTemplate: { (this: That, params?: ", + "SearchTemplateRequest", + " | ", + "SearchTemplateRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "SearchTemplateResponse", + ">; (this: That, params?: ", + "SearchTemplateRequest", + " | ", + "SearchTemplateRequest", + " | undefined, options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "SearchTemplateResponse", + ", unknown>>; (this: That, params?: ", + "SearchTemplateRequest", + " | ", + "SearchTemplateRequest", + " | undefined, options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "SearchTemplateResponse", + ">; }; searchableSnapshots: ", + "default", + "; shutdown: ", + "default", + "; slm: ", + "default", + "; snapshot: ", + "default", + "; sql: ", + "default", + "; ssl: ", + "default", + "; tasks: ", + "default", + "; termsEnum: { (this: That, params: ", + "TermsEnumRequest", + " | ", + "TermsEnumRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "TermsEnumResponse", + ">; (this: That, params: ", + "TermsEnumRequest", + " | ", + "TermsEnumRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "TermsEnumResponse", + ", unknown>>; (this: That, params: ", + "TermsEnumRequest", + " | ", + "TermsEnumRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "TermsEnumResponse", + ">; }; termvectors: { (this: That, params: ", + "TermvectorsRequest", + " | ", + "TermvectorsRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "TermvectorsResponse", + ">; (this: That, params: ", + "TermvectorsRequest", + " | ", + "TermvectorsRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "TermvectorsResponse", + ", unknown>>; (this: That, params: ", + "TermvectorsRequest", + " | ", + "TermvectorsRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "TermvectorsResponse", + ">; }; textStructure: ", + "default", + "; transform: ", + "default", + "; updateByQuery: { (this: That, params: ", + "UpdateByQueryRequest", + " | ", + "UpdateByQueryRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "UpdateByQueryResponse", + ">; (this: That, params: ", + "UpdateByQueryRequest", + " | ", + "UpdateByQueryRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "UpdateByQueryResponse", + ", unknown>>; (this: That, params: ", + "UpdateByQueryRequest", + " | ", + "UpdateByQueryRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "UpdateByQueryResponse", + ">; }; updateByQueryRethrottle: { (this: That, params: ", + "UpdateByQueryRethrottleRequest", + " | ", + "UpdateByQueryRethrottleRequest", + ", options?: ", + "TransportRequestOptionsWithOutMeta", + " | undefined): Promise<", + "UpdateByQueryRethrottleResponse", + ">; (this: That, params: ", + "UpdateByQueryRethrottleRequest", + " | ", + "UpdateByQueryRethrottleRequest", + ", options?: ", + "TransportRequestOptionsWithMeta", + " | undefined): Promise<", + "TransportResult", + "<", + "UpdateByQueryRethrottleResponse", + ", unknown>>; (this: That, params: ", + "UpdateByQueryRethrottleRequest", + " | ", + "UpdateByQueryRethrottleRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined): Promise<", + "UpdateByQueryRethrottleResponse", + ">; }; watcher: ", + "default", + "; xpack: ", + "default", + "; }" + ], + "path": "x-pack/plugins/observability/server/utils/create_or_update_index_template.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "observability", + "id": "def-server.createOrUpdateIndexTemplate.$1.logger", + "type": "Object", + "tags": [], + "label": "logger", + "description": [], + "signature": [ + { + "pluginId": "@kbn/logging", + "scope": "server", + "docId": "kibKbnLoggingPluginApi", + "section": "def-server.Logger", + "text": "Logger" + } + ], + "path": "x-pack/plugins/observability/server/utils/create_or_update_index_template.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "observability", "id": "def-server.getInspectResponse", diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 0038e62bd1d31..b282a4dcdd668 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Observability UI](https://github.com/orgs/elastic/teams/observability-u | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 583 | 40 | 579 | 33 | +| 586 | 40 | 582 | 32 | ## Client diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 202a26f792abe..273588ca86018 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 8f4b77c974a75..a90f4910e9460 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -15,13 +15,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 527 | 439 | 40 | +| 529 | 441 | 41 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 33695 | 520 | 23465 | 1156 | +| 33829 | 523 | 23585 | 1159 | ## Plugin Directory @@ -31,14 +31,15 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 36 | 1 | 32 | 2 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 12 | 0 | 1 | 2 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 420 | 0 | 411 | 35 | -| | [APM UI](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 41 | 0 | 41 | 58 | +| | [APM UI](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 42 | 0 | 42 | 58 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back. | 81 | 1 | 72 | 2 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back. | 89 | 1 | 74 | 2 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Canvas application to Kibana | 9 | 0 | 8 | 3 | | | [ResponseOps](https://github.com/orgs/elastic/teams/response-ops) | The Case management system in Kibana | 87 | 0 | 71 | 28 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 267 | 16 | 252 | 9 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 39 | 0 | 11 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | Chat available on Elastic Cloud deployments for quicker assistance. | 1 | 0 | 0 | 0 | +| | [Platform Onboarding](https://github.com/orgs/elastic/teams/platform-onboarding) | Static migration page where self-managed users can see text/copy about migrating to Elastic Cloud | 7 | 1 | 7 | 1 | | | [Kibana Core](https://github.com/orgs/elastic/teams/@elastic/kibana-core) | Provides the necessary APIs to implement A/B testing scenarios, fetching the variations in configuration and reporting back metrics to track conversion rates of the experiments. | 12 | 0 | 0 | 0 | | cloudFullStory | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | When Kibana runs on Elastic Cloud, this plugin registers FullStory as a shipper for telemetry. | 0 | 0 | 0 | 0 | | cloudGainsight | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | When Kibana runs on Elastic Cloud, this plugin registers Gainsight as a shipper for telemetry. | 0 | 0 | 0 | 0 | @@ -46,13 +47,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Cloud Security Posture](https://github.com/orgs/elastic/teams/cloud-posture-security) | The cloud security posture plugin | 17 | 0 | 2 | 2 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 13 | 0 | 13 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 268 | 0 | 259 | 10 | -| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2806 | 17 | 1013 | 0 | +| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2809 | 17 | 1013 | 0 | | crossClusterReplication | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | customBranding | [global-experience](https://github.com/orgs/elastic/teams/kibana-global-experience) | Enables customization of Kibana | 0 | 0 | 0 | 0 | | | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 107 | 0 | 88 | 1 | -| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 121 | 0 | 114 | 3 | +| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 113 | 0 | 109 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 52 | 0 | 51 | 0 | -| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3279 | 119 | 2561 | 27 | +| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3286 | 119 | 2568 | 27 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | This plugin provides the ability to create data views via a modal flyout inside Kibana apps | 16 | 0 | 7 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Reusable data view field editor across Kibana | 60 | 0 | 30 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data view management app | 2 | 0 | 2 | 0 | @@ -61,7 +62,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 10 | 0 | 8 | 2 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 100 | 0 | 82 | 4 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 37 | 0 | 35 | 2 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds embeddables service to Kibana | 513 | 6 | 413 | 4 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds embeddables service to Kibana | 522 | 8 | 421 | 4 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends embeddable plugin with more functionality | 14 | 0 | 14 | 0 | | | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides encryption and decryption utilities for saved objects containing sensitive information. | 51 | 0 | 44 | 0 | | | [Enterprise Search](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Adds dashboards for discovering and managing Enterprise Search products. | 9 | 0 | 9 | 0 | @@ -81,19 +82,19 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'shape' function and renderer to expressions | 148 | 0 | 146 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression Tagcloud plugin adds a `tagcloud` renderer and function to the expression plugin. The renderer will display the `Wordcloud` chart. | 7 | 0 | 7 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression XY plugin adds a `xy` renderer and function to the expression plugin. The renderer will display the `xy` chart. | 170 | 0 | 160 | 13 | -| | [Visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Adds expression runtime to Kibana | 2198 | 74 | 1739 | 5 | +| | [Visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Adds expression runtime to Kibana | 2205 | 74 | 1746 | 5 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 227 | 0 | 96 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Index pattern fields and ambiguous values formatters | 288 | 26 | 249 | 3 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 62 | 0 | 62 | 2 | | | [@elastic/kibana-app-services](https://github.com/orgs/elastic/teams/team:AppServicesUx) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 252 | 1 | 45 | 5 | | | [@elastic/kibana-global-experience](https://github.com/orgs/elastic/teams/@elastic/kibana-global-experience) | Simple UI for managing files in Kibana | 2 | 1 | 2 | 0 | -| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1027 | 3 | 922 | 20 | +| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1025 | 3 | 920 | 20 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 68 | 0 | 14 | 5 | | globalSearchBar | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | globalSearchProviders | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | graph | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 0 | 0 | 0 | 0 | | grokdebugger | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | -| | [Journey Onboarding](https://github.com/orgs/elastic/teams/platform-onboarding) | Guided onboarding framework | 94 | 0 | 93 | 0 | +| | [Journey Onboarding](https://github.com/orgs/elastic/teams/platform-onboarding) | Guided onboarding framework | 103 | 0 | 102 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 143 | 0 | 104 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 4 | 0 | 4 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 177 | 0 | 172 | 3 | @@ -107,7 +108,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | kibanaUsageCollection | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 0 | 0 | 0 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 624 | 3 | 424 | 8 | | | [Security Team](https://github.com/orgs/elastic/teams/security-team) | - | 3 | 0 | 3 | 1 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-visualizations) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 694 | 0 | 598 | 50 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-visualizations) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 695 | 0 | 599 | 50 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 8 | 0 | 8 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 3 | 0 | 3 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 117 | 0 | 42 | 10 | @@ -122,15 +123,15 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 34 | 0 | 34 | 2 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 2 | 0 | 2 | 1 | -| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 583 | 40 | 579 | 33 | +| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 586 | 40 | 582 | 32 | | | [Security asset management](https://github.com/orgs/elastic/teams/security-asset-management) | - | 21 | 0 | 21 | 5 | | painlessLab | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | -| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Presentation Utility Plugin is a set of common, shared components and toolkits for solutions within the Presentation space, (e.g. Dashboards, Canvas). | 227 | 7 | 171 | 12 | +| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Presentation Utility Plugin is a set of common, shared components and toolkits for solutions within the Presentation space, (e.g. Dashboards, Canvas). | 230 | 7 | 174 | 11 | | | [profiling](https://github.com/orgs/elastic/teams/profiling-ui) | - | 15 | 2 | 15 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 4 | 0 | 4 | 0 | | | [Kibana Reporting Services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Reporting Services enables applications to feature reports that the user can automate with Watcher and download later. | 36 | 0 | 16 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 21 | 0 | 21 | 0 | -| | [RAC](https://github.com/orgs/elastic/teams/rac) | - | 236 | 0 | 208 | 10 | +| | [RAC](https://github.com/orgs/elastic/teams/rac) | - | 241 | 0 | 213 | 10 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 24 | 0 | 19 | 2 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 197 | 2 | 156 | 5 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 16 | 0 | 16 | 0 | @@ -141,25 +142,25 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 32 | 0 | 13 | 0 | | | [Kibana Reporting Services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 27 | 0 | 8 | 4 | | searchprofiler | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | -| | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 251 | 0 | 91 | 1 | +| | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 252 | 0 | 92 | 3 | | | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 112 | 0 | 75 | 28 | | | [Security Team](https://github.com/orgs/elastic/teams/security-team) | - | 7 | 0 | 7 | 1 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds URL Service and sharing capabilities to Kibana | 115 | 0 | 56 | 10 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 22 | 1 | 22 | 1 | | | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides the Spaces feature, which allows saved objects to be organized into meaningful categories. | 260 | 0 | 64 | 0 | -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 4 | 0 | 4 | 0 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 12 | 0 | 12 | 2 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 4 | 0 | 4 | 0 | | synthetics | [Uptime](https://github.com/orgs/elastic/teams/uptime) | This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions. | 0 | 0 | 0 | 0 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 83 | 0 | 41 | 7 | | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 44 | 0 | 1 | 0 | | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 31 | 0 | 26 | 6 | | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 1 | 0 | 1 | 0 | -| | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 2 | 0 | 1 | 1 | +| | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 5 | 0 | 0 | 0 | | | [Protections Experience Team](https://github.com/orgs/elastic/teams/protections-experience) | Elastic threat intelligence helps you see if you are open to or have been subject to current or historical known threats | 34 | 0 | 14 | 3 | | | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 257 | 1 | 214 | 21 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the transforms features provided by Elastic. Transforms enable you to convert existing Elasticsearch indices into summarized indices, which provide opportunities for new insights and analytics. | 4 | 0 | 4 | 1 | | translations | [Kibana Localization](https://github.com/orgs/elastic/teams/kibana-localization) | - | 0 | 0 | 0 | 0 | -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 526 | 11 | 497 | 51 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 576 | 11 | 547 | 52 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds UI Actions service to Kibana | 135 | 2 | 92 | 11 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends UI Actions plugin with more functionality | 206 | 0 | 142 | 9 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the field list which can be integrated into apps | 215 | 0 | 203 | 7 | @@ -215,7 +216,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | Kibana Core | - | 73 | 0 | 44 | 9 | | | Kibana Core | - | 24 | 0 | 24 | 0 | | | Kibana Core | - | 129 | 3 | 127 | 17 | -| | [Owner missing] | - | 6 | 0 | 4 | 4 | +| | [Owner missing] | - | 6 | 0 | 4 | 4 | | | [Owner missing] | - | 20 | 0 | 13 | 5 | | | Kibana Core | - | 4 | 0 | 0 | 0 | | | Kibana Core | - | 7 | 0 | 7 | 1 | @@ -279,7 +280,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | Kibana Core | - | 7 | 0 | 7 | 0 | | | Kibana Core | - | 25 | 5 | 25 | 1 | | | Kibana Core | - | 7 | 0 | 7 | 1 | -| | Kibana Core | - | 392 | 1 | 154 | 0 | +| | Kibana Core | - | 393 | 1 | 154 | 0 | | | Kibana Core | - | 54 | 0 | 48 | 6 | | | Kibana Core | - | 41 | 0 | 40 | 0 | | | Kibana Core | - | 4 | 0 | 2 | 0 | @@ -291,7 +292,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | Kibana Core | - | 4 | 0 | 4 | 0 | | | Kibana Core | - | 2 | 0 | 2 | 0 | | | Kibana Core | - | 4 | 0 | 4 | 0 | -| | Kibana Core | - | 28 | 0 | 0 | 0 | +| | Kibana Core | - | 30 | 0 | 0 | 0 | | | Kibana Core | - | 5 | 0 | 5 | 0 | | | Kibana Core | - | 31 | 0 | 0 | 0 | | | Kibana Core | - | 9 | 0 | 9 | 0 | @@ -356,9 +357,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | Kibana Core | - | 6 | 0 | 4 | 0 | | | Kibana Core | - | 2 | 0 | 1 | 0 | | | Kibana Core | - | 6 | 0 | 6 | 0 | -| | Kibana Core | - | 25 | 1 | 13 | 0 | -| | Kibana Core | - | 6 | 1 | 6 | 2 | -| | Kibana Core | - | 4 | 0 | 4 | 0 | +| | Kibana Core | - | 29 | 1 | 17 | 0 | +| | Kibana Core | - | 11 | 1 | 11 | 3 | +| | Kibana Core | - | 8 | 0 | 8 | 0 | | | Kibana Core | - | 25 | 0 | 3 | 0 | | | Kibana Core | - | 32 | 1 | 16 | 0 | | | Kibana Core | - | 18 | 1 | 17 | 3 | @@ -376,6 +377,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Owner missing] | - | 67 | 0 | 67 | 2 | | | [Owner missing] | - | 1 | 0 | 1 | 0 | | | [Owner missing] | - | 19 | 0 | 11 | 0 | +| | Kibana Core | - | 5 | 0 | 4 | 37 | | | [Owner missing] | - | 4 | 0 | 4 | 0 | | | [Owner missing] | - | 27 | 0 | 14 | 1 | | | Kibana Core | - | 7 | 0 | 3 | 0 | @@ -397,12 +399,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | Kibana Core | - | 61 | 0 | 1 | 0 | | | [Owner missing] | - | 43 | 0 | 36 | 0 | | | Visualizations | - | 52 | 12 | 41 | 0 | -| | [Owner missing] | - | 22 | 0 | 22 | 3 | +| | [Owner missing] | - | 24 | 0 | 24 | 3 | | | [Owner missing] | - | 13 | 0 | 13 | 0 | | | [Owner missing] | - | 64 | 0 | 59 | 5 | | | [Owner missing] | - | 96 | 0 | 95 | 0 | | | [Owner missing] | - | 7 | 0 | 5 | 0 | -| | Kibana Core | - | 32 | 0 | 5 | 39 | +| | Kibana Core | - | 27 | 0 | 1 | 2 | | | Kibana Core | - | 8 | 0 | 8 | 0 | | | [Owner missing] | - | 6 | 0 | 1 | 1 | | | [Owner missing] | - | 534 | 1 | 1 | 0 | @@ -420,7 +422,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Owner missing] | - | 21 | 0 | 10 | 0 | | | [Owner missing] | - | 6 | 0 | 6 | 1 | | | [Owner missing] | - | 11 | 2 | 7 | 0 | -| | [Owner missing] | - | 96 | 0 | 93 | 0 | +| | [Owner missing] | - | 97 | 0 | 94 | 0 | | | [Owner missing] | Security Solution auto complete | 56 | 1 | 41 | 1 | | | [Owner missing] | security solution elastic search utilities to use across plugins such lists, security_solution, cases, etc... | 67 | 0 | 61 | 1 | | | [Owner missing] | - | 104 | 0 | 93 | 1 | diff --git a/api_docs/presentation_util.devdocs.json b/api_docs/presentation_util.devdocs.json index b01ba8e886641..a14f737f80fab 100644 --- a/api_docs/presentation_util.devdocs.json +++ b/api_docs/presentation_util.devdocs.json @@ -603,6 +603,62 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "presentationUtil", + "id": "def-public.cleanFiltersForSerialize", + "type": "Function", + "tags": [], + "label": "cleanFiltersForSerialize", + "description": [], + "signature": [ + "(filters: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[]) => ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[]" + ], + "path": "src/plugins/presentation_util/public/redux_embeddables/clean_redux_embeddable_state.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "presentationUtil", + "id": "def-public.cleanFiltersForSerialize.$1", + "type": "Array", + "tags": [], + "label": "filters", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[]" + ], + "path": "src/plugins/presentation_util/public/redux_embeddables/clean_redux_embeddable_state.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "presentationUtil", "id": "def-public.LazyDashboardPicker", @@ -1218,12 +1274,12 @@ }, { "parentPluginId": "presentationUtil", - "id": "def-public.useReduxContainerContext", + "id": "def-public.useReduxEmbeddableContext", "type": "Function", "tags": [], - "label": "useReduxContainerContext", + "label": "useReduxEmbeddableContext", "description": [ - "\nA typed use context hook for embeddable containers. it @returns an\nReduxContainerContextServices object typed to the generic inputTypes and ReducerTypes you pass in.\nNote that the reducer type is optional, but will be required to correctly infer the keys and payload\ntypes of your reducers. use `typeof MyReducers` here to retain them. It also includes a containerActions\nkey which contains most of the commonly used container operations" + "\nA typed use context hook for embeddables that are not containers. it @returns an\nReduxEmbeddableContextServices object typed to the generic inputTypes and ReducerTypes you pass in.\nNote that the reducer type is optional, but will be required to correctly infer the keys and payload\ntypes of your reducers. use `typeof MyReducers` here to retain them." ], "signature": [ " = ", "EmbeddableReducers", - ">() => ", - "ReduxContainerContext", - "" - ], - "path": "src/plugins/presentation_util/public/redux_embeddables/use_redux_embeddable_context.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "presentationUtil", - "id": "def-public.useReduxEmbeddableContext", - "type": "Function", - "tags": [], - "label": "useReduxEmbeddableContext", - "description": [ - "\nA typed use context hook for embeddables that are not containers. it @returns an\nReduxEmbeddableContextServices object typed to the generic inputTypes and ReducerTypes you pass in.\nNote that the reducer type is optional, but will be required to correctly infer the keys and payload\ntypes of your reducers. use `typeof MyReducers` here to retain them." - ], - "signature": [ - ", EmbeddableType extends ", { "pluginId": "embeddable", "scope": "public", "docId": "kibEmbeddablePluginApi", - "section": "def-public.EmbeddableOutput", - "text": "EmbeddableOutput" + "section": "def-public.Embeddable", + "text": "Embeddable" }, - ", unknown> = ", - { - "pluginId": "presentationUtil", - "scope": "public", - "docId": "kibPresentationUtilPluginApi", - "section": "def-public.ReduxEmbeddableState", - "text": "ReduxEmbeddableState" - }, - "<", - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.EmbeddableInput", - "text": "EmbeddableInput" - }, - ", ", + " = ", { "pluginId": "embeddable", "scope": "public", "docId": "kibEmbeddablePluginApi", - "section": "def-public.EmbeddableOutput", - "text": "EmbeddableOutput" + "section": "def-public.Embeddable", + "text": "Embeddable" }, - ", unknown>, ReducerType extends ", - "EmbeddableReducers", - " = ", - "EmbeddableReducers", - ">() => ", + ">() => ", "ReduxEmbeddableContext", - "" + "" ], "path": "src/plugins/presentation_util/public/redux_embeddables/use_redux_embeddable_context.ts", "deprecated": false, @@ -2231,15 +2230,23 @@ "EmbeddableReducers", " = ", "EmbeddableReducers", - ">({ reducers, embeddable, syncSettings, initialComponentState, }: { embeddable: ", + ">({ reducers, embeddable, syncSettings, additionalMiddleware, initialComponentState, }: { embeddable: ", { "pluginId": "embeddable", "scope": "public", "docId": "kibEmbeddablePluginApi", - "section": "def-public.IEmbeddable", - "text": "IEmbeddable" + "section": "def-public.Embeddable", + "text": "Embeddable" }, - "; initialComponentState?: ReduxEmbeddableStateType[\"componentState\"] | undefined; syncSettings?: ", + "; additionalMiddleware?: ", + "Middleware", + "<", + "AnyAction", + ", any, ", + "Dispatch", + "<", + "AnyAction", + ">>[] | undefined; initialComponentState?: ReduxEmbeddableStateType[\"componentState\"] | undefined; syncSettings?: ", "ReduxEmbeddableSyncSettings", "<", { @@ -2293,10 +2300,18 @@ "pluginId": "embeddable", "scope": "public", "docId": "kibEmbeddablePluginApi", - "section": "def-public.IEmbeddable", - "text": "IEmbeddable" + "section": "def-public.Embeddable", + "text": "Embeddable" }, - "; initialComponentState?: ReduxEmbeddableStateType[\"componentState\"] | undefined; syncSettings?: ", + "; additionalMiddleware?: ", + "Middleware", + "<", + "AnyAction", + ", any, ", + "Dispatch", + "<", + "AnyAction", + ">>[] | undefined; initialComponentState?: ReduxEmbeddableStateType[\"componentState\"] | undefined; syncSettings?: ", "ReduxEmbeddableSyncSettings", "<", { @@ -2535,6 +2550,40 @@ "returnComment": [], "children": [] }, + { + "parentPluginId": "presentationUtil", + "id": "def-public.ReduxEmbeddableTools.onStateChange", + "type": "Function", + "tags": [], + "label": "onStateChange", + "description": [], + "signature": [ + "(listener: () => void) => ", + "Unsubscribe" + ], + "path": "src/plugins/presentation_util/public/redux_embeddables/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "presentationUtil", + "id": "def-public.ReduxEmbeddableTools.onStateChange.$1", + "type": "Function", + "tags": [], + "label": "listener", + "description": [], + "signature": [ + "() => void" + ], + "path": "node_modules/redux/index.d.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + } + ] + }, { "parentPluginId": "presentationUtil", "id": "def-public.ReduxEmbeddableTools.actions", diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index d53f4cf225694..f914ebf4b5816 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-prese | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 227 | 7 | 171 | 12 | +| 230 | 7 | 174 | 11 | ## Client diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index 905e514f37cac..d874c9447f019 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 20d6bdee3a18f..23736a6a1edc7 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index d047a0ce614eb..fe6c6622a86c5 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index 6c726efbefa1c..2f20a7bdef0a6 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json index 0642e373d8c77..22f1edf758d6e 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -63,7 +63,7 @@ "label": "get", "description": [], "signature": [ - "({ id, index }: GetAlertParams) => Promise> | undefined>" + "({ id, index }: GetAlertParams) => Promise> | undefined>" ], "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", "deprecated": false, @@ -87,6 +87,46 @@ ], "returnComment": [] }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getAlertSummary", + "type": "Function", + "tags": [], + "label": "getAlertSummary", + "description": [], + "signature": [ + "({ gte, lte, featureIds, filter, fixedInterval, }: GetAlertSummaryParams) => Promise<{ activeAlertCount: number; recoveredAlertCount: number; activeAlerts: ", + "AggregationsBuckets", + "<", + "AggregationsDateHistogramBucket", + ">; recoveredAlerts: ", + "AggregationsBuckets", + "<", + "AggregationsDateHistogramBucket", + ">; }>" + ], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getAlertSummary.$1", + "type": "Object", + "tags": [], + "label": "{\n gte,\n lte,\n featureIds,\n filter,\n fixedInterval = '1m',\n }", + "description": [], + "signature": [ + "GetAlertSummaryParams" + ], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "ruleRegistry", "id": "def-server.AlertsClient.update", @@ -203,7 +243,7 @@ "SortOptions", "[] | undefined; search_after?: (string | number)[] | undefined; }) => Promise<", "SearchResponse", - ">, Record>, Record>>" ], @@ -1416,7 +1456,7 @@ "section": "def-server.GetSummarizedAlertsFnOpts", "text": "GetSummarizedAlertsFnOpts" }, - ") => Promise<{ new: { count: number; alerts: Partial> & OutputOf>>[]; }; ongoing: { count: number; alerts: Partial> & OutputOf>>[]; }; recovered: { count: number; alerts: Partial> & OutputOf>>[]; }; }>" + ") => Promise<{ new: { count: number; data: Partial> & OutputOf>>[]; }; ongoing: { count: number; data: Partial> & OutputOf>>[]; }; recovered: { count: number; data: Partial> & OutputOf>>[]; }; }>" ], "path": "x-pack/plugins/rule_registry/server/utils/create_get_summarized_alerts_fn.ts", "deprecated": false, @@ -1761,7 +1801,7 @@ "section": "def-server.GetSummarizedAlertsFnOpts", "text": "GetSummarizedAlertsFnOpts" }, - ") => Promise<{ new: { count: number; alerts: Partial> & OutputOf>>[]; }; ongoing: { count: number; alerts: Partial> & OutputOf>>[]; }; recovered: { count: number; alerts: Partial> & OutputOf>>[]; }; }>; name: string; validate?: { params?: ", + ") => Promise<{ new: { count: number; data: Partial> & OutputOf>>[]; }; ongoing: { count: number; data: Partial> & OutputOf>>[]; }; recovered: { count: number; data: Partial> & OutputOf>>[]; }; }>; name: string; validate?: { params?: ", "RuleTypeParamsValidator", " | undefined; } | undefined; id: string; cancelAlertsOnRuleTimeout?: boolean | undefined; actionGroups: ", { @@ -1902,9 +1942,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/logging", + "pluginId": "@kbn/ecs", "scope": "server", - "docId": "kibKbnLoggingPluginApi", + "docId": "kibKbnEcsPluginApi", "section": "def-server.EcsEventOutcome", "text": "EcsEventOutcome" }, @@ -2448,7 +2488,7 @@ "section": "def-server.ESSearchResponse", "text": "ESSearchResponse" }, - "> & OutputOf>>, TSearchRequest, { restTotalHitsAsInt: false; }>>" + "> & OutputOf>>, TSearchRequest, { restTotalHitsAsInt: false; }>>" ], "path": "x-pack/plugins/rule_registry/server/rule_data_client/types.ts", "deprecated": false, @@ -4086,6 +4126,122 @@ "path": "x-pack/plugins/rule_registry/server/plugin.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.RuleRegistryPluginSetupContract.createLifecycleRuleTypeFactory", + "type": "Function", + "tags": [], + "label": "createLifecycleRuleTypeFactory", + "description": [], + "signature": [ + "({ logger, ruleDataClient }: { logger: ", + { + "pluginId": "@kbn/logging", + "scope": "server", + "docId": "kibKbnLoggingPluginApi", + "section": "def-server.Logger", + "text": "Logger" + }, + "; ruleDataClient: ", + { + "pluginId": "ruleRegistry", + "scope": "server", + "docId": "kibRuleRegistryPluginApi", + "section": "def-server.IRuleDataClient", + "text": "IRuleDataClient" + }, + "; }) => >(type: ", + { + "pluginId": "ruleRegistry", + "scope": "server", + "docId": "kibRuleRegistryPluginApi", + "section": "def-server.AlertTypeWithExecutor", + "text": "AlertTypeWithExecutor" + }, + ") => ", + { + "pluginId": "ruleRegistry", + "scope": "server", + "docId": "kibRuleRegistryPluginApi", + "section": "def-server.AlertTypeWithExecutor", + "text": "AlertTypeWithExecutor" + }, + "" + ], + "path": "x-pack/plugins/rule_registry/server/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "ruleRegistry", + "id": "def-server.RuleRegistryPluginSetupContract.createLifecycleRuleTypeFactory.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "{ logger: ", + { + "pluginId": "@kbn/logging", + "scope": "server", + "docId": "kibKbnLoggingPluginApi", + "section": "def-server.Logger", + "text": "Logger" + }, + "; ruleDataClient: ", + { + "pluginId": "ruleRegistry", + "scope": "server", + "docId": "kibRuleRegistryPluginApi", + "section": "def-server.IRuleDataClient", + "text": "IRuleDataClient" + }, + "; }" + ], + "path": "x-pack/plugins/rule_registry/server/utils/create_lifecycle_rule_type_factory.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.RuleRegistryPluginSetupContract.dataset", + "type": "Object", + "tags": [], + "label": "dataset", + "description": [], + "signature": [ + "typeof ", + { + "pluginId": "ruleRegistry", + "scope": "server", + "docId": "kibRuleRegistryPluginApi", + "section": "def-server.Dataset", + "text": "Dataset" + } + ], + "path": "x-pack/plugins/rule_registry/server/plugin.ts", + "deprecated": false, + "trackAdoption": false } ], "lifecycle": "setup", @@ -4193,7 +4349,7 @@ "label": "parseTechnicalFields", "description": [], "signature": [ - "(input: unknown, partial?: boolean) => OutputOf>" + "(input: unknown, partial?: boolean) => OutputOf>" ], "path": "x-pack/plugins/rule_registry/common/parse_technical_fields.ts", "deprecated": false, @@ -4520,7 +4676,7 @@ "label": "ParsedTechnicalFields", "description": [], "signature": [ - "{ readonly '@timestamp': string; readonly \"kibana.alert.rule.rule_type_id\": string; readonly \"kibana.alert.rule.consumer\": string; readonly \"kibana.alert.rule.producer\": string; readonly \"kibana.space_ids\": string[]; readonly \"kibana.alert.uuid\": string; readonly \"kibana.alert.instance.id\": string; readonly \"kibana.alert.status\": string; readonly \"kibana.alert.rule.category\": string; readonly \"kibana.alert.rule.uuid\": string; readonly \"kibana.alert.rule.name\": string; readonly tags?: string[] | undefined; readonly 'event.action'?: string | undefined; readonly \"kibana.alert.rule.execution.uuid\"?: string | undefined; readonly \"kibana.alert.rule.parameters\"?: { [key: string]: unknown; } | undefined; readonly \"kibana.alert.start\"?: string | undefined; readonly \"kibana.alert.time_range\"?: unknown; readonly \"kibana.alert.end\"?: string | undefined; readonly \"kibana.alert.duration.us\"?: number | undefined; readonly \"kibana.alert.severity\"?: string | undefined; readonly \"kibana.alert.flapping\"?: boolean | undefined; readonly \"kibana.version\"?: string | undefined; readonly \"ecs.version\"?: string | undefined; readonly \"kibana.alert.risk_score\"?: number | undefined; readonly \"kibana.alert.workflow_status\"?: string | undefined; readonly \"kibana.alert.workflow_user\"?: string | undefined; readonly \"kibana.alert.workflow_reason\"?: string | undefined; readonly \"kibana.alert.system_status\"?: string | undefined; readonly \"kibana.alert.action_group\"?: string | undefined; readonly \"kibana.alert.reason\"?: string | undefined; readonly \"kibana.alert.rule.author\"?: string | undefined; readonly \"kibana.alert.rule.created_at\"?: string | undefined; readonly \"kibana.alert.rule.created_by\"?: string | undefined; readonly \"kibana.alert.rule.description\"?: string | undefined; readonly \"kibana.alert.rule.enabled\"?: string | undefined; readonly \"kibana.alert.rule.from\"?: string | undefined; readonly \"kibana.alert.rule.interval\"?: string | undefined; readonly \"kibana.alert.rule.license\"?: string | undefined; readonly \"kibana.alert.rule.note\"?: string | undefined; readonly \"kibana.alert.rule.references\"?: string[] | undefined; readonly \"kibana.alert.rule.rule_id\"?: string | undefined; readonly \"kibana.alert.rule.rule_name_override\"?: string | undefined; readonly \"kibana.alert.rule.tags\"?: string[] | undefined; readonly \"kibana.alert.rule.to\"?: string | undefined; readonly \"kibana.alert.rule.type\"?: string | undefined; readonly \"kibana.alert.rule.updated_at\"?: string | undefined; readonly \"kibana.alert.rule.updated_by\"?: string | undefined; readonly \"kibana.alert.rule.version\"?: string | undefined; readonly \"kibana.alert.suppression.terms.field\"?: string[] | undefined; readonly \"kibana.alert.suppression.terms.value\"?: string[] | undefined; readonly \"kibana.alert.suppression.start\"?: string | undefined; readonly \"kibana.alert.suppression.end\"?: string | undefined; readonly \"kibana.alert.suppression.docs_count\"?: number | undefined; readonly 'event.kind'?: string | undefined; }" + "{ readonly '@timestamp': string; readonly \"kibana.alert.rule.rule_type_id\": string; readonly \"kibana.alert.rule.consumer\": string; readonly \"kibana.alert.rule.producer\": string; readonly \"kibana.space_ids\": string[]; readonly \"kibana.alert.uuid\": string; readonly \"kibana.alert.instance.id\": string; readonly \"kibana.alert.status\": string; readonly \"kibana.alert.rule.category\": string; readonly \"kibana.alert.rule.uuid\": string; readonly \"kibana.alert.rule.name\": string; readonly tags?: string[] | undefined; readonly 'event.action'?: string | undefined; readonly \"kibana.alert.rule.execution.uuid\"?: string | undefined; readonly \"kibana.alert.rule.parameters\"?: { [key: string]: unknown; } | undefined; readonly \"kibana.alert.start\"?: string | undefined; readonly \"kibana.alert.time_range\"?: unknown; readonly \"kibana.alert.end\"?: string | undefined; readonly \"kibana.alert.duration.us\"?: number | undefined; readonly \"kibana.alert.severity\"?: string | undefined; readonly \"kibana.alert.flapping\"?: boolean | undefined; readonly \"kibana.version\"?: string | undefined; readonly \"ecs.version\"?: string | undefined; readonly \"kibana.alert.risk_score\"?: number | undefined; readonly \"kibana.alert.workflow_status\"?: string | undefined; readonly \"kibana.alert.workflow_user\"?: string | undefined; readonly \"kibana.alert.workflow_reason\"?: string | undefined; readonly \"kibana.alert.system_status\"?: string | undefined; readonly \"kibana.alert.action_group\"?: string | undefined; readonly \"kibana.alert.reason\"?: string | undefined; readonly \"kibana.alert.case_ids\"?: string[] | undefined; readonly \"kibana.alert.rule.author\"?: string | undefined; readonly \"kibana.alert.rule.created_at\"?: string | undefined; readonly \"kibana.alert.rule.created_by\"?: string | undefined; readonly \"kibana.alert.rule.description\"?: string | undefined; readonly \"kibana.alert.rule.enabled\"?: string | undefined; readonly \"kibana.alert.rule.from\"?: string | undefined; readonly \"kibana.alert.rule.interval\"?: string | undefined; readonly \"kibana.alert.rule.license\"?: string | undefined; readonly \"kibana.alert.rule.note\"?: string | undefined; readonly \"kibana.alert.rule.references\"?: string[] | undefined; readonly \"kibana.alert.rule.rule_id\"?: string | undefined; readonly \"kibana.alert.rule.rule_name_override\"?: string | undefined; readonly \"kibana.alert.rule.tags\"?: string[] | undefined; readonly \"kibana.alert.rule.to\"?: string | undefined; readonly \"kibana.alert.rule.type\"?: string | undefined; readonly \"kibana.alert.rule.updated_at\"?: string | undefined; readonly \"kibana.alert.rule.updated_by\"?: string | undefined; readonly \"kibana.alert.rule.version\"?: string | undefined; readonly \"kibana.alert.suppression.terms.field\"?: string[] | undefined; readonly \"kibana.alert.suppression.terms.value\"?: string[] | undefined; readonly \"kibana.alert.suppression.start\"?: string | undefined; readonly \"kibana.alert.suppression.end\"?: string | undefined; readonly \"kibana.alert.suppression.docs_count\"?: number | undefined; readonly 'event.kind'?: string | undefined; }" ], "path": "x-pack/plugins/rule_registry/common/parse_technical_fields.ts", "deprecated": false, diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index a1f7510189745..228f54fc5cbff 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; @@ -21,7 +21,7 @@ Contact [RAC](https://github.com/orgs/elastic/teams/rac) for questions regarding | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 236 | 0 | 208 | 10 | +| 241 | 0 | 213 | 10 | ## Server diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 42935bacc8d8e..7b0c296f37187 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.devdocs.json b/api_docs/saved_objects.devdocs.json index 0762363169d52..2796fdc987cdc 100644 --- a/api_docs/saved_objects.devdocs.json +++ b/api_docs/saved_objects.devdocs.json @@ -641,11 +641,11 @@ }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/public/application/top_nav/save_modal.tsx" + "path": "src/plugins/dashboard/public/dashboard_container/embeddable/api/overlays/save_modal.tsx" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/public/application/top_nav/save_modal.tsx" + "path": "src/plugins/dashboard/public/dashboard_container/embeddable/api/overlays/save_modal.tsx" }, { "plugin": "discover", @@ -1708,15 +1708,15 @@ }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx" + "path": "src/plugins/dashboard/public/dashboard_actions/clone_panel_action.tsx" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx" + "path": "src/plugins/dashboard/public/dashboard_actions/clone_panel_action.tsx" }, { "plugin": "dashboard", - "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx" + "path": "src/plugins/dashboard/public/dashboard_actions/clone_panel_action.tsx" } ], "children": [ diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 2b5e501ad9d9d..b5bf08de16456 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index f76dd8483d144..8c84049a57e44 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index e062d93530af0..facadee4347c2 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index e8759f8ac6631..506abc7bf659b 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index f162ce52d3770..3670d0ae7ca59 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 9c75acc449562..849b44c1b6747 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 1ab3ce5089be9..755908981302a 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index 0b78555d2c85b..0e6ed137d6cb2 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/security.devdocs.json b/api_docs/security.devdocs.json index ec61dc141f3b7..60421e61a75a0 100644 --- a/api_docs/security.devdocs.json +++ b/api_docs/security.devdocs.json @@ -1258,7 +1258,23 @@ "label": "kibana", "description": [], "signature": [ - "{ space_id?: string | undefined; session_id?: string | undefined; saved_object?: { type: string; id: string; } | undefined; authentication_provider?: string | undefined; authentication_type?: string | undefined; authentication_realm?: string | undefined; lookup_realm?: string | undefined; add_to_spaces?: readonly string[] | undefined; delete_from_spaces?: readonly string[] | undefined; } | undefined" + "AuditKibana", + " | undefined" + ], + "path": "x-pack/plugins/security/server/audit/audit_events.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "security", + "id": "def-server.AuditEvent.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + "AuditHttp", + " | undefined" ], "path": "x-pack/plugins/security/server/audit/audit_events.ts", "deprecated": false, diff --git a/api_docs/security.mdx b/api_docs/security.mdx index e9ee386a80bcf..900aa3bb450d5 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Platform Security](https://github.com/orgs/elastic/teams/kibana-securit | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 251 | 0 | 91 | 1 | +| 252 | 0 | 92 | 3 | ## Client diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index 71e198f813d45..99926bcde22d8 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index ce89037296415..3aac95659920b 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index 2ac7695c3cafd..cd88fcb854d3b 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index e3adaf9987f6b..05d9964c0e181 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index 477be43de538f..59c7ba655bcee 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.devdocs.json b/api_docs/stack_alerts.devdocs.json index a482d537657a0..d8c83f2daef2f 100644 --- a/api_docs/stack_alerts.devdocs.json +++ b/api_docs/stack_alerts.devdocs.json @@ -72,7 +72,108 @@ }, "common": { "classes": [], - "functions": [], + "functions": [ + { + "parentPluginId": "stackAlerts", + "id": "def-common.getComparatorScript", + "type": "Function", + "tags": [], + "label": "getComparatorScript", + "description": [], + "signature": [ + "(comparator: ", + "Comparator", + ", threshold: number[], fieldName: string) => string" + ], + "path": "x-pack/plugins/stack_alerts/common/comparator.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "stackAlerts", + "id": "def-common.getComparatorScript.$1", + "type": "Enum", + "tags": [], + "label": "comparator", + "description": [], + "signature": [ + "Comparator" + ], + "path": "x-pack/plugins/stack_alerts/common/comparator.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "stackAlerts", + "id": "def-common.getComparatorScript.$2", + "type": "Array", + "tags": [], + "label": "threshold", + "description": [], + "signature": [ + "number[]" + ], + "path": "x-pack/plugins/stack_alerts/common/comparator.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "stackAlerts", + "id": "def-common.getComparatorScript.$3", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/stack_alerts/common/comparator.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "stackAlerts", + "id": "def-common.getHumanReadableComparator", + "type": "Function", + "tags": [], + "label": "getHumanReadableComparator", + "description": [], + "signature": [ + "(comparator: ", + "Comparator", + ") => string | undefined" + ], + "path": "x-pack/plugins/stack_alerts/common/comparator.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "stackAlerts", + "id": "def-common.getHumanReadableComparator.$1", + "type": "Enum", + "tags": [], + "label": "comparator", + "description": [], + "signature": [ + "Comparator" + ], + "path": "x-pack/plugins/stack_alerts/common/comparator.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], "interfaces": [], "enums": [], "misc": [ @@ -92,6 +193,43 @@ "initialIsOpen": false } ], - "objects": [] + "objects": [ + { + "parentPluginId": "stackAlerts", + "id": "def-common.ComparatorFnNames", + "type": "Object", + "tags": [], + "label": "ComparatorFnNames", + "description": [], + "signature": [ + "Set<", + "Comparator", + ">" + ], + "path": "x-pack/plugins/stack_alerts/common/comparator.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "stackAlerts", + "id": "def-common.ComparatorFns", + "type": "Object", + "tags": [], + "label": "ComparatorFns", + "description": [], + "signature": [ + "Map<", + "Comparator", + ", ", + "ComparatorFn", + ">" + ], + "path": "x-pack/plugins/stack_alerts/common/comparator.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ] } } \ No newline at end of file diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index 72228f8041a7c..03fd5505fc588 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 4 | 0 | 4 | 0 | +| 12 | 0 | 12 | 2 | ## Server @@ -33,6 +33,12 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q ## Common +### Objects + + +### Functions + + ### Consts, variables and types diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index 3d31f79bad67e..2a033b721d672 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index fc361e11ea867..2d590c0a4ba92 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 6ad1a006222d2..1f7740e37be17 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index b66fde7d606f8..1c0a5615a8d91 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index 8e5b7f5631139..70dc95ca7d411 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.devdocs.json b/api_docs/telemetry_management_section.devdocs.json index 6224d9afdbf50..d46681dedf78b 100644 --- a/api_docs/telemetry_management_section.devdocs.json +++ b/api_docs/telemetry_management_section.devdocs.json @@ -9,13 +9,43 @@ "type": "Function", "tags": [], "label": "LazyOptInExampleFlyout", - "description": [], + "description": [ + "\nLazy-loaded {@link OptInExampleFlyout}" + ], "signature": [ - "React.ExoticComponent> & { readonly _result: typeof ", - "OptInExampleFlyout", - "; }" + "React.ExoticComponent<(", + { + "pluginId": "telemetryManagementSection", + "scope": "public", + "docId": "kibTelemetryManagementSectionPluginApi", + "section": "def-public.Props", + "text": "Props" + }, + " & React.RefAttributes>) | (", + { + "pluginId": "telemetryManagementSection", + "scope": "public", + "docId": "kibTelemetryManagementSectionPluginApi", + "section": "def-public.Props", + "text": "Props" + }, + " & { children?: React.ReactNode; })> & { readonly _result: React.ComponentType<", + { + "pluginId": "telemetryManagementSection", + "scope": "public", + "docId": "kibTelemetryManagementSectionPluginApi", + "section": "def-public.Props", + "text": "Props" + }, + ">; }" ], "path": "src/plugins/telemetry_management_section/public/components/lazy_opt_in_example_flyout.tsx", "deprecated": false, @@ -40,7 +70,60 @@ "initialIsOpen": false } ], - "interfaces": [], + "interfaces": [ + { + "parentPluginId": "telemetryManagementSection", + "id": "def-public.Props", + "type": "Interface", + "tags": [], + "label": "Props", + "description": [ + "\nOptInExampleFlyout props" + ], + "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "telemetryManagementSection", + "id": "def-public.Props.fetchExample", + "type": "Function", + "tags": [], + "label": "fetchExample", + "description": [ + "\nMethod that provides the sample payload to show in the flyout" + ], + "signature": [ + "() => Promise" + ], + "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "telemetryManagementSection", + "id": "def-public.Props.onClose", + "type": "Function", + "tags": [], + "label": "onClose", + "description": [ + "\nHook called when the flyout is closed" + ], + "signature": [ + "() => void" + ], + "path": "src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], "enums": [], "misc": [], "objects": [] diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index 261489771e804..c49d62848ffa5 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; @@ -21,10 +21,13 @@ Contact [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetr | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2 | 0 | 1 | 1 | +| 5 | 0 | 0 | 0 | ## Client ### Functions +### Interfaces + + diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index 7b739f4cb4c1a..473411a028530 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index d52dd1367ed27..6166500e90c57 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index 6e3616c13b6f4..4d74268c0ab55 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json index e8d6aa6f7d83d..1037c842fe824 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -550,7 +550,9 @@ "section": "def-common.HttpSetup", "text": "HttpSetup" }, - ", indexes: string[]) => Promise<{ name: string; type: string; normalizedType: string; searchable: boolean; aggregatable: boolean; }[]>" + ", indexes: string[]) => Promise<", + "FieldOption", + "[]>" ], "path": "x-pack/plugins/triggers_actions_ui/public/common/index_controls/index.ts", "deprecated": false, @@ -3381,7 +3383,7 @@ "description": [], "signature": [ "BasicFields", - " & { tags?: string[] | undefined; kibana?: string[] | undefined; \"@timestamp\"?: string[] | undefined; \"event.action\"?: string[] | undefined; \"kibana.alert.rule.execution.uuid\"?: string[] | undefined; \"kibana.alert.rule.rule_type_id\"?: string[] | undefined; \"kibana.alert.rule.consumer\"?: string[] | undefined; \"kibana.alert\"?: string[] | undefined; \"kibana.alert.rule\"?: string[] | undefined; \"kibana.alert.rule.parameters\"?: string[] | undefined; \"kibana.alert.rule.producer\"?: string[] | undefined; \"kibana.space_ids\"?: string[] | undefined; \"kibana.alert.uuid\"?: string[] | undefined; \"kibana.alert.instance.id\"?: string[] | undefined; \"kibana.alert.start\"?: string[] | undefined; \"kibana.alert.time_range\"?: string[] | undefined; \"kibana.alert.end\"?: string[] | undefined; \"kibana.alert.duration.us\"?: string[] | undefined; \"kibana.alert.severity\"?: string[] | undefined; \"kibana.alert.status\"?: string[] | undefined; \"kibana.alert.flapping\"?: string[] | undefined; \"kibana.version\"?: string[] | undefined; \"ecs.version\"?: string[] | undefined; \"kibana.alert.risk_score\"?: string[] | undefined; \"kibana.alert.workflow_status\"?: string[] | undefined; \"kibana.alert.workflow_user\"?: string[] | undefined; \"kibana.alert.workflow_reason\"?: string[] | undefined; \"kibana.alert.system_status\"?: string[] | undefined; \"kibana.alert.action_group\"?: string[] | undefined; \"kibana.alert.reason\"?: string[] | undefined; \"kibana.alert.rule.author\"?: string[] | undefined; \"kibana.alert.rule.category\"?: string[] | undefined; \"kibana.alert.rule.uuid\"?: string[] | undefined; \"kibana.alert.rule.created_at\"?: string[] | undefined; \"kibana.alert.rule.created_by\"?: string[] | undefined; \"kibana.alert.rule.description\"?: string[] | undefined; \"kibana.alert.rule.enabled\"?: string[] | undefined; \"kibana.alert.rule.from\"?: string[] | undefined; \"kibana.alert.rule.interval\"?: string[] | undefined; \"kibana.alert.rule.license\"?: string[] | undefined; \"kibana.alert.rule.name\"?: string[] | undefined; \"kibana.alert.rule.note\"?: string[] | undefined; \"kibana.alert.rule.references\"?: string[] | undefined; \"kibana.alert.rule.rule_id\"?: string[] | undefined; \"kibana.alert.rule.rule_name_override\"?: string[] | undefined; \"kibana.alert.rule.tags\"?: string[] | undefined; \"kibana.alert.rule.to\"?: string[] | undefined; \"kibana.alert.rule.type\"?: string[] | undefined; \"kibana.alert.rule.updated_at\"?: string[] | undefined; \"kibana.alert.rule.updated_by\"?: string[] | undefined; \"kibana.alert.rule.version\"?: string[] | undefined; \"kibana.alert.suppression.terms\"?: string[] | undefined; \"kibana.alert.suppression.terms.field\"?: string[] | undefined; \"kibana.alert.suppression.terms.value\"?: string[] | undefined; \"kibana.alert.suppression.start\"?: string[] | undefined; \"kibana.alert.suppression.end\"?: string[] | undefined; \"kibana.alert.suppression.docs_count\"?: string[] | undefined; \"event.kind\"?: string[] | undefined; \"event.module\"?: string[] | undefined; \"kibana.alert.evaluation.threshold\"?: string[] | undefined; \"kibana.alert.evaluation.value\"?: string[] | undefined; \"kibana.alert.building_block_type\"?: string[] | undefined; \"kibana.alert.rule.exceptions_list\"?: string[] | undefined; \"kibana.alert.rule.namespace\"?: string[] | undefined; \"kibana.alert.rule.threat.framework\"?: string[] | undefined; \"kibana.alert.rule.threat.tactic.id\"?: string[] | undefined; \"kibana.alert.rule.threat.tactic.name\"?: string[] | undefined; \"kibana.alert.rule.threat.tactic.reference\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.id\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.name\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.reference\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.subtechnique.id\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.subtechnique.name\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.subtechnique.reference\"?: string[] | undefined; } & { [x: string]: unknown[]; }" + " & { tags?: string[] | undefined; kibana?: string[] | undefined; \"@timestamp\"?: string[] | undefined; \"event.action\"?: string[] | undefined; \"kibana.alert.rule.execution.uuid\"?: string[] | undefined; \"kibana.alert.rule.rule_type_id\"?: string[] | undefined; \"kibana.alert.rule.consumer\"?: string[] | undefined; \"kibana.alert\"?: string[] | undefined; \"kibana.alert.rule\"?: string[] | undefined; \"kibana.alert.rule.parameters\"?: string[] | undefined; \"kibana.alert.rule.producer\"?: string[] | undefined; \"kibana.space_ids\"?: string[] | undefined; \"kibana.alert.uuid\"?: string[] | undefined; \"kibana.alert.instance.id\"?: string[] | undefined; \"kibana.alert.start\"?: string[] | undefined; \"kibana.alert.time_range\"?: string[] | undefined; \"kibana.alert.end\"?: string[] | undefined; \"kibana.alert.duration.us\"?: string[] | undefined; \"kibana.alert.severity\"?: string[] | undefined; \"kibana.alert.status\"?: string[] | undefined; \"kibana.alert.flapping\"?: string[] | undefined; \"kibana.version\"?: string[] | undefined; \"ecs.version\"?: string[] | undefined; \"kibana.alert.risk_score\"?: string[] | undefined; \"kibana.alert.workflow_status\"?: string[] | undefined; \"kibana.alert.workflow_user\"?: string[] | undefined; \"kibana.alert.workflow_reason\"?: string[] | undefined; \"kibana.alert.system_status\"?: string[] | undefined; \"kibana.alert.action_group\"?: string[] | undefined; \"kibana.alert.reason\"?: string[] | undefined; \"kibana.alert.case_ids\"?: string[] | undefined; \"kibana.alert.rule.author\"?: string[] | undefined; \"kibana.alert.rule.category\"?: string[] | undefined; \"kibana.alert.rule.uuid\"?: string[] | undefined; \"kibana.alert.rule.created_at\"?: string[] | undefined; \"kibana.alert.rule.created_by\"?: string[] | undefined; \"kibana.alert.rule.description\"?: string[] | undefined; \"kibana.alert.rule.enabled\"?: string[] | undefined; \"kibana.alert.rule.from\"?: string[] | undefined; \"kibana.alert.rule.interval\"?: string[] | undefined; \"kibana.alert.rule.license\"?: string[] | undefined; \"kibana.alert.rule.name\"?: string[] | undefined; \"kibana.alert.rule.note\"?: string[] | undefined; \"kibana.alert.rule.references\"?: string[] | undefined; \"kibana.alert.rule.rule_id\"?: string[] | undefined; \"kibana.alert.rule.rule_name_override\"?: string[] | undefined; \"kibana.alert.rule.tags\"?: string[] | undefined; \"kibana.alert.rule.to\"?: string[] | undefined; \"kibana.alert.rule.type\"?: string[] | undefined; \"kibana.alert.rule.updated_at\"?: string[] | undefined; \"kibana.alert.rule.updated_by\"?: string[] | undefined; \"kibana.alert.rule.version\"?: string[] | undefined; \"kibana.alert.suppression.terms\"?: string[] | undefined; \"kibana.alert.suppression.terms.field\"?: string[] | undefined; \"kibana.alert.suppression.terms.value\"?: string[] | undefined; \"kibana.alert.suppression.start\"?: string[] | undefined; \"kibana.alert.suppression.end\"?: string[] | undefined; \"kibana.alert.suppression.docs_count\"?: string[] | undefined; \"event.kind\"?: string[] | undefined; \"event.module\"?: string[] | undefined; \"kibana.alert.evaluation.threshold\"?: string[] | undefined; \"kibana.alert.evaluation.value\"?: string[] | undefined; \"kibana.alert.building_block_type\"?: string[] | undefined; \"kibana.alert.rule.exceptions_list\"?: string[] | undefined; \"kibana.alert.rule.namespace\"?: string[] | undefined; \"kibana.alert.rule.threat.framework\"?: string[] | undefined; \"kibana.alert.rule.threat.tactic.id\"?: string[] | undefined; \"kibana.alert.rule.threat.tactic.name\"?: string[] | undefined; \"kibana.alert.rule.threat.tactic.reference\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.id\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.name\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.reference\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.subtechnique.id\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.subtechnique.name\"?: string[] | undefined; \"kibana.alert.rule.threat.technique.subtechnique.reference\"?: string[] | undefined; } & { [x: string]: unknown[]; }" ], "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", "deprecated": false, @@ -8521,6 +8523,39 @@ "server": { "classes": [], "functions": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-server.validateAggType", + "type": "Function", + "tags": [], + "label": "validateAggType", + "description": [], + "signature": [ + "(aggType: string) => string | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-server.validateAggType.$1", + "type": "string", + "tags": [], + "label": "aggType", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "triggersActionsUi", "id": "def-server.validateCoreQueryBody", @@ -8554,6 +8589,39 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-server.validateGroupBy", + "type": "Function", + "tags": [], + "label": "validateGroupBy", + "description": [], + "signature": [ + "(groupBy: string) => string | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-server.validateGroupBy.$1", + "type": "string", + "tags": [], + "label": "groupBy", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/triggers_actions_ui/server/data/lib/core_query_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "triggersActionsUi", "id": "def-server.validateTimeWindowUnits", @@ -8636,21 +8704,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-server.MAX_INTERVALS", - "type": "number", - "tags": [], - "label": "MAX_INTERVALS", - "description": [], - "signature": [ - "1000" - ], - "path": "x-pack/plugins/triggers_actions_ui/server/data/index.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-server.TIME_SERIES_BUCKET_SELECTOR_FIELD", @@ -8970,46 +9023,99 @@ "functions": [ { "parentPluginId": "triggersActionsUi", - "id": "def-common.getExperimentalAllowedValues", + "id": "def-common.buildAggregation", "type": "Function", "tags": [], - "label": "getExperimentalAllowedValues", + "label": "buildAggregation", "description": [], "signature": [ - "() => string[]" + "({ timeSeries, aggType, aggField, termField, termSize, condition, topHitsSize, }: ", + { + "pluginId": "triggersActionsUi", + "scope": "common", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-common.BuildAggregationOpts", + "text": "BuildAggregationOpts" + }, + ") => Record" ], - "path": "x-pack/plugins/triggers_actions_ui/common/experimental_features.ts", + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", "deprecated": false, "trackAdoption": false, - "children": [], + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.buildAggregation.$1", + "type": "Object", + "tags": [], + "label": "{\n timeSeries,\n aggType,\n aggField,\n termField,\n termSize,\n condition,\n topHitsSize,\n}", + "description": [], + "signature": [ + { + "pluginId": "triggersActionsUi", + "scope": "common", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-common.BuildAggregationOpts", + "text": "BuildAggregationOpts" + } + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], "returnComment": [], "initialIsOpen": false }, { "parentPluginId": "triggersActionsUi", - "id": "def-common.isValidExperimentalValue", + "id": "def-common.getDateRangeInfo", "type": "Function", "tags": [], - "label": "isValidExperimentalValue", + "label": "getDateRangeInfo", "description": [], "signature": [ - "(value: string) => boolean" + "(params: ", + { + "pluginId": "triggersActionsUi", + "scope": "common", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-common.GetDateRangeInfoParams", + "text": "GetDateRangeInfoParams" + }, + ") => ", + { + "pluginId": "triggersActionsUi", + "scope": "common", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-common.DateRangeInfo", + "text": "DateRangeInfo" + } ], - "path": "x-pack/plugins/triggers_actions_ui/common/experimental_features.ts", + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "triggersActionsUi", - "id": "def-common.isValidExperimentalValue.$1", - "type": "string", + "id": "def-common.getDateRangeInfo.$1", + "type": "Object", "tags": [], - "label": "value", + "label": "params", "description": [], "signature": [ - "string" + { + "pluginId": "triggersActionsUi", + "scope": "common", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-common.GetDateRangeInfoParams", + "text": "GetDateRangeInfoParams" + } ], - "path": "x-pack/plugins/triggers_actions_ui/common/experimental_features.ts", + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -9020,33 +9126,78 @@ }, { "parentPluginId": "triggersActionsUi", - "id": "def-common.parseExperimentalConfigValue", + "id": "def-common.getDateStartAfterDateEndErrorMessage", "type": "Function", - "tags": [ - "throws" - ], - "label": "parseExperimentalConfigValue", - "description": [ - "\nParses the string value used in `xpack.trigger_actions_ui.enableExperimental` kibana configuration,\nwhich should be a string of values delimited by a comma (`,`)\n" + "tags": [], + "label": "getDateStartAfterDateEndErrorMessage", + "description": [], + "signature": [ + "() => string" ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.getExperimentalAllowedValues", + "type": "Function", + "tags": [], + "label": "getExperimentalAllowedValues", + "description": [], "signature": [ - "(configValue: string[]) => Readonly<{ rulesListDatagrid: boolean; internalAlertsTable: boolean; ruleTagFilter: boolean; ruleStatusFilter: boolean; rulesDetailLogs: boolean; ruleUseExecutionStatus: boolean; }>" + "() => string[]" ], "path": "x-pack/plugins/triggers_actions_ui/common/experimental_features.ts", "deprecated": false, "trackAdoption": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.getTooManyIntervalsErrorMessage", + "type": "Function", + "tags": [], + "label": "getTooManyIntervalsErrorMessage", + "description": [], + "signature": [ + "(intervals: number, maxIntervals: number) => any" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false, "children": [ { "parentPluginId": "triggersActionsUi", - "id": "def-common.parseExperimentalConfigValue.$1", - "type": "Array", + "id": "def-common.getTooManyIntervalsErrorMessage.$1", + "type": "number", "tags": [], - "label": "configValue", + "label": "intervals", "description": [], "signature": [ - "string[]" + "number" ], - "path": "x-pack/plugins/triggers_actions_ui/common/experimental_features.ts", + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.getTooManyIntervalsErrorMessage.$2", + "type": "number", + "tags": [], + "label": "maxIntervals", + "description": [], + "signature": [ + "number" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -9057,29 +9208,29 @@ }, { "parentPluginId": "triggersActionsUi", - "id": "def-common.parseInterval", + "id": "def-common.isCountAggregation", "type": "Function", "tags": [], - "label": "parseInterval", + "label": "isCountAggregation", "description": [], "signature": [ - "(intervalString: string) => { value: number; unit: string; }" + "(aggType: string) => boolean" ], - "path": "x-pack/plugins/triggers_actions_ui/common/parse_interval.ts", + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "triggersActionsUi", - "id": "def-common.parseInterval.$1", + "id": "def-common.isCountAggregation.$1", "type": "string", "tags": [], - "label": "intervalString", + "label": "aggType", "description": [], "signature": [ "string" ], - "path": "x-pack/plugins/triggers_actions_ui/common/parse_interval.ts", + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -9087,79 +9238,635 @@ ], "returnComment": [], "initialIsOpen": false - } - ], - "interfaces": [ + }, { "parentPluginId": "triggersActionsUi", - "id": "def-common.TimeSeriesResult", - "type": "Interface", + "id": "def-common.isGroupAggregation", + "type": "Function", "tags": [], - "label": "TimeSeriesResult", + "label": "isGroupAggregation", "description": [], - "path": "x-pack/plugins/triggers_actions_ui/common/data/index.ts", + "signature": [ + "(termField?: string | undefined) => boolean" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "triggersActionsUi", - "id": "def-common.TimeSeriesResult.results", - "type": "Array", + "id": "def-common.isGroupAggregation.$1", + "type": "string", "tags": [], - "label": "results", + "label": "termField", "description": [], "signature": [ - { - "pluginId": "triggersActionsUi", - "scope": "common", - "docId": "kibTriggersActionsUiPluginApi", - "section": "def-common.TimeSeriesResultRow", - "text": "TimeSeriesResultRow" - }, - "[]" + "string | undefined" ], - "path": "x-pack/plugins/triggers_actions_ui/common/data/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-common.TimeSeriesResult.truncated", - "type": "boolean", - "tags": [], - "label": "truncated", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/common/data/index.ts", + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "isRequired": false } ], + "returnComment": [], "initialIsOpen": false }, { "parentPluginId": "triggersActionsUi", - "id": "def-common.TimeSeriesResultRow", - "type": "Interface", + "id": "def-common.isValidExperimentalValue", + "type": "Function", "tags": [], - "label": "TimeSeriesResultRow", + "label": "isValidExperimentalValue", "description": [], - "path": "x-pack/plugins/triggers_actions_ui/common/data/index.ts", + "signature": [ + "(value: string) => boolean" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/experimental_features.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "triggersActionsUi", - "id": "def-common.TimeSeriesResultRow.group", + "id": "def-common.isValidExperimentalValue.$1", "type": "string", "tags": [], - "label": "group", + "label": "value", "description": [], - "path": "x-pack/plugins/triggers_actions_ui/common/data/index.ts", + "signature": [ + "string" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/experimental_features.ts", "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "triggersActionsUi", + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.parseAggregationResults", + "type": "Function", + "tags": [], + "label": "parseAggregationResults", + "description": [], + "signature": [ + "({ isCountAgg, isGroupAgg, esResult, resultLimit, }: ParseAggregationResultsOpts) => ", + { + "pluginId": "triggersActionsUi", + "scope": "common", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-common.ParsedAggregationResults", + "text": "ParsedAggregationResults" + } + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/parse_aggregation_results.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.parseAggregationResults.$1", + "type": "Object", + "tags": [], + "label": "{\n isCountAgg,\n isGroupAgg,\n esResult,\n resultLimit,\n}", + "description": [], + "signature": [ + "ParseAggregationResultsOpts" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/parse_aggregation_results.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.parseExperimentalConfigValue", + "type": "Function", + "tags": [ + "throws" + ], + "label": "parseExperimentalConfigValue", + "description": [ + "\nParses the string value used in `xpack.trigger_actions_ui.enableExperimental` kibana configuration,\nwhich should be a string of values delimited by a comma (`,`)\n" + ], + "signature": [ + "(configValue: string[]) => Readonly<{ rulesListDatagrid: boolean; internalAlertsTable: boolean; ruleTagFilter: boolean; ruleStatusFilter: boolean; rulesDetailLogs: boolean; ruleUseExecutionStatus: boolean; }>" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/experimental_features.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.parseExperimentalConfigValue.$1", + "type": "Array", + "tags": [], + "label": "configValue", + "description": [], + "signature": [ + "string[]" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/experimental_features.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.parseInterval", + "type": "Function", + "tags": [], + "label": "parseInterval", + "description": [], + "signature": [ + "(intervalString: string) => { value: number; unit: string; }" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/parse_interval.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.parseInterval.$1", + "type": "string", + "tags": [], + "label": "intervalString", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/parse_interval.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.BuildAggregationOpts", + "type": "Interface", + "tags": [], + "label": "BuildAggregationOpts", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.BuildAggregationOpts.timeSeries", + "type": "Object", + "tags": [], + "label": "timeSeries", + "description": [], + "signature": [ + "{ timeField: string; dateStart?: string | undefined; dateEnd?: string | undefined; interval?: string | undefined; timeWindowSize: number; timeWindowUnit: string; } | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.BuildAggregationOpts.aggType", + "type": "string", + "tags": [], + "label": "aggType", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.BuildAggregationOpts.aggField", + "type": "string", + "tags": [], + "label": "aggField", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.BuildAggregationOpts.termSize", + "type": "number", + "tags": [], + "label": "termSize", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.BuildAggregationOpts.termField", + "type": "string", + "tags": [], + "label": "termField", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.BuildAggregationOpts.topHitsSize", + "type": "number", + "tags": [], + "label": "topHitsSize", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.BuildAggregationOpts.condition", + "type": "Object", + "tags": [], + "label": "condition", + "description": [], + "signature": [ + "{ resultLimit?: number | undefined; conditionScript: string; } | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.DateRange", + "type": "Interface", + "tags": [], + "label": "DateRange", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.DateRange.from", + "type": "string", + "tags": [], + "label": "from", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.DateRange.to", + "type": "string", + "tags": [], + "label": "to", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.DateRangeInfo", + "type": "Interface", + "tags": [], + "label": "DateRangeInfo", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.DateRangeInfo.dateStart", + "type": "string", + "tags": [], + "label": "dateStart", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.DateRangeInfo.dateEnd", + "type": "string", + "tags": [], + "label": "dateEnd", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.DateRangeInfo.dateRanges", + "type": "Array", + "tags": [], + "label": "dateRanges", + "description": [], + "signature": [ + { + "pluginId": "triggersActionsUi", + "scope": "common", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-common.DateRange", + "text": "DateRange" + }, + "[]" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.GetDateRangeInfoParams", + "type": "Interface", + "tags": [], + "label": "GetDateRangeInfoParams", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.GetDateRangeInfoParams.dateStart", + "type": "string", + "tags": [], + "label": "dateStart", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.GetDateRangeInfoParams.dateEnd", + "type": "string", + "tags": [], + "label": "dateEnd", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.GetDateRangeInfoParams.interval", + "type": "string", + "tags": [], + "label": "interval", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.GetDateRangeInfoParams.window", + "type": "string", + "tags": [], + "label": "window", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.ParsedAggregationGroup", + "type": "Interface", + "tags": [], + "label": "ParsedAggregationGroup", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/parse_aggregation_results.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.ParsedAggregationGroup.group", + "type": "string", + "tags": [], + "label": "group", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/parse_aggregation_results.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.ParsedAggregationGroup.count", + "type": "number", + "tags": [], + "label": "count", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/parse_aggregation_results.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.ParsedAggregationGroup.hits", + "type": "Array", + "tags": [], + "label": "hits", + "description": [], + "signature": [ + "SearchHit", + "[]" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/parse_aggregation_results.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.ParsedAggregationGroup.value", + "type": "number", + "tags": [], + "label": "value", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/parse_aggregation_results.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.ParsedAggregationResults", + "type": "Interface", + "tags": [], + "label": "ParsedAggregationResults", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/parse_aggregation_results.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.ParsedAggregationResults.results", + "type": "Array", + "tags": [], + "label": "results", + "description": [], + "signature": [ + { + "pluginId": "triggersActionsUi", + "scope": "common", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-common.ParsedAggregationGroup", + "text": "ParsedAggregationGroup" + }, + "[]" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/parse_aggregation_results.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.ParsedAggregationResults.truncated", + "type": "boolean", + "tags": [], + "label": "truncated", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/parse_aggregation_results.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.TimeSeriesResult", + "type": "Interface", + "tags": [], + "label": "TimeSeriesResult", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.TimeSeriesResult.results", + "type": "Array", + "tags": [], + "label": "results", + "description": [], + "signature": [ + { + "pluginId": "triggersActionsUi", + "scope": "common", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-common.TimeSeriesResultRow", + "text": "TimeSeriesResultRow" + }, + "[]" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.TimeSeriesResult.truncated", + "type": "boolean", + "tags": [], + "label": "truncated", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/index.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.TimeSeriesResultRow", + "type": "Interface", + "tags": [], + "label": "TimeSeriesResultRow", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.TimeSeriesResultRow.group", + "type": "string", + "tags": [], + "label": "group", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", "id": "def-common.TimeSeriesResultRow.metrics", "type": "Array", "tags": [], @@ -9200,6 +9907,48 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.BUCKET_SELECTOR_FIELD", + "type": "string", + "tags": [], + "label": "BUCKET_SELECTOR_FIELD", + "description": [], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.BUCKET_SELECTOR_PATH_NAME", + "type": "string", + "tags": [], + "label": "BUCKET_SELECTOR_PATH_NAME", + "description": [], + "signature": [ + "\"compareValue\"" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.DEFAULT_GROUPS", + "type": "number", + "tags": [], + "label": "DEFAULT_GROUPS", + "description": [], + "signature": [ + "100" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "triggersActionsUi", "id": "def-common.ExperimentalFeatures", @@ -9215,6 +9964,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.MAX_INTERVALS", + "type": "number", + "tags": [], + "label": "MAX_INTERVALS", + "description": [], + "signature": [ + "1000" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/date_range_info.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "triggersActionsUi", "id": "def-common.MetricResult", @@ -9229,6 +9993,21 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.UngroupedGroupId", + "type": "string", + "tags": [], + "label": "UngroupedGroupId", + "description": [], + "signature": [ + "\"all documents\"" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/parse_aggregation_results.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [ diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 4662efe5cbfda..8dec5a9d844e7 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 526 | 11 | 497 | 51 | +| 576 | 11 | 547 | 52 | ## Client diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index d5c87cc659d7e..7d7eb6ef75c0d 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index fe5727db39f33..2a5aa518fde34 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_field_list.mdx b/api_docs/unified_field_list.mdx index 424643b7d5d21..0cee7f7bb2a36 100644 --- a/api_docs/unified_field_list.mdx +++ b/api_docs/unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedFieldList title: "unifiedFieldList" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedFieldList plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedFieldList'] --- import unifiedFieldListObj from './unified_field_list.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index f04ddd348d6cc..cb62fbab2b650 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.devdocs.json b/api_docs/unified_search.devdocs.json index 15e716b82ecad..72b23fec6e3e6 100644 --- a/api_docs/unified_search.devdocs.json +++ b/api_docs/unified_search.devdocs.json @@ -365,15 +365,7 @@ "section": "def-common.Filter", "text": "Filter" }, - "[] | undefined; savedQuery?: ", - { - "pluginId": "data", - "scope": "public", - "docId": "kibDataQueryPluginApi", - "section": "def-public.SavedQuery", - "text": "SavedQuery" - }, - " | undefined; refreshInterval?: number | undefined; placeholder?: string | undefined; iconType?: ", + "[] | undefined; refreshInterval?: number | undefined; placeholder?: string | undefined; iconType?: ", "IconType", " | undefined; indexPatterns?: ", { @@ -393,7 +385,15 @@ }, " | undefined; customSubmitButton?: React.ReactNode; screenTitle?: string | undefined; showQueryMenu?: boolean | undefined; showQueryInput?: boolean | undefined; showFilterBar?: boolean | undefined; showDatePicker?: boolean | undefined; showAutoRefreshOnly?: boolean | undefined; hiddenFilterPanelOptions?: ", "FilterPanelOption", - "[] | undefined; isRefreshPaused?: boolean | undefined; dateRangeFrom?: string | undefined; dateRangeTo?: string | undefined; showSaveQuery?: boolean | undefined; onQueryChange?: ((payload: { dateRange: ", + "[] | undefined; isRefreshPaused?: boolean | undefined; dateRangeFrom?: string | undefined; dateRangeTo?: string | undefined; showSaveQuery?: boolean | undefined; savedQuery?: ", + { + "pluginId": "data", + "scope": "public", + "docId": "kibDataQueryPluginApi", + "section": "def-public.SavedQuery", + "text": "SavedQuery" + }, + " | undefined; onQueryChange?: ((payload: { dateRange: ", { "pluginId": "@kbn/es-query", "scope": "common", diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index fdbd47096b251..f7a1b2328fc4a 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 23cc83f51f15f..ebe398f5ac390 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 98aa233a96e30..b16087a30a7db 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 3817dfc33a728..deeb87ad48480 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index e7fc15e93a2bc..a16155636097b 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.devdocs.json b/api_docs/vis_default_editor.devdocs.json index b45f50028d9be..95a54f8628f99 100644 --- a/api_docs/vis_default_editor.devdocs.json +++ b/api_docs/vis_default_editor.devdocs.json @@ -325,7 +325,7 @@ "section": "def-public.DefaultEditorSize", "text": "DefaultEditorSize" }, - ") => 15 | 50 | 30" + ") => 15 | 30 | 50" ], "path": "src/plugins/vis_default_editor/public/editor_size.ts", "deprecated": false, diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index f06abaf3765ce..8895e5c38ccc5 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index e9cdc69036982..a0e2c0c17307f 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index 0abb75ce681c1..529bc498e0ffb 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index af432e35a1e89..3f33bdc5e9d85 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index 8f4c53243620c..c10c580ac1648 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index a5162aa03d20f..325958d850bfd 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 06193c254c39e..1291dde565226 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index 41e5c1a3ab78c..3538a2585572e 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 44ec66c13cb39..4d1c2a470d619 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index a155ca54cbcf2..12e8c56b1a2b8 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 2a564370198ff..60cb4e713e317 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2022-12-15 +date: 2022-12-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/dev_docs/contributing/how_we_use_github.mdx b/dev_docs/contributing/how_we_use_github.mdx index d427ba7d44f2e..69eb3ba8351c6 100644 --- a/dev_docs/contributing/how_we_use_github.mdx +++ b/dev_docs/contributing/how_we_use_github.mdx @@ -205,10 +205,12 @@ it's notable and affects our users) and which section it appears in. For example - `release_node:plugin_api_changes`: Specifies a changes to the plugin API and adds the PR to the Plugin API changes page in the Developer Guide - `release_note:skip`: Omits the PR from release notes -These labels related to backporting PRs: +The following labels are related to backporting PRs: - `auto-backport`: Automatically backport this PR (to the branches related to - version labels) after it's merged -- `backport`: This PR was backported -- `backport:skip`: This PR does not require backporting - + version labels) after it's merged. Requires adding desired target versions labels. +- `backport:prev-minor`: Automatically backport to one lower minor version. +- `backport:prev-major`: Automatically backport to the latest minor version of one lower major version. +- `backport:all-open`: Automatically backport to all generally available versions. This functionally is equivalent to backport:prev-major at the time of writing. +- `backport:skip`: This PR does not require backporting. +- `backport`: This PR was backported (added by CI). diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index c2cad75d32e3f..93ffa9e3ff3bc 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -440,6 +440,10 @@ The plugin exposes the static DefaultEditorController class to consume. |Integrates with DriftChat in order to provide live support to our Elastic Cloud users. This plugin should only run on Elastic Cloud. +|{kib-repo}blob/{branch}/x-pack/plugins/cloud_integrations/cloud_data_migration/README.md[cloudDataMigration] +|Static migration page where self-managed users can see text/copy about migrating to Elastic Cloud + + |{kib-repo}blob/{branch}/x-pack/plugins/cloud_integrations/cloud_experiments/README.mdx[cloudExperiments] |The Cloud Experiments Service provides the necessary APIs to implement A/B testing scenarios, fetching the variations in configuration and reporting back metrics to track conversion rates of the experiments. diff --git a/docs/management/cases/setup-cases.asciidoc b/docs/management/cases/setup-cases.asciidoc index 9131a92e7049d..cf3dad4318c5f 100644 --- a/docs/management/cases/setup-cases.asciidoc +++ b/docs/management/cases/setup-cases.asciidoc @@ -40,3 +40,8 @@ least once, which creates a user profile. |=== For more details, refer to <>. + +NOTE: If you are using an on-premises {kib} deployment and you want the email +notifications and the external incident management systems to contain +links back to {kib}, you must configure the +<> setting. diff --git a/docs/osquery/manage-integration.asciidoc b/docs/osquery/manage-integration.asciidoc index 34b96d84e4dc7..69cf505e724a2 100644 --- a/docs/osquery/manage-integration.asciidoc +++ b/docs/osquery/manage-integration.asciidoc @@ -63,7 +63,7 @@ While this allows you to use advanced Osquery functionality like pack discovery . Edit the *Osquery config* JSON field to apply your preferred Osquery configuration. Note the following: -* The field may already have content if you have scheduled packs for this agent policy. To keep these packs scheduled, do not remove the `packs` section. +* The field may already have content if you've scheduled packs for this agent policy. To keep these packs scheduled, do not remove the `packs` section. The `shard` field value is the percentage of agents in the policy using the pack. * Refer to the https://osquery.readthedocs.io/en/stable/[Osquery documentation] for configuration options. diff --git a/docs/osquery/osquery.asciidoc b/docs/osquery/osquery.asciidoc index c4781affd744d..eccee409ec68f 100644 --- a/docs/osquery/osquery.asciidoc +++ b/docs/osquery/osquery.asciidoc @@ -82,23 +82,26 @@ You can run packs as live queries or schedule packs to run for one or more agent . Click the **Packs** tab. . Click **Add pack** to create a new pack, or click the name of an existing pack, then **Edit** to add queries to an existing pack. +. Provide a name for the pack. The short description is optional. +. Schedule the pack to be deployed on specified agent policies (*Policy*) or on all agent policies (*Global*). ++ +TIP: Pack deployment details are stored within the <>. The `shard` field value is the percentage of agents in the policy using the pack. ++ +If you choose the *Policy* option, configure these fields: ++ +NOTE: When defining pack deployment details, you cannot configure the same policy multiple times. In other words, after specifying a policy, you can either choose to deploy the pack to all of the policy's agents or only a subset. You cannot choose both. -. Provide the following fields: - -* The name of the pack. - -* A short description of the pack. - -* The agent policies where this pack should run. If no agent policies are set, the pack is not scheduled. +** *Scheduled {agent} policies (optional)*: Allows you to deploy the pack to specific agent policies. By default, the pack is deployed to all {agents} that are registered to the policies you define. +** *Partial deployment (shards)*: Allows you to deploy the pack to a portion of the agents on each specified agent policy. After defining a policy, use the *Shard* slider to set the amount of agents to which the pack is deployed. For example, after specifying a policy, you can choose to deploy the pack to half of the policy's agents by selecting 50% on the slider. -. Add queries to schedule: +. If you're creating a new pack, add queries to schedule: -* To add a query to the pack, click *Add query*, and then either add a saved query or enter a new query. + ** Click *Add query* and then add a saved query or enter a new query. Each query must include a unique query ID and the interval at which it should run. Optionally, set the minimum Osquery version and platform, or <>. When you add a saved query to a pack, this adds a copy of the query. A connection is not maintained between saved queries and packs. -* To upload queries from a `.conf` query pack, drag the pack to the drop zone under the query table. To explore the community packs that Osquery publishes, click *Example packs*. +** Upload queries from a `.conf` query pack by dragging the pack to the drop zone under the query table. To explore the community packs that Osquery publishes, click *Example packs*. . Click *Save pack*. The queries run when the policy receives the update. diff --git a/docs/user/alerting/alerting-troubleshooting.asciidoc b/docs/user/alerting/alerting-troubleshooting.asciidoc index 6f3246956be49..34a97b3eb5903 100644 --- a/docs/user/alerting/alerting-troubleshooting.asciidoc +++ b/docs/user/alerting/alerting-troubleshooting.asciidoc @@ -55,7 +55,7 @@ Diagnosing these may be difficult - but there may be log messages for error cond === Use the REST APIs There is a rich set of HTTP endpoints to introspect and manage rules and connectors. -One of the HTTP endpoints available for actions is the POST <>. You can use this to “test” an action. For instance, if you have a server log action created, you can run it via curling the endpoint: +One of the HTTP endpoints available for actions is the <>. You can use this to “test” an action. For instance, if you have a server log action created, you can run it via curling the endpoint: [source, txt] -------------------------------------------------- curl -X POST -k \ @@ -67,12 +67,14 @@ curl -X POST -k \ experimental[] In addition, there is a command-line client that uses legacy rule APIs, which can be easier to use, but must be updated for the new APIs. CLI tools to list, create, edit, and delete alerts (rules) and actions (connectors) are available in https://github.com/pmuellr/kbn-action[kbn-action], which you can install as follows: + [source, txt] -------------------------------------------------- npm install -g pmuellr/kbn-action -------------------------------------------------- The same REST POST _execute API command will be: + [source, txt] -------------------------------------------------- kbn-action execute a692dc89-15b9-4a3c-9e47-9fb6872e49ce ‘{"params":{"subject":"hallo","message":"hallo!","to":["me@example.com"]}}’ @@ -104,95 +106,88 @@ Task Manager uses the `.kibana_task_manager` index, an internal index that conta ==== Getting from a rule to its task When a rule is created, a task is created, scheduled to run at the interval specified. For example, when a rule is created and configured to check every 5 minutes, then the underlying task will be expected to run every 5 minutes. In practice, after each time the rule runs, the task is scheduled to run again in 5 minutes, rather than being scheduled to run every 5 minutes indefinitely. -If you use the <> to fetch the underlying rule, you’ll get an object like so: +If you use the <>, such as the get rule API or find rules API, you'll get an object that contains rule details: + [source, txt] -------------------------------------------------- { - "id": "0a037d60-6b62-11eb-9e0d-85d233e3ee35", - "notify_when": "onActionGroupChange", - "params": { - "aggType": "avg", - }, - "consumer": "alerts", - "rule_type_id": "test.rule.type", - "schedule": { - "interval": "1m" - }, - "actions": [], - "tags": [], - "name": "test rule", - "enabled": true, - "throttle": null, - "api_key_owner": "elastic", - "created_by": "elastic", - "updated_by": "elastic", - "mute_all": false, - "muted_alert_ids": [], - "updated_at": "2021-02-10T05:37:19.086Z", - "created_at": "2021-02-10T05:37:19.086Z", - "scheduled_task_id": "31563950-b14b-11eb-9a7c-9df284da9f99", - "execution_status": { - "last_execution_date": "2021-02-10T17:55:14.262Z", - "status": "ok" - } + "id":"ed30d1b0-7c9e-11ed-ba24-0b137d501cb7", + "name":"cluster_health_rule", + "consumer":"alerts", + "enabled":true, + ... + "scheduled_task_id":"ed30d1b0-7c9e-11ed-ba24-0b137d501cb7", + ... + "next_run":"2022-12-15T17:56:55.713Z" } -------------------------------------------------- -The field you’re looking for is the one called `scheduled_task_id` which includes the _id of the Task Manager task, so if you then go to the Console and run the following query, you’ll get the underlying task. +The field you're looking for is the one called `scheduled_task_id` which includes the identifier for the Task Manager task. You can then go to the Console and find more information about that task in system indices: + +[source, txt] +-------------------------------------------------- +GET .kibana_task_manager/_doc/task:ed30d1b0-7c9e-11ed-ba24-0b137d501cb7 +-------------------------------------------------- + +For example: + [source, txt] -------------------------------------------------- -GET .kibana_task_manager/_doc/task:31563950-b14b-11eb-9a7c-9df284da9f99 { - "_index" : ".kibana_task_manager_8.0.0_001", - "_id" : "task:31563950-b14b-11eb-9a7c-9df284da9f99", - "_version" : 838, - "_seq_no" : 8791, - "_primary_term" : 1, - "found" : true, - "_source" : { - "migrationVersion" : { - "task" : "7.6.0" + "_index": ".kibana_task_manager_8.7.0_001", + "_id": "task:ed30d1b0-7c9e-11ed-ba24-0b137d501cb7", + "_version": 85, + "_seq_no": 13009, + "_primary_term": 3, + "found": true, + "_source": { + "migrationVersion": { + "task": "8.5.0" }, - "task" : { - "schedule" : { - "interval" : "5s" + "task": { + "retryAt": null, + "runAt": "2022-12-15T18:05:19.804Z", + "startedAt": null, + "params": """{"alertId":"ed30d1b0-7c9e-11ed-ba24-0b137d501cb7","spaceId":"default","consumer":"alerts"}""", + "ownerId": null, + "enabled": true, + "schedule": { + "interval": "1m" }, - "taskType" : "alerting:.index-threshold", - "retryAt" : null, - "runAt" : "2021-05-10T05:18:02.704Z", - "scope" : [ + "taskType": "alerting:monitoring_alert_cluster_health", + "scope": [ "alerting" ], - "startedAt" : null, - "state" : """{"alertInstances":{},"previousStartedAt":"2021-05-10T05:17:45.671Z"}""", - "params" : """{"alertId":"30d856c0-b14b-11eb-9a7c-9df284da9f99","spaceId":"default"}""", - "ownerId" : null, - "scheduledAt" : "2021-05-10T04:50:07.333Z", - "attempts" : 0, - "status" : "idle" + "traceparent": "", + "state": """{"alertTypeState":{"lastChecked":1671127459923},"alertInstances":{},"alertRecoveredInstances":{},"previousStartedAt":"2022-12-15T18:04:19.804Z"}""", + "scheduledAt": "2022-12-15T18:04:16.824Z", + "attempts": 0, + "status": "idle" }, - "references" : [ ], - "updated_at" : "2021-05-10T05:17:58.000Z", - "coreMigrationVersion" : "8.0.0", - "type" : "task" + "references": [], + "updated_at": "2022-12-15T18:04:19.998Z", + "coreMigrationVersion": "8.7.0", + "created_at": "2022-12-15T17:35:55.204Z", + "type": "task" } } -------------------------------------------------- -What you can see above is the task that backs the rule, and for the rule to work, this task must be in a healthy state. This information is available via <> or via verbose logs if debug logging is enabled. +For the rule to work, this task must be in a healthy state. Its health information is available in the +<> or in verbose logs if debug logging is enabled. When diagnosing the health state of the task, you will most likely be interested in the following fields: -`status`:: This is the current status of the task. Is Task Manager is currently running? Is Task Manager idle, and you’re waiting for it to run? Or has Task Manager has tried to run it and failed? -`runAt`:: This is when the task is scheduled to run next. If this is in the past and the status is idle, Task Manager has fallen behind or isn’t running. If it’s in the past, but the status is running, then Task Manager has picked it up and is working on it, which is considered healthy. -`retryAt`:: Another time field, like runAt. If this field is populated, then Task Manager is currently running the task. If the task doesn’t complete (and isn't marked as failed), then Task Manager will give it another attempt at the time specified under retryAt. +`status`:: This is the current status of the task. Is Task Manager currently running? Is Task Manager idle, and you're waiting for it to run? Or has Task Manager has tried to run and failed? +`runAt`:: This is when the task is scheduled to run next. If this is in the past and the status is idle, Task Manager has fallen behind or isn't running. If it's in the past, but the status is running, then Task Manager has picked it up and is working on it, which is considered healthy. +`retryAt`:: Another time field, like `runAt`. If this field is populated, then Task Manager is currently running the task. If the task doesn't complete (and isn't marked as failed), then Task Manager will give it another attempt at the time specified under `retryAt`. -Investigating the underlying task can help you gauge whether the problem you’re seeing is rooted in the rule not running at all, whether it’s running and failing, or whether it is running, but exhibiting behavior that is different than what was expected (at which point you should focus on the rule itself, rather than the task). +Investigating the underlying task can help you gauge whether the problem you're seeing is rooted in the rule not running at all, whether it's running and failing, or whether it's running but exhibiting behavior that is different than what was expected (at which point you should focus on the rule itself, rather than the task). In addition to the above methods, refer to the following approaches and common issues: -* <> -* <> -* <> +* <> +* <> +* <> [discrete] [[alerting-limitations]] diff --git a/docs/user/alerting/images/rules-management-health.png b/docs/user/alerting/images/rules-management-health.png index edd16b245ec65..54029d7d33583 100644 Binary files a/docs/user/alerting/images/rules-management-health.png and b/docs/user/alerting/images/rules-management-health.png differ diff --git a/docs/user/security/audit-logging.asciidoc b/docs/user/security/audit-logging.asciidoc index 5f6fe746814e5..b83eea1dc5314 100644 --- a/docs/user/security/audit-logging.asciidoc +++ b/docs/user/security/audit-logging.asciidoc @@ -407,11 +407,19 @@ Example: `[marketing]` | *Field* | *Description* +| `client.ip` +| Client IP address. + | `http.request.method` | HTTP request method. Example: `get`, `post`, `put`, `delete` +| `http.request.headers.x-forwarded-for` +| `X-Forwarded-For` request header used to identify the originating client IP address when connecting through proxy servers. + +Example: `161.66.20.177, 236.198.214.101` + | `url.domain` | Domain of the URL. diff --git a/package.json b/package.json index 57891f7d4a953..4777433f07312 100644 --- a/package.json +++ b/package.json @@ -147,7 +147,7 @@ "@kbn/config": "link:bazel-bin/packages/kbn-config", "@kbn/config-mocks": "link:bazel-bin/packages/kbn-config-mocks", "@kbn/config-schema": "link:bazel-bin/packages/kbn-config-schema", - "@kbn/content-management-inspector": "link:bazel-bin/packages/content-management/inspector", + "@kbn/content-management-content-editor": "link:bazel-bin/packages/content-management/content_editor", "@kbn/content-management-table-list": "link:bazel-bin/packages/content-management/table_list", "@kbn/core-analytics-browser": "link:bazel-bin/packages/core/analytics/core-analytics-browser", "@kbn/core-analytics-browser-internal": "link:bazel-bin/packages/core/analytics/core-analytics-browser-internal", diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index 77e61fe416f10..2570dd42525ea 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -15,7 +15,7 @@ filegroup( "//packages/analytics/shippers/elastic_v3/server:build", "//packages/analytics/shippers/fullstory:build", "//packages/analytics/shippers/gainsight:build", - "//packages/content-management/inspector:build", + "//packages/content-management/content_editor:build", "//packages/content-management/table_list:build", "//packages/core/analytics/core-analytics-browser:build", "//packages/core/analytics/core-analytics-browser-internal:build", @@ -392,7 +392,7 @@ filegroup( "//packages/analytics/shippers/elastic_v3/server:build_types", "//packages/analytics/shippers/fullstory:build_types", "//packages/analytics/shippers/gainsight:build_types", - "//packages/content-management/inspector:build_types", + "//packages/content-management/content_editor:build_types", "//packages/content-management/table_list:build_types", "//packages/core/analytics/core-analytics-browser:build_types", "//packages/core/analytics/core-analytics-browser-internal:build_types", diff --git a/packages/content-management/inspector/BUILD.bazel b/packages/content-management/content_editor/BUILD.bazel similarity index 97% rename from packages/content-management/inspector/BUILD.bazel rename to packages/content-management/content_editor/BUILD.bazel index c4f70c67f68e6..4239f1b51466c 100644 --- a/packages/content-management/inspector/BUILD.bazel +++ b/packages/content-management/content_editor/BUILD.bazel @@ -2,8 +2,8 @@ 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_DIRNAME = "inspector" -PKG_REQUIRE_NAME = "@kbn/content-management-inspector" +PKG_DIRNAME = "content_editor" +PKG_REQUIRE_NAME = "@kbn/content-management-content-editor" SOURCE_FILES = glob( [ diff --git a/packages/content-management/content_editor/README.md b/packages/content-management/content_editor/README.md new file mode 100644 index 0000000000000..669cead43b862 --- /dev/null +++ b/packages/content-management/content_editor/README.md @@ -0,0 +1,7 @@ +# @kbn/content-management-content-editor + +# Content editor component + +## API + +TODO: https://github.com/elastic/kibana/issues/144402 diff --git a/packages/content-management/inspector/index.ts b/packages/content-management/content_editor/index.ts similarity index 70% rename from packages/content-management/inspector/index.ts rename to packages/content-management/content_editor/index.ts index 4258c6a7fb50a..a2daff3be6563 100644 --- a/packages/content-management/inspector/index.ts +++ b/packages/content-management/content_editor/index.ts @@ -6,5 +6,5 @@ * Side Public License, v 1. */ -export { InspectorProvider, InspectorKibanaProvider, useOpenInspector } from './src'; -export type { OpenInspectorParams } from './src'; +export { ContentEditorProvider, ContentEditorKibanaProvider, useOpenContentEditor } from './src'; +export type { OpenContentEditorParams } from './src'; diff --git a/packages/content-management/inspector/jest.config.js b/packages/content-management/content_editor/jest.config.js similarity index 86% rename from packages/content-management/inspector/jest.config.js rename to packages/content-management/content_editor/jest.config.js index 21007732a9e45..2a57fa5dd52b8 100644 --- a/packages/content-management/inspector/jest.config.js +++ b/packages/content-management/content_editor/jest.config.js @@ -9,5 +9,5 @@ module.exports = { preset: '@kbn/test', rootDir: '../../..', - roots: ['/packages/content-management/inspector'], + roots: ['/packages/content-management/content_editor'], }; diff --git a/packages/content-management/inspector/kibana.jsonc b/packages/content-management/content_editor/kibana.jsonc similarity index 70% rename from packages/content-management/inspector/kibana.jsonc rename to packages/content-management/content_editor/kibana.jsonc index 3bd3b38a35cc5..c462cd7103cbd 100644 --- a/packages/content-management/inspector/kibana.jsonc +++ b/packages/content-management/content_editor/kibana.jsonc @@ -1,6 +1,6 @@ { "type": "shared-common", - "id": "@kbn/content-management-inspector", + "id": "@kbn/content-management-content-editor", "owner": "@elastic/kibana-global-experience", "runtimeDeps": [], "typeDeps": [], diff --git a/packages/content-management/inspector/package.json b/packages/content-management/content_editor/package.json similarity index 79% rename from packages/content-management/inspector/package.json rename to packages/content-management/content_editor/package.json index 60a04483baee8..7f09d1faa2f8b 100644 --- a/packages/content-management/inspector/package.json +++ b/packages/content-management/content_editor/package.json @@ -1,5 +1,5 @@ { - "name": "@kbn/content-management-inspector", + "name": "@kbn/content-management-content-editor", "private": true, "version": "1.0.0", "main": "./target_node/index.js", diff --git a/packages/content-management/inspector/src/__jest__/index.ts b/packages/content-management/content_editor/src/__jest__/index.ts similarity index 100% rename from packages/content-management/inspector/src/__jest__/index.ts rename to packages/content-management/content_editor/src/__jest__/index.ts diff --git a/packages/content-management/inspector/src/__jest__/tests.helpers.tsx b/packages/content-management/content_editor/src/__jest__/tests.helpers.tsx similarity index 89% rename from packages/content-management/inspector/src/__jest__/tests.helpers.tsx rename to packages/content-management/content_editor/src/__jest__/tests.helpers.tsx index d8fd7ef9aba35..d71b237010c1c 100644 --- a/packages/content-management/inspector/src/__jest__/tests.helpers.tsx +++ b/packages/content-management/content_editor/src/__jest__/tests.helpers.tsx @@ -9,7 +9,7 @@ import React from 'react'; import type { ComponentType } from 'react'; import { TagSelector, TagList } from '../mocks'; -import { InspectorProvider } from '../services'; +import { ContentEditorProvider } from '../services'; import type { Services } from '../services'; export const getMockServices = (overrides?: Partial) => { @@ -31,9 +31,9 @@ export function WithServices

(Comp: ComponentType

, overrides: Partial { const services = getMockServices(overrides); return ( - + - + ); }; } diff --git a/packages/content-management/inspector/src/components/inspector_flyout_content.tsx b/packages/content-management/content_editor/src/components/editor_flyout_content.tsx similarity index 88% rename from packages/content-management/inspector/src/components/inspector_flyout_content.tsx rename to packages/content-management/content_editor/src/components/editor_flyout_content.tsx index e179aa813bccc..5bbca8363047f 100644 --- a/packages/content-management/inspector/src/components/inspector_flyout_content.tsx +++ b/packages/content-management/content_editor/src/components/editor_flyout_content.tsx @@ -30,16 +30,13 @@ import { useMetadataForm } from './use_metadata_form'; import type { CustomValidators } from './use_metadata_form'; const getI18nTexts = ({ entityName }: { entityName: string }) => ({ - title: i18n.translate('contentManagement.inspector.flyoutTitle', { - defaultMessage: 'Inspector', - }), - saveButtonLabel: i18n.translate('contentManagement.inspector.saveButtonLabel', { + saveButtonLabel: i18n.translate('contentManagement.contentEditor.saveButtonLabel', { defaultMessage: 'Update {entityName}', values: { entityName, }, }), - cancelButtonLabel: i18n.translate('contentManagement.inspector.cancelButtonLabel', { + cancelButtonLabel: i18n.translate('contentManagement.contentEditor.cancelButtonLabel', { defaultMessage: 'Cancel', }), }); @@ -59,7 +56,9 @@ export interface Props { onCancel: () => void; } -export const InspectorFlyoutContent: FC = ({ +const capitalize = (str: string) => `${str.charAt(0).toLocaleUpperCase()}${str.substring(1)}`; + +export const ContentEditorFlyoutContent: FC = ({ item, entityName, isReadonly = true, @@ -113,13 +112,22 @@ export const InspectorFlyoutContent: FC = ({ margin-right: ${euiTheme.size.m}; `; + const title = capitalize( + i18n.translate('contentManagement.contentEditor.flyoutTitle', { + defaultMessage: '{entityName} details', + values: { + entityName, + }, + }) + ); + return ( <>

- {i18nTexts.title} + {title}

diff --git a/packages/content-management/inspector/src/components/inspector_flyout_content_container.tsx b/packages/content-management/content_editor/src/components/editor_flyout_content_container.tsx similarity index 64% rename from packages/content-management/inspector/src/components/inspector_flyout_content_container.tsx rename to packages/content-management/content_editor/src/components/editor_flyout_content_container.tsx index 950295a430fee..af2f36595e8d3 100644 --- a/packages/content-management/inspector/src/components/inspector_flyout_content_container.tsx +++ b/packages/content-management/content_editor/src/components/editor_flyout_content_container.tsx @@ -8,16 +8,16 @@ import React from 'react'; import type { FC } from 'react'; -import { InspectorFlyoutContent } from './inspector_flyout_content'; -import type { Props as InspectorFlyoutContentProps } from './inspector_flyout_content'; +import { ContentEditorFlyoutContent } from './editor_flyout_content'; +import type { Props as ContentEditorFlyoutContentProps } from './editor_flyout_content'; type CommonProps = Pick< - InspectorFlyoutContentProps, + ContentEditorFlyoutContentProps, 'item' | 'isReadonly' | 'services' | 'onSave' | 'onCancel' | 'entityName' | 'customValidators' >; export type Props = CommonProps; -export const InspectorFlyoutContentContainer: FC = (props) => { - return ; +export const ContentEditorFlyoutContentContainer: FC = (props) => { + return ; }; diff --git a/packages/content-management/inspector/src/components/inspector_flyout_warnings.tsx b/packages/content-management/content_editor/src/components/editor_flyout_warnings.tsx similarity index 87% rename from packages/content-management/inspector/src/components/inspector_flyout_warnings.tsx rename to packages/content-management/content_editor/src/components/editor_flyout_warnings.tsx index d3fe61dd71c9c..75b0e9710389f 100644 --- a/packages/content-management/inspector/src/components/inspector_flyout_warnings.tsx +++ b/packages/content-management/content_editor/src/components/editor_flyout_warnings.tsx @@ -11,12 +11,12 @@ import { EuiCallOut, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; const getI18nTexts = () => ({ - title: i18n.translate('contentManagement.inspector.flyoutWarningsTitle', { + title: i18n.translate('contentManagement.contentEditor.flyoutWarningsTitle', { defaultMessage: 'Proceed with caution!', }), }); -export const InspectorFlyoutWarningsCallOut = ({ +export const ContentEditorFlyoutWarningsCallOut = ({ warningMessages, }: { warningMessages?: string[]; diff --git a/packages/content-management/inspector/src/components/inspector_loader.tsx b/packages/content-management/content_editor/src/components/editor_loader.tsx similarity index 75% rename from packages/content-management/inspector/src/components/inspector_loader.tsx rename to packages/content-management/content_editor/src/components/editor_loader.tsx index aeaf09f7c30b4..63967624426fa 100644 --- a/packages/content-management/inspector/src/components/inspector_loader.tsx +++ b/packages/content-management/content_editor/src/components/editor_loader.tsx @@ -9,16 +9,16 @@ import React, { useState, useCallback, useEffect } from 'react'; import { EuiFlyoutHeader, EuiFlyoutBody, EuiFlyoutFooter } from '@elastic/eui'; -import type { Props } from './inspector_flyout_content_container'; +import type { Props } from './editor_flyout_content_container'; -export const InspectorLoader: React.FC = (props) => { +export const ContentEditorLoader: React.FC = (props) => { const [Editor, setEditor] = useState | null>(null); const loadEditor = useCallback(async () => { - const { InspectorFlyoutContentContainer } = await import( - './inspector_flyout_content_container' + const { ContentEditorFlyoutContentContainer } = await import( + './editor_flyout_content_container' ); - setEditor(() => InspectorFlyoutContentContainer); + setEditor(() => ContentEditorFlyoutContentContainer); }, []); useEffect(() => { diff --git a/packages/content-management/inspector/src/components/index.ts b/packages/content-management/content_editor/src/components/index.ts similarity index 68% rename from packages/content-management/inspector/src/components/index.ts rename to packages/content-management/content_editor/src/components/index.ts index 56a572a5907b6..afd10ab13faf9 100644 --- a/packages/content-management/inspector/src/components/index.ts +++ b/packages/content-management/content_editor/src/components/index.ts @@ -6,5 +6,5 @@ * Side Public License, v 1. */ -export { InspectorLoader } from './inspector_loader'; -export type { Props as InspectorFlyoutContentContainerProps } from './inspector_flyout_content_container'; +export { ContentEditorLoader } from './editor_loader'; +export type { Props as ContentEditorFlyoutContentContainerProps } from './editor_flyout_content_container'; diff --git a/packages/content-management/inspector/src/components/inspector_flyout_content.test.tsx b/packages/content-management/content_editor/src/components/inspector_flyout_content.test.tsx similarity index 90% rename from packages/content-management/inspector/src/components/inspector_flyout_content.test.tsx rename to packages/content-management/content_editor/src/components/inspector_flyout_content.test.tsx index 1811807f66207..e4668d022d00d 100644 --- a/packages/content-management/inspector/src/components/inspector_flyout_content.test.tsx +++ b/packages/content-management/content_editor/src/components/inspector_flyout_content.test.tsx @@ -11,10 +11,10 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { registerTestBed } from '@kbn/test-jest-helpers'; import type { TestBed } from '@kbn/test-jest-helpers'; import { getMockServices } from '../__jest__'; -import { InspectorFlyoutContent } from './inspector_flyout_content'; -import type { Props as InspectorFlyoutContentProps } from './inspector_flyout_content'; +import { ContentEditorFlyoutContent } from './editor_flyout_content'; +import type { Props as ContentEditorFlyoutContentProps } from './editor_flyout_content'; -describe('', () => { +describe('', () => { beforeAll(() => { jest.useFakeTimers(); }); @@ -26,7 +26,7 @@ describe('', () => { describe('metadata', () => { let testBed: TestBed; - const savedObjectItem: InspectorFlyoutContentProps['item'] = { + const savedObjectItem: ContentEditorFlyoutContentProps['item'] = { id: '123', title: 'Foo', description: 'Some description', @@ -38,29 +38,33 @@ describe('', () => { const mockedServices = getMockServices(); - const defaultProps: InspectorFlyoutContentProps = { + const defaultProps: ContentEditorFlyoutContentProps = { item: savedObjectItem, entityName: 'foo', services: mockedServices, onCancel: jest.fn(), }; - const setup = registerTestBed(InspectorFlyoutContent, { - memoryRouter: { wrapComponent: false }, - defaultProps, - }); + const setup = registerTestBed( + ContentEditorFlyoutContent, + { + memoryRouter: { wrapComponent: false }, + defaultProps, + } + ); - const waitForValidationResults = async () => - await act(() => { + const waitForValidationResults = async () => { + await act(async () => { jest.advanceTimersByTime(550); // There is a 500ms delay to display input errors + async validation }); + }; test('should set the correct flyout title', async () => { await act(async () => { testBed = await setup(); }); const { find } = testBed!; - expect(find('flyoutTitle').text()).toBe('Inspector'); + expect(find('flyoutTitle').text()).toBe('Foo details'); }); test('should render the form with the provided item', async () => { diff --git a/packages/content-management/inspector/src/components/metadata_form.tsx b/packages/content-management/content_editor/src/components/metadata_form.tsx similarity index 83% rename from packages/content-management/inspector/src/components/metadata_form.tsx rename to packages/content-management/content_editor/src/components/metadata_form.tsx index 7622e29e125a0..5d0dfc53a681d 100644 --- a/packages/content-management/inspector/src/components/metadata_form.tsx +++ b/packages/content-management/content_editor/src/components/metadata_form.tsx @@ -11,7 +11,7 @@ import type { FC } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiForm, EuiFormRow, EuiFieldText, EuiTextArea, EuiSpacer } from '@elastic/eui'; -import { InspectorFlyoutWarningsCallOut } from './inspector_flyout_warnings'; +import { ContentEditorFlyoutWarningsCallOut } from './editor_flyout_warnings'; import type { MetadataFormState, Field } from './use_metadata_form'; import type { SavedObjectsReference, Services } from '../services'; @@ -49,10 +49,10 @@ export const MetadataForm: FC = ({ return ( - + = ({ = ({ <> { if (!value || !value.trim()) { - return i18n.translate('contentManagement.inspector.metadataForm.nameIsEmptyError', { + return i18n.translate('contentManagement.contentEditor.metadataForm.nameIsEmptyError', { defaultMessage: 'A name is required.', }); } diff --git a/packages/content-management/inspector/src/index.ts b/packages/content-management/content_editor/src/index.ts similarity index 62% rename from packages/content-management/inspector/src/index.ts rename to packages/content-management/content_editor/src/index.ts index 4226a03b28338..1470cfdb3e4f8 100644 --- a/packages/content-management/inspector/src/index.ts +++ b/packages/content-management/content_editor/src/index.ts @@ -6,6 +6,6 @@ * Side Public License, v 1. */ -export { InspectorProvider, InspectorKibanaProvider } from './services'; -export { useOpenInspector } from './open_inspector'; -export type { OpenInspectorParams } from './open_inspector'; +export { ContentEditorProvider, ContentEditorKibanaProvider } from './services'; +export { useOpenContentEditor } from './open_content_editor'; +export type { OpenContentEditorParams } from './open_content_editor'; diff --git a/packages/content-management/inspector/src/mocks.tsx b/packages/content-management/content_editor/src/mocks.tsx similarity index 100% rename from packages/content-management/inspector/src/mocks.tsx rename to packages/content-management/content_editor/src/mocks.tsx diff --git a/packages/content-management/inspector/src/open_inspector.test.tsx b/packages/content-management/content_editor/src/open_content_editor.test.tsx similarity index 75% rename from packages/content-management/inspector/src/open_inspector.test.tsx rename to packages/content-management/content_editor/src/open_content_editor.test.tsx index d9a1a6ee229ac..187d1a04b511f 100644 --- a/packages/content-management/inspector/src/open_inspector.test.tsx +++ b/packages/content-management/content_editor/src/open_content_editor.test.tsx @@ -11,20 +11,20 @@ import { registerTestBed } from '@kbn/test-jest-helpers'; import { WithServices, getMockServices } from './__jest__'; import type { Services } from './services'; import type { Item } from './types'; -import { InspectorLoader } from './components'; -import { useOpenInspector } from './open_inspector'; +import { ContentEditorLoader } from './components'; +import { useOpenContentEditor } from './open_content_editor'; -describe('useOpenInspector() hook', () => { +describe('useOpenContentEditor() hook', () => { const savedObjectItem: Item = { id: 'id', title: 'Foo', tags: [] }; const TestComp = () => { - const openInspector = useOpenInspector(); + const openContentEditor = useOpenContentEditor(); return ( @@ -41,11 +41,11 @@ describe('useOpenInspector() hook', () => { test('should call the "openFlyout" provided', () => { const { find } = setup(); - find('openInspectorButton').simulate('click'); + find('openContentEditorButton').simulate('click'); expect(openFlyout).toHaveBeenCalled(); const args = openFlyout.mock.calls[0][0] as any; - expect(args?.type).toBe(InspectorLoader); + expect(args?.type).toBe(ContentEditorLoader); expect(args?.props.item).toBe(savedObjectItem); expect(args?.props.services).toEqual(mockedServices); }); diff --git a/packages/content-management/inspector/src/open_inspector.tsx b/packages/content-management/content_editor/src/open_content_editor.tsx similarity index 76% rename from packages/content-management/inspector/src/open_inspector.tsx rename to packages/content-management/content_editor/src/open_content_editor.tsx index c14a37c10e9c0..37d06be73aeb4 100644 --- a/packages/content-management/inspector/src/open_inspector.tsx +++ b/packages/content-management/content_editor/src/open_content_editor.tsx @@ -10,21 +10,21 @@ import type { OverlayRef } from '@kbn/core-mount-utils-browser'; import { useServices } from './services'; -import { InspectorLoader } from './components'; -import type { InspectorFlyoutContentContainerProps } from './components'; +import { ContentEditorLoader } from './components'; +import type { ContentEditorFlyoutContentContainerProps } from './components'; -export type OpenInspectorParams = Pick< - InspectorFlyoutContentContainerProps, +export type OpenContentEditorParams = Pick< + ContentEditorFlyoutContentContainerProps, 'item' | 'onSave' | 'isReadonly' | 'entityName' | 'customValidators' >; -export function useOpenInspector() { +export function useOpenContentEditor() { const services = useServices(); const { openFlyout } = services; const flyout = useRef(null); return useCallback( - (args: OpenInspectorParams) => { + (args: OpenContentEditorParams) => { // Validate arguments if (args.isReadonly === false && args.onSave === undefined) { throw new Error(`A value for [onSave()] must be provided when [isReadonly] is false.`); @@ -35,7 +35,7 @@ export function useOpenInspector() { }; flyout.current = openFlyout( - , + , { maxWidth: 600, size: 'm', diff --git a/packages/content-management/inspector/src/services.tsx b/packages/content-management/content_editor/src/services.tsx similarity index 85% rename from packages/content-management/inspector/src/services.tsx rename to packages/content-management/content_editor/src/services.tsx index 0d933a0c12b17..831d9e05587d1 100644 --- a/packages/content-management/inspector/src/services.tsx +++ b/packages/content-management/content_editor/src/services.tsx @@ -36,19 +36,19 @@ export interface Services { TagSelector?: React.FC; } -const InspectorContext = React.createContext(null); +const ContentEditorContext = React.createContext(null); /** * Abstract external service Provider. */ -export const InspectorProvider: FC = ({ children, ...services }) => { - return {children}; +export const ContentEditorProvider: FC = ({ children, ...services }) => { + return {children}; }; /** * Kibana-specific service types. */ -export interface InspectorKibanaDependencies { +export interface ContentEditorKibanaDependencies { /** CoreStart contract */ core: { overlays: { @@ -97,7 +97,7 @@ export interface InspectorKibanaDependencies { /** * Kibana-specific Provider that maps to known dependency types. */ -export const InspectorKibanaProvider: FC = ({ +export const ContentEditorKibanaProvider: FC = ({ children, ...services }) => { @@ -124,7 +124,7 @@ export const InspectorKibanaProvider: FC = ({ ); return ( - { core.notifications.toasts.addDanger({ title: toMountPoint(title), text }); @@ -133,7 +133,7 @@ export const InspectorKibanaProvider: FC = ({ TagSelector={savedObjectsTagging?.ui.components.SavedObjectSaveModalTagSelector} > {children} - + ); }; @@ -141,11 +141,11 @@ export const InspectorKibanaProvider: FC = ({ * React hook for accessing pre-wired services. */ export function useServices() { - const context = useContext(InspectorContext); + const context = useContext(ContentEditorContext); if (!context) { throw new Error( - 'InspectorContext is missing. Ensure your component or React root is wrapped with or .' + 'ContentEditorContext is missing. Ensure your component or React root is wrapped with or .' ); } diff --git a/packages/content-management/inspector/src/types.ts b/packages/content-management/content_editor/src/types.ts similarity index 100% rename from packages/content-management/inspector/src/types.ts rename to packages/content-management/content_editor/src/types.ts diff --git a/packages/content-management/inspector/tsconfig.json b/packages/content-management/content_editor/tsconfig.json similarity index 100% rename from packages/content-management/inspector/tsconfig.json rename to packages/content-management/content_editor/tsconfig.json diff --git a/packages/content-management/inspector/README.md b/packages/content-management/inspector/README.md deleted file mode 100644 index 4bbf2c5b6e37f..0000000000000 --- a/packages/content-management/inspector/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# @kbn/content-management-inspector - -# Content inspector component - -## API - -TODO: https://github.com/elastic/kibana/issues/144402 diff --git a/packages/content-management/table_list/BUILD.bazel b/packages/content-management/table_list/BUILD.bazel index bb4e821d8667d..b8758eb21314f 100644 --- a/packages/content-management/table_list/BUILD.bazel +++ b/packages/content-management/table_list/BUILD.bazel @@ -49,7 +49,7 @@ NPM_MODULE_EXTRA_FILES = [ RUNTIME_DEPS = [ "//packages/kbn-i18n-react", "//packages/kbn-i18n", - "//packages/content-management/inspector", + "//packages/content-management/content_editor", "//packages/core/http/core-http-browser", "//packages/core/theme/core-theme-browser", "//packages/kbn-safer-lodash-set", @@ -76,7 +76,7 @@ RUNTIME_DEPS = [ TYPES_DEPS = [ "//packages/kbn-i18n:npm_module_types", "//packages/kbn-i18n-react:npm_module_types", - "//packages/content-management/inspector:npm_module_types", + "//packages/content-management/content_editor:npm_module_types", "//packages/core/http/core-http-browser:npm_module_types", "//packages/core/theme/core-theme-browser:npm_module_types", "//packages/core/mount-utils/core-mount-utils-browser:npm_module_types", diff --git a/packages/content-management/table_list/src/__jest__/tests.helpers.tsx b/packages/content-management/table_list/src/__jest__/tests.helpers.tsx index 9fd8fa66cee6c..5fb8b605d9202 100644 --- a/packages/content-management/table_list/src/__jest__/tests.helpers.tsx +++ b/packages/content-management/table_list/src/__jest__/tests.helpers.tsx @@ -8,7 +8,7 @@ import React from 'react'; import type { ComponentType } from 'react'; import { from } from 'rxjs'; -import { InspectorProvider } from '@kbn/content-management-inspector'; +import { ContentEditorProvider } from '@kbn/content-management-content-editor'; import { TagList } from '../mocks'; import { TableListViewProvider, Services } from '../services'; @@ -35,11 +35,11 @@ export function WithServices

(Comp: ComponentType

, overrides: Partial { const services = getMockServices(overrides); return ( - undefined}> + undefined}> - + ); }; } diff --git a/packages/content-management/table_list/src/services.tsx b/packages/content-management/table_list/src/services.tsx index 3ad0acd5f93bd..a328641ad031f 100644 --- a/packages/content-management/table_list/src/services.tsx +++ b/packages/content-management/table_list/src/services.tsx @@ -12,7 +12,7 @@ import type { FormattedRelative } from '@kbn/i18n-react'; import type { MountPoint, OverlayRef } from '@kbn/core-mount-utils-browser'; import type { OverlayFlyoutOpenOptions } from '@kbn/core-overlays-browser'; import { RedirectAppLinksKibanaProvider } from '@kbn/shared-ux-link-redirect-app'; -import { InspectorKibanaProvider } from '@kbn/content-management-inspector'; +import { ContentEditorKibanaProvider } from '@kbn/content-management-content-editor'; import { TAG_MANAGEMENT_APP_URL } from './constants'; import type { Tag } from './types'; @@ -218,7 +218,7 @@ export const TableListViewKibanaProvider: FC = return ( - = > {children} - + ); }; diff --git a/packages/content-management/table_list/src/table_list_view.test.tsx b/packages/content-management/table_list/src/table_list_view.test.tsx index 28a04d1ac84c3..40893295fe340 100644 --- a/packages/content-management/table_list/src/table_list_view.test.tsx +++ b/packages/content-management/table_list/src/table_list_view.test.tsx @@ -52,6 +52,7 @@ const requiredProps: TableListViewProps = { }; // FLAKY: https://github.com/elastic/kibana/issues/145267 +// Note: I will unskip as part of https://github.com/elastic/kibana/pull/145618 describe.skip('TableListView', () => { beforeAll(() => { jest.useFakeTimers({ legacyFakeTimers: true }); @@ -538,7 +539,7 @@ describe.skip('TableListView', () => { }); }); - describe('inspector', () => { + describe('content editor', () => { const setupInspector = registerTestBed( WithServices(TableListView), { @@ -570,13 +571,13 @@ describe.skip('TableListView', () => { }, ]; - test('should have an "inpect" button if the inspector is enabled', async () => { + test('should have an "inpect" button if the content editor is enabled', async () => { let testBed: TestBed; await act(async () => { testBed = await setupInspector({ findItems: jest.fn().mockResolvedValue({ total: hits.length, hits }), - inspector: { enabled: true }, + contentEditor: { enabled: true }, }); }); @@ -584,8 +585,8 @@ describe.skip('TableListView', () => { component.update(); const { tableCellsValues } = table.getMetaData('itemsInMemTable'); - expect(tableCellsValues[0][2]).toBe('Inspect Item 1'); - expect(tableCellsValues[1][2]).toBe('Inspect Item 2'); + expect(tableCellsValues[0][2]).toBe('View Item 1 details'); + expect(tableCellsValues[1][2]).toBe('View Item 2 details'); }); }); diff --git a/packages/content-management/table_list/src/table_list_view.tsx b/packages/content-management/table_list/src/table_list_view.tsx index de5e890575d28..706c39bc7b266 100644 --- a/packages/content-management/table_list/src/table_list_view.tsx +++ b/packages/content-management/table_list/src/table_list_view.tsx @@ -26,8 +26,8 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import type { IHttpFetchError } from '@kbn/core-http-browser'; import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; -import { useOpenInspector } from '@kbn/content-management-inspector'; -import type { OpenInspectorParams } from '@kbn/content-management-inspector'; +import { useOpenContentEditor } from '@kbn/content-management-content-editor'; +import type { OpenContentEditorParams } from '@kbn/content-management-content-editor'; import { Table, @@ -43,8 +43,8 @@ import { getReducer } from './reducer'; import type { SortColumnField } from './components'; import { useTags } from './use_tags'; -interface InspectorConfig - extends Pick { +interface ContentEditorConfig + extends Pick { enabled?: boolean; } @@ -96,7 +96,7 @@ export interface Props { @@ -151,7 +151,7 @@ function TableListViewComp({ getDetailViewLink, onClickTitle, id = 'userContent', - inspector = { enabled: false }, + contentEditor = { enabled: false }, children, titleColumnName, additionalRightSideActions = [], @@ -169,9 +169,9 @@ function TableListViewComp({ ); } - if (inspector.isReadonly === false && inspector.onSave === undefined) { + if (contentEditor.isReadonly === false && contentEditor.onSave === undefined) { throw new Error( - `[TableListView] A value for [inspector.onSave()] must be provided when [inspector.isReadonly] is false.` + `[TableListView] A value for [contentEditor.onSave()] must be provided when [contentEditor.isReadonly] is false.` ); } @@ -275,7 +275,7 @@ function TableListViewComp({ } }, [searchQueryParser, findItems, searchQuery.text]); - const openInspector = useOpenInspector(); + const openContentEditor = useOpenContentEditor(); const updateQuery = useCallback((query: Query) => { dispatch({ @@ -301,7 +301,7 @@ function TableListViewComp({ return item.references.find(({ id: refId }) => refId === _id) as SavedObjectsReference; }); - const close = openInspector({ + const close = openContentEditor({ item: { id: item.id, title: item.attributes.title, @@ -309,18 +309,18 @@ function TableListViewComp({ tags, }, entityName, - ...inspector, + ...contentEditor, onSave: - inspector.onSave && + contentEditor.onSave && (async (args) => { - await inspector.onSave!(args); + await contentEditor.onSave!(args); await fetchItems(); close(); }), }); }, - [getTagIdsFromReferences, openInspector, entityName, inspector, fetchItems] + [getTagIdsFromReferences, openContentEditor, entityName, contentEditor, fetchItems] ); const tableColumns = useMemo(() => { @@ -373,7 +373,7 @@ function TableListViewComp({ } // Add "Actions" column - if (editItem || inspector.enabled !== false) { + if (editItem || contentEditor.enabled !== false) { const actions: EuiTableActionsColumnType['actions'] = []; if (editItem) { @@ -399,20 +399,23 @@ function TableListViewComp({ }); } - if (inspector.enabled !== false) { + if (contentEditor.enabled !== false) { actions.push({ name: (item) => { - return i18n.translate('contentManagement.tableList.listing.table.inspectActionName', { - defaultMessage: 'Inspect {itemDescription}', - values: { - itemDescription: get(item, 'attributes.title'), - }, - }); + return i18n.translate( + 'contentManagement.tableList.listing.table.viewDetailsActionName', + { + defaultMessage: 'View {itemTitle} details', + values: { + itemTitle: get(item, 'attributes.title'), + }, + } + ); }, description: i18n.translate( - 'contentManagement.tableList.listing.table.inspectActionDescription', + 'contentManagement.tableList.listing.table.viewDetailsActionDescription', { - defaultMessage: 'Inspect', + defaultMessage: 'View details', } ), icon: 'inspect', @@ -443,7 +446,7 @@ function TableListViewComp({ addOrRemoveIncludeTagFilter, addOrRemoveExcludeTagFilter, DateFormatterComp, - inspector, + contentEditor, inspectItem, ]); diff --git a/packages/core/http/core-http-router-server-internal/src/socket.test.ts b/packages/core/http/core-http-router-server-internal/src/socket.test.ts index 389c08825d51b..b39c0e5514905 100644 --- a/packages/core/http/core-http-router-server-internal/src/socket.test.ts +++ b/packages/core/http/core-http-router-server-internal/src/socket.test.ts @@ -152,4 +152,11 @@ describe('KibanaSocket', () => { expect(socket.authorizationError).toBe(authorizationError); }); }); + + describe('remoteAddress', () => { + it('mirrors the value of net.Socket instance', () => { + const socket = new KibanaSocket({ remoteAddress: '1.1.1.1' } as Socket); + expect(socket.remoteAddress).toBe('1.1.1.1'); + }); + }); }); diff --git a/packages/core/http/core-http-router-server-internal/src/socket.ts b/packages/core/http/core-http-router-server-internal/src/socket.ts index 14923a51e9f7f..03e70624921b4 100644 --- a/packages/core/http/core-http-router-server-internal/src/socket.ts +++ b/packages/core/http/core-http-router-server-internal/src/socket.ts @@ -20,6 +20,10 @@ export class KibanaSocket implements IKibanaSocket { return this.socket instanceof TLSSocket ? this.socket.authorizationError : undefined; } + public get remoteAddress() { + return this.socket.remoteAddress; + } + constructor(private readonly socket: Socket) {} getPeerCertificate(detailed: true): DetailedPeerCertificate | null; diff --git a/packages/core/http/core-http-server/src/router/socket.ts b/packages/core/http/core-http-server/src/router/socket.ts index cc47373a583f2..b4c53a95daab3 100644 --- a/packages/core/http/core-http-server/src/router/socket.ts +++ b/packages/core/http/core-http-server/src/router/socket.ts @@ -51,4 +51,11 @@ export interface IKibanaSocket { * only when `authorized` is `false`. */ readonly authorizationError?: Error; + + /** + * The string representation of the remote IP address. For example,`'74.125.127.100'` or + * `'2001:4860:a005::68'`. Value may be `undefined` if the socket is destroyed (for example, if + * the client disconnected). + */ + readonly remoteAddress?: string; } diff --git a/packages/kbn-io-ts-utils/index.ts b/packages/kbn-io-ts-utils/index.ts index c964dcaa5b749..4e3eaeb9af92b 100644 --- a/packages/kbn-io-ts-utils/index.ts +++ b/packages/kbn-io-ts-utils/index.ts @@ -19,3 +19,4 @@ export { toNumberRt } from './src/to_number_rt'; export { toBooleanRt } from './src/to_boolean_rt'; export { toJsonSchema } from './src/to_json_schema'; export { nonEmptyStringRt } from './src/non_empty_string_rt'; +export { createLiteralValueFromUndefinedRT } from './src/literal_value_from_undefined_rt'; diff --git a/x-pack/plugins/monitoring/common/http_api/shared/literal_value.test.ts b/packages/kbn-io-ts-utils/src/literal_value_from_undefined_rt/index.test.ts similarity index 77% rename from x-pack/plugins/monitoring/common/http_api/shared/literal_value.test.ts rename to packages/kbn-io-ts-utils/src/literal_value_from_undefined_rt/index.test.ts index 3d70e86620602..4da220f812221 100644 --- a/x-pack/plugins/monitoring/common/http_api/shared/literal_value.test.ts +++ b/packages/kbn-io-ts-utils/src/literal_value_from_undefined_rt/index.test.ts @@ -1,13 +1,14 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ import { either } from 'fp-ts'; import * as rt from 'io-ts'; -import { createLiteralValueFromUndefinedRT } from './literal_value'; +import { createLiteralValueFromUndefinedRT } from '.'; describe('LiteralValueFromUndefined runtime type', () => { it('decodes undefined to a given literal value', () => { diff --git a/x-pack/plugins/monitoring/common/http_api/shared/literal_value.ts b/packages/kbn-io-ts-utils/src/literal_value_from_undefined_rt/index.ts similarity index 74% rename from x-pack/plugins/monitoring/common/http_api/shared/literal_value.ts rename to packages/kbn-io-ts-utils/src/literal_value_from_undefined_rt/index.ts index 55719d6b31b12..3d5f1b06fabd4 100644 --- a/x-pack/plugins/monitoring/common/http_api/shared/literal_value.ts +++ b/packages/kbn-io-ts-utils/src/literal_value_from_undefined_rt/index.ts @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ import * as rt from 'io-ts'; diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index afd416ce6ad87..cab54de0aacc6 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -11,6 +11,7 @@ pageLoadAssetSize: charts: 55000 cloud: 21076 cloudChat: 19894 + cloudDataMigration: 19170 cloudExperiments: 59358 cloudFullStory: 18493 cloudGainsight: 18710 diff --git a/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts b/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts index c11b4b3902d59..65670d5d21ff0 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts @@ -138,6 +138,7 @@ describe('checking migration metadata changes on all registered SO types', () => "space": "c4a0acce1bd4b9cce85154f2a350624a53111c59", "spaces-usage-stats": "922d3235bbf519e3fb3b260e27248b1df8249b79", "synthetics-monitor": "7c1e5a78fb3b88cc03b441d3bf3714d9967ab214", + "synthetics-param": "53dee203042c238888247084336f2dba777f4a65", "synthetics-privates-locations": "dd00385f4a27ef062c3e57312eeb3799872fa4af", "tag": "39413f4578cc2128c9a0fda97d0acd1c8862c47a", "task": "ef53d0f070bd54957b8fe22fae3b1ff208913f76", diff --git a/src/core/server/integration_tests/saved_objects/migrations/type_registrations.test.ts b/src/core/server/integration_tests/saved_objects/migrations/type_registrations.test.ts index ab4498a79941c..2cb85526f9340 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/type_registrations.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/type_registrations.test.ts @@ -108,6 +108,7 @@ const previouslyRegisteredTypes = [ 'space', 'spaces-usage-stats', 'synthetics-monitor', + 'synthetics-param', 'synthetics-privates-locations', 'tag', 'task', diff --git a/src/plugins/bfetch/common/bfetch_error.ts b/src/plugins/bfetch/common/bfetch_error.ts new file mode 100644 index 0000000000000..582178f645b2b --- /dev/null +++ b/src/plugins/bfetch/common/bfetch_error.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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { i18n } from '@kbn/i18n'; + +/** + * Error thrown when xhr request fails + * @public + */ +export class BfetchRequestError extends Error { + /** + * constructor + * @param code - Xhr error code + */ + constructor(code: number) { + const message = + code === 0 + ? i18n.translate('bfetch.networkError', { + defaultMessage: 'Check your network connection and try again.', + }) + : i18n.translate('bfetch.networkErrorWithStatus', { + defaultMessage: 'Check your network connection and try again. Code {code}', + values: { code }, + }); + + super(message); + this.name = 'BfetchRequestError'; + this.code = code; + } + + code: number; +} diff --git a/src/plugins/bfetch/common/index.ts b/src/plugins/bfetch/common/index.ts index 491cabd03bf68..41049459bb85c 100644 --- a/src/plugins/bfetch/common/index.ts +++ b/src/plugins/bfetch/common/index.ts @@ -12,3 +12,4 @@ export type { ItemBufferParams, TimedItemBufferParams, BatchedFunctionParams } f export { ItemBuffer, TimedItemBuffer, createBatchedFunction } from './buffer'; export type { ErrorLike, BatchRequestData, BatchResponseItem, BatchItemWrapper } from './batch'; export { DISABLE_BFETCH_COMPRESSION, DISABLE_BFETCH } from './constants'; +export { BfetchRequestError } from './bfetch_error'; diff --git a/src/plugins/bfetch/common/util/normalize_error.ts b/src/plugins/bfetch/common/util/normalize_error.ts index 618ac6cc91c58..ab34f89a9feed 100644 --- a/src/plugins/bfetch/common/util/normalize_error.ts +++ b/src/plugins/bfetch/common/util/normalize_error.ts @@ -7,6 +7,7 @@ */ import { ErrorLike } from '../batch'; +import { BfetchRequestError } from '..'; export const normalizeError = (err: any): E => { if (!err) { @@ -14,6 +15,11 @@ export const normalizeError = (err: any): E => message: 'Unknown error.', } as E; } + if (err instanceof BfetchRequestError) { + // ignoring so we can return the error as is + // @ts-expect-error + return err; + } if (err instanceof Error) { return { message: err.message } as E; } diff --git a/src/plugins/bfetch/public/index.ts b/src/plugins/bfetch/public/index.ts index a4c60cdf127d7..aba764781f78e 100644 --- a/src/plugins/bfetch/public/index.ts +++ b/src/plugins/bfetch/public/index.ts @@ -15,6 +15,7 @@ export { split } from './streaming'; export type { BatchedFunc } from './batching/types'; export { DISABLE_BFETCH } from '../common/constants'; +export { BfetchRequestError } from '../common/bfetch_error'; export function plugin(initializerContext: PluginInitializerContext) { return new BfetchPublicPlugin(initializerContext); diff --git a/src/plugins/bfetch/public/streaming/fetch_streaming.test.ts b/src/plugins/bfetch/public/streaming/fetch_streaming.test.ts index 21afa03c18920..c09d1649bc19f 100644 --- a/src/plugins/bfetch/public/streaming/fetch_streaming.test.ts +++ b/src/plugins/bfetch/public/streaming/fetch_streaming.test.ts @@ -271,7 +271,7 @@ test('promise throws when request errors', async () => { expect(spy).toHaveBeenCalledTimes(1); expect(spy.mock.calls[0][0]).toBeInstanceOf(Error); expect(spy.mock.calls[0][0].message).toMatchInlineSnapshot( - `"Batch request failed with status 400"` + `"Check your network connection and try again. Code 400"` ); }); @@ -300,7 +300,7 @@ test('stream observable errors when request errors', async () => { expect(spy).toHaveBeenCalledTimes(1); expect(spy.mock.calls[0][0]).toBeInstanceOf(Error); expect(spy.mock.calls[0][0].message).toMatchInlineSnapshot( - `"Batch request failed with status 400"` + `"Check your network connection and try again. Code 400"` ); }); diff --git a/src/plugins/bfetch/public/streaming/from_streaming_xhr.test.ts b/src/plugins/bfetch/public/streaming/from_streaming_xhr.test.ts index d73f7a9b5099b..8525d2c0266b0 100644 --- a/src/plugins/bfetch/public/streaming/from_streaming_xhr.test.ts +++ b/src/plugins/bfetch/public/streaming/from_streaming_xhr.test.ts @@ -152,7 +152,7 @@ test('errors observable if request returns with error', () => { expect(error).toHaveBeenCalledTimes(1); expect(error.mock.calls[0][0]).toBeInstanceOf(Error); expect(error.mock.calls[0][0].message).toMatchInlineSnapshot( - `"Batch request failed with status 400"` + `"Check your network connection and try again. Code 400"` ); }); @@ -182,7 +182,7 @@ test('does not emit when gets error response', () => { expect(error).toHaveBeenCalledTimes(1); expect(error.mock.calls[0][0]).toBeInstanceOf(Error); expect(error.mock.calls[0][0].message).toMatchInlineSnapshot( - `"Batch request failed with status 400"` + `"Check your network connection and try again. Code 400"` ); }); diff --git a/src/plugins/bfetch/public/streaming/from_streaming_xhr.ts b/src/plugins/bfetch/public/streaming/from_streaming_xhr.ts index d81c7bfa694c2..6e65e556f53c4 100644 --- a/src/plugins/bfetch/public/streaming/from_streaming_xhr.ts +++ b/src/plugins/bfetch/public/streaming/from_streaming_xhr.ts @@ -7,6 +7,7 @@ */ import { Observable, Subject } from 'rxjs'; +import { BfetchRequestError } from '../../common'; /** * Creates observable from streaming XMLHttpRequest, where each event @@ -61,7 +62,7 @@ export const fromStreamingXhr = ( if (signal) signal.removeEventListener('abort', onBatchAbort); if (isErrorStatus()) { - subject.error(new Error(`Batch request failed with status ${xhr.status}`)); + subject.error(new BfetchRequestError(xhr.status)); } else { subject.complete(); } diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.test.tsx b/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.test.tsx index b26d368caa438..a16f1c2ad77ab 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.test.tsx +++ b/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.test.tsx @@ -77,6 +77,8 @@ describe('PartitionVisComponent', function () { syncColors: false, fireEvent: jest.fn(), renderComplete: jest.fn(), + interactive: true, + columnCellValueActions: [], services: { data: dataPluginMock.createStartContract(), fieldFormats: fieldFormatsServiceMock.createStartContract(), @@ -172,6 +174,16 @@ describe('PartitionVisComponent', function () { }); }); + it('should render legend actions when it is interactive', async () => { + const component = shallow(); + expect(component.find(Settings).prop('legendAction')).toBeDefined(); + }); + + it('should not render legend actions when it is not interactive', async () => { + const component = shallow(); + expect(component.find(Settings).prop('legendAction')).toBeUndefined(); + }); + it('hides the legend if the legend toggle is clicked', async () => { const component = mountWithIntl(); await actWithTimeout(async () => { diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.tsx b/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.tsx index 352f03f59e619..843d6075ac60d 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.tsx +++ b/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.tsx @@ -68,7 +68,7 @@ import { } from './partition_vis_component.styles'; import { ChartTypes } from '../../common/types'; import { filterOutConfig } from '../utils/filter_out_config'; -import { FilterEvent, StartDeps } from '../types'; +import { ColumnCellValueActions, FilterEvent, StartDeps } from '../types'; declare global { interface Window { @@ -85,19 +85,23 @@ export interface PartitionVisComponentProps { uiState: PersistedState; fireEvent: IInterpreterRenderHandlers['event']; renderComplete: IInterpreterRenderHandlers['done']; + interactive: boolean; chartsThemeService: ChartsPluginSetup['theme']; palettesRegistry: PaletteRegistry; services: Pick; syncColors: boolean; + columnCellValueActions: ColumnCellValueActions; } const PartitionVisComponent = (props: PartitionVisComponentProps) => { const { + columnCellValueActions, visData: originalVisData, visParams: preVisParams, visType, services, syncColors, + interactive, } = props; const visParams = useMemo(() => filterOutConfig(visType, preVisParams), [preVisParams, visType]); const chartTheme = props.chartsThemeService.useChartsTheme(); @@ -313,6 +317,32 @@ const PartitionVisComponent = (props: PartitionVisComponentProps) => { ] ); + const legendActions = useMemo( + () => + interactive + ? getLegendActions( + canFilter, + getLegendActionEventData(visData), + handleLegendAction, + columnCellValueActions, + visParams, + visData, + services.data.actions, + services.fieldFormats + ) + : undefined, + [ + columnCellValueActions, + getLegendActionEventData, + handleLegendAction, + interactive, + services.data.actions, + services.fieldFormats, + visData, + visParams, + ] + ); + const rescaleFactor = useMemo(() => { const overallSum = visData.rows.reduce((sum, row) => sum + row[metricColumn.id], 0); const slices = visData.rows.map((row) => row[metricColumn.id] / overallSum); @@ -446,15 +476,7 @@ const PartitionVisComponent = (props: PartitionVisComponentProps) => { splitChartFormatter ); }} - legendAction={getLegendActions( - canFilter, - getLegendActionEventData(visData), - handleLegendAction, - visParams, - visData, - services.data.actions, - services.fieldFormats - )} + legendAction={legendActions} theme={[ // Chart background should be transparent for the usage at Canvas. { background: { color: 'transparent' } }, diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.test.tsx b/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.test.tsx new file mode 100644 index 0000000000000..d007d36177857 --- /dev/null +++ b/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.test.tsx @@ -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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { createMockPieParams, createMockVisData } from '../mocks'; +import { CellValueAction } from '../types'; +import { getColumnCellValueActions } from './partition_vis_renderer'; + +const visParams = createMockPieParams(); +const visData = createMockVisData(); + +const cellValueAction: CellValueAction = { + displayName: 'Test', + id: 'test', + iconType: 'test-icon', + execute: () => {}, +}; + +describe('getColumnCellValueActions', () => { + it('should get column cellValue actions for each params bucket', async () => { + const result = await getColumnCellValueActions(visParams, visData, async () => [ + cellValueAction, + ]); + expect(result).toHaveLength(visParams.dimensions.buckets?.length ?? 0); + }); + + it('should contain the cellValue actions', async () => { + const result = await getColumnCellValueActions(visParams, visData, async () => [ + cellValueAction, + cellValueAction, + ]); + expect(result[0]).toEqual([cellValueAction, cellValueAction]); + }); + + it('should return empty array if no buckets', async () => { + const result = await getColumnCellValueActions( + { ...visParams, dimensions: { ...visParams.dimensions, buckets: undefined } }, + visData, + async () => [cellValueAction] + ); + expect(result).toEqual([]); + }); + + it('should return empty array if getCompatibleCellValueActions not passed', async () => { + const result = await getColumnCellValueActions(visParams, visData, undefined); + expect(result).toEqual([]); + }); +}); diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx b/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx index 4b6fe45e4df92..50198f556f919 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx +++ b/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx @@ -11,14 +11,20 @@ import { render, unmountComponentAtNode } from 'react-dom'; import { I18nProvider } from '@kbn/i18n-react'; import { css } from '@emotion/react'; import { i18n } from '@kbn/i18n'; -import { ExpressionRenderDefinition } from '@kbn/expressions-plugin/public'; +import type { + Datatable, + ExpressionRenderDefinition, + IInterpreterRenderHandlers, +} from '@kbn/expressions-plugin/public'; import type { PersistedState } from '@kbn/visualizations-plugin/public'; import { withSuspense } from '@kbn/presentation-util-plugin/public'; import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import { METRIC_TYPE } from '@kbn/analytics'; +import { getColumnByAccessor } from '@kbn/visualizations-plugin/common/utils'; import { VisTypePieDependencies } from '../plugin'; import { PARTITION_VIS_RENDERER_NAME } from '../../common/constants'; -import { ChartTypes, RenderValue } from '../../common/types'; +import { CellValueAction, GetCompatibleCellValueActions } from '../types'; +import { ChartTypes, PartitionVisParams, RenderValue } from '../../common/types'; // eslint-disable-next-line @kbn/imports/no_boundary_crossing import { extractContainerType, extractVisualizationType } from '../../../common'; @@ -42,6 +48,30 @@ const partitionVisRenderer = css({ height: '100%', }); +/** + * Retrieves the compatible CELL_VALUE_TRIGGER actions indexed by column + **/ +export const getColumnCellValueActions = async ( + visConfig: PartitionVisParams, + visData: Datatable, + getCompatibleCellValueActions?: IInterpreterRenderHandlers['getCompatibleCellValueActions'] +) => { + if (!Array.isArray(visConfig.dimensions.buckets) || !getCompatibleCellValueActions) { + return []; + } + return Promise.all( + visConfig.dimensions.buckets.reduce>>((acc, accessor) => { + const columnMeta = getColumnByAccessor(accessor, visData.columns)?.meta; + if (columnMeta) { + acc.push( + (getCompatibleCellValueActions as GetCompatibleCellValueActions)([{ columnMeta }]) + ); + } + return acc; + }, []) + ); +}; + export const getPartitionVisRenderer: ( deps: VisTypePieDependencies ) => ExpressionRenderDefinition = ({ getStartDeps }) => ({ @@ -76,7 +106,10 @@ export const getPartitionVisRenderer: ( handlers.done(); }; - const palettesRegistry = await plugins.charts.palettes.getPalettes(); + const [columnCellValueActions, palettesRegistry] = await Promise.all([ + getColumnCellValueActions(visConfig, visData, handlers.getCompatibleCellValueActions), + plugins.charts.palettes.getPalettes(), + ]); render( @@ -90,9 +123,11 @@ export const getPartitionVisRenderer: ( visType={visConfig.isDonut ? ChartTypes.DONUT : visType} renderComplete={renderComplete} fireEvent={handlers.event} + interactive={handlers.isInteractive()} uiState={handlers.uiState as PersistedState} services={{ data: plugins.data, fieldFormats: plugins.fieldFormats }} syncColors={syncColors} + columnCellValueActions={columnCellValueActions} /> diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/types.ts b/src/plugins/chart_expressions/expression_partition_vis/public/types.ts index 093a65c8cbf5d..77636d3a41832 100755 --- a/src/plugins/chart_expressions/expression_partition_vis/public/types.ts +++ b/src/plugins/chart_expressions/expression_partition_vis/public/types.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import type { ValueClickContext } from '@kbn/embeddable-plugin/public'; +import type { CellValueContext, ValueClickContext } from '@kbn/embeddable-plugin/public'; import { ChartsPluginSetup, ChartsPluginStart } from '@kbn/charts-plugin/public'; import { Plugin as ExpressionsPublicPlugin, @@ -35,3 +35,16 @@ export interface FilterEvent { name: 'filter'; data: ValueClickContext['data']; } + +export interface CellValueAction { + id: string; + iconType: string; + displayName: string; + execute: (data: CellValueContext['data']) => void; +} + +export type ColumnCellValueActions = CellValueAction[][]; + +export type GetCompatibleCellValueActions = ( + data: CellValueContext['data'] +) => Promise; diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/utils/filter_helpers.ts b/src/plugins/chart_expressions/expression_partition_vis/public/utils/filter_helpers.ts index 6a42bc6f7b601..4be6f2564e00d 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/utils/filter_helpers.ts +++ b/src/plugins/chart_expressions/expression_partition_vis/public/utils/filter_helpers.ts @@ -125,3 +125,7 @@ export const getFilterEventData = ( return acc; }, []); }; + +export const getSeriesValueColumnIndex = (value: string, visData: Datatable): number => { + return visData.columns.findIndex(({ id }) => !!visData.rows.find((r) => r[id] === value)); +}; diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/utils/get_legend_actions.tsx b/src/plugins/chart_expressions/expression_partition_vis/public/utils/get_legend_actions.tsx index fcaa5fb98f93f..9762b446bd7af 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/utils/get_legend_actions.tsx +++ b/src/plugins/chart_expressions/expression_partition_vis/public/utils/get_legend_actions.tsx @@ -16,7 +16,8 @@ import { Datatable } from '@kbn/expressions-plugin/public'; import { getFormatByAccessor, getAccessor } from '@kbn/visualizations-plugin/common/utils'; import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import { PartitionVisParams } from '../../common/types'; -import { FilterEvent } from '../types'; +import { ColumnCellValueActions, FilterEvent } from '../types'; +import { getSeriesValueColumnIndex } from './filter_helpers'; export const getLegendActions = ( canFilter: ( @@ -25,6 +26,7 @@ export const getLegendActions = ( ) => Promise, getFilterEventData: (series: SeriesIdentifier) => FilterEvent | null, onFilter: (data: FilterEvent, negate?: any) => void, + columnCellValueActions: ColumnCellValueActions, visParams: PartitionVisParams, visData: Datatable, actions: DataPublicPluginStart['actions'], @@ -32,58 +34,87 @@ export const getLegendActions = ( ): LegendAction => { return ({ series: [pieSeries] }) => { const [popoverOpen, setPopoverOpen] = useState(false); - const [isfilterable, setIsfilterable] = useState(true); + const [isFilterable, setIsFilterable] = useState(true); const filterData = useMemo(() => getFilterEventData(pieSeries), [pieSeries]); + const columnIndex = useMemo( + () => getSeriesValueColumnIndex(pieSeries.key, visData), + [pieSeries] + ); const [ref, onClose] = useLegendAction(); useEffect(() => { - (async () => setIsfilterable(await canFilter(filterData, actions)))(); + (async () => setIsFilterable(await canFilter(filterData, actions)))(); }, [filterData]); - if (!isfilterable || !filterData) { + if (columnIndex === -1) { return null; } let formattedTitle = ''; if (visParams.dimensions.buckets) { const accessor = visParams.dimensions.buckets.find( - (bucket) => getAccessor(bucket) === filterData.data.data[0].column + (bucket) => getAccessor(bucket) === columnIndex ); formattedTitle = formatter .deserialize(accessor ? getFormatByAccessor(accessor, visData.columns) : undefined) .convert(pieSeries.key) ?? ''; } - const title = formattedTitle || pieSeries.key; + + const panelItems: EuiContextMenuPanelDescriptor['items'] = []; + + if (isFilterable && filterData) { + panelItems.push( + { + name: i18n.translate('expressionPartitionVis.legend.filterForValueButtonAriaLabel', { + defaultMessage: 'Filter for value', + }), + 'data-test-subj': `legend-${title}-filterIn`, + icon: , + onClick: () => { + setPopoverOpen(false); + onFilter(filterData); + }, + }, + { + name: i18n.translate('expressionPartitionVis.legend.filterOutValueButtonAriaLabel', { + defaultMessage: 'Filter out value', + }), + 'data-test-subj': `legend-${title}-filterOut`, + icon: , + onClick: () => { + setPopoverOpen(false); + onFilter(filterData, true); + }, + } + ); + } + + if (columnCellValueActions[columnIndex]) { + const columnMeta = visData.columns[columnIndex].meta; + columnCellValueActions[columnIndex].forEach((action) => { + panelItems.push({ + name: action.displayName, + 'data-test-subj': `legend-${title}-${action.id}`, + icon: , + onClick: () => { + action.execute([{ columnMeta, value: pieSeries.key }]); + setPopoverOpen(false); + }, + }); + }); + } + + if (panelItems.length === 0) { + return null; + } + const panels: EuiContextMenuPanelDescriptor[] = [ { id: 'main', - title: `${title}`, - items: [ - { - name: i18n.translate('expressionPartitionVis.legend.filterForValueButtonAriaLabel', { - defaultMessage: 'Filter for value', - }), - 'data-test-subj': `legend-${title}-filterIn`, - icon: , - onClick: () => { - setPopoverOpen(false); - onFilter(filterData); - }, - }, - { - name: i18n.translate('expressionPartitionVis.legend.filterOutValueButtonAriaLabel', { - defaultMessage: 'Filter out value', - }), - 'data-test-subj': `legend-${title}-filterOut`, - icon: , - onClick: () => { - setPopoverOpen(false); - onFilter(filterData, true); - }, - }, - ], + title, + items: panelItems, }, ]; diff --git a/src/plugins/chart_expressions/expression_xy/public/components/legend_action.test.tsx b/src/plugins/chart_expressions/expression_xy/public/components/legend_action.test.tsx index f82428993ce46..1398fc64357cb 100644 --- a/src/plugins/chart_expressions/expression_xy/public/components/legend_action.test.tsx +++ b/src/plugins/chart_expressions/expression_xy/public/components/legend_action.test.tsx @@ -15,11 +15,15 @@ import { ComponentType, ReactWrapper } from 'enzyme'; import type { DataLayerConfig } from '../../common'; import { LayerTypes } from '../../common/constants'; import { getLegendAction } from './legend_action'; -import { LegendActionPopover } from './legend_action_popover'; +import { LegendActionPopover, LegendCellValueActions } from './legend_action_popover'; import { mockPaletteOutput } from '../../common/__mocks__'; import { FieldFormat } from '@kbn/field-formats-plugin/common'; import { LayerFieldFormats } from '../helpers'; +const legendCellValueActions: LegendCellValueActions = [ + { id: 'action_1', displayName: 'Action 1', iconType: 'testIcon1', execute: () => {} }, + { id: 'action_2', displayName: 'Action 2', iconType: 'testIcon2', execute: () => {} }, +]; const table: Datatable = { type: 'datatable', rows: [ @@ -178,6 +182,7 @@ describe('getLegendAction', function () { const Component: ComponentType = getLegendAction( [sampleLayer], jest.fn(), + [legendCellValueActions], { first: { splitSeriesAccessors: { @@ -251,15 +256,8 @@ describe('getLegendAction', function () { expect(wrapper.find(EuiPopover).prop('title')).toEqual( "Women's Accessories - Label B, filter options" ); - expect(wrapper.find(LegendActionPopover).prop('context')).toEqual({ - data: [ - { - column: 1, - row: 1, - table, - value: "Women's Accessories", - }, - ], - }); + expect(wrapper.find(LegendActionPopover).prop('legendCellValueActions')).toEqual( + legendCellValueActions.map((action) => ({ ...action, execute: expect.any(Function) })) + ); }); }); diff --git a/src/plugins/chart_expressions/expression_xy/public/components/legend_action.tsx b/src/plugins/chart_expressions/expression_xy/public/components/legend_action.tsx index 37789a6ffa15e..f5b00f696d04f 100644 --- a/src/plugins/chart_expressions/expression_xy/public/components/legend_action.tsx +++ b/src/plugins/chart_expressions/expression_xy/public/components/legend_action.tsx @@ -9,9 +9,10 @@ import React from 'react'; import type { LegendAction, XYChartSeriesIdentifier } from '@elastic/charts'; import { getAccessorByDimension } from '@kbn/visualizations-plugin/common/utils'; -import type { FilterEvent } from '../types'; +import { CellValueContext } from '@kbn/embeddable-plugin/public'; +import type { LayerCellValueActions, FilterEvent } from '../types'; import type { CommonXYDataLayerConfig } from '../../common'; -import { LegendActionPopover } from './legend_action_popover'; +import { LegendActionPopover, LegendCellValueActions } from './legend_action_popover'; import { DatatablesWithFormatInfo, getSeriesName, @@ -23,6 +24,7 @@ import { export const getLegendAction = ( dataLayers: CommonXYDataLayerConfig[], onFilter: (data: FilterEvent['data']) => void, + layerCellValueActions: LayerCellValueActions, fieldFormats: LayersFieldFormats, formattedDatatables: DatatablesWithFormatInfo, titles: LayersAccessorsTitles, @@ -50,30 +52,44 @@ export const getLegendAction = ( const { table } = layer; - const data: FilterEvent['data']['data'] = []; + const filterActionData: FilterEvent['data']['data'] = []; + const cellValueActionData: CellValueContext['data'] = []; series.splitAccessors.forEach((value, accessor) => { const rowIndex = formattedDatatables[layer.layerId].table.rows.findIndex((row) => { return row[accessor] === value; }); - if (rowIndex !== -1) { - data.push({ + const columnIndex = table.columns.findIndex((column) => column.id === accessor); + + if (rowIndex >= 0 && columnIndex >= 0) { + filterActionData.push({ row: rowIndex, - column: table.columns.findIndex((column) => column.id === accessor), + column: columnIndex, value: table.rows[rowIndex][accessor], table, }); + + cellValueActionData.push({ + value: table.rows[rowIndex][accessor], + columnMeta: table.columns[columnIndex].meta, + }); } }); - if (data.length === 0) { + if (filterActionData.length === 0) { return null; } - const context: FilterEvent['data'] = { - data, + const filterHandler = ({ negate }: { negate?: boolean } = {}) => { + onFilter({ data: filterActionData, negate }); }; + const legendCellValueActions: LegendCellValueActions = + layerCellValueActions[layerIndex]?.map((action) => ({ + ...action, + execute: () => action.execute(cellValueActionData), + })) ?? []; + return ( ); }); diff --git a/src/plugins/chart_expressions/expression_xy/public/components/legend_action_popover.tsx b/src/plugins/chart_expressions/expression_xy/public/components/legend_action_popover.tsx index be93140e734dc..e01ed18b106ce 100644 --- a/src/plugins/chart_expressions/expression_xy/public/components/legend_action_popover.tsx +++ b/src/plugins/chart_expressions/expression_xy/public/components/legend_action_popover.tsx @@ -10,7 +10,11 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiContextMenuPanelDescriptor, EuiIcon, EuiPopover, EuiContextMenu } from '@elastic/eui'; import { useLegendAction } from '@elastic/charts'; -import type { FilterEvent } from '../types'; +import type { CellValueAction } from '../types'; + +export type LegendCellValueActions = Array< + Omit & { execute: () => void } +>; export interface LegendActionPopoverProps { /** @@ -20,20 +24,31 @@ export interface LegendActionPopoverProps { /** * Callback on filter value */ - onFilter: (data: FilterEvent['data']) => void; + onFilter: (param?: { negate?: boolean }) => void; /** - * Determines the filter event data + * Compatible actions to be added to the popover actions */ - context: FilterEvent['data']; + legendCellValueActions?: LegendCellValueActions; } export const LegendActionPopover: React.FunctionComponent = ({ label, onFilter, - context, + legendCellValueActions = [], }) => { const [popoverOpen, setPopoverOpen] = useState(false); const [ref, onClose] = useLegendAction(); + + const legendCellValueActionPanelItems = legendCellValueActions.map((action) => ({ + name: action.displayName, + 'data-test-subj': `legend-${label}-${action.id}`, + icon: , + onClick: () => { + action.execute(); + setPopoverOpen(false); + }, + })); + const panels: EuiContextMenuPanelDescriptor[] = [ { id: 'main', @@ -47,7 +62,7 @@ export const LegendActionPopover: React.FunctionComponent, onClick: () => { setPopoverOpen(false); - onFilter(context); + onFilter(); }, }, { @@ -58,9 +73,10 @@ export const LegendActionPopover: React.FunctionComponent, onClick: () => { setPopoverOpen(false); - onFilter({ ...context, negate: true }); + onFilter({ negate: true }); }, }, + ...legendCellValueActionPanelItems, ], }, ]; diff --git a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.test.tsx b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.test.tsx index b6777d36c1d9e..f8e41ca535828 100644 --- a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.test.tsx +++ b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.test.tsx @@ -58,8 +58,10 @@ import { ExtendedDataLayerConfig, XYProps, AnnotationLayerConfigResult } from '. import { DataLayers } from './data_layers'; import { SplitChart } from './split_chart'; import { LegendSize } from '@kbn/visualizations-plugin/common'; +import type { LayerCellValueActions } from '../types'; const onClickValue = jest.fn(); +const layerCellValueActions: LayerCellValueActions = []; const onSelectRange = jest.fn(); describe('XYChart component', () => { @@ -114,6 +116,7 @@ describe('XYChart component', () => { paletteService, minInterval: 50, onClickValue, + layerCellValueActions, onSelectRange, syncColors: false, syncTooltips: false, diff --git a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx index d57dc86b36ba1..b9f8479c130f6 100644 --- a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx +++ b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx @@ -47,7 +47,7 @@ import { LegendSizeToPixels, } from '@kbn/visualizations-plugin/common/constants'; import { PersistedState } from '@kbn/visualizations-plugin/public'; -import type { FilterEvent, BrushEvent, FormatFactory } from '../types'; +import type { FilterEvent, BrushEvent, FormatFactory, LayerCellValueActions } from '../types'; import { isTimeChart } from '../../common/helpers'; import type { CommonXYDataLayerConfig, @@ -121,6 +121,7 @@ export type XYChartRenderProps = Omit & { minInterval: number | undefined; interactive?: boolean; onClickValue: (data: FilterEvent['data']) => void; + layerCellValueActions: LayerCellValueActions; onSelectRange: (data: BrushEvent['data']) => void; renderMode: RenderMode; syncColors: boolean; @@ -196,6 +197,7 @@ export function XYChart({ paletteService, minInterval, onClickValue, + layerCellValueActions, onSelectRange, interactive = true, syncColors, @@ -828,6 +830,7 @@ export function XYChart({ ? getLegendAction( dataLayers, onClickValue, + layerCellValueActions, fieldFormats, formattedDatatables, titles, diff --git a/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx b/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx index 085cf9b8c7bb8..fef4b57671b65 100644 --- a/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx +++ b/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx @@ -18,7 +18,10 @@ import { PersistedState } from '@kbn/visualizations-plugin/public'; import type { ChartsPluginStart } from '@kbn/charts-plugin/public'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { EventAnnotationServiceType } from '@kbn/event-annotation-plugin/public'; -import { ExpressionRenderDefinition } from '@kbn/expressions-plugin/common'; +import type { + ExpressionRenderDefinition, + IInterpreterRenderHandlers, +} from '@kbn/expressions-plugin/common'; import { FormatFactory } from '@kbn/field-formats-plugin/common'; import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import { UsageCollectionStart } from '@kbn/usage-collection-plugin/public'; @@ -26,8 +29,8 @@ import { getColumnByAccessor } from '@kbn/visualizations-plugin/common/utils'; import type { getDataLayers } from '../helpers'; import { LayerTypes, SeriesTypes } from '../../common/constants'; -import type { XYChartProps } from '../../common'; -import type { BrushEvent, FilterEvent } from '../types'; +import type { CommonXYDataLayerConfig, XYChartProps } from '../../common'; +import type { BrushEvent, FilterEvent, GetCompatibleCellValueActions } from '../types'; // eslint-disable-next-line @kbn/imports/no_boundary_crossing import { extractContainerType, extractVisualizationType } from '../../../common'; @@ -157,6 +160,28 @@ const extractCounterEvents = ( } }; +/** + * Retrieves the compatible CELL_VALUE_TRIGGER actions indexed by layer + **/ +const getLayerCellValueActions = async ( + layers: CommonXYDataLayerConfig[], + getCompatibleCellValueActions?: IInterpreterRenderHandlers['getCompatibleCellValueActions'] +) => { + if (!layers || !getCompatibleCellValueActions) { + return []; + } + return await Promise.all( + layers.map((layer) => { + const data = + layer.splitAccessors?.map((accessor) => { + const column = layer.table.columns.find(({ id }) => id === accessor); + return { columnMeta: column?.meta }; + }) ?? []; + return (getCompatibleCellValueActions as GetCompatibleCellValueActions)(data); + }) + ); +}; + export const getXyChartRenderer = ({ getStartDeps, }: XyChartRendererDeps): ExpressionRenderDefinition => ({ @@ -184,6 +209,11 @@ export const getXyChartRenderer = ({ handlers.event({ name: 'brush', data }); }; + const layerCellValueActions = await getLayerCellValueActions( + getDataLayers(config.args.layers), + handlers.getCompatibleCellValueActions as GetCompatibleCellValueActions | undefined + ); + const renderComplete = () => { const executionContext = handlers.getExecutionContext(); const containerType = extractContainerType(executionContext); @@ -231,6 +261,7 @@ export const getXyChartRenderer = ({ minInterval={calculateMinInterval(deps.data.datatableUtilities, config)} interactive={handlers.isInteractive()} onClickValue={onClickValue} + layerCellValueActions={layerCellValueActions} onSelectRange={onSelectRange} renderMode={handlers.getRenderMode()} syncColors={config.syncColors} diff --git a/src/plugins/chart_expressions/expression_xy/public/types.ts b/src/plugins/chart_expressions/expression_xy/public/types.ts index b58641f2c58fa..f9b4d1b0131f8 100755 --- a/src/plugins/chart_expressions/expression_xy/public/types.ts +++ b/src/plugins/chart_expressions/expression_xy/public/types.ts @@ -11,7 +11,11 @@ import { DataPublicPluginSetup } from '@kbn/data-plugin/public'; import { FieldFormatsSetup } from '@kbn/field-formats-plugin/public'; import { ChartsPluginSetup } from '@kbn/charts-plugin/public'; import { IFieldFormat, SerializedFieldFormat } from '@kbn/field-formats-plugin/common'; -import type { RangeSelectContext, ValueClickContext } from '@kbn/embeddable-plugin/public'; +import type { + CellValueContext, + RangeSelectContext, + ValueClickContext, +} from '@kbn/embeddable-plugin/public'; import { ExpressionsServiceStart, ExpressionsSetup } from '@kbn/expressions-plugin/public'; export interface SetupDeps { @@ -114,3 +118,16 @@ export interface AccessorConfig { color?: string; palette?: string[] | Array<{ color: string; stop: number }>; } + +export interface CellValueAction { + id: string; + iconType: string; + displayName: string; + execute: (data: CellValueContext['data']) => void; +} + +export type LayerCellValueActions = CellValueAction[][]; + +export type GetCompatibleCellValueActions = ( + data: CellValueContext['data'] +) => Promise; diff --git a/src/plugins/console/public/lib/row_parser.test.ts b/src/plugins/console/public/lib/row_parser.test.ts index d595e9841131d..64cf3cda8ad6e 100644 --- a/src/plugins/console/public/lib/row_parser.test.ts +++ b/src/plugins/console/public/lib/row_parser.test.ts @@ -82,10 +82,25 @@ describe('RowParser', () => { expect(parser?.getRowParseMode()).toBe(MODE.REQUEST_START | MODE.REQUEST_END); }); - it('should return MODE.REQUEST_END | MODE.MULTI_DOC_CUR_DOC_END for a request that ends with a curly closing brace', () => { + it('should return MODE.REQUEST_START | MODE.REQUEST_END if a single request line ends with a closing curly brace', () => { editor?.getCoreEditor().setValue('DELETE /_bar/_baz%{test}', forceRetokenize); // eslint-disable-next-line no-bitwise - expect(parser?.getRowParseMode()).toBe(MODE.REQUEST_END | MODE.MULTI_DOC_CUR_DOC_END); + expect(parser?.getRowParseMode()).toBe(MODE.REQUEST_START | MODE.REQUEST_END); + }); + + it('should return correct modes for multiple bulk requests', () => { + editor + ?.getCoreEditor() + .setValue('POST _bulk\n{"index": {"_index": "test"}}\n{"foo": "bar"}\n', forceRetokenize); + expect(parser?.getRowParseMode(0)).toBe(MODE.BETWEEN_REQUESTS); + editor + ?.getCoreEditor() + .setValue('POST _bulk\n{"index": {"_index": "test"}}\n{"foo": "bar"}\n', forceRetokenize); + const lineNumber = editor?.getCoreEditor().getLineCount()! - 1; + expect(parser?.getRowParseMode(lineNumber)).toBe( + // eslint-disable-next-line no-bitwise + MODE.REQUEST_END | MODE.MULTI_DOC_CUR_DOC_END + ); }); }); }); diff --git a/src/plugins/console/public/lib/row_parser.ts b/src/plugins/console/public/lib/row_parser.ts index 2ecfbe61c952f..fe369e71fb799 100644 --- a/src/plugins/console/public/lib/row_parser.ts +++ b/src/plugins/console/public/lib/row_parser.ts @@ -29,8 +29,6 @@ export default class RowParser { return MODE.BETWEEN_REQUESTS; } const mode = this.editor.getLineState(lineNumber); - const pos = this.editor.getCurrentPosition(); - const token = this.editor.getTokenAt(pos); if (!mode) { return MODE.BETWEEN_REQUESTS; @@ -59,9 +57,8 @@ export default class RowParser { return MODE.BETWEEN_REQUESTS; } // empty line or a comment waiting for a new req to start - // If the line ends with a closing curly brace, it's the end of a request, - // and we should also check if the current token is not an url token - if (line.indexOf('}', line.length - 1) >= 0 && token?.type !== 'url.part') { + // Check for multi doc requests + if (line.endsWith('}') && !this.isRequestLine(line)) { // check for a multi doc request must start a new json doc immediately after this one end. lineNumber++; if (lineNumber < linesCount + 1) { @@ -167,4 +164,9 @@ export default class RowParser { token.type === 'comment.block') ); } + + isRequestLine(line: string) { + const methods = ['GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'PATCH', 'OPTIONS']; + return methods.some((m) => line.startsWith(m)); + } } diff --git a/src/plugins/custom_integrations/public/components/fleet_integration/elasticsearch_js/elasticsearch_js_readme.tsx b/src/plugins/custom_integrations/public/components/fleet_integration/elasticsearch_js/elasticsearch_js_readme.tsx index 0202782efe436..53581c6d28f55 100644 --- a/src/plugins/custom_integrations/public/components/fleet_integration/elasticsearch_js/elasticsearch_js_readme.tsx +++ b/src/plugins/custom_integrations/public/components/fleet_integration/elasticsearch_js/elasticsearch_js_readme.tsx @@ -6,14 +6,12 @@ * Side Public License, v 1. */ -import React, { useState } from 'react'; +import React from 'react'; // eslint-disable-next-line @kbn/eslint/module_migration import styled from 'styled-components'; -import cuid from 'cuid'; import { - EuiButton, EuiCode, EuiCodeBlock, EuiFlexGroup, @@ -65,8 +63,6 @@ const TopFlexGroup = styled(EuiFlexGroup)` `; export const ElasticsearchJsClientReadme = () => { - const [apiKey, setApiKey] = useState(null); - return ( <> @@ -124,42 +120,6 @@ export const ElasticsearchJsClientReadme = () => { - - -

- -

- - - - - - - - - - - setApiKey(cuid())} disabled={!!apiKey}> - Generate API key - - - - {apiKey && ( - - - {apiKey} - - - )} - - -

@@ -189,7 +149,7 @@ const { Client } = require('@elastic/elasticsearch'); // Instantiate the client with an API key const client = new Client({ - auth: { apiKey: '${apiKey || 'YOUR_API_KEY'}' } + auth: { apiKey: 'YOUR_API_KEY' } }) `} diff --git a/src/plugins/custom_integrations/public/components/fleet_integration/elasticsearch_py/elasticsearch_py_readme.tsx b/src/plugins/custom_integrations/public/components/fleet_integration/elasticsearch_py/elasticsearch_py_readme.tsx index 25fb3f916a61b..a84ca4dc7cce8 100644 --- a/src/plugins/custom_integrations/public/components/fleet_integration/elasticsearch_py/elasticsearch_py_readme.tsx +++ b/src/plugins/custom_integrations/public/components/fleet_integration/elasticsearch_py/elasticsearch_py_readme.tsx @@ -148,7 +148,7 @@ export const ElasticsearchPyClientReadme = () => { from elasticsearch import Elasticsearch # Found in the 'Manage this deployment' page -CLOUD_ID = "deployment-name:dXMtZWFzdDQuZ2Nw..." +CLOUD_ID = "YOUR_CLOUD_ID" # Found in the 'Management' page under the section 'Security' API_KEY = "YOUR_API_KEY" diff --git a/src/plugins/data/common/search/aggs/agg_types.ts b/src/plugins/data/common/search/aggs/agg_types.ts index 43e3df6100a75..ba000c6f6ba78 100644 --- a/src/plugins/data/common/search/aggs/agg_types.ts +++ b/src/plugins/data/common/search/aggs/agg_types.ts @@ -39,6 +39,7 @@ export const getAggTypes = () => ({ { name: METRIC_TYPES.VALUE_COUNT, fn: metrics.getValueCountMetricAgg }, { name: METRIC_TYPES.PERCENTILES, fn: metrics.getPercentilesMetricAgg }, { name: METRIC_TYPES.PERCENTILE_RANKS, fn: metrics.getPercentileRanksMetricAgg }, + { name: METRIC_TYPES.RATE, fn: metrics.getRateMetricAgg }, { name: METRIC_TYPES.TOP_HITS, fn: metrics.getTopHitMetricAgg }, { name: METRIC_TYPES.TOP_METRICS, fn: metrics.getTopMetricsMetricAgg }, { name: METRIC_TYPES.DERIVATIVE, fn: metrics.getDerivativeMetricAgg }, @@ -112,6 +113,7 @@ export const getAggTypesFunctions = () => [ metrics.aggMovingAvg, metrics.aggPercentileRanks, metrics.aggPercentiles, + metrics.aggRate, metrics.aggSerialDiff, metrics.aggStdDeviation, metrics.aggSum, diff --git a/src/plugins/data/common/search/aggs/aggs_service.test.ts b/src/plugins/data/common/search/aggs/aggs_service.test.ts index f0425e460ae0f..e654234e27803 100644 --- a/src/plugins/data/common/search/aggs/aggs_service.test.ts +++ b/src/plugins/data/common/search/aggs/aggs_service.test.ts @@ -87,6 +87,7 @@ describe('Aggs service', () => { "value_count", "percentiles", "percentile_ranks", + "rate", "top_hits", "top_metrics", "derivative", @@ -140,6 +141,7 @@ describe('Aggs service', () => { "value_count", "percentiles", "percentile_ranks", + "rate", "top_hits", "top_metrics", "derivative", diff --git a/src/plugins/data/common/search/aggs/metrics/index.ts b/src/plugins/data/common/search/aggs/metrics/index.ts index 492f76ccd3a08..b5790bcd1a535 100644 --- a/src/plugins/data/common/search/aggs/metrics/index.ts +++ b/src/plugins/data/common/search/aggs/metrics/index.ts @@ -50,6 +50,8 @@ export * from './percentile_ranks_fn'; export * from './percentile_ranks'; export * from './percentiles_fn'; export * from './percentiles'; +export * from './rate_fn'; +export * from './rate'; export * from './single_percentile_rank_fn'; export * from './single_percentile_rank'; export * from './serial_diff_fn'; diff --git a/src/plugins/data/common/search/aggs/metrics/metric_agg_types.ts b/src/plugins/data/common/search/aggs/metrics/metric_agg_types.ts index 151f18110a301..ff84c319e6e2d 100644 --- a/src/plugins/data/common/search/aggs/metrics/metric_agg_types.ts +++ b/src/plugins/data/common/search/aggs/metrics/metric_agg_types.ts @@ -32,5 +32,6 @@ export enum METRIC_TYPES { TOP_METRICS = 'top_metrics', PERCENTILES = 'percentiles', PERCENTILE_RANKS = 'percentile_ranks', + RATE = 'rate', STD_DEV = 'std_dev', } diff --git a/src/plugins/data/common/search/aggs/metrics/rate.ts b/src/plugins/data/common/search/aggs/metrics/rate.ts new file mode 100644 index 0000000000000..a10f73daddc2d --- /dev/null +++ b/src/plugins/data/common/search/aggs/metrics/rate.ts @@ -0,0 +1,104 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { i18n } from '@kbn/i18n'; +import { aggRateFnName } from './rate_fn'; +import { MetricAggType } from './metric_agg_type'; +import { METRIC_TYPES } from './metric_agg_types'; +import { KBN_FIELD_TYPES } from '../../..'; +import { BaseAggParams } from '../types'; + +const rateTitle = i18n.translate('data.search.aggs.metrics.rateTitle', { + defaultMessage: 'Rate', +}); + +export interface AggParamsRate extends BaseAggParams { + unit: string; + field?: string; +} + +export const getRateMetricAgg = () => { + return new MetricAggType({ + name: METRIC_TYPES.RATE, + expressionName: aggRateFnName, + title: rateTitle, + valueType: 'number', + makeLabel: (aggConfig) => { + return i18n.translate('data.search.aggs.metrics.rateLabel', { + defaultMessage: 'Rate of {field} per {unit}', + values: { field: aggConfig.getFieldDisplayName(), unit: aggConfig.getParam('unit') }, + }); + }, + params: [ + { + name: 'field', + type: 'field', + required: false, + filterFieldTypes: [KBN_FIELD_TYPES.NUMBER, KBN_FIELD_TYPES.HISTOGRAM], + }, + { + name: 'unit', + type: 'string', + displayName: i18n.translate('data.search.aggs.metrics.rate.unit.displayName', { + defaultMessage: 'Unit', + }), + required: true, + options: [ + { + text: i18n.translate('data.search.aggs.metrics.rate.unit.second', { + defaultMessage: 'Second', + }), + value: 'second', + }, + { + text: i18n.translate('data.search.aggs.metrics.rate.unit.minute', { + defaultMessage: 'Minute', + }), + value: 'minute', + }, + { + text: i18n.translate('data.search.aggs.metrics.rate.unit.hour', { + defaultMessage: 'Hour', + }), + value: 'hour', + }, + { + text: i18n.translate('data.search.aggs.metrics.rate.unit.day', { + defaultMessage: 'Day', + }), + value: 'day', + }, + { + text: i18n.translate('data.search.aggs.metrics.rate.unit.week', { + defaultMessage: 'Week', + }), + value: 'week', + }, + { + text: i18n.translate('data.search.aggs.metrics.rate.unit.month', { + defaultMessage: 'Month', + }), + value: 'month', + }, + { + text: i18n.translate('data.search.aggs.metrics.rate.unit.quarter', { + defaultMessage: 'Quarter', + }), + value: 'quarter', + }, + { + text: i18n.translate('data.search.aggs.metrics.rate.unit.year', { + defaultMessage: 'Year', + }), + value: 'year', + }, + ], + }, + ], + }); +}; diff --git a/src/plugins/data/common/search/aggs/metrics/rate_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/rate_fn.test.ts new file mode 100644 index 0000000000000..22b25da536077 --- /dev/null +++ b/src/plugins/data/common/search/aggs/metrics/rate_fn.test.ts @@ -0,0 +1,75 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { functionWrapper } from '../test_helpers'; +import { aggRate } from './rate_fn'; + +describe('agg_expression_functions', () => { + describe('aggRate', () => { + const fn = functionWrapper(aggRate()); + + test('without field', () => { + const actual = fn({ + unit: 'second', + }); + expect(actual).toMatchInlineSnapshot(` + Object { + "type": "agg_type", + "value": Object { + "enabled": true, + "id": undefined, + "params": Object { + "customLabel": undefined, + "field": undefined, + "json": undefined, + "timeShift": undefined, + "unit": "second", + }, + "schema": undefined, + "type": "rate", + }, + } + `); + }); + + test('with field', () => { + const actual = fn({ + field: 'bytes', + unit: 'second', + }); + expect(actual).toMatchInlineSnapshot(` + Object { + "type": "agg_type", + "value": Object { + "enabled": true, + "id": undefined, + "params": Object { + "customLabel": undefined, + "field": "bytes", + "json": undefined, + "timeShift": undefined, + "unit": "second", + }, + "schema": undefined, + "type": "rate", + }, + } + `); + }); + + test('correctly parses json string argument', () => { + const actual = fn({ + field: 'machine.os.keyword', + unit: 'month', + json: '{ "foo": true }', + }); + + expect(actual.value.params.json).toMatchInlineSnapshot(`"{ \\"foo\\": true }"`); + }); + }); +}); diff --git a/src/plugins/data/common/search/aggs/metrics/rate_fn.ts b/src/plugins/data/common/search/aggs/metrics/rate_fn.ts new file mode 100644 index 0000000000000..0c95c221c2391 --- /dev/null +++ b/src/plugins/data/common/search/aggs/metrics/rate_fn.ts @@ -0,0 +1,101 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { i18n } from '@kbn/i18n'; +import { ExpressionFunctionDefinition } from '@kbn/expressions-plugin/common'; +import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '..'; + +export const aggRateFnName = 'aggRate'; + +type Input = any; +type AggArgs = AggExpressionFunctionArgs; +type Output = AggExpressionType; +type FunctionDefinition = ExpressionFunctionDefinition< + typeof aggRateFnName, + Input, + AggArgs, + Output +>; + +export const aggRate = (): FunctionDefinition => ({ + name: aggRateFnName, + help: i18n.translate('data.search.aggs.function.metrics.rate.help', { + defaultMessage: 'Generates a serialized agg config for a Rate agg', + }), + type: 'agg_type', + args: { + id: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.rate.id.help', { + defaultMessage: 'ID for this aggregation', + }), + }, + enabled: { + types: ['boolean'], + default: true, + help: i18n.translate('data.search.aggs.metrics.rate.enabled.help', { + defaultMessage: 'Specifies whether this aggregation should be enabled', + }), + }, + schema: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.rate.schema.help', { + defaultMessage: 'Schema to use for this aggregation', + }), + }, + field: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.rate.field.help', { + defaultMessage: 'Field to use for this aggregation', + }), + }, + unit: { + types: ['string'], + required: true, + options: ['second', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'], + help: i18n.translate('data.search.aggs.metrics.rate.unit.help', { + defaultMessage: 'Unit to use for this aggregation', + }), + }, + json: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.rate.json.help', { + defaultMessage: 'Advanced json to include when the agg is sent to Elasticsearch', + }), + }, + customLabel: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.rate.customLabel.help', { + defaultMessage: 'Represents a custom label for this aggregation', + }), + }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, + }, + fn: (input, args) => { + const { id, enabled, schema, ...rest } = args; + + return { + type: 'agg_type', + value: { + id, + enabled, + schema, + type: METRIC_TYPES.RATE, + params: { + ...rest, + }, + }, + }; + }, +}); diff --git a/src/plugins/data/common/search/aggs/param_types/field.ts b/src/plugins/data/common/search/aggs/param_types/field.ts index f8168e5f9cf69..549058bc74890 100644 --- a/src/plugins/data/common/search/aggs/param_types/field.ts +++ b/src/plugins/data/common/search/aggs/param_types/field.ts @@ -48,6 +48,7 @@ export class FieldParamType extends BaseParamType { const field = aggConfig.getField(); if (!field) { + if (config.required === false) return; throw new TypeError( i18n.translate('data.search.aggs.paramTypes.field.requiredFieldParameterErrorMessage', { defaultMessage: '{fieldParameter} is a required parameter', diff --git a/src/plugins/data/common/search/aggs/types.ts b/src/plugins/data/common/search/aggs/types.ts index bc35e46d8da7a..1936efa8d328d 100644 --- a/src/plugins/data/common/search/aggs/types.ts +++ b/src/plugins/data/common/search/aggs/types.ts @@ -69,6 +69,7 @@ import { AggParamsPercentileRanks, AggParamsPercentiles, AggParamsRange, + AggParamsRate, AggParamsSerialDiff, AggParamsSignificantTerms, AggParamsStdDeviation, @@ -209,6 +210,7 @@ interface SerializedAggParamsMapping { [METRIC_TYPES.MOVING_FN]: AggParamsMovingAvgSerialized; [METRIC_TYPES.PERCENTILE_RANKS]: AggParamsPercentileRanks; [METRIC_TYPES.PERCENTILES]: AggParamsPercentiles; + [METRIC_TYPES.RATE]: AggParamsRate; [METRIC_TYPES.SERIAL_DIFF]: AggParamsSerialDiffSerialized; [METRIC_TYPES.TOP_HITS]: AggParamsTopHitSerialized; [METRIC_TYPES.TOP_METRICS]: AggParamsTopMetricsSerialized; @@ -254,6 +256,7 @@ export interface AggParamsMapping { [METRIC_TYPES.MOVING_FN]: AggParamsMovingAvg; [METRIC_TYPES.PERCENTILE_RANKS]: AggParamsPercentileRanks; [METRIC_TYPES.PERCENTILES]: AggParamsPercentiles; + [METRIC_TYPES.RATE]: AggParamsRate; [METRIC_TYPES.SERIAL_DIFF]: AggParamsSerialDiff; [METRIC_TYPES.TOP_HITS]: AggParamsTopHit; [METRIC_TYPES.TOP_METRICS]: AggParamsTopMetrics; diff --git a/src/plugins/data/public/search/aggs/aggs_service.test.ts b/src/plugins/data/public/search/aggs/aggs_service.test.ts index 0c8067df5c7f7..e348779d6190d 100644 --- a/src/plugins/data/public/search/aggs/aggs_service.test.ts +++ b/src/plugins/data/public/search/aggs/aggs_service.test.ts @@ -53,7 +53,7 @@ describe('AggsService - public', () => { service.setup(setupDeps); const start = service.start(startDeps); expect(start.types.getAll().buckets.length).toBe(16); - expect(start.types.getAll().metrics.length).toBe(26); + expect(start.types.getAll().metrics.length).toBe(27); }); test('registers custom agg types', () => { @@ -70,7 +70,7 @@ describe('AggsService - public', () => { const start = service.start(startDeps); expect(start.types.getAll().buckets.length).toBe(17); expect(start.types.getAll().buckets.some(({ name }) => name === 'foo')).toBe(true); - expect(start.types.getAll().metrics.length).toBe(27); + expect(start.types.getAll().metrics.length).toBe(28); expect(start.types.getAll().metrics.some(({ name }) => name === 'bar')).toBe(true); }); }); diff --git a/src/plugins/data/public/search/errors/http_error.tsx b/src/plugins/data/public/search/errors/http_error.tsx deleted file mode 100644 index fa43c0a75080e..0000000000000 --- a/src/plugins/data/public/search/errors/http_error.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { EuiCodeBlock, EuiSpacer } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import React from 'react'; - -export function getHttpError(message: string) { - return ( - <> - {i18n.translate('data.errors.fetchError', { - defaultMessage: - 'Check your network and proxy configuration. If the problem persists, contact your network administrator.', - })} - - - - {message} - - - ); -} diff --git a/src/plugins/data/public/search/errors/index.ts b/src/plugins/data/public/search/errors/index.ts index fcdea8dec1c2e..27acf0baecdb4 100644 --- a/src/plugins/data/public/search/errors/index.ts +++ b/src/plugins/data/public/search/errors/index.ts @@ -11,5 +11,4 @@ export * from './painless_error'; export * from './timeout_error'; export * from './utils'; export * from './types'; -export * from './http_error'; export * from './search_session_incomplete_warning'; diff --git a/src/plugins/data/public/search/search_interceptor/search_interceptor.ts b/src/plugins/data/public/search/search_interceptor/search_interceptor.ts index f88387e4e44e9..8cf0f0a30eedf 100644 --- a/src/plugins/data/public/search/search_interceptor/search_interceptor.ts +++ b/src/plugins/data/public/search/search_interceptor/search_interceptor.ts @@ -31,6 +31,7 @@ import { } from 'rxjs/operators'; import { PublicMethodsOf } from '@kbn/utility-types'; import type { HttpSetup, IHttpFetchError } from '@kbn/core-http-browser'; +import { BfetchRequestError } from '@kbn/bfetch-plugin/public'; import { ApplicationStart, @@ -60,7 +61,6 @@ import { import { SearchUsageCollector } from '../collectors'; import { EsError, - getHttpError, isEsError, isPainlessError, PainlessError, @@ -195,8 +195,8 @@ export class SearchInterceptor { // The timeout error is shown any time a request times out, or once per session, if the request is part of a session. this.showTimeoutError(err, options?.sessionId); return err; - } else if (e instanceof AbortError) { - // In the case an application initiated abort, throw the existing AbortError. + } else if (e instanceof AbortError || e instanceof BfetchRequestError) { + // In the case an application initiated abort, throw the existing AbortError, same with BfetchRequestErrors return e; } else if (isEsError(e)) { if (isPainlessError(e)) { @@ -525,12 +525,18 @@ export class SearchInterceptor { }), text: toMountPoint(e.getErrorMessage(this.application), { theme$: this.deps.theme.theme$ }), }); - } else if (e.constructor.name === 'HttpFetchError') { + } else if (e.constructor.name === 'HttpFetchError' || e instanceof BfetchRequestError) { + const defaultMsg = i18n.translate('data.errors.fetchError', { + defaultMessage: 'Check your network connection and try again.', + }); + this.deps.toasts.addDanger({ title: i18n.translate('data.search.httpErrorTitle', { - defaultMessage: 'Cannot retrieve your data', + defaultMessage: 'Unable to connect to the Kibana server', + }), + text: toMountPoint(e.message || defaultMsg, { + theme$: this.deps.theme.theme$, }), - text: toMountPoint(getHttpError(e.message), { theme$: this.deps.theme.theme$ }), }); } else { this.deps.toasts.addError(e, { diff --git a/src/plugins/discover/public/application/context/context_app_content.tsx b/src/plugins/discover/public/application/context/context_app_content.tsx index 4a24363525998..4bfbee1397f9f 100644 --- a/src/plugins/discover/public/application/context/context_app_content.tsx +++ b/src/plugins/discover/public/application/context/context_app_content.tsx @@ -23,6 +23,7 @@ import { MAX_CONTEXT_SIZE, MIN_CONTEXT_SIZE } from './services/constants'; import { DocTableContext } from '../../components/doc_table/doc_table_context'; import { useDiscoverServices } from '../../hooks/use_discover_services'; import type { DataTableRecord } from '../../types'; +import { DiscoverGridFlyout } from '../../components/discover_grid/discover_grid_flyout'; export interface ContextAppContentProps { columns: string[]; @@ -160,6 +161,7 @@ export function ContextAppContent({ onAddColumn={onAddColumn} onRemoveColumn={onRemoveColumn} onSetColumns={onSetColumns} + DocumentView={DiscoverGridFlyout} /> )} diff --git a/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx b/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx index 1ebde4c4a6aac..db434c2ae15bd 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_documents.tsx @@ -37,6 +37,7 @@ import { DocumentExplorerUpdateCallout } from '../document_explorer_callout/docu import { DiscoverTourProvider } from '../../../../components/discover_tour'; import { DataTableRecord } from '../../../../types'; import { getRawRecordType } from '../../utils/get_raw_record_type'; +import { DiscoverGridFlyout } from '../../../../components/discover_grid/discover_grid_flyout'; const DocTableInfiniteMemoized = React.memo(DocTableInfinite); const DataGridMemoized = React.memo(DiscoverGrid); @@ -216,6 +217,7 @@ function DiscoverDocumentsComponent({ onUpdateRowsPerPage={onUpdateRowsPerPage} onFieldEdited={onFieldEdited} savedSearchId={savedSearch.id} + DocumentView={DiscoverGridFlyout} /> diff --git a/src/plugins/discover/public/application/main/components/layout/use_discover_histogram.ts b/src/plugins/discover/public/application/main/components/layout/use_discover_histogram.ts index 2141ab8cd21ef..b50084a8eb03b 100644 --- a/src/plugins/discover/public/application/main/components/layout/use_discover_histogram.ts +++ b/src/plugins/discover/public/application/main/components/layout/use_discover_histogram.ts @@ -258,8 +258,12 @@ export const useDiscoverHistogram = ({ [field, isPlainRecord, isTimeBased] ); - // Don't render the unified histogram layout until the first search has been requested - return searchSessionId + // Initialized when the first search has been requested or + // when in SQL mode since search sessions are not supported + const isInitialized = Boolean(searchSessionId) || isPlainRecord; + + // Don't render the unified histogram layout until initialized + return isInitialized ? { topPanelHeight, request, diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid.tsx index b7a0d308b7b93..0407a47011955 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid.tsx +++ b/src/plugins/discover/public/components/discover_grid/discover_grid.tsx @@ -187,6 +187,10 @@ export interface DiscoverGridProps { * Saved search id used for links to single doc and surrounding docs in the flyout */ savedSearchId?: string; + /** + * Document detail view component + */ + DocumentView?: typeof DiscoverGridFlyout; } export const EuiDataGridMemoized = React.memo(EuiDataGrid); @@ -226,6 +230,7 @@ export const DiscoverGrid = ({ rowsPerPageState, onUpdateRowsPerPage, onFieldEdited, + DocumentView, }: DiscoverGridProps) => { const dataGridRef = useRef(null); const services = useDiscoverServices(); @@ -445,9 +450,13 @@ export const DiscoverGrid = ({ } return { columns: sortingColumns, onSort: () => {} }; }, [sortingColumns, onTableSort, isSortEnabled]); + + const canSetExpandedDoc = Boolean(setExpandedDoc && DocumentView); + const lead = useMemo( - () => getLeadControlColumns(setExpandedDoc).filter(({ id }) => controlColumnIds.includes(id)), - [controlColumnIds, setExpandedDoc] + () => + getLeadControlColumns(canSetExpandedDoc).filter(({ id }) => controlColumnIds.includes(id)), + [controlColumnIds, canSetExpandedDoc] ); const additionalControls = useMemo( @@ -625,8 +634,8 @@ export const DiscoverGrid = ({

)} - {setExpandedDoc && expandedDoc && ( - void) { - if (!setExpandedDoc) { +export function getLeadControlColumns(canSetExpandedDoc: boolean) { + if (!canSetExpandedDoc) { return [select]; } return [openDetails, select]; diff --git a/src/plugins/discover/public/embeddable/saved_search_grid.tsx b/src/plugins/discover/public/embeddable/saved_search_grid.tsx index 0184f1af75b3d..716e403584cb7 100644 --- a/src/plugins/discover/public/embeddable/saved_search_grid.tsx +++ b/src/plugins/discover/public/embeddable/saved_search_grid.tsx @@ -11,6 +11,7 @@ import { DataTableRecord } from '../types'; import { DiscoverGrid, DiscoverGridProps } from '../components/discover_grid/discover_grid'; import { TotalDocuments } from '../application/main/components/total_documents/total_documents'; import './saved_search_grid.scss'; +import { DiscoverGridFlyout } from '../components/discover_grid/discover_grid_flyout'; export interface DiscoverGridEmbeddableProps extends DiscoverGridProps { totalHitCount: number; @@ -39,6 +40,7 @@ export function DiscoverGridEmbeddable(props: DiscoverGridEmbeddableProps) { {...props} setExpandedDoc={!props.isPlainRecord ? setExpandedDoc : undefined} expandedDoc={expandedDoc} + DocumentView={DiscoverGridFlyout} /> diff --git a/src/plugins/embeddable/public/bootstrap.ts b/src/plugins/embeddable/public/bootstrap.ts index 4e21457b6e758..5d28e392ddf6d 100644 --- a/src/plugins/embeddable/public/bootstrap.ts +++ b/src/plugins/embeddable/public/bootstrap.ts @@ -13,6 +13,7 @@ import { panelNotificationTrigger, selectRangeTrigger, valueClickTrigger, + cellValueTrigger, } from './lib'; /** @@ -25,4 +26,5 @@ export const bootstrap = (uiActions: UiActionsSetup) => { uiActions.registerTrigger(panelNotificationTrigger); uiActions.registerTrigger(selectRangeTrigger); uiActions.registerTrigger(valueClickTrigger); + uiActions.registerTrigger(cellValueTrigger); }; diff --git a/src/plugins/embeddable/public/index.ts b/src/plugins/embeddable/public/index.ts index 4b4d63f4596a4..627a8cd50fac1 100644 --- a/src/plugins/embeddable/public/index.ts +++ b/src/plugins/embeddable/public/index.ts @@ -29,6 +29,7 @@ export type { EmbeddableInstanceConfiguration, EmbeddableOutput, ValueClickContext, + CellValueContext, RangeSelectContext, IContainer, IEmbeddable, @@ -68,6 +69,8 @@ export { PanelNotFoundError, SELECT_RANGE_TRIGGER, VALUE_CLICK_TRIGGER, + CELL_VALUE_TRIGGER, + cellValueTrigger, ViewMode, withEmbeddableSubscription, genericEmbeddableInputIsEqual, diff --git a/src/plugins/embeddable/public/lib/triggers/triggers.ts b/src/plugins/embeddable/public/lib/triggers/triggers.ts index 7db9c06687947..ee786d930e0cf 100644 --- a/src/plugins/embeddable/public/lib/triggers/triggers.ts +++ b/src/plugins/embeddable/public/lib/triggers/triggers.ts @@ -7,7 +7,7 @@ */ import { i18n } from '@kbn/i18n'; -import { Datatable } from '@kbn/expressions-plugin/common'; +import { Datatable, DatatableColumnMeta } from '@kbn/expressions-plugin/common'; import { Trigger, RowClickContext } from '@kbn/ui-actions-plugin/public'; import { IEmbeddable } from '..'; @@ -29,6 +29,15 @@ export interface ValueClickContext { }; } +export interface CellValueContext { + embeddable: T; + data: Array<{ + value?: any; + eventId?: string; + columnMeta?: DatatableColumnMeta; + }>; +} + export interface RangeSelectContext { embeddable?: T; data: { @@ -99,6 +108,17 @@ export const valueClickTrigger: Trigger = { }), }; +export const CELL_VALUE_TRIGGER = 'CELL_VALUE_TRIGGER'; +export const cellValueTrigger: Trigger = { + id: CELL_VALUE_TRIGGER, + title: i18n.translate('embeddableApi.cellValueTrigger.title', { + defaultMessage: 'Cell value', + }), + description: i18n.translate('embeddableApi.cellValueTrigger.description', { + defaultMessage: 'Actions appear in the cell value options on the visualization', + }), +}; + export const isValueClickTriggerContext = ( context: ChartActionContext ): context is ValueClickContext => context.data && 'data' in context.data; diff --git a/src/plugins/expressions/common/expression_renderers/types.ts b/src/plugins/expressions/common/expression_renderers/types.ts index 8f5fc21e205c7..7dae307aa6c01 100644 --- a/src/plugins/expressions/common/expression_renderers/types.ts +++ b/src/plugins/expressions/common/expression_renderers/types.ts @@ -84,6 +84,7 @@ export interface IInterpreterRenderHandlers { update(params: IInterpreterRenderUpdateParams): void; event(event: IInterpreterRenderEvent): void; hasCompatibleActions?(event: IInterpreterRenderEvent): Promise; + getCompatibleCellValueActions?(data: object[]): Promise; getRenderMode(): RenderMode; /** diff --git a/src/plugins/expressions/public/loader.ts b/src/plugins/expressions/public/loader.ts index e2b9d8ab22fb7..f10b8db1f1287 100644 --- a/src/plugins/expressions/public/loader.ts +++ b/src/plugins/expressions/public/loader.ts @@ -61,6 +61,7 @@ export class ExpressionLoader { syncTooltips: params?.syncTooltips, syncCursor: params?.syncCursor, hasCompatibleActions: params?.hasCompatibleActions, + getCompatibleCellValueActions: params?.getCompatibleCellValueActions, executionContext: params?.executionContext, }); this.render$ = this.renderHandler.render$; diff --git a/src/plugins/expressions/public/render.test.ts b/src/plugins/expressions/public/render.test.ts index f522ea5fe5971..a5b79f20b6fc9 100644 --- a/src/plugins/expressions/public/render.test.ts +++ b/src/plugins/expressions/public/render.test.ts @@ -143,6 +143,28 @@ describe('ExpressionRenderHandler', () => { }); }); + it('should pass through provided "getCompatibleCellValueActions" to the expression renderer', async () => { + const getCompatibleCellValueActions = jest.fn(); + const cellValueActionsParameter = [{ value: 'testValue' }]; + (getRenderersRegistry as jest.Mock).mockReturnValueOnce({ get: () => true }); + (getRenderersRegistry as jest.Mock).mockReturnValueOnce({ + get: () => ({ + render: (domNode: HTMLElement, config: unknown, handlers: IInterpreterRenderHandlers) => { + handlers.getCompatibleCellValueActions!(cellValueActionsParameter); + }, + }), + }); + + const expressionRenderHandler = new ExpressionRenderHandler(element, { + onRenderError: mockMockErrorRenderFunction, + getCompatibleCellValueActions, + }); + expect(getCompatibleCellValueActions).toHaveBeenCalledTimes(0); + await expressionRenderHandler.render({ type: 'render', as: 'something' }); + expect(getCompatibleCellValueActions).toHaveBeenCalledTimes(1); + expect(getCompatibleCellValueActions).toHaveBeenCalledWith(cellValueActionsParameter); + }); + it('sends a next observable once rendering is complete', () => { const expressionRenderHandler = new ExpressionRenderHandler(element); expect.assertions(1); diff --git a/src/plugins/expressions/public/render.ts b/src/plugins/expressions/public/render.ts index fd550b2888316..a7b919625b8d6 100644 --- a/src/plugins/expressions/public/render.ts +++ b/src/plugins/expressions/public/render.ts @@ -34,6 +34,7 @@ export interface ExpressionRenderHandlerParams { syncTooltips?: boolean; interactive?: boolean; hasCompatibleActions?: (event: ExpressionRendererEvent) => Promise; + getCompatibleCellValueActions?: (data: object[]) => Promise; executionContext?: KibanaExecutionContext; } @@ -63,6 +64,7 @@ export class ExpressionRenderHandler { syncCursor, interactive, hasCompatibleActions = async () => false, + getCompatibleCellValueActions = async () => [], executionContext, }: ExpressionRenderHandlerParams = {} ) { @@ -115,6 +117,7 @@ export class ExpressionRenderHandler { return interactive ?? true; }, hasCompatibleActions, + getCompatibleCellValueActions, }; } diff --git a/src/plugins/expressions/public/types/index.ts b/src/plugins/expressions/public/types/index.ts index c47eb4592fa4f..870b44e9bc02c 100644 --- a/src/plugins/expressions/public/types/index.ts +++ b/src/plugins/expressions/public/types/index.ts @@ -53,6 +53,7 @@ export interface IExpressionLoaderParams { syncCursor?: boolean; syncTooltips?: boolean; hasCompatibleActions?: ExpressionRenderHandlerParams['hasCompatibleActions']; + getCompatibleCellValueActions?: ExpressionRenderHandlerParams['getCompatibleCellValueActions']; executionContext?: KibanaExecutionContext; /** diff --git a/src/plugins/guided_onboarding/README.md b/src/plugins/guided_onboarding/README.md index 5e4b80cafae06..1b7e7465a53d8 100755 --- a/src/plugins/guided_onboarding/README.md +++ b/src/plugins/guided_onboarding/README.md @@ -16,7 +16,7 @@ The client-side code registers a button in the Kibana header that controls the g 3. Navigate to `/app/home#/getting_started` to view the onboarding landing page and start a guide. Alternatively, you can also start a guide within the guided onboarding example plugin at `/app/guidedOnboardingExample`. The example plugin includes a sample guide that showcases the framework's capabilities. It also provides a form to dynamically start a guide at a specific step. -## API service +## Client side: API service *Also see `KIBANA_FOLDER/examples/guided_onboarding_example` for code examples.* The guided onboarding plugin exposes an API service from its start contract that is intended to be used by other plugins. The API service allows consumers to access the current state of the guided onboarding process and manipulate it. @@ -39,14 +39,14 @@ public start(core: CoreStart, startDependencies: AppPluginStartDependencies) { } ``` -### isGuideStepActive$(guideID: string, stepID: string): Observable\ +### isGuideStepActive$(guideId: GuideId, stepId: GuideStepIds): Observable\ *Also see `KIBANA_FOLDER/examples/guided_onboarding_example/public/components/step_one.tsx`.* -The API service exposes an Observable that contains a boolean value for the state of a specific guide step. For example, if your plugin needs to check if the "Add data" step of the Security guide is currently active, you could use the following code snippet. +The API service exposes an Observable that contains a boolean value for the state of a specific guide step. For example, if your plugin needs to check if the "Add data" step of the SIEM guide is currently active, you could use the following code snippet. ``` const { guidedOnboardingApi } = guidedOnboarding; -const isDataStepActive = useObservable(guidedOnboardingApi!.isGuideStepActive$('security', 'add_data')); +const isDataStepActive = useObservable(guidedOnboardingApi!.isGuideStepActive$('siem', 'add_data')); useEffect(() => { // do some logic depending on the step state }, [isDataStepActive]); @@ -55,25 +55,33 @@ useEffect(() => { Alternatively, you can subscribe to the Observable directly. ``` useEffect(() => { - const subscription = guidedOnboardingApi?.isGuideStepActive$('security', 'add_data').subscribe((isDataStepACtive) => { + const subscription = guidedOnboardingApi?.isGuideStepActive$('siem', 'add_data').subscribe((isDataStepACtive) => { // do some logic depending on the step state }); return () => subscription?.unsubscribe(); }, [guidedOnboardingApi]); ``` -### isGuideStepReadyToComplete$(guideID: string, stepID: string): Observable\ +### isGuideStepReadyToComplete$(guideId: GuideId, stepId: GuideStepIds): Observable\ Similar to `isGuideStepActive$`, the observable `isGuideStepReadyToComplete$` can be used to track the state of a step that is configured for manual completion. The observable broadcasts `true` when the manual completion popover is displayed and the user can mark the step "done". In this state the step is not in progress anymore but is not yet fully completed. -### completeGuideStep(guideID: string, stepID: string): Promise\<{ state: GuidedOnboardingState } | undefined\> +### completeGuideStep(guideId: GuideId, stepId: GuideStepIds): Promise\<{ pluginState: PluginState } | undefined\> The API service exposes an async function to mark a guide step as completed. -If the specified guide step is not currently active, the function is a noop. The return value is `undefined` in that case, -otherwise an updated `GuidedOnboardingState` is returned *(This is WIP and will likely change in the 8.6 dev cycle)*. +If the specified guide step is not currently active, the function is a noop. In that case the return value is `undefined`, +otherwise an updated `PluginState` is returned. ``` -await guidedOnboardingApi?.completeGuideStep('security', 'add_data'); +await guidedOnboardingApi?.completeGuideStep('siem', 'add_data'); ``` ## Guides config -To use the API service, you need to know a guide ID (one of `search`, `observability`, `security`) and a step ID (for example, `add_data`, `search_experience`, `rules` etc). Refer to guides config files in the folder `./public/constants` for more information. +To use the API service, you need to know a guide ID (currently one of `search`, `kubernetes`, `siem`) and a step ID (for example, `add_data`, `search_experience`, `rules` etc). The consumers of guided onboarding register their guide configs themselves and have therefore full control over the guide ID and step IDs used for their guide. For more details on registering a guide config, see below. + +## Server side: register a guide config +The guided onboarding exposes a function `registerGuideConfig(guideId: GuideId, guideConfig: GuideConfig)` function in its setup contract. This function allows consumers to register a guide config for a specified guide ID. The function throws an error if a config already exists for the guide ID. See code examples in following plugins: + +- enterprise search: `x-pack/plugins/enterprise_search/server/plugin.ts` +- observability: `x-pack/plugins/observability/server/plugin.ts` +- security solution: `x-pack/plugins/security_solution/server/plugin.ts` + diff --git a/src/plugins/home/public/application/components/add_data/__snapshots__/add_data.test.tsx.snap b/src/plugins/home/public/application/components/add_data/__snapshots__/add_data.test.tsx.snap index 90f966b408993..69a17834fc4d3 100644 --- a/src/plugins/home/public/application/components/add_data/__snapshots__/add_data.test.tsx.snap +++ b/src/plugins/home/public/application/components/add_data/__snapshots__/add_data.test.tsx.snap @@ -103,11 +103,61 @@ exports[`AddData render 1`] = ` - + + + + + + + +

+ +

+
+ + + + + + + + +
+
+
diff --git a/src/plugins/home/public/application/components/add_data/add_data.tsx b/src/plugins/home/public/application/components/add_data/add_data.tsx index 73ef20e9566be..295c058e35e2c 100644 --- a/src/plugins/home/public/application/components/add_data/add_data.tsx +++ b/src/plugins/home/public/application/components/add_data/add_data.tsx @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import { i18n } from '@kbn/i18n'; import React, { FC, MouseEvent } from 'react'; import { EuiButton, @@ -13,6 +14,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiImage, + EuiPanel, EuiSpacer, EuiText, EuiTitle, @@ -138,18 +140,76 @@ export const AddData: FC = ({ addBasePath, application, isDarkMode, isClo - - - + {!isCloudEnabled ? ( + + + + + + + + +

+ +

+
+ + + + + + + + + + {/* eslint-disable-next-line @elastic/eui/href-or-on-click */} + { + trackUiMetric(METRIC_TYPE.CLICK, 'migrate_data_to_cloud'); + createAppNavigationHandler('/app/management/data/migrate_data')(event); + }} + > + + +
+
+
+
+ ) : ( + + + + )} ); diff --git a/src/plugins/kibana_react/public/assets/illustration_cloud_migration.png b/src/plugins/kibana_react/public/assets/illustration_cloud_migration.png new file mode 100644 index 0000000000000..0812083182213 Binary files /dev/null and b/src/plugins/kibana_react/public/assets/illustration_cloud_migration.png differ diff --git a/src/plugins/unified_search/public/query_string_input/add_filter_popover.tsx b/src/plugins/unified_search/public/query_string_input/add_filter_popover.tsx index 21e0af93f0616..997a5f6c66a3b 100644 --- a/src/plugins/unified_search/public/query_string_input/add_filter_popover.tsx +++ b/src/plugins/unified_search/public/query_string_input/add_filter_popover.tsx @@ -53,6 +53,7 @@ export const AddFilterPopover = React.memo(function AddFilterPopover({ size="m" disabled={isDisabled} {...buttonProps} + style={{ borderTopLeftRadius: 0, borderBottomLeftRadius: 0 }} /> ); diff --git a/src/plugins/unified_search/public/query_string_input/query_bar_menu.tsx b/src/plugins/unified_search/public/query_string_input/query_bar_menu.tsx index 0ae4b90672e81..2681ee2147e50 100644 --- a/src/plugins/unified_search/public/query_string_input/query_bar_menu.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_bar_menu.tsx @@ -109,6 +109,7 @@ export function QueryBarMenu({ onClick={onButtonClick} isDisabled={isDisabled} {...buttonProps} + style={{ borderTopRightRadius: 0, borderBottomRightRadius: 0 }} iconType="filter" aria-label={buttonLabel} data-test-subj="showQueryBarMenu" diff --git a/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx b/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx index 398e83a609312..40606238fee8e 100644 --- a/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx +++ b/src/plugins/visualizations/public/visualize_app/components/visualize_listing.tsx @@ -20,7 +20,7 @@ import { useLocation } from 'react-router-dom'; import type { SavedObjectsFindOptionsReference } from '@kbn/core/public'; import { useKibana, useExecutionContext } from '@kbn/kibana-react-plugin/public'; import { TableListView } from '@kbn/content-management-table-list'; -import type { OpenInspectorParams } from '@kbn/content-management-inspector'; +import type { OpenContentEditorParams } from '@kbn/content-management-content-editor'; import type { UserContentCommonSchema } from '@kbn/content-management-table-list'; import { findListItems } from '../../utils/saved_visualize_utils'; import { updateBasicSoAttributes } from '../../utils/saved_objects_utils/update_basic_attributes'; @@ -188,7 +188,7 @@ export const VisualizeListing = () => { [listingLimit, uiSettings, savedObjects.client] ); - const onInspectorSave = useCallback( + const onContentEditorSave = useCallback( async (args: { id: string; title: string; description?: string; tags: string[] }) => { const content = visualizedUserContent.current?.find(({ id }) => id === args.id); @@ -208,7 +208,7 @@ export const VisualizeListing = () => { [overlays, savedObjects.client, savedObjectsTagging] ); - const inspectorValidators: OpenInspectorParams['customValidators'] = useMemo( + const contentEditorValidators: OpenContentEditorParams['customValidators'] = useMemo( () => ({ title: [ { @@ -303,10 +303,10 @@ export const VisualizeListing = () => { listingLimit={listingLimit} initialPageSize={initialPageSize} initialFilter={''} - inspector={{ + contentEditor={{ isReadonly: !visualizeCapabilities.save, - onSave: onInspectorSave, - customValidators: inspectorValidators, + onSave: onContentEditorSave, + customValidators: contentEditorValidators, }} emptyPrompt={noItemsFragment} entityName={i18n.translate('visualizations.listing.table.entityName', { diff --git a/test/functional/apps/discover/group2/_sql_view.ts b/test/functional/apps/discover/group2/_sql_view.ts index 325752bc39fad..b52a147d09867 100644 --- a/test/functional/apps/discover/group2/_sql_view.ts +++ b/test/functional/apps/discover/group2/_sql_view.ts @@ -90,6 +90,29 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const cell = await dataGrid.getCellElement(0, 3); expect(await cell.getVisibleText()).to.be('2269'); }); + + it('should render when switching to a time range with no data, then back to a time range with data', async () => { + await PageObjects.discover.selectTextBaseLang('SQL'); + const testQuery = `SELECT "@tags", geo.dest, count(*) occurred FROM "logstash-*" + GROUP BY "@tags", geo.dest + HAVING occurred > 20 + ORDER BY occurred DESC`; + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + let cell = await dataGrid.getCellElement(0, 3); + expect(await cell.getVisibleText()).to.be('2269'); + await PageObjects.timePicker.setAbsoluteRange( + 'Sep 19, 2015 @ 06:31:44.000', + 'Sep 19, 2015 @ 06:31:44.000' + ); + await PageObjects.header.waitUntilLoadingHasFinished(); + expect(await testSubjects.exists('discoverNoResults')).to.be(true); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + await PageObjects.header.waitUntilLoadingHasFinished(); + cell = await dataGrid.getCellElement(0, 3); + expect(await cell.getVisibleText()).to.be('2269'); + }); }); }); } diff --git a/tsconfig.base.json b/tsconfig.base.json index b233c23db2285..713f0784f1217 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -18,8 +18,8 @@ "@kbn/analytics-shippers-fullstory/*": ["packages/analytics/shippers/fullstory/*"], "@kbn/analytics-shippers-gainsight": ["packages/analytics/shippers/gainsight"], "@kbn/analytics-shippers-gainsight/*": ["packages/analytics/shippers/gainsight/*"], - "@kbn/content-management-inspector": ["packages/content-management/inspector"], - "@kbn/content-management-inspector/*": ["packages/content-management/inspector/*"], + "@kbn/content-management-content-editor": ["packages/content-management/content_editor"], + "@kbn/content-management-content-editor/*": ["packages/content-management/content_editor/*"], "@kbn/content-management-table-list": ["packages/content-management/table_list"], "@kbn/content-management-table-list/*": ["packages/content-management/table_list/*"], "@kbn/core-analytics-browser": ["packages/core/analytics/core-analytics-browser"], @@ -1070,6 +1070,8 @@ "@kbn/cases-plugin/*": ["x-pack/plugins/cases/*"], "@kbn/cloud-chat-plugin": ["x-pack/plugins/cloud_integrations/cloud_chat"], "@kbn/cloud-chat-plugin/*": ["x-pack/plugins/cloud_integrations/cloud_chat/*"], + "@kbn/cloud-data-migration-plugin": ["x-pack/plugins/cloud_integrations/cloud_data_migration"], + "@kbn/cloud-data-migration-plugin/*": ["x-pack/plugins/cloud_integrations/cloud_data_migration/*"], "@kbn/cloud-experiments-plugin": ["x-pack/plugins/cloud_integrations/cloud_experiments"], "@kbn/cloud-experiments-plugin/*": ["x-pack/plugins/cloud_integrations/cloud_experiments/*"], "@kbn/cloud-full-story-plugin": ["x-pack/plugins/cloud_integrations/cloud_full_story"], diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index eef141c18c310..a27882c5bfc62 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -12,6 +12,7 @@ "xpack.cloud": "plugins/cloud", "xpack.cloudChat": "plugins/cloud_integrations/cloud_chat", "xpack.cloudLinks": "plugins/cloud_integrations/cloud_links", + "xpack.cloudDataMigration": "plugins/cloud_integrations/cloud_data_migration", "xpack.csp": "plugins/cloud_security_posture", "xpack.customBranding": "plugins/custom_branding", "xpack.dashboard": "plugins/dashboard_enhanced", diff --git a/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts b/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts index 954cd81ba36fc..81477e64125e8 100644 --- a/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts +++ b/x-pack/plugins/aiops/server/routes/explain_log_rate_spikes.ts @@ -6,6 +6,7 @@ */ import { queue } from 'async'; +import { uniqWith, isEqual } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; @@ -477,8 +478,8 @@ export const defineExplainLogRateSpikesRoute = ( // field/value pairs that are not part of the original list of significant change points. // This cleans up groups and removes those unrelated field/value pairs. const filteredDf = df - .map((fi) => { - fi.set = Object.entries(fi.set).reduce( + .map((fi, fiIndex) => { + const updatedSet = Object.entries(fi.set).reduce( (set, [field, value]) => { if ( changePoints.some( @@ -491,7 +492,16 @@ export const defineExplainLogRateSpikesRoute = ( }, {} ); + + // only assign the updated reduced set if it doesn't already match + // an existing set. if there's a match just add an empty set + // so it will be filtered in the last step. + fi.set = df.some((d, dIndex) => fiIndex !== dIndex && isEqual(fi.set, d.set)) + ? {} + : updatedSet; + fi.size = Object.keys(fi.set).length; + return fi; }) .filter((fi) => fi.size > 1); @@ -540,7 +550,7 @@ export const defineExplainLogRateSpikesRoute = ( return { ...g, - group, + group: uniqWith(group, (a, b) => isEqual(a, b)), }; } ); diff --git a/x-pack/plugins/alerting/server/task_runner/execution_handler.test.ts b/x-pack/plugins/alerting/server/task_runner/execution_handler.test.ts index d9669d1f3172b..b46f3ddb38236 100644 --- a/x-pack/plugins/alerting/server/task_runner/execution_handler.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/execution_handler.test.ts @@ -1168,6 +1168,109 @@ describe('Execution Handler', () => { expect(ruleRunMetricsStore.getTriggeredActionsStatus()).toBe(ActionsCompletion.COMPLETE); }); + test('schedules alerts with multiple recovered actions', async () => { + const actions = [ + { + id: '1', + group: 'recovered', + actionTypeId: 'test', + params: { + foo: true, + contextVal: 'My {{context.value}} goes here', + stateVal: 'My {{state.value}} goes here', + alertVal: + 'My {{alertId}} {{alertName}} {{spaceId}} {{tags}} {{alertInstanceId}} goes here', + }, + }, + { + id: '2', + group: 'recovered', + actionTypeId: 'test', + params: { + foo: true, + contextVal: 'My {{context.value}} goes here', + stateVal: 'My {{state.value}} goes here', + alertVal: + 'My {{alertId}} {{alertName}} {{spaceId}} {{tags}} {{alertInstanceId}} goes here', + }, + }, + ]; + const executionHandler = new ExecutionHandler( + generateExecutionParams({ + ...defaultExecutionParams, + rule: { + ...defaultExecutionParams.rule, + actions, + }, + }) + ); + await executionHandler.run(generateRecoveredAlert({ id: 1 })); + + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledTimes(1); + expect(actionsClient.bulkEnqueueExecution.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Array [ + Object { + "apiKey": "MTIzOmFiYw==", + "consumer": "rule-consumer", + "executionId": "5f6aa57d-3e22-484e-bae8-cbed868f4d28", + "id": "1", + "params": Object { + "alertVal": "My 1 name-of-alert test1 tag-A,tag-B 1 goes here", + "contextVal": "My goes here", + "foo": true, + "stateVal": "My goes here", + }, + "relatedSavedObjects": Array [ + Object { + "id": "1", + "namespace": "test1", + "type": "alert", + "typeId": "test", + }, + ], + "source": Object { + "source": Object { + "id": "1", + "type": "alert", + }, + "type": "SAVED_OBJECT", + }, + "spaceId": "test1", + }, + Object { + "apiKey": "MTIzOmFiYw==", + "consumer": "rule-consumer", + "executionId": "5f6aa57d-3e22-484e-bae8-cbed868f4d28", + "id": "2", + "params": Object { + "alertVal": "My 1 name-of-alert test1 tag-A,tag-B 1 goes here", + "contextVal": "My goes here", + "foo": true, + "stateVal": "My goes here", + }, + "relatedSavedObjects": Array [ + Object { + "id": "1", + "namespace": "test1", + "type": "alert", + "typeId": "test", + }, + ], + "source": Object { + "source": Object { + "id": "1", + "type": "alert", + }, + "type": "SAVED_OBJECT", + }, + "spaceId": "test1", + }, + ], + ] + `); + }); + describe('rule url', () => { const ruleWithUrl = { ...rule, diff --git a/x-pack/plugins/alerting/server/task_runner/execution_handler.ts b/x-pack/plugins/alerting/server/task_runner/execution_handler.ts index 06b3eb12bde48..e6575b0d2f8ed 100644 --- a/x-pack/plugins/alerting/server/task_runner/execution_handler.ts +++ b/x-pack/plugins/alerting/server/task_runner/execution_handler.ts @@ -281,9 +281,7 @@ export class ExecutionHandler< alertGroup: action.group, }); - if (this.isRecoveredAlert(actionGroup)) { - executableAlert.scheduleActions(action.group as ActionGroupIds); - } else { + if (!this.isRecoveredAlert(actionGroup)) { if (isSummaryActionOnInterval(action)) { executableAlert.updateLastScheduledActions( action.group as ActionGroupIds, diff --git a/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap b/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap index a154ededc2a33..29ae8156230d7 100644 --- a/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap +++ b/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap @@ -845,16 +845,6 @@ exports[`APM telemetry helpers getApmTelemetry generates a JSON object with the } } }, - "sourcemap": { - "properties": { - "1d": { - "type": "long" - }, - "all": { - "type": "long" - } - } - }, "onboarding": { "properties": { "1d": { @@ -1011,13 +1001,6 @@ exports[`APM telemetry helpers getApmTelemetry generates a JSON object with the } } }, - "sourcemap": { - "properties": { - "ms": { - "type": "long" - } - } - }, "onboarding": { "properties": { "ms": { diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/no_data_screen.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/no_data_screen.cy.ts index ae08bc1ea9b63..e73a9e6b608c4 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/no_data_screen.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/no_data_screen.cy.ts @@ -10,7 +10,6 @@ describe('No data screen', () => { before(() => { // Change indices setApmIndices({ - sourcemap: 'foo-*', error: 'foo-*', onboarding: 'foo-*', span: 'foo-*', @@ -37,7 +36,6 @@ describe('No data screen', () => { after(() => { // reset to default indices setApmIndices({ - sourcemap: '', error: '', onboarding: '', span: '', diff --git a/x-pack/plugins/apm/public/components/app/settings/apm_indices/index.tsx b/x-pack/plugins/apm/public/components/app/settings/apm_indices/index.tsx index 81b2ec53ddd33..419229fe3ac0f 100644 --- a/x-pack/plugins/apm/public/components/app/settings/apm_indices/index.tsx +++ b/x-pack/plugins/apm/public/components/app/settings/apm_indices/index.tsx @@ -33,13 +33,6 @@ import { } from '../../../../services/rest/create_call_apm_api'; const APM_INDEX_LABELS = [ - { - configurationName: 'sourcemap', - label: i18n.translate( - 'xpack.apm.settings.apmIndices.sourcemapIndicesLabel', - { defaultMessage: 'Sourcemap Indices' } - ), - }, { configurationName: 'error', label: i18n.translate('xpack.apm.settings.apmIndices.errorIndicesLabel', { diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx index 9bb8c04eb8bce..fed52b3bd995b 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx @@ -34,7 +34,10 @@ interface AccordionWaterfallProps { waterfallItemId?: string; waterfall: IWaterfall; timelineMargins: Margins; - onClickWaterfallItem: (item: IWaterfallSpanOrTransaction) => void; + onClickWaterfallItem: ( + item: IWaterfallSpanOrTransaction, + flyoutDetailTab: string + ) => void; showCriticalPath: boolean; maxLevelOpen: number; } @@ -159,8 +162,8 @@ export function AccordionWaterfall(props: AccordionWaterfallProps) { isSelected={item.id === waterfallItemId} errorCount={errorCount} marginLeftLevel={marginLeftLevel} - onClick={() => { - onClickWaterfallItem(item); + onClick={(flyoutDetailTab: string) => { + onClickWaterfallItem(item, flyoutDetailTab); }} segments={criticalPathSegmentsById[item.id] ?.filter((segment) => segment.self) diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/span_links_badge.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/span_links_badge.tsx index 194c3ec38bc9e..a0ff21afc3980 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/span_links_badge.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/span_links_badge.tsx @@ -9,13 +9,21 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { SpanLinksCount } from '../waterfall_helpers/waterfall_helpers'; -type Props = SpanLinksCount & { id: string }; +type Props = SpanLinksCount & { + id: string; + onClick: (flyoutDetailTab: string) => unknown; +}; -export function SpanLinksBadge({ linkedParents, linkedChildren, id }: Props) { +export function SpanLinksBadge({ + linkedParents, + linkedChildren, + id, + onClick, +}: Props) { if (!linkedParents && !linkedChildren) { return null; } - + const spanLinksFlyoutTab = 'span_links'; const total = linkedParents + linkedChildren; return ( } > - + { + e.stopPropagation(); + onClick(spanLinksFlyoutTab); + }} + onClickAriaLabel={i18n.translate( + 'xpack.apm.waterfall.spanLinks.badgeAriaLabel', + { + defaultMessage: 'Open span links details', + } + )} + > {i18n.translate('xpack.apm.waterfall.spanLinks.badge', { defaultMessage: '{total} {total, plural, one {Span link} other {Span links}}', diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx index 71a7135c1df71..191b38f73754a 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx @@ -31,15 +31,17 @@ const Container = euiStyled.div` const toggleFlyout = ({ history, item, + flyoutDetailTab, }: { history: History; item?: IWaterfallItem; + flyoutDetailTab?: string; }) => { history.replace({ ...history.location, search: fromQuery({ ...toQuery(location.search), - flyoutDetailTab: undefined, + flyoutDetailTab, waterfallItemId: item?.id, }), }); @@ -152,9 +154,10 @@ export function Waterfall({ duration={duration} waterfall={waterfall} timelineMargins={timelineMargins} - onClickWaterfallItem={(item: IWaterfallItem) => - toggleFlyout({ history, item }) - } + onClickWaterfallItem={( + item: IWaterfallItem, + flyoutDetailTab: string + ) => toggleFlyout({ history, item, flyoutDetailTab })} showCriticalPath={showCriticalPath} maxLevelOpen={maxLevelOpen} /> diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx index d298891fb92d5..0bde5cede8450 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx @@ -92,6 +92,7 @@ interface Props { traceId: string; totalDuration?: number; spanLinksCount: SpanLinksCount; + flyoutDetailTab?: string; onClose: () => void; } @@ -107,6 +108,7 @@ export function SpanFlyout({ totalDuration, onClose, spanLinksCount, + flyoutDetailTab, }: Props) { const { data = INITIAL_DATA, status } = useFetcher( (callApmApi) => { @@ -171,6 +173,7 @@ export function SpanFlyout({ parentTransaction={parentTransaction} totalDuration={totalDuration} spanLinksCount={spanLinksCount} + flyoutDetailTab={flyoutDetailTab} /> )} @@ -184,11 +187,13 @@ function SpanFlyoutBody({ parentTransaction, totalDuration, spanLinksCount, + flyoutDetailTab, }: { span: Span; parentTransaction?: Transaction; totalDuration?: number; spanLinksCount: SpanLinksCount; + flyoutDetailTab?: string; }) { const stackframes = span.span.stacktrace; const codeLanguage = parentTransaction?.service.language?.name; @@ -205,6 +210,46 @@ function SpanFlyoutBody({ spanId: span.span.id, processorEvent: ProcessorEvent.span, }); + + const tabs = [ + { + id: 'metadata', + name: i18n.translate('xpack.apm.propertiesTable.tabs.metadataLabel', { + defaultMessage: 'Metadata', + }), + content: ( + + + + + ), + }, + ...(!isEmpty(stackframes) + ? [ + { + id: 'stack-trace', + name: i18n.translate( + 'xpack.apm.transactionDetails.spanFlyout.stackTraceTabLabel', + { + defaultMessage: 'Stack Trace', + } + ), + content: ( + + + + + ), + }, + ] + : []), + ...(spanLinksTabContent ? [spanLinksTabContent] : []), + ]; + + const initialTab = tabs.find(({ id }) => id === flyoutDetailTab) ?? tabs[0]; return ( <> @@ -270,48 +315,7 @@ function SpanFlyoutBody({ /> - - - - - ), - }, - ...(!isEmpty(stackframes) - ? [ - { - id: 'stack-trace', - name: i18n.translate( - 'xpack.apm.transactionDetails.spanFlyout.stackTraceTabLabel', - { - defaultMessage: 'Stack Trace', - } - ), - content: ( - - - - - ), - }, - ] - : []), - ...(spanLinksTabContent ? [spanLinksTabContent] : []), - ]} - /> + ); } diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/index.tsx index cf3f5652b24a4..da53126636a27 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/index.tsx @@ -38,6 +38,7 @@ interface Props { errorCount?: number; rootTransactionDuration?: number; spanLinksCount: SpanLinksCount; + flyoutDetailTab?: string; } export function TransactionFlyout({ @@ -47,6 +48,7 @@ export function TransactionFlyout({ errorCount = 0, rootTransactionDuration, spanLinksCount, + flyoutDetailTab, }: Props) { const { data: transaction, status } = useFetcher( (callApmApi) => { @@ -96,6 +98,7 @@ export function TransactionFlyout({ errorCount={errorCount} rootTransactionDuration={rootTransactionDuration} spanLinksCount={spanLinksCount} + flyoutDetailTab={flyoutDetailTab} /> )} @@ -109,11 +112,13 @@ function TransactionFlyoutBody({ errorCount, rootTransactionDuration, spanLinksCount, + flyoutDetailTab, }: { transaction: Transaction; errorCount: number; rootTransactionDuration?: number; spanLinksCount: SpanLinksCount; + flyoutDetailTab?: string; }) { const spanLinksTabContent = getSpanLinksTabContent({ spanLinksCount, @@ -122,6 +127,24 @@ function TransactionFlyoutBody({ processorEvent: ProcessorEvent.transaction, }); + const tabs = [ + { + id: 'metadata', + name: i18n.translate('xpack.apm.propertiesTable.tabs.metadataLabel', { + defaultMessage: 'Metadata', + }), + content: ( + <> + + + + ), + }, + ...(spanLinksTabContent ? [spanLinksTabContent] : []), + ]; + + const initialTab = tabs.find(({ id }) => id === flyoutDetailTab) ?? tabs[0]; + return ( <> @@ -134,28 +157,7 @@ function TransactionFlyoutBody({ /> - - - - - ), - }, - ...(spanLinksTabContent ? [spanLinksTabContent] : []), - ]} - /> + ); } diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_flyout.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_flyout.tsx index db8460f23a6cf..4704828353b29 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_flyout.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_flyout.tsx @@ -8,6 +8,7 @@ import { History } from 'history'; import React from 'react'; import { useHistory } from 'react-router-dom'; +import { useApmParams } from '../../../../../../hooks/use_apm_params'; import { SpanFlyout } from './span_flyout'; import { TransactionFlyout } from './transaction_flyout'; import { IWaterfall } from './waterfall_helpers/waterfall_helpers'; @@ -15,7 +16,13 @@ import { IWaterfall } from './waterfall_helpers/waterfall_helpers'; interface Props { waterfallItemId?: string; waterfall: IWaterfall; - toggleFlyout: ({ history }: { history: History }) => void; + toggleFlyout: ({ + history, + flyoutDetailTab, + }: { + history: History; + flyoutDetailTab?: string; + }) => void; } export function WaterfallFlyout({ @@ -24,6 +31,9 @@ export function WaterfallFlyout({ toggleFlyout, }: Props) { const history = useHistory(); + const { + query: { flyoutDetailTab }, + } = useApmParams('/services/{serviceName}/transactions/view'); const currentItem = waterfall.items.find( (item) => item.id === waterfallItemId ); @@ -47,6 +57,7 @@ export function WaterfallFlyout({ traceId={currentItem.doc.trace.id} onClose={() => toggleFlyout({ history })} spanLinksCount={currentItem.spanLinksCount} + flyoutDetailTab={flyoutDetailTab} /> ); case 'transaction': @@ -58,6 +69,7 @@ export function WaterfallFlyout({ rootTransactionDuration={waterfall.rootWaterfallTransaction?.duration} errorCount={waterfall.getErrorCount(currentItem.id)} spanLinksCount={currentItem.spanLinksCount} + flyoutDetailTab={flyoutDetailTab} /> ); default: diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx index 416e46a6101aa..39ad6f4945dff 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx @@ -122,7 +122,7 @@ interface IWaterfallItemProps { width: number; color: string; }>; - onClick: () => unknown; + onClick: (flyoutDetailTab: string) => unknown; } function PrefixIcon({ item }: { item: IWaterfallSpanOrTransaction }) { @@ -254,6 +254,8 @@ export function WaterfallItem({ const isServerlessColdstart = item.docType === 'transaction' && item.doc.faas?.coldstart; + const waterfallItemFlyoutTab = 'metadata'; + return ( { e.stopPropagation(); - onClick(); + onClick(waterfallItemFlyoutTab); }} > {isServerlessColdstart && } diff --git a/x-pack/plugins/apm/public/components/routing/service_detail/index.tsx b/x-pack/plugins/apm/public/components/routing/service_detail/index.tsx index 2964cd7b7934c..d2e84cf8e4a85 100644 --- a/x-pack/plugins/apm/public/components/routing/service_detail/index.tsx +++ b/x-pack/plugins/apm/public/components/routing/service_detail/index.tsx @@ -186,6 +186,7 @@ export const serviceDetail = { t.partial({ traceId: t.string, transactionId: t.string, + flyoutDetailTab: t.string, }), offsetRt, ]), diff --git a/x-pack/plugins/apm/scripts/shared/read_kibana_config.ts b/x-pack/plugins/apm/scripts/shared/read_kibana_config.ts index f3e2b48390468..fffe4586d3167 100644 --- a/x-pack/plugins/apm/scripts/shared/read_kibana_config.ts +++ b/x-pack/plugins/apm/scripts/shared/read_kibana_config.ts @@ -43,7 +43,6 @@ export const readKibanaConfig = () => { 'xpack.apm.indices.error': 'logs-apm*,apm-*', 'xpack.apm.indices.span': 'traces-apm*,apm-*', 'xpack.apm.indices.onboarding': 'apm-*', - 'xpack.apm.indices.sourcemap': 'apm-*', 'elasticsearch.hosts': 'http://localhost:9200', ...loadedKibanaConfig, ...cliEsCredentials, diff --git a/x-pack/plugins/apm/server/index.ts b/x-pack/plugins/apm/server/index.ts index 19b34766a1bf2..d04d10a1cccad 100644 --- a/x-pack/plugins/apm/server/index.ts +++ b/x-pack/plugins/apm/server/index.ts @@ -51,7 +51,6 @@ const configSchema = schema.object({ span: schema.string({ defaultValue: 'traces-apm*,apm-*' }), error: schema.string({ defaultValue: 'logs-apm*,apm-*' }), metric: schema.string({ defaultValue: 'metrics-apm*,apm-*' }), - sourcemap: schema.string({ defaultValue: 'apm-*' }), onboarding: schema.string({ defaultValue: 'apm-*' }), }), forceSyntheticSource: schema.boolean({ defaultValue: false }), @@ -61,10 +60,12 @@ const configSchema = schema.object({ export const config: PluginConfigDescriptor = { deprecations: ({ rename, + unused, renameFromRoot, deprecateFromRoot, unusedFromRoot, }) => [ + unused('indices.sourcemap', { level: 'warning' }), rename('autocreateApmIndexPattern', 'autoCreateApmDataView', { level: 'warning', }), diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts index 1b9103aeefc6a..d48ab312a5674 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts @@ -298,10 +298,6 @@ describe('data telemetry collection tasks', () => { '1d': 1, all: 1, }, - sourcemap: { - '1d': 1, - all: 1, - }, span: { '1d': 1, all: 1, @@ -321,9 +317,6 @@ describe('data telemetry collection tasks', () => { onboarding: { ms: 0, }, - sourcemap: { - ms: 0, - }, span: { ms: 0, }, diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts index d7d14c37e819f..88cbcdc842d11 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts @@ -54,7 +54,10 @@ import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; import { Span } from '../../../../typings/es_schemas/ui/span'; import { Transaction } from '../../../../typings/es_schemas/ui/transaction'; import { APMTelemetry, APMPerService, APMDataTelemetry } from '../types'; -import { ApmIndicesConfig } from '../../../routes/settings/apm_indices/get_apm_indices'; +import { + ApmIndicesConfig, + APM_AGENT_CONFIGURATION_INDEX, +} from '../../../routes/settings/apm_indices/get_apm_indices'; import { TelemetryClient } from '../telemetry_client'; type ISavedObjectsClient = Pick; @@ -464,7 +467,6 @@ export const tasks: TelemetryTask[] = [ span: indices.span, transaction: indices.transaction, onboarding: indices.onboarding, - sourcemap: indices.sourcemap, }; type ProcessorEvent = keyof typeof indicesByProcessorEvent; @@ -558,7 +560,7 @@ export const tasks: TelemetryTask[] = [ name: 'agent_configuration', executor: async ({ indices, telemetryClient }) => { const agentConfigurationCount = await telemetryClient.search({ - index: indices.apmAgentConfigurationIndex, + index: APM_AGENT_CONFIGURATION_INDEX, body: { size: 0, timeout, @@ -1033,11 +1035,10 @@ export const tasks: TelemetryTask[] = [ executor: async ({ indices, telemetryClient }) => { const response = await telemetryClient.indicesStats({ index: [ - indices.apmAgentConfigurationIndex, + APM_AGENT_CONFIGURATION_INDEX, indices.error, indices.metric, indices.onboarding, - indices.sourcemap, indices.span, indices.transaction, ], diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts index c73eeae128cfe..11b8d34da19ad 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts @@ -193,7 +193,6 @@ export const apmSchema: MakeSchemaFrom = { span: timeframeMapSchema, error: timeframeMapSchema, metric: timeframeMapSchema, - sourcemap: timeframeMapSchema, onboarding: timeframeMapSchema, agent_configuration: timeframeMapAllSchema, max_transaction_groups_per_service: timeframeMapSchema, @@ -221,7 +220,6 @@ export const apmSchema: MakeSchemaFrom = { transaction: { ms: long }, error: { ms: long }, metric: { ms: long }, - sourcemap: { ms: long }, onboarding: { ms: long }, }, integrations: { ml: { all_jobs_count: long } }, diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/types.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/types.ts index 518bb969bcb0e..54f0963dfbb62 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/types.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/types.ts @@ -101,7 +101,6 @@ export interface APMUsage { span: TimeframeMap; error: TimeframeMap; metric: TimeframeMap; - sourcemap: TimeframeMap; onboarding: TimeframeMap; agent_configuration: TimeframeMapAll; max_transaction_groups_per_service: TimeframeMap; @@ -125,7 +124,7 @@ export interface APMUsage { }; }; retainment: Record< - 'span' | 'transaction' | 'error' | 'metric' | 'sourcemap' | 'onboarding', + 'span' | 'transaction' | 'error' | 'metric' | 'onboarding', { ms: number } >; integrations: { diff --git a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.test.ts b/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.test.ts index c0aa066798611..abeb548271b04 100644 --- a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.test.ts +++ b/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.test.ts @@ -27,7 +27,6 @@ describe('unpackProcessorEvents', () => { error: 'my-apm-*-error-*', span: 'my-apm-*-span-*', onboarding: 'my-apm-*-onboarding-*', - sourcemap: 'my-apm-*-sourcemap-*', } as ApmIndicesConfig; res = unpackProcessorEvents(request, indices); diff --git a/x-pack/plugins/apm/server/plugin.ts b/x-pack/plugins/apm/server/plugin.ts index 60c3750b1aa3a..17b6d2c0e8250 100644 --- a/x-pack/plugins/apm/server/plugin.ts +++ b/x-pack/plugins/apm/server/plugin.ts @@ -56,6 +56,8 @@ import { } from '../common/es_fields/apm'; import { tutorialProvider } from './tutorial'; import { migrateLegacyAPMIndicesToSpaceAware } from './saved_objects/migrations/migrate_legacy_apm_indices_to_space_aware'; +import { scheduleSourceMapMigration } from './routes/source_maps/schedule_source_map_migration'; +import { createApmSourceMapIndexTemplate } from './routes/source_maps/create_apm_source_map_index_template'; export class APMPlugin implements @@ -110,6 +112,9 @@ export class APMPlugin const getCoreStart = () => core.getStartServices().then(([coreStart]) => coreStart); + const getPluginStart = () => + core.getStartServices().then(([coreStart, pluginStart]) => pluginStart); + const { ruleDataService } = plugins.ruleRegistry; const ruleDataClient = ruleDataService.initializeIndex({ feature: APM_SERVER_FEATURE_ID, @@ -220,6 +225,21 @@ export class APMPlugin kibanaVersion: this.initContext.env.packageInfo.version, }); + const fleetStartPromise = resourcePlugins.fleet?.start(); + const taskManager = plugins.taskManager; + + // create source map index and run migrations + scheduleSourceMapMigration({ + coreStartPromise: getCoreStart(), + pluginStartPromise: getPluginStart(), + fleetStartPromise, + taskManager, + logger: this.logger, + }).catch((e) => { + this.logger?.error('Failed to schedule APM source map migration'); + this.logger?.error(e); + }); + return { config$, getApmIndices: boundGetApmIndices, @@ -254,28 +274,39 @@ export class APMPlugin }; } - public start(core: CoreStart) { + public start(core: CoreStart, plugins: APMPluginStartDependencies) { if (this.currentConfig == null || this.logger == null) { throw new Error('APMPlugin needs to be setup before calling start()'); } - // create agent configuration index without blocking start lifecycle - createApmAgentConfigurationIndex({ - client: core.elasticsearch.client.asInternalUser, - config: this.currentConfig, - logger: this.logger, + const logger = this.logger; + const client = core.elasticsearch.client.asInternalUser; + + // create .apm-agent-configuration index without blocking start lifecycle + createApmAgentConfigurationIndex({ client, logger }).catch((e) => { + logger.error('Failed to create .apm-agent-configuration index'); + logger.error(e); }); - // create custom action index without blocking start lifecycle - createApmCustomLinkIndex({ - client: core.elasticsearch.client.asInternalUser, - config: this.currentConfig, - logger: this.logger, + + // create .apm-custom-link index without blocking start lifecycle + createApmCustomLinkIndex({ client, logger }).catch((e) => { + logger.error('Failed to create .apm-custom-link index'); + logger.error(e); }); - migrateLegacyAPMIndicesToSpaceAware({ - coreStart: core, - logger: this.logger, + // create .apm-source-map index without blocking start lifecycle + createApmSourceMapIndexTemplate({ client, logger }).catch((e) => { + logger.error('Failed to create apm-source-map index template'); + logger.error(e); }); + + // TODO: remove in 9.0 + migrateLegacyAPMIndicesToSpaceAware({ coreStart: core, logger }).catch( + (e) => { + logger.error('Failed to run migration making APM indices space aware'); + logger.error(e); + } + ); } public stop() {} diff --git a/x-pack/plugins/apm/server/routes/fleet/source_maps.ts b/x-pack/plugins/apm/server/routes/fleet/source_maps.ts index 9cba744cdb689..c2e7ca7110fe8 100644 --- a/x-pack/plugins/apm/server/routes/fleet/source_maps.ts +++ b/x-pack/plugins/apm/server/routes/fleet/source_maps.ts @@ -18,32 +18,26 @@ import { APMPluginStartDependencies } from '../../types'; import { getApmPackagePolicies } from './get_apm_package_policies'; import { APM_SERVER, PackagePolicy } from './register_fleet_policy_callbacks'; -export interface ApmArtifactBody { +const doUnzip = promisify(unzip); + +interface ApmSourceMapArtifactBody { serviceName: string; serviceVersion: string; bundleFilepath: string; sourceMap: SourceMap; } export type ArtifactSourceMap = Omit & { - body: ApmArtifactBody; + body: ApmSourceMapArtifactBody; }; export type FleetPluginStart = NonNullable; -const doUnzip = promisify(unzip); - -async function unzipArtifactBody( - artifact: Artifact -): Promise { - const body = await doUnzip(Buffer.from(artifact.body, 'base64')); - - return { - ...artifact, - body: JSON.parse(body.toString()) as ApmArtifactBody, - }; +export async function getUnzippedArtifactBody(artifactBody: string) { + const unzippedBody = await doUnzip(Buffer.from(artifactBody, 'base64')); + return JSON.parse(unzippedBody.toString()) as ApmSourceMapArtifactBody; } -function getApmArtifactClient(fleetPluginStart: FleetPluginStart) { +export function getApmArtifactClient(fleetPluginStart: FleetPluginStart) { return fleetPluginStart.createArtifactsClient('apm'); } @@ -66,17 +60,20 @@ export async function listSourceMapArtifacts({ }); const artifacts = await Promise.all( - artifactsResponse.items.map(unzipArtifactBody) + artifactsResponse.items.map(async (item) => { + const body = await getUnzippedArtifactBody(item.body); + return { ...item, body }; + }) ); return { artifacts, total: artifactsResponse.total }; } -export async function createApmArtifact({ +export async function createFleetSourceMapArtifact({ apmArtifactBody, fleetPluginStart, }: { - apmArtifactBody: ApmArtifactBody; + apmArtifactBody: ApmSourceMapArtifactBody; fleetPluginStart: FleetPluginStart; }) { const apmArtifactClient = getApmArtifactClient(fleetPluginStart); @@ -89,7 +86,7 @@ export async function createApmArtifact({ }); } -export async function deleteApmArtifact({ +export async function deleteFleetSourcemapArtifact({ id, fleetPluginStart, }: { @@ -141,12 +138,12 @@ export async function updateSourceMapsOnFleetPolicies({ core, fleetPluginStart, savedObjectsClient, - elasticsearchClient, + internalESClient, }: { core: { setup: CoreSetup; start: () => Promise }; fleetPluginStart: FleetPluginStart; savedObjectsClient: SavedObjectsClientContract; - elasticsearchClient: ElasticsearchClient; + internalESClient: ElasticsearchClient; }) { const { artifacts } = await listSourceMapArtifacts({ fleetPluginStart }); const apmFleetPolicies = await getApmPackagePolicies({ @@ -171,7 +168,7 @@ export async function updateSourceMapsOnFleetPolicies({ await fleetPluginStart.packagePolicyService.update( savedObjectsClient, - elasticsearchClient, + internalESClient, id, updatedPackagePolicy ); @@ -179,11 +176,11 @@ export async function updateSourceMapsOnFleetPolicies({ ); } -export function getCleanedBundleFilePath(bundleFilePath: string) { +export function getCleanedBundleFilePath(bundleFilepath: string) { try { - const cleanedBundleFilepath = new URL(bundleFilePath); + const cleanedBundleFilepath = new URL(bundleFilepath); return cleanedBundleFilepath.href; } catch (e) { - return bundleFilePath; + return bundleFilepath; } } diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/__snapshots__/queries.test.ts.snap b/x-pack/plugins/apm/server/routes/settings/agent_configuration/__snapshots__/queries.test.ts.snap index e626209fe75db..4edd9dcfe99dc 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/__snapshots__/queries.test.ts.snap +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/__snapshots__/queries.test.ts.snap @@ -1,10 +1,88 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`agent configuration queries findExactConfiguration find configuration by service.environment 1`] = `undefined`; +exports[`agent configuration queries findExactConfiguration find configuration by service.environment 1`] = ` +Object { + "body": Object { + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "bool": Object { + "must_not": Array [ + Object { + "exists": Object { + "field": "service.name", + }, + }, + ], + }, + }, + Object { + "term": Object { + "service.environment": "bar", + }, + }, + ], + }, + }, + }, + "index": ".apm-agent-configuration", +} +`; -exports[`agent configuration queries findExactConfiguration find configuration by service.name 1`] = `undefined`; +exports[`agent configuration queries findExactConfiguration find configuration by service.name 1`] = ` +Object { + "body": Object { + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "term": Object { + "service.name": "foo", + }, + }, + Object { + "bool": Object { + "must_not": Array [ + Object { + "exists": Object { + "field": "service.environment", + }, + }, + ], + }, + }, + ], + }, + }, + }, + "index": ".apm-agent-configuration", +} +`; -exports[`agent configuration queries findExactConfiguration find configuration by service.name and service.environment 1`] = `undefined`; +exports[`agent configuration queries findExactConfiguration find configuration by service.name and service.environment 1`] = ` +Object { + "body": Object { + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "term": Object { + "service.name": "foo", + }, + }, + Object { + "term": Object { + "service.environment": "bar", + }, + }, + ], + }, + }, + }, + "index": ".apm-agent-configuration", +} +`; exports[`agent configuration queries getAllEnvironments fetches all environments 1`] = ` Object { @@ -42,10 +120,142 @@ Object { } `; -exports[`agent configuration queries getExistingEnvironmentsForService fetches unavailable environments 1`] = `undefined`; +exports[`agent configuration queries getExistingEnvironmentsForService fetches unavailable environments 1`] = ` +Object { + "body": Object { + "aggs": Object { + "environments": Object { + "terms": Object { + "field": "service.environment", + "missing": "ALL_OPTION_VALUE", + "size": 50, + }, + }, + }, + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "term": Object { + "service.name": "foo", + }, + }, + ], + }, + }, + "size": 0, + }, + "index": ".apm-agent-configuration", +} +`; -exports[`agent configuration queries listConfigurations fetches configurations 1`] = `undefined`; +exports[`agent configuration queries listConfigurations fetches configurations 1`] = ` +Object { + "index": ".apm-agent-configuration", + "size": 200, +} +`; -exports[`agent configuration queries searchConfigurations fetches filtered configurations with an environment 1`] = `undefined`; +exports[`agent configuration queries searchConfigurations fetches filtered configurations with an environment 1`] = ` +Object { + "body": Object { + "query": Object { + "bool": Object { + "minimum_should_match": 2, + "should": Array [ + Object { + "constant_score": Object { + "boost": 2, + "filter": Object { + "term": Object { + "service.name": "foo", + }, + }, + }, + }, + Object { + "constant_score": Object { + "boost": 1, + "filter": Object { + "term": Object { + "service.environment": "bar", + }, + }, + }, + }, + Object { + "bool": Object { + "must_not": Array [ + Object { + "exists": Object { + "field": "service.name", + }, + }, + ], + }, + }, + Object { + "bool": Object { + "must_not": Array [ + Object { + "exists": Object { + "field": "service.environment", + }, + }, + ], + }, + }, + ], + }, + }, + }, + "index": ".apm-agent-configuration", +} +`; -exports[`agent configuration queries searchConfigurations fetches filtered configurations without an environment 1`] = `undefined`; +exports[`agent configuration queries searchConfigurations fetches filtered configurations without an environment 1`] = ` +Object { + "body": Object { + "query": Object { + "bool": Object { + "minimum_should_match": 2, + "should": Array [ + Object { + "constant_score": Object { + "boost": 2, + "filter": Object { + "term": Object { + "service.name": "foo", + }, + }, + }, + }, + Object { + "bool": Object { + "must_not": Array [ + Object { + "exists": Object { + "field": "service.name", + }, + }, + ], + }, + }, + Object { + "bool": Object { + "must_not": Array [ + Object { + "exists": Object { + "field": "service.environment", + }, + }, + ], + }, + }, + ], + }, + }, + }, + "index": ".apm-agent-configuration", +} +`; diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/create_agent_config_index.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/create_agent_config_index.ts index 05e9b4d87589a..4aebdfaf03e6a 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/create_agent_config_index.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/create_agent_config_index.ts @@ -10,21 +10,17 @@ import { createOrUpdateIndex, Mappings, } from '@kbn/observability-plugin/server'; -import { APMConfig } from '../../..'; -import { getApmIndicesConfig } from '../apm_indices/get_apm_indices'; +import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/get_apm_indices'; export async function createApmAgentConfigurationIndex({ client, - config, logger, }: { client: ElasticsearchClient; - config: APMConfig; logger: Logger; }) { - const index = getApmIndicesConfig(config).apmAgentConfigurationIndex; return createOrUpdateIndex({ - index, + index: APM_AGENT_CONFIGURATION_INDEX, client, logger, mappings, diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/create_or_update_configuration.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/create_or_update_configuration.ts index 5e7a1551fdc6c..666195217ccdc 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/create_or_update_configuration.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/create_or_update_configuration.ts @@ -14,6 +14,7 @@ import { APMIndexDocumentParams, APMInternalESClient, } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/get_apm_indices'; export function createOrUpdateConfiguration({ configurationId, @@ -26,7 +27,7 @@ export function createOrUpdateConfiguration({ }) { const params: APMIndexDocumentParams = { refresh: true, - index: internalESClient.apmIndices.apmAgentConfigurationIndex, + index: APM_AGENT_CONFIGURATION_INDEX, body: { agent_name: configurationIntake.agent_name, service: { diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/delete_configuration.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/delete_configuration.ts index 58896f40b2ede..d0897fb48941b 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/delete_configuration.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/delete_configuration.ts @@ -6,6 +6,7 @@ */ import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/get_apm_indices'; export async function deleteConfiguration({ configurationId, @@ -16,7 +17,7 @@ export async function deleteConfiguration({ }) { const params = { refresh: 'wait_for' as const, - index: internalESClient.apmIndices.apmAgentConfigurationIndex, + index: APM_AGENT_CONFIGURATION_INDEX, id: configurationId, }; diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts index b9a0d5cb36fd0..3d65d534e9545 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts @@ -12,6 +12,7 @@ import { SERVICE_NAME, } from '../../../../common/es_fields/apm'; import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/get_apm_indices'; import { convertConfigSettingsToString } from './convert_settings_to_string'; import { getConfigsAppliedToAgentsThroughFleet } from './get_config_applied_to_agent_through_fleet'; @@ -31,7 +32,7 @@ export async function findExactConfiguration({ : { bool: { must_not: [{ exists: { field: SERVICE_ENVIRONMENT } }] } }; const params = { - index: internalESClient.apmIndices.apmAgentConfigurationIndex, + index: APM_AGENT_CONFIGURATION_INDEX, body: { query: { bool: { filter: [serviceNameFilter, environmentFilter] }, diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts index 4223ecdf0ed21..3e588a5c8d9e5 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts @@ -11,6 +11,7 @@ import { } from '../../../../../common/es_fields/apm'; import { ALL_OPTION_VALUE } from '../../../../../common/agent_configuration/all_option'; import { APMInternalESClient } from '../../../../lib/helpers/create_es_client/create_internal_es_client'; +import { APM_AGENT_CONFIGURATION_INDEX } from '../../apm_indices/get_apm_indices'; export async function getExistingEnvironmentsForService({ serviceName, @@ -26,7 +27,7 @@ export async function getExistingEnvironmentsForService({ : { must_not: [{ exists: { field: SERVICE_NAME } }] }; const params = { - index: internalESClient.apmIndices.apmAgentConfigurationIndex, + index: APM_AGENT_CONFIGURATION_INDEX, body: { size: 0, query: { bool }, diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/list_configurations.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/list_configurations.ts index 7f6a5dd20bf0b..6a7e53097945e 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/list_configurations.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/list_configurations.ts @@ -9,12 +9,13 @@ import { AgentConfiguration } from '../../../../common/agent_configuration/confi import { convertConfigSettingsToString } from './convert_settings_to_string'; import { getConfigsAppliedToAgentsThroughFleet } from './get_config_applied_to_agent_through_fleet'; import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/get_apm_indices'; export async function listConfigurations( internalESClient: APMInternalESClient ) { const params = { - index: internalESClient.apmIndices.apmAgentConfigurationIndex, + index: APM_AGENT_CONFIGURATION_INDEX, size: 200, }; diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/mark_applied_by_agent.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/mark_applied_by_agent.ts index c104b4743df91..6b32bbacd3b2a 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/mark_applied_by_agent.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/mark_applied_by_agent.ts @@ -7,6 +7,7 @@ import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/get_apm_indices'; // We're not wrapping this function with a span as it is not blocking the request export async function markAppliedByAgent({ @@ -19,7 +20,7 @@ export async function markAppliedByAgent({ internalESClient: APMInternalESClient; }) { const params = { - index: internalESClient.apmIndices.apmAgentConfigurationIndex, + index: APM_AGENT_CONFIGURATION_INDEX, id, // by specifying the `id` elasticsearch will do an "upsert" body: { ...body, diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/search_configurations.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/search_configurations.ts index 51f6702a0fb57..77da47b62c1c8 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/search_configurations.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/search_configurations.ts @@ -13,6 +13,7 @@ import { import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; import { convertConfigSettingsToString } from './convert_settings_to_string'; import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/get_apm_indices'; export async function searchConfigurations({ service, @@ -47,7 +48,7 @@ export async function searchConfigurations({ : []; const params = { - index: internalESClient.apmIndices.apmAgentConfigurationIndex, + index: APM_AGENT_CONFIGURATION_INDEX, body: { query: { bool: { diff --git a/x-pack/plugins/apm/server/routes/settings/apm_indices/get_apm_indices.ts b/x-pack/plugins/apm/server/routes/settings/apm_indices/get_apm_indices.ts index f80c81d0bd0ef..9153c7113ccba 100644 --- a/x-pack/plugins/apm/server/routes/settings/apm_indices/get_apm_indices.ts +++ b/x-pack/plugins/apm/server/routes/settings/apm_indices/get_apm_indices.ts @@ -16,16 +16,17 @@ import { withApmSpan } from '../../../utils/with_apm_span'; import { APMIndices } from '../../../saved_objects/apm_indices'; export type ApmIndicesConfig = Readonly<{ - sourcemap: string; error: string; onboarding: string; span: string; transaction: string; metric: string; - apmAgentConfigurationIndex: string; - apmCustomLinkIndex: string; }>; +export const APM_AGENT_CONFIGURATION_INDEX = '.apm-agent-configuration'; +export const APM_CUSTOM_LINK_INDEX = '.apm-custom-link'; +export const APM_SOURCE_MAP_INDEX = '.apm-source-map'; + type ISavedObjectsClient = Pick; async function getApmIndicesSavedObject( @@ -44,15 +45,11 @@ async function getApmIndicesSavedObject( export function getApmIndicesConfig(config: APMConfig): ApmIndicesConfig { return { - sourcemap: config.indices.sourcemap, error: config.indices.error, onboarding: config.indices.onboarding, span: config.indices.span, transaction: config.indices.transaction, metric: config.indices.metric, - // system indices, not configurable - apmAgentConfigurationIndex: '.apm-agent-configuration', - apmCustomLinkIndex: '.apm-custom-link', }; } diff --git a/x-pack/plugins/apm/server/routes/settings/apm_indices/route.ts b/x-pack/plugins/apm/server/routes/settings/apm_indices/route.ts index 81d37c8d34608..4217fd7c19d6e 100644 --- a/x-pack/plugins/apm/server/routes/settings/apm_indices/route.ts +++ b/x-pack/plugins/apm/server/routes/settings/apm_indices/route.ts @@ -25,7 +25,6 @@ const apmIndexSettingsRoute = createApmServerRoute({ | 'span' | 'error' | 'metric' - | 'sourcemap' | 'onboarding'; defaultValue: string; savedValue: string | undefined; @@ -66,7 +65,6 @@ const saveApmIndicesRoute = createApmServerRoute({ }, params: t.type({ body: t.partial({ - sourcemap: t.string, error: t.string, onboarding: t.string, span: t.string, diff --git a/x-pack/plugins/apm/server/routes/settings/custom_link/__snapshots__/list_custom_links.test.ts.snap b/x-pack/plugins/apm/server/routes/settings/custom_link/__snapshots__/list_custom_links.test.ts.snap index d05f0bc081eba..520b185fc797e 100644 --- a/x-pack/plugins/apm/server/routes/settings/custom_link/__snapshots__/list_custom_links.test.ts.snap +++ b/x-pack/plugins/apm/server/routes/settings/custom_link/__snapshots__/list_custom_links.test.ts.snap @@ -1,5 +1,90 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`List Custom Links fetches all custom links 1`] = `undefined`; +exports[`List Custom Links fetches all custom links 1`] = ` +Object { + "body": Object { + "query": Object { + "bool": Object { + "filter": Array [], + }, + }, + "sort": Array [ + Object { + "label.keyword": Object { + "order": "asc", + }, + }, + ], + }, + "index": ".apm-custom-link", + "size": 500, +} +`; -exports[`List Custom Links filters custom links 1`] = `undefined`; +exports[`List Custom Links filters custom links 1`] = ` +Object { + "body": Object { + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "term": Object { + "service.name": "foo", + }, + }, + Object { + "bool": Object { + "must_not": Array [ + Object { + "exists": Object { + "field": "service.name", + }, + }, + ], + }, + }, + ], + }, + }, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "term": Object { + "transaction.name": "bar", + }, + }, + Object { + "bool": Object { + "must_not": Array [ + Object { + "exists": Object { + "field": "transaction.name", + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + "sort": Array [ + Object { + "label.keyword": Object { + "order": "asc", + }, + }, + ], + }, + "index": ".apm-custom-link", + "size": 500, +} +`; diff --git a/x-pack/plugins/apm/server/routes/settings/custom_link/create_custom_link_index.ts b/x-pack/plugins/apm/server/routes/settings/custom_link/create_custom_link_index.ts index 4f9fc321a19f9..b8bfc3b3f2f72 100644 --- a/x-pack/plugins/apm/server/routes/settings/custom_link/create_custom_link_index.ts +++ b/x-pack/plugins/apm/server/routes/settings/custom_link/create_custom_link_index.ts @@ -11,21 +11,17 @@ import { createOrUpdateIndex, Mappings, } from '@kbn/observability-plugin/server'; -import { APMConfig } from '../../..'; -import { getApmIndicesConfig } from '../apm_indices/get_apm_indices'; +import { APM_CUSTOM_LINK_INDEX } from '../apm_indices/get_apm_indices'; export const createApmCustomLinkIndex = async ({ client, - config, logger, }: { client: ElasticsearchClient; - config: APMConfig; logger: Logger; }) => { - const index = getApmIndicesConfig(config).apmCustomLinkIndex; return createOrUpdateIndex({ - index, + index: APM_CUSTOM_LINK_INDEX, client, logger, mappings, diff --git a/x-pack/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.test.ts b/x-pack/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.test.ts index f93e1f87b7360..4d768cdff09d4 100644 --- a/x-pack/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.test.ts +++ b/x-pack/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.test.ts @@ -8,18 +8,12 @@ import { mockNow } from '../../../utils/test_helpers'; import { CustomLink } from '../../../../common/custom_link/custom_link_types'; import { createOrUpdateCustomLink } from './create_or_update_custom_link'; -import { ApmIndicesConfig } from '../apm_indices/get_apm_indices'; import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; describe('Create or Update Custom link', () => { const internalClientIndexMock = jest.fn(); - const mockIndices = { - apmCustomLinkIndex: 'apmCustomLinkIndex', - } as unknown as ApmIndicesConfig; - const mockInternalESClient = { - apmIndices: mockIndices, index: internalClientIndexMock, } as unknown as APMInternalESClient; @@ -48,7 +42,7 @@ describe('Create or Update Custom link', () => { 'create_or_update_custom_link', { refresh: true, - index: 'apmCustomLinkIndex', + index: '.apm-custom-link', body: { '@timestamp': 1570737000000, label: 'foo', @@ -69,7 +63,7 @@ describe('Create or Update Custom link', () => { 'create_or_update_custom_link', { refresh: true, - index: 'apmCustomLinkIndex', + index: '.apm-custom-link', id: 'bar', body: { '@timestamp': 1570737000000, diff --git a/x-pack/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.ts b/x-pack/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.ts index 0eaada68ba9b0..1bda27f7eb78b 100644 --- a/x-pack/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.ts +++ b/x-pack/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.ts @@ -14,6 +14,7 @@ import { APMIndexDocumentParams, APMInternalESClient, } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import { APM_CUSTOM_LINK_INDEX } from '../apm_indices/get_apm_indices'; export function createOrUpdateCustomLink({ customLinkId, @@ -26,7 +27,7 @@ export function createOrUpdateCustomLink({ }) { const params: APMIndexDocumentParams = { refresh: true, - index: internalESClient.apmIndices.apmCustomLinkIndex, + index: APM_CUSTOM_LINK_INDEX, body: { '@timestamp': Date.now(), ...toESFormat(customLink), diff --git a/x-pack/plugins/apm/server/routes/settings/custom_link/delete_custom_link.ts b/x-pack/plugins/apm/server/routes/settings/custom_link/delete_custom_link.ts index 53f6b830aa44a..16318fe696712 100644 --- a/x-pack/plugins/apm/server/routes/settings/custom_link/delete_custom_link.ts +++ b/x-pack/plugins/apm/server/routes/settings/custom_link/delete_custom_link.ts @@ -6,6 +6,7 @@ */ import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import { APM_CUSTOM_LINK_INDEX } from '../apm_indices/get_apm_indices'; export function deleteCustomLink({ customLinkId, @@ -16,7 +17,7 @@ export function deleteCustomLink({ }) { const params = { refresh: 'wait_for' as const, - index: internalESClient.apmIndices.apmCustomLinkIndex, + index: APM_CUSTOM_LINK_INDEX, id: customLinkId, }; diff --git a/x-pack/plugins/apm/server/routes/settings/custom_link/list_custom_links.ts b/x-pack/plugins/apm/server/routes/settings/custom_link/list_custom_links.ts index c435767ffd424..27b7c08ca9a4b 100644 --- a/x-pack/plugins/apm/server/routes/settings/custom_link/list_custom_links.ts +++ b/x-pack/plugins/apm/server/routes/settings/custom_link/list_custom_links.ts @@ -14,6 +14,7 @@ import { import { fromESFormat } from './helper'; import { filterOptionsRt } from './custom_link_types'; import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import { APM_CUSTOM_LINK_INDEX } from '../apm_indices/get_apm_indices'; export async function listCustomLinks({ internalESClient, @@ -35,7 +36,7 @@ export async function listCustomLinks({ }); const params = { - index: internalESClient.apmIndices.apmCustomLinkIndex, + index: APM_CUSTOM_LINK_INDEX, size: 500, body: { query: { diff --git a/x-pack/plugins/apm/server/routes/source_maps/bulk_create_apm_source_maps.ts b/x-pack/plugins/apm/server/routes/source_maps/bulk_create_apm_source_maps.ts new file mode 100644 index 0000000000000..f681642c0bc4b --- /dev/null +++ b/x-pack/plugins/apm/server/routes/source_maps/bulk_create_apm_source_maps.ts @@ -0,0 +1,57 @@ +/* + * 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 { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { Artifact } from '@kbn/fleet-plugin/server'; +import { getUnzippedArtifactBody } from '../fleet/source_maps'; +import { APM_SOURCE_MAP_INDEX } from '../settings/apm_indices/get_apm_indices'; +import { ApmSourceMap } from './create_apm_source_map_index_template'; +import { getEncodedContent, getSourceMapId } from './sourcemap_utils'; + +export async function bulkCreateApmSourceMaps({ + artifacts, + internalESClient, +}: { + artifacts: Artifact[]; + internalESClient: ElasticsearchClient; +}) { + const docs = await Promise.all( + artifacts.map(async (artifact): Promise => { + const { serviceName, serviceVersion, bundleFilepath, sourceMap } = + await getUnzippedArtifactBody(artifact.body); + + const { contentEncoded, contentHash } = await getEncodedContent( + sourceMap + ); + + return { + fleet_id: artifact.id, + created: artifact.created, + content: contentEncoded, + content_sha256: contentHash, + file: { + path: bundleFilepath, + }, + service: { + name: serviceName, + version: serviceVersion, + }, + }; + }) + ); + + return internalESClient.bulk({ + body: docs.flatMap((doc) => { + const id = getSourceMapId({ + serviceName: doc.service.name, + serviceVersion: doc.service.version, + bundleFilepath: doc.file.path, + }); + return [{ create: { _index: APM_SOURCE_MAP_INDEX, _id: id } }, doc]; + }), + }); +} diff --git a/x-pack/plugins/apm/server/routes/source_maps/create_apm_source_map.ts b/x-pack/plugins/apm/server/routes/source_maps/create_apm_source_map.ts new file mode 100644 index 0000000000000..f4a49d475ceef --- /dev/null +++ b/x-pack/plugins/apm/server/routes/source_maps/create_apm_source_map.ts @@ -0,0 +1,61 @@ +/* + * 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 { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { isElasticsearchVersionConflictError } from '@kbn/fleet-plugin/server/errors/utils'; +import { Logger } from '@kbn/core/server'; +import { APM_SOURCE_MAP_INDEX } from '../settings/apm_indices/get_apm_indices'; +import { ApmSourceMap } from './create_apm_source_map_index_template'; +import { SourceMap } from './route'; +import { getEncodedContent, getSourceMapId } from './sourcemap_utils'; + +export async function createApmSourceMap({ + internalESClient, + logger, + fleetId, + created, + sourceMapContent, + bundleFilepath, + serviceName, + serviceVersion, +}: { + internalESClient: ElasticsearchClient; + logger: Logger; + fleetId: string; + created: string; + sourceMapContent: SourceMap; + bundleFilepath: string; + serviceName: string; + serviceVersion: string; +}) { + const { contentEncoded, contentHash } = await getEncodedContent( + sourceMapContent + ); + const doc: ApmSourceMap = { + fleet_id: fleetId, + created, + content: contentEncoded, + content_sha256: contentHash, + file: { path: bundleFilepath }, + service: { name: serviceName, version: serviceVersion }, + }; + + try { + const id = getSourceMapId({ serviceName, serviceVersion, bundleFilepath }); + logger.debug(`Create APM source map: "${id}"`); + return await internalESClient.create({ + index: APM_SOURCE_MAP_INDEX, + id, + body: doc, + }); + } catch (e) { + // we ignore 409 errors from the create (document already exists) + if (!isElasticsearchVersionConflictError(e)) { + throw e; + } + } +} diff --git a/x-pack/plugins/apm/server/routes/source_maps/create_apm_source_map_index_template.ts b/x-pack/plugins/apm/server/routes/source_maps/create_apm_source_map_index_template.ts new file mode 100644 index 0000000000000..25a7cf5ae5815 --- /dev/null +++ b/x-pack/plugins/apm/server/routes/source_maps/create_apm_source_map_index_template.ts @@ -0,0 +1,88 @@ +/* + * 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 { IndicesPutIndexTemplateRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { ElasticsearchClient, Logger } from '@kbn/core/server'; +import { createOrUpdateIndexTemplate } from '@kbn/observability-plugin/server'; +import { APM_SOURCE_MAP_INDEX } from '../settings/apm_indices/get_apm_indices'; + +const indexTemplate: IndicesPutIndexTemplateRequest = { + name: 'apm-source-map', + body: { + version: 1, + index_patterns: [APM_SOURCE_MAP_INDEX], + template: { + settings: { + number_of_shards: 1, + index: { + hidden: true, + }, + }, + mappings: { + dynamic: 'strict', + properties: { + fleet_id: { + type: 'keyword', + }, + created: { + type: 'date', + }, + content: { + type: 'binary', + }, + content_sha256: { + type: 'keyword', + }, + 'file.path': { + type: 'keyword', + }, + 'service.name': { + type: 'keyword', + }, + 'service.version': { + type: 'keyword', + }, + }, + }, + }, + }, +}; + +export async function createApmSourceMapIndexTemplate({ + client, + logger, +}: { + client: ElasticsearchClient; + logger: Logger; +}) { + // create index template + await createOrUpdateIndexTemplate({ indexTemplate, client, logger }); + + // create index if it doesn't exist + const indexExists = await client.indices.exists({ + index: APM_SOURCE_MAP_INDEX, + }); + + if (!indexExists) { + logger.debug(`Create index: "${APM_SOURCE_MAP_INDEX}"`); + await client.indices.create({ index: APM_SOURCE_MAP_INDEX }); + } +} + +export interface ApmSourceMap { + fleet_id: string; + created: string; + content: string; + content_sha256: string; + file: { + path: string; + }; + service: { + name: string; + version: string; + }; +} diff --git a/x-pack/plugins/apm/server/routes/source_maps/delete_apm_sourcemap.ts b/x-pack/plugins/apm/server/routes/source_maps/delete_apm_sourcemap.ts new file mode 100644 index 0000000000000..ffdaf02c165d8 --- /dev/null +++ b/x-pack/plugins/apm/server/routes/source_maps/delete_apm_sourcemap.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 { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { APM_SOURCE_MAP_INDEX } from '../settings/apm_indices/get_apm_indices'; + +export async function deleteApmSourceMap({ + internalESClient, + fleetId, +}: { + internalESClient: ElasticsearchClient; + fleetId: string; +}) { + return internalESClient.deleteByQuery({ + index: APM_SOURCE_MAP_INDEX, + query: { + bool: { + filter: [{ term: { fleet_id: fleetId } }], + }, + }, + }); +} diff --git a/x-pack/plugins/apm/server/routes/source_maps/route.ts b/x-pack/plugins/apm/server/routes/source_maps/route.ts index b4d005373c4be..a15e6b07f9f17 100644 --- a/x-pack/plugins/apm/server/routes/source_maps/route.ts +++ b/x-pack/plugins/apm/server/routes/source_maps/route.ts @@ -10,8 +10,8 @@ import { SavedObjectsClientContract } from '@kbn/core/server'; import { jsonRt, toNumberRt } from '@kbn/io-ts-utils'; import { Artifact } from '@kbn/fleet-plugin/server'; import { - createApmArtifact, - deleteApmArtifact, + createFleetSourceMapArtifact, + deleteFleetSourcemapArtifact, listSourceMapArtifacts, updateSourceMapsOnFleetPolicies, getCleanedBundleFilePath, @@ -20,6 +20,9 @@ import { import { getInternalSavedObjectsClient } from '../../lib/helpers/get_internal_saved_objects_client'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { stringFromBufferRt } from '../../utils/string_from_buffer_rt'; +import { createApmSourceMap } from './create_apm_source_map'; +import { deleteApmSourceMap } from './delete_apm_sourcemap'; +import { runFleetSourcemapArtifactsMigration } from './schedule_source_map_migration'; export const sourceMapRt = t.intersection([ t.type({ @@ -89,35 +92,55 @@ const uploadSourceMapRoute = createApmServerRoute({ .pipe(sourceMapRt), }), }), - handler: async ({ params, plugins, core }): Promise => { + handler: async ({ + params, + plugins, + core, + logger, + }): Promise => { const { service_name: serviceName, service_version: serviceVersion, bundle_filepath: bundleFilepath, - sourcemap: sourceMap, + sourcemap: sourceMapContent, } = params.body; const cleanedBundleFilepath = getCleanedBundleFilePath(bundleFilepath); const fleetPluginStart = await plugins.fleet?.start(); const coreStart = await core.start(); - const esClient = coreStart.elasticsearch.client.asInternalUser; + const internalESClient = coreStart.elasticsearch.client.asInternalUser; const savedObjectsClient = await getInternalSavedObjectsClient(core.setup); try { if (fleetPluginStart) { - const artifact = await createApmArtifact({ + // create source map as fleet artifact + const artifact = await createFleetSourceMapArtifact({ fleetPluginStart, apmArtifactBody: { serviceName, serviceVersion, bundleFilepath: cleanedBundleFilepath, - sourceMap, + sourceMap: sourceMapContent, }, }); + + // sync source map to APM managed index + await createApmSourceMap({ + internalESClient, + logger, + fleetId: artifact.id, + created: artifact.created, + sourceMapContent, + bundleFilepath: cleanedBundleFilepath, + serviceName, + serviceVersion, + }); + + // sync source map to fleet policy await updateSourceMapsOnFleetPolicies({ core, fleetPluginStart, savedObjectsClient: savedObjectsClient as unknown as SavedObjectsClientContract, - elasticsearchClient: esClient, + internalESClient, }); return artifact; @@ -143,17 +166,18 @@ const deleteSourceMapRoute = createApmServerRoute({ const fleetPluginStart = await plugins.fleet?.start(); const { id } = params.path; const coreStart = await core.start(); - const esClient = coreStart.elasticsearch.client.asInternalUser; + const internalESClient = coreStart.elasticsearch.client.asInternalUser; const savedObjectsClient = await getInternalSavedObjectsClient(core.setup); try { if (fleetPluginStart) { - await deleteApmArtifact({ id, fleetPluginStart }); + await deleteFleetSourcemapArtifact({ id, fleetPluginStart }); + await deleteApmSourceMap({ internalESClient, fleetId: id }); await updateSourceMapsOnFleetPolicies({ core, fleetPluginStart, savedObjectsClient: savedObjectsClient as unknown as SavedObjectsClientContract, - elasticsearchClient: esClient, + internalESClient, }); } } catch (e) { @@ -165,8 +189,27 @@ const deleteSourceMapRoute = createApmServerRoute({ }, }); +const migrateFleetArtifactsSourceMapRoute = createApmServerRoute({ + endpoint: 'POST /internal/apm/sourcemaps/migrate_fleet_artifacts', + options: { tags: ['access:apm', 'access:apm_write'] }, + handler: async ({ plugins, core, logger }): Promise => { + const fleet = await plugins.fleet?.start(); + const coreStart = await core.start(); + const internalESClient = coreStart.elasticsearch.client.asInternalUser; + + if (fleet) { + return runFleetSourcemapArtifactsMigration({ + fleet, + internalESClient, + logger, + }); + } + }, +}); + export const sourceMapsRouteRepository = { ...listSourceMapRoute, ...uploadSourceMapRoute, ...deleteSourceMapRoute, + ...migrateFleetArtifactsSourceMapRoute, }; diff --git a/x-pack/plugins/apm/server/routes/source_maps/schedule_source_map_migration.ts b/x-pack/plugins/apm/server/routes/source_maps/schedule_source_map_migration.ts new file mode 100644 index 0000000000000..d0a172581fc46 --- /dev/null +++ b/x-pack/plugins/apm/server/routes/source_maps/schedule_source_map_migration.ts @@ -0,0 +1,225 @@ +/* + * 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 { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { FleetStartContract } from '@kbn/fleet-plugin/server'; +import { FleetArtifactsClient } from '@kbn/fleet-plugin/server/services'; +import { TaskManagerSetupContract } from '@kbn/task-manager-plugin/server'; +import { CoreStart, Logger } from '@kbn/core/server'; +import { getApmArtifactClient } from '../fleet/source_maps'; +import { bulkCreateApmSourceMaps } from './bulk_create_apm_source_maps'; +import { APM_SOURCE_MAP_INDEX } from '../settings/apm_indices/get_apm_indices'; +import { ApmSourceMap } from './create_apm_source_map_index_template'; +import { APMPluginStartDependencies } from '../../types'; +import { createApmSourceMapIndexTemplate } from './create_apm_source_map_index_template'; + +const PER_PAGE = 10; +const TASK_ID = 'apm-source-map-migration-task-id'; +const TASK_TYPE = 'apm-source-map-migration-task'; + +export async function scheduleSourceMapMigration({ + coreStartPromise, + pluginStartPromise, + fleetStartPromise, + taskManager, + logger, +}: { + coreStartPromise: Promise; + pluginStartPromise: Promise; + fleetStartPromise?: Promise; + taskManager?: TaskManagerSetupContract; + logger: Logger; +}) { + if (!taskManager) { + return; + } + + logger.debug(`Register task "${TASK_TYPE}"`); + + taskManager.registerTaskDefinitions({ + [TASK_TYPE]: { + title: 'Migrate fleet source map artifacts', + description: + 'Migrates fleet source map artifacts to `.apm-source-map` index', + timeout: '1h', + maxAttempts: 5, + maxConcurrency: 1, + createTaskRunner() { + const taskState: TaskState = { isAborted: false }; + + return { + async run() { + logger.debug(`Run task: "${TASK_TYPE}"`); + const coreStart = await coreStartPromise; + const internalESClient = + coreStart.elasticsearch.client.asInternalUser; + + // ensure that the index template has been created before running migration + await createApmSourceMapIndexTemplate({ + client: internalESClient, + logger, + }); + + const fleet = await fleetStartPromise; + if (fleet) { + await runFleetSourcemapArtifactsMigration({ + taskState, + fleet, + internalESClient, + logger, + }); + } + }, + + async cancel() { + taskState.isAborted = true; + logger.debug(`Task cancelled: "${TASK_TYPE}"`); + }, + }; + }, + }, + }); + + const pluginStart = await pluginStartPromise; + const taskManagerStart = pluginStart.taskManager; + + if (taskManagerStart) { + logger.debug(`Task scheduled: "${TASK_TYPE}"`); + await pluginStart.taskManager?.ensureScheduled({ + id: TASK_ID, + taskType: TASK_TYPE, + scope: ['apm'], + params: {}, + state: {}, + }); + } +} + +interface TaskState { + isAborted: boolean; +} + +export async function runFleetSourcemapArtifactsMigration({ + taskState, + fleet, + internalESClient, + logger, +}: { + taskState?: TaskState; + fleet: FleetStartContract; + internalESClient: ElasticsearchClient; + logger: Logger; +}) { + try { + const latestApmSourceMapTimestamp = await getLatestApmSourceMap( + internalESClient + ); + const createdDateFilter = latestApmSourceMapTimestamp + ? ` AND created:>${asLuceneEncoding(latestApmSourceMapTimestamp)}` + : ''; + + await paginateArtifacts({ + taskState, + page: 1, + apmArtifactClient: getApmArtifactClient(fleet), + kuery: `type: sourcemap${createdDateFilter}`, + logger, + internalESClient, + }); + } catch (e) { + logger.error('Failed to migrate APM fleet source map artifacts'); + logger.error(e); + } +} + +// will convert "2022-12-12T21:21:51.203Z" to "2022-12-12T21\:21\:51.203Z" because colons are not allowed when using Lucene syntax +function asLuceneEncoding(timestamp: string) { + return timestamp.replaceAll(':', '\\:'); +} + +async function getArtifactsForPage({ + page, + apmArtifactClient, + kuery, +}: { + page: number; + apmArtifactClient: FleetArtifactsClient; + kuery: string; +}) { + return await apmArtifactClient.listArtifacts({ + kuery, + perPage: PER_PAGE, + page, + sortOrder: 'asc', + sortField: 'created', + }); +} + +async function paginateArtifacts({ + taskState, + page, + apmArtifactClient, + kuery, + logger, + internalESClient, +}: { + taskState?: TaskState; + page: number; + apmArtifactClient: FleetArtifactsClient; + kuery: string; + logger: Logger; + internalESClient: ElasticsearchClient; +}) { + if (taskState?.isAborted) { + return; + } + + const { total, items: artifacts } = await getArtifactsForPage({ + page, + apmArtifactClient, + kuery, + }); + + if (artifacts.length === 0) { + logger.debug('No source maps need to be migrated'); + return; + } + + const migratedCount = (page - 1) * PER_PAGE + artifacts.length; + logger.info(`Migrating ${migratedCount} of ${total} source maps`); + + await bulkCreateApmSourceMaps({ artifacts, internalESClient }); + + const hasMorePages = total > migratedCount; + if (hasMorePages) { + await paginateArtifacts({ + taskState, + page: page + 1, + apmArtifactClient, + kuery, + logger, + internalESClient, + }); + } else { + logger.info(`Successfully migrated ${total} source maps`); + } +} + +async function getLatestApmSourceMap(internalESClient: ElasticsearchClient) { + const params = { + index: APM_SOURCE_MAP_INDEX, + track_total_hits: false, + size: 1, + _source: ['created'], + sort: [{ created: { order: 'desc' } }], + body: { + query: { match_all: {} }, + }, + }; + const res = await internalESClient.search(params); + return res.hits.hits[0]?._source?.created; +} diff --git a/x-pack/plugins/apm/server/routes/source_maps/sourcemap_utils.ts b/x-pack/plugins/apm/server/routes/source_maps/sourcemap_utils.ts new file mode 100644 index 0000000000000..20ff2fa4bd41c --- /dev/null +++ b/x-pack/plugins/apm/server/routes/source_maps/sourcemap_utils.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 { deflate } from 'zlib'; +import { BinaryLike, createHash } from 'crypto'; +import { promisify } from 'util'; +import { SourceMap } from './route'; + +const deflateAsync = promisify(deflate); + +function asSha256Encoded(content: BinaryLike): string { + return createHash('sha256').update(content).digest('hex'); +} + +export async function getEncodedContent(sourceMapContent: SourceMap) { + const contentBuffer = Buffer.from(JSON.stringify(sourceMapContent)); + const contentZipped = await deflateAsync(contentBuffer); + const contentEncoded = contentZipped.toString('base64'); + const contentHash = asSha256Encoded(contentZipped); + return { contentEncoded, contentHash }; +} + +export function getSourceMapId({ + serviceName, + serviceVersion, + bundleFilepath, +}: { + serviceName: string; + serviceVersion: string; + bundleFilepath: string; +}) { + return [serviceName, serviceVersion, bundleFilepath].join('-'); +} diff --git a/x-pack/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.test.ts b/x-pack/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.test.ts index d4604df07e3f6..edb28d9bfa490 100644 --- a/x-pack/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.test.ts +++ b/x-pack/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.test.ts @@ -44,7 +44,6 @@ describe('isCrossClusterSearch', () => { metric: '', error: '', onboarding: 'apm-*,remote_cluster:apm-*', - sourcemap: 'apm-*,remote_cluster:apm-*', } as ApmIndicesConfig, } as unknown as APMEventClient; diff --git a/x-pack/plugins/apm/server/saved_objects/apm_indices.ts b/x-pack/plugins/apm/server/saved_objects/apm_indices.ts index 19c90f41461c2..b31a97bcb9760 100644 --- a/x-pack/plugins/apm/server/saved_objects/apm_indices.ts +++ b/x-pack/plugins/apm/server/saved_objects/apm_indices.ts @@ -11,7 +11,6 @@ import { updateApmOssIndexPaths } from './migrations/update_apm_oss_index_paths' export interface APMIndices { apmIndices?: { - sourcemap?: string; error?: string; onboarding?: string; span?: string; diff --git a/x-pack/plugins/apm/server/saved_objects/migrations/update_apm_oss_index_paths.ts b/x-pack/plugins/apm/server/saved_objects/migrations/update_apm_oss_index_paths.ts index 72ba40db0ce05..1d129eda16e6d 100644 --- a/x-pack/plugins/apm/server/saved_objects/migrations/update_apm_oss_index_paths.ts +++ b/x-pack/plugins/apm/server/saved_objects/migrations/update_apm_oss_index_paths.ts @@ -6,7 +6,6 @@ */ const apmIndexConfigs = [ - ['sourcemap', 'apm_oss.sourcemapIndices'], ['error', 'apm_oss.errorIndices'], ['onboarding', 'apm_oss.onboardingIndices'], ['span', 'apm_oss.spanIndices'], diff --git a/x-pack/plugins/apm/server/utils/test_helpers.tsx b/x-pack/plugins/apm/server/utils/test_helpers.tsx index 22b0de8af8e26..37db53111903c 100644 --- a/x-pack/plugins/apm/server/utils/test_helpers.tsx +++ b/x-pack/plugins/apm/server/utils/test_helpers.tsx @@ -52,7 +52,6 @@ export async function inspectSearchParams( const indices: { [Property in keyof APMConfig['indices']]: string; } = { - sourcemap: 'myIndex', error: 'myIndex', onboarding: 'myIndex', span: 'myIndex', @@ -86,14 +85,10 @@ export async function inspectSearchParams( } ) as APMConfig; const mockInternalESClient = { search: spy } as any; - const mockIndices = { - ...indices, - apmAgentConfigurationIndex: 'myIndex', - apmCustomLinkIndex: 'myIndex', - }; + try { response = await fn({ - mockIndices, + mockIndices: indices, mockApmEventClient, mockConfig, mockInternalESClient, diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/README.md b/x-pack/plugins/cloud_integrations/cloud_data_migration/README.md new file mode 100755 index 0000000000000..fac92c1f44869 --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/README.md @@ -0,0 +1,3 @@ +# Cloud Data Migration + +Static migration page where self-managed users can see text/copy about migrating to Elastic Cloud diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/common/index.ts b/x-pack/plugins/cloud_integrations/cloud_data_migration/common/index.ts new file mode 100755 index 0000000000000..281bd3d8e0d43 --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/common/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const PLUGIN_ID = 'migrate_data'; +export const PLUGIN_NAME = i18n.translate('xpack.cloudDataMigration.name', { + defaultMessage: 'Migrate', +}); diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/i18nrc.json b/x-pack/plugins/cloud_integrations/cloud_data_migration/i18nrc.json new file mode 100644 index 0000000000000..f67e0cad96d8a --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/i18nrc.json @@ -0,0 +1,7 @@ +{ + "prefix": "cloudDataMigration", + "paths": { + "cloudDataMigration": "." + }, + "translations": [] +} \ No newline at end of file diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/jest.config.js b/x-pack/plugins/cloud_integrations/cloud_data_migration/jest.config.js new file mode 100644 index 0000000000000..bd69c12576b57 --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/jest.config.js @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../', + roots: ['/x-pack/plugins/cloud_integrations/cloud_data_migration'], + coverageDirectory: + '/target/kibana-coverage/jest/x-pack/plugins/cloud_integrations/cloud_data_migration', + coverageReporters: ['text', 'html'], + collectCoverageFrom: [ + '/x-pack/plugins/cloud_integrations/cloud_data_migration/{common,public}/**/*.{ts,tsx}', + ], +}; diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/kibana.json b/x-pack/plugins/cloud_integrations/cloud_data_migration/kibana.json new file mode 100755 index 0000000000000..6709e20f2d127 --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/kibana.json @@ -0,0 +1,15 @@ +{ + "id": "cloudDataMigration", + "version": "1.0.0", + "kibanaVersion": "kibana", + "owner": { + "name": "Platform Onboarding", + "githubTeam": "platform-onboarding" + }, + "description": "Static migration page where self-managed users can see text/copy about migrating to Elastic Cloud", + "server": true, + "ui": true, + "configPath": ["xpack", "cloud_integrations", "data_migration"], + "requiredPlugins": ["cloud", "management", "kibanaReact", "features"], + "requiredBundles": [ "kibanaReact" ] +} diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/public/app.styles.ts b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/app.styles.ts new file mode 100644 index 0000000000000..5c626d09a5a57 --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/app.styles.ts @@ -0,0 +1,30 @@ +/* + * 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 { css } from '@emotion/react'; +import { EuiThemeComputed } from '@elastic/eui'; + +export const getAppStyles = (euiTheme: EuiThemeComputed) => { + return { + listItemCss: css` + font-weight: ${euiTheme.font.weight.light}; + `, + panelCss: css` + padding: calc(${euiTheme.size.xxxl}); + margin: ${euiTheme.size.l} auto; + width: 100%; + max-width: 875px; + `, + illustrationCss: css` + max-width: 75%; + `, + layoutCss: css` + max-width: 500px; + margin: 0 auto; + `, + }; +}; diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/components/app.tsx b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/components/app.tsx new file mode 100755 index 0000000000000..013adce3e04c6 --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/components/app.tsx @@ -0,0 +1,146 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +import React, { useEffect } from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; + +import { + EuiButton, + EuiFlexGroup, + EuiFlexItem, + EuiImage, + EuiListGroup, + EuiListGroupItem, + EuiPanel, + EuiSpacer, + EuiText, + EuiTitle, + useEuiTheme, +} from '@elastic/eui'; + +import { CoreStart, CoreTheme } from '@kbn/core/public'; + +import { Observable } from 'rxjs'; +import { getAppStyles } from '../../app.styles'; +import { BreadcrumbService } from '../services/breadcrumbs'; + +interface CloudDataMigrationAppDeps { + http: CoreStart['http']; + breadcrumbService: BreadcrumbService; + theme$: Observable; +} + +export const CloudDataMigrationApp = ({ http, breadcrumbService }: CloudDataMigrationAppDeps) => { + const basePath = http.basePath.get() ?? ''; + const { euiTheme } = useEuiTheme(); + const listItemProps = { + iconType: 'checkInCircleFilled', + iconProps: { color: 'success' }, + wrapText: true, + }; + const styles = getAppStyles(euiTheme); + + useEffect(() => { + breadcrumbService.setBreadcrumbs('home'); + }, [breadcrumbService]); + + return ( + + + + + + + +

+ +

+
+ + + + + + + + } + /> + + + + + } + /> + + + + + } + /> + + + + + } + /> + + + + +
+ + + +
+
+
+
+ ); +}; diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/index.tsx b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/index.tsx new file mode 100755 index 0000000000000..78a8ac0366bf8 --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/index.tsx @@ -0,0 +1,35 @@ +/* + * 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 React from 'react'; +import ReactDOM from 'react-dom'; +import { CoreStart } from '@kbn/core/public'; +import { ManagementAppMountParams } from '@kbn/management-plugin/public'; +import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { BreadcrumbService } from './services/breadcrumbs'; +import { CloudDataMigrationApp } from './components/app'; + +export const renderApp = ( + { http }: CoreStart, + breadcrumbService: BreadcrumbService, + { element, theme$ }: ManagementAppMountParams +) => { + ReactDOM.render( + + + + + , + element + ); + + return () => ReactDOM.unmountComponentAtNode(element); +}; diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/services/breadcrumb.mock.ts b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/services/breadcrumb.mock.ts new file mode 100644 index 0000000000000..08845ce7214ee --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/services/breadcrumb.mock.ts @@ -0,0 +1,14 @@ +/* + * 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 { BreadcrumbService } from './breadcrumbs'; + +export const createBreadcrumbsMock = () => { + const breadcrumbService = new BreadcrumbService(); + breadcrumbService.setup(jest.fn()); + return breadcrumbService; +}; diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/services/breadcrumbs.ts b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/services/breadcrumbs.ts new file mode 100644 index 0000000000000..68bcdbc85d008 --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/services/breadcrumbs.ts @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +import { ManagementAppMountParams } from '@kbn/management-plugin/public'; + +type SetBreadcrumbs = ManagementAppMountParams['setBreadcrumbs']; + +interface Breadcrumb { + text: string; + href?: string; +} + +interface Breadcrumbs { + home: Breadcrumb; +} + +const breadcrumbs: Breadcrumbs = { + home: { + text: i18n.translate('xpack.cloudDataMigration.breadcrumb.label', { + defaultMessage: 'Migrate to Elastic Cloud', + }), + }, +}; + +export class BreadcrumbService { + private setBreadcrumbsHandler?: SetBreadcrumbs; + + public setup(setBreadcrumbsHandler: SetBreadcrumbs): void { + this.setBreadcrumbsHandler = setBreadcrumbsHandler; + } + + public setBreadcrumbs(type: keyof typeof breadcrumbs): void { + if (!this.setBreadcrumbsHandler) { + throw new Error(`BreadcrumbService#setup() must be called first!`); + } + + this.setBreadcrumbsHandler([breadcrumbs.home]); + } +} diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/public/index.ts b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/index.ts new file mode 100755 index 0000000000000..bed04da3dd49c --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/index.ts @@ -0,0 +1,16 @@ +/* + * 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 { CloudDataMigrationPlugin } from './plugin'; + +// This exports static code and TypeScript types, +// as well as, Kibana Platform `plugin()` initializer. +export function plugin() { + return new CloudDataMigrationPlugin(); +} + +export type { CloudDataMigrationPluginSetup, CloudDataMigrationPluginStart } from './types'; diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/public/plugin.test.ts b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/plugin.test.ts new file mode 100644 index 0000000000000..19a3bbadd792a --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/plugin.test.ts @@ -0,0 +1,53 @@ +/* + * 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 { coreMock } from '@kbn/core/public/mocks'; +import { CloudDataMigrationPlugin } from './plugin'; +import { cloudMock } from '@kbn/cloud-plugin/public/mocks'; +import { managementPluginMock } from '@kbn/management-plugin/public/mocks'; +import { createBreadcrumbsMock } from './application/services/breadcrumb.mock'; + +describe('Cloud Data Migration Plugin', () => { + describe('#setup', () => { + it('returns expected public contract', () => { + const coreSetup = coreMock.createSetup(); + const plugin = new CloudDataMigrationPlugin(); + const cloud = cloudMock.createSetup(); + const management = managementPluginMock.createSetupContract(); + const breadcrumbService = createBreadcrumbsMock(); + expect( + plugin.setup(coreSetup, { + cloud, + management, + breadcrumbService, + }) + ).toMatchInlineSnapshot(`undefined`); + expect(management.sections.section.data.registerApp).not.toBeCalled(); + }); + + it('returns expected public contract when cloud NOT enabled', () => { + const coreSetup = coreMock.createSetup(); + const plugin = new CloudDataMigrationPlugin(); + const management = managementPluginMock.createSetupContract(); + const breadcrumbService = createBreadcrumbsMock(); + expect( + plugin.setup(coreSetup, { + cloud: { ...cloudMock.createSetup(), isCloudEnabled: false }, + management, + breadcrumbService, + }) + ).toMatchInlineSnapshot(`undefined`); + expect(management.sections.section.data.registerApp).toHaveBeenCalledTimes(1); + expect(management.sections.section.data.registerApp).toHaveBeenCalledWith({ + id: 'migrate_data', + mount: expect.any(Function), + order: 8, + title: 'Migrate', + }); + }); + }); +}); diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/public/plugin.ts b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/plugin.ts new file mode 100755 index 0000000000000..2d58e60b59465 --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/plugin.ts @@ -0,0 +1,49 @@ +/* + * 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 { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { ManagementAppMountParams } from '@kbn/management-plugin/public'; +import { CloudDataMigrationPluginSetup, CloudDataMigrationPluginStart } from './types'; +import { PLUGIN_ID, PLUGIN_NAME } from '../common'; +import { BreadcrumbService } from './application/services/breadcrumbs'; + +export class CloudDataMigrationPlugin implements Plugin { + private breadcrumbService = new BreadcrumbService(); + + public setup(core: CoreSetup, { cloud, management }: CloudDataMigrationPluginSetup) { + // Only be applies to self-managed instances of Kibana. Any Kibana instance running on + // Elastic Cloud should not show any information related to migration. + if (!cloud.isCloudEnabled) { + management.sections.section.data.registerApp({ + id: PLUGIN_ID, + title: PLUGIN_NAME, + order: 8, + mount: async (params: ManagementAppMountParams) => { + const [coreStart] = await core.getStartServices(); + const { setBreadcrumbs } = params; + + // Initialize services + this.breadcrumbService.setup(setBreadcrumbs); + + const { renderApp } = await import('./application'); + // Render the application + const unmountAppCallback = renderApp(coreStart, this.breadcrumbService, params); + + return () => { + unmountAppCallback(); + }; + }, + }); + } + } + + public start(core: CoreStart): CloudDataMigrationPluginStart { + return {}; + } + + public stop() {} +} diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/public/types.ts b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/types.ts new file mode 100755 index 0000000000000..38f9ee9db1121 --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/public/types.ts @@ -0,0 +1,20 @@ +/* + * 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 { ManagementSetup } from '@kbn/management-plugin/public'; + +import { CloudSetup } from '@kbn/cloud-plugin/public'; +import { BreadcrumbService } from './application/services/breadcrumbs'; + +export interface CloudDataMigrationPluginSetup { + cloud: CloudSetup; + management: ManagementSetup; + breadcrumbService: BreadcrumbService; +} + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface CloudDataMigrationPluginStart {} diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/server/index.ts b/x-pack/plugins/cloud_integrations/cloud_data_migration/server/index.ts new file mode 100644 index 0000000000000..04fd5a6e67686 --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/server/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { CloudDataMigrationPlugin } from './plugin'; + +export const plugin = () => new CloudDataMigrationPlugin(); diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/server/plugin.ts b/x-pack/plugins/cloud_integrations/cloud_data_migration/server/plugin.ts new file mode 100644 index 0000000000000..0207b157ec14e --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/server/plugin.ts @@ -0,0 +1,33 @@ +/* + * 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 { CoreSetup, Plugin } from '@kbn/core/server'; +import { PLUGIN_ID } from '../common'; + +import { Dependencies } from './types'; + +export class CloudDataMigrationPlugin implements Plugin { + public setup(coreSetup: CoreSetup, { features }: Dependencies) { + features.registerElasticsearchFeature({ + id: PLUGIN_ID, + management: { + data: [PLUGIN_ID], + }, + catalogue: [PLUGIN_ID], + privileges: [ + { + requiredClusterPrivileges: ['manage'], + ui: [], + }, + ], + }); + } + + public start() {} + + public stop() {} +} diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/server/types.ts b/x-pack/plugins/cloud_integrations/cloud_data_migration/server/types.ts new file mode 100644 index 0000000000000..7ae5c3b36b2c2 --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/server/types.ts @@ -0,0 +1,12 @@ +/* + * 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 { PluginSetupContract as FeaturesPluginSetup } from '@kbn/features-plugin/server'; + +export interface Dependencies { + features: FeaturesPluginSetup; +} diff --git a/x-pack/plugins/cloud_integrations/cloud_data_migration/tsconfig.json b/x-pack/plugins/cloud_integrations/cloud_data_migration/tsconfig.json new file mode 100644 index 0000000000000..f20e862c01c20 --- /dev/null +++ b/x-pack/plugins/cloud_integrations/cloud_data_migration/tsconfig.json @@ -0,0 +1,23 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + "../../../../typings/**/*" + ], + "kbn_references": [ + { "path": "../../../../src/core/tsconfig.json" }, + // required plugins + { "path": "../../cloud/tsconfig.json" }, + { "path": "../../../../src/plugins/management/tsconfig.json" }, + { "path": "../../features/tsconfig.json" }, + // required bundles + { "path": "../../../../src/plugins/kibana_react/tsconfig.json" }, + ] +} diff --git a/x-pack/plugins/cloud_security_posture/README.md b/x-pack/plugins/cloud_security_posture/README.md index 86f8a44a2e944..7a4646d08ba07 100755 --- a/x-pack/plugins/cloud_security_posture/README.md +++ b/x-pack/plugins/cloud_security_posture/README.md @@ -4,81 +4,48 @@ Cloud Posture automates the identification and remediation of risks across cloud --- -## Table of contents - -- [Development](#development) - - [Local checks before creating a PR](#local-checks-before-creating-a-pr) - - [Install pre-commit hooks (optional)](#install-pre-commit-hooks-optional) - - [Running unit tests](#running-unit-tests) - - [Running integration tests](#running-integration-tests) - ---- - ## Development -See the [kibana contributing guide](https://github.com/elastic/kibana/blob/main/CONTRIBUTING.md) for instructions -setting up your development environment. +read [Kibana Contributing Guide](https://github.com/elastic/kibana/blob/main/CONTRIBUTING.md) for more details -### Local checks before creating a PR +## Testing -Kibana has a pretty long CI process. -Therefore, we suggest running the following commands locally before creating a PR: +read [Kibana Testing Guide](https://www.elastic.co/guide/en/kibana/current/development-tests.html) for more details -1. Typescript check: `node scripts/type_check.js --project=x-pack/plugins/cloud_security_posture/tsconfig.json` -2. Linter check: `yarn lint:es x-pack/plugins/cloud_security_posture` -3. Unit tests: `yarn jest --config x-pack/plugins/cloud_security_posture/jest.config.js` - -### Install pre-commit hooks (optional) - -We -use [pre-commit](https://docs.elastic.dev/kibana-dev-docs/getting-started/setup-dev-env#install-pre-commit-hook-optional) -to run linters and tests before each commit. To install the pre-commit hooks, run the following command from the root of -the repository: +Run **TypeScript**: ```bash -node scripts/register_git_hook +node scripts/type_check.js --project=x-pack/plugins/cloud_security_posture/tsconfig.json ``` -### Running unit tests - -Our [unit tests](https://docs.elastic.dev/kibana-dev-docs/tutorials/testing-plugins#unit-testing) are written -using [jest](https://jestjs.io/) framework. - -As a convention, we use the `.test.ts` suffix for all our tests. - -You can run all cloud security posture tests with the following command: +Run **ESLint**: ```bash -yarn jest --config x-pack/plugins/cloud_security_posture/jest.config.js +yarn lint:es x-pack/plugins/cloud_security_posture ``` -To run a specific test, you can use the `--testNamePattern` flag: +Run **Unit Tests**: ```bash -yarn jest --config x-pack/plugins/cloud_security_posture/jest.config.js --testNamePattern=FilePattern -t MyTest +yarn test:jest --config x-pack/plugins/cloud_security_posture/jest.config.js ``` -### Running integration tests - -The cloud security posture plugin has -also [integration tests](https://docs.elastic.dev/kibana-dev-docs/tutorials/testing-plugins#integration-tests) that run -against a real Elasticsearch and Kibana instances. -We use these tests to verify that the plugin works as expected when running in a real environment. -In order to run the integration tests, you need to have a running Elasticsearch and Kibana instances with the -integration test configuration. +> **Note** +> for a coverage report, add the `--coverage` flag, and run `open target/kibana-coverage/jest/x-pack/plugins/cloud_security_posture/index.html` -You can run Kibana and Elastic with the integration test configuration by running the following command from the root of -the Kibana repository: +Run **API Integration**: ```bash -node scripts/functional_tests_server.js --config x-pack/test/api_integration/config.ts +yarn test:ftr --config x-pack/test/api_integration/config.ts ``` -** You should wait until the server is ready to accept connections before running the integration tests. +Run **Functional UI Tests**: + +```bash +yarn test:ftr --config x-pack/test/cloud_security_posture_functional/config.ts +``` -Then, in a separate terminal, you can run the integration test. -In order to do so, run the following command: +
-``` bash -node scripts/functional_test_runner.js --config x-pack/test/api_integration/config.ts --include=test_file_path -``` \ No newline at end of file +> **Note** +> in development, run them separately with `ftr:runner` and `ftr:server` diff --git a/x-pack/plugins/data_visualizer/common/constants.ts b/x-pack/plugins/data_visualizer/common/constants.ts index c4d3c0abac24f..f56fd88566c30 100644 --- a/x-pack/plugins/data_visualizer/common/constants.ts +++ b/x-pack/plugins/data_visualizer/common/constants.ts @@ -19,6 +19,8 @@ export const MAX_FILE_SIZE_BYTES = 104857600; // 100MB export const ABSOLUTE_MAX_FILE_SIZE_BYTES = 1073741274; // 1GB export const FILE_SIZE_DISPLAY_FORMAT = '0,0.[0] b'; +export const NO_TIME_FORMAT = 'null'; + // Value to use in the Elasticsearch index mapping meta data to identify the // index as having been created by the File Data Visualizer. export const INDEX_META_DATA_CREATED_BY = 'file-data-visualizer'; diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/utils/utils.ts b/x-pack/plugins/data_visualizer/public/application/common/components/utils/utils.ts index bce8ce3bfef0c..f8d299f9e0ec7 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/utils/utils.ts +++ b/x-pack/plugins/data_visualizer/public/application/common/components/utils/utils.ts @@ -7,7 +7,7 @@ import { isEqual } from 'lodash'; import type { AnalysisResult, InputOverrides } from '@kbn/file-upload-plugin/common'; -import { MB, FILE_FORMATS } from '../../../../../common/constants'; +import { MB, FILE_FORMATS, NO_TIME_FORMAT } from '../../../../../common/constants'; export const DEFAULT_LINES_TO_SAMPLE = 1000; const UPLOAD_SIZE_MB = 5; @@ -117,10 +117,15 @@ export function createUrlOverrides(overrides: InputOverrides, originalSettings: } export function processResults({ results, overrides }: AnalysisResult) { - const timestampFormat = - results.java_timestamp_formats !== undefined && results.java_timestamp_formats.length - ? results.java_timestamp_formats[0] - : undefined; + let timestampFormat; + if ( + (overrides && overrides.timestamp_format === NO_TIME_FORMAT) || + results.java_timestamp_formats === undefined + ) { + timestampFormat = NO_TIME_FORMAT; + } else if (results.java_timestamp_formats.length) { + timestampFormat = results.java_timestamp_formats[0]; + } const linesToSample = overrides !== undefined && overrides.lines_to_sample !== undefined diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/__snapshots__/overrides.test.js.snap b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/__snapshots__/overrides.test.js.snap deleted file mode 100644 index 4448d42bdd455..0000000000000 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/__snapshots__/overrides.test.js.snap +++ /dev/null @@ -1,363 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Overrides render overrides 1`] = ` - - - } - labelType="label" - > - - - - } - labelType="label" - > - - - - - See more on accepted formats - - - } - label={ - - } - labelType="label" - > - - - - } - labelType="label" - > - - - -`; diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/overrides.js b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/overrides.js index d10f978c120ea..95f3357073d73 100644 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/overrides.js +++ b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/overrides.js @@ -23,7 +23,7 @@ import { EuiTextArea, } from '@elastic/eui'; -import { FILE_FORMATS } from '../../../../../common/constants'; +import { FILE_FORMATS, NO_TIME_FORMAT } from '../../../../../common/constants'; import { getFormatOptions, @@ -129,6 +129,7 @@ class OverridesUI extends Component { linesToSampleValid: true, timestampFormatValid: true, timestampFormatError: null, + containsTimeField: overrides.timestampFormat !== NO_TIME_FORMAT, overrides, ...state, }; @@ -203,6 +204,17 @@ class OverridesUI extends Component { this.setOverride({ timestampField }); }; + onContainsTimeFieldChange = (e) => { + this.setState({ containsTimeField: e.target.checked }); + if (e.target.checked === false) { + this.setOverride({ timestampFormat: NO_TIME_FORMAT }); + } else { + this.setOverride({ + timestampFormat: this.props.originalSettings.timestampFormat, + }); + } + }; + onDelimiterChange = ([opt]) => { const delimiter = opt ? opt.label : ''; this.setOverride({ delimiter }); @@ -272,6 +284,7 @@ class OverridesUI extends Component { linesToSampleValid, timestampFormatError, timestampFormatValid, + containsTimeField, overrides, } = this.state; @@ -437,69 +450,77 @@ class OverridesUI extends Component { )} - - } - > - - - {timestampFormat === CUSTOM_DROPDOWN_OPTION && ( - + } - > - - - )} - - - } - > - - {/* - - */} + {containsTimeField ? ( + <> + + } + > + + + {timestampFormat === CUSTOM_DROPDOWN_OPTION && ( + + } + > + + + )} + + } + > + + + + ) : null} + {format === FILE_FORMATS.DELIMITED && originalColumnNames.length > 0 && ( diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/overrides.test.js b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/overrides.test.js index e035d0ececd8c..a0f5faaf46668 100644 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/overrides.test.js +++ b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/edit_flyout/overrides.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { mountWithIntl, shallowWithIntl } from '@kbn/test-jest-helpers'; +import { mountWithIntl } from '@kbn/test-jest-helpers'; import React from 'react'; import { FILE_FORMATS } from '../../../../../common/constants'; @@ -40,14 +40,6 @@ function getProps() { } describe('Overrides', () => { - test('render overrides', () => { - const props = getProps(); - - const component = shallowWithIntl(); - - expect(component).toMatchSnapshot(); - }); - test('render overrides and trigger a state change', () => { const FORMAT_1 = FILE_FORMATS.DELIMITED; const FORMAT_2 = FILE_FORMATS.NDJSON; diff --git a/x-pack/plugins/enterprise_search/common/types/index.ts b/x-pack/plugins/enterprise_search/common/types/index.ts index 9bfb32c239251..2e17862edaaf4 100644 --- a/x-pack/plugins/enterprise_search/common/types/index.ts +++ b/x-pack/plugins/enterprise_search/common/types/index.ts @@ -52,3 +52,4 @@ export interface Meta { } export type { ElasticsearchIndexWithPrivileges } from './indices'; +export type { KibanaDeps } from './kibana_deps'; diff --git a/x-pack/plugins/enterprise_search/common/types/kibana_deps.ts b/x-pack/plugins/enterprise_search/common/types/kibana_deps.ts new file mode 100644 index 0000000000000..e8caf4aaa3b32 --- /dev/null +++ b/x-pack/plugins/enterprise_search/common/types/kibana_deps.ts @@ -0,0 +1,30 @@ +/* + * 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 type { ChartsPluginStart } from '@kbn/charts-plugin/public'; +import type { CloudStart } from '@kbn/cloud-plugin/public'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import type { DiscoverStart } from '@kbn/discover-plugin/public'; +import type { FeaturesPluginStart } from '@kbn/features-plugin/public'; +import type { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public'; +import type { InfraClientStartExports } from '@kbn/infra-plugin/public'; +import type { LicensingPluginStart } from '@kbn/licensing-plugin/public'; +import type { SecurityPluginStart } from '@kbn/security-plugin/public'; +import type { SpacesPluginStart } from '@kbn/spaces-plugin/public'; + +export interface KibanaDeps { + charts: ChartsPluginStart; + cloud: CloudStart; + data: DataPublicPluginStart; + discover: DiscoverStart; + features: FeaturesPluginStart; + guidedOnboarding: GuidedOnboardingPluginStart; + infra: InfraClientStartExports; + licensing: LicensingPluginStart; + security: SecurityPluginStart; + spaces: SpacesPluginStart; +} diff --git a/x-pack/plugins/enterprise_search/kibana.json b/x-pack/plugins/enterprise_search/kibana.json index f62df46d025a8..9b546a39d4b73 100644 --- a/x-pack/plugins/enterprise_search/kibana.json +++ b/x-pack/plugins/enterprise_search/kibana.json @@ -2,7 +2,7 @@ "id": "enterpriseSearch", "version": "kibana", "kibanaVersion": "kibana", - "requiredPlugins": ["features", "spaces", "security", "licensing", "data", "charts", "infra", "cloud", "esUiShared", "guidedOnboarding"], + "requiredPlugins": ["features", "spaces", "security", "licensing", "data", "discover", "charts", "infra", "cloud", "esUiShared", "guidedOnboarding"], "configPath": ["enterpriseSearch"], "optionalPlugins": ["usageCollection", "home", "customIntegrations", "ml"], "server": true, diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_index.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_index.tsx index ac8ee6bde87ac..21df7e3ad82eb 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_index.tsx @@ -20,7 +20,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { TECHNICAL_PREVIEW_LABEL } from '../../../shared/constants'; +import { BETA_LABEL } from '../../../shared/constants/labels'; import { parseQueryParams } from '../../../shared/query_params'; import { EuiLinkTo } from '../../../shared/react_router_helpers'; @@ -40,9 +40,9 @@ export enum IngestionMethodId { native_connector = 'native_connector', } -const technicalPreviewBadge = ( +const betaBadge = ( - {TECHNICAL_PREVIEW_LABEL} + {BETA_LABEL} ); @@ -64,7 +64,7 @@ const METHOD_BUTTON_GROUP_OPTIONS: ButtonGroupOption[] = [ }), }, { - badge: technicalPreviewBadge, + badge: betaBadge, description: i18n.translate( 'xpack.enterpriseSearch.content.newIndex.buttonGroup.nativeConnector.description', { @@ -104,7 +104,7 @@ const METHOD_BUTTON_GROUP_OPTIONS: ButtonGroupOption[] = [ }), }, { - badge: technicalPreviewBadge, + badge: betaBadge, description: i18n.translate( 'xpack.enterpriseSearch.content.newIndex.buttonGroup.connector.description', { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_configuration_config.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_configuration_config.tsx index 91b79710a12e9..1cecf7af2fc79 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_configuration_config.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/native_connector_configuration/native_connector_configuration_config.tsx @@ -33,7 +33,7 @@ export const NativeConnectorConfigurationConfig: React.FC< 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.config.encryptionWarningMessage', { defaultMessage: - 'Encryption for data source credentials is unavailable in this technical preview. Your data source credentials will be stored, unencrypted, in Elasticsearch.', + 'Encryption for data source credentials is unavailable in this beta. Your data source credentials will be stored, unencrypted, in Elasticsearch.', } )} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_requests_panel/crawl_requests_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_requests_panel/crawl_requests_panel.tsx index 75ff689819ff8..0d6a1edc1cce3 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_requests_panel/crawl_requests_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawl_requests_panel/crawl_requests_panel.tsx @@ -9,16 +9,44 @@ import React from 'react'; import { useValues } from 'kea'; -import { EuiCode, EuiPanel, EuiSpacer, EuiText } from '@elastic/eui'; +import { EuiButton, EuiCode, EuiPanel, EuiSpacer, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { KibanaDeps } from '../../../../../../../common/types'; import { DataPanel } from '../../../../../shared/data_panel/data_panel'; import { CrawlerLogic } from '../crawler_logic'; import { CrawlRequestsTable } from './crawl_requests_table'; +const CRAWLER_LOGS_DISCOVER_RECORD = { + columns: [ + '@timestamp', + 'crawler.crawl.id', + 'url.domain', + 'url.path', + 'event.action', + 'http.response.status_code', + ], + dataViewSpec: { + name: i18n.translate( + 'xpack.enterpriseSearch.crawler.crawlRequestsPanel.discoverCrawlerLogsTitle', + { + defaultMessage: 'All Crawler Logs', + } + ), + timeFieldName: '@timestamp', + title: 'logs-elastic_crawler-default', + }, + sort: [['@timestamp', 'desc']], +}; + export const CrawlRequestsPanel: React.FC = () => { const { data } = useValues(CrawlerLogic); + const { + services: { discover }, + } = useKibana(); + return ( { } titleSize="s" iconType="documents" + action={ + discover.locator?.navigate(CRAWLER_LOGS_DISCOVER_RECORD)}> + {i18n.translate('xpack.enterpriseSearch.crawler.crawlRequestsPanel.linkToDiscover', { + defaultMessage: 'View in Discover', + })} + + } subtitle={i18n.translate('xpack.enterpriseSearch.crawler.crawlRequestsPanel.description', { defaultMessage: "Recent crawl requests are logged here. You can track progress and examine crawl events in Kibana's Discover or Logs user intefaces", diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/constants/labels.ts b/x-pack/plugins/enterprise_search/public/applications/shared/constants/labels.ts index 7dd1eeb282d44..8c02bd9c56076 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/constants/labels.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/constants/labels.ts @@ -23,12 +23,9 @@ export const EMAIL_LABEL = i18n.translate('xpack.enterpriseSearch.emailLabel', { defaultMessage: 'Email', }); -export const TECHNICAL_PREVIEW_LABEL = i18n.translate( - 'xpack.enterpriseSearch.technicalPreviewLabel', - { - defaultMessage: 'Technical Preview', // title case specifically requested - } -); +export const BETA_LABEL = i18n.translate('xpack.enterpriseSearch.betaLabel', { + defaultMessage: 'Beta', +}); export const NAME_LABEL = i18n.translate('xpack.enterpriseSearch.nameLabel', { defaultMessage: 'Name', diff --git a/x-pack/plugins/fleet/common/types/models/agent.ts b/x-pack/plugins/fleet/common/types/models/agent.ts index e272c889a83b6..ef046811d178e 100644 --- a/x-pack/plugins/fleet/common/types/models/agent.ts +++ b/x-pack/plugins/fleet/common/types/models/agent.ts @@ -22,7 +22,6 @@ export type AgentStatus = | 'error' | 'online' | 'inactive' - | 'warning' | 'enrolling' | 'unenrolling' | 'updating' diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_health.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_health.tsx index 93091ff726258..cf0ae35ed687f 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_health.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_health.tsx @@ -53,7 +53,6 @@ const Status = { function getStatusComponent(status: Agent['status']): React.ReactElement { switch (status) { - case 'warning': case 'error': case 'degraded': return Status.Unhealthy; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/services/agent_status.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/services/agent_status.tsx index 8d5405d3fb469..76eee1255e39b 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/services/agent_status.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/services/agent_status.tsx @@ -44,7 +44,7 @@ export function getColorForAgentStatus(agentStatus: SimplifiedAgentStatus): stri case 'updating': return colorToHexMap.primary; default: - throw new Error(`Insuported Agent status ${agentStatus}`); + throw new Error(`Unsupported Agent status ${agentStatus}`); } } @@ -71,6 +71,6 @@ export function getLabelForAgentStatus(agentStatus: SimplifiedAgentStatus): stri defaultMessage: 'Updating', }); default: - throw new Error(`Insuported Agent status ${agentStatus}`); + throw new Error(`Unsupported Agent status ${agentStatus}`); } } diff --git a/x-pack/plugins/fleet/public/components/with_guided_onboarding_tour.tsx b/x-pack/plugins/fleet/public/components/with_guided_onboarding_tour.tsx index 9678d9d28e175..4f3af10a9d7b1 100644 --- a/x-pack/plugins/fleet/public/components/with_guided_onboarding_tour.tsx +++ b/x-pack/plugins/fleet/public/components/with_guided_onboarding_tour.tsx @@ -8,7 +8,7 @@ import React, { useEffect, useState } from 'react'; import type { FunctionComponent, ReactElement } from 'react'; import type { EuiTourStepProps } from '@elastic/eui'; -import { EuiButton, EuiText, EuiTourStep } from '@elastic/eui'; +import { EuiButtonEmpty, EuiText, EuiTourStep } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; type TourType = 'addIntegrationButton' | 'integrationCard' | 'agentModalButton'; @@ -95,11 +95,16 @@ export const WithGuidedOnboardingTour: FunctionComponent<{ title={config.title} anchorPosition={tourPosition ? tourPosition : 'rightUp'} footerAction={ - setIsGuidedOnboardingTourOpen(false)} size="s" color="success"> + setIsGuidedOnboardingTourOpen(false)} + size="xs" + color="text" + flush="right" + > {i18n.translate('xpack.fleet.guidedOnboardingTour.nextButtonLabel', { defaultMessage: 'Continue', })} - + } isOpen={isGuidedOnboardingTourOpen} // Close the tour when the user clicks outside of the tour. This is a workaround for diff --git a/x-pack/plugins/fleet/server/services/package_policy.test.ts b/x-pack/plugins/fleet/server/services/package_policy.test.ts index 10a076d734f89..0097961c71ede 100644 --- a/x-pack/plugins/fleet/server/services/package_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/package_policy.test.ts @@ -57,6 +57,11 @@ import { import { appContextService } from './app_context'; import { getPackageInfo } from './epm/packages'; +import { sendTelemetryEvents } from './upgrade_sender'; + +const mockedSendTelemetryEvents = sendTelemetryEvents as jest.MockedFunction< + typeof sendTelemetryEvents +>; async function mockedGetAssetsData(_a: any, _b: any, dataset: string) { if (dataset === 'dataset1') { @@ -1297,6 +1302,7 @@ describe('Package policy service', () => { describe('bulkUpdate', () => { beforeEach(() => { appContextService.start(createAppContextStartContractMock()); + mockedSendTelemetryEvents.mockReset(); }); afterEach(() => { appContextService.stop(); @@ -1826,6 +1832,207 @@ describe('Package policy service', () => { expect(result![0].name).toEqual('test'); }); + + it('should send telemetry event when upgrading a package policy', async () => { + const savedObjectsClient = savedObjectsClientMock.create(); + const mockPackagePolicy = createPackagePolicyMock(); + const mockInputs = [ + { + config: {}, + enabled: true, + keep_enabled: true, + type: 'endpoint', + vars: { + dog: { + type: 'text', + value: 'dalmatian', + }, + cat: { + type: 'text', + value: 'siamese', + frozen: true, + }, + }, + streams: [ + { + data_stream: { + type: 'birds', + dataset: 'migratory.patterns', + }, + enabled: false, + id: `endpoint-migratory.patterns-${mockPackagePolicy.id}`, + vars: { + paths: { + value: ['north', 'south'], + type: 'text', + frozen: true, + }, + period: { + value: '6mo', + type: 'text', + }, + }, + }, + ], + }, + ]; + + const attributes = { + ...mockPackagePolicy, + inputs: mockInputs, + }; + + savedObjectsClient.bulkGet.mockResolvedValue({ + saved_objects: [ + { + id: 'test', + type: 'abcd', + references: [], + version: 'test', + attributes, + }, + ], + }); + + savedObjectsClient.bulkUpdate.mockImplementation( + async ( + objs: Array<{ + type: string; + id: string; + attributes: any; + }> + ) => { + const newObjs = objs.map((obj) => ({ + id: 'test', + type: 'abcd', + references: [], + version: 'test', + attributes: obj.attributes, + })); + savedObjectsClient.bulkGet.mockResolvedValue({ + saved_objects: newObjs, + }); + return { + saved_objects: newObjs, + }; + } + ); + const elasticsearchClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + await packagePolicyService.bulkUpdate( + savedObjectsClient, + elasticsearchClient, + [ + { + ...mockPackagePolicy, + package: { ...mockPackagePolicy!.package, version: '0.9.1' }, + } as any, + ], + { force: true } + ); + + expect(mockedSendTelemetryEvents).toBeCalled(); + }); + + it('should not send telemetry event when updating a package policy without upgrade', async () => { + const savedObjectsClient = savedObjectsClientMock.create(); + const mockPackagePolicy = createPackagePolicyMock(); + const mockInputs = [ + { + config: {}, + enabled: true, + keep_enabled: true, + type: 'endpoint', + vars: { + dog: { + type: 'text', + value: 'dalmatian', + }, + cat: { + type: 'text', + value: 'siamese', + frozen: true, + }, + }, + streams: [ + { + data_stream: { + type: 'birds', + dataset: 'migratory.patterns', + }, + enabled: false, + id: `endpoint-migratory.patterns-${mockPackagePolicy.id}`, + vars: { + paths: { + value: ['north', 'south'], + type: 'text', + frozen: true, + }, + period: { + value: '6mo', + type: 'text', + }, + }, + }, + ], + }, + ]; + + const attributes = { + ...mockPackagePolicy, + inputs: mockInputs, + }; + + savedObjectsClient.bulkGet.mockResolvedValue({ + saved_objects: [ + { + id: 'test', + type: 'abcd', + references: [], + version: 'test', + attributes, + }, + ], + }); + + savedObjectsClient.bulkUpdate.mockImplementation( + async ( + objs: Array<{ + type: string; + id: string; + attributes: any; + }> + ) => { + const newObjs = objs.map((obj) => ({ + id: 'test', + type: 'abcd', + references: [], + version: 'test', + attributes: obj.attributes, + })); + savedObjectsClient.bulkGet.mockResolvedValue({ + saved_objects: newObjs, + }); + return { + saved_objects: newObjs, + }; + } + ); + const elasticsearchClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + await packagePolicyService.bulkUpdate( + savedObjectsClient, + elasticsearchClient, + [ + { + ...mockPackagePolicy, + } as any, + ], + { force: true } + ); + + expect(mockedSendTelemetryEvents).not.toBeCalled(); + }); }); describe('delete', () => { diff --git a/x-pack/plugins/fleet/server/services/package_policy.ts b/x-pack/plugins/fleet/server/services/package_policy.ts index a95cba87b39be..80d6341f5c68b 100644 --- a/x-pack/plugins/fleet/server/services/package_policy.ts +++ b/x-pack/plugins/fleet/server/services/package_policy.ts @@ -565,7 +565,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { }); await Promise.all([bumpPromise, assetRemovePromise]); - sendUpdatePackagePolicyTelemetryEvent(soClient, [packagePolicyUpdate], currentVersion); + sendUpdatePackagePolicyTelemetryEvent(soClient, [packagePolicyUpdate], [oldPackagePolicy]); return newPolicy; } @@ -674,7 +674,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { await Promise.all([bumpPromise, removeAssetPromise]); - sendUpdatePackagePolicyTelemetryEvent(soClient, packagePolicyUpdates, currentVersion); + sendUpdatePackagePolicyTelemetryEvent(soClient, packagePolicyUpdates, oldPackagePolicies); return newPolicies.map( (soPolicy) => @@ -1933,15 +1933,19 @@ async function validateIsNotHostedPolicy( export function sendUpdatePackagePolicyTelemetryEvent( soClient: SavedObjectsClientContract, updatedPkgPolicies: UpdatePackagePolicy[], - currentVersion?: string + oldPackagePolicies: UpdatePackagePolicy[] ) { updatedPkgPolicies.forEach((updatedPkgPolicy) => { if (updatedPkgPolicy.package) { const { name, version } = updatedPkgPolicy.package; - if (version !== currentVersion) { + const oldPkgPolicy = oldPackagePolicies.find( + (packagePolicy) => packagePolicy.id === updatedPkgPolicy.id + ); + const oldVersion = oldPkgPolicy?.package?.version; + if (oldVersion && oldVersion !== version) { const upgradeTelemetry: PackageUpdateEvent = { packageName: name, - currentVersion: currentVersion || 'unknown', + currentVersion: oldVersion, newVersion: version, status: 'success', eventType: 'package-policy-upgrade' as UpdateEventType, diff --git a/x-pack/plugins/infra/common/http_api/metrics_api.ts b/x-pack/plugins/infra/common/http_api/metrics_api.ts index 315a42380397b..10a324471082a 100644 --- a/x-pack/plugins/infra/common/http_api/metrics_api.ts +++ b/x-pack/plugins/infra/common/http_api/metrics_api.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { createLiteralValueFromUndefinedRT } from '@kbn/io-ts-utils'; import * as rt from 'io-ts'; import { MetricsUIAggregationRT } from '../inventory_models/types'; import { afterKeyObjectRT } from './metrics_explorer'; @@ -27,22 +28,25 @@ export const MetricsAPIRequestRT = rt.intersection([ timerange: MetricsAPITimerangeRT, indexPattern: rt.string, metrics: rt.array(MetricsAPIMetricRT), + includeTimeseries: rt.union([rt.boolean, createLiteralValueFromUndefinedRT(true)]), }), rt.partial({ groupBy: rt.array(groupByRT), modules: rt.array(rt.string), afterKey: rt.union([rt.null, afterKeyObjectRT]), - limit: rt.union([rt.number, rt.null, rt.undefined]), - filters: rt.array(rt.object), + limit: rt.union([rt.number, rt.null]), + filters: rt.array(rt.UnknownRecord), dropPartialBuckets: rt.boolean, alignDataToEnd: rt.boolean, }), ]); -export const MetricsAPIPageInfoRT = rt.type({ - afterKey: rt.union([rt.null, afterKeyObjectRT, rt.undefined]), - interval: rt.number, -}); +export const MetricsAPIPageInfoRT = rt.intersection([ + rt.type({ + afterKey: rt.union([rt.null, afterKeyObjectRT, rt.undefined]), + }), + rt.partial({ interval: rt.number }), +]); export const MetricsAPIColumnTypeRT = rt.keyof({ date: null, @@ -76,10 +80,13 @@ export const MetricsAPISeriesRT = rt.intersection([ }), ]); +export const MetricsAPIResponseSeriesRT = rt.intersection([ + MetricsAPISeriesRT, + rt.partial({ metricsets: rt.array(rt.string) }), +]); + export const MetricsAPIResponseRT = rt.type({ - series: rt.array( - rt.intersection([MetricsAPISeriesRT, rt.partial({ metricsets: rt.array(rt.string) })]) - ), + series: rt.array(MetricsAPIResponseSeriesRT), info: MetricsAPIPageInfoRT, }); diff --git a/x-pack/plugins/infra/common/http_api/snapshot_api.ts b/x-pack/plugins/infra/common/http_api/snapshot_api.ts index 791b8079ba688..6b56ee920cf84 100644 --- a/x-pack/plugins/infra/common/http_api/snapshot_api.ts +++ b/x-pack/plugins/infra/common/http_api/snapshot_api.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { createLiteralValueFromUndefinedRT } from '@kbn/io-ts-utils'; import * as rt from 'io-ts'; import { SnapshotMetricTypeRT, ItemTypeRT } from '../inventory_models/types'; import { MetricsAPISeriesRT } from './metrics_api'; @@ -48,10 +49,12 @@ export const SnapshotNodeRT = rt.type({ name: rt.string, }); -export const SnapshotNodeResponseRT = rt.type({ - nodes: rt.array(SnapshotNodeRT), - interval: rt.string, -}); +export const SnapshotNodeResponseRT = rt.intersection([ + rt.type({ + nodes: rt.array(SnapshotNodeRT), + }), + rt.partial({ interval: rt.string }), +]); export const InfraTimerangeInputRT = rt.intersection([ rt.type({ @@ -111,12 +114,12 @@ export const SnapshotRequestRT = rt.intersection([ groupBy: rt.union([SnapshotGroupByRT, rt.null]), nodeType: ItemTypeRT, sourceId: rt.string, + includeTimeseries: rt.union([rt.boolean, createLiteralValueFromUndefinedRT(true)]), }), rt.partial({ accountId: rt.string, region: rt.string, filterQuery: rt.union([rt.string, rt.null]), - includeTimeseries: rt.boolean, overrideCompositeSize: rt.number, }), ]); diff --git a/x-pack/plugins/infra/common/inventory_models/types.ts b/x-pack/plugins/infra/common/inventory_models/types.ts index 13244bae57e69..b6195e65dfa6a 100644 --- a/x-pack/plugins/infra/common/inventory_models/types.ts +++ b/x-pack/plugins/infra/common/inventory_models/types.ts @@ -286,9 +286,15 @@ export const ESSumBucketAggRT = rt.type({ }); export const ESTopMetricsAggRT = rt.type({ - top_metrics: rt.type({ - metrics: rt.union([rt.array(rt.type({ field: rt.string })), rt.type({ field: rt.string })]), - }), + top_metrics: rt.intersection([ + rt.type({ + metrics: rt.union([rt.array(rt.type({ field: rt.string })), rt.type({ field: rt.string })]), + }), + rt.partial({ + size: rt.number, + sort: rt.record(rt.string, rt.union([rt.literal('desc'), rt.literal('asc')])), + }), + ]), }); export const ESMaxPeriodFilterExistsAggRT = rt.type({ diff --git a/x-pack/plugins/infra/public/alerting/inventory/components/expression_chart.tsx b/x-pack/plugins/infra/public/alerting/inventory/components/expression_chart.tsx index 4902a2d309b20..0bfdadb0c9a81 100644 --- a/x-pack/plugins/infra/public/alerting/inventory/components/expression_chart.tsx +++ b/x-pack/plugins/infra/public/alerting/inventory/components/expression_chart.tsx @@ -64,20 +64,20 @@ export const ExpressionChart: React.FC = ({ }); const options = useWaffleOptionsContext(); - const { loading, nodes } = useSnapshot( + const { loading, nodes } = useSnapshot({ filterQuery, - expression.metric === 'custom' - ? [buildCustomMetric(expression.customMetric)] - : [{ type: expression.metric }], - [], + metrics: + expression.metric === 'custom' + ? [buildCustomMetric(expression.customMetric)] + : [{ type: expression.metric }], + groupBy: [], nodeType, sourceId, - 0, - options.accountId, - options.region, - true, - timerange - ); + currentTime: 0, + accountId: options.accountId, + region: options.region, + timerange, + }); const { uiSettings } = useKibanaContextForPlugin().services; diff --git a/x-pack/plugins/infra/public/pages/metrics/hosts/components/cloud_provider_icon_with_title.tsx b/x-pack/plugins/infra/public/pages/metrics/hosts/components/cloud_provider_icon_with_title.tsx index d1258cdd42463..0b96caacd60d4 100644 --- a/x-pack/plugins/infra/public/pages/metrics/hosts/components/cloud_provider_icon_with_title.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/hosts/components/cloud_provider_icon_with_title.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import { EuiToolTip } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText } from '@elastic/eui'; import React from 'react'; import { SnapshotNodePath } from '../../../../../common/http_api'; @@ -34,11 +35,13 @@ export const CloudProviderIconWithTitle = ({ responsive={false} > - + + + {title ?? ( diff --git a/x-pack/plugins/infra/public/pages/metrics/hosts/components/hosts_table.tsx b/x-pack/plugins/infra/public/pages/metrics/hosts/components/hosts_table.tsx index 611666c135a6b..454fa93e8c1d5 100644 --- a/x-pack/plugins/infra/public/pages/metrics/hosts/components/hosts_table.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/hosts/components/hosts_table.tsx @@ -46,18 +46,18 @@ export const HostsTable = () => { // Snapshot endpoint internally uses the indices stored in source.configuration.metricAlias. // For the Unified Search, we create a data view, which for now will be built off of source.configuration.metricAlias too // if we introduce data view selection, we'll have to change this hook and the endpoint to accept a new parameter for the indices - const { loading, nodes, reload } = useSnapshot( - esQuery && JSON.stringify(esQuery), - HOST_METRICS, - [], - 'host', + const { loading, nodes, reload } = useSnapshot({ + filterQuery: esQuery ? JSON.stringify(esQuery) : null, + metrics: HOST_METRICS, + groupBy: [], + nodeType: 'host', sourceId, - dateRangeTimestamp.to, - '', - '', - true, - timeRange - ); + currentTime: dateRangeTimestamp.to, + accountId: '', + region: '', + timerange: timeRange, + includeTimeseries: false, + }); const items = useHostTable(nodes); const noData = items.length === 0; diff --git a/x-pack/plugins/infra/public/pages/metrics/hosts/components/unified_search_bar.tsx b/x-pack/plugins/infra/public/pages/metrics/hosts/components/unified_search_bar.tsx index 9214ae44ae84e..211d82c01fa65 100644 --- a/x-pack/plugins/infra/public/pages/metrics/hosts/components/unified_search_bar.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/hosts/components/unified_search_bar.tsx @@ -10,6 +10,7 @@ import { useKibana } from '@kbn/kibana-react-plugin/public'; import type { Filter, Query, TimeRange } from '@kbn/es-query'; import type { DataView } from '@kbn/data-views-plugin/public'; import type { SavedQuery } from '@kbn/data-plugin/public'; +import { i18n } from '@kbn/i18n'; import type { InfraClientStartDeps } from '../../../../types'; import { useUnifiedSearchContext } from '../hooks/use_unified_search'; import { ControlsContent } from './controls_content'; @@ -64,6 +65,9 @@ export const UnifiedSearchBar = ({ dataView }: Props) => { <> 0.5)', + })} indexPatterns={[dataView]} query={unifiedSearchQuery} dateRangeFrom={unifiedSearchDateRange.from} diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/tabs/metrics/metrics.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/tabs/metrics/metrics.tsx index b9d314459477e..6e8908bf2362a 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/tabs/metrics/metrics.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/tabs/metrics/metrics.tsx @@ -119,31 +119,31 @@ const TabComponent = (props: TabProps) => { buildCustomMetric('system.cpu.cores', 'cores', 'max'), ]; - const { nodes, reload } = useSnapshot( - filter, - [...defaultMetrics, ...customMetrics], - [], + const { nodes, reload } = useSnapshot({ + filterQuery: filter, + metrics: [...defaultMetrics, ...customMetrics], + groupBy: [], nodeType, sourceId, currentTime, accountId, region, - false, - timeRange - ); + sendRequestImmediately: false, + timerange: timeRange, + }); - const { nodes: logRateNodes, reload: reloadLogRate } = useSnapshot( - filter, - [{ type: 'logRate' }], - [], + const { nodes: logRateNodes, reload: reloadLogRate } = useSnapshot({ + filterQuery: filter, + metrics: [{ type: 'logRate' }], + groupBy: [], nodeType, sourceId, currentTime, accountId, region, - false, - timeRange - ); + sendRequestImmediately: false, + timerange: timeRange, + }); const getDomain = useCallback( (timeseries: MetricsExplorerSeries, ms: MetricsExplorerOptionsMetric[]) => { diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/snapshot_container.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/snapshot_container.tsx index e64e79c99f6fc..b22bcb59a3c12 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/snapshot_container.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/snapshot_container.tsx @@ -28,16 +28,22 @@ export const SnapshotContainer = ({ render }: Props) => { const { metric, groupBy, nodeType, accountId, region } = useWaffleOptionsContext(); const { currentTime } = useWaffleTimeContext(); const { filterQueryAsJson } = useWaffleFiltersContext(); - const { loading, nodes, reload, interval } = useSnapshot( - filterQueryAsJson, - [metric], + const { + loading, + nodes, + reload, + interval = '60s', + } = useSnapshot({ + filterQuery: filterQueryAsJson, + metrics: [metric], groupBy, nodeType, sourceId, currentTime, accountId, region, - false - ); + sendRequestImmediately: false, + }); + return render({ loading, nodes, reload, interval }); }; diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx index 2a96896e03bc2..b008d8a21bda3 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx @@ -16,7 +16,7 @@ jest.mock('../../../../../containers/metrics_source', () => ({ })); jest.mock('../../hooks/use_snaphot'); -import { useSnapshot } from '../../hooks/use_snaphot'; +import { useSnapshot, UseSnapshotRequest } from '../../hooks/use_snaphot'; jest.mock('../../hooks/use_waffle_options'); import { useWaffleOptionsContext } from '../../hooks/use_waffle_options'; const mockedUseSnapshot = useSnapshot as jest.Mock>; @@ -103,16 +103,16 @@ describe('ConditionalToolTip', () => { const tooltip = wrapper.find('[data-test-subj~="conditionalTooltipContent-host-01"]'); expect(tooltip.render()).toMatchSnapshot(); - expect(mockedUseSnapshot).toBeCalledWith( - expectedQuery, - expectedMetrics, - [], - 'host', - 'default', + expect(mockedUseSnapshot).toBeCalledWith({ + filterQuery: expectedQuery, + metrics: expectedMetrics, + groupBy: [], + nodeType: 'host', + sourceId: 'default', currentTime, - '', - '' - ); + accountId: '', + region: '', + } as UseSnapshotRequest); }); }); diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx index f96d541afe9f8..5ef86a7fd695b 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx @@ -50,7 +50,16 @@ export const ConditionalToolTip = withTheme(({ theme, node, nodeType, currentTim }, }, }); - const { nodes } = useSnapshot(query, requestMetrics, [], nodeType, sourceId, currentTime, '', ''); + const { nodes } = useSnapshot({ + filterQuery: query, + metrics: requestMetrics, + groupBy: [], + nodeType, + sourceId, + currentTime, + accountId: '', + region: '', + }); const dataNode = first(nodes); const metrics = (dataNode && dataNode.metrics) || []; diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_snaphot.ts b/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_snaphot.ts index 9d8560ffb4bc4..f22302498249e 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_snaphot.ts +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_snaphot.ts @@ -14,27 +14,25 @@ import { useHTTPRequest } from '../../../../hooks/use_http_request'; import { SnapshotNodeResponseRT, SnapshotNodeResponse, - SnapshotGroupBy, SnapshotRequest, InfraTimerangeInput, } from '../../../../../common/http_api/snapshot_api'; -import { - InventoryItemType, - SnapshotMetricType, -} from '../../../../../common/inventory_models/types'; -export function useSnapshot( - filterQuery: string | null | symbol | undefined, - metrics: Array<{ type: SnapshotMetricType }>, - groupBy: SnapshotGroupBy, - nodeType: InventoryItemType, - sourceId: string, - currentTime: number, - accountId: string, - region: string, - sendRequestImmediatly = true, - timerange?: InfraTimerangeInput -) { +export interface UseSnapshotRequest + extends Omit { + filterQuery: string | null | symbol | undefined; + currentTime: number; + sendRequestImmediately?: boolean; + includeTimeseries?: boolean; + timerange?: InfraTimerangeInput; +} +export function useSnapshot({ + timerange, + currentTime, + sendRequestImmediately = true, + includeTimeseries = true, + ...args +}: UseSnapshotRequest) { const decodeResponse = (response: any) => { return pipe( SnapshotNodeResponseRT.decode(response), @@ -42,37 +40,31 @@ export function useSnapshot( ); }; - timerange = timerange || { - interval: '1m', - to: currentTime, - from: currentTime - 1200 * 1000, - lookbackSize: 5, + const payload: Omit = { + ...args, + timerange: timerange ?? { + interval: '1m', + to: currentTime, + from: currentTime - 1200 * 1000, + lookbackSize: 5, + }, + includeTimeseries, }; const { error, loading, response, makeRequest } = useHTTPRequest( '/api/metrics/snapshot', 'POST', - JSON.stringify({ - metrics, - groupBy, - nodeType, - timerange, - filterQuery, - sourceId, - accountId, - region, - includeTimeseries: true, - } as SnapshotRequest), + JSON.stringify(payload), decodeResponse ); useEffect(() => { (async () => { - if (sendRequestImmediatly) { + if (sendRequestImmediately) { await makeRequest(); } })(); - }, [makeRequest, sendRequestImmediatly]); + }, [makeRequest, sendRequestImmediately]); return { error: (error && error.message) || null, diff --git a/x-pack/plugins/infra/server/lib/metrics/index.ts b/x-pack/plugins/infra/server/lib/metrics/index.ts index 54dd69adb3ff4..b234c5df357cd 100644 --- a/x-pack/plugins/infra/server/lib/metrics/index.ts +++ b/x-pack/plugins/infra/server/lib/metrics/index.ts @@ -5,27 +5,32 @@ * 2.0. */ -import { set } from '@kbn/safer-lodash-set'; -import { ThrowReporter } from 'io-ts/lib/ThrowReporter'; +import { decodeOrThrow } from '../../../common/runtime_types'; import { TIMESTAMP_FIELD } from '../../../common/constants'; -import { MetricsAPIRequest, MetricsAPIResponse, afterKeyObjectRT } from '../../../common/http_api'; +import { MetricsAPIRequest, MetricsAPIResponse } from '../../../common/http_api'; import { ESSearchClient, - GroupingResponseRT, + CompositeResponseRT, MetricsESResponse, - HistogramResponseRT, + AggregationResponseRT, + AggregationResponse, + CompositeResponse, + HistogramBucketRT, } from './types'; import { EMPTY_RESPONSE } from './constants'; -import { createAggregations } from './lib/create_aggregations'; -import { convertHistogramBucketsToTimeseries } from './lib/convert_histogram_buckets_to_timeseries'; +import { createAggregations, createCompositeAggregations } from './lib/create_aggregations'; +import { convertBucketsToMetricsApiSeries } from './lib/convert_buckets_to_metrics_series'; import { calculateBucketSize } from './lib/calculate_bucket_size'; import { calculatedInterval } from './lib/calculate_interval'; +const DEFAULT_LIMIT = 9; + export const query = async ( search: ESSearchClient, rawOptions: MetricsAPIRequest ): Promise => { const interval = await calculatedInterval(search, rawOptions); + const options = { ...rawOptions, timerange: { @@ -53,25 +58,11 @@ export const query = async ( index: options.indexPattern, body: { size: 0, - query: { bool: { filter } }, - aggs: { ...createAggregations(options) }, + query: { bool: { filter: [...filter, ...(options.filters ?? [])] } }, + aggs: hasGroupBy ? createCompositeAggregations(options) : createAggregations(options), }, }; - if (hasGroupBy) { - if (options.afterKey) { - if (afterKeyObjectRT.is(options.afterKey)) { - set(params, 'body.aggs.groupings.composite.after', options.afterKey); - } else { - set(params, 'body.aggs.groupings.composite.after', { groupBy0: options.afterKey }); - } - } - } - - if (options.filters) { - params.body.query.bool.filter = [...params.body.query.bool.filter, ...options.filters]; - } - const response = await search<{}, MetricsESResponse>(params); if (response.hits.total.value === 0) { @@ -84,50 +75,56 @@ export const query = async ( const { bucketSize } = calculateBucketSize({ ...options.timerange, interval }); - if (hasGroupBy && GroupingResponseRT.is(response.aggregations)) { - const { groupings } = response.aggregations; - const { after_key: afterKey } = groupings; - const limit = options.limit || 9; - const returnAfterKey = afterKey && groupings.buckets.length === limit ? true : false; - return { - series: groupings.buckets.map((bucket) => { - const keys = Object.values(bucket.key); - const metricsetNames = bucket.metricsets.buckets.map((m) => m.key); - const timeseries = convertHistogramBucketsToTimeseries( - keys, - options, - bucket.histogram.buckets, - bucketSize * 1000 - ); - return { ...timeseries, metricsets: metricsetNames }; - }), - info: { - afterKey: returnAfterKey ? afterKey : null, - interval: bucketSize, - }, - }; - } else if (hasGroupBy) { - ThrowReporter.report(GroupingResponseRT.decode(response.aggregations)); - } + if (hasGroupBy) { + const aggregations = decodeOrThrow(CompositeResponseRT)(response.aggregations); + const { groupings } = aggregations; + const limit = options.limit ?? DEFAULT_LIMIT; + const returnAfterKey = !!groupings.after_key && groupings.buckets.length === limit; + const afterKey = returnAfterKey ? groupings.after_key : null; - if (HistogramResponseRT.is(response.aggregations)) { return { - series: [ - convertHistogramBucketsToTimeseries( - ['*'], - options, - response.aggregations.histogram.buckets, - bucketSize * 1000 - ), - ], + series: getSeriesFromCompositeAggregations(groupings, options, bucketSize * 1000), info: { - afterKey: null, - interval: bucketSize, + afterKey, + interval: rawOptions.includeTimeseries ? bucketSize : undefined, }, }; - } else { - ThrowReporter.report(HistogramResponseRT.decode(response.aggregations)); } - throw new Error('Elasticsearch responded with an unrecognized format.'); + const aggregations = decodeOrThrow(AggregationResponseRT)(response.aggregations); + return { + series: getSeriesFromHistogram(aggregations, options, bucketSize * 1000), + info: { + afterKey: null, + interval: bucketSize, + }, + }; +}; + +const getSeriesFromHistogram = ( + aggregations: AggregationResponse, + options: MetricsAPIRequest, + bucketSize: number +): MetricsAPIResponse['series'] => { + return [ + convertBucketsToMetricsApiSeries(['*'], options, aggregations.histogram.buckets, bucketSize), + ]; +}; + +const getSeriesFromCompositeAggregations = ( + groupings: CompositeResponse['groupings'], + options: MetricsAPIRequest, + bucketSize: number +): MetricsAPIResponse['series'] => { + return groupings.buckets.map((bucket) => { + const keys = Object.values(bucket.key); + const metricsetNames = bucket.metricsets.buckets.map((m) => m.key); + const metrics = convertBucketsToMetricsApiSeries( + keys, + options, + HistogramBucketRT.is(bucket) ? bucket.histogram.buckets : [bucket], + bucketSize + ); + return { ...metrics, metricsets: metricsetNames }; + }); }; diff --git a/x-pack/plugins/infra/server/lib/metrics/lib/__snapshots__/convert_histogram_buckets_to_timeseries.test.ts.snap b/x-pack/plugins/infra/server/lib/metrics/lib/__snapshots__/convert_buckets_to_metrics_series.test.ts.snap similarity index 84% rename from x-pack/plugins/infra/server/lib/metrics/lib/__snapshots__/convert_histogram_buckets_to_timeseries.test.ts.snap rename to x-pack/plugins/infra/server/lib/metrics/lib/__snapshots__/convert_buckets_to_metrics_series.test.ts.snap index 5ec5166c8deb4..b49483481693f 100644 --- a/x-pack/plugins/infra/server/lib/metrics/lib/__snapshots__/convert_histogram_buckets_to_timeseries.test.ts.snap +++ b/x-pack/plugins/infra/server/lib/metrics/lib/__snapshots__/convert_buckets_to_metrics_series.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`convertHistogramBucketsToTimeseies(keys, options, buckets) should drop the last bucket 1`] = ` +exports[`convertBucketsToMetricsApiSeries should drop the last bucket 1`] = ` Object { "columns": Array [ Object { @@ -41,7 +41,7 @@ Object { } `; -exports[`convertHistogramBucketsToTimeseies(keys, options, buckets) should just work 1`] = ` +exports[`convertBucketsToMetricsApiSeries should just work 1`] = ` Object { "columns": Array [ Object { @@ -86,7 +86,7 @@ Object { } `; -exports[`convertHistogramBucketsToTimeseies(keys, options, buckets) should return empty timeseries for empty metrics 1`] = ` +exports[`convertBucketsToMetricsApiSeries should return empty timeseries for empty metrics 1`] = ` Object { "columns": Array [], "id": "example-0", @@ -97,7 +97,7 @@ Object { } `; -exports[`convertHistogramBucketsToTimeseies(keys, options, buckets) should transform top_metric aggregations 1`] = ` +exports[`convertBucketsToMetricsApiSeries should transform top_metric aggregations 1`] = ` Object { "columns": Array [ Object { @@ -137,7 +137,7 @@ Object { } `; -exports[`convertHistogramBucketsToTimeseies(keys, options, buckets) should work with keyed percentiles 1`] = ` +exports[`convertBucketsToMetricsApiSeries should work with keyed percentiles 1`] = ` Object { "columns": Array [ Object { @@ -182,7 +182,7 @@ Object { } `; -exports[`convertHistogramBucketsToTimeseies(keys, options, buckets) should work with normalized_values 1`] = ` +exports[`convertBucketsToMetricsApiSeries should work with normalized_values 1`] = ` Object { "columns": Array [ Object { @@ -227,7 +227,7 @@ Object { } `; -exports[`convertHistogramBucketsToTimeseies(keys, options, buckets) should work with percentiles 1`] = ` +exports[`convertBucketsToMetricsApiSeries should work with percentiles 1`] = ` Object { "columns": Array [ Object { diff --git a/x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.test.ts b/x-pack/plugins/infra/server/lib/metrics/lib/convert_buckets_to_metrics_series.test.ts similarity index 83% rename from x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.test.ts rename to x-pack/plugins/infra/server/lib/metrics/lib/convert_buckets_to_metrics_series.test.ts index 8fe22e6f81d71..bba4e338fc106 100644 --- a/x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.test.ts +++ b/x-pack/plugins/infra/server/lib/metrics/lib/convert_buckets_to_metrics_series.test.ts @@ -7,7 +7,7 @@ import { MetricsAPIRequest } from '../../../../common/http_api'; import moment from 'moment'; -import { convertHistogramBucketsToTimeseries } from './convert_histogram_buckets_to_timeseries'; +import { convertBucketsToMetricsApiSeries } from './convert_buckets_to_metrics_series'; const keys = ['example-0']; @@ -22,6 +22,7 @@ const options: MetricsAPIRequest = { metrics: [ { id: 'metric_0', aggregations: { metric_0: { avg: { field: 'system.cpu.user.pct' } } } }, ], + includeTimeseries: true, }; const buckets = [ @@ -63,13 +64,13 @@ const buckets = [ }, ]; -describe('convertHistogramBucketsToTimeseies(keys, options, buckets)', () => { +describe('convertBucketsToMetricsApiSeries', () => { it('should just work', () => { - expect(convertHistogramBucketsToTimeseries(keys, options, buckets, 60000)).toMatchSnapshot(); + expect(convertBucketsToMetricsApiSeries(keys, options, buckets, 60000)).toMatchSnapshot(); }); it('should drop the last bucket', () => { expect( - convertHistogramBucketsToTimeseries( + convertBucketsToMetricsApiSeries( keys, { ...options, dropPartialBuckets: true }, buckets, @@ -79,7 +80,7 @@ describe('convertHistogramBucketsToTimeseies(keys, options, buckets)', () => { }); it('should return empty timeseries for empty metrics', () => { expect( - convertHistogramBucketsToTimeseries(keys, { ...options, metrics: [] }, buckets, 60000) + convertBucketsToMetricsApiSeries(keys, { ...options, metrics: [] }, buckets, 60000) ).toMatchSnapshot(); }); it('should work with normalized_values', () => { @@ -91,7 +92,7 @@ describe('convertHistogramBucketsToTimeseies(keys, options, buckets)', () => { return bucket; }); expect( - convertHistogramBucketsToTimeseries(keys, { ...options }, bucketsWithNormalizedValue, 60000) + convertBucketsToMetricsApiSeries(keys, { ...options }, bucketsWithNormalizedValue, 60000) ).toMatchSnapshot(); }); it('should work with percentiles', () => { @@ -99,7 +100,7 @@ describe('convertHistogramBucketsToTimeseies(keys, options, buckets)', () => { return { ...bucket, metric_0: { values: { '95.0': 3 } } }; }); expect( - convertHistogramBucketsToTimeseries(keys, { ...options }, bucketsWithPercentiles, 60000) + convertBucketsToMetricsApiSeries(keys, { ...options }, bucketsWithPercentiles, 60000) ).toMatchSnapshot(); }); it('should throw error with multiple percentiles', () => { @@ -107,12 +108,7 @@ describe('convertHistogramBucketsToTimeseies(keys, options, buckets)', () => { return { ...bucket, metric_0: { values: { '95.0': 3, '99.0': 4 } } }; }); expect(() => - convertHistogramBucketsToTimeseries( - keys, - { ...options }, - bucketsWithMultiplePercentiles, - 60000 - ) + convertBucketsToMetricsApiSeries(keys, { ...options }, bucketsWithMultiplePercentiles, 60000) ).toThrow(); }); it('should work with keyed percentiles', () => { @@ -120,7 +116,7 @@ describe('convertHistogramBucketsToTimeseies(keys, options, buckets)', () => { return { ...bucket, metric_0: { values: [{ key: '99.0', value: 4 }] } }; }); expect( - convertHistogramBucketsToTimeseries(keys, { ...options }, bucketsWithKeyedPercentiles, 60000) + convertBucketsToMetricsApiSeries(keys, { ...options }, bucketsWithKeyedPercentiles, 60000) ).toMatchSnapshot(); }); it('should throw error with multiple keyed percentiles', () => { @@ -136,7 +132,7 @@ describe('convertHistogramBucketsToTimeseies(keys, options, buckets)', () => { }; }); expect(() => - convertHistogramBucketsToTimeseries( + convertBucketsToMetricsApiSeries( keys, { ...options }, bucketsWithMultipleKeyedPercentiles, @@ -193,7 +189,7 @@ describe('convertHistogramBucketsToTimeseies(keys, options, buckets)', () => { ]; expect( - convertHistogramBucketsToTimeseries(keys, topMetricOptions, bucketsWithTopAggregation, 60000) + convertBucketsToMetricsApiSeries(keys, topMetricOptions, bucketsWithTopAggregation, 60000) ).toMatchSnapshot(); }); }); diff --git a/x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.ts b/x-pack/plugins/infra/server/lib/metrics/lib/convert_buckets_to_metrics_series.ts similarity index 89% rename from x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.ts rename to x-pack/plugins/infra/server/lib/metrics/lib/convert_buckets_to_metrics_series.ts index 82bd99896839f..719d2334cc452 100644 --- a/x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.ts +++ b/x-pack/plugins/infra/server/lib/metrics/lib/convert_buckets_to_metrics_series.ts @@ -14,7 +14,7 @@ import { MetricsAPIRow, } from '../../../../common/http_api/metrics_api'; import { - HistogramBucket, + Bucket, BasicMetricValueRT, NormalizedMetricValueRT, PercentilesTypeRT, @@ -68,9 +68,9 @@ const dropOutOfBoundsBuckets = (from: number, to: number, bucketSizeInMillis: number) => (row: MetricsAPIRow) => row.timestamp >= from && row.timestamp + bucketSizeInMillis <= to; -const convertBucketsToRows = ( +export const convertBucketsToRows = ( options: MetricsAPIRequest, - buckets: HistogramBucket[] + buckets: Bucket[] ): MetricsAPIRow[] => { return buckets.map((bucket) => { const ids = options.metrics.map((metric) => metric.id); @@ -78,14 +78,15 @@ const convertBucketsToRows = ( const valueObject = get(bucket, [id]); return { ...acc, [id]: ValueObjectTypeRT.is(valueObject) ? getValue(valueObject) : null }; }, {} as Record); + return { timestamp: bucket.key as number, ...metrics }; }); }; -export const convertHistogramBucketsToTimeseries = ( +export const convertBucketsToMetricsApiSeries = ( keys: string[], options: MetricsAPIRequest, - buckets: HistogramBucket[], + buckets: Bucket[], bucketSizeInMillis: number ): MetricsAPISeries => { const id = keys.join(':'); @@ -99,11 +100,14 @@ export const convertHistogramBucketsToTimeseries = ( type: 'number', })) as MetricsAPIColumn[]; const allRows = convertBucketsToRows(options, buckets); - const rows = options.dropPartialBuckets - ? allRows.filter( - dropOutOfBoundsBuckets(options.timerange.from, options.timerange.to, bucketSizeInMillis) - ) - : allRows; + + const rows = + options.dropPartialBuckets && options.includeTimeseries + ? allRows.filter( + dropOutOfBoundsBuckets(options.timerange.from, options.timerange.to, bucketSizeInMillis) + ) + : allRows; + return { id, keys, diff --git a/x-pack/plugins/infra/server/lib/metrics/lib/create_aggregations.test.ts b/x-pack/plugins/infra/server/lib/metrics/lib/create_aggregations.test.ts index 9b92793129d44..120faa40ccd00 100644 --- a/x-pack/plugins/infra/server/lib/metrics/lib/create_aggregations.test.ts +++ b/x-pack/plugins/infra/server/lib/metrics/lib/create_aggregations.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { createAggregations } from './create_aggregations'; +import { createAggregations, createCompositeAggregations } from './create_aggregations'; import moment from 'moment'; import { MetricsAPIRequest } from '../../../../common/http_api'; @@ -20,16 +20,57 @@ const options: MetricsAPIRequest = { metrics: [ { id: 'metric_0', aggregations: { metric_0: { avg: { field: 'system.cpu.user.pct' } } } }, ], + includeTimeseries: true, }; describe('createAggregations(options)', () => { it('should return groupings aggregation with groupBy', () => { - const optionsWithGroupBy = { ...options, groupBy: ['host.name'] }; - expect(createAggregations(optionsWithGroupBy)).toMatchSnapshot(); + const optionsWithGroupBy: MetricsAPIRequest = { ...options, groupBy: ['host.name'] }; + expect(createCompositeAggregations(optionsWithGroupBy)).toMatchSnapshot(); }); + it('should return groupings aggregation with afterKey', () => { + const optionsWithGroupBy: MetricsAPIRequest = { + ...options, + groupBy: ['host.name'], + afterKey: { group0: 'host-0' }, + }; + expect(createCompositeAggregations(optionsWithGroupBy)).toEqual({ + groupings: expect.objectContaining({ + composite: expect.objectContaining({ + after: { group0: 'host-0' }, + }), + }), + }); + }); + + it('should return groupings aggregation without date histogram', () => { + const optionsWithGroupBy: MetricsAPIRequest = { + ...options, + groupBy: ['host.name'], + includeTimeseries: false, + }; + expect(createCompositeAggregations(optionsWithGroupBy)).toEqual({ + groupings: expect.objectContaining({ + aggs: { + metric_0: { + avg: { + field: 'system.cpu.user.pct', + }, + }, + metricsets: { + terms: { + field: 'metricset.name', + }, + }, + }, + }), + }); + }); + it('should return just histogram aggregation without groupBy', () => { expect(createAggregations(options)).toMatchSnapshot(); }); + it('should return add offset to histogram', () => { const optionsWithAlignDataToEnd = { ...options, diff --git a/x-pack/plugins/infra/server/lib/metrics/lib/create_aggregations.ts b/x-pack/plugins/infra/server/lib/metrics/lib/create_aggregations.ts index 769ccce409e65..cddb9f9b915a1 100644 --- a/x-pack/plugins/infra/server/lib/metrics/lib/create_aggregations.ts +++ b/x-pack/plugins/infra/server/lib/metrics/lib/create_aggregations.ts @@ -5,15 +5,36 @@ * 2.0. */ +import { AggregationOptionsByType } from '@kbn/es-types'; + +import Boom from '@hapi/boom'; +import { afterKeyObjectRT } from '../../../../common/http_api'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; import { MetricsAPIRequest } from '../../../../common/http_api/metrics_api'; import { calculateDateHistogramOffset } from './calculate_date_histogram_offset'; import { createMetricsAggregations } from './create_metrics_aggregations'; import { calculateBucketSize } from './calculate_bucket_size'; -export const createAggregations = (options: MetricsAPIRequest) => { +const DEFAULT_LIMIT = 9; +const METRICSET_AGGS = { + metricsets: { + terms: { + field: 'metricset.name', + }, + }, +}; + +type MetricsAggregation = ReturnType; +interface HistogramAggregation { + histogram: { + date_histogram: AggregationOptionsByType['date_histogram']; + aggregations: MetricsAggregation; + }; +} + +const createMetricHistogramAggs = (options: MetricsAPIRequest): HistogramAggregation => { const { intervalString } = calculateBucketSize(options.timerange); - const histogramAggregation = { + return { histogram: { date_histogram: { field: TIMESTAMP_FIELD, @@ -26,27 +47,52 @@ export const createAggregations = (options: MetricsAPIRequest) => { }, aggregations: createMetricsAggregations(options), }, - metricsets: { - terms: { - field: 'metricset.name', - }, - }, }; +}; - if (Array.isArray(options.groupBy) && options.groupBy.length) { - const limit = options.limit || 9; - return { - groupings: { - composite: { - size: limit, - sources: options.groupBy.map((field, index) => ({ - [`groupBy${index}`]: { terms: { field } }, - })), - }, - aggs: histogramAggregation, - }, - }; +const getAfterKey = (options: MetricsAPIRequest) => { + if (!options.afterKey) { + return null; + } + if (afterKeyObjectRT.is(options.afterKey)) { + return options.afterKey; + } else { + return { groupBy0: options.afterKey }; + } +}; +export const createCompositeAggregations = (options: MetricsAPIRequest) => { + if (!Array.isArray(options.groupBy) || !options.groupBy.length) { + throw Boom.badRequest('groupBy must be informed.'); + } + + if (!options.includeTimeseries && !!options.metrics.find((p) => p.id === 'logRate')) { + throw Boom.badRequest('logRate metric is not supported without time series'); } - return histogramAggregation; + const after = getAfterKey(options); + + return { + groupings: { + composite: { + size: options.limit ?? DEFAULT_LIMIT, + sources: options.groupBy.map((field, index) => ({ + [`groupBy${index}`]: { terms: { field } }, + })), + ...(after ? { after } : {}), + }, + aggs: { + ...(options.includeTimeseries + ? createMetricHistogramAggs(options) + : createMetricsAggregations(options)), + ...METRICSET_AGGS, + }, + }, + }; +}; + +export const createAggregations = (options: MetricsAPIRequest) => { + return { + ...createMetricHistogramAggs(options), + ...METRICSET_AGGS, + }; }; diff --git a/x-pack/plugins/infra/server/lib/metrics/lib/create_metrics_aggregations.test.ts b/x-pack/plugins/infra/server/lib/metrics/lib/create_metrics_aggregations.test.ts index 00b895ec19241..ef57aa05085a3 100644 --- a/x-pack/plugins/infra/server/lib/metrics/lib/create_metrics_aggregations.test.ts +++ b/x-pack/plugins/infra/server/lib/metrics/lib/create_metrics_aggregations.test.ts @@ -27,6 +27,7 @@ const options: MetricsAPIRequest = { }, }, ], + includeTimeseries: true, }; describe('createMetricsAggregations(options)', () => { diff --git a/x-pack/plugins/infra/server/lib/metrics/types.ts b/x-pack/plugins/infra/server/lib/metrics/types.ts index cb2fefaf9b7e3..5399d182f4185 100644 --- a/x-pack/plugins/infra/server/lib/metrics/types.ts +++ b/x-pack/plugins/infra/server/lib/metrics/types.ts @@ -60,37 +60,48 @@ export const TermsWithMetrics = rt.intersection([ }), ]); -export const HistogramBucketRT = rt.record( +export const BucketRT = rt.record( rt.string, - rt.union([rt.number, rt.string, MetricValueTypeRT, TermsWithMetrics]) + rt.union([ + rt.number, + rt.string, + MetricValueTypeRT, + TermsWithMetrics, + rt.record(rt.string, rt.string), + ]) ); -export const HistogramResponseRT = rt.type({ +export const MetricsetRT = rt.type({ + buckets: rt.array( + rt.type({ + key: rt.string, + doc_count: rt.number, + }) + ), +}); + +export const HistogramRT = rt.type({ histogram: rt.type({ - buckets: rt.array(HistogramBucketRT), - }), - metricsets: rt.type({ - buckets: rt.array( - rt.type({ - key: rt.string, - doc_count: rt.number, - }) - ), + buckets: rt.array(BucketRT), }), + metricsets: MetricsetRT, }); -const GroupingBucketRT = rt.intersection([ +export const MetricsBucketRT = rt.intersection([BucketRT, rt.type({ metricsets: MetricsetRT })]); +export const HistogramBucketRT = rt.intersection([ rt.type({ key: rt.record(rt.string, rt.string), doc_count: rt.number, }), - HistogramResponseRT, + HistogramRT, ]); -export const GroupingResponseRT = rt.type({ +export const AggregationResponseRT = HistogramRT; + +export const CompositeResponseRT = rt.type({ groupings: rt.intersection([ rt.type({ - buckets: rt.array(GroupingBucketRT), + buckets: rt.array(rt.union([HistogramBucketRT, MetricsBucketRT])), }), rt.partial({ after_key: rt.record(rt.string, rt.string), @@ -98,13 +109,11 @@ export const GroupingResponseRT = rt.type({ ]), }); +export type Bucket = rt.TypeOf; export type HistogramBucket = rt.TypeOf; - -export type HistogramResponse = rt.TypeOf; - -export type GroupingResponse = rt.TypeOf; - -export type MetricsESResponse = HistogramResponse | GroupingResponse; +export type CompositeResponse = rt.TypeOf; +export type AggregationResponse = rt.TypeOf; +export type MetricsESResponse = AggregationResponse | CompositeResponse; export interface LogQueryFields { indexPattern: string; diff --git a/x-pack/plugins/infra/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.test.ts b/x-pack/plugins/infra/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.test.ts index a6848e4f7a2dd..fdf58fa848f8f 100644 --- a/x-pack/plugins/infra/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.test.ts +++ b/x-pack/plugins/infra/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.test.ts @@ -31,6 +31,7 @@ const BASE_METRICS_UI_OPTIONS: MetricsAPIRequest = { metrics: [ { id: 'metric_0', aggregations: { metric_0: { avg: { field: 'system.cpu.user.pct' } } } }, ], + includeTimeseries: true, }; describe('convertRequestToMetricsAPIOptions', () => { diff --git a/x-pack/plugins/infra/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.ts b/x-pack/plugins/infra/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.ts index b1a19bc6a8d32..144be0565e298 100644 --- a/x-pack/plugins/infra/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.ts +++ b/x-pack/plugins/infra/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.ts @@ -27,6 +27,7 @@ export const convertRequestToMetricsAPIOptions = ( limit, metrics, dropPartialBuckets: true, + includeTimeseries: true, }; if (options.afterKey) { @@ -43,7 +44,7 @@ export const convertRequestToMetricsAPIOptions = ( try { const filterObject = JSON.parse(options.filterQuery); if (isObject(filterObject)) { - metricsApiOptions.filters = [filterObject]; + metricsApiOptions.filters = [filterObject as any]; } } catch (err) { metricsApiOptions.filters = [ diff --git a/x-pack/plugins/infra/server/routes/metrics_explorer/lib/query_total_grouping.test.ts b/x-pack/plugins/infra/server/routes/metrics_explorer/lib/query_total_grouping.test.ts index cc5631ffcec9c..1844a994a9375 100644 --- a/x-pack/plugins/infra/server/routes/metrics_explorer/lib/query_total_grouping.test.ts +++ b/x-pack/plugins/infra/server/routes/metrics_explorer/lib/query_total_grouping.test.ts @@ -5,21 +5,22 @@ * 2.0. */ +import { MetricsAPIRequest } from '../../../../common/http_api'; import { queryTotalGroupings } from './query_total_groupings'; describe('queryTotalGroupings', () => { const ESSearchClientMock = jest.fn().mockReturnValue({}); - const defaultOptions = { + const defaultOptions: MetricsAPIRequest = { timerange: { from: 1615972672011, interval: '>=10s', to: 1615976272012, - field: '@timestamp', }, indexPattern: 'testIndexPattern', metrics: [], - dropLastBucket: true, + dropPartialBuckets: true, groupBy: ['testField'], + includeTimeseries: true, }; beforeEach(() => { diff --git a/x-pack/plugins/infra/server/routes/snapshot/index.ts b/x-pack/plugins/infra/server/routes/snapshot/index.ts index 99cde598b19e4..27c49032c03f4 100644 --- a/x-pack/plugins/infra/server/routes/snapshot/index.ts +++ b/x-pack/plugins/infra/server/routes/snapshot/index.ts @@ -21,7 +21,7 @@ import { LogQueryFields } from '../../lib/metrics/types'; const escapeHatch = schema.object({}, { unknowns: 'allow' }); export const initSnapshotRoute = (libs: InfraBackendLibs) => { - const { framework, handleEsError } = libs; + const { framework } = libs; framework.registerRoute( { @@ -64,7 +64,19 @@ export const initSnapshotRoute = (libs: InfraBackendLibs) => { body: SnapshotNodeResponseRT.encode(snapshotResponse), }); } catch (err) { - return handleEsError({ error: err, response }); + if (Boom.isBoom(err)) { + return response.customError({ + statusCode: err.output.statusCode, + body: { message: err.output.payload.message }, + }); + } + + return response.customError({ + statusCode: err.statusCode ?? err, + body: { + message: err.message ?? 'An unexpected error occurred', + }, + }); } } ); diff --git a/x-pack/plugins/infra/server/routes/snapshot/lib/apply_metadata_to_last_path.ts b/x-pack/plugins/infra/server/routes/snapshot/lib/apply_metadata_to_last_path.ts index 847aaf9b21a81..31acc9c2bf65b 100644 --- a/x-pack/plugins/infra/server/routes/snapshot/lib/apply_metadata_to_last_path.ts +++ b/x-pack/plugins/infra/server/routes/snapshot/lib/apply_metadata_to_last_path.ts @@ -15,7 +15,6 @@ import { MetricsAPIRow, } from '../../../../common/http_api'; import { META_KEY } from './constants'; -import { InfraSource } from '../../../lib/sources'; export const isIPv4 = (subject: string) => /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/.test(subject); @@ -26,8 +25,7 @@ type RowWithMetadata = MetricsAPIRow & { export const applyMetadataToLastPath = ( series: MetricsAPISeries, node: SnapshotNode, - snapshotRequest: SnapshotRequest, - source: InfraSource + snapshotRequest: SnapshotRequest ): SnapshotNodePath[] => { // First we need to find a row with metadata const rowWithMeta = series.rows.find( diff --git a/x-pack/plugins/infra/server/routes/snapshot/lib/get_nodes.ts b/x-pack/plugins/infra/server/routes/snapshot/lib/get_nodes.ts index 7b75c5fd09980..171639c115a79 100644 --- a/x-pack/plugins/infra/server/routes/snapshot/lib/get_nodes.ts +++ b/x-pack/plugins/infra/server/routes/snapshot/lib/get_nodes.ts @@ -41,7 +41,6 @@ const transformAndQueryData = async ({ const snapshotResponse = transformMetricsApiResponseToSnapshotResponse( metricsApiRequest, snapshotRequest, - source, metricsApiResponse ); return copyMissingMetrics(snapshotResponse); diff --git a/x-pack/plugins/infra/server/routes/snapshot/lib/transform_metrics_ui_response.test.ts b/x-pack/plugins/infra/server/routes/snapshot/lib/transform_metrics_ui_response.test.ts index 159f6d0b646ec..7053cd19d4c38 100644 --- a/x-pack/plugins/infra/server/routes/snapshot/lib/transform_metrics_ui_response.test.ts +++ b/x-pack/plugins/infra/server/routes/snapshot/lib/transform_metrics_ui_response.test.ts @@ -5,28 +5,55 @@ * 2.0. */ +import { + InfraTimerangeInput, + MetricsAPIRequest, + SnapshotRequest, +} from '../../../../common/http_api'; +import moment from 'moment'; import { transformMetricsApiResponseToSnapshotResponse } from './transform_metrics_ui_response'; jest.mock('./apply_metadata_to_last_path', () => ({ applyMetadataToLastPath: (series: any) => [{ label: series.id }], })); -const now = 1630597319235; +const now = moment('2020-01-01T00:00:00Z').add(5, 'minute').valueOf(); + +const timerange: InfraTimerangeInput = { + from: moment('2020-01-01T00:00:00Z').valueOf(), + to: now, + interval: '1m', +}; + +const snapshotApiRequest: SnapshotRequest = { + metrics: [{ type: 'cpu' }], + includeTimeseries: false, + timerange, + groupBy: [], + nodeType: 'host', + sourceId: '', +}; + +const metricsApiRequest: MetricsAPIRequest = { + metrics: [ + { + id: 'cpu', + aggregations: { cpu: { avg: { field: 'system.cpu.user.pct' } } }, + }, + ], + includeTimeseries: false, + timerange, + indexPattern: 'metrics-*', +}; describe('transformMetricsApiResponseToSnapshotResponse', () => { test('filters out nodes from APM which report no data', () => { const result = transformMetricsApiResponseToSnapshotResponse( - { - // @ts-ignore - metrics: [{ id: 'cpu' }], - }, - { - includeTimeseries: false, - nodeType: 'host', - }, - {}, + metricsApiRequest, + snapshotApiRequest, { info: { + afterKey: null, interval: 60, }, series: [ diff --git a/x-pack/plugins/infra/server/routes/snapshot/lib/transform_metrics_ui_response.ts b/x-pack/plugins/infra/server/routes/snapshot/lib/transform_metrics_ui_response.ts index a76093f78e08c..4b3682db3d1f6 100644 --- a/x-pack/plugins/infra/server/routes/snapshot/lib/transform_metrics_ui_response.ts +++ b/x-pack/plugins/infra/server/routes/snapshot/lib/transform_metrics_ui_response.ts @@ -11,15 +11,13 @@ import { MetricsAPIResponse, SnapshotNodeResponse, MetricsAPIRequest, - MetricsExplorerColumnType, MetricsAPIRow, SnapshotRequest, - SnapshotNodePath, - SnapshotNodeMetric, SnapshotNode, + MetricsAPISeries, + SnapshotNodeMetric, } from '../../../../common/http_api'; import { META_KEY } from './constants'; -import { InfraSource } from '../../../lib/sources'; import { applyMetadataToLastPath } from './apply_metadata_to_last_path'; const getMetricValue = (row: MetricsAPIRow) => { @@ -45,52 +43,70 @@ const getLastValue = (rows: MetricsAPIRow[]) => { export const transformMetricsApiResponseToSnapshotResponse = ( options: MetricsAPIRequest, snapshotRequest: SnapshotRequest, - source: InfraSource, metricsApiResponse: MetricsAPIResponse ): SnapshotNodeResponse => { const nodes = metricsApiResponse.series .map((series) => { const node = { - metrics: options.metrics - .filter((m) => m.id !== META_KEY) - .map((metric) => { - const name = metric.id as SnapshotMetricType; - const timeseries = { - id: name, - columns: [ - { name: 'timestamp', type: 'date' as MetricsExplorerColumnType }, - { name: 'metric_0', type: 'number' as MetricsExplorerColumnType }, - ], - rows: series.rows.map((row) => { - return { timestamp: row.timestamp, metric_0: get(row, metric.id, null) }; - }), - }; - const maxValue = calculateMax(timeseries.rows); - const avg = calculateAvg(timeseries.rows); - const value = getLastValue(timeseries.rows); - const nodeMetric: SnapshotNodeMetric = { name, max: maxValue, value, avg }; - if (snapshotRequest.includeTimeseries) { - nodeMetric.timeseries = timeseries; - } - return nodeMetric; - }), - path: - series.keys?.map((key) => { - return { value: key, label: key } as SnapshotNodePath; - }) ?? [], name: '', + metrics: getMetrics(options, snapshotRequest, series), + path: (series.keys ?? []).map((key) => { + return { value: key, label: key }; + }), }; const isNoData = node.metrics.every((m) => m.value === null); const isAPMNode = series.metricsets?.includes('app'); if (isNoData && isAPMNode) return null; - const path = applyMetadataToLastPath(series, node, snapshotRequest, source); - const lastPath = last(path); - const name = lastPath?.label ?? 'N/A'; + const path = applyMetadataToLastPath(series, node, snapshotRequest); + const name = last(path)?.label ?? 'N/A'; return { ...node, path, name }; }) .filter((n) => n !== null) as SnapshotNode[]; - return { nodes, interval: `${metricsApiResponse.info.interval}s` }; + + return { + nodes, + interval: + metricsApiResponse.info.interval !== undefined + ? `${metricsApiResponse.info.interval}s` + : undefined, + }; +}; + +const getMetrics = ( + options: MetricsAPIRequest, + snapshotRequest: SnapshotRequest, + series: MetricsAPIResponse['series'][number] +): SnapshotNodeMetric[] => { + return options.metrics + .filter((m) => m.id !== META_KEY) + .map((metric) => { + const name = metric.id as SnapshotMetricType; + + const metrics = series.rows.map((row) => ({ + timestamp: row.timestamp, + metric_0: get(row, metric.id, null), + })); + + const timeseries = snapshotRequest.includeTimeseries + ? ({ + id: name, + columns: [ + { name: 'timestamp', type: 'date' }, + { name: 'metric_0', type: 'number' }, + ], + rows: [...metrics], + } as MetricsAPISeries) + : undefined; + + return { + name, + value: getLastValue(metrics), + max: calculateMax(metrics), + avg: calculateAvg(metrics), + timeseries, + }; + }); }; diff --git a/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.test.ts b/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.test.ts index aac5f9e145022..c019fcbfb909e 100644 --- a/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.test.ts +++ b/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.test.ts @@ -8,7 +8,7 @@ import { transformRequestToMetricsAPIRequest } from './transform_request_to_metrics_api_request'; import { ESSearchClient } from '../../../lib/metrics/types'; import { InfraSource } from '../../../lib/sources'; -import { SnapshotRequest } from '../../../../common/http_api'; +import { MetricsAPIRequest, SnapshotRequest } from '../../../../common/http_api'; jest.mock('./create_timerange_with_interval', () => { return { @@ -73,7 +73,7 @@ const snapshotRequest: SnapshotRequest = { includeTimeseries: true, }; -const metricsApiRequest = { +const metricsApiRequest: MetricsAPIRequest = { indexPattern: 'metrics-*,metricbeat-*', timerange: { from: 1605705900000, to: 1605706200000, interval: '60s' }, metrics: [ @@ -111,4 +111,5 @@ const metricsApiRequest = { alignDataToEnd: true, dropPartialBuckets: true, groupBy: ['kubernetes.pod.uid'], + includeTimeseries: true, }; diff --git a/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.ts b/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.ts index c60f8a17c9c04..bc47c7827a311 100644 --- a/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.ts +++ b/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.ts @@ -7,7 +7,7 @@ import { TIMESTAMP_FIELD } from '../../../../common/constants'; import { findInventoryFields, findInventoryModel } from '../../../../common/inventory_models'; -import { MetricsAPIRequest, SnapshotRequest } from '../../../../common/http_api'; +import { MetricsAPIMetric, MetricsAPIRequest, SnapshotRequest } from '../../../../common/http_api'; import { ESSearchClient } from '../../../lib/metrics/types'; import { InfraSource } from '../../../lib/sources'; import { createTimeRangeWithInterval } from './create_timerange_with_interval'; @@ -48,6 +48,7 @@ export const transformRequestToMetricsAPIRequest = async ({ : compositeSize, alignDataToEnd: true, dropPartialBuckets: true, + includeTimeseries: snapshotRequest.includeTimeseries, }; const filters = []; @@ -75,13 +76,24 @@ export const transformRequestToMetricsAPIRequest = async ({ metricsApiRequest.groupBy = [...groupBy, inventoryFields.id]; } - const metaAggregation = { + const topMetricMetrics = [{ field: inventoryFields.name }]; + if (inventoryFields.ip) { + topMetricMetrics.push({ field: inventoryFields.ip }); + } + if (inventoryFields.os) { + topMetricMetrics.push({ field: inventoryFields.os }); + } + if (inventoryFields.cloudProvider) { + topMetricMetrics.push({ field: inventoryFields.cloudProvider }); + } + + const metaAggregation: MetricsAPIMetric = { id: META_KEY, aggregations: { [META_KEY]: { top_metrics: { size: 1, - metrics: [{ field: inventoryFields.name }], + metrics: topMetricMetrics, sort: { [TIMESTAMP_FIELD]: 'desc', }, @@ -90,20 +102,6 @@ export const transformRequestToMetricsAPIRequest = async ({ }, }; - if (inventoryFields.ip) { - metaAggregation.aggregations[META_KEY].top_metrics.metrics.push({ field: inventoryFields.ip }); - } - - if (inventoryFields.os) { - metaAggregation.aggregations[META_KEY].top_metrics.metrics.push({ field: inventoryFields.os }); - } - - if (inventoryFields.cloudProvider) { - metaAggregation.aggregations[META_KEY].top_metrics.metrics.push({ - field: inventoryFields.cloudProvider, - }); - } - metricsApiRequest.metrics.push(metaAggregation); if (filters.length) { diff --git a/x-pack/plugins/lens/public/embeddable/embeddable.tsx b/x-pack/plugins/lens/public/embeddable/embeddable.tsx index 5af66f23d1eb7..637ce344bcaaf 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable.tsx +++ b/x-pack/plugins/lens/public/embeddable/embeddable.tsx @@ -52,8 +52,11 @@ import { ReferenceOrValueEmbeddable, SelfStyledEmbeddable, FilterableEmbeddable, + cellValueTrigger, + CELL_VALUE_TRIGGER, + type CellValueContext, } from '@kbn/embeddable-plugin/public'; -import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; +import type { Action, UiActionsStart } from '@kbn/ui-actions-plugin/public'; import type { DataViewsContract, DataView } from '@kbn/data-views-plugin/public'; import type { Capabilities, @@ -79,6 +82,7 @@ import { DatasourceMap, Datasource, IndexPatternMap, + GetCompatibleCellValueActions, } from '../types'; import { getEditPath, DOC_TYPE } from '../../common'; @@ -732,6 +736,7 @@ export class Embeddable syncTooltips={input.syncTooltips} syncCursor={input.syncCursor} hasCompatibleActions={this.hasCompatibleActions} + getCompatibleCellValueActions={this.getCompatibleCellValueActions} className={input.className} style={input.style} executionContext={this.getExecutionContext()} @@ -779,6 +784,27 @@ export class Embeddable return false; }; + private readonly getCompatibleCellValueActions: GetCompatibleCellValueActions = async (data) => { + const { getTriggerCompatibleActions } = this.deps; + if (getTriggerCompatibleActions) { + const embeddable = this; + const actions: Array> = await getTriggerCompatibleActions( + CELL_VALUE_TRIGGER, + { data, embeddable } + ); + return actions + .sort((a, b) => (a.order ?? Infinity) - (b.order ?? Infinity)) + .map((action) => ({ + id: action.id, + iconType: action.getIconType({ embeddable, data, trigger: cellValueTrigger })!, + displayName: action.getDisplayName({ embeddable, data, trigger: cellValueTrigger }), + execute: (cellData) => + action.execute({ embeddable, data: cellData, trigger: cellValueTrigger }), + })); + } + return []; + }; + /** * Combines the embeddable context with the saved object context, and replaces * any references to index patterns diff --git a/x-pack/plugins/lens/public/embeddable/expression_wrapper.tsx b/x-pack/plugins/lens/public/embeddable/expression_wrapper.tsx index cbb1fedf75497..d5aaf99788ae7 100644 --- a/x-pack/plugins/lens/public/embeddable/expression_wrapper.tsx +++ b/x-pack/plugins/lens/public/embeddable/expression_wrapper.tsx @@ -11,8 +11,8 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { EuiFlexGroup, EuiFlexItem, EuiText, EuiIcon, EuiEmptyPrompt } from '@elastic/eui'; import { ExpressionRendererEvent, - ReactExpressionRendererType, ReactExpressionRendererProps, + ReactExpressionRendererType, } from '@kbn/expressions-plugin/public'; import type { KibanaExecutionContext } from '@kbn/core/public'; import { ExecutionContextSearch } from '@kbn/data-plugin/public'; @@ -41,6 +41,7 @@ export interface ExpressionWrapperProps { syncTooltips?: boolean; syncCursor?: boolean; hasCompatibleActions?: ReactExpressionRendererProps['hasCompatibleActions']; + getCompatibleCellValueActions?: ReactExpressionRendererProps['getCompatibleCellValueActions']; style?: React.CSSProperties; className?: string; canEdit: boolean; @@ -116,6 +117,7 @@ export function ExpressionWrapper({ syncTooltips, syncCursor, hasCompatibleActions, + getCompatibleCellValueActions, style, className, errors, @@ -168,6 +170,7 @@ export function ExpressionWrapper({ }} onEvent={handleEvent} hasCompatibleActions={hasCompatibleActions} + getCompatibleCellValueActions={getCompatibleCellValueActions} /> )} diff --git a/x-pack/plugins/lens/public/index.ts b/x-pack/plugins/lens/public/index.ts index 7a908fb0db4eb..9bda68f5193ab 100644 --- a/x-pack/plugins/lens/public/index.ts +++ b/x-pack/plugins/lens/public/index.ts @@ -107,6 +107,7 @@ export type { LensEmbeddableInput, LensSavedObjectAttributes, Embeddable } from export type { ChartInfo } from './chart_info_api'; export { layerTypes } from '../common/layer_types'; +export { LENS_EMBEDDABLE_TYPE } from '../common/constants'; export type { LensPublicStart, LensPublicSetup } from './plugin'; diff --git a/x-pack/plugins/lens/public/types.ts b/x-pack/plugins/lens/public/types.ts index 4cc0b4c4948fa..f37f0b8369cd8 100644 --- a/x-pack/plugins/lens/public/types.ts +++ b/x-pack/plugins/lens/public/types.ts @@ -13,9 +13,9 @@ import type { MutableRefObject } from 'react'; import type { Filter, TimeRange } from '@kbn/es-query'; import type { ExpressionAstExpression, - ExpressionRendererEvent, IInterpreterRenderHandlers, Datatable, + ExpressionRendererEvent, } from '@kbn/expressions-plugin/public'; import type { Configuration, NavigateToLensContext } from '@kbn/visualizations-plugin/common'; import { Adapters } from '@kbn/inspector-plugin/public'; @@ -35,6 +35,7 @@ import type { EuiButtonIconProps } from '@elastic/eui'; import { SearchRequest } from '@kbn/data-plugin/public'; import { estypes } from '@elastic/elasticsearch'; import React from 'react'; +import { CellValueContext } from '@kbn/embeddable-plugin/public'; import type { DraggingIdentifier, DragDropIdentifier, DragContextState } from './drag_drop'; import type { DateRange, LayerType, SortingHint } from '../common'; import type { @@ -1335,7 +1336,7 @@ export function isLensEditEvent( export function isLensTableRowContextMenuClickEvent( event: ExpressionRendererEvent -): event is BrushTriggerEvent { +): event is LensTableRowContextMenuEvent { return event.name === 'tableRowContextMenuClick'; } @@ -1376,3 +1377,14 @@ export type LensTopNavMenuEntryGenerator = (props: { initialContext?: VisualizeFieldContext | VisualizeEditorContext; currentDoc: Document | undefined; }) => undefined | TopNavMenuData; + +export interface LensCellValueAction { + id: string; + iconType: string; + displayName: string; + execute: (data: CellValueContext['data']) => void; +} + +export type GetCompatibleCellValueActions = ( + data: CellValueContext['data'] +) => Promise; diff --git a/x-pack/plugins/lens/public/visualizations/datatable/components/__snapshots__/table_basic.test.tsx.snap b/x-pack/plugins/lens/public/visualizations/datatable/components/__snapshots__/table_basic.test.tsx.snap index ddce37121dfa4..8c3b9dbf4cf94 100644 --- a/x-pack/plugins/lens/public/visualizations/datatable/components/__snapshots__/table_basic.test.tsx.snap +++ b/x-pack/plugins/lens/public/visualizations/datatable/components/__snapshots__/table_basic.test.tsx.snap @@ -125,7 +125,7 @@ exports[`DatatableComponent it renders actions column when there are row actions "label": "Sort descending", }, }, - "cellActions": undefined, + "cellActions": Array [], "display":
, "displayAsText": "a", "id": "a", + "visibleCellActions": 5, }, Object { "actions": Object { @@ -174,7 +175,7 @@ exports[`DatatableComponent it renders actions column when there are row actions "label": "Sort descending", }, }, - "cellActions": undefined, + "cellActions": Array [], "display":
, "displayAsText": "b", "id": "b", + "visibleCellActions": 5, }, Object { "actions": Object { @@ -223,7 +225,7 @@ exports[`DatatableComponent it renders actions column when there are row actions "label": "Sort descending", }, }, - "cellActions": undefined, + "cellActions": Array [], "display":
, "displayAsText": "c", "id": "c", + "visibleCellActions": 5, }, ] } @@ -400,7 +403,7 @@ exports[`DatatableComponent it renders custom row height if set to another value "label": "Sort descending", }, }, - "cellActions": undefined, + "cellActions": Array [], "display":
, "displayAsText": "a", "id": "a", + "visibleCellActions": 5, }, Object { "actions": Object { @@ -449,7 +453,7 @@ exports[`DatatableComponent it renders custom row height if set to another value "label": "Sort descending", }, }, - "cellActions": undefined, + "cellActions": Array [], "display":
, "displayAsText": "b", "id": "b", + "visibleCellActions": 5, }, Object { "actions": Object { @@ -498,7 +503,7 @@ exports[`DatatableComponent it renders custom row height if set to another value "label": "Sort descending", }, }, - "cellActions": undefined, + "cellActions": Array [], "display":
, "displayAsText": "c", "id": "c", + "visibleCellActions": 5, }, ] } @@ -668,7 +674,7 @@ exports[`DatatableComponent it renders the title and value 1`] = ` "label": "Sort descending", }, }, - "cellActions": undefined, + "cellActions": Array [], "display":
, "displayAsText": "a", "id": "a", + "visibleCellActions": 5, }, Object { "actions": Object { @@ -717,7 +724,7 @@ exports[`DatatableComponent it renders the title and value 1`] = ` "label": "Sort descending", }, }, - "cellActions": undefined, + "cellActions": Array [], "display":
, "displayAsText": "b", "id": "b", + "visibleCellActions": 5, }, Object { "actions": Object { @@ -766,7 +774,7 @@ exports[`DatatableComponent it renders the title and value 1`] = ` "label": "Sort descending", }, }, - "cellActions": undefined, + "cellActions": Array [], "display":
, "displayAsText": "c", "id": "c", + "visibleCellActions": 5, }, ] } @@ -938,7 +947,7 @@ exports[`DatatableComponent it should render hide, reset, and sort actions on he "label": "Sort descending", }, }, - "cellActions": undefined, + "cellActions": Array [], "display":
, "displayAsText": "a", "id": "a", + "visibleCellActions": 5, }, Object { "actions": Object { @@ -987,7 +997,7 @@ exports[`DatatableComponent it should render hide, reset, and sort actions on he "label": "Sort descending", }, }, - "cellActions": undefined, + "cellActions": Array [], "display":
, "displayAsText": "b", "id": "b", + "visibleCellActions": 5, }, Object { "actions": Object { @@ -1036,7 +1047,7 @@ exports[`DatatableComponent it should render hide, reset, and sort actions on he "label": "Sort descending", }, }, - "cellActions": undefined, + "cellActions": Array [], "display":
, "displayAsText": "c", "id": "c", + "visibleCellActions": 5, }, ] } diff --git a/x-pack/plugins/lens/public/visualizations/datatable/components/columns.test.tsx b/x-pack/plugins/lens/public/visualizations/datatable/components/columns.test.tsx new file mode 100644 index 0000000000000..1b4259e4cf63b --- /dev/null +++ b/x-pack/plugins/lens/public/visualizations/datatable/components/columns.test.tsx @@ -0,0 +1,167 @@ +/* + * 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 React from 'react'; +import { EuiDataGridColumnCellAction, EuiDataGridColumnCellActionProps } from '@elastic/eui'; +import type { Datatable } from '@kbn/expressions-plugin/public'; +import { shallow } from 'enzyme'; +import { ReactNode } from 'react'; +import { FormatFactory } from '../../../../common/types'; +import type { LensCellValueAction } from '../../../types'; +import { createGridColumns } from './columns'; + +const table: Datatable = { + type: 'datatable', + columns: [ + { + id: 'a', + name: 'a', + meta: { + type: 'number', + }, + }, + ], + rows: [{ a: 123 }], +}; +const visibleColumns = ['a']; +const cellValueAction: LensCellValueAction = { + displayName: 'Test', + id: 'test', + iconType: 'test-icon', + execute: () => {}, +}; + +type CreateGridColumnsParams = Parameters; +const callCreateGridColumns = ( + params: Partial<{ + bucketColumns: CreateGridColumnsParams[0]; + table: CreateGridColumnsParams[1]; + handleFilterClick: CreateGridColumnsParams[2]; + handleTransposedColumnClick: CreateGridColumnsParams[3]; + isReadOnly: CreateGridColumnsParams[4]; + columnConfig: CreateGridColumnsParams[5]; + visibleColumns: CreateGridColumnsParams[6]; + formatFactory: CreateGridColumnsParams[7]; + onColumnResize: CreateGridColumnsParams[8]; + onColumnHide: CreateGridColumnsParams[9]; + alignments: CreateGridColumnsParams[10]; + headerRowHeight: CreateGridColumnsParams[11]; + headerRowLines: CreateGridColumnsParams[12]; + columnCellValueActions: CreateGridColumnsParams[13]; + closeCellPopover: CreateGridColumnsParams[14]; + columnFilterable: CreateGridColumnsParams[15]; + }> = {} +) => + createGridColumns( + params.bucketColumns ?? [], + params.table ?? table, + params.handleFilterClick, + params.handleTransposedColumnClick, + params.isReadOnly ?? false, + params.columnConfig ?? { columns: [], sortingColumnId: undefined, sortingDirection: 'none' }, + params.visibleColumns ?? visibleColumns, + params.formatFactory ?? (((x: unknown) => ({ convert: () => x })) as unknown as FormatFactory), + params.onColumnResize ?? jest.fn(), + params.onColumnHide ?? jest.fn(), + params.alignments ?? {}, + params.headerRowHeight ?? 'auto', + params.headerRowLines ?? 1, + params.columnCellValueActions ?? [], + params.closeCellPopover ?? jest.fn(), + params.columnFilterable ?? [] + ); + +const renderCellAction = ( + cellActions: EuiDataGridColumnCellAction[] | undefined, + index: number +) => { + if (!cellActions?.[index]) { + return null; + } + const cellAction = (cellActions[index] as (props: EuiDataGridColumnCellActionProps) => ReactNode)( + { + rowIndex: 0, + columnId: 'a', + Component: () => <>, + } as unknown as EuiDataGridColumnCellActionProps + ); + return shallow(
{cellAction}
); +}; + +describe('getContentData', () => { + describe('cellActions', () => { + it('should include filter actions', () => { + const [{ cellActions }] = callCreateGridColumns({ + handleFilterClick: () => {}, + columnFilterable: [true], + }); + expect(cellActions).toHaveLength(2); + }); + + it('should not include filter actions if column not filterable', () => { + const [{ cellActions }] = callCreateGridColumns({ + handleFilterClick: () => {}, + columnFilterable: [false], + }); + expect(cellActions).toHaveLength(0); + }); + + it('should not include filter actions if no filter handler defined', () => { + const [{ cellActions }] = callCreateGridColumns({ + columnFilterable: [true], + }); + expect(cellActions).toHaveLength(0); + }); + + it('should include cell value actions', () => { + const [{ cellActions }] = callCreateGridColumns({ + columnCellValueActions: [[cellValueAction]], + }); + expect(cellActions).toHaveLength(1); + }); + + it('should include all actions', () => { + const [{ cellActions }] = callCreateGridColumns({ + handleFilterClick: () => {}, + columnFilterable: [true], + columnCellValueActions: [[cellValueAction]], + }); + expect(cellActions).toHaveLength(3); + }); + + it('should render filterFor as first action', () => { + const [{ cellActions }] = callCreateGridColumns({ + handleFilterClick: () => {}, + columnFilterable: [true], + columnCellValueActions: [[cellValueAction]], + }); + const wrapper = renderCellAction(cellActions, 0); + expect(wrapper?.find('Component').prop('data-test-subj')).toEqual('lensDatatableFilterFor'); + }); + + it('should render filterOut as second action', () => { + const [{ cellActions }] = callCreateGridColumns({ + handleFilterClick: () => {}, + columnFilterable: [true], + columnCellValueActions: [[cellValueAction]], + }); + const wrapper = renderCellAction(cellActions, 1); + expect(wrapper?.find('Component').prop('data-test-subj')).toEqual('lensDatatableFilterOut'); + }); + + it('should render cellValue actions at the end', () => { + const [{ cellActions }] = callCreateGridColumns({ + handleFilterClick: () => {}, + columnFilterable: [true], + columnCellValueActions: [[cellValueAction]], + }); + const wrapper = renderCellAction(cellActions, 2); + expect(wrapper?.find('Component').prop('data-test-subj')).toEqual( + 'lensDatatableCellAction-test' + ); + }); + }); +}); diff --git a/x-pack/plugins/lens/public/visualizations/datatable/components/columns.tsx b/x-pack/plugins/lens/public/visualizations/datatable/components/columns.tsx index faf2e9d5d826d..f35de7cb83a2e 100644 --- a/x-pack/plugins/lens/public/visualizations/datatable/components/columns.tsx +++ b/x-pack/plugins/lens/public/visualizations/datatable/components/columns.tsx @@ -20,6 +20,7 @@ import type { } from '@kbn/expressions-plugin/common'; import type { FormatFactory } from '../../../../common'; import type { ColumnConfig } from '../../../../common/expressions'; +import { LensCellValueAction } from '../../../types'; export const createGridColumns = ( bucketColumns: string[], @@ -48,6 +49,7 @@ export const createGridColumns = ( alignments: Record, headerRowHeight: 'auto' | 'single' | 'custom', headerRowLines: number, + columnCellValueActions: LensCellValueAction[][] | undefined, closeCellPopover?: Function, columnFilterable?: boolean[] ) => { @@ -77,87 +79,115 @@ export const createGridColumns = ( const columnArgs = columnConfig.columns.find(({ columnId }) => columnId === field); - const cellActions = - filterable && handleFilterClick && !columnArgs?.oneClickFilter - ? [ - ({ rowIndex, columnId, Component }: EuiDataGridColumnCellActionProps) => { - const { rowValue, contentsIsDefined, cellContent } = getContentData({ - rowIndex, - columnId, - }); + const cellActions = []; + if (filterable && handleFilterClick && !columnArgs?.oneClickFilter) { + cellActions.push( + ({ rowIndex, columnId, Component }: EuiDataGridColumnCellActionProps) => { + const { rowValue, contentsIsDefined, cellContent } = getContentData({ + rowIndex, + columnId, + }); - const filterForText = i18n.translate( - 'xpack.lens.table.tableCellFilter.filterForValueText', - { - defaultMessage: 'Filter for value', - } - ); - const filterForAriaLabel = i18n.translate( - 'xpack.lens.table.tableCellFilter.filterForValueAriaLabel', - { - defaultMessage: 'Filter for value: {cellContent}', - values: { - cellContent, - }, - } - ); + const filterForText = i18n.translate( + 'xpack.lens.table.tableCellFilter.filterForValueText', + { + defaultMessage: 'Filter for value', + } + ); + const filterForAriaLabel = i18n.translate( + 'xpack.lens.table.tableCellFilter.filterForValueAriaLabel', + { + defaultMessage: 'Filter for value: {cellContent}', + values: { + cellContent, + }, + } + ); - return ( - contentsIsDefined && ( - { - handleFilterClick(field, rowValue, colIndex, rowIndex); - closeCellPopover?.(); - }} - iconType="plusInCircle" - > - {filterForText} - - ) - ); - }, - ({ rowIndex, columnId, Component }: EuiDataGridColumnCellActionProps) => { - const { rowValue, contentsIsDefined, cellContent } = getContentData({ - rowIndex, - columnId, - }); + return ( + contentsIsDefined && ( + { + handleFilterClick(field, rowValue, colIndex, rowIndex); + closeCellPopover?.(); + }} + iconType="plusInCircle" + > + {filterForText} + + ) + ); + }, + ({ rowIndex, columnId, Component }: EuiDataGridColumnCellActionProps) => { + const { rowValue, contentsIsDefined, cellContent } = getContentData({ + rowIndex, + columnId, + }); + + const filterOutText = i18n.translate( + 'xpack.lens.table.tableCellFilter.filterOutValueText', + { + defaultMessage: 'Filter out value', + } + ); + const filterOutAriaLabel = i18n.translate( + 'xpack.lens.table.tableCellFilter.filterOutValueAriaLabel', + { + defaultMessage: 'Filter out value: {cellContent}', + values: { + cellContent, + }, + } + ); - const filterOutText = i18n.translate( - 'xpack.lens.table.tableCellFilter.filterOutValueText', - { - defaultMessage: 'Filter out value', - } - ); - const filterOutAriaLabel = i18n.translate( - 'xpack.lens.table.tableCellFilter.filterOutValueAriaLabel', - { - defaultMessage: 'Filter out value: {cellContent}', - values: { - cellContent, - }, - } - ); + return ( + contentsIsDefined && ( + { + handleFilterClick(field, rowValue, colIndex, rowIndex, true); + closeCellPopover?.(); + }} + iconType="minusInCircle" + > + {filterOutText} + + ) + ); + } + ); + } - return ( - contentsIsDefined && ( - { - handleFilterClick(field, rowValue, colIndex, rowIndex, true); - closeCellPopover?.(); - }} - iconType="minusInCircle" - > - {filterOutText} - - ) - ); - }, - ] - : undefined; + // Add all the column compatible cell actions + const compatibleCellActions = columnCellValueActions?.[colIndex] ?? []; + compatibleCellActions.forEach((action) => { + cellActions.push(({ rowIndex, columnId, Component }: EuiDataGridColumnCellActionProps) => { + const rowValue = table.rows[rowIndex][columnId]; + const columnMeta = columnsReverseLookup[columnId].meta; + const data = { + value: rowValue, + columnMeta, + }; + return ( + rowValue != null && ( + { + action.execute([data]); + closeCellPopover?.(); + }} + iconType={action.iconType} + > + {action.displayName} + + ) + ); + }); + }); const isTransposed = Boolean(columnArgs?.originalColumnId); const initialWidth = columnArgs?.width; @@ -235,6 +265,7 @@ export const createGridColumns = ( const columnDefinition: EuiDataGridColumn = { id: field, cellActions, + visibleCellActions: 5, display:
{name}
, displayAsText: name, actions: { diff --git a/x-pack/plugins/lens/public/visualizations/datatable/components/table_basic.tsx b/x-pack/plugins/lens/public/visualizations/datatable/components/table_basic.tsx index 4b8f8067e974e..29f28a03438bc 100644 --- a/x-pack/plugins/lens/public/visualizations/datatable/components/table_basic.tsx +++ b/x-pack/plugins/lens/public/visualizations/datatable/components/table_basic.tsx @@ -202,6 +202,11 @@ export const DatatableComponent = (props: DatatableRenderProps) => { [firstTableRef, onClickValue, isInteractive] ); + const columnCellValueActions = useMemo( + () => (isInteractive ? props.columnCellValueActions : undefined), + [props.columnCellValueActions, isInteractive] + ); + const handleTransposedColumnClick = useMemo( () => isInteractive @@ -310,6 +315,7 @@ export const DatatableComponent = (props: DatatableRenderProps) => { alignments, headerRowHeight, headerRowLines, + columnCellValueActions, dataGridRef.current?.closeCellPopover, props.columnFilterable ), @@ -327,6 +333,7 @@ export const DatatableComponent = (props: DatatableRenderProps) => { alignments, headerRowHeight, headerRowLines, + columnCellValueActions, props.columnFilterable, ] ); diff --git a/x-pack/plugins/lens/public/visualizations/datatable/components/types.ts b/x-pack/plugins/lens/public/visualizations/datatable/components/types.ts index ec2b687690dd9..97fe88d2e9b2f 100644 --- a/x-pack/plugins/lens/public/visualizations/datatable/components/types.ts +++ b/x-pack/plugins/lens/public/visualizations/datatable/components/types.ts @@ -10,7 +10,11 @@ import type { PaletteRegistry } from '@kbn/coloring'; import { CustomPaletteState } from '@kbn/charts-plugin/public'; import type { IAggType } from '@kbn/data-plugin/public'; import type { Datatable, RenderMode } from '@kbn/expressions-plugin/common'; -import type { ILensInterpreterRenderHandlers, LensEditEvent } from '../../../types'; +import type { + ILensInterpreterRenderHandlers, + LensCellValueAction, + LensEditEvent, +} from '../../../types'; import { LENS_EDIT_SORT_ACTION, LENS_EDIT_RESIZE_ACTION, @@ -58,6 +62,11 @@ export type DatatableRenderProps = DatatableProps & { * ROW_CLICK_TRIGGER actions attached to it, otherwise false. */ rowHasRowClickTriggerActions?: boolean[]; + /** + * Array of LensCellValueAction to be rendered on each column by id + * uses CELL_VALUE_TRIGGER actions attached. + */ + columnCellValueActions?: LensCellValueAction[][]; columnFilterable?: boolean[]; }; diff --git a/x-pack/plugins/lens/public/visualizations/datatable/expression.test.tsx b/x-pack/plugins/lens/public/visualizations/datatable/expression.test.tsx index eb3835f95b6aa..57e64982b4420 100644 --- a/x-pack/plugins/lens/public/visualizations/datatable/expression.test.tsx +++ b/x-pack/plugins/lens/public/visualizations/datatable/expression.test.tsx @@ -4,13 +4,20 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - -import type { DatatableProps } from '../../../common/expressions'; import { createMockExecutionContext } from '@kbn/expressions-plugin/common/mocks'; +import type { DatatableProps } from '../../../common/expressions'; import type { FormatFactory } from '../../../common'; import { getDatatable } from '../../../common/expressions'; +import { getColumnCellValueActions } from './expression'; import type { Datatable } from '@kbn/expressions-plugin/common'; +import { LensCellValueAction } from '../../types'; +const cellValueAction: LensCellValueAction = { + displayName: 'Test', + id: 'test', + iconType: 'test-icon', + execute: () => {}, +}; function sampleArgs() { const indexPatternId = 'indexPatternId'; const data: Datatable = { @@ -93,4 +100,26 @@ describe('datatable_expression', () => { }); }); }); + + describe('getColumnCellValueActions', () => { + it('should return column cell value actions', async () => { + const config = sampleArgs(); + const result = await getColumnCellValueActions(config, async () => [cellValueAction]); + expect(result).toEqual([[cellValueAction], [cellValueAction], [cellValueAction]]); + }); + + it('should return empty actions if no data passed', async () => { + const result = await getColumnCellValueActions( + { data: null } as unknown as DatatableProps, + async () => [cellValueAction] + ); + expect(result).toEqual([]); + }); + + it('should return empty actions if no getCompatibleCellValueActions handler passed', async () => { + const config = sampleArgs(); + const result = await getColumnCellValueActions(config, undefined); + expect(result).toEqual([]); + }); + }); }); diff --git a/x-pack/plugins/lens/public/visualizations/datatable/expression.tsx b/x-pack/plugins/lens/public/visualizations/datatable/expression.tsx index 32fb293647620..c8cd7da4c0bc3 100644 --- a/x-pack/plugins/lens/public/visualizations/datatable/expression.tsx +++ b/x-pack/plugins/lens/public/visualizations/datatable/expression.tsx @@ -21,11 +21,15 @@ import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import { trackUiCounterEvents } from '../../lens_ui_telemetry'; import { DatatableComponent } from './components/table_basic'; -import type { ILensInterpreterRenderHandlers } from '../../types'; +import type { + GetCompatibleCellValueActions, + ILensInterpreterRenderHandlers, + LensCellValueAction, +} from '../../types'; import type { FormatFactory } from '../../../common'; import type { DatatableProps } from '../../../common/expressions'; -async function columnsFilterable(table: Datatable, handlers: IInterpreterRenderHandlers) { +async function getColumnsFilterable(table: Datatable, handlers: IInterpreterRenderHandlers) { if (!table.rows.length) { return; } @@ -49,6 +53,27 @@ async function columnsFilterable(table: Datatable, handlers: IInterpreterRenderH ); } +/** + * Retrieves the compatible CELL_VALUE_TRIGGER actions indexed by column + **/ +export async function getColumnCellValueActions( + config: DatatableProps, + getCompatibleCellValueActions?: ILensInterpreterRenderHandlers['getCompatibleCellValueActions'] +): Promise { + if (!config.data || !getCompatibleCellValueActions) { + return []; + } + return Promise.all( + config.data.columns.map(({ meta: columnMeta }) => { + try { + return (getCompatibleCellValueActions as GetCompatibleCellValueActions)([{ columnMeta }]); + } catch { + return []; + } + }) + ); +} + export const getDatatableRenderer = (dependencies: { formatFactory: FormatFactory; getType: Promise<(name: string) => IAggType>; @@ -71,7 +96,7 @@ export const getDatatableRenderer = (dependencies: { handlers.onDestroy(() => ReactDOM.unmountComponentAtNode(domNode)); const resolvedGetType = await dependencies.getType; - const { hasCompatibleActions, isInteractive } = handlers; + const { hasCompatibleActions, isInteractive, getCompatibleCellValueActions } = handlers; const renderComplete = () => { trackUiCounterEvents('table', handlers.getExecutionContext()); @@ -104,6 +129,11 @@ export const getDatatableRenderer = (dependencies: { } } + const [columnCellValueActions, columnsFilterable] = await Promise.all([ + getColumnCellValueActions(config, getCompatibleCellValueActions), + getColumnsFilterable(config.data, handlers), + ]); + ReactDOM.render( @@ -115,7 +145,8 @@ export const getDatatableRenderer = (dependencies: { paletteService={dependencies.paletteService} getType={resolvedGetType} rowHasRowClickTriggerActions={rowHasRowClickTriggerActions} - columnFilterable={await columnsFilterable(config.data, handlers)} + columnCellValueActions={columnCellValueActions} + columnFilterable={columnsFilterable} interactive={isInteractive()} uiSettings={dependencies.uiSettings} renderComplete={renderComplete} diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_high_count_logon_events.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_high_count_logon_events.json index fa87299dfb464..65f3bf5966bbd 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_high_count_logon_events.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_high_count_logon_events.json @@ -25,6 +25,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-security-auth" + "created_by": "ml-module-security-auth", + "security_app_display_name": "Spike in Logon Events" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_high_count_logon_events_for_a_source_ip.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_high_count_logon_events_for_a_source_ip.json index 9f2f10973a35b..22594cbacc48b 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_high_count_logon_events_for_a_source_ip.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_high_count_logon_events_for_a_source_ip.json @@ -30,6 +30,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-security-auth" + "created_by": "ml-module-security-auth", + "security_app_display_name": "Spike in Logon Events from a Source IP" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_high_count_logon_fails.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_high_count_logon_fails.json index c74dff5257864..d335f7b0128fa 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_high_count_logon_fails.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_high_count_logon_fails.json @@ -25,6 +25,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-security-auth" + "created_by": "ml-module-security-auth", + "security_app_display_name": "Spike in Failed Logon Events" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_rare_hour_for_a_user.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_rare_hour_for_a_user.json index bb86d256e59df..afe905a02283f 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_rare_hour_for_a_user.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_rare_hour_for_a_user.json @@ -28,6 +28,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-security-auth" + "created_by": "ml-module-security-auth", + "security_app_display_name": "Unusual Hour for a User to Logon" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_rare_source_ip_for_a_user.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_rare_source_ip_for_a_user.json index 6f72e148fa38e..7d4e9e022915d 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_rare_source_ip_for_a_user.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_rare_source_ip_for_a_user.json @@ -29,6 +29,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-security-auth" + "created_by": "ml-module-security-auth", + "security_app_display_name": "Unusual Source IP for a User to Logon from" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_rare_user.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_rare_user.json index 5cb9c7112b29d..5f31cc6aaa435 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_rare_user.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/auth_rare_user.json @@ -28,6 +28,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-security-auth" + "created_by": "ml-module-security-auth", + "security_app_display_name": "Rare User Logon" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/suspicious_login_activity.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/suspicious_login_activity.json index d2ecf4df624fc..f96537b85e988 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/suspicious_login_activity.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_auth/ml/suspicious_login_activity.json @@ -30,7 +30,8 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-siem-auditbeat", + "created_by": "ml-module-security-auth", + "security_app_display_name": "Unusual Login Activity", "custom_urls": [ { "url_name": "IP Address Details", diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/logo.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/logo.json similarity index 100% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/logo.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/logo.json diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/manifest.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/manifest.json similarity index 98% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/manifest.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/manifest.json index 1d9f778f17150..93797b9e3e758 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/manifest.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/manifest.json @@ -1,5 +1,5 @@ { - "id": "siem_cloudtrail", + "id": "security_cloudtrail", "title": "Security: Cloudtrail", "description": "Detect suspicious activity recorded in your cloudtrail logs.", "type": "Filebeat data", diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/datafeed_high_distinct_count_error_message.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/datafeed_high_distinct_count_error_message.json similarity index 100% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/datafeed_high_distinct_count_error_message.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/datafeed_high_distinct_count_error_message.json diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/datafeed_rare_error_code.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/datafeed_rare_error_code.json similarity index 100% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/datafeed_rare_error_code.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/datafeed_rare_error_code.json diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/datafeed_rare_method_for_a_city.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/datafeed_rare_method_for_a_city.json similarity index 100% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/datafeed_rare_method_for_a_city.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/datafeed_rare_method_for_a_city.json diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/datafeed_rare_method_for_a_country.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/datafeed_rare_method_for_a_country.json similarity index 100% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/datafeed_rare_method_for_a_country.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/datafeed_rare_method_for_a_country.json diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/datafeed_rare_method_for_a_username.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/datafeed_rare_method_for_a_username.json similarity index 100% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/datafeed_rare_method_for_a_username.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/datafeed_rare_method_for_a_username.json diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/high_distinct_count_error_message.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/high_distinct_count_error_message.json similarity index 90% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/high_distinct_count_error_message.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/high_distinct_count_error_message.json index b4294227c49d5..59dc155b96d33 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/high_distinct_count_error_message.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/high_distinct_count_error_message.json @@ -29,6 +29,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-siem-cloudtrail" + "created_by": "ml-module-security-cloudtrail", + "security_app_display_name": "Spike in AWS Error Messages" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/rare_error_code.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/rare_error_code.json similarity index 90% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/rare_error_code.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/rare_error_code.json index 0227483f262a4..7c62eb4d8905e 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/rare_error_code.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/rare_error_code.json @@ -28,6 +28,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-siem-cloudtrail" + "created_by": "ml-module-security-cloudtrail", + "security_app_display_name": "Rare AWS Error Code" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/rare_method_for_a_city.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/rare_method_for_a_city.json similarity index 88% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/rare_method_for_a_city.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/rare_method_for_a_city.json index 228ad07d43532..1d220f4c87b5e 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/rare_method_for_a_city.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/rare_method_for_a_city.json @@ -29,6 +29,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-siem-cloudtrail" + "created_by": "ml-module-security-cloudtrail", + "security_app_display_name": "Unusual City for an AWS Command" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/rare_method_for_a_country.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/rare_method_for_a_country.json similarity index 88% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/rare_method_for_a_country.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/rare_method_for_a_country.json index fdba3ff12945c..cd772b49ae2e7 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/rare_method_for_a_country.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/rare_method_for_a_country.json @@ -29,6 +29,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-siem-cloudtrail" + "created_by": "ml-module-security-cloudtrail", + "security_app_display_name": "Unusual Country for an AWS Command" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/rare_method_for_a_username.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/rare_method_for_a_username.json similarity index 89% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/rare_method_for_a_username.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/rare_method_for_a_username.json index ea39a889a783e..36ff1d0cfb83d 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_cloudtrail/ml/rare_method_for_a_username.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_cloudtrail/ml/rare_method_for_a_username.json @@ -29,6 +29,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-siem-cloudtrail" + "created_by": "ml-module-security-cloudtrail", + "security_app_display_name": "Unusual AWS Command for a User" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_network_activity.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_network_activity.json index a9a77ae1e9408..9c3dfc3f59e94 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_network_activity.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_network_activity.json @@ -32,14 +32,14 @@ "time_field": "@timestamp" }, "custom_settings": { - "custom_settings": { "job_tags": { "euid": "4004", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, + }, + "created_by": "ml-module-security-linux-v3", "custom_urls": [ { "url_name": "Host Details by process name", @@ -57,7 +57,7 @@ "url_name": "Hosts Overview by user name", "url_value": "siem#/ml-hosts?_g=()&kqlQuery=(filterQuery:(expression:'user.name%20:%20%22$user.name$%22',kind:kuery),queryLocation:hosts.page,type:page)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Linux Network Activity" } } -} diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_network_port_activity.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_network_port_activity.json index 905e3f09a504d..945b99b1bb651 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_network_port_activity.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_network_port_activity.json @@ -57,6 +57,7 @@ "url_name": "Hosts Overview by user name", "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Linux Network Port Activity" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_process_all_hosts.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_process_all_hosts.json index 90b5ce73d6aef..ececcb0b9d0ad 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_process_all_hosts.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_process_all_hosts.json @@ -42,7 +42,7 @@ "version": "3", "updated_date": "5/16/2022" }, - "created_by": "ml-module-security-linux", + "created_by": "ml-module-security-linux-v3", "custom_urls": [ { "url_name": "Host Details by process name", @@ -60,6 +60,7 @@ "url_name": "Hosts Overview by user name", "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Anomalous Process for a Linux Population" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_user_name.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_user_name.json index a362818c8086f..7bbacf6d0999b 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_user_name.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_anomalous_user_name.json @@ -41,7 +41,7 @@ "version": "3", "updated_date": "5/16/2022" }, - "created_by": "ml-module-security-linux", + "created_by": "ml-module-security-linux-v3", "custom_urls": [ { "url_name": "Host Details by process name", @@ -59,6 +59,7 @@ "url_name": "Hosts Overview by user name", "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Linux Username" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_network_configuration_discovery.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_network_configuration_discovery.json index 73b677acad1f9..e04140a850b5b 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_network_configuration_discovery.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_network_configuration_discovery.json @@ -1,62 +1,63 @@ { - "job_type": "anomaly_detector", - "description": "Security: Linux - Looks for commands related to system network configuration discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used by a threat actor to engage in system network configuration discovery to increase their understanding of connected networks and hosts. This information may be used to shape follow-up behaviors such as lateral movement or additional discovery.", - "groups": [ - "security", - "auditbeat", - "endpoint", - "linux", - "process" + "job_type": "anomaly_detector", + "description": "Security: Linux - Looks for commands related to system network configuration discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used by a threat actor to engage in system network configuration discovery to increase their understanding of connected networks and hosts. This information may be used to shape follow-up behaviors such as lateral movement or additional discovery.", + "groups": [ + "security", + "auditbeat", + "endpoint", + "linux", + "process" + ], + "analysis_config": { + "bucket_span": "15m", + "detectors": [ + { + "detector_description": "Detects rare user.name values.", + "function": "rare", + "by_field_name": "user.name" + } ], - "analysis_config": { - "bucket_span": "15m", - "detectors": [ - { - "detector_description": "Detects rare user.name values.", - "function": "rare", - "by_field_name": "user.name" - } - ], - "influencers": [ - "process.name", - "host.name", - "process.args", - "user.name" - ] - }, - "allow_lazy_open": true, - "analysis_limits": { - "model_memory_limit": "64mb" - }, - "data_description": { - "time_field": "@timestamp" - }, - "custom_settings": { + "influencers": [ + "process.name", + "host.name", + "process.args", + "user.name" + ] + }, + "allow_lazy_open": true, + "analysis_limits": { + "model_memory_limit": "64mb" + }, + "data_description": { + "time_field": "@timestamp" + }, + "custom_settings": { "job_tags": { "euid": "40012", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-linux-v3", - "custom_urls": [ - { - "url_name": "Host Details by process name", - "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Host Details by user name", - "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Hosts Overview by process name", - "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Hosts Overview by user name", - "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - } - ] - } + }, + "created_by": "ml-module-security-linux-v3", + "custom_urls": [ + { + "url_name": "Host Details by process name", + "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Host Details by user name", + "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Hosts Overview by process name", + "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Hosts Overview by user name", + "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + } + ], + "security_app_display_name": "Unusual Linux System Network Configuration Discovery" + } } \ No newline at end of file diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_network_connection_discovery.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_network_connection_discovery.json index 92d678d39a445..0975d1139828b 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_network_connection_discovery.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_network_connection_discovery.json @@ -1,62 +1,63 @@ { - "job_type": "anomaly_detector", - "description": "Security: Linux - Looks for commands related to system network connection discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used by a threat actor to engage in system network connection discovery to increase their understanding of connected services and systems. This information may be used to shape follow-up behaviors such as lateral movement or additional discovery.", - "groups": [ - "security", - "auditbeat", - "endpoint", - "linux", - "process" + "job_type": "anomaly_detector", + "description": "Security: Linux - Looks for commands related to system network connection discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used by a threat actor to engage in system network connection discovery to increase their understanding of connected services and systems. This information may be used to shape follow-up behaviors such as lateral movement or additional discovery.", + "groups": [ + "security", + "auditbeat", + "endpoint", + "linux", + "process" + ], + "analysis_config": { + "bucket_span": "15m", + "detectors": [ + { + "detector_description": "Detects rare user.name values.", + "function": "rare", + "by_field_name": "user.name" + } ], - "analysis_config": { - "bucket_span": "15m", - "detectors": [ - { - "detector_description": "Detects rare user.name values.", - "function": "rare", - "by_field_name": "user.name" - } - ], - "influencers": [ - "process.name", - "host.name", - "process.args", - "user.name" - ] - }, - "allow_lazy_open": true, - "analysis_limits": { - "model_memory_limit": "64mb" - }, - "data_description": { - "time_field": "@timestamp" - }, - "custom_settings": { + "influencers": [ + "process.name", + "host.name", + "process.args", + "user.name" + ] + }, + "allow_lazy_open": true, + "analysis_limits": { + "model_memory_limit": "64mb" + }, + "data_description": { + "time_field": "@timestamp" + }, + "custom_settings": { "job_tags": { "euid": "4013", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-linux-v3", - "custom_urls": [ - { - "url_name": "Host Details by process name", - "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Host Details by user name", - "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Hosts Overview by process name", - "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Hosts Overview by user name", - "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - } - ] - } + }, + "created_by": "ml-module-security-linux-v3", + "custom_urls": [ + { + "url_name": "Host Details by process name", + "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Host Details by user name", + "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Hosts Overview by process name", + "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Hosts Overview by user name", + "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + } + ], + "security_app_display_name": "Unusual Linux Network Connection Discovery" + } } \ No newline at end of file diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_metadata_process.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_metadata_process.json index 95d6a8eac5115..00a2bde273f9f 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_metadata_process.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_metadata_process.json @@ -40,6 +40,8 @@ "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-linux" } + }, + "created_by": "ml-module-security-linux-v3", + "security_app_display_name": "Unusual Linux Process Calling the Metadata Service" + } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_metadata_user.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_metadata_user.json index 36c34f0f716b3..0320ec9412311 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_metadata_user.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_metadata_user.json @@ -39,7 +39,8 @@ "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-linux" + }, + "created_by": "ml-module-security-linux-v3", + "security_app_display_name": "Unusual Linux User Calling the Metadata Service" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_sudo_user.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_sudo_user.json index 4b1393b236f29..6f403653ab726 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_sudo_user.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_sudo_user.json @@ -1,62 +1,63 @@ { - "job_type": "anomaly_detector", - "description": "Security: Linux - Looks for sudo activity from an unusual user context. Unusual user context changes can be due to privilege escalation.", - "groups": [ - "security", - "auditbeat", - "endpoint", - "linux", - "process" + "job_type": "anomaly_detector", + "description": "Security: Linux - Looks for sudo activity from an unusual user context. Unusual user context changes can be due to privilege escalation.", + "groups": [ + "security", + "auditbeat", + "endpoint", + "linux", + "process" + ], + "analysis_config": { + "bucket_span": "15m", + "detectors": [ + { + "detector_description": "Detects rare user.name values.", + "function": "rare", + "by_field_name": "user.name" + } ], - "analysis_config": { - "bucket_span": "15m", - "detectors": [ - { - "detector_description": "Detects rare user.name values.", - "function": "rare", - "by_field_name": "user.name" - } - ], - "influencers": [ - "process.name", - "host.name", - "process.args", - "user.name" - ] - }, - "allow_lazy_open": true, - "analysis_limits": { - "model_memory_limit": "32mb" - }, - "data_description": { - "time_field": "@timestamp" - }, - "custom_settings": { + "influencers": [ + "process.name", + "host.name", + "process.args", + "user.name" + ] + }, + "allow_lazy_open": true, + "analysis_limits": { + "model_memory_limit": "32mb" + }, + "data_description": { + "time_field": "@timestamp" + }, + "custom_settings": { "job_tags": { "euid": "4017", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-linux-v3", - "custom_urls": [ - { - "url_name": "Host Details by process name", - "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Host Details by user name", - "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Hosts Overview by process name", - "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Hosts Overview by user name", - "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - } - ] - } + }, + "created_by": "ml-module-security-linux-v3", + "custom_urls": [ + { + "url_name": "Host Details by process name", + "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Host Details by user name", + "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Hosts Overview by process name", + "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Hosts Overview by user name", + "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + } + ], + "security_app_display_name": "Unusual Sudo Activity" + } } \ No newline at end of file diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_user_compiler.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_user_compiler.json index d977d82b697f0..4f5e47bd26d28 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_user_compiler.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_rare_user_compiler.json @@ -1,54 +1,55 @@ { - "job_type": "anomaly_detector", - "description": "Security: Linux - Looks for compiler activity by a user context which does not normally run compilers. This can be ad-hoc software changes or unauthorized software deployment. This can also be due to local privilege elevation via locally run exploits or malware activity.", - "groups": [ - "security", - "auditbeat", - "endpoint", - "linux", - "process" + "job_type": "anomaly_detector", + "description": "Security: Linux - Looks for compiler activity by a user context which does not normally run compilers. This can be ad-hoc software changes or unauthorized software deployment. This can also be due to local privilege elevation via locally run exploits or malware activity.", + "groups": [ + "security", + "auditbeat", + "endpoint", + "linux", + "process" + ], + "analysis_config": { + "bucket_span": "15m", + "detectors": [ + { + "detector_description": "Detects rare user.name values.", + "function": "rare", + "by_field_name": "user.name" + } ], - "analysis_config": { - "bucket_span": "15m", - "detectors": [ - { - "detector_description": "Detects rare user.name values.", - "function": "rare", - "by_field_name": "user.name" - } - ], - "influencers": [ - "process.title", - "host.name", - "process.working_directory", - "user.name" - ] - }, - "allow_lazy_open": true, - "analysis_limits": { - "model_memory_limit": "256mb" - }, - "data_description": { - "time_field": "@timestamp" - }, - "custom_settings": { + "influencers": [ + "process.title", + "host.name", + "process.working_directory", + "user.name" + ] + }, + "allow_lazy_open": true, + "analysis_limits": { + "model_memory_limit": "256mb" + }, + "data_description": { + "time_field": "@timestamp" + }, + "custom_settings": { "job_tags": { "euid": "4018", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-linux-v3", - "custom_urls": [ - { - "url_name": "Host Details by user name", - "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Hosts Overview by user name", - "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - } - ] - } + }, + "created_by": "ml-module-security-linux-v3", + "custom_urls": [ + { + "url_name": "Host Details by user name", + "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Hosts Overview by user name", + "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + } + ], + "security_app_display_name": "Anomalous Linux Compiler Activity" + } } \ No newline at end of file diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_system_information_discovery.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_system_information_discovery.json index 606047ce639a5..32ee1c4342d64 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_system_information_discovery.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_system_information_discovery.json @@ -1,62 +1,63 @@ { - "job_type": "anomaly_detector", - "description": "Security: Linux - Looks for commands related to system information discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used to engage in system information discovery to gather detailed information about system configuration and software versions. This may be a precursor to the selection of a persistence mechanism or a method of privilege elevation.", - "groups": [ - "security", - "auditbeat", - "endpoint", - "linux", - "process" + "job_type": "anomaly_detector", + "description": "Security: Linux - Looks for commands related to system information discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used to engage in system information discovery to gather detailed information about system configuration and software versions. This may be a precursor to the selection of a persistence mechanism or a method of privilege elevation.", + "groups": [ + "security", + "auditbeat", + "endpoint", + "linux", + "process" + ], + "analysis_config": { + "bucket_span": "15m", + "detectors": [ + { + "detector_description": "Detects rare user.name values.", + "function": "rare", + "by_field_name": "user.name" + } ], - "analysis_config": { - "bucket_span": "15m", - "detectors": [ - { - "detector_description": "Detects rare user.name values.", - "function": "rare", - "by_field_name": "user.name" - } - ], - "influencers": [ - "process.name", - "host.name", - "process.args", - "user.name" - ] - }, - "allow_lazy_open": true, - "analysis_limits": { - "model_memory_limit": "16mb" - }, - "data_description": { - "time_field": "@timestamp" - }, - "custom_settings": { + "influencers": [ + "process.name", + "host.name", + "process.args", + "user.name" + ] + }, + "allow_lazy_open": true, + "analysis_limits": { + "model_memory_limit": "16mb" + }, + "data_description": { + "time_field": "@timestamp" + }, + "custom_settings": { "job_tags": { "euid": "4014", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-linux-v3", - "custom_urls": [ - { - "url_name": "Host Details by process name", - "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Host Details by user name", - "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Hosts Overview by process name", - "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Hosts Overview by user name", - "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - } - ] - } + }, + "created_by": "ml-module-security-linux-v3", + "custom_urls": [ + { + "url_name": "Host Details by process name", + "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Host Details by user name", + "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Hosts Overview by process name", + "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Hosts Overview by user name", + "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + } + ], + "security_app_display_name": "Unusual Linux System Information Discovery Activity" + } } \ No newline at end of file diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_system_process_discovery.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_system_process_discovery.json index 273a7791b2c1f..1451416dc0cbd 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_system_process_discovery.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_system_process_discovery.json @@ -1,62 +1,63 @@ { - "job_type": "anomaly_detector", - "description": "Security: Linux - Looks for commands related to system process discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used to engage in system process discovery to increase their understanding of software applications running on a target host or network. This may be a precursor to the selection of a persistence mechanism or a method of privilege elevation.", - "groups": [ - "security", - "auditbeat", - "endpoint", - "linux", - "process" + "job_type": "anomaly_detector", + "description": "Security: Linux - Looks for commands related to system process discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used to engage in system process discovery to increase their understanding of software applications running on a target host or network. This may be a precursor to the selection of a persistence mechanism or a method of privilege elevation.", + "groups": [ + "security", + "auditbeat", + "endpoint", + "linux", + "process" + ], + "analysis_config": { + "bucket_span": "15m", + "detectors": [ + { + "detector_description": "Detects rare user.name values.", + "function": "rare", + "by_field_name": "user.name" + } ], - "analysis_config": { - "bucket_span": "15m", - "detectors": [ - { - "detector_description": "Detects rare user.name values.", - "function": "rare", - "by_field_name": "user.name" - } - ], - "influencers": [ - "process.name", - "host.name", - "process.args", - "user.name" - ] - }, - "allow_lazy_open": true, - "analysis_limits": { - "model_memory_limit": "16mb" - }, - "data_description": { - "time_field": "@timestamp" - }, - "custom_settings": { + "influencers": [ + "process.name", + "host.name", + "process.args", + "user.name" + ] + }, + "allow_lazy_open": true, + "analysis_limits": { + "model_memory_limit": "16mb" + }, + "data_description": { + "time_field": "@timestamp" + }, + "custom_settings": { "job_tags": { "euid": "4015", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-linux-v3", - "custom_urls": [ - { - "url_name": "Host Details by process name", - "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Host Details by user name", - "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Hosts Overview by process name", - "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Hosts Overview by user name", - "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - } - ] - } - } \ No newline at end of file + }, + "created_by": "ml-module-security-linux-v3", + "custom_urls": [ + { + "url_name": "Host Details by process name", + "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Host Details by user name", + "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Hosts Overview by process name", + "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Hosts Overview by user name", + "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + } + ], + "security_app_display_name": "Unusual Linux Process Discovery Activity" + } +} \ No newline at end of file diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_system_user_discovery.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_system_user_discovery.json index 6d7d5163db9e7..22485ed6071ca 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_system_user_discovery.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_linux_system_user_discovery.json @@ -1,62 +1,63 @@ { - "job_type": "anomaly_detector", - "description": "Security: Linux - Looks for commands related to system user or owner discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used to engage in system owner or user discovery to identify currently active or primary users of a system. This may be a precursor to additional discovery, credential dumping, or privilege elevation activity.", - "groups": [ - "security", - "auditbeat", - "endpoint", - "linux", - "process" + "job_type": "anomaly_detector", + "description": "Security: Linux - Looks for commands related to system user or owner discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used to engage in system owner or user discovery to identify currently active or primary users of a system. This may be a precursor to additional discovery, credential dumping, or privilege elevation activity.", + "groups": [ + "security", + "auditbeat", + "endpoint", + "linux", + "process" + ], + "analysis_config": { + "bucket_span": "15m", + "detectors": [ + { + "detector_description": "Detects rare user.name values.", + "function": "rare", + "by_field_name": "user.name" + } ], - "analysis_config": { - "bucket_span": "15m", - "detectors": [ - { - "detector_description": "Detects rare user.name values.", - "function": "rare", - "by_field_name": "user.name" - } - ], - "influencers": [ - "process.name", - "host.name", - "process.args", - "user.name" - ] - }, - "allow_lazy_open": true, - "analysis_limits": { - "model_memory_limit": "16mb" - }, - "data_description": { - "time_field": "@timestamp" - }, - "custom_settings": { + "influencers": [ + "process.name", + "host.name", + "process.args", + "user.name" + ] + }, + "allow_lazy_open": true, + "analysis_limits": { + "model_memory_limit": "16mb" + }, + "data_description": { + "time_field": "@timestamp" + }, + "custom_settings": { "job_tags": { "euid": "4016", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-linux-v3", - "custom_urls": [ - { - "url_name": "Host Details by process name", - "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Host Details by user name", - "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Hosts Overview by process name", - "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - }, - { - "url_name": "Hosts Overview by user name", - "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" - } - ] - } + }, + "created_by": "ml-module-security-linux-v3", + "custom_urls": [ + { + "url_name": "Host Details by process name", + "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Host Details by user name", + "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Hosts Overview by process name", + "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'process.name%20:%20%22$process.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + }, + { + "url_name": "Hosts Overview by user name", + "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" + } + ], + "security_app_display_name": "Unusual Linux System Owner or User Discovery Activity" } +} diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_rare_process_by_host_linux.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_rare_process_by_host_linux.json index cabbaa3b7390f..b36913d68e626 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_rare_process_by_host_linux.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_linux/ml/v3_rare_process_by_host_linux.json @@ -41,8 +41,8 @@ "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-linux", + }, + "created_by": "ml-module-security-linux-v3", "custom_urls": [ { "url_name": "Host Details by process name", @@ -60,6 +60,7 @@ "url_name": "Hosts Overview by user name", "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Process for a Linux Host" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/high_count_by_destination_country.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/high_count_by_destination_country.json index 45375ad939f36..653001a453452 100755 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/high_count_by_destination_country.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/high_count_by_destination_country.json @@ -31,6 +31,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-security-network" + "created_by": "ml-module-security-network", + "security_app_display_name": "Spike in Network Traffic to a Country" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/high_count_network_denies.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/high_count_network_denies.json index 45c22599f37d2..5b1600d124546 100755 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/high_count_network_denies.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/high_count_network_denies.json @@ -30,6 +30,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-security-network" + "created_by": "ml-module-security-network", + "security_app_display_name": "Spike in Firewall Denies" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/high_count_network_events.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/high_count_network_events.json index a3bb734ad9bdc..7c0a5d9537cb1 100755 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/high_count_network_events.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/high_count_network_events.json @@ -30,6 +30,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-security-network" + "created_by": "ml-module-security-network", + "security_app_display_name": "Spike in Network Traffic" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/rare_destination_country.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/rare_destination_country.json index 15571f89b81af..7becc6599e31b 100755 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/rare_destination_country.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/rare_destination_country.json @@ -30,6 +30,7 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-security-network" + "created_by": "ml-module-security-network", + "security_app_display_name": "Network Traffic to Rare Destination Country" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/logo.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/logo.json similarity index 100% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/logo.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/logo.json diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/manifest.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/manifest.json similarity index 98% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/manifest.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/manifest.json index 61c3ce979154a..f7a65d0137f26 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/manifest.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/manifest.json @@ -1,5 +1,5 @@ { - "id": "siem_packetbeat", + "id": "security_packetbeat", "title": "Security: Packetbeat", "description": "Detect suspicious network activity in Packetbeat data.", "type": "Packetbeat data", diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/datafeed_packetbeat_dns_tunneling.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/datafeed_packetbeat_dns_tunneling.json similarity index 100% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/datafeed_packetbeat_dns_tunneling.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/datafeed_packetbeat_dns_tunneling.json diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/datafeed_packetbeat_rare_dns_question.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/datafeed_packetbeat_rare_dns_question.json similarity index 100% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/datafeed_packetbeat_rare_dns_question.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/datafeed_packetbeat_rare_dns_question.json diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/datafeed_packetbeat_rare_server_domain.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/datafeed_packetbeat_rare_server_domain.json similarity index 100% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/datafeed_packetbeat_rare_server_domain.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/datafeed_packetbeat_rare_server_domain.json diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/datafeed_packetbeat_rare_urls.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/datafeed_packetbeat_rare_urls.json similarity index 100% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/datafeed_packetbeat_rare_urls.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/datafeed_packetbeat_rare_urls.json diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/datafeed_packetbeat_rare_user_agent.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/datafeed_packetbeat_rare_user_agent.json similarity index 100% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/datafeed_packetbeat_rare_user_agent.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/datafeed_packetbeat_rare_user_agent.json diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_dns_tunneling.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_dns_tunneling.json similarity index 93% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_dns_tunneling.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_dns_tunneling.json index ad2627ff4f21f..61fa894ab1dc1 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_dns_tunneling.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_dns_tunneling.json @@ -45,12 +45,13 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-siem-packetbeat", + "created_by": "ml-module-security-packetbeat", "custom_urls": [ { "url_name": "Host Details", "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "DNS Tunneling" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_rare_dns_question.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_rare_dns_question.json similarity index 89% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_rare_dns_question.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_rare_dns_question.json index c3c2402e13f72..a9663f3cd0856 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_rare_dns_question.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_rare_dns_question.json @@ -27,12 +27,13 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-siem-packetbeat", + "created_by": "ml-module-security-packetbeat", "custom_urls": [ { "url_name": "Host Details", "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual DNS Activity" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_rare_server_domain.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_rare_server_domain.json similarity index 89% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_rare_server_domain.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_rare_server_domain.json index 14e01df1285d8..fd29b66160110 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_rare_server_domain.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_rare_server_domain.json @@ -29,12 +29,13 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-siem-packetbeat", + "created_by": "ml-module-security-packetbeat", "custom_urls": [ { "url_name": "Host Details", "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Network Destination Domain Name" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_rare_urls.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_rare_urls.json similarity index 90% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_rare_urls.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_rare_urls.json index ad664bed49c55..c10dd74ac6ec1 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_rare_urls.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_rare_urls.json @@ -28,12 +28,13 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-siem-packetbeat", + "created_by": "ml-module-security-packetbeat", "custom_urls": [ { "url_name": "Host Details", "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Web Request" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_rare_user_agent.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_rare_user_agent.json similarity index 90% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_rare_user_agent.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_rare_user_agent.json index 0dddf3e5d632e..8c54ea747cd11 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/siem_packetbeat/ml/packetbeat_rare_user_agent.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_packetbeat/ml/packetbeat_rare_user_agent.json @@ -28,12 +28,13 @@ "time_field": "@timestamp" }, "custom_settings": { - "created_by": "ml-module-siem-packetbeat", + "created_by": "ml-module-security-packetbeat", "custom_urls": [ { "url_name": "Host Details", "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Web User Agent" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_rare_process_by_host_windows.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_rare_process_by_host_windows.json index 4e031a434cf6b..fdc6d38bb103e 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_rare_process_by_host_windows.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_rare_process_by_host_windows.json @@ -37,14 +37,14 @@ "time_format": "epoch_ms" }, "custom_settings": { - "job_tags": { + "job_tags": { "euid": "8001", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-windows", + }, + "created_by": "ml-module-security-windows-v3", "custom_urls": [ { "url_name": "Host Details by process name", @@ -62,6 +62,7 @@ "url_name": "Hosts Overview by user name", "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Process for a Windows Host" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_network_activity.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_network_activity.json index 29433578d8e0c..08e2df605c387 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_network_activity.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_network_activity.json @@ -36,14 +36,14 @@ "time_format": "epoch_ms" }, "custom_settings": { - "job_tags": { + "job_tags": { "euid": "8003", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-windows", + }, + "created_by": "ml-module-security-windows-v3", "custom_urls": [ { "url_name": "Host Details by process name", @@ -61,6 +61,7 @@ "url_name": "Hosts Overview by user name", "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Windows Network Activity" } -} \ No newline at end of file +} diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_path_activity.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_path_activity.json index b4408258de0a2..f370980d5a6a8 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_path_activity.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_path_activity.json @@ -35,14 +35,14 @@ "time_format": "epoch_ms" }, "custom_settings": { - "job_tags": { + "job_tags": { "euid": "8004", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-windows", + }, + "created_by": "ml-module-security-windows-v3", "custom_urls": [ { "url_name": "Host Details by process name", @@ -60,6 +60,7 @@ "url_name": "Hosts Overview by user name", "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Windows Path Activity" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_process_all_hosts.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_process_all_hosts.json index f8f239d46c0ae..f099c277e46aa 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_process_all_hosts.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_process_all_hosts.json @@ -36,14 +36,14 @@ "time_format": "epoch_ms" }, "custom_settings": { - "job_tags": { + "job_tags": { "euid": "8002", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-windows", + }, + "created_by": "ml-module-security-windows-v3", "custom_urls": [ { "url_name": "Host Details by process name", @@ -61,6 +61,7 @@ "url_name": "Hosts Overview by user name", "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Anomalous Process for a Windows Population" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_process_creation.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_process_creation.json index 506e7b9b7574b..f299ef5e3051f 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_process_creation.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_process_creation.json @@ -37,14 +37,14 @@ "time_format": "epoch_ms" }, "custom_settings": { - "job_tags": { + "job_tags": { "euid": "8005", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-windows", + }, + "created_by": "ml-module-security-windows-v3", "custom_urls": [ { "url_name": "Host Details by process name", @@ -62,6 +62,7 @@ "url_name": "Hosts Overview by user name", "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Anomalous Windows Process Creation" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_script.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_script.json index af8bd86005dd9..d9b8b69cfa273 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_script.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_script.json @@ -7,7 +7,8 @@ "process", "windows", "winlogbeat", - "powershell" + "powershell", + "security" ], "analysis_config": { "bucket_span": "15m", @@ -32,13 +33,14 @@ "time_field": "@timestamp" }, "custom_settings": { - "job_tags": { + "job_tags": { "euid": "8006", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, + }, + "created_by": "ml-module-security-windows-v3", "custom_urls": [ { "url_name": "Host Details by user name", @@ -48,6 +50,7 @@ "url_name": "Hosts Overview by user name", "url_value": "siem#/ml-hosts?_g=()&kqlQuery=(filterQuery:(expression:'user.name%20:%20%22$user.name$%22',kind:kuery),queryLocation:hosts.page,type:page)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Suspicious Powershell Script" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_service.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_service.json index 7403aa6b716af..77e88567fc8ac 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_service.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_service.json @@ -32,19 +32,20 @@ "time_field": "@timestamp" }, "custom_settings": { - "job_tags": { + "job_tags": { "euid": "8007", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, + }, "created_by": "ml-module-security-windows-v3", "custom_urls": [ { "url_name": "Host Details", "url_value": "security/hosts/ml-hosts/$host.name$?_g=()&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Windows Service" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_user_name.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_user_name.json index bf9433be24669..6709ea75a1869 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_user_name.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_user_name.json @@ -36,14 +36,14 @@ "time_format": "epoch_ms" }, "custom_settings": { - "job_tags": { + "job_tags": { "euid": "8008", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-windows", + }, + "created_by": "ml-module-security-windows-v3", "custom_urls": [ { "url_name": "Host Details by process name", @@ -61,6 +61,7 @@ "url_name": "Hosts Overview by user name", "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Windows Username" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_metadata_process.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_metadata_process.json index fae44f33b7197..93e1b716ff300 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_metadata_process.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_metadata_process.json @@ -35,13 +35,14 @@ "time_format": "epoch_ms" }, "custom_settings": { - "job_tags": { + "job_tags": { "euid": "8011", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-windows" + }, + "created_by": "ml-module-security-windows-v3", + "security_app_display_name": "Unusual Windows Process Calling the Metadata Service" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_metadata_user.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_metadata_user.json index 561073555f753..048b7927e72c1 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_metadata_user.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_metadata_user.json @@ -34,13 +34,14 @@ "time_format": "epoch_ms" }, "custom_settings": { - "job_tags": { + "job_tags": { "euid": "8012", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, - "created_by": "ml-module-security-windows" + }, + "created_by": "ml-module-security-windows-v3", + "security_app_display_name": "Unusual Windows User Calling the Metadata Service" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_user_runas_event.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_user_runas_event.json index ddaa942084c15..9db2159e18bc1 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_user_runas_event.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_user_runas_event.json @@ -32,13 +32,13 @@ "time_field": "@timestamp" }, "custom_settings": { - "job_tags": { + "job_tags": { "euid": "8009", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, + }, "created_by": "ml-module-security-windows-v3", "custom_urls": [ { @@ -57,6 +57,7 @@ "url_name": "Hosts Overview by user name", "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Windows User Privilege Elevation Activity" } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_user_type10_remote_login.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_user_type10_remote_login.json index e28ffb4f3c864..053a61ab04fd2 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_user_type10_remote_login.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_rare_user_type10_remote_login.json @@ -32,13 +32,13 @@ "time_field": "@timestamp" }, "custom_settings": { - "job_tags": { + "job_tags": { "euid": "8013", "maturity": "release", "author": "@randomuserid/Elastic", "version": "3", "updated_date": "5/16/2022" - }, + }, "created_by": "ml-module-security-windows-v3", "custom_urls": [ { @@ -57,6 +57,7 @@ "url_name": "Hosts Overview by user name", "url_value": "security/hosts/ml-hosts?_g=()&query=(query:'user.name%20:%20%22$user.name$%22',language:kuery)&timerange=(global:(linkTo:!(timeline),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')),timeline:(linkTo:!(global),timerange:(from:'$earliest$',kind:absolute,to:'$latest$')))" } - ] + ], + "security_app_display_name": "Unusual Windows Remote User" } } diff --git a/x-pack/plugins/monitoring/common/http_api/shared/index.ts b/x-pack/plugins/monitoring/common/http_api/shared/index.ts index 44b103d046824..216e093d75f77 100644 --- a/x-pack/plugins/monitoring/common/http_api/shared/index.ts +++ b/x-pack/plugins/monitoring/common/http_api/shared/index.ts @@ -7,9 +7,9 @@ export * from './ccs'; export * from './cluster'; -export * from './literal_value'; export * from './pagination'; export * from './query_string_boolean'; export * from './query_string_number'; export * from './sorting'; export * from './time_range'; +export { createLiteralValueFromUndefinedRT } from '@kbn/io-ts-utils'; diff --git a/x-pack/plugins/observability/common/typings.ts b/x-pack/plugins/observability/common/typings.ts index 31376f8cb5c46..ce2fdb7460688 100644 --- a/x-pack/plugins/observability/common/typings.ts +++ b/x-pack/plugins/observability/common/typings.ts @@ -19,14 +19,11 @@ export const alertWorkflowStatusRt = t.keyof({ export type AlertWorkflowStatus = t.TypeOf; export interface ApmIndicesConfig { - sourcemap: string; error: string; onboarding: string; span: string; transaction: string; metric: string; - apmAgentConfigurationIndex: string; - apmCustomLinkIndex: string; } export type AlertStatus = diff --git a/x-pack/plugins/observability/public/pages/alert_details/components/alert_summary.tsx b/x-pack/plugins/observability/public/pages/alert_details/components/alert_summary.tsx index 29df36d88aa51..a3662c665ce88 100644 --- a/x-pack/plugins/observability/public/pages/alert_details/components/alert_summary.tsx +++ b/x-pack/plugins/observability/public/pages/alert_details/components/alert_summary.tsx @@ -21,12 +21,14 @@ import { ALERT_EVALUATION_THRESHOLD, ALERT_EVALUATION_VALUE, ALERT_RULE_TAGS, + ALERT_RULE_TYPE_ID, ALERT_START, ALERT_STATUS, ALERT_STATUS_ACTIVE, ALERT_STATUS_RECOVERED, TIMESTAMP, } from '@kbn/rule-data-utils'; +import { formatAlertEvaluationValue } from '../../../utils/format_alert_evaluation_value'; import { asDuration } from '../../../../common/utils/formatters'; import { AlertSummaryProps } from '../types'; import { AlertStatusIndicator } from '../../../components/shared/alert_status_indicator'; @@ -34,7 +36,6 @@ import { DEFAULT_DATE_FORMAT } from '../constants'; export function AlertSummary({ alert }: AlertSummaryProps) { const tags = alert?.fields[ALERT_RULE_TAGS]; - return (
@@ -49,7 +50,10 @@ export function AlertSummary({ alert }: AlertSummaryProps) { - {alert?.fields[ALERT_EVALUATION_VALUE] ?? '-'} + {formatAlertEvaluationValue( + alert?.fields[ALERT_RULE_TYPE_ID], + alert?.fields[ALERT_EVALUATION_VALUE] + )} @@ -63,7 +67,10 @@ export function AlertSummary({ alert }: AlertSummaryProps) { - {alert?.fields[ALERT_EVALUATION_THRESHOLD] ?? '-'} + {formatAlertEvaluationValue( + alert?.fields[ALERT_RULE_TYPE_ID], + alert?.fields[ALERT_EVALUATION_THRESHOLD] + )} @@ -94,7 +101,7 @@ export function AlertSummary({ alert }: AlertSummaryProps) { (); const [defaultAlertTimeRange] = useState(getDefaultAlertSummaryTimeRange); - const ruleQuery = useRef([ + const ruleQuery = useRef([ { query: `kibana.alert.rule.uuid: ${ruleId}`, language: 'kuery' }, - ] as Query[]); + ]); + const alertSummaryWidgetFilter = useRef({ + term: { + 'kibana.alert.rule.uuid': ruleId, + }, + }); const tabsRef = useRef(null); const onAlertSummaryWidgetClick = async (status: AlertStatus = ALERT_STATUS_ALL) => { @@ -383,6 +389,7 @@ export function RuleDetailsPage() { filteredRuleTypes={filteredRuleTypes} onClick={(status) => onAlertSummaryWidgetClick(status)} timeRange={defaultAlertTimeRange} + filter={alertSummaryWidgetFilter.current} /> diff --git a/x-pack/plugins/observability/public/utils/format_alert_evaluation_value.test.ts b/x-pack/plugins/observability/public/utils/format_alert_evaluation_value.test.ts new file mode 100644 index 0000000000000..ddef182541466 --- /dev/null +++ b/x-pack/plugins/observability/public/utils/format_alert_evaluation_value.test.ts @@ -0,0 +1,23 @@ +/* + * 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 { formatAlertEvaluationValue } from './format_alert_evaluation_value'; + +describe('formatAlertEvaluationValue', () => { + it('returns - when there is no evaluationValue passed', () => { + expect(formatAlertEvaluationValue('apm.transaction_error_rate', undefined)).toBe('-'); + }); + it('returns the evaluation value when ruleTypeId in unknown aka unformatted', () => { + expect(formatAlertEvaluationValue('unknown.rule.type', 2000)).toBe(2000); + }); + it('returns the evaluation value formatted as percent when the alert rule type is "apm.transaction_error_rate" ', () => { + expect(formatAlertEvaluationValue('apm.transaction_error_rate', 20)).toBe('20%'); + }); + it('returns the evaluation value formatted as duration in ms when the alert rule type is "apm.transaction_duration" ', () => { + expect(formatAlertEvaluationValue('apm.transaction_duration', 140000)).toBe('140 ms'); + }); +}); diff --git a/x-pack/plugins/observability/public/utils/format_alert_evaluation_value.ts b/x-pack/plugins/observability/public/utils/format_alert_evaluation_value.ts new file mode 100644 index 0000000000000..92629934f2cea --- /dev/null +++ b/x-pack/plugins/observability/public/utils/format_alert_evaluation_value.ts @@ -0,0 +1,25 @@ +/* + * 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 { asMillisecondDuration, asPercent } from '../../common/utils/formatters'; +import { + ALERT_EVALUATION_UNIT_TYPE, + getAlertEvaluationUnitTypeByRuleTypeId, +} from './get_alert_evaluation_unit_type_by_rule_type_id'; + +export const formatAlertEvaluationValue = (ruleTypeId?: string, evaluationValue?: number) => { + if (!evaluationValue || !ruleTypeId) return '-'; + const unitType = getAlertEvaluationUnitTypeByRuleTypeId(ruleTypeId); + switch (unitType) { + case ALERT_EVALUATION_UNIT_TYPE.DURATION: + return asMillisecondDuration(evaluationValue); + case ALERT_EVALUATION_UNIT_TYPE.PERCENT: + return asPercent(evaluationValue, 100); + default: + return evaluationValue; + } +}; diff --git a/x-pack/plugins/observability/public/utils/get_alert_evaluation_unit_type_by_rule_type_id.ts b/x-pack/plugins/observability/public/utils/get_alert_evaluation_unit_type_by_rule_type_id.ts new file mode 100644 index 0000000000000..d770415552bb7 --- /dev/null +++ b/x-pack/plugins/observability/public/utils/get_alert_evaluation_unit_type_by_rule_type_id.ts @@ -0,0 +1,28 @@ +/* + * 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. + */ + +export const ALERT_EVALUATION_UNIT_TYPE = { + DURATION: 'DURATION', + PERCENT: 'PERCENT', + NUMBER: 'NUMBER', +} as const; + +type ObjectValues = T[keyof T]; +type AlertEvaluationUnitType = ObjectValues; + +export const getAlertEvaluationUnitTypeByRuleTypeId = ( + ruleTypeId: string +): AlertEvaluationUnitType => { + switch (ruleTypeId) { + case 'apm.transaction_duration': + return ALERT_EVALUATION_UNIT_TYPE.DURATION; + case 'apm.transaction_error_rate': + return ALERT_EVALUATION_UNIT_TYPE.PERCENT; + default: + return ALERT_EVALUATION_UNIT_TYPE.NUMBER; + } +}; diff --git a/x-pack/plugins/observability/server/index.ts b/x-pack/plugins/observability/server/index.ts index e8b6582a9184e..ec930b813fb36 100644 --- a/x-pack/plugins/observability/server/index.ts +++ b/x-pack/plugins/observability/server/index.ts @@ -12,6 +12,7 @@ import { schema, TypeOf } from '@kbn/config-schema'; import { PluginConfigDescriptor, PluginInitializerContext } from '@kbn/core/server'; import { ObservabilityPlugin, ObservabilityPluginSetup } from './plugin'; import { createOrUpdateIndex, Mappings } from './utils/create_or_update_index'; +import { createOrUpdateIndexTemplate } from './utils/create_or_update_index_template'; import { ScopedAnnotationsClient } from './lib/annotations/bootstrap_annotations'; import { unwrapEsResponse, @@ -61,6 +62,11 @@ export const plugin = (initContext: PluginInitializerContext) => new ObservabilityPlugin(initContext); export type { Mappings, ObservabilityPluginSetup, ScopedAnnotationsClient }; -export { createOrUpdateIndex, unwrapEsResponse, WrappedElasticsearchClientError }; +export { + createOrUpdateIndex, + createOrUpdateIndexTemplate, + unwrapEsResponse, + WrappedElasticsearchClientError, +}; export { uiSettings } from './ui_settings'; diff --git a/x-pack/plugins/observability/server/utils/create_or_update_index_template.ts b/x-pack/plugins/observability/server/utils/create_or_update_index_template.ts new file mode 100644 index 0000000000000..4c747c71614ef --- /dev/null +++ b/x-pack/plugins/observability/server/utils/create_or_update_index_template.ts @@ -0,0 +1,55 @@ +/* + * 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 pRetry from 'p-retry'; +import { Logger, ElasticsearchClient } from '@kbn/core/server'; +import { IndicesPutIndexTemplateRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; + +export async function createOrUpdateIndexTemplate({ + indexTemplate, + client, + logger, +}: { + indexTemplate: IndicesPutIndexTemplateRequest; + client: ElasticsearchClient; + logger: Logger; +}) { + try { + /* + * In some cases we could be trying to create the index template before ES is ready. + * When this happens, we retry creating the template with exponential backoff. + * We use retry's default formula, meaning that the first retry happens after 2s, + * the 5th after 32s, and the final attempt after around 17m. If the final attempt fails, + * the error is logged to the console. + * See https://github.com/sindresorhus/p-retry and https://github.com/tim-kos/node-retry. + */ + return await pRetry( + async () => { + logger.debug( + `Create index template: "${indexTemplate.name}" for index pattern "${indexTemplate.body?.index_patterns}"` + ); + + const result = await client.indices.putIndexTemplate(indexTemplate); + + if (!result.acknowledged) { + // @ts-expect-error + const resultError = JSON.stringify(result?.body?.error); + throw new Error(resultError); + } + + return result; + }, + { + onFailedAttempt: (e) => { + logger.warn(`Could not create index template: '${indexTemplate.name}'. Retrying...`); + logger.warn(e); + }, + } + ); + } catch (e) { + logger.error(`Could not create index template: '${indexTemplate.name}'. Error: ${e.message}.`); + } +} diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.mock.ts b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.mock.ts index 59db45aff0fa2..e636af632464c 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.mock.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.mock.ts @@ -20,6 +20,7 @@ const createAlertsClientMock = () => { find: jest.fn(), getFeatureIdsByRegistrationContexts: jest.fn(), getBrowserFields: jest.fn(), + getAlertSummary: jest.fn(), }; return mocked; }; diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts index 964d19e45b613..9aa0bbd7343cb 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts @@ -11,11 +11,16 @@ import { Filter, buildEsQuery, EsQueryConfig } from '@kbn/es-query'; import { decodeVersion, encodeHitVersion } from '@kbn/securitysolution-es-utils'; import { AlertConsumers, + ALERT_TIME_RANGE, + ALERT_STATUS, getEsQueryConfig, getSafeSortIds, isValidFeatureId, STATUS_VALUES, ValidFeatureId, + ALERT_STATUS_RECOVERED, + ALERT_END, + ALERT_STATUS_ACTIVE, } from '@kbn/rule-data-utils'; import { @@ -32,6 +37,7 @@ import { import { Logger, ElasticsearchClient, EcsEventOutcome } from '@kbn/core/server'; import { AuditLogger } from '@kbn/security-plugin/server'; import { IndexPatternsFetcher } from '@kbn/data-plugin/server'; +import { isEmpty } from 'lodash'; import { BrowserFields } from '../../common'; import { alertAuditEvent, operationAlertAuditActionMap } from './audit_events'; import { @@ -92,6 +98,15 @@ interface GetAlertParams { index?: string; } +interface GetAlertSummaryParams { + id?: string; + gte: string; + lte: string; + featureIds: string[]; + filter?: estypes.QueryDslQueryContainer[]; + fixedInterval?: string; +} + interface SingleSearchAfterAndAudit { id?: string | null | undefined; query?: string | object | undefined; @@ -500,6 +515,115 @@ export class AlertsClient { } } + public async getAlertSummary({ + gte, + lte, + featureIds, + filter, + fixedInterval = '1m', + }: GetAlertSummaryParams) { + try { + const indexToUse = await this.getAuthorizedAlertsIndices(featureIds); + + if (isEmpty(indexToUse)) { + throw Boom.badRequest('no featureIds were provided for getting alert summary'); + } + + // first search for the alert by id, then use the alert info to check if user has access to it + const responseAlertSum = await this.singleSearchAfterAndAudit({ + index: (indexToUse ?? []).join(), + operation: ReadOperations.Get, + aggs: { + active_alerts_bucket: { + date_histogram: { + field: ALERT_TIME_RANGE, + fixed_interval: fixedInterval, + hard_bounds: { + min: gte, + max: lte, + }, + extended_bounds: { + min: gte, + max: lte, + }, + min_doc_count: 0, + }, + }, + recovered_alerts: { + filter: { + term: { + [ALERT_STATUS]: ALERT_STATUS_RECOVERED, + }, + }, + aggs: { + container: { + date_histogram: { + field: ALERT_END, + fixed_interval: fixedInterval, + extended_bounds: { + min: gte, + max: lte, + }, + min_doc_count: 0, + }, + }, + }, + }, + count: { + terms: { field: ALERT_STATUS }, + }, + }, + query: { + bool: { + filter: [ + { + range: { + [ALERT_TIME_RANGE]: { + gt: gte, + lt: lte, + }, + }, + }, + ...(filter ? filter : []), + ], + }, + }, + size: 0, + }); + + let activeAlertCount = 0; + let recoveredAlertCount = 0; + ( + (responseAlertSum.aggregations?.count as estypes.AggregationsMultiBucketAggregateBase) + .buckets as estypes.AggregationsStringTermsBucketKeys[] + ).forEach((b) => { + if (b.key === ALERT_STATUS_ACTIVE) { + activeAlertCount = b.doc_count; + } else if (b.key === ALERT_STATUS_RECOVERED) { + recoveredAlertCount = b.doc_count; + } + }); + + return { + activeAlertCount, + recoveredAlertCount, + activeAlerts: + ( + responseAlertSum.aggregations + ?.active_alerts_bucket as estypes.AggregationsAutoDateHistogramAggregate + )?.buckets ?? [], + recoveredAlerts: + ( + (responseAlertSum.aggregations?.recovered_alerts as estypes.AggregationsFilterAggregate) + ?.container as estypes.AggregationsAutoDateHistogramAggregate + )?.buckets ?? [], + }; + } catch (error) { + this.logger.error(`getAlertSummary threw an error: ${error}`); + throw error; + } + } + public async update({ id, status, diff --git a/x-pack/plugins/rule_registry/server/routes/get_alert_summary.test.ts b/x-pack/plugins/rule_registry/server/routes/get_alert_summary.test.ts new file mode 100644 index 0000000000000..3496b8f342e2c --- /dev/null +++ b/x-pack/plugins/rule_registry/server/routes/get_alert_summary.test.ts @@ -0,0 +1,116 @@ +/* + * 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 { BASE_RAC_ALERTS_API_PATH } from '../../common/constants'; +import { getAlertSummaryRoute } from './get_alert_summary'; +import { requestContextMock } from './__mocks__/request_context'; +import { requestMock, serverMock } from './__mocks__/server'; + +describe('getAlertSummaryRoute', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + + beforeEach(async () => { + server = serverMock.create(); + ({ clients, context } = requestContextMock.createTools()); + + clients.rac.getAlertSummary.mockResolvedValue({ + activeAlertCount: 0, + recoveredAlertCount: 0, + activeAlerts: [], + recoveredAlerts: [], + }); + + getAlertSummaryRoute(server.router); + }); + + describe('request validation', () => { + test('rejects invalid query params', async () => { + await expect( + server.inject( + requestMock.create({ + method: 'post', + path: `${BASE_RAC_ALERTS_API_PATH}/_alert_summary`, + body: { gte: 4, lte: 3, featureIds: ['logs'] }, + }), + context + ) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Request was rejected with message: 'Invalid value \\"4\\" supplied to \\"gte\\",Invalid value \\"3\\" supplied to \\"lte\\"'"` + ); + }); + + test('validate gte/lte format', async () => { + const resp = await server.inject( + requestMock.create({ + method: 'post', + path: `${BASE_RAC_ALERTS_API_PATH}/_alert_summary`, + body: { + gte: '2020-12-16T15:00:00.000Z', + lte: '2020-12-16', + featureIds: ['logs'], + }, + }), + context + ); + expect(resp.status).toEqual(400); + expect(resp.body).toMatchInlineSnapshot(` + Object { + "attributes": Object { + "success": false, + }, + "message": "gte and/or lte are not following the UTC format", + } + `); + }); + + test('validate fixed_interval ', async () => { + const resp = await server.inject( + requestMock.create({ + method: 'post', + path: `${BASE_RAC_ALERTS_API_PATH}/_alert_summary`, + body: { + gte: '2020-12-16T15:00:00.000Z', + lte: '2020-12-16T16:00:00.000Z', + featureIds: ['logs'], + fixed_interval: 'xx', + }, + }), + context + ); + expect(resp.status).toEqual(400); + expect(resp.body).toMatchInlineSnapshot(` + Object { + "attributes": Object { + "success": false, + }, + "message": "fixed_interval is not following the expected format 1m, 1h, 1d, 1w", + } + `); + }); + + test('rejects unknown query params', async () => { + await expect( + server.inject( + requestMock.create({ + method: 'post', + path: `${BASE_RAC_ALERTS_API_PATH}/_alert_summary`, + body: { + gte: '2020-12-16T15:00:00.000Z', + lte: '2020-12-16T16:00:00.000Z', + featureIds: ['logs'], + boop: 'unknown', + }, + }), + context + ) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Request was rejected with message: 'invalid keys \\"boop\\"'"` + ); + }); + }); +}); diff --git a/x-pack/plugins/rule_registry/server/routes/get_alert_summary.ts b/x-pack/plugins/rule_registry/server/routes/get_alert_summary.ts new file mode 100644 index 0000000000000..6125c2a39b845 --- /dev/null +++ b/x-pack/plugins/rule_registry/server/routes/get_alert_summary.ts @@ -0,0 +1,97 @@ +/* + * 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 Boom from '@hapi/boom'; +import { IRouter } from '@kbn/core/server'; +import * as t from 'io-ts'; +import { transformError } from '@kbn/securitysolution-es-utils'; +import moment from 'moment'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; + +import { RacRequestHandlerContext } from '../types'; +import { BASE_RAC_ALERTS_API_PATH } from '../../common/constants'; +import { buildRouteValidation } from './utils/route_validation'; + +export const getAlertSummaryRoute = (router: IRouter) => { + router.post( + { + path: `${BASE_RAC_ALERTS_API_PATH}/_alert_summary`, + validate: { + body: buildRouteValidation( + t.intersection([ + t.exact( + t.type({ + gte: t.string, + lte: t.string, + featureIds: t.array(t.string), + }) + ), + t.exact( + t.partial({ + fixed_interval: t.string, + filter: t.array(t.object), + }) + ), + ]) + ), + }, + options: { + tags: ['access:rac'], + }, + }, + async (context, request, response) => { + try { + const racContext = await context.rac; + const alertsClient = await racContext.getAlertsClient(); + const { gte, lte, featureIds, filter, fixed_interval: fixedInterval } = request.body; + if ( + !( + moment(gte, 'YYYY-MM-DDTHH:mm:ss.SSSZ', true).isValid() && + moment(lte, 'YYYY-MM-DDTHH:mm:ss.SSSZ', true).isValid() + ) + ) { + throw Boom.badRequest('gte and/or lte are not following the UTC format'); + } + + if (fixedInterval && fixedInterval?.match(/^\d{1,2}['m','h','d','w']$/) == null) { + throw Boom.badRequest( + 'fixed_interval is not following the expected format 1m, 1h, 1d, 1w' + ); + } + + const aggs = await alertsClient.getAlertSummary({ + gte, + lte, + featureIds, + filter: filter as estypes.QueryDslQueryContainer[], + fixedInterval, + }); + return response.ok({ + body: aggs, + }); + } catch (exc) { + const err = transformError(exc); + const contentType = { + 'content-type': 'application/json', + }; + const defaultedHeaders = { + ...contentType, + }; + return response.customError({ + headers: defaultedHeaders, + statusCode: err.statusCode, + body: { + message: err.message, + attributes: { + success: false, + }, + }, + }); + } + } + ); +}; diff --git a/x-pack/plugins/rule_registry/server/routes/index.ts b/x-pack/plugins/rule_registry/server/routes/index.ts index a693de9b2fa4c..7a71f19f7980f 100644 --- a/x-pack/plugins/rule_registry/server/routes/index.ts +++ b/x-pack/plugins/rule_registry/server/routes/index.ts @@ -14,6 +14,7 @@ import { bulkUpdateAlertsRoute } from './bulk_update_alerts'; import { findAlertsByQueryRoute } from './find'; import { getFeatureIdsByRegistrationContexts } from './get_feature_ids_by_registration_contexts'; import { getBrowserFieldsByFeatureId } from './get_browser_fields_by_feature_id'; +import { getAlertSummaryRoute } from './get_alert_summary'; export function defineRoutes(router: IRouter) { getAlertByIdRoute(router); @@ -23,4 +24,5 @@ export function defineRoutes(router: IRouter) { findAlertsByQueryRoute(router); getFeatureIdsByRegistrationContexts(router); getBrowserFieldsByFeatureId(router); + getAlertSummaryRoute(router); } diff --git a/x-pack/plugins/security/server/audit/audit_events.ts b/x-pack/plugins/security/server/audit/audit_events.ts index 5e38d5d53f224..2ec67784b2ac6 100644 --- a/x-pack/plugins/security/server/audit/audit_events.ts +++ b/x-pack/plugins/security/server/audit/audit_events.ts @@ -14,6 +14,71 @@ import type { EcsEventOutcome, EcsEventType, KibanaRequest, LogMeta } from '@kbn import type { AuthenticationProvider } from '../../common/model'; import type { AuthenticationResult } from '../authentication/authentication_result'; +/** + * Audit kibana schema using ECS format + */ +export interface AuditKibana { + /** + * The ID of the space associated with this event. + */ + space_id?: string; + /** + * The ID of the user session associated with this event. Each login attempt + * results in a unique session id. + */ + session_id?: string; + /** + * Saved object that was created, changed, deleted or accessed as part of this event. + */ + saved_object?: { + type: string; + id: string; + }; + /** + * Name of authentication provider associated with a login event. + */ + authentication_provider?: string; + /** + * Type of authentication provider associated with a login event. + */ + authentication_type?: string; + /** + * Name of Elasticsearch realm that has authenticated the user. + */ + authentication_realm?: string; + /** + * Name of Elasticsearch realm where the user details were retrieved from. + */ + lookup_realm?: string; + /** + * Set of space IDs that a saved object was shared to. + */ + add_to_spaces?: readonly string[]; + /** + * Set of space IDs that a saved object was removed from. + */ + delete_from_spaces?: readonly string[]; +} + +type EcsHttp = Required['http']; +type EcsRequest = Required['request']; + +/** + * Audit request schema using ECS format + */ +export interface AuditRequest extends EcsRequest { + headers?: { + 'x-forwarded-for'?: string; + }; +} + +/** + * Audit http schema using ECS format + */ +export interface AuditHttp extends EcsHttp { + request?: AuditRequest; +} + /** * Audit event schema using ECS format: https://www.elastic.co/guide/en/ecs/1.12/index.html * @@ -24,48 +89,8 @@ import type { AuthenticationResult } from '../authentication/authentication_resu */ export interface AuditEvent extends LogMeta { message: string; - kibana?: { - /** - * The ID of the space associated with this event. - */ - space_id?: string; - /** - * The ID of the user session associated with this event. Each login attempt - * results in a unique session id. - */ - session_id?: string; - /** - * Saved object that was created, changed, deleted or accessed as part of this event. - */ - saved_object?: { - type: string; - id: string; - }; - /** - * Name of authentication provider associated with a login event. - */ - authentication_provider?: string; - /** - * Type of authentication provider associated with a login event. - */ - authentication_type?: string; - /** - * Name of Elasticsearch realm that has authenticated the user. - */ - authentication_realm?: string; - /** - * Name of Elasticsearch realm where the user details were retrieved from. - */ - lookup_realm?: string; - /** - * Set of space IDs that a saved object was shared to. - */ - add_to_spaces?: readonly string[]; - /** - * Set of space IDs that a saved object was removed from. - */ - delete_from_spaces?: readonly string[]; - }; + kibana?: AuditKibana; + http?: AuditHttp; } export interface HttpRequestParams { diff --git a/x-pack/plugins/security/server/audit/audit_service.test.ts b/x-pack/plugins/security/server/audit/audit_service.test.ts index 900da83a6eb26..4fae61b770912 100644 --- a/x-pack/plugins/security/server/audit/audit_service.test.ts +++ b/x-pack/plugins/security/server/audit/audit_service.test.ts @@ -5,6 +5,7 @@ * 2.0. */ +import type { Socket } from 'net'; import { lastValueFrom, Observable, of } from 'rxjs'; import { @@ -22,6 +23,7 @@ import { AuditService, createLoggingConfig, filterEvent, + getForwardedFor, RECORD_USAGE_INTERVAL, } from './audit_service'; @@ -186,14 +188,26 @@ describe('#asScoped', () => { recordAuditLoggingUsage, }); const request = httpServerMock.createKibanaRequest({ + socket: { remoteAddress: '3.3.3.3' } as Socket, + headers: { + 'x-forwarded-for': '1.1.1.1, 2.2.2.2', + }, kibanaRequestState: { requestId: 'REQUEST_ID', requestUuid: 'REQUEST_UUID' }, }); - await auditSetup.asScoped(request).log({ message: 'MESSAGE', event: { action: 'ACTION' } }); - expect(logger.info).toHaveBeenCalledWith('MESSAGE', { + await auditSetup.asScoped(request).log({ + message: 'MESSAGE', + event: { action: 'ACTION' }, + http: { request: { method: 'GET' } }, + }); + expect(logger.info).toHaveBeenLastCalledWith('MESSAGE', { event: { action: 'ACTION' }, kibana: { space_id: 'default', session_id: 'SESSION_ID' }, trace: { id: 'REQUEST_ID' }, + client: { ip: '3.3.3.3' }, + http: { + request: { method: 'GET', headers: { 'x-forwarded-for': '1.1.1.1, 2.2.2.2' } }, + }, user: { id: 'uid', name: 'jdoe', roles: ['admin'] }, }); audit.stop(); @@ -424,6 +438,32 @@ describe('#createLoggingConfig', () => { }); }); +describe('#getForwardedFor', () => { + it('extracts x-forwarded-for header from request', () => { + const request = httpServerMock.createKibanaRequest({ + headers: { + 'x-forwarded-for': '1.1.1.1', + }, + }); + expect(getForwardedFor(request)).toBe('1.1.1.1'); + }); + + it('concatenates multiple headers into single string in correct order', () => { + const request = httpServerMock.createKibanaRequest({ + headers: { + // @ts-expect-error Headers can be arrays but HAPI mocks are incorrectly typed + 'x-forwarded-for': ['1.1.1.1, 2.2.2.2', '3.3.3.3'], + }, + }); + expect(getForwardedFor(request)).toBe('1.1.1.1, 2.2.2.2, 3.3.3.3'); + }); + + it('returns undefined when header not present', () => { + const request = httpServerMock.createKibanaRequest(); + expect(getForwardedFor(request)).toBeUndefined(); + }); +}); + describe('#filterEvent', () => { let event: AuditEvent; diff --git a/x-pack/plugins/security/server/audit/audit_service.ts b/x-pack/plugins/security/server/audit/audit_service.ts index ff8a09df40198..a163a75e71874 100644 --- a/x-pack/plugins/security/server/audit/audit_service.ts +++ b/x-pack/plugins/security/server/audit/audit_service.ts @@ -162,6 +162,8 @@ export class AuditService { const spaceId = getSpaceId(request); const user = getCurrentUser(request); const sessionId = await getSID(request); + const forwardedFor = getForwardedFor(request); + log({ ...event, user: @@ -177,6 +179,18 @@ export class AuditService { ...event.kibana, }, trace: { id: request.id }, + client: { ip: request.socket.remoteAddress }, + http: forwardedFor + ? { + ...event.http, + request: { + ...event.http?.request, + headers: { + 'x-forwarded-for': forwardedFor, + }, + }, + } + : event.http, }); }, enabled, @@ -243,3 +257,16 @@ export function filterEvent( } return true; } + +/** + * Extracts `X-Forwarded-For` header(s) from `KibanaRequest`. + */ +export function getForwardedFor(request: KibanaRequest) { + const forwardedFor = request.headers['x-forwarded-for']; + + if (Array.isArray(forwardedFor)) { + return forwardedFor.join(', '); + } + + return forwardedFor; +} diff --git a/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.test.ts b/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.test.ts index c901cca33f450..cc7c9c9e6f402 100644 --- a/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.test.ts +++ b/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.test.ts @@ -130,6 +130,7 @@ describe(`feature_privilege_builder`, () => { "alerting:1.0.0-zeta1:alert-type/my-feature/alert/get", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/find", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/getAuthorizedAlertsIndices", + "alerting:1.0.0-zeta1:alert-type/my-feature/alert/getAlertSummary", ] `); }); @@ -179,6 +180,7 @@ describe(`feature_privilege_builder`, () => { "alerting:1.0.0-zeta1:alert-type/my-feature/alert/get", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/find", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/getAuthorizedAlertsIndices", + "alerting:1.0.0-zeta1:alert-type/my-feature/alert/getAlertSummary", ] `); }); @@ -276,6 +278,7 @@ describe(`feature_privilege_builder`, () => { "alerting:1.0.0-zeta1:alert-type/my-feature/alert/get", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/find", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/getAuthorizedAlertsIndices", + "alerting:1.0.0-zeta1:alert-type/my-feature/alert/getAlertSummary", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/update", ] `); @@ -342,6 +345,7 @@ describe(`feature_privilege_builder`, () => { "alerting:1.0.0-zeta1:alert-type/my-feature/alert/get", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/find", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/getAuthorizedAlertsIndices", + "alerting:1.0.0-zeta1:alert-type/my-feature/alert/getAlertSummary", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/update", ] `); @@ -446,10 +450,12 @@ describe(`feature_privilege_builder`, () => { "alerting:1.0.0-zeta1:alert-type/my-feature/alert/get", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/find", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/getAuthorizedAlertsIndices", + "alerting:1.0.0-zeta1:alert-type/my-feature/alert/getAlertSummary", "alerting:1.0.0-zeta1:alert-type/my-feature/alert/update", "alerting:1.0.0-zeta1:readonly-alert-type/my-feature/alert/get", "alerting:1.0.0-zeta1:readonly-alert-type/my-feature/alert/find", "alerting:1.0.0-zeta1:readonly-alert-type/my-feature/alert/getAuthorizedAlertsIndices", + "alerting:1.0.0-zeta1:readonly-alert-type/my-feature/alert/getAlertSummary", ] `); }); @@ -521,10 +527,12 @@ describe(`feature_privilege_builder`, () => { "alerting:1.0.0-zeta1:another-alert-type/my-feature/alert/get", "alerting:1.0.0-zeta1:another-alert-type/my-feature/alert/find", "alerting:1.0.0-zeta1:another-alert-type/my-feature/alert/getAuthorizedAlertsIndices", + "alerting:1.0.0-zeta1:another-alert-type/my-feature/alert/getAlertSummary", "alerting:1.0.0-zeta1:another-alert-type/my-feature/alert/update", "alerting:1.0.0-zeta1:readonly-alert-type/my-feature/alert/get", "alerting:1.0.0-zeta1:readonly-alert-type/my-feature/alert/find", "alerting:1.0.0-zeta1:readonly-alert-type/my-feature/alert/getAuthorizedAlertsIndices", + "alerting:1.0.0-zeta1:readonly-alert-type/my-feature/alert/getAlertSummary", ] `); }); diff --git a/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.ts b/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.ts index 94b8c1a64290c..647464c714325 100644 --- a/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.ts +++ b/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/alerting.ts @@ -25,7 +25,7 @@ const readOperations: Record = { 'find', 'getRuleExecutionKPI', ], - alert: ['get', 'find', 'getAuthorizedAlertsIndices'], + alert: ['get', 'find', 'getAuthorizedAlertsIndices', 'getAlertSummary'], }; const writeOperations: Record = { diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts index f8bc8f0a20a7b..e16a6e2ac248a 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts @@ -26,7 +26,6 @@ const agentStatusList: readonly AgentStatus[] = [ 'error', 'online', 'inactive', - 'warning', 'enrolling', 'unenrolling', 'updating', @@ -239,10 +238,6 @@ export class FleetAgentGenerator extends BaseDataGenerator { fleetServerAgent.upgraded_at = undefined; break; - case 'warning': - // NOt able to find anything in fleet - break; - // default is `online`, which is also the default returned by `generateEsHit()` } diff --git a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_fleet_actions.ts b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_fleet_actions.ts index 0b64b00946eae..0290d1e34527b 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_fleet_actions.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_fleet_actions.ts @@ -47,7 +47,7 @@ export const indexEndpointAndFleetActionsForHost = async ( ): Promise => { const ES_INDEX_OPTIONS = { headers: { 'X-elastic-product-origin': 'fleet' } }; const agentId = endpointHost.elastic.agent.id; - const total = fleetActionGenerator.randomN(5); + const total = fleetActionGenerator.randomN(5) + 1; // generate at least one const response: IndexedEndpointAndFleetActionsForHostResponse = { actions: [], actionResponses: [], diff --git a/x-pack/plugins/security_solution/public/actions/add_to_timeline/add_to_timeline_action.test.ts b/x-pack/plugins/security_solution/public/actions/add_to_timeline/add_to_timeline_action.test.ts new file mode 100644 index 0000000000000..16e4b5566d058 --- /dev/null +++ b/x-pack/plugins/security_solution/public/actions/add_to_timeline/add_to_timeline_action.test.ts @@ -0,0 +1,227 @@ +/* + * 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 type { CellValueContext, EmbeddableInput, IEmbeddable } from '@kbn/embeddable-plugin/public'; +import { ErrorEmbeddable } from '@kbn/embeddable-plugin/public'; +import { LENS_EMBEDDABLE_TYPE } from '@kbn/lens-plugin/public'; +import type { SecurityAppStore } from '../../common/store/types'; +import { AddToTimelineAction } from './add_to_timeline_action'; +import { KibanaServices } from '../../common/lib/kibana'; +import { APP_UI_ID } from '../../../common/constants'; +import { Subject } from 'rxjs'; +import { TimelineId } from '../../../common/types'; +import { addProvider, showTimeline } from '../../timelines/store/timeline/actions'; + +jest.mock('../../common/lib/kibana'); +const currentAppId$ = new Subject(); +KibanaServices.get().application.currentAppId$ = currentAppId$.asObservable(); +const mockWarningToast = jest.fn(); +KibanaServices.get().notifications.toasts.addWarning = mockWarningToast; + +const mockDispatch = jest.fn(); +const store = { + dispatch: mockDispatch, +} as unknown as SecurityAppStore; + +class MockEmbeddable { + public type; + constructor(type: string) { + this.type = type; + } + getFilters() {} + getQuery() {} +} + +const lensEmbeddable = new MockEmbeddable(LENS_EMBEDDABLE_TYPE) as unknown as IEmbeddable; + +const columnMeta = { + field: 'user.name', + type: 'string' as const, + source: 'esaggs', + sourceParams: { indexPatternId: 'some-pattern-id' }, +}; +const value = 'the value'; +const eventId = 'event_1'; +const data: CellValueContext['data'] = [{ columnMeta, value, eventId }]; + +describe('AddToTimelineAction', () => { + const addToTimelineAction = new AddToTimelineAction(store); + + beforeEach(() => { + currentAppId$.next(APP_UI_ID); + jest.clearAllMocks(); + }); + + it('should return display name', () => { + expect(addToTimelineAction.getDisplayName()).toEqual('Add to timeline'); + }); + + it('should return icon type', () => { + expect(addToTimelineAction.getIconType()).toEqual('timeline'); + }); + + describe('isCompatible', () => { + it('should return false if error embeddable', async () => { + expect( + await addToTimelineAction.isCompatible({ + embeddable: new ErrorEmbeddable('some error', {} as EmbeddableInput), + data, + }) + ).toEqual(false); + }); + + it('should return false if not lens embeddable', async () => { + expect( + await addToTimelineAction.isCompatible({ + embeddable: new MockEmbeddable('not_lens') as unknown as IEmbeddable, + data, + }) + ).toEqual(false); + }); + + it('should return false if data is empty', async () => { + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data: [], + }) + ).toEqual(false); + }); + + it('should return false if data do not have column meta', async () => { + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data: [{}], + }) + ).toEqual(false); + }); + + it('should return false if data column meta do not have field', async () => { + const { field, ...testColumnMeta } = columnMeta; + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data: [{ columnMeta: testColumnMeta }], + }) + ).toEqual(false); + }); + + it('should return false if data column meta field is blacklisted', async () => { + const testColumnMeta = { ...columnMeta, field: 'signal.reason' }; + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data: [{ columnMeta: testColumnMeta }], + }) + ).toEqual(false); + }); + + it('should return false if data column meta field not filterable', async () => { + let testColumnMeta = { ...columnMeta, source: '' }; + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data: [{ columnMeta: testColumnMeta }], + }) + ).toEqual(false); + + testColumnMeta = { ...columnMeta, sourceParams: { indexPatternId: '' } }; + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data: [{ columnMeta: testColumnMeta }], + }) + ).toEqual(false); + }); + + it('should return false if not in Security', async () => { + currentAppId$.next('not security'); + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data, + }) + ).toEqual(false); + }); + + it('should return true if everything is okay', async () => { + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data, + }) + ).toEqual(true); + }); + }); + + describe('execute', () => { + it('should execute normally', async () => { + await addToTimelineAction.execute({ + embeddable: lensEmbeddable, + data, + }); + expect(mockDispatch).toHaveBeenCalledTimes(2); + expect(mockDispatch).toHaveBeenCalledWith({ + type: addProvider.type, + payload: { + id: TimelineId.active, + providers: [ + { + and: [], + enabled: true, + excluded: false, + id: 'event-details-value-default-draggable-timeline-1-event_1-user_name-0-the value', + kqlQuery: '', + name: 'user.name', + queryMatch: { + field: 'user.name', + operator: ':', + value: 'the value', + }, + }, + ], + }, + }); + expect(mockDispatch).toHaveBeenCalledWith({ + type: showTimeline.type, + payload: { + id: TimelineId.active, + show: true, + }, + }); + expect(mockWarningToast).not.toHaveBeenCalled(); + }); + + it('should show warning if no provider added', async () => { + await addToTimelineAction.execute({ + embeddable: lensEmbeddable, + data: [], + }); + expect(mockDispatch).not.toHaveBeenCalled(); + expect(mockWarningToast).toHaveBeenCalled(); + }); + + it('should show warning if no value in the data', async () => { + await addToTimelineAction.execute({ + embeddable: lensEmbeddable, + data: [{ columnMeta }], + }); + expect(mockDispatch).not.toHaveBeenCalled(); + expect(mockWarningToast).toHaveBeenCalled(); + }); + + it('should show warning if no field in the data column meta', async () => { + await addToTimelineAction.execute({ + embeddable: lensEmbeddable, + data: [{ columnMeta: { ...columnMeta, field: undefined }, value }], + }); + expect(mockDispatch).not.toHaveBeenCalled(); + expect(mockWarningToast).toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/actions/add_to_timeline/add_to_timeline_action.ts b/x-pack/plugins/security_solution/public/actions/add_to_timeline/add_to_timeline_action.ts new file mode 100644 index 0000000000000..b51809d56f0d4 --- /dev/null +++ b/x-pack/plugins/security_solution/public/actions/add_to_timeline/add_to_timeline_action.ts @@ -0,0 +1,107 @@ +/* + * 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 type { CellValueContext } from '@kbn/embeddable-plugin/public'; +import { isErrorEmbeddable, isFilterableEmbeddable } from '@kbn/embeddable-plugin/public'; +import { i18n } from '@kbn/i18n'; +import type { Action } from '@kbn/ui-actions-plugin/public'; +import { KibanaServices } from '../../common/lib/kibana'; +import type { SecurityAppStore } from '../../common/store/types'; +import { addProvider, showTimeline } from '../../timelines/store/timeline/actions'; +import type { DataProvider } from '../../../common/types'; +import { TimelineId } from '../../../common/types'; +import { createDataProviders } from './data_provider'; +import { fieldHasCellActions, isInSecurityApp, isLensEmbeddable } from '../utils'; + +export const ACTION_ID = 'addToTimeline'; + +function isDataColumnsFilterable(data?: CellValueContext['data']): boolean { + return ( + !!data && + data.length > 0 && + data.every( + ({ columnMeta }) => + columnMeta && + fieldHasCellActions(columnMeta.field) && + columnMeta.source === 'esaggs' && + columnMeta.sourceParams?.indexPatternId + ) + ); +} + +export class AddToTimelineAction implements Action { + public readonly type = ACTION_ID; + public readonly id = ACTION_ID; + public order = 1; + + private icon = 'timeline'; + private toastsService; + private store; + private currentAppId: string | undefined; + + constructor(store: SecurityAppStore) { + this.store = store; + const { application, notifications } = KibanaServices.get(); + this.toastsService = notifications.toasts; + + application.currentAppId$.subscribe((currentAppId) => { + this.currentAppId = currentAppId; + }); + } + + public getDisplayName() { + return i18n.translate('xpack.securitySolution.actions.cellValue.addToTimeline.displayName', { + defaultMessage: 'Add to timeline', + }); + } + + public getIconType() { + return this.icon; + } + + public async isCompatible({ embeddable, data }: CellValueContext) { + return ( + !isErrorEmbeddable(embeddable) && + isLensEmbeddable(embeddable) && + isFilterableEmbeddable(embeddable) && + isDataColumnsFilterable(data) && + isInSecurityApp(this.currentAppId) + ); + } + + public async execute({ data }: CellValueContext) { + const dataProviders = data.reduce((acc, { columnMeta, value, eventId }) => { + const dataProvider = createDataProviders({ + contextId: TimelineId.active, + fieldType: columnMeta?.type, + values: value, + field: columnMeta?.field, + eventId, + }); + if (dataProvider) { + acc.push(...dataProvider); + } + return acc; + }, []); + + if (dataProviders.length > 0) { + this.store.dispatch(addProvider({ id: TimelineId.active, providers: dataProviders })); + this.store.dispatch(showTimeline({ id: TimelineId.active, show: true })); + } else { + this.toastsService.addWarning({ + title: i18n.translate( + 'xpack.securitySolution.actions.cellValue.addToTimeline.warningTitle', + { defaultMessage: 'Unable to add to timeline' } + ), + text: i18n.translate( + 'xpack.securitySolution.actions.cellValue.addToTimeline.warningMessage', + { defaultMessage: 'Filter received is empty or cannot be added to timeline' } + ), + }); + } + } +} diff --git a/x-pack/plugins/security_solution/public/actions/add_to_timeline/data_provider.ts b/x-pack/plugins/security_solution/public/actions/add_to_timeline/data_provider.ts new file mode 100644 index 0000000000000..e8c2430f29206 --- /dev/null +++ b/x-pack/plugins/security_solution/public/actions/add_to_timeline/data_provider.ts @@ -0,0 +1,121 @@ +/* + * 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 { escapeDataProviderId } from '@kbn/securitysolution-t-grid'; +import { isArray, isString, isEmpty } from 'lodash/fp'; +import { INDICATOR_REFERENCE } from '../../../common/cti/constants'; +import type { DataProvider } from '../../../common/types'; +import { IS_OPERATOR } from '../../../common/types'; +import type { BrowserField } from '../../common/containers/source'; +import { IP_FIELD_TYPE } from '../../explore/network/components/ip'; +import { PORT_NAMES } from '../../explore/network/components/port/helpers'; +import { EVENT_DURATION_FIELD_NAME } from '../../timelines/components/duration'; +import { BYTES_FORMAT } from '../../timelines/components/timeline/body/renderers/bytes'; +import { + GEO_FIELD_TYPE, + MESSAGE_FIELD_NAME, + HOST_NAME_FIELD_NAME, + SIGNAL_RULE_NAME_FIELD_NAME, + EVENT_MODULE_FIELD_NAME, + SIGNAL_STATUS_FIELD_NAME, + AGENT_STATUS_FIELD_NAME, + RULE_REFERENCE_FIELD_NAME, + REFERENCE_URL_FIELD_NAME, + EVENT_URL_FIELD_NAME, +} from '../../timelines/components/timeline/body/renderers/constants'; + +export const getDataProvider = (field: string, id: string, value: string): DataProvider => ({ + and: [], + enabled: true, + id: escapeDataProviderId(id), + name: field, + excluded: false, + kqlQuery: '', + queryMatch: { + field, + value, + operator: IS_OPERATOR, + }, +}); + +export interface CreateDataProviderParams { + contextId?: string; + eventId?: string; + field?: string; + fieldFormat?: string; + fieldFromBrowserField?: BrowserField; + fieldType?: string; + isObjectArray?: boolean; + linkValue?: string | null; + values: string | string[] | null | undefined; +} + +export const createDataProviders = ({ + contextId, + eventId, + field, + fieldFormat, + fieldType, + linkValue, + values, +}: CreateDataProviderParams) => { + if (field == null || values === null || values === undefined) return null; + const arrayValues = Array.isArray(values) ? values : [values]; + return arrayValues.reduce((dataProviders, value, index) => { + let id: string = ''; + const appendedUniqueId = `${contextId}-${eventId}-${field}-${index}-${value}`; + + if (fieldType === GEO_FIELD_TYPE || field === MESSAGE_FIELD_NAME) { + return dataProviders; + } else if (fieldType === IP_FIELD_TYPE) { + id = `formatted-ip-data-provider-${contextId}-${field}-${value}-${eventId}`; + if (isString(value) && !isEmpty(value)) { + let addresses = value; + try { + addresses = JSON.parse(value); + } catch (_) { + // Default to keeping the existing string value + } + if (isArray(addresses)) { + addresses.forEach((ip) => dataProviders.push(getDataProvider(field, id, ip))); + } else { + dataProviders.push(getDataProvider(field, id, addresses)); + } + return dataProviders; + } + } else if (PORT_NAMES.some((portName) => field === portName)) { + id = `port-default-draggable-${appendedUniqueId}`; + } else if (field === EVENT_DURATION_FIELD_NAME) { + id = `duration-default-draggable-${appendedUniqueId}`; + } else if (field === HOST_NAME_FIELD_NAME) { + id = `event-details-value-default-draggable-${appendedUniqueId}`; + } else if (fieldFormat === BYTES_FORMAT) { + id = `bytes-default-draggable-${appendedUniqueId}`; + } else if (field === SIGNAL_RULE_NAME_FIELD_NAME) { + id = `event-details-value-default-draggable-${appendedUniqueId}-${linkValue}`; + } else if (field === EVENT_MODULE_FIELD_NAME) { + id = `event-details-value-default-draggable-${appendedUniqueId}-${value}`; + } else if (field === SIGNAL_STATUS_FIELD_NAME) { + id = `alert-details-value-default-draggable-${appendedUniqueId}`; + } else if (field === AGENT_STATUS_FIELD_NAME) { + id = `event-details-value-default-draggable-${appendedUniqueId}`; + } else if ( + [ + RULE_REFERENCE_FIELD_NAME, + REFERENCE_URL_FIELD_NAME, + EVENT_URL_FIELD_NAME, + INDICATOR_REFERENCE, + ].includes(field) + ) { + id = `event-details-value-default-draggable-${appendedUniqueId}-${value}`; + } else { + id = `event-details-value-default-draggable-${appendedUniqueId}`; + } + dataProviders.push(getDataProvider(field, id, value)); + return dataProviders; + }, []); +}; diff --git a/x-pack/plugins/security_solution/public/actions/add_to_timeline/index.ts b/x-pack/plugins/security_solution/public/actions/add_to_timeline/index.ts new file mode 100644 index 0000000000000..59df42bfc3fc5 --- /dev/null +++ b/x-pack/plugins/security_solution/public/actions/add_to_timeline/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export { AddToTimelineAction } from './add_to_timeline_action'; diff --git a/x-pack/plugins/security_solution/public/actions/copy_to_clipboard/copy_to_clipboard_action.test.ts b/x-pack/plugins/security_solution/public/actions/copy_to_clipboard/copy_to_clipboard_action.test.ts new file mode 100644 index 0000000000000..d8636a1e03b55 --- /dev/null +++ b/x-pack/plugins/security_solution/public/actions/copy_to_clipboard/copy_to_clipboard_action.test.ts @@ -0,0 +1,170 @@ +/* + * 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 type { CellValueContext, EmbeddableInput, IEmbeddable } from '@kbn/embeddable-plugin/public'; +import { ErrorEmbeddable } from '@kbn/embeddable-plugin/public'; +import { LENS_EMBEDDABLE_TYPE } from '@kbn/lens-plugin/public'; +import { CopyToClipboardAction } from './copy_to_clipboard_action'; +import { KibanaServices } from '../../common/lib/kibana'; +import { APP_UI_ID } from '../../../common/constants'; +import { Subject } from 'rxjs'; + +jest.mock('../../common/lib/kibana'); +const currentAppId$ = new Subject(); +KibanaServices.get().application.currentAppId$ = currentAppId$.asObservable(); +const mockSuccessToast = jest.fn(); +KibanaServices.get().notifications.toasts.addSuccess = mockSuccessToast; + +const mockCopy = jest.fn((text: string) => true); +jest.mock('copy-to-clipboard', () => (text: string) => mockCopy(text)); + +class MockEmbeddable { + public type; + constructor(type: string) { + this.type = type; + } + getFilters() {} + getQuery() {} +} + +const lensEmbeddable = new MockEmbeddable(LENS_EMBEDDABLE_TYPE) as unknown as IEmbeddable; + +const columnMeta = { + field: 'user.name', + type: 'string' as const, + source: 'esaggs', + sourceParams: { indexPatternId: 'some-pattern-id' }, +}; +const data: CellValueContext['data'] = [{ columnMeta, value: 'the value' }]; + +describe('CopyToClipboardAction', () => { + const addToTimelineAction = new CopyToClipboardAction(); + + beforeEach(() => { + currentAppId$.next(APP_UI_ID); + jest.clearAllMocks(); + }); + + it('should return display name', () => { + expect(addToTimelineAction.getDisplayName()).toEqual('Copy to clipboard'); + }); + + it('should return icon type', () => { + expect(addToTimelineAction.getIconType()).toEqual('copyClipboard'); + }); + + describe('isCompatible', () => { + it('should return false if error embeddable', async () => { + expect( + await addToTimelineAction.isCompatible({ + embeddable: new ErrorEmbeddable('some error', {} as EmbeddableInput), + data, + }) + ).toEqual(false); + }); + + it('should return false if not lens embeddable', async () => { + expect( + await addToTimelineAction.isCompatible({ + embeddable: new MockEmbeddable('not_lens') as unknown as IEmbeddable, + data, + }) + ).toEqual(false); + }); + + it('should return false if data is empty', async () => { + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data: [], + }) + ).toEqual(false); + }); + + it('should return false if data do not have column meta', async () => { + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data: [{}], + }) + ).toEqual(false); + }); + + it('should return false if data column meta do not have field', async () => { + const { field, ...testColumnMeta } = columnMeta; + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data: [{ columnMeta: testColumnMeta }], + }) + ).toEqual(false); + }); + + it('should return false if data column meta field is blacklisted', async () => { + const testColumnMeta = { ...columnMeta, field: 'signal.reason' }; + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data: [{ columnMeta: testColumnMeta }], + }) + ).toEqual(false); + }); + + it('should return false if not in Security', async () => { + currentAppId$.next('not security'); + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data, + }) + ).toEqual(false); + }); + + it('should return true if everything is okay', async () => { + expect( + await addToTimelineAction.isCompatible({ + embeddable: lensEmbeddable, + data, + }) + ).toEqual(true); + }); + }); + + describe('execute', () => { + it('should execute normally', async () => { + await addToTimelineAction.execute({ + embeddable: lensEmbeddable, + data, + }); + expect(mockCopy).toHaveBeenCalledWith('user.name: "the value"'); + expect(mockSuccessToast).toHaveBeenCalled(); + }); + + it('should execute with multiple values', async () => { + await addToTimelineAction.execute({ + embeddable: lensEmbeddable, + data: [ + ...data, + { columnMeta: { ...columnMeta, field: 'host.name' }, value: 'host name value' }, + ], + }); + expect(mockCopy).toHaveBeenCalledWith( + 'user.name: "the value" | host.name: "host name value"' + ); + expect(mockSuccessToast).toHaveBeenCalled(); + }); + + it('should show warning if no provider added', async () => { + mockCopy.mockReturnValue(false); + await addToTimelineAction.execute({ + embeddable: lensEmbeddable, + data: [], + }); + expect(mockSuccessToast).not.toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/actions/copy_to_clipboard/copy_to_clipboard_action.ts b/x-pack/plugins/security_solution/public/actions/copy_to_clipboard/copy_to_clipboard_action.ts new file mode 100644 index 0000000000000..45e975406be02 --- /dev/null +++ b/x-pack/plugins/security_solution/public/actions/copy_to_clipboard/copy_to_clipboard_action.ts @@ -0,0 +1,81 @@ +/* + * 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 type { CellValueContext } from '@kbn/embeddable-plugin/public'; +import { isErrorEmbeddable } from '@kbn/embeddable-plugin/public'; +import { i18n } from '@kbn/i18n'; +import type { Action } from '@kbn/ui-actions-plugin/public'; +import copy from 'copy-to-clipboard'; +import { KibanaServices } from '../../common/lib/kibana'; +import { fieldHasCellActions, isInSecurityApp, isLensEmbeddable } from '../utils'; + +export const ACTION_ID = 'copyToClipboard'; + +function isDataColumnsValid(data?: CellValueContext['data']): boolean { + return ( + !!data && + data.length > 0 && + data.every(({ columnMeta }) => columnMeta && fieldHasCellActions(columnMeta.field)) + ); +} + +export class CopyToClipboardAction implements Action { + public readonly type = ACTION_ID; + public readonly id = ACTION_ID; + public order = 2; + + private icon = 'copyClipboard'; + + private toastsService; + private currentAppId: string | undefined; + + constructor() { + const { application, notifications } = KibanaServices.get(); + this.toastsService = notifications.toasts; + + application.currentAppId$.subscribe((currentAppId) => { + this.currentAppId = currentAppId; + }); + } + + public getDisplayName() { + return i18n.translate('xpack.securitySolution.actions.cellValue.copyToClipboard.displayName', { + defaultMessage: 'Copy to clipboard', + }); + } + + public getIconType() { + return this.icon; + } + + public async isCompatible({ embeddable, data }: CellValueContext) { + return ( + !isErrorEmbeddable(embeddable) && + isLensEmbeddable(embeddable) && + isDataColumnsValid(data) && + isInSecurityApp(this.currentAppId) + ); + } + + public async execute({ data }: CellValueContext) { + const text = data + .map(({ columnMeta, value }) => `${columnMeta?.field}${value != null ? `: "${value}"` : ''}`) + .join(' | '); + + const isSuccess = copy(text, { debug: true }); + + if (isSuccess) { + this.toastsService.addSuccess({ + title: i18n.translate( + 'xpack.securitySolution.actions.cellValue.copyToClipboard.successMessage', + { defaultMessage: 'Copied to the clipboard' } + ), + toastLifeTimeMs: 800, + }); + } + } +} diff --git a/x-pack/plugins/security_solution/public/actions/copy_to_clipboard/index.ts b/x-pack/plugins/security_solution/public/actions/copy_to_clipboard/index.ts new file mode 100644 index 0000000000000..d9e1ddf1af815 --- /dev/null +++ b/x-pack/plugins/security_solution/public/actions/copy_to_clipboard/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export { CopyToClipboardAction } from './copy_to_clipboard_action'; diff --git a/x-pack/plugins/security_solution/public/actions/index.ts b/x-pack/plugins/security_solution/public/actions/index.ts new file mode 100644 index 0000000000000..25c02feb0276c --- /dev/null +++ b/x-pack/plugins/security_solution/public/actions/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export { registerActions } from './register'; diff --git a/x-pack/plugins/security_solution/public/actions/jest.config.js b/x-pack/plugins/security_solution/public/actions/jest.config.js new file mode 100644 index 0000000000000..0c09f187ec983 --- /dev/null +++ b/x-pack/plugins/security_solution/public/actions/jest.config.js @@ -0,0 +1,24 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../..', + roots: ['/x-pack/plugins/security_solution/public/actions'], + coverageDirectory: + '/target/kibana-coverage/jest/x-pack/plugins/security_solution/public/actions', + coverageReporters: ['text', 'html'], + collectCoverageFrom: ['/x-pack/plugins/security_solution/public/actions/**/*.{ts,tsx}'], + // See: https://github.com/elastic/kibana/issues/117255, the moduleNameMapper creates mocks to avoid memory leaks from kibana core. + moduleNameMapper: { + 'core/server$': '/x-pack/plugins/security_solution/server/__mocks__/core.mock.ts', + 'task_manager/server$': + '/x-pack/plugins/security_solution/server/__mocks__/task_manager.mock.ts', + 'alerting/server$': '/x-pack/plugins/security_solution/server/__mocks__/alert.mock.ts', + 'actions/server$': '/x-pack/plugins/security_solution/server/__mocks__/action.mock.ts', + }, +}; diff --git a/x-pack/plugins/security_solution/public/actions/register.ts b/x-pack/plugins/security_solution/public/actions/register.ts new file mode 100644 index 0000000000000..8024b021eac4e --- /dev/null +++ b/x-pack/plugins/security_solution/public/actions/register.ts @@ -0,0 +1,20 @@ +/* + * 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 { CELL_VALUE_TRIGGER } from '@kbn/embeddable-plugin/public'; +import type { UiActionsStart } from '@kbn/ui-actions-plugin/public'; +import type { SecurityAppStore } from '../common/store/types'; +import { AddToTimelineAction } from './add_to_timeline'; +import { CopyToClipboardAction } from './copy_to_clipboard'; + +export const registerActions = (uiActions: UiActionsStart, store: SecurityAppStore) => { + const addToTimelineAction = new AddToTimelineAction(store); + uiActions.addTriggerAction(CELL_VALUE_TRIGGER, addToTimelineAction); + + const copyToClipboardAction = new CopyToClipboardAction(); + uiActions.addTriggerAction(CELL_VALUE_TRIGGER, copyToClipboardAction); +}; diff --git a/x-pack/plugins/security_solution/public/actions/utils.ts b/x-pack/plugins/security_solution/public/actions/utils.ts new file mode 100644 index 0000000000000..1753cd607554e --- /dev/null +++ b/x-pack/plugins/security_solution/public/actions/utils.ts @@ -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 type { IEmbeddable } from '@kbn/embeddable-plugin/public'; +import { LENS_EMBEDDABLE_TYPE, type Embeddable as LensEmbeddable } from '@kbn/lens-plugin/public'; +import { APP_UI_ID } from '../../common/constants'; +import { FIELDS_WITHOUT_CELL_ACTIONS } from '../common/lib/cell_actions/constants'; + +export const isInSecurityApp = (currentAppId?: string): boolean => { + return !!currentAppId && currentAppId === APP_UI_ID; +}; + +export const isLensEmbeddable = (embeddable: IEmbeddable): embeddable is LensEmbeddable => { + return embeddable.type === LENS_EMBEDDABLE_TYPE; +}; + +export const fieldHasCellActions = (field?: string): boolean => { + return !!field && !FIELDS_WITHOUT_CELL_ACTIONS.includes(field); +}; diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/ml_modules.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/ml_modules.tsx index 5b05a4e4509bb..642a01266ded6 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/ml_modules.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/ml_modules.tsx @@ -11,8 +11,8 @@ * */ export const mlModules: string[] = [ - 'siem_cloudtrail', - 'siem_packetbeat', + 'security_cloudtrail', + 'security_packetbeat', 'security_auth', 'security_linux_v3', 'security_network', diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/nav_item_beta_badge.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/nav_item_beta_badge.tsx index c37bd1ff85159..6bad16c6cbf29 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/nav_item_beta_badge.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/nav_item_beta_badge.tsx @@ -20,6 +20,8 @@ export const NavItemBetaBadge = ({ text, className }: { text?: string; className css={css` margin-left: ${euiTheme.size.s}; color: ${euiTheme.colors.text}; + vertical-align: middle; + margin-bottom: ${euiTheme.size.xxs}; `} className={className} /> diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/solution_grouped_nav.styles.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/solution_grouped_nav.styles.tsx index aaeb7e65bc7e8..79e77565bb6f3 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/solution_grouped_nav.styles.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/solution_grouped_nav.styles.tsx @@ -9,7 +9,7 @@ import styled from 'styled-components'; export const EuiListGroupItemStyled = styled(EuiListGroupItem)` font-weight: ${({ theme }) => theme.eui.euiFontWeightRegular}; - &.solutionGroupedNavItem--isPrimary { + &.solutionGroupedNavItem--isPrimary * { font-weight: ${({ theme }) => theme.eui.euiFontWeightBold}; } &:focus, @@ -21,6 +21,7 @@ export const EuiListGroupItemStyled = styled(EuiListGroupItem)` .solutionGroupedNavItemButton:focus, .solutionGroupedNavItemButton:focus-within, .solutionGroupedNavItemButton:hover { - background-color: ${({ theme }) => transparentize(theme.eui.euiColorPrimary, 0.1)}; + transform: none; /* prevent translationY transform that causes misalignment within the list item */ + background-color: ${({ theme }) => transparentize(theme.eui.euiColorPrimary, 0.2)}; } `; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/solution_grouped_nav_panel.styles.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/solution_grouped_nav_panel.styles.tsx index dc54976bb12e3..5f5b2759e1cb8 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/solution_grouped_nav_panel.styles.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/solution_grouped_nav_panel.styles.tsx @@ -4,13 +4,13 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiPanel } from '@elastic/eui'; +import { EuiPanel, EuiTitle, transparentize } from '@elastic/eui'; import styled from 'styled-components'; export const EuiPanelStyled = styled(EuiPanel)<{ $bottomOffset?: string }>` position: fixed; - top: 95px; - left: 247px; + top: 93px; + left: 249px; bottom: 0; width: 340px; height: inherit; @@ -27,11 +27,26 @@ export const EuiPanelStyled = styled(EuiPanel)<{ $bottomOffset?: string }>` // right ${theme.eui.euiSizeS} 0 ${theme.eui.euiSizeS} -${theme.eui.euiSizeS} rgb(0 0 0 / 15%), // bottom inset to match timeline bar top shadow - inset 0 -${theme.eui.euiSizeXS} ${theme.eui.euiSizeXS} -${theme.eui.euiSizeXS} rgb(0 0 0 / 6%); + inset 0 -6px ${theme.eui.euiSizeXS} -${theme.eui.euiSizeXS} rgb(0 0 0 / 15%); `} + + .solutionGroupedNavPanelLink { + .solutionGroupedNavPanelLinkItem { + background-color: transparent; /* originally white, it prevents panel to remove the bottom inset box shadow */ + &:hover { + background-color: ${({ theme }) => transparentize(theme.eui.euiColorPrimary, 0.1)}; + } + dt { + color: ${({ theme }) => theme.eui.euiColorPrimaryText}; + } + dd { + color: ${({ theme }) => theme.eui.euiColorDarkestShade}; + } + } + } `; -export const FlexLink = styled.a` - display: flex; - align-items: center; +export const EuiTitleStyled = styled(EuiTitle)<{ $paddingTop?: boolean }>` + padding-left: ${({ theme }) => theme.eui.euiSizeS}; + ${({ $paddingTop = false, theme }) => $paddingTop && `padding-top: ${theme.eui.euiSizeS};`}; `; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/solution_grouped_nav_panel.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/solution_grouped_nav_panel.tsx index cf38f0c60ebfa..54561755a5322 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/solution_grouped_nav_panel.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/solution_grouped_nav_panel.tsx @@ -15,15 +15,15 @@ import { EuiFocusTrap, EuiHorizontalRule, EuiOutsideClickDetector, + EuiPanel, EuiPortal, EuiSpacer, - EuiTitle, EuiWindowEvent, keys, useIsWithinMinBreakpoint, } from '@elastic/eui'; import classNames from 'classnames'; -import { EuiPanelStyled, FlexLink } from './solution_grouped_nav_panel.styles'; +import { EuiPanelStyled, EuiTitleStyled } from './solution_grouped_nav_panel.styles'; import type { DefaultSideNavItem } from './types'; import type { LinkCategories } from '../../../links/types'; import { NavItemBetaBadge } from '../nav_item_beta_badge'; @@ -84,14 +84,14 @@ const SolutionNavPanelComponent: React.FC = ({ hasShadow={!bottomOffsetLargerBreakpoint} $bottomOffset={bottomOffsetLargerBreakpoint} borderRadius="none" - paddingSize="l" + paddingSize="m" data-test-subj="groupedNavPanel" > - + {title} - + @@ -141,10 +141,10 @@ const SolutionNavPanelCategories: React.FC = ({ return ( - +

{label}

-
- + +
@@ -154,27 +154,31 @@ const SolutionNavPanelCategories: React.FC = ({ ); }; -const SolutionNavPanelItems: React.FC = ({ items, onClose }) => ( - <> - {items.map(({ id, href, onClick, label, description, isBeta, betaOptions }) => ( - - - { - onClose(); - if (onClick) { - onClick(ev); - } - }} - > - {label} - {isBeta && } - - - {description} - - ))} - -); +const SolutionNavPanelItems: React.FC = ({ items, onClose }) => { + const panelLinkClassNames = classNames('solutionGroupedNavPanelLink'); + const panelLinkItemClassNames = classNames('solutionGroupedNavPanelLinkItem'); + return ( + <> + {items.map(({ id, href, onClick, label, description, isBeta, betaOptions }) => ( + { + onClose(); + onClick?.(ev); + }} + > + + + {label} + {isBeta && } + + {description} + + + ))} + + ); +}; diff --git a/x-pack/plugins/security_solution/public/common/components/page/index.tsx b/x-pack/plugins/security_solution/public/common/components/page/index.tsx index 44884c0b15198..aa59b180f5817 100644 --- a/x-pack/plugins/security_solution/public/common/components/page/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/page/index.tsx @@ -78,23 +78,10 @@ export const AppGlobalStyle = createGlobalStyle<{ theme: { eui: { euiColorPrimar ${TIMELINE_OVERRIDES_CSS_STYLESHEET} - .euiDataGridRowCell .euiDataGridRowCell__expandActions .euiDataGridRowCell__actionButtonIcon { - display: none; - - &:first-child, - &:nth-child(2), - &:nth-child(3), - &:last-child { - display: inline-flex; - } - - } - /* overrides the default styling of EuiDataGrid expand popover footer to make it a column of actions instead of the default actions row */ - .euiDataGridRowCell__popover { max-width: 815px !important; @@ -109,13 +96,11 @@ export const AppGlobalStyle = createGlobalStyle<{ theme: { eui: { euiColorPrimar } } - &.euiPopover__panel[data-popover-open] { padding: 8px 0; min-width: 65px; } - .euiPopoverFooter { border: 0; margin-top: 0 !important; @@ -123,14 +108,6 @@ export const AppGlobalStyle = createGlobalStyle<{ theme: { eui: { euiColorPrimar flex-direction: column; } } - - // Hide EUI's 'Filter in' and 'Filter out' footer buttons - replaced with our own buttons - .euiPopoverFooter:nth-child(2) { - .euiFlexItem:first-child, - .euiFlexItem:nth-child(2) { - display: none; - } - } } /* overrides default styling in angular code that was not theme-friendly */ diff --git a/x-pack/plugins/security_solution/public/common/hooks/api/__mock__/api.tsx b/x-pack/plugins/security_solution/public/common/hooks/api/__mock__/api.tsx deleted file mode 100644 index 14e9a972eefbe..0000000000000 --- a/x-pack/plugins/security_solution/public/common/hooks/api/__mock__/api.tsx +++ /dev/null @@ -1,27 +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 type { IndexPatternSavedObject } from '../../types'; - -export const mockIndexPatternSavedObjects: IndexPatternSavedObject[] = [ - { - type: 'index-pattern', - id: '2d1fe420-eeee-11e9-ad95-4b5e687c2aee', - attributes: { - title: 'filebeat-*', - }, - _version: 'WzE4LLwxXQ==', - }, - { - type: 'index-pattern', - id: '5463ec70-c7ba-ffff-ad95-4b5e687c2aee', - attributes: { - title: 'auditbeat-*', - }, - _version: 'WzELLywxXQ==', - }, -]; diff --git a/x-pack/plugins/security_solution/public/common/hooks/api/api.tsx b/x-pack/plugins/security_solution/public/common/hooks/api/api.tsx deleted file mode 100644 index e459874c27392..0000000000000 --- a/x-pack/plugins/security_solution/public/common/hooks/api/api.tsx +++ /dev/null @@ -1,26 +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 type { StartServices } from '../../../types'; -import type { IndexPatternSavedObject, IndexPatternSavedObjectAttributes } from '../types'; - -/** - * Fetches Configured Index Patterns from the Kibana saved objects API - * - * TODO: Refactor to context provider: https://github.com/elastic/siem-team/issues/448 - */ -export const getIndexPatterns = async ( - savedObjects: StartServices['savedObjects'] -): Promise => { - const response = await savedObjects.client.find({ - type: 'index-pattern', - fields: ['title'], - perPage: 10000, - }); - - return response.savedObjects; -}; diff --git a/x-pack/plugins/security_solution/public/common/hooks/api/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/hooks/api/helpers.test.tsx deleted file mode 100644 index 3b75dcbd7a6f4..0000000000000 --- a/x-pack/plugins/security_solution/public/common/hooks/api/helpers.test.tsx +++ /dev/null @@ -1,40 +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 { getIndexPatternTitleIdMapping, getIndexPatternTitles } from './helpers'; -import { mockIndexPatternSavedObjects } from './__mock__/api'; - -describe('helpers', () => { - describe('getIndexPatternTitles', () => { - test('returns empty array when no index patterns are provided', () => { - const indexPatternTitles = getIndexPatternTitles([]); - expect(indexPatternTitles.length).toEqual(0); - }); - - test('returns titles when index patterns are provided', () => { - const indexPatternTitles = getIndexPatternTitles(mockIndexPatternSavedObjects); - expect(indexPatternTitles).toEqual(['filebeat-*', 'auditbeat-*']); - }); - }); - - describe('getIndexPatternTitleIdMapping', () => { - test('returns empty array when no index patterns are provided', () => { - const indexPatternTitleIdMapping = getIndexPatternTitleIdMapping([]); - expect(indexPatternTitleIdMapping.length).toEqual(0); - }); - - test('returns correct mapping when index patterns are provided', () => { - const indexPatternTitleIdMapping = getIndexPatternTitleIdMapping( - mockIndexPatternSavedObjects - ); - expect(indexPatternTitleIdMapping).toEqual([ - { id: '2d1fe420-eeee-11e9-ad95-4b5e687c2aee', title: 'filebeat-*' }, - { id: '5463ec70-c7ba-ffff-ad95-4b5e687c2aee', title: 'auditbeat-*' }, - ]); - }); - }); -}); diff --git a/x-pack/plugins/security_solution/public/common/hooks/api/helpers.tsx b/x-pack/plugins/security_solution/public/common/hooks/api/helpers.tsx deleted file mode 100644 index cc0f943f0aee3..0000000000000 --- a/x-pack/plugins/security_solution/public/common/hooks/api/helpers.tsx +++ /dev/null @@ -1,32 +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 type { IndexPatternSavedObject } from '../types'; - -/** - * Returns a string array of Index Pattern Titles - * - * @param indexPatterns IndexPatternSavedObject[] as provided from the useIndexPatterns() hook - */ -export const getIndexPatternTitles = (indexPatterns: IndexPatternSavedObject[]): string[] => - indexPatterns.reduce((acc, v) => [...acc, v.attributes.title], []); - -/** - * Returns a mapping of indexPatternTitle to indexPatternId - * - * @param indexPatterns IndexPatternSavedObject[] as provided from the useIndexPatterns() hook - */ -export const getIndexPatternTitleIdMapping = ( - indexPatterns: IndexPatternSavedObject[] -): Array<{ title: string; id: string }> => - indexPatterns.reduce>((acc, v) => { - if (v.attributes && v.attributes.title) { - return [...acc, { title: v.attributes.title, id: v.id }]; - } else { - return acc; - } - }, []); diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_control.test.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_control.test.tsx deleted file mode 100644 index a64ac91f09cd7..0000000000000 --- a/x-pack/plugins/security_solution/public/common/hooks/use_control.test.tsx +++ /dev/null @@ -1,43 +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 { renderHook, act } from '@testing-library/react-hooks'; -import type { UseControlsReturn } from './use_control'; -import { useControl } from './use_control'; - -describe('useControl', () => { - it('init', async () => { - const { result } = renderHook<{}, UseControlsReturn>(() => useControl()); - expect(result.current.isControlOpen).toBe(false); - }); - - it('should open the control', async () => { - const { result } = renderHook<{}, UseControlsReturn>(() => useControl()); - - act(() => { - result.current.openControl(); - }); - - expect(result.current.isControlOpen).toBe(true); - }); - - it('should close the control', async () => { - const { result } = renderHook<{}, UseControlsReturn>(() => useControl()); - - act(() => { - result.current.openControl(); - }); - - expect(result.current.isControlOpen).toBe(true); - - act(() => { - result.current.closeControl(); - }); - - expect(result.current.isControlOpen).toBe(false); - }); -}); diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_control.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_control.tsx deleted file mode 100644 index 37d7f4ff79986..0000000000000 --- a/x-pack/plugins/security_solution/public/common/hooks/use_control.tsx +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { useState, useCallback } from 'react'; - -export interface UseControlsReturn { - isControlOpen: boolean; - openControl: () => void; - closeControl: () => void; -} - -export const useControl = (): UseControlsReturn => { - const [isControlOpen, setIsControlOpen] = useState(false); - const openControl = useCallback(() => setIsControlOpen(true), []); - const closeControl = useCallback(() => setIsControlOpen(false), []); - - return { isControlOpen, openControl, closeControl }; -}; diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_enable_risk_score_via_dev_tools.test.ts b/x-pack/plugins/security_solution/public/common/hooks/use_enable_risk_score_via_dev_tools.test.ts deleted file mode 100644 index adcdaba0b8001..0000000000000 --- a/x-pack/plugins/security_solution/public/common/hooks/use_enable_risk_score_via_dev_tools.test.ts +++ /dev/null @@ -1,33 +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 { renderHook } from '@testing-library/react-hooks'; -import { RiskScoreEntity } from '../../../common/search_strategy'; -import { useEnableRiskScoreViaDevTools } from './use_enable_risk_score_via_dev_tools'; - -jest.mock('./use_space_id', () => { - return { useSpaceId: () => 'myspace' }; -}); - -describe('useEnableRiskScoreViaDevTools', () => { - beforeAll(() => { - Object.defineProperty(window, 'location', { - value: { - port: 'testPort', - protocol: 'testProtocol', - hostname: 'testhostname', - }, - }); - }); - - it('renders the correct path', () => { - const { result } = renderHook(() => useEnableRiskScoreViaDevTools(RiskScoreEntity.host)); - expect(result.current).toEqual( - '/s/myspace/app/dev_tools#/console?load_from=testProtocol//testhostname:testPort/s/myspace/internal/risk_score/prebuilt_content/dev_tool/enable_host_risk_score' - ); - }); -}); diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_enable_risk_score_via_dev_tools.ts b/x-pack/plugins/security_solution/public/common/hooks/use_enable_risk_score_via_dev_tools.ts deleted file mode 100644 index 2e59232bfae73..0000000000000 --- a/x-pack/plugins/security_solution/public/common/hooks/use_enable_risk_score_via_dev_tools.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { useMemo } from 'react'; -import { devToolPrebuiltContentUrl } from '../../../common/constants'; -import type { RiskScoreEntity } from '../../../common/search_strategy'; -import { useSpaceId } from './use_space_id'; - -export const useEnableRiskScoreViaDevTools = (moduleName: RiskScoreEntity) => { - const spaceId = useSpaceId(); - const riskScoreConsoleId = `enable_${moduleName}_risk_score`; - const loadFromUrl = useMemo(() => { - const protocol = window.location.protocol; - const hostname = window.location.hostname; - const port = window.location.port; - return `/s/${spaceId}/app/dev_tools#/console?load_from=${protocol}//${hostname}:${port}${devToolPrebuiltContentUrl( - spaceId ?? 'default', - riskScoreConsoleId - )}`; - }, [riskScoreConsoleId, spaceId]); - return loadFromUrl; -}; diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_index_patterns.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_index_patterns.tsx deleted file mode 100644 index 1f33d340eca0f..0000000000000 --- a/x-pack/plugins/security_solution/public/common/hooks/use_index_patterns.tsx +++ /dev/null @@ -1,53 +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 { useEffect, useState } from 'react'; - -import { useKibana } from '../lib/kibana'; -import { errorToToaster, useStateToaster } from '../components/toasters'; - -import * as i18n from './translations'; -import type { IndexPatternSavedObject } from './types'; -import { getIndexPatterns } from './api/api'; - -type Return = [boolean, IndexPatternSavedObject[]]; - -export const useIndexPatterns = (refreshToggle = false): Return => { - const [indexPatterns, setIndexPatterns] = useState([]); - const [isLoading, setIsLoading] = useState(true); - const [, dispatchToaster] = useStateToaster(); - const { savedObjects } = useKibana().services; - - useEffect(() => { - let isSubscribed = true; - setIsLoading(true); - - async function fetchIndexPatterns() { - try { - const data = await getIndexPatterns(savedObjects); - - if (isSubscribed) { - setIndexPatterns(data); - setIsLoading(false); - } - } catch (error) { - if (isSubscribed) { - errorToToaster({ title: i18n.INDEX_PATTERN_FETCH_FAILURE, error, dispatchToaster }); - setIsLoading(false); - } - } - } - - fetchIndexPatterns(); - return () => { - isSubscribed = false; - }; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [refreshToggle]); - - return [isLoading, indexPatterns]; -}; diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.test.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.test.tsx index b15a649f15cac..6a17fe6df79b6 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.test.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.test.tsx @@ -64,6 +64,7 @@ describe('default cell actions', () => { initialWidth: 105, }, ]); + describe.each(columnHeadersToTest)('columns with a link action', (columnHeaders) => { test(`${columnHeaders.id ?? columnHeaders.type}`, () => { const columnsWithCellActions: EuiDataGridColumn[] = [columnHeaders].map((header) => { diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.test.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.test.tsx index b565872659f12..e20c4887c0df9 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.test.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.test.tsx @@ -30,12 +30,4 @@ describe('ExpandedCellValueActions', () => { test('renders show topN button', () => { expect(wrapper.find('[data-test-subj="data-grid-expanded-show-top-n"]').exists()).toBeTruthy(); }); - - test('renders filter in button', () => { - expect(wrapper.find('EuiFlexItem').first().html()).toContain('Filter button'); - }); - - test('renders filter out button', () => { - expect(wrapper.find('EuiFlexItem').last().html()).toContain('Filter out button'); - }); }); diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.tsx index 4711c6d8b68e0..4d36c450fd177 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { EuiButtonEmpty } from '@elastic/eui'; import { noop } from 'lodash/fp'; import React, { useMemo, useState, useCallback } from 'react'; import styled from 'styled-components'; @@ -13,7 +13,6 @@ import type { Filter } from '@kbn/es-query'; import type { ColumnHeaderOptions } from '../../../../common/types'; import { allowTopN } from '../../components/drag_and_drop/helpers'; import { ShowTopNButton } from '../../components/hover_actions/actions/show_top_n'; -import { useKibana } from '../kibana'; import { SHOW_TOP_VALUES, HIDE_TOP_VALUES } from './translations'; interface Props { @@ -22,16 +21,10 @@ interface Props { scopeId: string; value: string[] | undefined; onFilterAdded?: () => void; - closeCellPopover?: () => void; } -const StyledFlexGroup = styled(EuiFlexGroup)` - border-top: 1px solid #d3dae6; +const StyledContent = styled.div<{ $isDetails: boolean }>` border-bottom: 1px solid #d3dae6; - margin-top: 2px; -`; - -export const StyledContent = styled.div<{ $isDetails: boolean }>` padding: ${({ $isDetails }) => ($isDetails ? '0 8px' : undefined)}; `; @@ -41,14 +34,7 @@ const ExpandedCellValueActionsComponent: React.FC = ({ onFilterAdded, scopeId, value, - closeCellPopover, }) => { - const { - timelines, - data: { - query: { filterManager }, - }, - } = useKibana().services; const showButton = useMemo( () => allowTopN({ @@ -90,34 +76,6 @@ const ExpandedCellValueActionsComponent: React.FC = ({ /> ) : null} - - - {timelines.getHoverActions().getFilterForValueButton({ - Component: EuiButtonEmpty, - field: field.id, - filterManager, - onFilterAdded, - ownFocus: false, - size: 's', - showTooltip: false, - value, - onClick: closeCellPopover, - })} - - - {timelines.getHoverActions().getFilterOutValueButton({ - Component: EuiButtonEmpty, - field: field.id, - filterManager, - onFilterAdded, - ownFocus: false, - size: 's', - showTooltip: false, - value, - onClick: closeCellPopover, - })} - - ); }; diff --git a/x-pack/plugins/security_solution/public/common/lib/helpers/index.tsx b/x-pack/plugins/security_solution/public/common/lib/helpers/index.tsx index e233d397b1f70..2eb859f97e6ac 100644 --- a/x-pack/plugins/security_solution/public/common/lib/helpers/index.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/helpers/index.tsx @@ -30,4 +30,4 @@ export type ValueOf = T[keyof T]; */ export const gutterTimeline = '70px'; // Michael: Temporary until timeline is moved. -export const bottomNavOffset = '51px'; +export const bottomNavOffset = '50px'; diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts index dc790b99c13d1..f7d94a994b919 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts @@ -23,9 +23,17 @@ import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; const mockStartServicesMock = createStartServicesMock(); export const KibanaServices = { get: jest.fn(() => { - const { http, uiSettings, notifications, data, unifiedSearch } = mockStartServicesMock; + const { application, http, uiSettings, notifications, data, unifiedSearch } = + mockStartServicesMock; - return { http, uiSettings, notifications, data, unifiedSearch }; + return { + application, + http, + uiSettings, + notifications, + data, + unifiedSearch, + }; }), getKibanaVersion: jest.fn(() => '8.0.0'), }; diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/services.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/services.ts index 48ed3d8889fca..a4db8f5c919ba 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kibana/services.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/services.ts @@ -8,7 +8,7 @@ import type { CoreStart } from '@kbn/core/public'; import type { StartPlugins } from '../../../types'; -type GlobalServices = Pick & +type GlobalServices = Pick & Pick; export class KibanaServices { @@ -17,13 +17,14 @@ export class KibanaServices { public static init({ http, + application, data, unifiedSearch, kibanaVersion, uiSettings, notifications, }: GlobalServices & { kibanaVersion: string }) { - this.services = { data, http, uiSettings, unifiedSearch, notifications }; + this.services = { application, data, http, uiSettings, unifiedSearch, notifications }; this.kibanaVersion = kibanaVersion; } diff --git a/x-pack/plugins/security_solution/public/common/store/types.ts b/x-pack/plugins/security_solution/public/common/store/types.ts index a1f90bbd6351f..4229d4d6e3ca1 100644 --- a/x-pack/plugins/security_solution/public/common/store/types.ts +++ b/x-pack/plugins/security_solution/public/common/store/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { Dispatch, Action, Middleware, CombinedState } from 'redux'; +import type { Store, Dispatch, Action, Middleware, CombinedState } from 'redux'; import type { CoreStart } from '@kbn/core/public'; import type { StartPlugins } from '../../types'; @@ -36,6 +36,11 @@ export type State = HostsPluginState & globalUrlParam: GlobalUrlParam; } & DataTableState; +/** + * The Redux store type for the Security app. + */ +export type SecurityAppStore = Store; + /** * like redux's `MiddlewareAPI` but `getState` returns an `Immutable` version of * state and `dispatch` accepts `Immutable` versions of actions. diff --git a/x-pack/plugins/security_solution/public/explore/network/components/embeddables/create_embeddable.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/create_embeddable.test.tsx new file mode 100644 index 0000000000000..5ef6d2a19a28f --- /dev/null +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/create_embeddable.test.tsx @@ -0,0 +1,54 @@ +/* + * 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 { embeddablePluginMock } from '@kbn/embeddable-plugin/public/mocks'; +import { createEmbeddable } from './create_embeddable'; +import { createHtmlPortalNode } from 'react-reverse-portal'; + +const mockEmbeddable = embeddablePluginMock.createStartContract(); + +mockEmbeddable.getEmbeddableFactory = jest.fn().mockImplementation(() => ({ + create: () => ({ + reload: jest.fn(), + setRenderTooltipContent: jest.fn(), + setLayerList: jest.fn(), + }), +})); + +describe('createEmbeddable', () => { + test('attaches refresh action', async () => { + const setQueryMock = jest.fn(); + await createEmbeddable( + [], + [], + { query: '', language: 'kuery' }, + '2020-07-07T08:20:18.966Z', + '2020-07-08T08:20:18.966Z', + setQueryMock, + createHtmlPortalNode(), + mockEmbeddable + ); + expect(setQueryMock).toHaveBeenCalledTimes(1); + }); + + test('attaches refresh action with correct reference', async () => { + const setQueryMock = jest.fn(({ id, inspect, loading, refetch }) => refetch); + const embeddable = await createEmbeddable( + [], + [], + { query: '', language: 'kuery' }, + '2020-07-07T08:20:18.966Z', + '2020-07-08T08:20:18.966Z', + setQueryMock, + createHtmlPortalNode(), + mockEmbeddable + ); + expect(setQueryMock.mock.calls[0][0].refetch).not.toBe(embeddable.reload); + setQueryMock.mock.results[0].value(); + expect(embeddable.reload).toHaveBeenCalledTimes(1); + }); +}); diff --git a/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map_helpers.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/create_embeddable.tsx similarity index 75% rename from x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map_helpers.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/create_embeddable.tsx index 610ae3efb6647..8f4ba98b4ecc5 100644 --- a/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map_helpers.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/create_embeddable.tsx @@ -9,7 +9,6 @@ import uuid from 'uuid'; import React from 'react'; import type { HtmlPortalNode } from 'react-reverse-portal'; import { OutPortal } from 'react-reverse-portal'; -import minimatch from 'minimatch'; import type { Filter, Query } from '@kbn/es-query'; import { MAP_SAVED_OBJECT_TYPE } from '@kbn/maps-plugin/public'; import type { @@ -27,7 +26,6 @@ import type { IndexPatternMapping } from './types'; import { getLayerList } from './map_config'; import * as i18n from './translations'; -import type { IndexPatternSavedObject } from '../../../../common/hooks/types'; import type { GlobalTimeArgs } from '../../../../common/containers/use_global_time'; /** @@ -126,40 +124,3 @@ export const createEmbeddable = async ( return embeddableObject; }; - -// These patterns are overly greedy and must be excluded when matching against Security indexes. -const ignoredIndexPatterns = ['*', '*:*']; - -/** - * Returns kibanaIndexPatterns that wildcard match at least one of siemDefaultIndices - * - * @param kibanaIndexPatterns - * @param siemDefaultIndices - */ -export const findMatchingIndexPatterns = ({ - kibanaIndexPatterns, - siemDefaultIndices, -}: { - kibanaIndexPatterns: IndexPatternSavedObject[]; - siemDefaultIndices: string[]; -}): IndexPatternSavedObject[] => { - try { - return kibanaIndexPatterns.filter((kip) => { - const pattern = kip.attributes.title; - return ( - !ignoredIndexPatterns.includes(pattern) && - siemDefaultIndices.some((sdi) => { - const splitPattern = pattern.split(',') ?? []; - return splitPattern.length > 1 - ? splitPattern.some((p) => { - const isMatch = minimatch(sdi, p); - return isMatch && p.charAt(0) === '-' ? false : isMatch; - }) - : minimatch(sdi, pattern); - }) - ); - }); - } catch { - return []; - } -}; diff --git a/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.test.tsx index 6426e87c246f2..69c82f701d613 100644 --- a/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.test.tsx @@ -12,18 +12,13 @@ import * as redux from 'react-redux'; import { waitFor } from '@testing-library/react'; import '../../../../common/mock/match_media'; -import { useIndexPatterns } from '../../../../common/hooks/use_index_patterns'; import { TestProviders } from '../../../../common/mock'; import { EmbeddedMapComponent } from './embedded_map'; -import { createEmbeddable } from './embedded_map_helpers'; - -const mockUseIndexPatterns = useIndexPatterns as jest.Mock; -jest.mock('../../../../common/hooks/use_index_patterns'); -mockUseIndexPatterns.mockImplementation(() => [true, []]); +import { createEmbeddable } from './create_embeddable'; jest.mock('../../../../common/lib/kibana'); -jest.mock('./embedded_map_helpers', () => ({ +jest.mock('./create_embeddable', () => ({ createEmbeddable: jest.fn(), })); diff --git a/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx index 5fae6c4343ff0..5cc4f11d9b236 100644 --- a/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx @@ -19,7 +19,7 @@ import { Loader } from '../../../../common/components/loader'; import { displayErrorToast, useStateToaster } from '../../../../common/components/toasters'; import type { GlobalTimeArgs } from '../../../../common/containers/use_global_time'; import { Embeddable } from './embeddable'; -import { createEmbeddable } from './embedded_map_helpers'; +import { createEmbeddable } from './create_embeddable'; import { IndexPatternsMissingPrompt } from './index_patterns_missing_prompt'; import { MapToolTip } from './map_tool_tip/map_tool_tip'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map_helpers.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map_helpers.test.tsx deleted file mode 100644 index c82051b11769c..0000000000000 --- a/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map_helpers.test.tsx +++ /dev/null @@ -1,176 +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 { embeddablePluginMock } from '@kbn/embeddable-plugin/public/mocks'; -import { createEmbeddable, findMatchingIndexPatterns } from './embedded_map_helpers'; -import { createHtmlPortalNode } from 'react-reverse-portal'; -import { - mockAPMIndexPattern, - mockAPMRegexIndexPattern, - mockAPMTransactionIndexPattern, - mockAPMTracesDataStreamIndexPattern, - mockAuditbeatIndexPattern, - mockCCSGlobIndexPattern, - mockCommaFilebeatAuditbeatCCSGlobIndexPattern, - mockCommaFilebeatAuditbeatGlobIndexPattern, - mockCommaFilebeatExclusionGlobIndexPattern, - mockFilebeatIndexPattern, - mockGlobIndexPattern, -} from './__mocks__/mock'; - -const mockEmbeddable = embeddablePluginMock.createStartContract(); - -mockEmbeddable.getEmbeddableFactory = jest.fn().mockImplementation(() => ({ - create: () => ({ - reload: jest.fn(), - setRenderTooltipContent: jest.fn(), - setLayerList: jest.fn(), - }), -})); - -describe('embedded_map_helpers', () => { - describe('createEmbeddable', () => { - test('attaches refresh action', async () => { - const setQueryMock = jest.fn(); - await createEmbeddable( - [], - [], - { query: '', language: 'kuery' }, - '2020-07-07T08:20:18.966Z', - '2020-07-08T08:20:18.966Z', - setQueryMock, - createHtmlPortalNode(), - mockEmbeddable - ); - expect(setQueryMock).toHaveBeenCalledTimes(1); - }); - - test('attaches refresh action with correct reference', async () => { - const setQueryMock = jest.fn(({ id, inspect, loading, refetch }) => refetch); - const embeddable = await createEmbeddable( - [], - [], - { query: '', language: 'kuery' }, - '2020-07-07T08:20:18.966Z', - '2020-07-08T08:20:18.966Z', - setQueryMock, - createHtmlPortalNode(), - mockEmbeddable - ); - expect(setQueryMock.mock.calls[0][0].refetch).not.toBe(embeddable.reload); - setQueryMock.mock.results[0].value(); - expect(embeddable.reload).toHaveBeenCalledTimes(1); - }); - }); - - describe('findMatchingIndexPatterns', () => { - const siemDefaultIndices = [ - 'apm-*-transaction*', - 'traces-apm*', - 'auditbeat-*', - 'endgame-*', - 'filebeat-*', - 'packetbeat-*', - 'winlogbeat-*', - ]; - - test('finds exact matching index patterns ', () => { - const matchingIndexPatterns = findMatchingIndexPatterns({ - kibanaIndexPatterns: [mockFilebeatIndexPattern, mockAuditbeatIndexPattern], - siemDefaultIndices, - }); - expect(matchingIndexPatterns).toEqual([mockFilebeatIndexPattern, mockAuditbeatIndexPattern]); - }); - - test('finds glob-matched index patterns ', () => { - const matchingIndexPatterns = findMatchingIndexPatterns({ - kibanaIndexPatterns: [mockAPMIndexPattern, mockFilebeatIndexPattern], - siemDefaultIndices, - }); - expect(matchingIndexPatterns).toEqual([mockAPMIndexPattern, mockFilebeatIndexPattern]); - }); - - test('does not find glob-matched index pattern containing regex', () => { - const matchingIndexPatterns = findMatchingIndexPatterns({ - kibanaIndexPatterns: [mockAPMRegexIndexPattern, mockFilebeatIndexPattern], - siemDefaultIndices, - }); - expect(matchingIndexPatterns).toEqual([mockFilebeatIndexPattern]); - }); - - test('finds exact glob-matched index patterns ', () => { - const matchingIndexPatterns = findMatchingIndexPatterns({ - kibanaIndexPatterns: [ - mockAPMTransactionIndexPattern, - mockAPMTracesDataStreamIndexPattern, - mockFilebeatIndexPattern, - ], - siemDefaultIndices, - }); - expect(matchingIndexPatterns).toEqual([ - mockAPMTransactionIndexPattern, - mockAPMTracesDataStreamIndexPattern, - mockFilebeatIndexPattern, - ]); - }); - - test('excludes glob-only index patterns', () => { - const matchingIndexPatterns = findMatchingIndexPatterns({ - kibanaIndexPatterns: [mockGlobIndexPattern, mockFilebeatIndexPattern], - siemDefaultIndices, - }); - expect(matchingIndexPatterns).toEqual([mockFilebeatIndexPattern]); - }); - - test('excludes glob-only CCS index patterns', () => { - const matchingIndexPatterns = findMatchingIndexPatterns({ - kibanaIndexPatterns: [mockCCSGlobIndexPattern, mockFilebeatIndexPattern], - siemDefaultIndices, - }); - expect(matchingIndexPatterns).toEqual([mockFilebeatIndexPattern]); - }); - - test('matches on comma separated Kibana index pattern', () => { - const matchingIndexPatterns = findMatchingIndexPatterns({ - kibanaIndexPatterns: [ - mockCommaFilebeatAuditbeatGlobIndexPattern, - mockAuditbeatIndexPattern, - ], - siemDefaultIndices, - }); - expect(matchingIndexPatterns).toEqual([ - mockCommaFilebeatAuditbeatGlobIndexPattern, - mockAuditbeatIndexPattern, - ]); - }); - - test('matches on excluded comma separated Kibana index pattern', () => { - const matchingIndexPatterns = findMatchingIndexPatterns({ - kibanaIndexPatterns: [ - mockCommaFilebeatExclusionGlobIndexPattern, - mockAuditbeatIndexPattern, - ], - siemDefaultIndices, - }); - expect(matchingIndexPatterns).toEqual([ - mockCommaFilebeatExclusionGlobIndexPattern, - mockAuditbeatIndexPattern, - ]); - }); - - test('matches on CCS comma separated Kibana index pattern', () => { - const matchingIndexPatterns = findMatchingIndexPatterns({ - kibanaIndexPatterns: [ - mockCommaFilebeatAuditbeatCCSGlobIndexPattern, - mockAuditbeatIndexPattern, - ], - siemDefaultIndices: ['cluster2:filebeat-*', 'cluster1:auditbeat-*'], - }); - expect(matchingIndexPatterns).toEqual([mockCommaFilebeatAuditbeatCCSGlobIndexPattern]); - }); - }); -}); diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/artifact_list_page.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/artifact_list_page.tsx index 6f83fa9d41c95..fa2332eef20c7 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/artifact_list_page.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/artifact_list_page.tsx @@ -315,6 +315,7 @@ export const ArtifactListPage = memo( {!doesDataExist ? ( { let render: ( @@ -60,52 +61,90 @@ describe('When showing the Empty State in ArtifactListPage', () => { expect(renderResult.queryByTestId('header-page-title')).toBe(null); }); - it('should open create flyout when primary button is clicked', async () => { - render(); - const addButton = await renderResult.findByTestId('testPage-emptyState-addButton'); + describe('and user is allowed to Create entries', () => { + it('should show title, about info and add button', async () => { + const { getByTestId, queryByTestId } = render(); - act(() => { - userEvent.click(addButton); - }); + await waitFor(async () => { + expect(getByTestId('testPage-emptyState')); + }); - expect(renderResult.getByTestId('testPage-flyout')).toBeTruthy(); - expect(history.location.search).toMatch(/show=create/); - }); + expect(getByTestId('testPage-emptyState-title').textContent).toEqual( + artifactListPageLabels.emptyStateTitle + ); + expect(getByTestId('testPage-emptyState-aboutInfo').textContent).toEqual( + artifactListPageLabels.emptyStateInfo + ); + expect(getByTestId('testPage-emptyState-addButton').textContent).toEqual( + artifactListPageLabels.emptyStatePrimaryButtonLabel + ); - describe('and the first item is created', () => { - it('should show the list after creating first item and remove empty state', async () => { + expect(queryByTestId('testPage-emptyState-title-no-entries')).toBeNull(); + }); + + it('should open create flyout when primary button is clicked', async () => { render(); const addButton = await renderResult.findByTestId('testPage-emptyState-addButton'); - act(() => { + userEvent.click(addButton); + + expect(renderResult.getByTestId('testPage-flyout')).toBeTruthy(); + expect(history.location.search).toMatch(/show=create/); + }); + + describe('and the first item is created', () => { + it('should show the list after creating first item and remove empty state', async () => { + render(); + const addButton = await renderResult.findByTestId('testPage-emptyState-addButton'); + userEvent.click(addButton); - }); - await waitFor(async () => { - expect(renderResult.getByTestId('testPage-flyout')); - }); + await waitFor(async () => { + expect(renderResult.getByTestId('testPage-flyout')); + }); - // indicate form is valid - act(() => { - const lastProps = getLastFormComponentProps(); - lastProps.onChange({ item: { ...lastProps.item, name: 'some name' }, isValid: true }); - }); + // indicate form is valid + act(() => { + const lastProps = getLastFormComponentProps(); + lastProps.onChange({ item: { ...lastProps.item, name: 'some name' }, isValid: true }); + }); - mockedApi.responseProvider.trustedAppsList.mockImplementation( - originalListApiResponseProvider - ); + mockedApi.responseProvider.trustedAppsList.mockImplementation( + originalListApiResponseProvider + ); - // Submit form - act(() => { + // Submit form userEvent.click(renderResult.getByTestId('testPage-flyout-submitButton')); - }); - // wait for the list to show up - await act(async () => { + // wait for the list to show up await waitFor(() => { expect(renderResult.getByTestId('testPage-list')).toBeTruthy(); }); }); }); }); + + describe('and user is not allowed to Create entries', () => { + it('should hide title, about info and add button promoting entry creation', async () => { + render({ allowCardCreateAction: false }); + + await waitFor(async () => { + expect(renderResult.getByTestId('testPage-emptyState')); + }); + + expect(renderResult.queryByTestId('testPage-emptyState-title')).toBeNull(); + expect(renderResult.queryByTestId('testPage-emptyState-aboutInfo')).toBeNull(); + expect(renderResult.queryByTestId('testPage-emptyState-addButton')).toBeNull(); + }); + + it('should show title indicating there are no entries', async () => { + render({ allowCardCreateAction: false }); + + await waitFor(async () => { + expect( + renderResult.getByTestId('testPage-emptyState-title-no-entries').textContent + ).toEqual(artifactListPageLabels.emptyStateTitleNoEntries); + }); + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/no_data_empty_state.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/no_data_empty_state.tsx index bd40f7031aac2..4537268f00168 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/no_data_empty_state.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/no_data_empty_state.tsx @@ -20,6 +20,7 @@ const EmptyPrompt = styled(EuiEmptyPrompt)` export const NoDataEmptyState = memo<{ onAdd: () => void; titleLabel: string; + titleNoEntriesLabel: string; aboutInfo: string; primaryButtonLabel: string; canCreateItems?: boolean; @@ -35,6 +36,7 @@ export const NoDataEmptyState = memo<{ backComponent, 'data-test-subj': dataTestSubj, titleLabel, + titleNoEntriesLabel, aboutInfo, primaryButtonLabel, secondaryAboutInfo, @@ -44,37 +46,41 @@ export const NoDataEmptyState = memo<{ return ( - {titleLabel}

} - body={ -
- {aboutInfo} - {secondaryAboutInfo ? ( - <> - - {secondaryAboutInfo} - - ) : undefined} -
- } - actions={ - canCreateItems - ? [ - - {primaryButtonLabel} - , - ...(backComponent ? [backComponent] : []), - ] - : [] - } - /> + {canCreateItems ? ( + {titleLabel}} + body={ +
+ {aboutInfo} + {secondaryAboutInfo ? ( + <> + + {secondaryAboutInfo} + + ) : undefined} +
+ } + actions={[ + + {primaryButtonLabel} + , + ...(backComponent ? [backComponent] : []), + ]} + /> + ) : ( + {titleNoEntriesLabel}} + /> + )} ); } diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/translations.ts b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/translations.ts index c72b1a7af4105..cbe600ae3a53f 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/translations.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/translations.ts @@ -27,6 +27,12 @@ export const artifactListPageLabels = Object.freeze({ // ------------------------------ // EMPTY state labels // ------------------------------ + emptyStateTitleNoEntries: i18n.translate( + 'xpack.securitySolution.artifactListPage.emptyStateTitleNoEntries', + { + defaultMessage: 'There are no entries to display.', + } + ), emptyStateTitle: i18n.translate('xpack.securitySolution.artifactListPage.emptyStateTitle', { defaultMessage: 'Add your first artifact', }), @@ -112,6 +118,7 @@ export type ArtifactListPageRequiredLabels = Pick< | 'flyoutEditSubmitSuccess' | 'flyoutDowngradedLicenseDocsInfo' | 'deleteActionSuccess' + | 'emptyStateTitleNoEntries' | 'emptyStateTitle' | 'emptyStateInfo' | 'emptyStatePrimaryButtonLabel' diff --git a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/blocklist.tsx b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/blocklist.tsx index 0d172cd525138..6515d09289f90 100644 --- a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/blocklist.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/blocklist.tsx @@ -84,6 +84,12 @@ const BLOCKLIST_PAGE_LABELS: ArtifactListPageProps['labels'] = { defaultMessage: '"{itemName}" has been removed from blocklist.', values: { itemName }, }), + emptyStateTitleNoEntries: i18n.translate( + 'xpack.securitySolution.blocklist.emptyStateTitleNoEntries', + { + defaultMessage: 'There are no blocklist entries to display.', + } + ), emptyStateTitle: i18n.translate('xpack.securitySolution.blocklist.emptyStateTitle', { defaultMessage: 'Add your first blocklist entry', }), diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.tsx index 290f5dab957bd..b2e2054ca0eda 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.tsx @@ -114,6 +114,12 @@ const EVENT_FILTERS_PAGE_LABELS: ArtifactListPageProps['labels'] = { defaultMessage: '"{itemName}" has been removed from event filters list.', values: { itemName }, }), + emptyStateTitleNoEntries: i18n.translate( + 'xpack.securitySolution.eventFilters.emptyStateTitleNoEntries', + { + defaultMessage: 'There are no event filters to display.', + } + ), emptyStateTitle: i18n.translate('xpack.securitySolution.eventFilters.emptyStateTitle', { defaultMessage: 'Add your first event filter', }), diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.tsx b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.tsx index 3d2857f3ca6d9..ebdf6c6a0be6d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.tsx @@ -87,6 +87,12 @@ const HOST_ISOLATION_EXCEPTIONS_LABELS: ArtifactListPageProps['labels'] = Object defaultMessage: '"{itemName}" has been removed from host isolation exception list.', values: { itemName }, }), + emptyStateTitleNoEntries: i18n.translate( + 'xpack.securitySolution.hostIsolationExceptions.emptyStateTitleNoEntries', + { + defaultMessage: 'There are no host isolation exceptions to display.', + } + ), emptyStateTitle: i18n.translate( 'xpack.securitySolution.hostIsolationExceptions.emptyStateTitle', { @@ -112,7 +118,8 @@ const HOST_ISOLATION_EXCEPTIONS_LABELS: ArtifactListPageProps['labels'] = Object export const HostIsolationExceptionsList = memo(() => { const http = useHttp(); const apiClient = HostIsolationExceptionsApiClient.getInstance(http); - const { canWriteHostIsolationExceptions } = useUserPrivileges().endpointPrivileges; + const { canWriteHostIsolationExceptions, canDeleteHostIsolationExceptions } = + useUserPrivileges().endpointPrivileges; return ( { searchableFields={SEARCHABLE_FIELDS} allowCardCreateAction={canWriteHostIsolationExceptions} allowCardEditAction={canWriteHostIsolationExceptions} + allowCardDeleteAction={canDeleteHostIsolationExceptions} /> ); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/integration_tests/host_isolation_exceptions_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/integration_tests/host_isolation_exceptions_list.test.tsx index c747766c73c3a..628953d084e33 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/integration_tests/host_isolation_exceptions_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/integration_tests/host_isolation_exceptions_list.test.tsx @@ -18,6 +18,7 @@ import { parseQueryFilterToKQL } from '../../../../common/utils'; import { useUserPrivileges as _useUserPrivileges } from '../../../../../common/components/user_privileges'; import { getUserPrivilegesMockDefaultValue } from '../../../../../common/components/user_privileges/__mocks__'; import { getFirstCard } from '../../../../components/artifact_list_page/mocks'; +import { getEndpointAuthzInitialStateMock } from '../../../../../../common/endpoint/service/authz/mocks'; jest.mock('../../../../../common/components/user_privileges'); const useUserPrivilegesMock = _useUserPrivileges as jest.Mock; @@ -29,6 +30,8 @@ describe('When on the host isolation exceptions page', () => { let mockedContext: AppContextTestRender; let apiMocks: ReturnType; + const pageTestId = 'hostIsolationExceptionsListPage'; + beforeEach(() => { mockedContext = createAppRootMockRenderer(); ({ history } = mockedContext); @@ -50,9 +53,7 @@ describe('When on the host isolation exceptions page', () => { const { findAllByTestId } = render(); await waitFor(async () => { - await expect(findAllByTestId('hostIsolationExceptionsListPage-card')).resolves.toHaveLength( - 10 - ); + await expect(findAllByTestId(`${pageTestId}-card`)).resolves.toHaveLength(10); }); apiMocks.responseProvider.exceptionsFind.mockClear(); @@ -77,79 +78,117 @@ describe('When on the host isolation exceptions page', () => { ); }); - it('should hide the Create and Edit actions when host isolation exceptions write authz is not allowed, but HIE entries exist', async () => { - // Use case: license downgrade scenario, where user still has entries defined, but no longer - // able to create or edit them (only Delete them) - const existingPrivileges = useUserPrivilegesMock(); - useUserPrivilegesMock.mockReturnValue({ - ...existingPrivileges, - endpointPrivileges: { - ...existingPrivileges.endpointPrivileges, - canIsolateHost: false, - canWriteHostIsolationExceptions: false, - canReadHostIsolationExceptions: true, - canDeleteHostIsolationExceptions: true, - }, - }); + describe('RBAC + licensing', () => { + describe('ALL privilege', () => { + beforeEach(() => { + useUserPrivilegesMock.mockReturnValue({ + endpointPrivileges: getEndpointAuthzInitialStateMock(), + }); + }); - const { findAllByTestId, queryByTestId, getByTestId } = await render(); + it('should allow the Create action', async () => { + const { queryByTestId } = render(); - await waitFor(async () => { - await expect(findAllByTestId('hostIsolationExceptionsListPage-card')).resolves.toHaveLength( - 10 - ); - }); - await getFirstCard(renderResult, { - showActions: true, - testId: 'hostIsolationExceptionsListPage', - }); + await waitFor(() => expect(queryByTestId(`${pageTestId}-pageAddButton`)).toBeTruthy()); + }); - expect(queryByTestId('hostIsolationExceptionsListPage-pageAddButton')).toBeNull(); - expect(getByTestId('hostIsolationExceptionsListPage-card-cardDeleteAction')).toBeTruthy(); - expect(queryByTestId('hostIsolationExceptionsListPage-card-cardEditAction')).toBeNull(); - }); + it('should allow the Edit and Delete actions', async () => { + const { getByTestId } = render(); + + await getFirstCard(renderResult, { + showActions: true, + testId: 'hostIsolationExceptionsListPage', + }); - it('should allow Delete action', async () => { - // Use case: license downgrade scenario, where user still has entries defined, but no longer - // able to create or edit them (only Delete them) - const existingPrivileges = useUserPrivilegesMock(); - useUserPrivilegesMock.mockReturnValue({ - ...existingPrivileges, - endpointPrivileges: { - ...existingPrivileges.endpointPrivileges, - canIsolateHost: false, - canUnIsolateHost: true, - }, + expect(getByTestId(`${pageTestId}-card-cardEditAction`)).toBeTruthy(); + expect(getByTestId(`${pageTestId}-card-cardDeleteAction`)).toBeTruthy(); + }); }); - const { findAllByTestId, getByTestId } = await render(); + describe('READ privilege', () => { + beforeEach(() => { + useUserPrivilegesMock.mockReturnValue({ + endpointPrivileges: getEndpointAuthzInitialStateMock({ + canWriteHostIsolationExceptions: false, + canDeleteHostIsolationExceptions: false, + }), + }); + }); - await waitFor(async () => { - await expect(findAllByTestId('hostIsolationExceptionsListPage-card')).resolves.toHaveLength( - 10 - ); - }); - await getFirstCard(renderResult, { - showActions: true, - testId: 'hostIsolationExceptionsListPage', - }); + it('should disable the Create action', async () => { + const { queryByTestId } = render(); - const deleteButton = getByTestId('hostIsolationExceptionsListPage-card-cardDeleteAction'); - expect(deleteButton).toBeTruthy(); + await waitFor(() => expect(queryByTestId(`${pageTestId}-container`)).toBeTruthy()); - userEvent.click(deleteButton); - const confirmDeleteButton = getByTestId( - 'hostIsolationExceptionsListPage-deleteModal-submitButton' - ); - userEvent.click(confirmDeleteButton); - await waitFor(() => { - expect(apiMocks.responseProvider.exceptionDelete).toHaveReturnedWith( - expect.objectContaining({ - namespace_type: 'agnostic', - os_types: ['windows'], - tags: ['policy:all'], - }) - ); + expect(queryByTestId(`${pageTestId}-pageAddButton`)).toBeNull(); + }); + + it('should disable the Edit and Delete actions', async () => { + const { queryByTestId } = render(); + + await waitFor(() => expect(queryByTestId(`${pageTestId}-container`)).toBeTruthy()); + + expect(queryByTestId(`${pageTestId}-card-header-actions-button`)).toBeNull(); + }); + }); + + describe('ALL privilege and license downgrade situation', () => { + // Use case: license downgrade scenario, where user still has entries defined, but no longer + // able to create or edit them, only delete them + + beforeEach(() => { + useUserPrivilegesMock.mockReturnValue({ + endpointPrivileges: getEndpointAuthzInitialStateMock({ + canWriteHostIsolationExceptions: false, + canReadHostIsolationExceptions: true, + canDeleteHostIsolationExceptions: true, + }), + }); + }); + + it('should hide the Create and Edit actions when host isolation exceptions write authz is not allowed, but HIE entries exist', async () => { + const { findAllByTestId, queryByTestId, getByTestId } = await render(); + + await waitFor(async () => { + await expect(findAllByTestId(`${pageTestId}-card`)).resolves.toHaveLength(10); + }); + await getFirstCard(renderResult, { + showActions: true, + testId: 'hostIsolationExceptionsListPage', + }); + + expect(queryByTestId(`${pageTestId}-pageAddButton`)).toBeNull(); + expect(getByTestId(`${pageTestId}-card-cardDeleteAction`)).toBeTruthy(); + expect(queryByTestId(`${pageTestId}-card-cardEditAction`)).toBeNull(); + }); + + it('should allow Delete action', async () => { + const { findAllByTestId, getByTestId } = await render(); + + await waitFor(async () => { + await expect(findAllByTestId(`${pageTestId}-card`)).resolves.toHaveLength(10); + }); + await getFirstCard(renderResult, { + showActions: true, + testId: 'hostIsolationExceptionsListPage', + }); + + const deleteButton = getByTestId(`${pageTestId}-card-cardDeleteAction`); + expect(deleteButton).toBeTruthy(); + + userEvent.click(deleteButton); + const confirmDeleteButton = getByTestId(`${pageTestId}-deleteModal-submitButton`); + userEvent.click(confirmDeleteButton); + await waitFor(() => { + expect(apiMocks.responseProvider.exceptionDelete).toHaveReturnedWith( + expect.objectContaining({ + namespace_type: 'agnostic', + os_types: ['windows'], + tags: ['policy:all'], + }) + ); + }); + }); }); }); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.tsx index 4695f938249e9..3eb73056f3920 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.tsx @@ -89,6 +89,12 @@ const TRUSTED_APPS_PAGE_LABELS: ArtifactListPageProps['labels'] = { defaultMessage: '"{itemName}" has been removed from trusted applications.', values: { itemName }, }), + emptyStateTitleNoEntries: i18n.translate( + 'xpack.securitySolution.trustedApps.emptyStateTitleNoEntries', + { + defaultMessage: 'There are no trusted applications to display.', + } + ), emptyStateTitle: i18n.translate('xpack.securitySolution.trustedApps.emptyStateTitle', { defaultMessage: 'Add your first trusted application', }), diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx index 741e485d34dae..71f9ff1e5e9a4 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -6,7 +6,6 @@ */ import { i18n } from '@kbn/i18n'; -import type { Action, Store } from 'redux'; import type { Subscription } from 'rxjs'; import { Subject } from 'rxjs'; import { combineLatestWith } from 'rxjs/operators'; @@ -58,11 +57,8 @@ import { getLazyEndpointGenericErrorsListExtension } from './management/pages/po import type { ExperimentalFeatures } from '../common/experimental_features'; import { parseExperimentalConfigValue } from '../common/experimental_features'; import { LazyEndpointCustomAssetsExtension } from './management/pages/policy/view/ingest_manager_integration/lazy_endpoint_custom_assets_extension'; -import type { State } from './common/store/types'; -/** - * The Redux store type for the Security app. - */ -export type SecurityAppStore = Store; +import type { SecurityAppStore } from './common/store/types'; + export class Plugin implements IPlugin { readonly kibanaVersion: string; private config: SecuritySolutionUiConfigType; @@ -89,6 +85,7 @@ export class Plugin implements IPlugin, @@ -162,12 +159,15 @@ export class Plugin implements IPlugin { return columnId && !FIELDS_WITHOUT_CELL_ACTIONS.includes(columnId); }; +const StyledContent = styled.div<{ $isDetails: boolean }>` + padding: ${({ $isDetails }) => ($isDetails ? '0 8px' : undefined)}; +`; + export const DefaultCellRenderer: React.FC = ({ data, ecsData, @@ -33,10 +35,8 @@ export const DefaultCellRenderer: React.FC = ({ isTimeline, linkValues, rowRenderers, - setCellProps, scopeId, truncate, - closeCellPopover, enableActions = true, }) => { const asPlainText = useMemo(() => { @@ -74,7 +74,6 @@ export const DefaultCellRenderer: React.FC = ({ globalFilters={globalFilters} scopeId={scopeId} value={values} - closeCellPopover={closeCellPopover} /> )} diff --git a/x-pack/plugins/security_solution/server/endpoint/utils/fleet_agent_status_to_endpoint_host_status.ts b/x-pack/plugins/security_solution/server/endpoint/utils/fleet_agent_status_to_endpoint_host_status.ts index c654b1a11a78c..5afcc96ba34b2 100644 --- a/x-pack/plugins/security_solution/server/endpoint/utils/fleet_agent_status_to_endpoint_host_status.ts +++ b/x-pack/plugins/security_solution/server/endpoint/utils/fleet_agent_status_to_endpoint_host_status.ts @@ -17,7 +17,6 @@ const STATUS_MAPPING: ReadonlyMap = new Map([ ['unenrolling', HostStatus.UPDATING], ['enrolling', HostStatus.UPDATING], ['updating', HostStatus.UPDATING], - ['warning', HostStatus.UNHEALTHY], ['error', HostStatus.UNHEALTHY], ['degraded', HostStatus.UNHEALTHY], ]); diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts index 2b73297881871..debd4b021ba09 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts @@ -64,6 +64,10 @@ export class HostIsolationExceptionsValidator extends BaseValidator { return this.validateHasPrivilege('canWriteHostIsolationExceptions'); } + protected async validateHasDeletePrivilege(): Promise { + return this.validateHasPrivilege('canDeleteHostIsolationExceptions'); + } + protected async validateHasReadPrivilege(): Promise { return this.validateHasPrivilege('canReadHostIsolationExceptions'); } @@ -99,7 +103,7 @@ export class HostIsolationExceptionsValidator extends BaseValidator { } async validatePreDeleteItem(): Promise { - await this.validateHasWritePrivilege(); + await this.validateHasDeletePrivilege(); } async validatePreExport(): Promise { diff --git a/x-pack/plugins/stack_connectors/public/connector_types/lib/servicenow/update_connector.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/lib/servicenow/update_connector.test.tsx index d17f23eb88d6f..baf8a4d9a9967 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/lib/servicenow/update_connector.test.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/lib/servicenow/update_connector.test.tsx @@ -30,7 +30,8 @@ const mountUpdateConnector = (props: Partial = {}, isOAuth: boolean = fal ); }; -describe('UpdateConnector renders', () => { +// FLAKY: https://github.com/elastic/kibana/issues/147396 +describe.skip('UpdateConnector renders', () => { it('should render update connector fields', () => { const wrapper = mountUpdateConnector(); diff --git a/x-pack/plugins/synthetics/common/constants/synthetics/rest_api.ts b/x-pack/plugins/synthetics/common/constants/synthetics/rest_api.ts index 62e525189cf8b..0ec9f92935bf0 100644 --- a/x-pack/plugins/synthetics/common/constants/synthetics/rest_api.ts +++ b/x-pack/plugins/synthetics/common/constants/synthetics/rest_api.ts @@ -11,4 +11,6 @@ export enum SYNTHETICS_API_URLS { PING_STATUSES = '/internal/synthetics/ping_statuses', OVERVIEW_STATUS = `/internal/synthetics/overview/status`, INDEX_SIZE = `/internal/synthetics/index_size`, + PARAMS = `/synthetics/params`, + SYNC_GLOBAL_PARAMS = `/synthetics/sync_global_params`, } diff --git a/x-pack/plugins/synthetics/common/runtime_types/monitor_management/index.ts b/x-pack/plugins/synthetics/common/runtime_types/monitor_management/index.ts index a658a1b8a34ef..7cd93a3e93da0 100644 --- a/x-pack/plugins/synthetics/common/runtime_types/monitor_management/index.ts +++ b/x-pack/plugins/synthetics/common/runtime_types/monitor_management/index.ts @@ -13,3 +13,4 @@ export * from './monitor_types'; export * from './monitor_types_project'; export * from './locations'; export * from './synthetics_overview_status'; +export * from './synthetics_params'; diff --git a/x-pack/plugins/synthetics/common/runtime_types/monitor_management/synthetics_params.ts b/x-pack/plugins/synthetics/common/runtime_types/monitor_management/synthetics_params.ts new file mode 100644 index 0000000000000..0a20795950d85 --- /dev/null +++ b/x-pack/plugins/synthetics/common/runtime_types/monitor_management/synthetics_params.ts @@ -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 * as t from 'io-ts'; + +export const SyntheticsParamCode = t.intersection([ + t.interface({ + key: t.string, + value: t.string, + }), + t.partial({ + description: t.string, + tags: t.array(t.string), + namespaces: t.array(t.string), + }), +]); + +export type SyntheticsParam = t.TypeOf; diff --git a/x-pack/plugins/synthetics/common/types/saved_objects.ts b/x-pack/plugins/synthetics/common/types/saved_objects.ts index e1c3c428bfaa4..4e0992f78ee0b 100644 --- a/x-pack/plugins/synthetics/common/types/saved_objects.ts +++ b/x-pack/plugins/synthetics/common/types/saved_objects.ts @@ -7,3 +7,5 @@ export const syntheticsMonitorType = 'synthetics-monitor'; export const monitorAttributes = `${syntheticsMonitorType}.attributes`; + +export const syntheticsParamType = 'synthetics-param'; diff --git a/x-pack/plugins/synthetics/e2e/journeys/synthetics/global_parameters.journey.ts b/x-pack/plugins/synthetics/e2e/journeys/synthetics/global_parameters.journey.ts new file mode 100644 index 0000000000000..f2687a0ba8639 --- /dev/null +++ b/x-pack/plugins/synthetics/e2e/journeys/synthetics/global_parameters.journey.ts @@ -0,0 +1,95 @@ +/* + * 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 { journey, step, before, after, expect } from '@elastic/synthetics'; +import { cleanTestParams } from './services/add_monitor'; +import { syntheticsAppPageProvider } from '../../page_objects/synthetics_app'; + +journey(`GlobalParameters`, async ({ page, params }) => { + const syntheticsApp = syntheticsAppPageProvider({ page, kibanaUrl: params.kibanaUrl }); + + before(async () => { + await cleanTestParams(params); + }); + + after(async () => { + await cleanTestParams(params); + }); + + step('Go to Settings page', async () => { + await syntheticsApp.navigateToSettings(true); + }); + + step('go to params tab', async () => { + await page.click('text=Global Parameters'); + }); + + step('Click text=Settings', async () => { + await page.click('text=Settings'); + expect(page.url()).toBe('http://localhost:5620/app/synthetics/settings/alerting'); + }); + step('Click text=Global Parameters', async () => { + await page.click('text=Global Parameters'); + expect(page.url()).toBe('http://localhost:5620/app/synthetics/settings/params'); + await page.click('text=No items found'); + await page.click('button:has-text("Create Parameter")'); + await page.click('[aria-label="Key"]'); + await page.fill('[aria-label="Key"]', 'username'); + await page.click('[aria-label="Value"]'); + await page.fill('[aria-label="Value"]', 'elastic'); + await page.click('.euiComboBox__inputWrap'); + await page.fill('[aria-label="Tags"]', 'dev'); + await page.click('[aria-label="Description"]'); + await page.fill('[aria-label="Description"]', 'website username'); + await page.click('button:has-text("Save")'); + await page.click('text=website username'); + await page.click('text=username'); + await page.click('[aria-label="View parameter value"]'); + await page.click('tbody >> text=elastic'); + await page.click('[aria-label="View parameter value"]'); + await page.click('text=•••••••'); + }); + + step('Perform search', async () => { + await page.click('[placeholder="Search..."]'); + await page.fill('[placeholder="Search..."]', 'username'); + await page.click('text=username'); + await page.click('[aria-label="Clear input"]'); + await page.click('[placeholder="Search..."]'); + await page.fill('[placeholder="Search..."]', 'website'); + await page.click('text=website username'); + await page.click('[placeholder="Search..."]', { + clickCount: 3, + }); + await page.fill('[placeholder="Search..."]', 'extra'); + await page.keyboard.press('Enter'); + await page.click('text=No items found'); + await page.click('[aria-label="Clear input"]'); + }); + + step('Click text=Delete ParameterEdit Parameter >> :nth-match(button, 2)', async () => { + await page.click('text=Delete ParameterEdit Parameter >> :nth-match(button, 2)'); + await page.click('[aria-label="Key"]'); + await page.fill('[aria-label="Key"]', 'username2'); + await page.click('[aria-label="Value"]'); + await page.fill('[aria-label="Value"]', 'elastic2'); + await page.click('.euiComboBox__inputWrap'); + await page.fill('[aria-label="Tags"]', 'staging'); + await page.press('[aria-label="Tags"]', 'Enter'); + await page.click('button:has-text("Save")'); + await page.click('text=username2'); + await page.click('text=staging'); + await page.click('button:has-text("Tags")'); + await page.click('[aria-label="Tags"] >> text=staging'); + await page.click('[aria-label="Clear input"]'); + }); + step('Click text=Delete ParameterEdit Parameter >> button', async () => { + await page.click('text=Delete ParameterEdit Parameter >> button'); + await page.click('button:has-text("Delete")'); + await page.click('text=No items found'); + }); +}); diff --git a/x-pack/plugins/synthetics/e2e/journeys/synthetics/index.ts b/x-pack/plugins/synthetics/e2e/journeys/synthetics/index.ts index 11fd546ce6745..7d2c3c960eef1 100644 --- a/x-pack/plugins/synthetics/e2e/journeys/synthetics/index.ts +++ b/x-pack/plugins/synthetics/e2e/journeys/synthetics/index.ts @@ -15,3 +15,4 @@ export * from './overview_scrolling.journey'; export * from './overview_search.journey'; export * from './private_locations.journey'; export * from './alerting_default.journey'; +export * from './global_parameters.journey'; diff --git a/x-pack/plugins/synthetics/e2e/journeys/synthetics/services/add_monitor.ts b/x-pack/plugins/synthetics/e2e/journeys/synthetics/services/add_monitor.ts index 2f5193f524e02..ae20388891c07 100644 --- a/x-pack/plugins/synthetics/e2e/journeys/synthetics/services/add_monitor.ts +++ b/x-pack/plugins/synthetics/e2e/journeys/synthetics/services/add_monitor.ts @@ -86,6 +86,18 @@ export const cleanPrivateLocations = async (params: Record) => { } }; +export const cleanTestParams = async (params: Record) => { + const getService = params.getService; + const server = getService('kibanaServer'); + + try { + await server.savedObjects.clean({ types: ['synthetics-param'] }); + } catch (e) { + // eslint-disable-next-line no-console + console.log(e); + } +}; + const data = { type: 'browser', form_monitor_type: 'single', diff --git a/x-pack/plugins/synthetics/e2e/page_objects/login.tsx b/x-pack/plugins/synthetics/e2e/page_objects/login.tsx index 74839f9001a00..a8a55aadab31d 100644 --- a/x-pack/plugins/synthetics/e2e/page_objects/login.tsx +++ b/x-pack/plugins/synthetics/e2e/page_objects/login.tsx @@ -31,7 +31,6 @@ export function loginPageProvider({ } catch (e) { // ignore } - if (isRemote) { await page.click('text="Log in with Elasticsearch"'); } diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/table_title.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/table_title.tsx index 9378032ae30c8..b8fc4758900ef 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/table_title.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/table_title.tsx @@ -20,7 +20,7 @@ export const TableTitle = ({ total: number; label: string; }) => { - const start = pageIndex * pageSize + 1; + const start = Math.min(pageIndex * pageSize + 1, total); const end = Math.min(start + pageSize - 1, total); return ( <> diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/add_param_flyout.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/add_param_flyout.tsx new file mode 100644 index 0000000000000..7619a57eefef2 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/add_param_flyout.tsx @@ -0,0 +1,175 @@ +/* + * 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 React, { useCallback, useEffect, useState } from 'react'; +import { + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutHeader, + EuiButton, + EuiTitle, + EuiFlyoutFooter, + EuiFlexGroup, + EuiFlexItem, + EuiButtonEmpty, + EuiSpacer, +} from '@elastic/eui'; +import { FormProvider } from 'react-hook-form'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { useFetcher } from '@kbn/observability-plugin/public'; +import { i18n } from '@kbn/i18n'; +import { useDispatch } from 'react-redux'; +import { apiService } from '../../../../../utils/api_service'; +import { ClientPluginsStart } from '../../../../../plugin'; +import { ListParamItem } from './params_list'; +import { SyntheticsParam } from '../../../../../../common/runtime_types'; +import { useFormWrapped } from '../../../../../hooks/use_form_wrapped'; +import { AddParamForm } from './add_param_form'; +import { SYNTHETICS_API_URLS } from '../../../../../../common/constants'; +import { syncGlobalParamsAction } from '../../../state/settings'; + +export const AddParamFlyout = ({ + items, + isEditingItem, + setIsEditingItem, + setRefreshList, +}: { + items: ListParamItem[]; + setRefreshList: React.Dispatch>; + isEditingItem: ListParamItem | null; + setIsEditingItem: React.Dispatch>; +}) => { + const [isFlyoutVisible, setIsFlyoutVisible] = useState(false); + + const { id, ...dataToSave } = isEditingItem ?? {}; + + const form = useFormWrapped({ + mode: 'onSubmit', + reValidateMode: 'onChange', + shouldFocusError: true, + defaultValues: dataToSave ?? { + key: '', + tags: [], + description: '', + value: '', + }, + }); + + const closeFlyout = useCallback(() => { + setIsFlyoutVisible(false); + setIsEditingItem(null); + form.reset({ key: '', tags: [], description: '', value: '' }); + // no need to add form value, it keeps changing on reset + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [setIsEditingItem]); + + const [paramData, setParamData] = useState(null); + + const { application } = useKibana().services; + + const { loading, data } = useFetcher(async () => { + if (!paramData) { + return; + } + if (isEditingItem) { + return apiService.put(SYNTHETICS_API_URLS.PARAMS, { id, ...paramData }); + } + return apiService.post(SYNTHETICS_API_URLS.PARAMS, paramData); + }, [paramData]); + + const canSave = (application?.capabilities.uptime.save ?? false) as boolean; + + const onSubmit = (formData: SyntheticsParam) => { + setParamData(formData); + }; + + const dispatch = useDispatch(); + + useEffect(() => { + if (data && !loading) { + closeFlyout(); + setRefreshList(Date.now()); + setParamData(null); + dispatch(syncGlobalParamsAction.get()); + } + }, [data, loading, closeFlyout, setRefreshList, dispatch]); + + useEffect(() => { + if (isEditingItem) { + setIsFlyoutVisible(true); + form.reset(isEditingItem); + } + // no need to add form value, it keeps changing on reset + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [isEditingItem]); + + const { handleSubmit } = form; + + let flyout; + + if (isFlyoutVisible) { + flyout = ( + + + + +

{isEditingItem ? EDIT_PARAM : CREATE_PARAM}

+
+
+ + + + + + + + + {CLOSE_TABLE} + + + + + {SAVE_TABLE} + + + + +
+
+ ); + } + + return ( +
+ setIsFlyoutVisible(true)} + isDisabled={!canSave} + > + {CREATE_PARAM} + + {flyout} +
+ ); +}; + +const CLOSE_TABLE = i18n.translate('xpack.synthetics.settingsRoute.cancel', { + defaultMessage: 'Close', +}); + +const CREATE_PARAM = i18n.translate('xpack.synthetics.settingsRoute.createParam', { + defaultMessage: 'Create Parameter', +}); + +const EDIT_PARAM = i18n.translate('xpack.synthetics.settingsRoute.params.editLabel', { + defaultMessage: 'Edit Parameter', +}); + +const SAVE_TABLE = i18n.translate('xpack.synthetics.settingsRoute.save', { + defaultMessage: 'Save', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/add_param_form.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/add_param_form.tsx new file mode 100644 index 0000000000000..f01080a644650 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/add_param_form.tsx @@ -0,0 +1,170 @@ +/* + * 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 React from 'react'; +import { + EuiCheckbox, + EuiComboBox, + EuiFieldText, + EuiForm, + EuiFormRow, + EuiTextArea, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { Controller, useFormContext, useFormState } from 'react-hook-form'; +import { SyntheticsParam } from '../../../../../../common/runtime_types'; +import { ListParamItem } from './params_list'; + +export const AddParamForm = ({ + items, + isEditingItem, +}: { + items: ListParamItem[]; + isEditingItem: ListParamItem | null; +}) => { + const { register, control } = useFormContext(); + const { errors } = useFormState(); + + const tagsList = items.reduce((acc, item) => { + const tags = item.tags || []; + return new Set([...acc, ...tags]); + }, new Set()); + + return ( + + + { + return items + .filter((param) => (isEditingItem ? param.id !== isEditingItem.id : true)) + .some((param) => param.key === val) + ? KEY_EXISTS + : undefined; + }, + })} + /> + + + + + + ( + ({ label: tag, value: tag })) ?? []} + options={[...tagsList].map((tag) => ({ label: tag, value: tag }))} + onCreateOption={(newTag) => { + field.onChange([...(field.value ?? []), newTag]); + }} + {...field} + onChange={(selectedTags) => { + field.onChange(selectedTags.map((tag) => tag.value)); + }} + /> + )} + /> + + + + + + ( + { + if (e.target.checked) { + field.onChange(['*']); + } else { + field.onChange([]); + } + }} + checked={(field.value ?? []).length > 0 && (field.value ?? [])[0] === '*'} + disabled={Boolean(isEditingItem)} + /> + )} + /> + + + ); +}; + +export const KEY_LABEL = i18n.translate('xpack.synthetics.monitorManagement.paramForm.keyLabel', { + defaultMessage: 'Key', +}); + +export const TAGS_LABEL = i18n.translate('xpack.synthetics.monitorManagement.paramForm.tagsLabel', { + defaultMessage: 'Tags', +}); + +export const DESCRIPTION_LABEL = i18n.translate( + 'xpack.synthetics.monitorManagement.paramForm.descriptionLabel', + { + defaultMessage: 'Description', + } +); + +export const SHARED_LABEL = i18n.translate('xpack.synthetics.paramForm.sharedAcrossSpacesLabel', { + defaultMessage: 'Share across spaces', +}); + +export const NAMESPACES_LABEL = i18n.translate('xpack.synthetics.paramForm.namespaces', { + defaultMessage: 'Namespaces', +}); + +export const VALUE_LABEL = i18n.translate( + 'xpack.synthetics.monitorManagement.paramForm.paramLabel', + { + defaultMessage: 'Value', + } +); + +const KEY_REQUIRED = i18n.translate('xpack.synthetics.monitorManagement.param.keyRequired', { + defaultMessage: 'Key is required', +}); + +const KEY_EXISTS = i18n.translate('xpack.synthetics.monitorManagement.param.keyExists', { + defaultMessage: 'Key already exists', +}); + +const VALUE_REQUIRED = i18n.translate('xpack.synthetics.monitorManagement.value.required', { + defaultMessage: 'Value is required', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx new file mode 100644 index 0000000000000..41a63a00dc598 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx @@ -0,0 +1,111 @@ +/* + * 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 React, { useEffect, useState } from 'react'; +import { EuiConfirmModal } from '@elastic/eui'; +import { FETCH_STATUS, useFetcher } from '@kbn/observability-plugin/public'; +import { toMountPoint, useKibana } from '@kbn/kibana-react-plugin/public'; +import { i18n } from '@kbn/i18n'; + +import { useDispatch } from 'react-redux'; +import { syncGlobalParamsAction } from '../../../state/settings'; +import { kibanaService } from '../../../../../utils/kibana_service'; +import { syntheticsParamType } from '../../../../../../common/types/saved_objects'; +import { NO_LABEL, YES_LABEL } from '../../monitors_page/management/monitor_list_table/labels'; +import { ListParamItem } from './params_list'; + +export const DeleteParam = ({ + setRefreshList, + items, + setIsDeleteModalVisible, +}: { + setRefreshList: React.Dispatch>; + items: ListParamItem[]; + setIsDeleteModalVisible: React.Dispatch>; +}) => { + const [isDeleting, setIsDeleting] = useState(false); + + const dispatch = useDispatch(); + + const handleConfirmDelete = () => { + setIsDeleting(true); + }; + + const { savedObjects } = useKibana().services; + + const { status } = useFetcher(() => { + if (isDeleting && savedObjects) { + return savedObjects.client.bulkDelete( + items.map(({ id }) => ({ type: syntheticsParamType, id })), + { force: true } + ); + } + }, [items, isDeleting]); + + const name = items + .map(({ key }) => key) + .join(', ') + .substr(0, 50); + + useEffect(() => { + if (!isDeleting) { + return; + } + if (status === FETCH_STATUS.FAILURE) { + kibanaService.toasts.addDanger( + { + title: toMountPoint( +

+ {' '} + {i18n.translate('xpack.synthetics.paramManagement.paramDeleteFailuresMessage.name', { + defaultMessage: 'Param {name} deleted successfully.', + values: { name }, + })} +

+ ), + }, + { toastLifeTimeMs: 3000 } + ); + } else if (status === FETCH_STATUS.SUCCESS) { + kibanaService.toasts.addSuccess( + { + title: toMountPoint( +

+ {i18n.translate('xpack.synthetics.paramManagement.paramDeleteSuccessMessage.name', { + defaultMessage: 'Param {name} deleted successfully.', + values: { name }, + })} +

+ ), + }, + { toastLifeTimeMs: 3000 } + ); + dispatch(syncGlobalParamsAction.get()); + } + if (status === FETCH_STATUS.SUCCESS || status === FETCH_STATUS.FAILURE) { + setIsDeleting(false); + setIsDeleteModalVisible(false); + setRefreshList(Date.now()); + } + }, [setIsDeleting, isDeleting, status, setIsDeleteModalVisible, name, setRefreshList, dispatch]); + + return ( + setIsDeleteModalVisible(false)} + onConfirm={handleConfirmDelete} + cancelButtonText={NO_LABEL} + confirmButtonText={YES_LABEL} + buttonColor="danger" + defaultFocusedButton="confirm" + isLoading={isDeleting} + /> + ); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/params_list.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/params_list.tsx new file mode 100644 index 0000000000000..f4e3380651e32 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/params_list.tsx @@ -0,0 +1,321 @@ +/* + * 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 { + EuiBadge, + EuiInMemoryTable, + EuiButton, + EuiFlexGroup, + EuiFlexItem, + EuiSpacer, + EuiText, + EuiLink, + EuiSearchBar, +} from '@elastic/eui'; +import React, { useEffect, useState } from 'react'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { EuiBasicTableColumn } from '@elastic/eui/src/components/basic_table/basic_table'; +import { useDebounce } from 'react-use'; +import { TableTitle } from '../../common/components/table_title'; +import { ParamsText } from './params_text'; +import { SyntheticsParam } from '../../../../../../common/runtime_types'; +import { useParamsList } from '../hooks/use_params_list'; +import { AddParamFlyout } from './add_param_flyout'; +import { DeleteParam } from './delete_param'; + +export interface ListParamItem extends SyntheticsParam { + id: string; +} + +export const ParamsList = () => { + const [refreshList, setRefreshList] = useState(Date.now()); + + const [pageIndex, setPageIndex] = useState(0); + const [pageSize, setPageSize] = useState(10); + + const { items, loading } = useParamsList(refreshList); + + const [isEditingItem, setIsEditingItem] = useState(null); + + const [selectedItems, setSelectedItems] = useState([]); + + const [isDeleteModalVisible, setIsDeleteModalVisible] = useState(false); + const [deleteParam, setDeleteParam] = useState([]); + + const { application } = useKibana().services; + + const canSave = (application?.capabilities.uptime.save ?? false) as boolean; + + const columns: Array> = [ + { + name: i18n.translate('xpack.synthetics.settingsRoute.params.key', { + defaultMessage: 'Key', + }), + sortable: true, + field: 'key', + }, + { + align: 'left' as const, + width: '20%', + name: i18n.translate('xpack.synthetics.settingsRoute.params.value', { + defaultMessage: 'Value', + }), + render: (item: ListParamItem) => , + }, + { + name: i18n.translate('xpack.synthetics.settingsRoute.params.description', { + defaultMessage: 'Description', + }), + field: 'description', + sortable: true, + render: (val: string) => {val ?? '--'}, + }, + { + name: i18n.translate('xpack.synthetics.settingsRoute.params.tags', { + defaultMessage: 'Tags', + }), + field: 'tags', + sortable: true, + render: (val: string[]) => { + const tags = val ?? []; + if (tags.length === 0) { + return --; + } + return ( + + {tags.map((tag) => ( + + {tag} + + ))} + + ); + }, + }, + { + name: i18n.translate('xpack.synthetics.settingsRoute.params.namespaces', { + defaultMessage: 'Namespaces', + }), + field: 'namespaces', + sortable: true, + render: (val: string[]) => { + const namespaces = val ?? []; + if (namespaces.length === 0) { + return --; + } + return ( + + {namespaces.map((namespace) => ( + + {namespace === '*' ? 'ALL' : namespace} + + ))} + + ); + }, + }, + { + name: i18n.translate('xpack.synthetics.settingsRoute.params.actions', { + defaultMessage: 'Actions', + }), + actions: [ + { + name: DELETE_PARAM, + description: DELETE_PARAM, + icon: 'trash', + color: 'danger', + type: 'icon', + onClick: (item: ListParamItem) => { + setDeleteParam([item]); + setIsDeleteModalVisible(true); + }, + 'data-test-subj': 'action-delete', + enabled: () => canSave, + }, + { + name: EDIT_PARAM, + description: EDIT_PARAM, + icon: 'pencil', + type: 'icon', + onClick: (item: ListParamItem) => { + setIsEditingItem(item); + }, + 'data-test-subj': 'action-edit', + enabled: () => canSave, + }, + ], + }, + ]; + + const tagsList = items.reduce((acc, item) => { + const tags = item.tags || []; + return new Set([...acc, ...tags]); + }, new Set()); + + const renderToolsLeft = () => { + if (selectedItems.length === 0) { + return; + } + + return ( + { + setDeleteParam(selectedItems); + setIsDeleteModalVisible(true); + }} + > + Delete {selectedItems.length} params + + ); + }; + + const renderToolRight = () => { + return [ + , + ]; + }; + + const [query, setQuery] = useState(''); + const [debouncedValue, setDebouncedValue] = useState(''); + + useDebounce( + () => { + setDebouncedValue(query); + }, + 200, + [query] + ); + + const [filteredItems, setFilteredItems] = useState(items); + + useEffect(() => { + if (!debouncedValue) { + setFilteredItems(items); + } else { + const queriedItems = EuiSearchBar.Query.execute(debouncedValue, items, { + defaultFields: ['key', 'description', 'tags'], + }); + + setFilteredItems(queriedItems); + } + }, [debouncedValue, items]); + + return ( +
+ + + {LEARN_MORE} + + ), + }} + /> + + + + itemId="id" + loading={loading} + tableCaption={PARAMS_TABLE} + items={filteredItems} + columns={columns} + tableLayout="auto" + isSelectable={true} + pagination={true} + sorting={{ + sort: { field: 'key', direction: 'asc' }, + }} + childrenBetween={ + + } + onTableChange={({ page }) => { + setPageIndex(page?.index ?? 0); + setPageSize(page?.size ?? 10); + }} + selection={{ + selectable: () => true, + onSelectionChange: (sItems) => { + setSelectedItems(sItems); + }, + initialSelected: selectedItems, + }} + search={{ + onChange: ({ query: queryText }) => setQuery(queryText?.text ?? ''), + toolsLeft: renderToolsLeft(), + toolsRight: renderToolRight(), + box: { + incremental: true, + }, + filters: [ + { + type: 'field_value_selection', + field: 'tags', + name: 'Tags', + multiSelect: true, + options: [...tagsList].map((tag) => ({ + value: tag, + name: tag, + view: tag, + })), + }, + ], + }} + message={loading ? LOADING_TEXT : undefined} + /> + {isDeleteModalVisible && deleteParam && ( + + )} +
+ ); +}; + +const PARAMS_TABLE = i18n.translate('xpack.synthetics.settingsRoute.params.tableCaption', { + defaultMessage: 'Synthetics Global Parameters', +}); + +const PARAMS_LABEL = i18n.translate('xpack.synthetics.settingsRoute.params.label', { + defaultMessage: 'Parameters', +}); + +const LEARN_MORE = i18n.translate('xpack.synthetics.settingsRoute.params.learnMore', { + defaultMessage: 'Learn more.', +}); + +const EDIT_PARAM = i18n.translate('xpack.synthetics.settingsRoute.params.editLabel', { + defaultMessage: 'Edit Parameter', +}); + +const LOADING_TEXT = i18n.translate('xpack.synthetics.settingsRoute.params.loading', { + defaultMessage: 'Loading...', +}); + +const DELETE_PARAM = i18n.translate('xpack.synthetics.settingsRoute.params.addLabel', { + defaultMessage: 'Delete Parameter', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/params_text.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/params_text.tsx new file mode 100644 index 0000000000000..71024bf9899a7 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/params_text.tsx @@ -0,0 +1,32 @@ +/* + * 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 { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; +import React, { useState } from 'react'; +import { i18n } from '@kbn/i18n'; + +export const ParamsText = ({ text }: { text: string }) => { + const [isViewing, setIsViewing] = useState(false); + + return ( + + + setIsViewing((prevState) => !prevState)} + disabled={!text} + /> + + + {isViewing ? text : '•'.repeat(10)} + + + ); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/hooks/use_params_list.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/hooks/use_params_list.ts new file mode 100644 index 0000000000000..9b566f6107438 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/hooks/use_params_list.ts @@ -0,0 +1,33 @@ +/* + * 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 { useFetcher } from '@kbn/observability-plugin/public'; +import { SavedObject } from '@kbn/core-saved-objects-common'; +import { useMemo } from 'react'; +import { SyntheticsParam } from '../../../../../../common/runtime_types'; +import { apiService } from '../../../../../utils/api_service'; +import { SYNTHETICS_API_URLS } from '../../../../../../common/constants'; + +export const useParamsList = (lastRefresh: number) => { + const { data, loading } = useFetcher< + Promise<{ data: Array> }> + >(() => { + return apiService.get(SYNTHETICS_API_URLS.PARAMS); + }, [lastRefresh]); + + return useMemo(() => { + return { + items: + data?.data.map((item) => ({ + id: item.id, + ...item.attributes, + namespaces: item.namespaces, + })) ?? [], + loading, + }; + }, [data, loading]); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/page_header.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/page_header.tsx index 02b8958ecf1bf..198cadcf9d191 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/page_header.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/page_header.tsx @@ -54,6 +54,13 @@ export const getSettingsPageHeader = ( isSelected: tabId === 'private-locations', href: replaceTab('private-locations'), }, + { + label: i18n.translate('xpack.synthetics.settingsTabs.params', { + defaultMessage: 'Global Parameters', + }), + isSelected: tabId === 'params' || !tabId, + href: replaceTab('params'), + }, { label: i18n.translate('xpack.synthetics.settingsTabs.dataRetention', { defaultMessage: 'Data Retention', diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/settings_page.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/settings_page.tsx index c8f7f85fc4aab..a93e86bf9c203 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/settings_page.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/settings_page.tsx @@ -11,6 +11,7 @@ import { EuiPanel } from '@elastic/eui'; import { AlertDefaultsForm } from './alerting_defaults/alert_defaults_form'; import { ProjectAPIKeys } from './project_api_keys/project_api_keys'; import { SettingsTabId } from './page_header'; +import { ParamsList } from './global_params/params_list'; import { DataRetentionTab } from './data_retention'; import { useSettingsBreadcrumbs } from './use_settings_breadcrumbs'; import { ManagePrivateLocations } from './private_locations/manage_private_locations'; @@ -28,6 +29,8 @@ export const SettingsPage = () => { return ; case 'data-retention': return ; + case 'params': + return ; case 'alerting': return ( diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/root_effect.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/root_effect.ts index 8746e5d5f007b..fb8b552b1a383 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/root_effect.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/root_effect.ts @@ -11,6 +11,7 @@ import { fetchDynamicSettingsEffect, setDynamicSettingsEffect, } from './settings/effects'; +import { syncGlobalParamsEffect } from './settings'; import { fetchAgentPoliciesEffect } from './private_locations'; import { fetchNetworkEventsEffect } from './network_events/effects'; import { fetchSyntheticsMonitorEffect } from './monitor_details'; @@ -40,5 +41,6 @@ export const rootEffect = function* root(): Generator { fork(setDynamicSettingsEffect), fork(fetchAgentPoliciesEffect), fork(fetchAlertConnectorsEffect), + fork(syncGlobalParamsEffect), ]); }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/root_reducer.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/root_reducer.ts index 1b74b7782e48f..01fbe13fc5a17 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/root_reducer.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/root_reducer.ts @@ -8,6 +8,7 @@ import { combineReducers } from '@reduxjs/toolkit'; import { dynamicSettingsReducer, DynamicSettingsState } from './settings'; +import { settingsReducer, SettingsState } from './settings'; import { agentPoliciesReducer, AgentPoliciesState } from './private_locations'; import { networkEventsReducer, NetworkEventsState } from './network_events'; import { monitorDetailsReducer, MonitorDetailsState } from './monitor_details'; @@ -23,16 +24,17 @@ import { PingStatusState, pingStatusReducer } from './ping_status'; export interface SyntheticsAppState { ui: UiState; - indexStatus: IndexStatusState; - syntheticsEnablement: SyntheticsEnablementState; + settings: SettingsState; + pingStatus: PingStatusState; monitorList: MonitorListState; - serviceLocations: ServiceLocationsState; - monitorDetails: MonitorDetailsState; + indexStatus: IndexStatusState; overview: MonitorOverviewState; - browserJourney: BrowserJourneyState; networkEvents: NetworkEventsState; - pingStatus: PingStatusState; agentPolicies: AgentPoliciesState; + monitorDetails: MonitorDetailsState; + browserJourney: BrowserJourneyState; + serviceLocations: ServiceLocationsState; + syntheticsEnablement: SyntheticsEnablementState; dynamicSettings: DynamicSettingsState; } @@ -49,4 +51,5 @@ export const rootReducer = combineReducers({ pingStatus: pingStatusReducer, agentPolicies: agentPoliciesReducer, dynamicSettings: dynamicSettingsReducer, + settings: settingsReducer, }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/actions.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/actions.ts index 347efc5d257ea..ed0aa0fecf0ef 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/actions.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/actions.ts @@ -16,3 +16,5 @@ export const setDynamicSettingsAction = createAsyncAction('GET CONNECTORS'); + +export const syncGlobalParamsAction = createAsyncAction('SYNC GLOBAL PARAMS'); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/api.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/api.ts index d28cacf0c0399..79c09f7ce76e9 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/api.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/api.ts @@ -18,6 +18,7 @@ import { DynamicSettingsType, } from '../../../../../common/runtime_types'; import { API_URLS } from '../../../../../common/constants'; +import { SYNTHETICS_API_URLS } from '../../../../../common/constants'; const apiPath = API_URLS.DYNAMIC_SETTINGS; @@ -80,3 +81,7 @@ export const fetchActionTypes = async (): Promise => { }) ); }; + +export const syncGlobalParamsAPI = async (): Promise => { + return await apiService.get(SYNTHETICS_API_URLS.SYNC_GLOBAL_PARAMS); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/effects.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/effects.ts index 396391abee0ef..5db6b7061618f 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/effects.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/effects.ts @@ -5,21 +5,33 @@ * 2.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 { takeLeading, put, call, takeLatest } from 'redux-saga/effects'; import { Action } from 'redux-actions'; import { i18n } from '@kbn/i18n'; import { DynamicSettings } from '../../../../../common/runtime_types'; import { kibanaService } from '../../../../utils/kibana_service'; -import { getConnectorsAction, getDynamicSettingsAction, setDynamicSettingsAction } from './actions'; +import { getConnectorsAction, setDynamicSettingsAction, getDynamicSettingsAction } from './actions'; import { fetchEffectFactory } from '../utils/fetch_effect'; -import { fetchConnectors, getDynamicSettings, setDynamicSettings } from './api'; +import { + fetchConnectors, + setDynamicSettings, + syncGlobalParamsAPI, + getDynamicSettings, +} from './api'; +import { syncGlobalParamsAction } from './actions'; + +export function* syncGlobalParamsEffect() { + yield takeLeading( + syncGlobalParamsAction.get, + fetchEffectFactory( + syncGlobalParamsAPI, + syncGlobalParamsAction.success, + syncGlobalParamsAction.fail, + successMessage, + failureMessage + ) + ); +} export function* fetchDynamicSettingsEffect() { yield takeLeading( @@ -32,6 +44,14 @@ export function* fetchDynamicSettingsEffect() { ); } +const successMessage = i18n.translate('xpack.synthetics.settings.syncGlobalParams', { + defaultMessage: 'Successfully applied global params to all monitors', +}); + +const failureMessage = i18n.translate('xpack.synthetics.settings.syncGlobalParams.fail', { + defaultMessage: 'Failed to apply global params to all monitors', +}); + export function* setDynamicSettingsEffect() { const couldNotSaveSettingsText = i18n.translate('xpack.synthetics.settings.error.couldNotSave', { defaultMessage: 'Could not save settings!', diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/index.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/index.ts index 169d357964162..823fbb36163b1 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/index.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/index.ts @@ -10,6 +10,7 @@ import { DynamicSettings } from '../../../../../common/runtime_types'; import { IHttpSerializedFetchError } from '..'; import { getConnectorsAction, getDynamicSettingsAction, setDynamicSettingsAction } from './actions'; import { ActionConnector } from './api'; +import { syncGlobalParamsAction } from './actions'; export interface DynamicSettingsState { settings?: DynamicSettings; @@ -60,3 +61,35 @@ export const dynamicSettingsReducer = createReducer(initialState, (builder) => { state.connectorsLoading = false; }); }); + +export interface SettingsState { + success: boolean | null; + loading: boolean; + error: IHttpSerializedFetchError | null; +} + +const initialSettingState: SettingsState = { + success: null, + loading: false, + error: null, +}; + +export const settingsReducer = createReducer(initialSettingState, (builder) => { + builder + .addCase(syncGlobalParamsAction.get, (state) => { + state.loading = true; + }) + .addCase(syncGlobalParamsAction.success, (state, action) => { + state.success = action.payload; + state.loading = false; + }) + .addCase(syncGlobalParamsAction.fail, (state, action) => { + state.error = action.payload; + state.loading = false; + state.success = false; + }); +}); + +export * from './actions'; +export * from './effects'; +export * from './selectors'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/selectors.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/selectors.ts index b688b07c4a635..b0b9e2814e0d2 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/selectors.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/settings/selectors.ts @@ -5,6 +5,13 @@ * 2.0. */ +import { createSelector } from 'reselect'; import { SyntheticsAppState } from '../root_reducer'; +import { AppState } from '..'; export const selectDynamicSettings = (state: SyntheticsAppState) => state.dynamicSettings; +const getState = (appState: AppState) => appState.agentPolicies; +export const selectAgentPolicies = createSelector(getState, (state) => state); + +export const selectAddingNewPrivateLocation = (state: AppState) => + state.agentPolicies.isAddingNewPrivateLocation ?? false; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/state/utils/fetch_effect.ts b/x-pack/plugins/synthetics/public/apps/synthetics/state/utils/fetch_effect.ts index 294da718a6fd3..ba61a29dc05ec 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/state/utils/fetch_effect.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/state/utils/fetch_effect.ts @@ -8,6 +8,7 @@ import { call, put } from 'redux-saga/effects'; import { PayloadAction } from '@reduxjs/toolkit'; import type { IHttpFetchError } from '@kbn/core-http-browser'; +import { kibanaService } from '../../../../utils/kibana_service'; import { IHttpSerializedFetchError, serializeHttpFetchError } from './http_error'; /** @@ -16,6 +17,8 @@ import { IHttpSerializedFetchError, serializeHttpFetchError } from './http_error * @param fetch creates a fetch action * @param success creates a success action * @param fail creates a failure action + * @param onSuccess + * @param onFailure * @template T the action type expected by the fetch action * @template R the type that the API request should return on success * @template S the type of the success action @@ -24,7 +27,9 @@ import { IHttpSerializedFetchError, serializeHttpFetchError } from './http_error export function fetchEffectFactory( fetch: (request: T) => Promise, success: (response: R) => PayloadAction, - fail: (error: IHttpSerializedFetchError) => PayloadAction + fail: (error: IHttpSerializedFetchError) => PayloadAction, + onSuccess?: ((response: R) => void) | string, + onFailure?: ((error: Error) => void) | string ) { return function* (action: PayloadAction): Generator { try { @@ -34,13 +39,32 @@ export function fetchEffectFactory( console.error(response); yield put(fail(serializeHttpFetchError(response as IHttpFetchError))); + if (typeof onFailure === 'function') { + onFailure?.(response); + } else if (typeof onFailure === 'string') { + kibanaService.core.notifications.toasts.addError(response, { + title: onFailure, + }); + } } else { yield put(success(response as R)); + if (typeof onSuccess === 'function') { + onSuccess?.(response as R); + } else if (typeof onSuccess === 'string') { + kibanaService.core.notifications.toasts.addSuccess(onSuccess); + } } } catch (error) { // eslint-disable-next-line no-console console.error(error); yield put(fail(serializeHttpFetchError(error))); + if (typeof onFailure === 'function') { + onFailure?.(error); + } else if (typeof onFailure === 'string') { + kibanaService.core.notifications.toasts.addError(error, { + title: onFailure, + }); + } } }; } diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/__mocks__/synthetics_store.mock.ts b/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/__mocks__/synthetics_store.mock.ts index a5de29e5a1e81..172ff8fdc2a2f 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/__mocks__/synthetics_store.mock.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/__mocks__/synthetics_store.mock.ts @@ -116,6 +116,11 @@ export const mockState: SyntheticsAppState = { error: null, data: null, }, + settings: { + loading: false, + error: null, + success: null, + }, dynamicSettings: { loading: false, }, diff --git a/x-pack/plugins/synthetics/server/feature.ts b/x-pack/plugins/synthetics/server/feature.ts index eaf246bba92c5..879d10a6e7281 100644 --- a/x-pack/plugins/synthetics/server/feature.ts +++ b/x-pack/plugins/synthetics/server/feature.ts @@ -6,6 +6,7 @@ */ import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; +import { syntheticsParamType } from '../common/types/saved_objects'; import { privateLocationsSavedObjectName } from '../common/saved_objects/private_locations'; import { PLUGIN } from '../common/constants/plugin'; import { UPTIME_RULE_TYPES } from '../common/constants/alerts'; @@ -35,6 +36,7 @@ export const uptimeFeature = { syntheticsMonitorType, syntheticsApiKeyObjectType, privateLocationsSavedObjectName, + syntheticsParamType, ], read: [], }, @@ -58,6 +60,7 @@ export const uptimeFeature = { savedObject: { all: [], read: [ + syntheticsParamType, umDynamicSettings.name, syntheticsMonitorType, syntheticsApiKeyObjectType, diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/saved_objects/saved_objects.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/saved_objects/saved_objects.ts index 6ddf333a8c5f1..2af67c7ee094b 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/saved_objects/saved_objects.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/saved_objects/saved_objects.ts @@ -8,6 +8,10 @@ import { SavedObjectsErrorHelpers, SavedObjectsServiceSetup } from '@kbn/core/server'; import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { + SYNTHETICS_SECRET_ENCRYPTED_TYPE, + syntheticsParamSavedObjectType, +} from './synthetics_param'; import { privateLocationsSavedObject } from './private_locations'; import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../common/constants'; import { DynamicSettings } from '../../../../common/runtime_types'; @@ -29,6 +33,7 @@ export const registerUptimeSavedObjects = ( savedObjectsService.registerType(getSyntheticsMonitorSavedObjectType(encryptedSavedObjects)); savedObjectsService.registerType(syntheticsServiceApiKey); + savedObjectsService.registerType(syntheticsParamSavedObjectType); encryptedSavedObjects.registerType({ type: syntheticsServiceApiKey.name, @@ -36,6 +41,7 @@ export const registerUptimeSavedObjects = ( }); encryptedSavedObjects.registerType(SYNTHETICS_MONITOR_ENCRYPTED_TYPE); + encryptedSavedObjects.registerType(SYNTHETICS_SECRET_ENCRYPTED_TYPE); }; export interface UMSavedObjectsAdapter { diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/saved_objects/synthetics_param.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/saved_objects/synthetics_param.ts new file mode 100644 index 0000000000000..ed876ca6a5340 --- /dev/null +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/saved_objects/synthetics_param.ts @@ -0,0 +1,27 @@ +/* + * 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 { SavedObjectsType } from '@kbn/core/server'; +import { syntheticsParamType } from '../../../../common/types/saved_objects'; + +export const SYNTHETICS_SECRET_ENCRYPTED_TYPE = { + type: syntheticsParamType, + attributesToEncrypt: new Set(['value']), +}; + +export const syntheticsParamSavedObjectType: SavedObjectsType = { + name: syntheticsParamType, + hidden: false, + namespaceType: 'multiple', + mappings: { + dynamic: false, + properties: {}, + }, + management: { + importableAndExportable: false, + icon: 'uptimeApp', + }, +}; diff --git a/x-pack/plugins/synthetics/server/routes/index.ts b/x-pack/plugins/synthetics/server/routes/index.ts index 972aeecfb43e7..d6ee93da563e9 100644 --- a/x-pack/plugins/synthetics/server/routes/index.ts +++ b/x-pack/plugins/synthetics/server/routes/index.ts @@ -5,6 +5,9 @@ * 2.0. */ +import { syncParamsSyntheticsParamsRoute } from './settings/sync_global_params'; +import { editSyntheticsParamsRoute } from './settings/edit_param'; +import { getSyntheticsParamsRoute } from './settings/params'; import { getIndexSizesRoute } from './settings/settings'; import { getAPIKeySyntheticsRoute } from './monitor_cruds/get_api_key'; import { getServiceLocationsRoute } from './synthetics_service/get_service_locations'; @@ -36,6 +39,7 @@ import { SyntheticsStreamingRouteFactory, } from '../legacy_uptime/routes'; import { getHasZipUrlMonitorRoute } from './fleet/get_has_zip_url_monitors'; +import { addSyntheticsParamsRoute } from './settings/add_param'; export const syntheticsAppRestApiRoutes: SyntheticsRestApiRouteFactory[] = [ addSyntheticsMonitorRoute, @@ -61,6 +65,10 @@ export const syntheticsAppRestApiRoutes: SyntheticsRestApiRouteFactory[] = [ getHasZipUrlMonitorRoute, createGetCurrentStatusRoute, getIndexSizesRoute, + getSyntheticsParamsRoute, + editSyntheticsParamsRoute, + addSyntheticsParamsRoute, + syncParamsSyntheticsParamsRoute, ]; export const syntheticsAppStreamingApiRoutes: SyntheticsStreamingRouteFactory[] = [ diff --git a/x-pack/plugins/synthetics/server/routes/monitor_cruds/edit_monitor.test.ts b/x-pack/plugins/synthetics/server/routes/monitor_cruds/edit_monitor.test.ts index 8fd8ac6d15073..a60eba8868274 100644 --- a/x-pack/plugins/synthetics/server/routes/monitor_cruds/edit_monitor.test.ts +++ b/x-pack/plugins/synthetics/server/routes/monitor_cruds/edit_monitor.test.ts @@ -16,6 +16,7 @@ import { import { UptimeServerSetup } from '../../legacy_uptime/lib/adapters'; import { SyntheticsService } from '../../synthetics_service/synthetics_service'; import { SyntheticsMonitorClient } from '../../synthetics_service/synthetics_monitor/synthetics_monitor_client'; +import { mockEncryptedSO } from '../../synthetics_service/utils/mocks'; jest.mock('../telemetry/monitor_upgrade_sender', () => ({ sendTelemetryEvents: jest.fn(), @@ -52,6 +53,7 @@ describe('syncEditedMonitor', () => { buildPackagePolicyFromPackage: jest.fn().mockReturnValue({}), }, }, + encryptedSavedObjects: mockEncryptedSO, } as unknown as UptimeServerSetup; const editedMonitor = { diff --git a/x-pack/plugins/synthetics/server/routes/settings/add_param.ts b/x-pack/plugins/synthetics/server/routes/settings/add_param.ts new file mode 100644 index 0000000000000..f8d790b5e5d86 --- /dev/null +++ b/x-pack/plugins/synthetics/server/routes/settings/add_param.ts @@ -0,0 +1,38 @@ +/* + * 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 { SyntheticsParam } from '../../../common/runtime_types'; +import { syntheticsParamType } from '../../../common/types/saved_objects'; +import { SyntheticsRestApiRouteFactory } from '../../legacy_uptime/routes/types'; +import { SYNTHETICS_API_URLS } from '../../../common/constants'; + +export const addSyntheticsParamsRoute: SyntheticsRestApiRouteFactory = () => ({ + method: 'POST', + path: SYNTHETICS_API_URLS.PARAMS, + validate: { + body: schema.object({ + key: schema.string(), + value: schema.string(), + description: schema.maybe(schema.string()), + tags: schema.maybe(schema.arrayOf(schema.string())), + namespaces: schema.maybe(schema.arrayOf(schema.string())), + }), + }, + writeAccess: true, + handler: async ({ request, server, savedObjectsClient }): Promise => { + const { namespaces, ...data } = request.body as SyntheticsParam; + + const spaceId = server.spaces.spacesService.getSpaceId(request); + + const result = await savedObjectsClient.create(syntheticsParamType, data, { + initialNamespaces: (namespaces ?? []).length > 0 ? namespaces : [spaceId], + }); + + return { data: result }; + }, +}); diff --git a/x-pack/plugins/synthetics/server/routes/settings/delete_param.ts b/x-pack/plugins/synthetics/server/routes/settings/delete_param.ts new file mode 100644 index 0000000000000..63909772838a8 --- /dev/null +++ b/x-pack/plugins/synthetics/server/routes/settings/delete_param.ts @@ -0,0 +1,32 @@ +/* + * 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 { syntheticsParamType } from '../../../common/types/saved_objects'; +import { SyntheticsRestApiRouteFactory } from '../../legacy_uptime/routes/types'; +import { SYNTHETICS_API_URLS } from '../../../common/constants'; + +export const deleteSyntheticsParamsRoute: SyntheticsRestApiRouteFactory = () => ({ + method: 'DELETE', + path: SYNTHETICS_API_URLS.PARAMS, + validate: { + body: schema.object({ + ids: schema.arrayOf(schema.string()), + }), + }, + writeAccess: true, + handler: async ({ savedObjectsClient, request, server }): Promise => { + const { ids } = request.body as { ids: string[] }; + + const result = await savedObjectsClient.bulkDelete( + ids.map((id) => ({ type: syntheticsParamType, id })), + { force: true } + ); + + return { data: result }; + }, +}); diff --git a/x-pack/plugins/synthetics/server/routes/settings/edit_param.ts b/x-pack/plugins/synthetics/server/routes/settings/edit_param.ts new file mode 100644 index 0000000000000..82160111ef791 --- /dev/null +++ b/x-pack/plugins/synthetics/server/routes/settings/edit_param.ts @@ -0,0 +1,35 @@ +/* + * 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 { SyntheticsParam } from '../../../common/runtime_types'; +import { syntheticsParamType } from '../../../common/types/saved_objects'; +import { SyntheticsRestApiRouteFactory } from '../../legacy_uptime/routes/types'; +import { SYNTHETICS_API_URLS } from '../../../common/constants'; + +export const editSyntheticsParamsRoute: SyntheticsRestApiRouteFactory = () => ({ + method: 'PUT', + path: SYNTHETICS_API_URLS.PARAMS, + validate: { + body: schema.object({ + id: schema.string(), + key: schema.string(), + value: schema.string(), + description: schema.maybe(schema.string()), + tags: schema.maybe(schema.arrayOf(schema.string())), + namespaces: schema.maybe(schema.arrayOf(schema.string())), + }), + }, + writeAccess: true, + handler: async ({ savedObjectsClient, request, server }): Promise => { + const { namespaces, id, ...data } = request.body as SyntheticsParam & { id: string }; + + const result = await savedObjectsClient.update(syntheticsParamType, id, data); + + return { data: result }; + }, +}); diff --git a/x-pack/plugins/synthetics/server/routes/settings/params.ts b/x-pack/plugins/synthetics/server/routes/settings/params.ts new file mode 100644 index 0000000000000..c75b94186fb85 --- /dev/null +++ b/x-pack/plugins/synthetics/server/routes/settings/params.ts @@ -0,0 +1,48 @@ +/* + * 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 { SavedObjectsFindResult } from '@kbn/core-saved-objects-api-server'; +import { syntheticsParamType } from '../../../common/types/saved_objects'; +import { SyntheticsRestApiRouteFactory } from '../../legacy_uptime/routes/types'; +import { SYNTHETICS_API_URLS } from '../../../common/constants'; + +export const getSyntheticsParamsRoute: SyntheticsRestApiRouteFactory = () => ({ + method: 'GET', + path: SYNTHETICS_API_URLS.PARAMS, + validate: {}, + handler: async ({ savedObjectsClient, request, server }): Promise => { + const encryptedSavedObjectsClient = server.encryptedSavedObjects.getClient(); + + const spaceId = server.spaces.spacesService.getSpaceId(request); + + const canSave = + (await server.coreStart?.capabilities.resolveCapabilities(request)).uptime.save ?? false; + + if (canSave) { + const finder = + await encryptedSavedObjectsClient.createPointInTimeFinderDecryptedAsInternalUser({ + type: syntheticsParamType, + perPage: 1000, + namespaces: [spaceId], + }); + + const hits: SavedObjectsFindResult[] = []; + for await (const result of finder.find()) { + hits.push(...result.saved_objects); + } + + return { data: hits }; + } else { + const data = await savedObjectsClient.find({ + type: syntheticsParamType, + perPage: 10000, + }); + + return { data: data.saved_objects }; + } + }, +}); diff --git a/x-pack/plugins/synthetics/server/routes/settings/sync_global_params.ts b/x-pack/plugins/synthetics/server/routes/settings/sync_global_params.ts new file mode 100644 index 0000000000000..d4b6c833e28e2 --- /dev/null +++ b/x-pack/plugins/synthetics/server/routes/settings/sync_global_params.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 { getPrivateLocations } from '../../synthetics_service/get_private_locations'; +import { SyntheticsRestApiRouteFactory } from '../../legacy_uptime/routes/types'; +import { SYNTHETICS_API_URLS } from '../../../common/constants'; + +export const syncParamsSyntheticsParamsRoute: SyntheticsRestApiRouteFactory = () => ({ + method: 'GET', + path: SYNTHETICS_API_URLS.SYNC_GLOBAL_PARAMS, + validate: {}, + writeAccess: true, + handler: async ({ + savedObjectsClient, + syntheticsMonitorClient, + request, + server, + }): Promise => { + const spaceId = server.spaces.spacesService.getSpaceId(request); + + const allPrivateLocations = await getPrivateLocations( + syntheticsMonitorClient, + savedObjectsClient + ); + + await syntheticsMonitorClient.syncGlobalParams({ + request, + spaceId, + savedObjectsClient, + allPrivateLocations, + encryptedSavedObjects: server.encryptedSavedObjects, + }); + + return { success: true }; + }, +}); diff --git a/x-pack/plugins/synthetics/server/routes/synthetics_service/run_once_monitor.ts b/x-pack/plugins/synthetics/server/routes/synthetics_service/run_once_monitor.ts index a730daa79ef87..3ce06f17bfb68 100644 --- a/x-pack/plugins/synthetics/server/routes/synthetics_service/run_once_monitor.ts +++ b/x-pack/plugins/synthetics/server/routes/synthetics_service/run_once_monitor.ts @@ -26,6 +26,8 @@ export const runOnceSyntheticsMonitorRoute: SyntheticsRestApiRouteFactory = () = const validationResult = validateMonitor(monitor); + const spaceId = server.spaces.spacesService.getSpaceId(request); + if (!validationResult.valid || !validationResult.decodedMonitor) { const { reason: message, details, payload } = validationResult; return response.badRequest({ body: { message, attributes: { details, ...payload } } }); @@ -33,6 +35,8 @@ export const runOnceSyntheticsMonitorRoute: SyntheticsRestApiRouteFactory = () = const { syntheticsService } = syntheticsMonitorClient; + const paramsBySpace = await syntheticsService.getSyntheticsParams({ spaceId }); + const errors = await syntheticsService.runOnceConfigs([ formatHeartbeatRequest({ // making it enabled, even if it's disabled in the UI @@ -40,6 +44,7 @@ export const runOnceSyntheticsMonitorRoute: SyntheticsRestApiRouteFactory = () = monitorId, heartbeatId: monitorId, runOnce: true, + params: paramsBySpace[spaceId], }), ]); diff --git a/x-pack/plugins/synthetics/server/routes/synthetics_service/test_now_monitor.ts b/x-pack/plugins/synthetics/server/routes/synthetics_service/test_now_monitor.ts index b08dd16871c7b..8dcc7f54c450a 100644 --- a/x-pack/plugins/synthetics/server/routes/synthetics_service/test_now_monitor.ts +++ b/x-pack/plugins/synthetics/server/routes/synthetics_service/test_now_monitor.ts @@ -53,6 +53,10 @@ export const testNowMonitorRoute: SyntheticsRestApiRouteFactory = () => ({ const testRunId = uuidv4(); + const spaceId = server.spaces.spacesService.getSpaceId(request); + + const paramsBySpace = await syntheticsService.getSyntheticsParams({ spaceId }); + const errors = await syntheticsService.runOnceConfigs([ formatHeartbeatRequest({ // making it enabled, even if it's disabled in the UI @@ -60,6 +64,7 @@ export const testNowMonitorRoute: SyntheticsRestApiRouteFactory = () => ({ monitorId, heartbeatId: (normalizedMonitor.attributes as MonitorFields)[ConfigKey.MONITOR_QUERY_ID], testRunId, + params: paramsBySpace[spaceId], }), ]); diff --git a/x-pack/plugins/synthetics/server/synthetics_service/formatters/format_configs.test.ts b/x-pack/plugins/synthetics/server/synthetics_service/formatters/format_configs.test.ts index 84b9063fcc88b..f10962d07c043 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/formatters/format_configs.test.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/formatters/format_configs.test.ts @@ -212,6 +212,7 @@ describe('formatHeartbeatRequest', () => { monitor: testBrowserConfig as SyntheticsMonitor, monitorId, heartbeatId, + params: {}, }); expect(actual).toEqual({ ...testBrowserConfig, @@ -233,6 +234,7 @@ describe('formatHeartbeatRequest', () => { monitor: testBrowserConfig as SyntheticsMonitor, monitorId, heartbeatId: monitorId, + params: {}, }); expect(actual).toEqual({ ...testBrowserConfig, @@ -255,6 +257,7 @@ describe('formatHeartbeatRequest', () => { monitor, monitorId, heartbeatId: monitorId, + params: {}, }); expect(actual).toEqual({ @@ -278,6 +281,7 @@ describe('formatHeartbeatRequest', () => { monitor, monitorId, heartbeatId: monitorId, + params: {}, }); expect(actual).toEqual({ @@ -301,6 +305,7 @@ describe('formatHeartbeatRequest', () => { monitorId, runOnce: true, heartbeatId: monitorId, + params: {}, }); expect(actual).toEqual({ @@ -325,6 +330,7 @@ describe('formatHeartbeatRequest', () => { monitorId, testRunId, heartbeatId: monitorId, + params: {}, }); expect(actual).toEqual({ @@ -340,4 +346,30 @@ describe('formatHeartbeatRequest', () => { fields_under_root: true, }); }); + + it('supports empty params', () => { + const monitorId = 'test-monitor-id'; + const testRunId = 'beep'; + const actual = formatHeartbeatRequest({ + monitor: { ...testBrowserConfig, params: '' } as SyntheticsMonitor, + monitorId, + testRunId, + heartbeatId: monitorId, + params: {}, + }); + + expect(actual).toEqual({ + ...testBrowserConfig, + params: '', + id: monitorId, + fields: { + config_id: monitorId, + 'monitor.project.name': testBrowserConfig.project_id, + 'monitor.project.id': testBrowserConfig.project_id, + run_once: undefined, + test_run_id: testRunId, + }, + fields_under_root: true, + }); + }); }); diff --git a/x-pack/plugins/synthetics/server/synthetics_service/formatters/format_configs.ts b/x-pack/plugins/synthetics/server/synthetics_service/formatters/format_configs.ts index 8c81191ee626b..5a7f70efec403 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/formatters/format_configs.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/formatters/format_configs.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { isNil, omitBy } from 'lodash'; +import { isEmpty, isNil, omitBy } from 'lodash'; import { BrowserFields, ConfigKey, @@ -68,14 +68,34 @@ export const formatHeartbeatRequest = ({ heartbeatId, runOnce, testRunId, + params: globalParams, }: { monitor: SyntheticsMonitor; monitorId: string; heartbeatId: string; runOnce?: boolean; testRunId?: string; + params: Record; }): HeartbeatConfig => { const projectId = (monitor as BrowserFields)[ConfigKey.PROJECT_ID]; + + let params = { ...(globalParams ?? {}) }; + + let paramsString = ''; + + try { + const monParamsStr = (monitor as BrowserFields)[ConfigKey.PARAMS]; + + if (monParamsStr) { + const monitorParams = JSON.parse(monParamsStr); + params = { ...params, ...monitorParams }; + } + + paramsString = isEmpty(params) ? '' : JSON.stringify(params); + } catch (e) { + // ignore + } + return { ...monitor, id: heartbeatId, @@ -87,5 +107,6 @@ export const formatHeartbeatRequest = ({ test_run_id: testRunId, }, fields_under_root: true, + params: paramsString, }; }; diff --git a/x-pack/plugins/synthetics/server/synthetics_service/get_private_locations.ts b/x-pack/plugins/synthetics/server/synthetics_service/get_private_locations.ts index 940d9caf3ea50..69ce2c6c09f3a 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/get_private_locations.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/get_private_locations.ts @@ -8,23 +8,21 @@ import { SavedObjectsClientContract } from '@kbn/core/server'; import { SyntheticsMonitorClient } from './synthetics_monitor/synthetics_monitor_client'; import { getSyntheticsPrivateLocations } from '../legacy_uptime/lib/saved_objects/private_locations'; -import { PrivateLocation } from '../../common/runtime_types'; export async function getPrivateLocations( syntheticsMonitorClient: SyntheticsMonitorClient, savedObjectsClient: SavedObjectsClientContract ) { - const privateLocations: PrivateLocation[] = await getSyntheticsPrivateLocations( - savedObjectsClient - ); - const agentPolicies = await syntheticsMonitorClient.privateLocationAPI.getAgentPolicies(); + const [privateLocations, agentPolicies] = await Promise.all([ + getSyntheticsPrivateLocations(savedObjectsClient), + syntheticsMonitorClient.privateLocationAPI.getAgentPolicies(), + ]); - const privateLocs = + return ( privateLocations?.map((loc) => ({ isServiceManaged: false, isInvalid: agentPolicies.find((policy) => policy.id === loc.agentPolicyId) === undefined, ...loc, - })) ?? []; - - return privateLocs; + })) ?? [] + ); } diff --git a/x-pack/plugins/synthetics/server/synthetics_service/project_monitor/project_monitor_formatter.test.ts b/x-pack/plugins/synthetics/server/synthetics_service/project_monitor/project_monitor_formatter.test.ts index ca14f58365eed..ae6e4d347f35a 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/project_monitor/project_monitor_formatter.test.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/project_monitor/project_monitor_formatter.test.ts @@ -29,6 +29,7 @@ import { formatSecrets } from '../utils'; import * as telemetryHooks from '../../routes/telemetry/monitor_upgrade_sender'; import { formatLocation } from '../../../common/utils/location_formatter'; import * as locationsUtil from '../get_all_locations'; +import { mockEncryptedSO } from '../utils/mocks'; const testMonitors = [ { @@ -121,6 +122,7 @@ describe('ProjectMonitorFormatter', () => { getSpaceId: jest.fn().mockReturnValue('test-space'), }, }, + encryptedSavedObjects: mockEncryptedSO, } as unknown as UptimeServerSetup; const syntheticsService = new SyntheticsService(serverMock); diff --git a/x-pack/plugins/synthetics/server/synthetics_service/project_monitor/project_monitor_formatter_legacy.test.ts b/x-pack/plugins/synthetics/server/synthetics_service/project_monitor/project_monitor_formatter_legacy.test.ts index cd74b2df88552..65f1cb8b9c522 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/project_monitor/project_monitor_formatter_legacy.test.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/project_monitor/project_monitor_formatter_legacy.test.ts @@ -23,6 +23,7 @@ import { formatSecrets } from '../utils'; import * as telemetryHooks from '../../routes/telemetry/monitor_upgrade_sender'; import { formatLocation } from '../../../common/utils/location_formatter'; +import { mockEncryptedSO } from '../utils/mocks'; const testMonitors = [ { @@ -115,6 +116,7 @@ describe('ProjectMonitorFormatterLegacy', () => { getSpaceId: jest.fn().mockReturnValue('test-space'), }, }, + encryptedSavedObjects: mockEncryptedSO, } as unknown as UptimeServerSetup; const syntheticsService = new SyntheticsService(serverMock); diff --git a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.test.ts b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.test.ts index 21f0e68588c73..e56b2fd9f839a 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.test.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.test.ts @@ -16,6 +16,7 @@ import { PrivateLocation, SyntheticsMonitorWithId, } from '../../../common/runtime_types'; +import { mockEncryptedSO } from '../utils/mocks'; describe('SyntheticsMonitorClient', () => { const mockEsClient = { @@ -43,6 +44,7 @@ describe('SyntheticsMonitorClient', () => { manifestUrl: 'http://localhost:8080/api/manifest', }, }, + encryptedSavedObjects: mockEncryptedSO, } as unknown as UptimeServerSetup; const syntheticsService = new SyntheticsService(serverMock); diff --git a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.ts b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.ts index e037f3a6ab75d..7c4471473d569 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.ts @@ -4,7 +4,14 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { KibanaRequest, SavedObject, SavedObjectsClientContract } from '@kbn/core/server'; +import { + KibanaRequest, + SavedObject, + SavedObjectsClientContract, + SavedObjectsFindResult, +} from '@kbn/core/server'; +import { EncryptedSavedObjectsPluginStart } from '@kbn/encrypted-saved-objects-plugin/server'; +import { normalizeSecrets } from '../utils'; import { UptimeServerSetup } from '../../legacy_uptime/lib/adapters'; import { SyntheticsPrivateLocation } from '../private_location/synthetics_private_location'; import { SyntheticsService } from '../synthetics_service'; @@ -17,7 +24,9 @@ import { HeartbeatConfig, PrivateLocation, EncryptedSyntheticsMonitor, + SyntheticsMonitorWithSecrets, } from '../../../common/runtime_types'; +import { syntheticsMonitorType } from '../../legacy_uptime/lib/saved_objects/synthetics_monitor'; export class SyntheticsMonitorClient { public syntheticsService: SyntheticsService; @@ -39,12 +48,15 @@ export class SyntheticsMonitorClient { const privateConfigs: HeartbeatConfig[] = []; const publicConfigs: HeartbeatConfig[] = []; + const paramsBySpace = await this.syntheticsService.getSyntheticsParams({ spaceId }); + for (const monitorObj of monitors) { const { monitor, id } = monitorObj; const config = formatHeartbeatRequest({ monitor, monitorId: id, heartbeatId: monitor[ConfigKey.MONITOR_QUERY_ID], + params: paramsBySpace[spaceId], }); const { privateLocations, publicLocations } = this.parseLocations(config); @@ -92,11 +104,14 @@ export class SyntheticsMonitorClient { const privateConfigs: HeartbeatConfig[] = []; const publicConfigs: HeartbeatConfig[] = []; + const paramsBySpace = await this.syntheticsService.getSyntheticsParams({ spaceId }); + for (const editedMonitor of monitors) { const editedConfig = formatHeartbeatRequest({ monitor: editedMonitor.monitor, monitorId: editedMonitor.id, heartbeatId: (editedMonitor.monitor as MonitorFields)[ConfigKey.MONITOR_QUERY_ID], + params: paramsBySpace[spaceId], }); const { publicLocations, privateLocations } = this.parseLocations(editedConfig); if (publicLocations.length > 0) { @@ -160,4 +175,117 @@ export class SyntheticsMonitorClient { return { privateLocations, publicLocations }; } + + async syncGlobalParams({ + request, + spaceId, + savedObjectsClient, + allPrivateLocations, + encryptedSavedObjects, + }: { + spaceId: string; + request: KibanaRequest; + allPrivateLocations: PrivateLocation[]; + savedObjectsClient: SavedObjectsClientContract; + encryptedSavedObjects: EncryptedSavedObjectsPluginStart; + }) { + const privateConfigs: HeartbeatConfig[] = []; + const publicConfigs: HeartbeatConfig[] = []; + + const monitors = await this.getAllMonitorConfigs({ encryptedSavedObjects, spaceId }); + + for (const monitor of monitors) { + const { publicLocations, privateLocations } = this.parseLocations(monitor); + if (publicLocations.length > 0) { + publicConfigs.push(monitor); + } + + if (privateLocations.length > 0) { + privateConfigs.push(monitor); + } + } + if (privateConfigs.length > 0) { + await this.privateLocationAPI.editMonitors( + privateConfigs, + request, + savedObjectsClient, + allPrivateLocations, + spaceId + ); + } + + if (publicConfigs.length > 0) { + return await this.syntheticsService.editConfig(publicConfigs, false); + } + } + + async getAllMonitorConfigs({ + spaceId, + encryptedSavedObjects, + }: { + spaceId: string; + encryptedSavedObjects: EncryptedSavedObjectsPluginStart; + }) { + const paramsBySpacePromise = this.syntheticsService.getSyntheticsParams({ spaceId }); + + const monitorsPromise = this.getAllMonitors({ encryptedSavedObjects, spaceId }); + + const [paramsBySpace, monitors] = await Promise.all([paramsBySpacePromise, monitorsPromise]); + + return this.mixParamsWithMonitors(spaceId, monitors, paramsBySpace); + } + + async getAllMonitors({ + spaceId, + encryptedSavedObjects, + }: { + spaceId: string; + encryptedSavedObjects: EncryptedSavedObjectsPluginStart; + }) { + const encryptedClient = encryptedSavedObjects.getClient(); + + const monitors: Array> = []; + + const finder = + await encryptedClient.createPointInTimeFinderDecryptedAsInternalUser( + { + type: syntheticsMonitorType, + perPage: 1000, + namespaces: [spaceId], + } + ); + + for await (const response of finder.find()) { + response.saved_objects.forEach((monitor) => { + monitors.push(monitor); + }); + } + + // no need to wait here + finder.close(); + + return monitors; + } + + mixParamsWithMonitors( + spaceId: string, + monitors: Array>, + paramsBySpace: Record> + ) { + const heartbeatConfigs: HeartbeatConfig[] = []; + + for (const monitor of monitors) { + const attributes = monitor.attributes as unknown as MonitorFields; + heartbeatConfigs.push( + formatHeartbeatRequest({ + monitor: normalizeSecrets(monitor).attributes, + monitorId: monitor.id, + heartbeatId: attributes[ConfigKey.MONITOR_QUERY_ID], + params: paramsBySpace[spaceId], + }) + ); + } + + return heartbeatConfigs; + } } diff --git a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.test.ts b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.test.ts index 472d9792a37bf..7144284e6b4f0 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.test.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.test.ts @@ -14,6 +14,7 @@ import { UptimeServerSetup } from '../legacy_uptime/lib/adapters'; import axios, { AxiosResponse } from 'axios'; import times from 'lodash/times'; import { LocationStatus, HeartbeatConfig } from '../../common/runtime_types'; +import { mockEncryptedSO } from './utils/mocks'; const taskManagerSetup = taskManagerMock.createSetup(); @@ -37,6 +38,7 @@ describe('SyntheticsService', () => { manifestUrl: 'http://localhost:8080/api/manifest', }, }, + encryptedSavedObjects: mockEncryptedSO, } as unknown as UptimeServerSetup; const getMockedService = (locationsNum: number = 1) => { @@ -59,7 +61,6 @@ describe('SyntheticsService', () => { service.apiClient.locations = locations; - jest.spyOn(service, 'getApiKey').mockResolvedValue({ name: 'example', id: 'i', apiKey: 'k' }); jest.spyOn(service, 'getOutput').mockResolvedValue({ hosts: ['es'], api_key: 'i:k' }); return { service, locations }; diff --git a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.ts b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.ts index 57a174f183166..2ae92fa4928bf 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/synthetics_service.ts @@ -15,6 +15,7 @@ import { TaskManagerStartContract, } from '@kbn/task-manager-plugin/server'; import { Subject } from 'rxjs'; +import { syntheticsParamType } from '../../common/types/saved_objects'; import { sendErrorTelemetryEvents } from '../routes/telemetry/monitor_upgrade_sender'; import { UptimeServerSetup } from '../legacy_uptime/lib/adapters'; import { installSyntheticsIndexTemplates } from '../routes/synthetics_service/install_index_templates'; @@ -33,6 +34,7 @@ import { SyntheticsMonitor, SyntheticsMonitorWithId, SyntheticsMonitorWithSecrets, + SyntheticsParam, ThrottlingOptions, } from '../../common/runtime_types'; import { getServiceLocations } from './get_service_locations'; @@ -232,20 +234,16 @@ export class SyntheticsService { } } - async getApiKey() { + async getOutput() { const { apiKey, isValid } = await getAPIKeyForSyntheticsService({ server: this.server }); if (!isValid) { - throw new Error( + this.server.logger.error( 'API key is not valid. Cannot push monitor configuration to synthetics public testing locations' ); + this.invalidApiKeyError = true; + return null; } - return apiKey; - } - - async getOutput() { - const apiKey = await this.getApiKey(); - return { hosts: this.esHosts, api_key: `${apiKey?.id}:${apiKey?.apiKey}`, @@ -253,48 +251,50 @@ export class SyntheticsService { } async addConfig(config: HeartbeatConfig | HeartbeatConfig[]) { - const monitors = this.formatConfigs(Array.isArray(config) ? config : [config]); - - const output = await this.getOutput(); + try { + const monitors = this.formatConfigs(Array.isArray(config) ? config : [config]); - this.logger.debug(`1 monitor will be pushed to synthetics service.`); + const output = await this.getOutput(); + if (output) { + this.logger.debug(`1 monitor will be pushed to synthetics service.`); - try { - this.syncErrors = await this.apiClient.post({ - monitors, - output, - }); + this.syncErrors = await this.apiClient.post({ + monitors, + output, + }); + } return this.syncErrors; } catch (e) { this.logger.error(e); - throw e; } } - async editConfig(monitorConfig: HeartbeatConfig | HeartbeatConfig[]) { - const monitors = this.formatConfigs( - Array.isArray(monitorConfig) ? monitorConfig : [monitorConfig] - ); + async editConfig(monitorConfig: HeartbeatConfig | HeartbeatConfig[], isEdit = true) { + try { + const monitors = this.formatConfigs( + Array.isArray(monitorConfig) ? monitorConfig : [monitorConfig] + ); - const output = await this.getOutput(); - const data = { - monitors, - output, - isEdit: true, - }; + const output = await this.getOutput(); + if (output) { + const data = { + monitors, + output, + isEdit, + }; - try { - this.syncErrors = await this.apiClient.put(data); + this.syncErrors = await this.apiClient.put(data); + } return this.syncErrors; } catch (e) { this.logger.error(e); - throw e; } } async pushConfigs() { const service = this; const subject = new Subject(); + const output = await this.getOutput(); subject.subscribe(async (monitorConfigs) => { try { @@ -305,7 +305,15 @@ export class SyntheticsService { return null; } - const output = await this.getOutput(); + if (!output) { + sendErrorTelemetryEvents(service.logger, service.server.telemetry, { + reason: 'API key is not valid.', + message: 'Failed to push configs. API key is not valid.', + type: 'invalidApiKey', + stackVersion: service.server.stackVersion, + }); + return; + } this.logger.debug(`${monitors.length} monitors will be pushed to synthetics service.`); @@ -336,6 +344,9 @@ export class SyntheticsService { } const output = await this.getOutput(); + if (!output) { + return; + } try { return await this.apiClient.runOnce({ @@ -350,6 +361,9 @@ export class SyntheticsService { async deleteConfigs(configs: SyntheticsMonitorWithId[]) { const output = await this.getOutput(); + if (!output) { + return; + } const data = { output, @@ -376,6 +390,8 @@ export class SyntheticsService { return [] as SyntheticsMonitorWithId[]; } + const paramsBySpace = await this.getSyntheticsParams(); + const finder = soClient.createPointInTimeFinder({ type: syntheticsMonitorType, perPage: 500, @@ -435,11 +451,42 @@ export class SyntheticsService { monitor: normalizeSecrets(monitor).attributes, monitorId: monitor.id, heartbeatId: attributes[ConfigKey.MONITOR_QUERY_ID], + params: monitor.namespaces + ? paramsBySpace[monitor.namespaces[0]] + : paramsBySpace.default, }); }) ); } } + async getSyntheticsParams({ spaceId }: { spaceId?: string } = {}) { + const encryptedClient = this.server.encryptedSavedObjects.getClient(); + + const paramsBySpace: Record> = {}; + + const finder = + await encryptedClient.createPointInTimeFinderDecryptedAsInternalUser({ + type: syntheticsParamType, + perPage: 1000, + namespaces: spaceId ? [spaceId] : undefined, + }); + + for await (const response of finder.find()) { + response.saved_objects.forEach((param) => { + param.namespaces?.forEach((namespace) => { + if (!paramsBySpace[namespace]) { + paramsBySpace[namespace] = {}; + } + paramsBySpace[namespace][param.attributes.key] = param.attributes.value; + }); + }); + } + + // no need to wait here + finder.close(); + + return paramsBySpace; + } formatConfigs(configs: SyntheticsMonitorWithId[]) { return configs.map((config: SyntheticsMonitor) => diff --git a/x-pack/plugins/synthetics/server/synthetics_service/utils/mocks.ts b/x-pack/plugins/synthetics/server/synthetics_service/utils/mocks.ts new file mode 100644 index 0000000000000..bbc4a726b9028 --- /dev/null +++ b/x-pack/plugins/synthetics/server/synthetics_service/utils/mocks.ts @@ -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 { EncryptedSavedObjectsClient } from '@kbn/encrypted-saved-objects-plugin/server'; + +export const mockEncryptedSO = { + getClient: jest.fn().mockReturnValue({ + getDecryptedAsInternalUser: jest.fn(), + createPointInTimeFinderDecryptedAsInternalUser: jest.fn().mockImplementation(() => ({ + close: jest.fn(), + find: jest.fn().mockReturnValue({ + async *[Symbol.asyncIterator]() { + yield { saved_objects: [{ attributes: { key: 'username', value: 'elastic' } }] }; + }, + }), + })), + } as jest.Mocked), +}; diff --git a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json index 409f29bfc437b..06cd0479b1169 100644 --- a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json +++ b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @@ -3876,16 +3876,6 @@ } } }, - "sourcemap": { - "properties": { - "1d": { - "type": "long" - }, - "all": { - "type": "long" - } - } - }, "onboarding": { "properties": { "1d": { @@ -4042,13 +4032,6 @@ } } }, - "sourcemap": { - "properties": { - "ms": { - "type": "long" - } - } - }, "onboarding": { "properties": { "ms": { diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index ce5486e70c5b3..1b3868de820df 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -326,7 +326,6 @@ "console.welcomePage.supportedRequestFormatDescription": "Lors de la saisie d'une requête, la console fera des suggestions que vous pourrez accepter en appuyant sur Entrée/Tab. Ces suggestions sont faites en fonction de la structure de la requête, des index et des types.", "console.welcomePage.supportedRequestFormatTitle": "La console prend en charge les requêtes dans un format compact, tel que le format cURL :", "contentManagement.inspector.metadataForm.unableToSaveDangerMessage": "Impossible d'enregistrer {entityName}", - "contentManagement.inspector.saveButtonLabel": "Mettre à jour {entityName}", "contentManagement.tableList.listing.createNewItemButtonLabel": "Créer {entityName}", "contentManagement.tableList.listing.deleteButtonMessage": "Supprimer {itemCount} {entityName}", "contentManagement.tableList.listing.deleteConfirmModalDescription": "Vous ne pourrez pas récupérer les {entityNamePlural} supprimés.", @@ -335,16 +334,9 @@ "contentManagement.tableList.listing.listingLimitExceededDescription": "Vous avez {totalItems} {entityNamePlural}, mais votre paramètre {listingLimitText} empêche le tableau ci-dessous d'en afficher plus de {listingLimitValue}.", "contentManagement.tableList.listing.listingLimitExceededDescriptionPermissions": "Vous pouvez modifier ce paramètre sous {advancedSettingsLink}.", "contentManagement.tableList.listing.table.editActionName": "Modifier {itemDescription}", - "contentManagement.tableList.listing.table.inspectActionName": "Inspecter {itemDescription}", "contentManagement.tableList.listing.unableToDeleteDangerMessage": "Impossible de supprimer la/le/les {entityName}(s)", "contentManagement.tableList.tagBadge.buttonLabel": "Bouton de balise {tagName}.", "contentManagement.tableList.tagFilterPanel.modifierKeyHelpText": "{modifierKeyPrefix} + cliquer sur Exclure", - "contentManagement.inspector.cancelButtonLabel": "Annuler", - "contentManagement.inspector.flyoutTitle": "Inspecteur", - "contentManagement.inspector.metadataForm.descriptionInputLabel": "Description", - "contentManagement.inspector.metadataForm.nameInputLabel": "Nom", - "contentManagement.inspector.metadataForm.nameIsEmptyError": "Nom obligatoire.", - "contentManagement.inspector.metadataForm.tagsLabel": "Balises", "contentManagement.tableList.lastUpdatedColumnTitle": "Dernière mise à jour", "contentManagement.tableList.listing.deleteSelectedItemsConfirmModal.cancelButtonLabel": "Annuler", "contentManagement.tableList.listing.deleteSelectedItemsConfirmModal.confirmButtonLabel": "Supprimer", @@ -355,7 +347,6 @@ "contentManagement.tableList.listing.listingLimitExceededTitle": "Limite de listing dépassée", "contentManagement.tableList.listing.table.actionTitle": "Actions", "contentManagement.tableList.listing.table.editActionDescription": "Modifier", - "contentManagement.tableList.listing.table.inspectActionDescription": "Inspecter", "contentManagement.tableList.listing.tableSortSelect.headerLabel": "Trier par", "contentManagement.tableList.listing.tableSortSelect.nameAscLabel": "Nom A-Z", "contentManagement.tableList.listing.tableSortSelect.nameDescLabel": "Nom Z-A", @@ -995,9 +986,7 @@ "customIntegrations.languageClients.JavaElasticsearch.readme.intro": "La mise en route avec le client Java Elasticsearch requiert l'exécution de quelques étapes.", "customIntegrations.languageClients.JavaElasticsearch.readme.title": "Client Java Elasticsearch", "customIntegrations.languageclients.JavascriptDescription": "Indexez les données dans Elasticsearch avec le client JavaScript.", - "customIntegrations.languageClients.JavascriptElasticsearch.readme.apiKey": "Utilisez le bouton ci-dessous pour générer une clé d'API. Vous en aurez besoin pour configurer votre client à la prochaine étape.", "customIntegrations.languageClients.JavascriptElasticsearch.readme.configure": "Configurer le client JavaScript Elasticsearch", - "customIntegrations.languageClients.JavascriptElasticsearch.readme.createApiKey": "Créer une clé d'API", "customIntegrations.languageClients.JavascriptElasticsearch.readme.install": "Installer le client JavaScript Elasticsearch", "customIntegrations.languageClients.JavascriptElasticsearch.readme.intro": "La mise en route avec le client JavaScript Elasticsearch requiert l'exécution de quelques étapes.", "customIntegrations.languageClients.JavascriptElasticsearch.readme.title": "Client JavaScript Elasticsearch", @@ -7823,7 +7812,6 @@ "xpack.apm.settings.apmIndices.metricsIndicesLabel": "Index des indicateurs", "xpack.apm.settings.apmIndices.noPermissionTooltipLabel": "Votre rôle d'utilisateur ne dispose pas d'autorisations pour changer les index APM", "xpack.apm.settings.apmIndices.onboardingIndicesLabel": "Intégration des index", - "xpack.apm.settings.apmIndices.sourcemapIndicesLabel": "Index des source maps", "xpack.apm.settings.apmIndices.spanIndicesLabel": "Index des intervalles", "xpack.apm.settings.apmIndices.title": "Index", "xpack.apm.settings.apmIndices.transactionIndicesLabel": "Index des transactions", @@ -12729,7 +12717,6 @@ "xpack.enterpriseSearch.shared.flashMessages.defaultErrorMessage": "Une erreur inattendue s'est produite", "xpack.enterpriseSearch.shared.result.expandTooltip.allVisible": "Tous les champs sont visibles", "xpack.enterpriseSearch.shared.unsavedChangesMessage": "Vos modifications n'ont pas été enregistrées. Voulez-vous vraiment quitter ?", - "xpack.enterpriseSearch.technicalPreviewLabel": "Version d'évaluation technique", "xpack.enterpriseSearch.trialCalloutLink": "Découvrez plus d'informations sur les licences de la Suite Elastic.", "xpack.enterpriseSearch.troubleshooting.setup.documentationLinkLabel": "Dépannage de la configuration d'Enterprise Search", "xpack.enterpriseSearch.typeLabel": "Type", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 475eb687a9b09..23ca149fbbe89 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -326,7 +326,6 @@ "console.welcomePage.supportedRequestFormatDescription": "リクエストの入力中、コンソールが候補を提案するので、Enter/Tabを押して確定できます。これらの候補はリクエストの構造、およびインデックス、タイプに基づくものです。", "console.welcomePage.supportedRequestFormatTitle": "コンソールは cURL と同様に、コンパクトなフォーマットのリクエストを理解できます。", "contentManagement.inspector.metadataForm.unableToSaveDangerMessage": "{entityName}を保存できません", - "contentManagement.inspector.saveButtonLabel": "{entityName}の作成", "contentManagement.tableList.listing.createNewItemButtonLabel": "Create {entityName}", "contentManagement.tableList.listing.deleteButtonMessage": "{itemCount} 件の {entityName} を削除", "contentManagement.tableList.listing.deleteConfirmModalDescription": "削除された {entityNamePlural} は復元できません。", @@ -337,16 +336,9 @@ "contentManagement.tableList.listing.noAvailableItemsMessage": "利用可能な {entityNamePlural} がありません。", "contentManagement.tableList.listing.noMatchedItemsMessage": "検索条件に一致する {entityNamePlural} がありません。", "contentManagement.tableList.listing.table.editActionName": "{itemDescription}の編集", - "contentManagement.tableList.listing.table.inspectActionName": "{itemDescription}の検査", "contentManagement.tableList.listing.unableToDeleteDangerMessage": "{entityName} を削除できません", "contentManagement.tableList.tagBadge.buttonLabel": "{tagName}タグボタン。", "contentManagement.tableList.tagFilterPanel.modifierKeyHelpText": "{modifierKeyPrefix} + 除外をクリック", - "contentManagement.inspector.cancelButtonLabel": "キャンセル", - "contentManagement.inspector.flyoutTitle": "インスペクター", - "contentManagement.inspector.metadataForm.descriptionInputLabel": "説明", - "contentManagement.inspector.metadataForm.nameInputLabel": "名前", - "contentManagement.inspector.metadataForm.nameIsEmptyError": "名前が必要です。", - "contentManagement.inspector.metadataForm.tagsLabel": "タグ", "contentManagement.tableList.lastUpdatedColumnTitle": "最終更新", "contentManagement.tableList.listing.deleteSelectedItemsConfirmModal.cancelButtonLabel": "キャンセル", "contentManagement.tableList.listing.deleteSelectedItemsConfirmModal.confirmButtonLabel": "削除", @@ -357,7 +349,6 @@ "contentManagement.tableList.listing.listingLimitExceededTitle": "リスティング制限超過", "contentManagement.tableList.listing.table.actionTitle": "アクション", "contentManagement.tableList.listing.table.editActionDescription": "編集", - "contentManagement.tableList.listing.table.inspectActionDescription": "検査", "contentManagement.tableList.listing.tableSortSelect.headerLabel": "並べ替え基準", "contentManagement.tableList.listing.tableSortSelect.nameAscLabel": "名前A-Z", "contentManagement.tableList.listing.tableSortSelect.nameDescLabel": "名前Z-A", @@ -995,9 +986,7 @@ "customIntegrations.languageClients.JavaElasticsearch.readme.intro": "Elasticsearch Javaクライアントを起動するには、いくつかの手順が必要です。", "customIntegrations.languageClients.JavaElasticsearch.readme.title": "Elasticsearch Javaクライアント", "customIntegrations.languageclients.JavascriptDescription": "JavaScriptクライアントでElasticsearchのデータにインデックスを作成します。", - "customIntegrations.languageClients.JavascriptElasticsearch.readme.apiKey": "以下のボタンを使用して、APIキーを生成します。次のステップでクライアントを設定するには、このキーが必要です。", "customIntegrations.languageClients.JavascriptElasticsearch.readme.configure": "Elasticsearch JavaScriptクライアントを構成する", - "customIntegrations.languageClients.JavascriptElasticsearch.readme.createApiKey": "APIキーを作成する", "customIntegrations.languageClients.JavascriptElasticsearch.readme.install": "Elasticsearch JavaScriptクライアントをインストールする", "customIntegrations.languageClients.JavascriptElasticsearch.readme.intro": "Elasticsearch JavaScriptクライアントを起動するには、いくつかの手順が必要です。", "customIntegrations.languageClients.JavascriptElasticsearch.readme.title": "Elasticsearch JavaScriptクライアント", @@ -7812,7 +7801,6 @@ "xpack.apm.settings.apmIndices.metricsIndicesLabel": "メトリックインデックス", "xpack.apm.settings.apmIndices.noPermissionTooltipLabel": "ユーザーロールには、APMインデックスを変更する権限がありません", "xpack.apm.settings.apmIndices.onboardingIndicesLabel": "オンボーディングインデックス", - "xpack.apm.settings.apmIndices.sourcemapIndicesLabel": "ソースマップインデックス", "xpack.apm.settings.apmIndices.spanIndicesLabel": "スパンインデックス", "xpack.apm.settings.apmIndices.title": "インデックス", "xpack.apm.settings.apmIndices.transactionIndicesLabel": "トランザクションインデックス", @@ -12716,7 +12704,6 @@ "xpack.enterpriseSearch.shared.flashMessages.defaultErrorMessage": "予期しないエラーが発生しました", "xpack.enterpriseSearch.shared.result.expandTooltip.allVisible": "すべてのフィールドが表示されます", "xpack.enterpriseSearch.shared.unsavedChangesMessage": "変更は保存されていません。終了してよろしいですか?", - "xpack.enterpriseSearch.technicalPreviewLabel": "テクニカルプレビュー", "xpack.enterpriseSearch.trialCalloutLink": "Elastic Stackライセンスの詳細を参照してください。", "xpack.enterpriseSearch.troubleshooting.setup.documentationLinkLabel": "エンタープライズ サーチ設定のトラブルシューティング", "xpack.enterpriseSearch.typeLabel": "型", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index a2cdf2f2c4b31..6cd3f143aaec5 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -326,7 +326,6 @@ "console.welcomePage.supportedRequestFormatDescription": "键入请求时,控制台将提供建议,您可以通过按 Enter/Tab 键来接受建议。这些建议基于请求结构以及索引和类型进行提供。", "console.welcomePage.supportedRequestFormatTitle": "Console 理解紧凑格式的请求,类似于 cURL:", "contentManagement.inspector.metadataForm.unableToSaveDangerMessage": "无法保存 {entityName}", - "contentManagement.inspector.saveButtonLabel": "更新 {entityName}", "contentManagement.tableList.listing.createNewItemButtonLabel": "创建 {entityName}", "contentManagement.tableList.listing.deleteButtonMessage": "删除 {itemCount} 个 {entityName}", "contentManagement.tableList.listing.deleteConfirmModalDescription": "无法恢复删除的 {entityNamePlural}。", @@ -337,16 +336,9 @@ "contentManagement.tableList.listing.noAvailableItemsMessage": "没有可用的{entityNamePlural}。", "contentManagement.tableList.listing.noMatchedItemsMessage": "没有任何{entityNamePlural}匹配您的搜索。", "contentManagement.tableList.listing.table.editActionName": "编辑 {itemDescription}", - "contentManagement.tableList.listing.table.inspectActionName": "检查 {itemDescription}", "contentManagement.tableList.listing.unableToDeleteDangerMessage": "无法删除{entityName}", "contentManagement.tableList.tagBadge.buttonLabel": "{tagName} 标签按钮。", "contentManagement.tableList.tagFilterPanel.modifierKeyHelpText": "{modifierKeyPrefix} + 单击排除", - "contentManagement.inspector.cancelButtonLabel": "取消", - "contentManagement.inspector.flyoutTitle": "检查器", - "contentManagement.inspector.metadataForm.descriptionInputLabel": "描述", - "contentManagement.inspector.metadataForm.nameInputLabel": "名称", - "contentManagement.inspector.metadataForm.nameIsEmptyError": "名称必填。", - "contentManagement.inspector.metadataForm.tagsLabel": "标签", "contentManagement.tableList.lastUpdatedColumnTitle": "上次更新时间", "contentManagement.tableList.listing.deleteSelectedItemsConfirmModal.cancelButtonLabel": "取消", "contentManagement.tableList.listing.deleteSelectedItemsConfirmModal.confirmButtonLabel": "删除", @@ -357,7 +349,6 @@ "contentManagement.tableList.listing.listingLimitExceededTitle": "已超过列表限制", "contentManagement.tableList.listing.table.actionTitle": "操作", "contentManagement.tableList.listing.table.editActionDescription": "编辑", - "contentManagement.tableList.listing.table.inspectActionDescription": "检查", "contentManagement.tableList.listing.tableSortSelect.headerLabel": "排序依据", "contentManagement.tableList.listing.tableSortSelect.nameAscLabel": "名称 A-Z", "contentManagement.tableList.listing.tableSortSelect.nameDescLabel": "名称 Z-A", @@ -997,9 +988,7 @@ "customIntegrations.languageClients.JavaElasticsearch.readme.intro": "开始使用 Elasticsearch Java 客户端需要完成一些步骤。", "customIntegrations.languageClients.JavaElasticsearch.readme.title": "Elasticsearch Java 客户端", "customIntegrations.languageclients.JavascriptDescription": "通过 JavaScript 客户端将数据索引到 Elasticsearch。", - "customIntegrations.languageClients.JavascriptElasticsearch.readme.apiKey": "使用以下按钮生成 API 密钥。您需要在下一步中这样设置您的客户端。", "customIntegrations.languageClients.JavascriptElasticsearch.readme.configure": "配置 Elasticsearch JavaScript 客户端", - "customIntegrations.languageClients.JavascriptElasticsearch.readme.createApiKey": "创建 API 密钥", "customIntegrations.languageClients.JavascriptElasticsearch.readme.install": "安装 Elasticsearch JavaScript 客户端", "customIntegrations.languageClients.JavascriptElasticsearch.readme.intro": "开始使用 Elasticsearch JavaScript 客户端需要完成一些步骤。", "customIntegrations.languageClients.JavascriptElasticsearch.readme.title": "Elasticsearch JavaScript 客户端", @@ -7826,7 +7815,6 @@ "xpack.apm.settings.apmIndices.metricsIndicesLabel": "指标索引", "xpack.apm.settings.apmIndices.noPermissionTooltipLabel": "您的用户角色无权更改 APM 索引", "xpack.apm.settings.apmIndices.onboardingIndicesLabel": "载入索引", - "xpack.apm.settings.apmIndices.sourcemapIndicesLabel": "源地图索引", "xpack.apm.settings.apmIndices.spanIndicesLabel": "跨度索引", "xpack.apm.settings.apmIndices.title": "索引", "xpack.apm.settings.apmIndices.transactionIndicesLabel": "事务索引", @@ -12733,7 +12721,6 @@ "xpack.enterpriseSearch.shared.flashMessages.defaultErrorMessage": "发生意外错误", "xpack.enterpriseSearch.shared.result.expandTooltip.allVisible": "所有字段均可见", "xpack.enterpriseSearch.shared.unsavedChangesMessage": "您的更改尚未更改。是否确定要离开?", - "xpack.enterpriseSearch.technicalPreviewLabel": "技术预览", "xpack.enterpriseSearch.trialCalloutLink": "详细了解 Elastic Stack 许可证。", "xpack.enterpriseSearch.troubleshooting.setup.documentationLinkLabel": "Enterprise Search 设置故障排除", "xpack.enterpriseSearch.typeLabel": "类型", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_alerts_aggregations.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.test.ts similarity index 65% rename from x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_alerts_aggregations.test.ts rename to x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.test.ts index c7e9eec49d778..660d5c6a7a5c3 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_alerts_aggregations.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.test.ts @@ -9,7 +9,7 @@ import { ALERTS_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { renderHook } from '@testing-library/react-hooks'; import { useKibana } from '../../common/lib/kibana'; import { mockAggsResponse, mockAlertSummaryTimeRange } from '../mock/alert_summary_widget'; -import { useLoadRuleAlertsAggs } from './use_load_rule_alerts_aggregations'; +import { useLoadAlertSummary } from './use_load_alert_summary'; jest.mock('../../common/lib/kibana'); @@ -23,39 +23,48 @@ describe('useLoadRuleAlertsAggs', () => { it('should return the expected data from the Elasticsearch Aggs. query', async () => { const { result, waitForNextUpdate } = renderHook(() => - useLoadRuleAlertsAggs({ + useLoadAlertSummary({ features: ALERTS_FEATURE_ID, - ruleId: 'c95bc120-1d56-11ed-9cc7-e7214ada1128', timeRange: mockAlertSummaryTimeRange, }) ); expect(result.current).toEqual({ - isLoadingRuleAlertsAggs: true, - ruleAlertsAggs: { active: 0, recovered: 0 }, + isLoading: true, + alertSummary: { active: 0, recovered: 0 }, }); await waitForNextUpdate(); - const { ruleAlertsAggs, errorRuleAlertsAggs } = result.current; - expect(ruleAlertsAggs).toEqual({ + const { alertSummary, error } = result.current; + expect(alertSummary).toEqual({ active: 1, recovered: 7, }); - expect(errorRuleAlertsAggs).toBeFalsy(); + expect(error).toBeFalsy(); }); it('should have the correct query body sent to Elasticsearch', async () => { const ruleId = 'c95bc120-1d56-11ed-9cc7-e7214ada1128'; const { utcFrom, utcTo } = mockAlertSummaryTimeRange; + const filter = { + term: { + 'kibana.alert.rule.uuid': ruleId, + }, + }; const { waitForNextUpdate } = renderHook(() => - useLoadRuleAlertsAggs({ + useLoadAlertSummary({ features: ALERTS_FEATURE_ID, - ruleId, timeRange: mockAlertSummaryTimeRange, + filter, }) ); await waitForNextUpdate(); - const body = `{"index":"mock_index","size":0,"query":{"bool":{"must":[{"term":{"kibana.alert.rule.uuid":"${ruleId}"}},{"range":{"@timestamp":{"gte":"${utcFrom}","lt":"${utcTo}"}}},{"bool":{"should":[{"term":{"kibana.alert.status":"active"}},{"term":{"kibana.alert.status":"recovered"}}]}}]}},"aggs":{"total":{"filters":{"filters":{"totalActiveAlerts":{"term":{"kibana.alert.status":"active"}},"totalRecoveredAlerts":{"term":{"kibana.alert.status":"recovered"}}}}}}}`; + const body = + `{"index":"mock_index","size":0,` + + `"query":{"bool":{"filter":[{"range":{"@timestamp":{"gte":"${utcFrom}","lt":"${utcTo}"}}},` + + `{"bool":{"should":[{"term":{"kibana.alert.status":"active"}},{"term":{"kibana.alert.status":"recovered"}}]}},` + + `{"term":{"kibana.alert.rule.uuid":"c95bc120-1d56-11ed-9cc7-e7214ada1128"}}]}},` + + `"aggs":{"total":{"filters":{"filters":{"totalActiveAlerts":{"term":{"kibana.alert.status":"active"}},"totalRecoveredAlerts":{"term":{"kibana.alert.status":"recovered"}}}}}}}`; expect(useKibanaMock().services.http.post).toHaveBeenCalledWith( '/internal/rac/alerts/find', diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_alerts_aggregations.ts b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.ts similarity index 79% rename from x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_alerts_aggregations.ts rename to x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.ts index 902e52b0c9276..cc1dc5137b5f8 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_alerts_aggregations.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.ts @@ -6,6 +6,7 @@ */ import { useEffect, useState, useCallback, useRef } from 'react'; +import { estypes } from '@elastic/elasticsearch'; import { AsApiContract } from '@kbn/actions-plugin/common'; import { HttpSetup } from '@kbn/core/public'; import { BASE_RAC_ALERTS_API_PATH } from '@kbn/rule-registry-plugin/common/constants'; @@ -17,35 +18,35 @@ export interface AlertSummaryTimeRange { title: JSX.Element | string; } -interface UseLoadRuleAlertsAggs { +interface UseLoadAlertSummaryProps { features: string; - ruleId: string; timeRange: AlertSummaryTimeRange; + filter?: estypes.QueryDslQueryContainer; } -interface RuleAlertsAggs { +interface AlertSummary { active: number; recovered: number; error?: string; } -interface LoadRuleAlertsAggs { - isLoadingRuleAlertsAggs: boolean; - ruleAlertsAggs: { +interface LoadAlertSummary { + isLoading: boolean; + alertSummary: { active: number; recovered: number; }; - errorRuleAlertsAggs?: string; + error?: string; } interface IndexName { index: string; } -export function useLoadRuleAlertsAggs({ features, ruleId, timeRange }: UseLoadRuleAlertsAggs) { +export function useLoadAlertSummary({ features, timeRange, filter }: UseLoadAlertSummaryProps) { const { http } = useKibana().services; - const [ruleAlertsAggs, setRuleAlertsAggs] = useState({ - isLoadingRuleAlertsAggs: true, - ruleAlertsAggs: { active: 0, recovered: 0 }, + const [alertSummary, setAlertSummary] = useState({ + isLoading: true, + alertSummary: { active: 0, recovered: 0 }, }); const isCancelledRef = useRef(false); const abortCtrlRef = useRef(new AbortController()); @@ -62,38 +63,38 @@ export function useLoadRuleAlertsAggs({ features, ruleId, timeRange }: UseLoadRu const { active, recovered, error } = await fetchRuleAlertsAggByTimeRange({ http, index, - ruleId, signal: abortCtrlRef.current.signal, timeRange, + filter, }); if (error) throw error; if (!isCancelledRef.current) { - setRuleAlertsAggs((oldState: LoadRuleAlertsAggs) => ({ + setAlertSummary((oldState: LoadAlertSummary) => ({ ...oldState, - ruleAlertsAggs: { + alertSummary: { active, recovered, }, - isLoadingRuleAlertsAggs: false, + isLoading: false, })); } } catch (error) { if (!isCancelledRef.current) { if (error.name !== 'AbortError') { - setRuleAlertsAggs((oldState: LoadRuleAlertsAggs) => ({ + setAlertSummary((oldState: LoadAlertSummary) => ({ ...oldState, - isLoadingRuleAlertsAggs: false, - errorRuleAlertsAggs: error, + isLoading: false, + error, })); } } } - }, [features, http, ruleId, timeRange]); + }, [features, filter, http, timeRange]); useEffect(() => { loadRuleAlertsAgg(); }, [loadRuleAlertsAgg]); - return ruleAlertsAggs; + return alertSummary; } async function fetchIndexNameAPI({ @@ -114,16 +115,16 @@ async function fetchIndexNameAPI({ async function fetchRuleAlertsAggByTimeRange({ http, index, - ruleId, signal, timeRange: { utcFrom, utcTo }, + filter, }: { http: HttpSetup; index: string; - ruleId: string; signal: AbortSignal; timeRange: AlertSummaryTimeRange; -}): Promise { + filter?: estypes.QueryDslQueryContainer; +}): Promise { try { const res = await http.post>(`${BASE_RAC_ALERTS_API_PATH}/find`, { signal, @@ -132,12 +133,7 @@ async function fetchRuleAlertsAggByTimeRange({ size: 0, query: { bool: { - must: [ - { - term: { - 'kibana.alert.rule.uuid': ruleId, - }, - }, + filter: [ { range: { '@timestamp': { @@ -162,6 +158,7 @@ async function fetchRuleAlertsAggByTimeRange({ ], }, }, + ...(filter ? [filter] : []), ], }, }, @@ -198,6 +195,6 @@ async function fetchRuleAlertsAggByTimeRange({ error, active: 0, recovered: 0, - } as RuleAlertsAggs; + }; } } diff --git a/x-pack/plugins/triggers_actions_ui/public/application/mock/alert_summary_widget/index.ts b/x-pack/plugins/triggers_actions_ui/public/application/mock/alert_summary_widget/index.ts index 5305bfccb2330..ea3b2bdee41c1 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/mock/alert_summary_widget/index.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/mock/alert_summary_widget/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertSummaryTimeRange } from '../../hooks/use_load_rule_alerts_aggregations'; +import { AlertSummaryTimeRange } from '../../hooks/use_load_alert_summary'; import { Rule } from '../../../types'; export const mockRule = (): Rule => { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.test.tsx index e4bfade8f5b98..04250620fb42e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.test.tsx @@ -21,9 +21,9 @@ jest.mock('../../../../hooks/use_load_rule_types', () => ({ useLoadRuleTypes: jest.fn(), })); -jest.mock('../../../../hooks/use_load_rule_alerts_aggregations', () => ({ - useLoadRuleAlertsAggs: jest.fn().mockReturnValue({ - ruleAlertsAggs: { active: 1, recovered: 7 }, +jest.mock('../../../../hooks/use_load_alert_summary', () => ({ + useLoadAlertSummary: jest.fn().mockReturnValue({ + alertSummary: { active: 1, recovered: 7 }, }), })); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.tsx index 688876c6a0054..d298ca93187d9 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/alert_summary/rule_alerts_summary.tsx @@ -8,15 +8,16 @@ import { EuiLoadingSpinner } from '@elastic/eui'; import { ALERTS_FEATURE_ID } from '@kbn/alerting-plugin/common'; import React, { useEffect, useState } from 'react'; -import { useLoadRuleAlertsAggs } from '../../../../hooks/use_load_rule_alerts_aggregations'; +import { useLoadAlertSummary } from '../../../../hooks/use_load_alert_summary'; import { useLoadRuleTypes } from '../../../../hooks/use_load_rule_types'; import { RuleAlertsSummaryProps } from '.'; import { AlertSummaryWidgetError, AlertsSummaryWidgetUI } from './components'; export const RuleAlertsSummary = ({ - rule, + filter, filteredRuleTypes, onClick, + rule, timeRange, }: RuleAlertsSummaryProps) => { const [features, setFeatures] = useState(''); @@ -24,12 +25,12 @@ export const RuleAlertsSummary = ({ filteredRuleTypes, }); const { - ruleAlertsAggs: { active, recovered }, - isLoadingRuleAlertsAggs, - errorRuleAlertsAggs, - } = useLoadRuleAlertsAggs({ - ruleId: rule.id, + alertSummary: { active, recovered }, + isLoading, + error, + } = useLoadAlertSummary({ features, + filter, timeRange, }); @@ -40,8 +41,8 @@ export const RuleAlertsSummary = ({ } else setFeatures(rule.consumer); }, [rule, ruleTypes]); - if (isLoadingRuleAlertsAggs) return ; - if (errorRuleAlertsAggs) return ; + if (isLoading) return ; + if (error) return ; return ( void; timeRange: AlertSummaryTimeRange; + filter?: estypes.QueryDslQueryContainer; } diff --git a/x-pack/test/api_integration/apis/aiops/test_data.ts b/x-pack/test/api_integration/apis/aiops/test_data.ts index 55784f04fe568..8503adc74a250 100644 --- a/x-pack/test/api_integration/apis/aiops/test_data.ts +++ b/x-pack/test/api_integration/apis/aiops/test_data.ts @@ -138,7 +138,6 @@ export const explainLogRateSpikesTestData: TestData[] = [ group: [ { fieldName: 'response_code', fieldValue: '500', duplicate: false }, { fieldName: 'url', fieldValue: 'home.php', duplicate: false }, - { fieldName: 'url', fieldValue: 'home.php', duplicate: false }, { fieldName: 'url', fieldValue: 'login.php', duplicate: false }, ], docCount: 792, diff --git a/x-pack/test/api_integration/apis/metrics_ui/snapshot.ts b/x-pack/test/api_integration/apis/metrics_ui/snapshot.ts index d604dc69a87e9..9fa041108964e 100644 --- a/x-pack/test/api_integration/apis/metrics_ui/snapshot.ts +++ b/x-pack/test/api_integration/apis/metrics_ui/snapshot.ts @@ -20,13 +20,14 @@ export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const supertest = getService('supertest'); const fetchSnapshot = async ( - body: SnapshotRequest + body: SnapshotRequest, + expectedStatusCode = 200 ): Promise => { const response = await supertest .post('/api/metrics/snapshot') .set('kbn-xsrf', 'xxx') .send(body) - .expect(200); + .expect(expectedStatusCode); return response.body; }; @@ -37,7 +38,7 @@ export default function ({ getService }: FtrProviderContext) { after(() => esArchiver.unload('x-pack/test/functional/es_archives/infra/6.6.0/docker')); it('should basically work', async () => { - const resp = fetchSnapshot({ + const snapshot = await fetchSnapshot({ sourceId: 'default', timerange: { to: max, @@ -47,34 +48,62 @@ export default function ({ getService }: FtrProviderContext) { metrics: [{ type: 'cpu' }], nodeType: 'container', groupBy: [], + includeTimeseries: true, }); - return resp.then((data) => { - if (!resp) { - return; - } - const snapshot = data; - expect(snapshot).to.have.property('nodes'); - if (snapshot) { - const { nodes } = snapshot; - expect(nodes.length).to.equal(5); - const firstNode = first(nodes) as any; - expect(firstNode).to.have.property('path'); - expect(firstNode.path.length).to.equal(1); - expect(first(firstNode.path)).to.have.property( - 'value', - '242fddb9d376bbf0e38025d81764847ee5ec0308adfa095918fd3266f9d06c6a' - ); - expect(firstNode).to.have.property('metrics'); - expect(firstNode.metrics).to.eql([ - { - name: 'cpu', - value: 0, - max: 0, - avg: 0, + + expect(snapshot).to.have.property('nodes'); + + if (snapshot) { + const { nodes } = snapshot; + expect(nodes.length).to.equal(5); + const firstNode = first(nodes) as any; + expect(firstNode).to.have.property('path'); + expect(firstNode.path.length).to.equal(1); + expect(first(firstNode.path)).to.have.property( + 'value', + '242fddb9d376bbf0e38025d81764847ee5ec0308adfa095918fd3266f9d06c6a' + ); + expect(firstNode).to.have.property('metrics'); + expect(firstNode.metrics).to.eql([ + { + name: 'cpu', + value: 0, + max: 0, + avg: 0, + timeseries: { + columns: [ + { + name: 'timestamp', + type: 'date', + }, + { + name: 'metric_0', + type: 'number', + }, + ], + id: 'cpu', + rows: [ + { + metric_0: 0, + timestamp: 1547578849952, + }, + { + metric_0: 0, + timestamp: 1547578909952, + }, + { + metric_0: 0, + timestamp: 1547578969952, + }, + { + metric_0: 0, + timestamp: 1547579029952, + }, + ], }, - ]); - } - }); + }, + ]); + } }); }); @@ -88,7 +117,7 @@ export default function ({ getService }: FtrProviderContext) { ); it("should use the id for the label when the name doesn't exist", async () => { - const resp = fetchSnapshot({ + const snapshot = await fetchSnapshot({ sourceId: 'default', timerange: { to: max, @@ -98,29 +127,32 @@ export default function ({ getService }: FtrProviderContext) { metrics: [{ type: 'cpu' }], nodeType: 'pod', groupBy: [], + includeTimeseries: false, }); - return resp.then((data) => { - const snapshot = data; - expect(snapshot).to.have.property('nodes'); - if (snapshot) { - const { nodes } = snapshot; - expect(nodes.length).to.equal(65); - const firstNode = first(nodes) as any; - expect(firstNode).to.have.property('path'); - expect(firstNode.path.length).to.equal(1); - expect(first(firstNode.path)).to.have.property( - 'value', - '00597dd7-a348-11e9-9a96-42010a84004d' - ); - expect(first(firstNode.path)).to.have.property( - 'label', - '00597dd7-a348-11e9-9a96-42010a84004d' - ); - } - }); + + if (!snapshot) { + return; + } + + expect(snapshot).to.have.property('nodes'); + if (snapshot) { + const { nodes } = snapshot; + expect(nodes.length).to.equal(65); + const firstNode = first(nodes) as any; + expect(firstNode).to.have.property('path'); + expect(firstNode.path.length).to.equal(1); + expect(first(firstNode.path)).to.have.property( + 'value', + '00597dd7-a348-11e9-9a96-42010a84004d' + ); + expect(first(firstNode.path)).to.have.property( + 'label', + '00597dd7-a348-11e9-9a96-42010a84004d' + ); + } }); it('should have an id and label', async () => { - const resp = fetchSnapshot({ + const snapshot = await fetchSnapshot({ sourceId: 'default', timerange: { to: max, @@ -130,25 +162,129 @@ export default function ({ getService }: FtrProviderContext) { metrics: [{ type: 'cpu' }], nodeType: 'container', groupBy: [], + includeTimeseries: false, + }); + + if (!snapshot) { + return; + } + + expect(snapshot).to.have.property('nodes'); + + const { nodes } = snapshot; + expect(nodes.length).to.equal(135); + if (snapshot) { + const firstNode = first(nodes) as any; + expect(firstNode).to.have.property('path'); + expect(firstNode.path.length).to.equal(1); + expect(first(firstNode.path)).to.have.property( + 'value', + '01078c21eef4194b0b96253c7c6c32796aba66e3f3f37e26ac97d1dff3e2e91a' + ); + expect(first(firstNode.path)).to.have.property( + 'label', + 'k8s_prometheus-to-sd-exporter_fluentd-gcp-v3.2.0-wcmm4_kube-system_b214d17a-9ae0-11e9-9a96-42010a84004d_0' + ); + } + }); + + it('should not return timeseries data - with groupBy', async () => { + const snapshot = await fetchSnapshot({ + sourceId: 'default', + timerange: { + to: max, + from: min, + interval: '1m', + }, + metrics: [{ type: 'cpu' }], + nodeType: 'host', + groupBy: [{ field: 'host.name' }], + includeTimeseries: false, + }); + + const expected = { + name: 'cpu', + value: 0.44708333333333333, + max: 0.44708333333333333, + avg: 0.44708333333333333, + }; + + expect(snapshot).to.have.property('nodes'); + + if (snapshot) { + const { nodes } = snapshot; + expect(nodes.length).to.equal(3); + const firstNode = nodes[0] as any; + expect(firstNode).to.have.property('path'); + expect(firstNode.path.length).to.equal(2); + expect(firstNode.path[0]).to.have.property( + 'value', + 'gke-observability-8--observability-8--bc1afd95-f0zc' + ); + expect(firstNode.path[1]).to.have.property( + 'value', + 'gke-observability-8--observability-8--bc1afd95-f0zc' + ); + expect(firstNode).to.have.property('metrics'); + expect(firstNode.metrics).to.eql([expected]); + } + }); + + it('should not return timeseries data - without groupBy', async () => { + const snapshot = await fetchSnapshot({ + sourceId: 'default', + timerange: { + to: max, + from: min, + interval: '1m', + }, + metrics: [{ type: 'cpu' }], + nodeType: 'host', + groupBy: null, + includeTimeseries: false, }); - return resp.then((data) => { - const snapshot = data; - expect(snapshot).to.have.property('nodes'); - if (snapshot) { - const { nodes } = snapshot; - expect(nodes.length).to.equal(135); - const firstNode = first(nodes) as any; - expect(firstNode).to.have.property('path'); - expect(firstNode.path.length).to.equal(1); - expect(first(firstNode.path)).to.have.property( - 'value', - '01078c21eef4194b0b96253c7c6c32796aba66e3f3f37e26ac97d1dff3e2e91a' - ); - expect(first(firstNode.path)).to.have.property( - 'label', - 'k8s_prometheus-to-sd-exporter_fluentd-gcp-v3.2.0-wcmm4_kube-system_b214d17a-9ae0-11e9-9a96-42010a84004d_0' - ); - } + + const expected = { + name: 'cpu', + value: null, + max: 0.47105555555555556, + avg: 0.0672936507936508, + }; + + expect(snapshot).to.have.property('nodes'); + if (snapshot) { + const { nodes } = snapshot; + expect(nodes.length).to.equal(1); + const firstNode = nodes[0] as any; + expect(firstNode).to.have.property('path'); + expect(firstNode.path.length).to.equal(1); + expect(firstNode.path[0]).to.have.property('value', '*'); + expect(firstNode).to.have.property('metrics'); + expect(firstNode.metrics).to.eql([expected]); + } + }); + + it('should fail to fetch logRate with no timeseries data', async () => { + const resp = await fetchSnapshot( + { + sourceId: 'default', + timerange: { + to: max, + from: min, + interval: '1m', + }, + metrics: [{ type: 'logRate' }], + nodeType: 'host', + groupBy: [{ field: 'host.name' }], + includeTimeseries: false, + }, + 400 + ); + + expect(resp).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: 'logRate metric is not supported without time series', }); }); }); @@ -159,7 +295,7 @@ export default function ({ getService }: FtrProviderContext) { after(() => esArchiver.unload('x-pack/test/functional/es_archives/infra/7.0.0/hosts')); it('should basically work', async () => { - const resp = fetchSnapshot({ + const snapshot = await fetchSnapshot({ sourceId: 'default', timerange: { to: max, @@ -169,33 +305,63 @@ export default function ({ getService }: FtrProviderContext) { metrics: [{ type: 'cpu' }], nodeType: 'host', groupBy: [], + includeTimeseries: true, }); - return resp.then((data) => { - const snapshot = data; - expect(snapshot).to.have.property('nodes'); - if (snapshot) { - const { nodes } = snapshot; - expect(nodes.length).to.equal(1); - const firstNode = first(nodes) as any; - expect(firstNode).to.have.property('path'); - expect(firstNode.path.length).to.equal(1); - expect(first(firstNode.path)).to.have.property('value', 'demo-stack-mysql-01'); - expect(first(firstNode.path)).to.have.property('label', 'demo-stack-mysql-01'); - expect(firstNode).to.have.property('metrics'); - expect(firstNode.metrics).to.eql([ - { - name: 'cpu', - value: 0.0032, - max: 0.0038333333333333336, - avg: 0.003341666666666667, + + expect(snapshot).to.have.property('nodes'); + if (snapshot) { + const { nodes } = snapshot; + expect(nodes.length).to.equal(1); + const firstNode = first(nodes) as any; + expect(firstNode).to.have.property('path'); + expect(firstNode.path.length).to.equal(1); + expect(first(firstNode.path)).to.have.property('value', 'demo-stack-mysql-01'); + expect(first(firstNode.path)).to.have.property('label', 'demo-stack-mysql-01'); + expect(firstNode).to.have.property('metrics'); + expect(firstNode.metrics).to.eql([ + { + name: 'cpu', + value: 0.0032, + max: 0.0038333333333333336, + avg: 0.003341666666666667, + timeseries: { + columns: [ + { + name: 'timestamp', + type: 'date', + }, + { + name: 'metric_0', + type: 'number', + }, + ], + id: 'cpu', + rows: [ + { + metric_0: 0.003166666666666667, + timestamp: 1547571590967, + }, + { + metric_0: 0.003166666666666667, + timestamp: 1547571650967, + }, + { + metric_0: 0.0038333333333333336, + timestamp: 1547571710967, + }, + { + metric_0: 0.0032, + timestamp: 1547571770967, + }, + ], }, - ]); - } - }); + }, + ]); + } }); it('should allow for overrides for interval and ignoring lookback', async () => { - const resp = fetchSnapshot({ + const snapshot = await fetchSnapshot({ sourceId: 'default', timerange: { to: max, @@ -209,29 +375,27 @@ export default function ({ getService }: FtrProviderContext) { groupBy: [], includeTimeseries: true, }); - return resp.then((data) => { - const snapshot = data; - expect(snapshot).to.have.property('nodes'); - if (snapshot) { - const { nodes } = snapshot; - expect(nodes.length).to.equal(1); - const firstNode = first(nodes) as any; - expect(firstNode).to.have.property('path'); - expect(firstNode.path.length).to.equal(1); - expect(first(firstNode.path)).to.have.property('value', 'demo-stack-mysql-01'); - expect(first(firstNode.path)).to.have.property('label', 'demo-stack-mysql-01'); - expect(firstNode).to.have.property('metrics'); - expect(firstNode.metrics[0]).to.have.property('timeseries'); - expect(firstNode.metrics[0].timeseries?.rows.length).to.equal(56); - const rows = firstNode.metrics[0].timeseries?.rows; - const rowInterval = (rows?.[1]?.timestamp || 0) - (rows?.[0]?.timestamp || 0); - expect(rowInterval).to.equal(10000); - } - }); + + expect(snapshot).to.have.property('nodes'); + if (snapshot) { + const { nodes } = snapshot; + expect(nodes.length).to.equal(1); + const firstNode = first(nodes) as any; + expect(firstNode).to.have.property('path'); + expect(firstNode.path.length).to.equal(1); + expect(first(firstNode.path)).to.have.property('value', 'demo-stack-mysql-01'); + expect(first(firstNode.path)).to.have.property('label', 'demo-stack-mysql-01'); + expect(firstNode).to.have.property('metrics'); + expect(firstNode.metrics[0]).to.have.property('timeseries'); + expect(firstNode.metrics[0].timeseries?.rows.length).to.equal(56); + const rows = firstNode.metrics[0].timeseries?.rows; + const rowInterval = (rows?.[1]?.timestamp || 0) - (rows?.[0]?.timestamp || 0); + expect(rowInterval).to.equal(10000); + } }); it('should allow for overrides for lookback', async () => { - const resp = fetchSnapshot({ + const snapshot = await fetchSnapshot({ sourceId: 'default', timerange: { to: max, @@ -244,26 +408,24 @@ export default function ({ getService }: FtrProviderContext) { groupBy: [], includeTimeseries: true, }); - return resp.then((data) => { - const snapshot = data; - expect(snapshot).to.have.property('nodes'); - if (snapshot) { - const { nodes } = snapshot; - expect(nodes.length).to.equal(1); - const firstNode = first(nodes) as any; - expect(firstNode).to.have.property('path'); - expect(firstNode.path.length).to.equal(1); - expect(first(firstNode.path)).to.have.property('value', 'demo-stack-mysql-01'); - expect(first(firstNode.path)).to.have.property('label', 'demo-stack-mysql-01'); - expect(firstNode).to.have.property('metrics'); - expect(firstNode.metrics[0]).to.have.property('timeseries'); - expect(firstNode.metrics[0].timeseries?.rows.length).to.equal(5); - } - }); + + expect(snapshot).to.have.property('nodes'); + if (snapshot) { + const { nodes } = snapshot; + expect(nodes.length).to.equal(1); + const firstNode = first(nodes) as any; + expect(firstNode).to.have.property('path'); + expect(firstNode.path.length).to.equal(1); + expect(first(firstNode.path)).to.have.property('value', 'demo-stack-mysql-01'); + expect(first(firstNode.path)).to.have.property('label', 'demo-stack-mysql-01'); + expect(firstNode).to.have.property('metrics'); + expect(firstNode.metrics[0]).to.have.property('timeseries'); + expect(firstNode.metrics[0].timeseries?.rows.length).to.equal(5); + } }); it('should work with custom metrics', async () => { - const data = await fetchSnapshot({ + const snapshot = await fetchSnapshot({ sourceId: 'default', timerange: { to: max, @@ -280,10 +442,9 @@ export default function ({ getService }: FtrProviderContext) { ] as SnapshotMetricInput[], nodeType: 'host', groupBy: [], + includeTimeseries: true, }); - const snapshot = data; - expect(snapshot).to.have.property('nodes'); if (snapshot) { const { nodes } = snapshot; expect(nodes.length).to.equal(1); @@ -299,13 +460,44 @@ export default function ({ getService }: FtrProviderContext) { value: 0.0016, max: 0.0018333333333333333, avg: 0.00165, + timeseries: { + columns: [ + { + name: 'timestamp', + type: 'date', + }, + { + name: 'metric_0', + type: 'number', + }, + ], + id: 'custom_0', + rows: [ + { + metric_0: 0.0016666666666666668, + timestamp: 1547571590967, + }, + { + metric_0: 0.0015000000000000002, + timestamp: 1547571650967, + }, + { + metric_0: 0.0018333333333333333, + timestamp: 1547571710967, + }, + { + metric_0: 0.0016, + timestamp: 1547571770967, + }, + ], + }, }, ]); } }); it('should basically work with 1 grouping', async () => { - const resp = fetchSnapshot({ + const snapshot = await fetchSnapshot({ sourceId: 'default', timerange: { to: max, @@ -315,24 +507,23 @@ export default function ({ getService }: FtrProviderContext) { metrics: [{ type: 'cpu' }], nodeType: 'host', groupBy: [{ field: 'cloud.availability_zone' }], + includeTimeseries: false, }); - return resp.then((data) => { - const snapshot = data; - expect(snapshot).to.have.property('nodes'); - if (snapshot) { - const { nodes } = snapshot; - expect(nodes.length).to.equal(1); - const firstNode = first(nodes) as any; - expect(firstNode).to.have.property('path'); - expect(firstNode.path.length).to.equal(2); - expect(first(firstNode.path)).to.have.property('value', 'virtualbox'); - expect(last(firstNode.path)).to.have.property('value', 'demo-stack-mysql-01'); - } - }); + + expect(snapshot).to.have.property('nodes'); + if (snapshot) { + const { nodes } = snapshot; + expect(nodes.length).to.equal(1); + const firstNode = first(nodes) as any; + expect(firstNode).to.have.property('path'); + expect(firstNode.path.length).to.equal(2); + expect(first(firstNode.path)).to.have.property('value', 'virtualbox'); + expect(last(firstNode.path)).to.have.property('value', 'demo-stack-mysql-01'); + } }); it('should basically work with 2 groupings', async () => { - const resp = fetchSnapshot({ + const snapshot = await fetchSnapshot({ sourceId: 'default', timerange: { to: max, @@ -342,26 +533,24 @@ export default function ({ getService }: FtrProviderContext) { metrics: [{ type: 'cpu' }], nodeType: 'host', groupBy: [{ field: 'cloud.provider' }, { field: 'cloud.availability_zone' }], + includeTimeseries: false, }); - return resp.then((data) => { - const snapshot = data; - expect(snapshot).to.have.property('nodes'); - if (snapshot) { - const { nodes } = snapshot; - expect(nodes.length).to.equal(1); - const firstNode = first(nodes) as any; - expect(firstNode).to.have.property('path'); - expect(firstNode.path.length).to.equal(3); - expect(first(firstNode.path)).to.have.property('value', 'vagrant'); - expect(firstNode.path[1]).to.have.property('value', 'virtualbox'); - expect(last(firstNode.path)).to.have.property('value', 'demo-stack-mysql-01'); - } - }); + expect(snapshot).to.have.property('nodes'); + if (snapshot) { + const { nodes } = snapshot; + expect(nodes.length).to.equal(1); + const firstNode = first(nodes) as any; + expect(firstNode).to.have.property('path'); + expect(firstNode.path.length).to.equal(3); + expect(first(firstNode.path)).to.have.property('value', 'vagrant'); + expect(firstNode.path[1]).to.have.property('value', 'virtualbox'); + expect(last(firstNode.path)).to.have.property('value', 'demo-stack-mysql-01'); + } }); it('should show metrics for all nodes when grouping by service type', async () => { - const resp = fetchSnapshot({ + const snapshot = await fetchSnapshot({ sourceId: 'default', timerange: { to: max, @@ -371,43 +560,66 @@ export default function ({ getService }: FtrProviderContext) { metrics: [{ type: 'cpu' }], nodeType: 'host', groupBy: [{ field: 'service.type' }], + includeTimeseries: true, }); - return resp.then((data) => { - const snapshot = data; - expect(snapshot).to.have.property('nodes'); - if (snapshot) { - const { nodes } = snapshot; - expect(nodes.length).to.equal(2); - const firstNode = nodes[0] as any; - expect(firstNode).to.have.property('path'); - expect(firstNode.path.length).to.equal(2); - expect(firstNode.path[0]).to.have.property('value', 'mysql'); - expect(firstNode.path[1]).to.have.property('value', 'demo-stack-mysql-01'); - expect(firstNode).to.have.property('metrics'); - expect(firstNode.metrics).to.eql([ + + const expected = { + name: 'cpu', + value: 0.0032, + max: 0.0038333333333333336, + avg: 0.003341666666666667, + timeseries: { + columns: [ { - name: 'cpu', - value: 0.0032, - max: 0.0038333333333333336, - avg: 0.003341666666666667, + name: 'timestamp', + type: 'date', }, - ]); - const secondNode = nodes[1] as any; - expect(secondNode).to.have.property('path'); - expect(secondNode.path.length).to.equal(2); - expect(secondNode.path[0]).to.have.property('value', 'system'); - expect(secondNode.path[1]).to.have.property('value', 'demo-stack-mysql-01'); - expect(secondNode).to.have.property('metrics'); - expect(secondNode.metrics).to.eql([ { - name: 'cpu', - value: 0.0032, - max: 0.0038333333333333336, - avg: 0.003341666666666667, + name: 'metric_0', + type: 'number', }, - ]); - } - }); + ], + id: 'cpu', + rows: [ + { + metric_0: 0.003166666666666667, + timestamp: 1547571590967, + }, + { + metric_0: 0.003166666666666667, + timestamp: 1547571650967, + }, + { + metric_0: 0.0038333333333333336, + timestamp: 1547571710967, + }, + { + metric_0: 0.0032, + timestamp: 1547571770967, + }, + ], + }, + }; + + expect(snapshot).to.have.property('nodes'); + if (snapshot) { + const { nodes } = snapshot; + expect(nodes.length).to.equal(2); + const firstNode = nodes[0] as any; + expect(firstNode).to.have.property('path'); + expect(firstNode.path.length).to.equal(2); + expect(firstNode.path[0]).to.have.property('value', 'mysql'); + expect(firstNode.path[1]).to.have.property('value', 'demo-stack-mysql-01'); + expect(firstNode).to.have.property('metrics'); + expect(firstNode.metrics).to.eql([expected]); + const secondNode = nodes[1] as any; + expect(secondNode).to.have.property('path'); + expect(secondNode.path.length).to.equal(2); + expect(secondNode.path[0]).to.have.property('value', 'system'); + expect(secondNode.path[1]).to.have.property('value', 'demo-stack-mysql-01'); + expect(secondNode).to.have.property('metrics'); + expect(secondNode.metrics).to.eql([expected]); + } }); }); }); diff --git a/x-pack/test/api_integration/apis/ml/index.ts b/x-pack/test/api_integration/apis/ml/index.ts index e76eef8cb82bf..505757f52bd4b 100644 --- a/x-pack/test/api_integration/apis/ml/index.ts +++ b/x-pack/test/api_integration/apis/ml/index.ts @@ -35,14 +35,14 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_sample_ecommerce'); await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_sample_logs'); await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_security_endpoint'); - await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_siem_auditbeat'); - await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_siem_packetbeat'); - await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_siem_winlogbeat'); + await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_security_auditbeat'); + await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_security_packetbeat'); + await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_security_winlogbeat'); await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote'); await esArchiver.unload('x-pack/test/functional/es_archives/ml/bm_classification'); await esArchiver.unload('x-pack/test/functional/es_archives/ml/ihp_outlier'); await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_metricbeat'); - await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_siem_cloudtrail'); + await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_security_cloudtrail'); await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_metrics_ui'); await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_apache_data_stream'); await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_nginx_data_stream'); diff --git a/x-pack/test/api_integration/apis/ml/modules/get_module.ts b/x-pack/test/api_integration/apis/ml/modules/get_module.ts index 4ff71201d9ad9..e09b79557cf7e 100644 --- a/x-pack/test/api_integration/apis/ml/modules/get_module.ts +++ b/x-pack/test/api_integration/apis/ml/modules/get_module.ts @@ -27,11 +27,11 @@ const moduleIds = [ 'sample_data_ecommerce', 'sample_data_weblogs', 'security_auth', + 'security_cloudtrail', 'security_linux_v3', 'security_network', + 'security_packetbeat', 'security_windows_v3', - 'siem_cloudtrail', - 'siem_packetbeat', 'uptime_heartbeat', ]; diff --git a/x-pack/test/api_integration/apis/ml/modules/index.ts b/x-pack/test/api_integration/apis/ml/modules/index.ts index 6656183af8e6c..d28263b487701 100644 --- a/x-pack/test/api_integration/apis/ml/modules/index.ts +++ b/x-pack/test/api_integration/apis/ml/modules/index.ts @@ -14,8 +14,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { const fleetPackages = ['apache', 'nginx']; const installedPackages: Array<{ pkgName: string; version: string }> = []; - // failing: https://github.com/elastic/kibana/issues/102283 - describe.skip('modules', function () { + describe('modules', function () { before(async () => { // use await kibanaServer.savedObjects.cleanStandardList(); to make sure the fleet setup is removed correctly after the tests await kibanaServer.savedObjects.cleanStandardList(); diff --git a/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts b/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts index fe9bd5fe5aea7..611c6a24cd6bd 100644 --- a/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts +++ b/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts @@ -69,8 +69,8 @@ export default ({ getService }: FtrProviderContext) => { }, { testTitleSuffix: 'for siem auditbeat dataset', - sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_siem_auditbeat', - indexPattern: 'ft_module_siem_auditbeat', + sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_security_auditbeat', + indexPattern: 'ft_module_security_auditbeat', user: USER.ML_POWERUSER, expected: { responseCode: 200, @@ -79,18 +79,18 @@ export default ({ getService }: FtrProviderContext) => { }, { testTitleSuffix: 'for siem packetbeat dataset', - sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_siem_packetbeat', - indexPattern: 'ft_module_siem_packetbeat', + sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_security_packetbeat', + indexPattern: 'ft_module_security_packetbeat', user: USER.ML_POWERUSER, expected: { responseCode: 200, - moduleIds: ['siem_packetbeat'], + moduleIds: ['security_packetbeat'], }, }, { testTitleSuffix: 'for siem winlogbeat dataset', - sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_siem_winlogbeat', - indexPattern: 'ft_module_siem_winlogbeat', + sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_security_winlogbeat', + indexPattern: 'ft_module_security_winlogbeat', user: USER.ML_POWERUSER, expected: { responseCode: 200, @@ -153,12 +153,12 @@ export default ({ getService }: FtrProviderContext) => { }, { testTitleSuffix: 'for siem clodutrail dataset', - sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_siem_cloudtrail', - indexPattern: 'ft_module_siem_cloudtrail', + sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_security_cloudtrail', + indexPattern: 'ft_module_security_cloudtrail', user: USER.ML_POWERUSER, expected: { responseCode: 200, - moduleIds: ['siem_cloudtrail'], + moduleIds: ['security_cloudtrail'], }, }, { diff --git a/x-pack/test/api_integration/apis/ml/modules/setup_module.ts b/x-pack/test/api_integration/apis/ml/modules/setup_module.ts index a6b4162f42ac1..1b2ce178dabb1 100644 --- a/x-pack/test/api_integration/apis/ml/modules/setup_module.ts +++ b/x-pack/test/api_integration/apis/ml/modules/setup_module.ts @@ -314,13 +314,13 @@ export default ({ getService }: FtrProviderContext) => { { testTitleSuffix: 'for siem_packetbeat with prefix, startDatafeed true and estimateModelMemory true', - sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_siem_packetbeat', - indexPattern: { name: 'ft_module_siem_packetbeat', timeField: '@timestamp' }, - module: 'siem_packetbeat', + sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_security_packetbeat', + indexPattern: { name: 'ft_module_security_packetbeat', timeField: '@timestamp' }, + module: 'security_packetbeat', user: USER.ML_POWERUSER, requestBody: { prefix: 'pf12_', - indexPatternName: 'ft_module_siem_packetbeat', + indexPatternName: 'ft_module_security_packetbeat', startDatafeed: true, end: 1588688580000, }, @@ -499,13 +499,13 @@ export default ({ getService }: FtrProviderContext) => { { testTitleSuffix: 'for siem_cloudtrail with prefix, startDatafeed true and estimateModelMemory true', - sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_siem_cloudtrail', - indexPattern: { name: 'ft_module_siem_cloudtrail', timeField: '@timestamp' }, - module: 'siem_cloudtrail', + sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_security_cloudtrail', + indexPattern: { name: 'ft_module_security_cloudtrail', timeField: '@timestamp' }, + module: 'security_cloudtrail', user: USER.ML_POWERUSER, requestBody: { prefix: 'pf20_', - indexPatternName: 'ft_module_siem_cloudtrail', + indexPatternName: 'ft_module_security_cloudtrail', startDatafeed: true, end: 1594231870000, }, diff --git a/x-pack/test/api_integration/apis/synthetics/add_monitor_private_location.ts b/x-pack/test/api_integration/apis/synthetics/add_monitor_private_location.ts index 1855770a19525..543320f277c1c 100644 --- a/x-pack/test/api_integration/apis/synthetics/add_monitor_private_location.ts +++ b/x-pack/test/api_integration/apis/synthetics/add_monitor_private_location.ts @@ -15,7 +15,7 @@ import { PackagePolicy } from '@kbn/fleet-plugin/common'; import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from '../uptime/rest/helper/get_fixture_json'; -import { comparePolicies, getTestSyntheticsPolicy } from '../uptime/rest/sample_data/test_policy'; +import { comparePolicies, getTestSyntheticsPolicy } from './sample_data/test_policy'; import { PrivateLocationTestService } from './services/private_location_test_service'; export default function ({ getService }: FtrProviderContext) { @@ -36,7 +36,7 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { await supertestAPI.post('/api/fleet/setup').set('kbn-xsrf', 'true').send().expect(200); await supertestAPI - .post('/api/fleet/epm/packages/synthetics/0.10.3') + .post('/api/fleet/epm/packages/synthetics/0.11.4') .set('kbn-xsrf', 'true') .send({ force: true }) .expect(200); @@ -362,7 +362,7 @@ export default function ({ getService }: FtrProviderContext) { pkgPolicy.id === monitorId + '-' + testFleetPolicyID + `-default` ); - expect(packagePolicy.package.version).eql('0.10.3'); + expect(packagePolicy.package.version).eql('0.11.4'); await supertestAPI.post('/api/fleet/setup').set('kbn-xsrf', 'true').send().expect(200); const policyResponseAfterUpgrade = await supertestAPI.get( @@ -372,7 +372,7 @@ export default function ({ getService }: FtrProviderContext) { (pkgPolicy: PackagePolicy) => pkgPolicy.id === monitorId + '-' + testFleetPolicyID + `-default` ); - expect(semver.gt(packagePolicyAfterUpgrade.package.version, '0.10.3')).eql(true); + expect(semver.gte(packagePolicyAfterUpgrade.package.version, '0.11.4')).eql(true); } finally { await supertestAPI .delete(API_URLS.SYNTHETICS_MONITORS + '/' + monitorId) diff --git a/x-pack/test/api_integration/apis/synthetics/add_monitor_project.ts b/x-pack/test/api_integration/apis/synthetics/add_monitor_project.ts index 168da6d75bb63..2c23d1f0f8f0c 100644 --- a/x-pack/test/api_integration/apis/synthetics/add_monitor_project.ts +++ b/x-pack/test/api_integration/apis/synthetics/add_monitor_project.ts @@ -15,10 +15,8 @@ import { PackagePolicy } from '@kbn/fleet-plugin/common'; import { FtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from '../uptime/rest/helper/get_fixture_json'; import { PrivateLocationTestService } from './services/private_location_test_service'; -import { - comparePolicies, - getTestProjectSyntheticsPolicy, -} from '../uptime/rest/sample_data/test_policy'; +import { comparePolicies } from './sample_data/test_policy'; +import { getTestProjectSyntheticsPolicy } from './sample_data/test_project_monitor_policy'; export default function ({ getService }: FtrProviderContext) { describe('AddProjectMonitors', function () { @@ -74,7 +72,7 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { await supertest.post('/api/fleet/setup').set('kbn-xsrf', 'true').send().expect(200); await supertest - .post('/api/fleet/epm/packages/synthetics/0.10.3') + .post('/api/fleet/epm/packages/synthetics/0.11.4') .set('kbn-xsrf', 'true') .send({ force: true }) .expect(200); @@ -1024,6 +1022,7 @@ export default function ({ getService }: FtrProviderContext) { id, configId, projectId: project, + locationName: 'Test private location 0', }) ); } finally { @@ -1146,6 +1145,7 @@ export default function ({ getService }: FtrProviderContext) { id, configId, projectId: project, + locationName: 'Test private location 0', }) ); @@ -1226,6 +1226,7 @@ export default function ({ getService }: FtrProviderContext) { id, configId, projectId: project, + locationName: 'Test private location 0', }) ); @@ -1262,6 +1263,7 @@ export default function ({ getService }: FtrProviderContext) { id: id2, configId: configId2, projectId: project, + locationName: 'Test private location 0', }) ); } finally { diff --git a/x-pack/test/api_integration/apis/synthetics/add_monitor_project_legacy.ts b/x-pack/test/api_integration/apis/synthetics/add_monitor_project_legacy.ts index 60f3f8eca1bc8..02509b109feda 100644 --- a/x-pack/test/api_integration/apis/synthetics/add_monitor_project_legacy.ts +++ b/x-pack/test/api_integration/apis/synthetics/add_monitor_project_legacy.ts @@ -19,10 +19,8 @@ import { PackagePolicy } from '@kbn/fleet-plugin/common'; import { FtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from '../uptime/rest/helper/get_fixture_json'; import { PrivateLocationTestService } from './services/private_location_test_service'; -import { - comparePolicies, - getTestProjectSyntheticsPolicy, -} from '../uptime/rest/sample_data/test_policy'; +import { comparePolicies } from './sample_data/test_policy'; +import { getTestProjectSyntheticsPolicy } from './sample_data/test_project_monitor_policy'; export default function ({ getService }: FtrProviderContext) { describe('AddProjectLegacyMonitors', function () { @@ -84,7 +82,7 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { await supertest.post('/api/fleet/setup').set('kbn-xsrf', 'true').send().expect(200); await supertest - .post('/api/fleet/epm/packages/synthetics/0.10.3') + .post('/api/fleet/epm/packages/synthetics/0.11.4') .set('kbn-xsrf', 'true') .send({ force: true }) .expect(200); @@ -1459,6 +1457,7 @@ export default function ({ getService }: FtrProviderContext) { name: 'check if title is present-Test private location 0', id, configId, + locationName: 'Test private location 0', }) ); } finally { @@ -1576,6 +1575,7 @@ export default function ({ getService }: FtrProviderContext) { name: 'check if title is present-Test private location 0', id, configId, + locationName: 'Test private location 0', }) ); @@ -1655,6 +1655,7 @@ export default function ({ getService }: FtrProviderContext) { name: 'check if title is present-Test private location 0', id, configId, + locationName: 'Test private location 0', }) ); @@ -1752,7 +1753,15 @@ export default function ({ getService }: FtrProviderContext) { streams: [ { enabled: true, - data_stream: { type: 'synthetics', dataset: 'http' }, + data_stream: { + elasticsearch: { + privileges: { + indices: ['auto_configure', 'create_doc', 'read'], + }, + }, + type: 'synthetics', + dataset: 'http', + }, vars: { __ui: { value: '{"is_tls_enabled":false}', type: 'yaml' }, enabled: { value: false, type: 'bool' }, @@ -1826,8 +1835,9 @@ export default function ({ getService }: FtrProviderContext) { 'check.response.body.positive': ['Saved', 'saved'], 'ssl.verification_mode': 'full', 'ssl.supported_protocols': ['TLSv1.1', 'TLSv1.2', 'TLSv1.3'], + 'run_from.geo.name': 'Test private location 0', + 'run_from.id': 'Test private location 0', processors: [ - { add_observer_metadata: { geo: { name: 'Test private location 0' } } }, { add_fields: { target: '', @@ -1920,6 +1930,7 @@ export default function ({ getService }: FtrProviderContext) { name: 'check if title is present-Test private location 0', id, configId, + locationName: 'Test private location 0', }) ); @@ -1956,6 +1967,7 @@ export default function ({ getService }: FtrProviderContext) { name: 'check if title is present-Test private location 0', id: id2, configId: configId2, + locationName: 'Test private location 0', }) ); } finally { diff --git a/x-pack/test/api_integration/apis/synthetics/delete_monitor.ts b/x-pack/test/api_integration/apis/synthetics/delete_monitor.ts index 175cf792a34e1..6915ddf26108b 100644 --- a/x-pack/test/api_integration/apis/synthetics/delete_monitor.ts +++ b/x-pack/test/api_integration/apis/synthetics/delete_monitor.ts @@ -41,7 +41,7 @@ export default function ({ getService }: FtrProviderContext) { _httpMonitorJson = getFixtureJson('http_monitor'); await supertest.post('/api/fleet/setup').set('kbn-xsrf', 'true').send().expect(200); await supertest - .post('/api/fleet/epm/packages/synthetics/0.10.3') + .post('/api/fleet/epm/packages/synthetics/0.11.4') .set('kbn-xsrf', 'true') .send({ force: true }) .expect(200); diff --git a/x-pack/test/api_integration/apis/synthetics/delete_monitor_project.ts b/x-pack/test/api_integration/apis/synthetics/delete_monitor_project.ts index 8024cd74a34c2..b8ae0d4b5e0e2 100644 --- a/x-pack/test/api_integration/apis/synthetics/delete_monitor_project.ts +++ b/x-pack/test/api_integration/apis/synthetics/delete_monitor_project.ts @@ -45,7 +45,7 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { await supertest.post('/api/fleet/setup').set('kbn-xsrf', 'true').send().expect(200); await supertest - .post('/api/fleet/epm/packages/synthetics/0.10.3') + .post('/api/fleet/epm/packages/synthetics/0.11.4') .set('kbn-xsrf', 'true') .send({ force: true }) .expect(200); diff --git a/x-pack/test/api_integration/apis/synthetics/get_monitor_project.ts b/x-pack/test/api_integration/apis/synthetics/get_monitor_project.ts index dd2c71913c625..2719f9f4ef911 100644 --- a/x-pack/test/api_integration/apis/synthetics/get_monitor_project.ts +++ b/x-pack/test/api_integration/apis/synthetics/get_monitor_project.ts @@ -46,7 +46,7 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { await supertest.post('/api/fleet/setup').set('kbn-xsrf', 'true').send().expect(200); await supertest - .post('/api/fleet/epm/packages/synthetics/0.10.3') + .post('/api/fleet/epm/packages/synthetics/0.11.4') .set('kbn-xsrf', 'true') .send({ force: true }) .expect(200); diff --git a/x-pack/test/api_integration/apis/synthetics/index.ts b/x-pack/test/api_integration/apis/synthetics/index.ts index 763afc371b045..e8963e3629e1c 100644 --- a/x-pack/test/api_integration/apis/synthetics/index.ts +++ b/x-pack/test/api_integration/apis/synthetics/index.ts @@ -10,7 +10,7 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, loadTestFile }: FtrProviderContext) { const esDeleteAllIndices = getService('esDeleteAllIndices'); - describe('synthetics CRUD routes', () => { + describe('Synthetics CRUD routes', () => { before(async () => { await esDeleteAllIndices('heartbeat*'); await esDeleteAllIndices('synthetics*'); @@ -27,5 +27,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./delete_monitor')); loadTestFile(require.resolve('./delete_monitor_project')); loadTestFile(require.resolve('./synthetics_enablement')); + loadTestFile(require.resolve('./sync_global_params')); }); } diff --git a/x-pack/test/api_integration/apis/synthetics/sample_data/test_browser_policy.ts b/x-pack/test/api_integration/apis/synthetics/sample_data/test_browser_policy.ts new file mode 100644 index 0000000000000..f5acb0eef3f8c --- /dev/null +++ b/x-pack/test/api_integration/apis/synthetics/sample_data/test_browser_policy.ts @@ -0,0 +1,280 @@ +/* + * 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 { PackagePolicy } from '@kbn/fleet-plugin/common'; + +export const getTestBrowserSyntheticsPolicy = ({ + id, + params, +}: { + name: string; + id: string; + locationName?: string; + namespace?: string; + params?: Record; +}): PackagePolicy => ({ + id: 'abf904a4-cb9a-4b29-8c11-4d183cca289b-fe621d20-7b01-11ed-803f-475d82e1f9ca-default', + version: 'WzEzNzYsMV0=', + name: 'Test HTTP Monitor 03-Test private location 0-default', + namespace: 'testnamespace', + package: { name: 'synthetics', title: 'Elastic Synthetics', version: '0.11.4' }, + enabled: true, + policy_id: 'fe621d20-7b01-11ed-803f-475d82e1f9ca', + inputs: [ + { + type: 'synthetics/http', + policy_template: 'synthetics', + enabled: false, + streams: [ + { + enabled: false, + data_stream: { type: 'synthetics', dataset: 'http' }, + vars: { + __ui: { type: 'yaml' }, + enabled: { value: true, type: 'bool' }, + type: { value: 'http', type: 'text' }, + name: { type: 'text' }, + schedule: { value: '"@every 3m"', type: 'text' }, + urls: { type: 'text' }, + 'service.name': { type: 'text' }, + timeout: { type: 'text' }, + max_redirects: { type: 'integer' }, + proxy_url: { type: 'text' }, + tags: { type: 'yaml' }, + username: { type: 'text' }, + password: { type: 'password' }, + 'response.include_headers': { type: 'bool' }, + 'response.include_body': { type: 'text' }, + 'check.request.method': { type: 'text' }, + 'check.request.headers': { type: 'yaml' }, + 'check.request.body': { type: 'yaml' }, + 'check.response.status': { type: 'yaml' }, + 'check.response.headers': { type: 'yaml' }, + 'check.response.body.positive': { type: 'yaml' }, + 'check.response.body.negative': { type: 'yaml' }, + 'ssl.certificate_authorities': { type: 'yaml' }, + 'ssl.certificate': { type: 'yaml' }, + 'ssl.key': { type: 'yaml' }, + 'ssl.key_passphrase': { type: 'text' }, + 'ssl.verification_mode': { type: 'text' }, + 'ssl.supported_protocols': { type: 'yaml' }, + location_name: { value: 'Fleet managed', type: 'text' }, + id: { type: 'text' }, + config_id: { type: 'text' }, + run_once: { value: false, type: 'bool' }, + origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, + }, + id: 'synthetics/http-http-abf904a4-cb9a-4b29-8c11-4d183cca289b-fe621d20-7b01-11ed-803f-475d82e1f9ca-default', + }, + ], + }, + { + type: 'synthetics/tcp', + policy_template: 'synthetics', + enabled: false, + streams: [ + { + enabled: false, + data_stream: { type: 'synthetics', dataset: 'tcp' }, + vars: { + __ui: { type: 'yaml' }, + enabled: { value: true, type: 'bool' }, + type: { value: 'tcp', type: 'text' }, + name: { type: 'text' }, + schedule: { value: '"@every 3m"', type: 'text' }, + hosts: { type: 'text' }, + 'service.name': { type: 'text' }, + timeout: { type: 'text' }, + proxy_url: { type: 'text' }, + proxy_use_local_resolver: { value: false, type: 'bool' }, + tags: { type: 'yaml' }, + 'check.send': { type: 'text' }, + 'check.receive': { type: 'text' }, + 'ssl.certificate_authorities': { type: 'yaml' }, + 'ssl.certificate': { type: 'yaml' }, + 'ssl.key': { type: 'yaml' }, + 'ssl.key_passphrase': { type: 'text' }, + 'ssl.verification_mode': { type: 'text' }, + 'ssl.supported_protocols': { type: 'yaml' }, + location_name: { value: 'Fleet managed', type: 'text' }, + id: { type: 'text' }, + config_id: { type: 'text' }, + run_once: { value: false, type: 'bool' }, + origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, + }, + id: 'synthetics/tcp-tcp-abf904a4-cb9a-4b29-8c11-4d183cca289b-fe621d20-7b01-11ed-803f-475d82e1f9ca-default', + }, + ], + }, + { + type: 'synthetics/icmp', + policy_template: 'synthetics', + enabled: false, + streams: [ + { + enabled: false, + data_stream: { type: 'synthetics', dataset: 'icmp' }, + vars: { + __ui: { type: 'yaml' }, + enabled: { value: true, type: 'bool' }, + type: { value: 'icmp', type: 'text' }, + name: { type: 'text' }, + schedule: { value: '"@every 3m"', type: 'text' }, + wait: { value: '1s', type: 'text' }, + hosts: { type: 'text' }, + 'service.name': { type: 'text' }, + timeout: { type: 'text' }, + tags: { type: 'yaml' }, + location_name: { value: 'Fleet managed', type: 'text' }, + id: { type: 'text' }, + config_id: { type: 'text' }, + run_once: { value: false, type: 'bool' }, + origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, + }, + id: 'synthetics/icmp-icmp-abf904a4-cb9a-4b29-8c11-4d183cca289b-fe621d20-7b01-11ed-803f-475d82e1f9ca-default', + }, + ], + }, + { + type: 'synthetics/browser', + policy_template: 'synthetics', + enabled: true, + streams: [ + { + enabled: true, + data_stream: { + type: 'synthetics', + dataset: 'browser', + elasticsearch: { privileges: { indices: ['auto_configure', 'create_doc', 'read'] } }, + }, + vars: { + __ui: { + value: + '{"script_source":{"is_generated_script":false,"file_name":""},"is_zip_url_tls_enabled":false,"is_tls_enabled":false}', + type: 'yaml', + }, + enabled: { value: true, type: 'bool' }, + type: { value: 'browser', type: 'text' }, + name: { value: 'Test HTTP Monitor 03', type: 'text' }, + schedule: { value: '"@every 3m"', type: 'text' }, + 'service.name': { value: '', type: 'text' }, + timeout: { value: '16s', type: 'text' }, + tags: { value: '["cookie-test","browser"]', type: 'yaml' }, + 'source.zip_url.url': { value: '', type: 'text' }, + 'source.zip_url.username': { value: '', type: 'text' }, + 'source.zip_url.folder': { value: '', type: 'text' }, + 'source.zip_url.password': { value: '', type: 'password' }, + 'source.inline.script': { + value: + '"step(\\"Visit /users api route\\", async () => {\\\\n const response = await page.goto(\'https://nextjs-test-synthetics.vercel.app/api/users\');\\\\n expect(response.status()).toEqual(200);\\\\n});"', + type: 'yaml', + }, + 'source.project.content': { value: '', type: 'text' }, + params: { value: params ? JSON.stringify(params) : '', type: 'yaml' }, + playwright_options: { value: '', type: 'yaml' }, + screenshots: { value: 'on', type: 'text' }, + synthetics_args: { value: null, type: 'text' }, + ignore_https_errors: { value: false, type: 'bool' }, + 'throttling.config': { value: '5d/3u/20l', type: 'text' }, + 'filter_journeys.tags': { value: null, type: 'yaml' }, + 'filter_journeys.match': { value: null, type: 'text' }, + 'source.zip_url.ssl.certificate_authorities': { value: null, type: 'yaml' }, + 'source.zip_url.ssl.certificate': { value: null, type: 'yaml' }, + 'source.zip_url.ssl.key': { value: null, type: 'yaml' }, + 'source.zip_url.ssl.key_passphrase': { value: null, type: 'text' }, + 'source.zip_url.ssl.verification_mode': { value: null, type: 'text' }, + 'source.zip_url.ssl.supported_protocols': { value: null, type: 'yaml' }, + 'source.zip_url.proxy_url': { value: '', type: 'text' }, + location_name: { value: 'Test private location 0', type: 'text' }, + id: { value: id, type: 'text' }, + config_id: { value: id, type: 'text' }, + run_once: { value: false, type: 'bool' }, + origin: { value: 'ui', type: 'text' }, + 'monitor.project.id': { value: null, type: 'text' }, + 'monitor.project.name': { value: null, type: 'text' }, + }, + id: 'synthetics/browser-browser-abf904a4-cb9a-4b29-8c11-4d183cca289b-fe621d20-7b01-11ed-803f-475d82e1f9ca-default', + compiled_stream: { + __ui: { + script_source: { is_generated_script: false, file_name: '' }, + is_zip_url_tls_enabled: false, + is_tls_enabled: false, + }, + type: 'browser', + name: 'Test HTTP Monitor 03', + id, + origin: 'ui', + 'run_from.id': 'Test private location 0', + 'run_from.geo.name': 'Test private location 0', + enabled: true, + schedule: '@every 3m', + timeout: '16s', + throttling: '5d/3u/20l', + tags: ['cookie-test', 'browser'], + 'source.inline.script': + 'step("Visit /users api route", async () => {\\n const response = await page.goto(\'https://nextjs-test-synthetics.vercel.app/api/users\');\\n expect(response.status()).toEqual(200);\\n});', + ...(params ? { params } : {}), + screenshots: 'on', + processors: [ + { + add_fields: { + target: '', + fields: { + 'monitor.fleet_managed': true, + config_id: id, + }, + }, + }, + ], + }, + }, + { + enabled: true, + data_stream: { + type: 'synthetics', + dataset: 'browser.network', + elasticsearch: { privileges: { indices: ['auto_configure', 'create_doc', 'read'] } }, + }, + id: 'synthetics/browser-browser.network-abf904a4-cb9a-4b29-8c11-4d183cca289b-fe621d20-7b01-11ed-803f-475d82e1f9ca-default', + compiled_stream: { + processors: [ + { add_observer_metadata: { geo: { name: 'Fleet managed' } } }, + { add_fields: { target: '', fields: { 'monitor.fleet_managed': true } } }, + ], + }, + }, + { + enabled: true, + data_stream: { + type: 'synthetics', + dataset: 'browser.screenshot', + elasticsearch: { privileges: { indices: ['auto_configure', 'create_doc', 'read'] } }, + }, + id: 'synthetics/browser-browser.screenshot-abf904a4-cb9a-4b29-8c11-4d183cca289b-fe621d20-7b01-11ed-803f-475d82e1f9ca-default', + compiled_stream: { + processors: [ + { add_observer_metadata: { geo: { name: 'Fleet managed' } } }, + { add_fields: { target: '', fields: { 'monitor.fleet_managed': true } } }, + ], + }, + }, + ], + }, + ], + is_managed: true, + revision: 1, + created_at: '2022-12-13T16:20:06.672Z', + created_by: 'system', + updated_at: '2022-12-13T16:20:06.672Z', + updated_by: 'system', +}); diff --git a/x-pack/test/api_integration/apis/synthetics/sample_data/test_policy.ts b/x-pack/test/api_integration/apis/synthetics/sample_data/test_policy.ts new file mode 100644 index 0000000000000..aaeb58f8bfa5f --- /dev/null +++ b/x-pack/test/api_integration/apis/synthetics/sample_data/test_policy.ts @@ -0,0 +1,356 @@ +/* + * 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 { omit, sortBy } from 'lodash'; +import expect from '@kbn/expect'; +import { PackagePolicy } from '@kbn/fleet-plugin/common'; + +export const getTestSyntheticsPolicy = ( + name: string, + id: string, + locationName?: string, + namespace?: string +): PackagePolicy => ({ + id: '2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', + version: 'WzE2MjYsMV0=', + name: 'test-monitor-name-Test private location 0-default', + namespace: namespace || 'testnamespace', + package: { name: 'synthetics', title: 'Elastic Synthetics', version: '0.11.4' }, + enabled: true, + policy_id: '5347cd10-0368-11ed-8df7-a7424c6f5167', + inputs: [ + { + type: 'synthetics/http', + policy_template: 'synthetics', + enabled: true, + streams: [ + { + enabled: true, + data_stream: { + type: 'synthetics', + dataset: 'http', + elasticsearch: { + privileges: { + indices: ['auto_configure', 'create_doc', 'read'], + }, + }, + }, + vars: { + __ui: { + value: + '{"is_tls_enabled":false,"is_zip_url_tls_enabled":false,"script_source":{"is_generated_script":false,"file_name":"test-file.name"}}', + type: 'yaml', + }, + enabled: { value: true, type: 'bool' }, + type: { value: 'http', type: 'text' }, + name: { value: name, type: 'text' }, + schedule: { value: '"@every 5m"', type: 'text' }, + urls: { value: 'https://nextjs-test-synthetics.vercel.app/api/users', type: 'text' }, + 'service.name': { value: '', type: 'text' }, + timeout: { value: '3ms', type: 'text' }, + max_redirects: { value: '3', type: 'integer' }, + proxy_url: { value: 'http://proxy.com', type: 'text' }, + tags: { value: '["tag1","tag2"]', type: 'yaml' }, + username: { value: 'test-username', type: 'text' }, + password: { value: 'test', type: 'password' }, + 'response.include_headers': { value: true, type: 'bool' }, + 'response.include_body': { value: 'never', type: 'text' }, + 'check.request.method': { value: '', type: 'text' }, + 'check.request.headers': { + value: '{"sampleHeader":"sampleHeaderValue"}', + type: 'yaml', + }, + 'check.request.body': { value: '"testValue"', type: 'yaml' }, + 'check.response.status': { value: '["200","201"]', type: 'yaml' }, + 'check.response.headers': { value: null, type: 'yaml' }, + 'check.response.body.positive': { value: null, type: 'yaml' }, + 'check.response.body.negative': { value: null, type: 'yaml' }, + 'ssl.certificate_authorities': { value: '"t.string"', type: 'yaml' }, + 'ssl.certificate': { value: '"t.string"', type: 'yaml' }, + 'ssl.key': { value: '"t.string"', type: 'yaml' }, + 'ssl.key_passphrase': { value: 't.string', type: 'text' }, + 'ssl.verification_mode': { value: 'certificate', type: 'text' }, + 'ssl.supported_protocols': { value: '["TLSv1.1","TLSv1.2"]', type: 'yaml' }, + location_name: { value: locationName ?? 'Test private location 0', type: 'text' }, + id: { value: id, type: 'text' }, + config_id: { value: id, type: 'text' }, + run_once: { value: false, type: 'bool' }, + origin: { value: 'ui', type: 'text' }, + 'monitor.project.id': { type: 'text', value: null }, + 'monitor.project.name': { type: 'text', value: null }, + }, + id: 'synthetics/http-http-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', + compiled_stream: { + __ui: { + is_tls_enabled: false, + is_zip_url_tls_enabled: false, + script_source: { is_generated_script: false, file_name: 'test-file.name' }, + }, + type: 'http', + name, + id, + origin: 'ui', + enabled: true, + urls: 'https://nextjs-test-synthetics.vercel.app/api/users', + schedule: '@every 5m', + timeout: '3ms', + max_redirects: 3, + proxy_url: 'http://proxy.com', + tags: ['tag1', 'tag2'], + username: 'test-username', + password: 'test', + 'run_from.geo.name': locationName ?? 'Test private location 0', + 'run_from.id': locationName ?? 'Test private location 0', + 'response.include_headers': true, + 'response.include_body': 'never', + 'check.request.method': null, + 'check.request.headers': { sampleHeader: 'sampleHeaderValue' }, + 'check.request.body': 'testValue', + 'check.response.status': ['200', '201'], + 'ssl.certificate': 't.string', + 'ssl.certificate_authorities': 't.string', + 'ssl.key': 't.string', + 'ssl.key_passphrase': 't.string', + 'ssl.verification_mode': 'certificate', + 'ssl.supported_protocols': ['TLSv1.1', 'TLSv1.2'], + processors: [ + { + add_fields: { + target: '', + fields: { + 'monitor.fleet_managed': true, + config_id: id, + }, + }, + }, + ], + }, + }, + ], + }, + { + type: 'synthetics/tcp', + policy_template: 'synthetics', + enabled: false, + streams: [ + { + enabled: false, + data_stream: { + type: 'synthetics', + dataset: 'tcp', + }, + vars: { + __ui: { type: 'yaml' }, + enabled: { value: true, type: 'bool' }, + type: { value: 'tcp', type: 'text' }, + name: { type: 'text' }, + schedule: { value: '"@every 3m"', type: 'text' }, + hosts: { type: 'text' }, + 'service.name': { type: 'text' }, + timeout: { type: 'text' }, + proxy_url: { type: 'text' }, + proxy_use_local_resolver: { value: false, type: 'bool' }, + tags: { type: 'yaml' }, + 'check.send': { type: 'text' }, + 'check.receive': { type: 'text' }, + 'ssl.certificate_authorities': { type: 'yaml' }, + 'ssl.certificate': { type: 'yaml' }, + 'ssl.key': { type: 'yaml' }, + 'ssl.key_passphrase': { type: 'text' }, + 'ssl.verification_mode': { type: 'text' }, + 'ssl.supported_protocols': { type: 'yaml' }, + location_name: { value: 'Fleet managed', type: 'text' }, + id: { type: 'text' }, + config_id: { type: 'text' }, + run_once: { value: false, type: 'bool' }, + origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, + }, + id: 'synthetics/tcp-tcp-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', + }, + ], + }, + { + type: 'synthetics/icmp', + policy_template: 'synthetics', + enabled: false, + streams: [ + { + enabled: false, + data_stream: { + type: 'synthetics', + dataset: 'icmp', + }, + vars: { + __ui: { type: 'yaml' }, + enabled: { value: true, type: 'bool' }, + type: { value: 'icmp', type: 'text' }, + name: { type: 'text' }, + schedule: { value: '"@every 3m"', type: 'text' }, + wait: { value: '1s', type: 'text' }, + hosts: { type: 'text' }, + 'service.name': { type: 'text' }, + timeout: { type: 'text' }, + tags: { type: 'yaml' }, + location_name: { value: 'Fleet managed', type: 'text' }, + id: { type: 'text' }, + config_id: { type: 'text' }, + run_once: { value: false, type: 'bool' }, + origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, + }, + id: 'synthetics/icmp-icmp-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', + }, + ], + }, + { + type: 'synthetics/browser', + policy_template: 'synthetics', + enabled: false, + streams: [ + { + enabled: true, + data_stream: { + type: 'synthetics', + dataset: 'browser', + elasticsearch: { + privileges: { + indices: ['auto_configure', 'create_doc', 'read'], + }, + }, + }, + vars: { + __ui: { type: 'yaml' }, + enabled: { value: true, type: 'bool' }, + type: { value: 'browser', type: 'text' }, + name: { type: 'text' }, + schedule: { value: '"@every 3m"', type: 'text' }, + 'service.name': { type: 'text' }, + timeout: { type: 'text' }, + tags: { type: 'yaml' }, + 'source.zip_url.url': { type: 'text' }, + 'source.zip_url.username': { type: 'text' }, + 'source.zip_url.folder': { type: 'text' }, + 'source.zip_url.password': { type: 'password' }, + 'source.inline.script': { type: 'yaml' }, + 'source.project.content': { type: 'text' }, + params: { type: 'yaml' }, + playwright_options: { type: 'yaml' }, + screenshots: { type: 'text' }, + synthetics_args: { type: 'text' }, + ignore_https_errors: { type: 'bool' }, + 'throttling.config': { type: 'text' }, + 'filter_journeys.tags': { type: 'yaml' }, + 'filter_journeys.match': { type: 'text' }, + 'source.zip_url.ssl.certificate_authorities': { type: 'yaml' }, + 'source.zip_url.ssl.certificate': { type: 'yaml' }, + 'source.zip_url.ssl.key': { type: 'yaml' }, + 'source.zip_url.ssl.key_passphrase': { type: 'text' }, + 'source.zip_url.ssl.verification_mode': { type: 'text' }, + 'source.zip_url.ssl.supported_protocols': { type: 'yaml' }, + 'source.zip_url.proxy_url': { type: 'text' }, + location_name: { value: 'Fleet managed', type: 'text' }, + id: { type: 'text' }, + config_id: { type: 'text' }, + run_once: { value: false, type: 'bool' }, + origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, + }, + id: 'synthetics/browser-browser-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', + compiled_stream: { + __ui: null, + type: 'browser', + name: null, + enabled: true, + schedule: '@every 3m', + 'run_from.id': 'Fleet managed', + 'run_from.geo.name': 'Fleet managed', + timeout: null, + throttling: null, + processors: [{ add_fields: { target: '', fields: { 'monitor.fleet_managed': true } } }], + }, + }, + { + enabled: true, + data_stream: { + type: 'synthetics', + dataset: 'browser.network', + elasticsearch: { + privileges: { + indices: ['auto_configure', 'create_doc', 'read'], + }, + }, + }, + id: 'synthetics/browser-browser.network-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', + compiled_stream: { + processors: [ + { add_observer_metadata: { geo: { name: 'Fleet managed' } } }, + { add_fields: { target: '', fields: { 'monitor.fleet_managed': true } } }, + ], + }, + }, + { + enabled: true, + data_stream: { + type: 'synthetics', + dataset: 'browser.screenshot', + elasticsearch: { + privileges: { + indices: ['auto_configure', 'create_doc', 'read'], + }, + }, + }, + id: 'synthetics/browser-browser.screenshot-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', + compiled_stream: { + processors: [ + { add_observer_metadata: { geo: { name: 'Fleet managed' } } }, + { add_fields: { target: '', fields: { 'monitor.fleet_managed': true } } }, + ], + }, + }, + ], + }, + ], + is_managed: true, + revision: 1, + created_at: '2022-08-23T14:09:17.176Z', + created_by: 'system', + updated_at: '2022-08-23T14:09:17.176Z', + updated_by: 'system', +}); + +export const omitIds = (policy: PackagePolicy) => { + policy.inputs = sortBy(policy.inputs, 'type'); + + policy.inputs.forEach((input) => { + input.streams = sortBy(input.streams, 'data_stream.dataset'); + input.streams.forEach((stream) => { + stream.id = ''; + }); + }); + + return omit(policy, ignoreTestFields); +}; + +export const comparePolicies = (aPolicy: PackagePolicy, bPolicy: PackagePolicy) => { + expect(omitIds(aPolicy)).eql(omitIds(bPolicy)); +}; + +export const ignoreTestFields = [ + 'id', + 'name', + 'created_at', + 'created_by', + 'updated_at', + 'updated_by', + 'policy_id', + 'version', + 'revision', +]; diff --git a/x-pack/test/api_integration/apis/synthetics/sample_data/test_project_monitor_policy.ts b/x-pack/test/api_integration/apis/synthetics/sample_data/test_project_monitor_policy.ts new file mode 100644 index 0000000000000..c2a433c602820 --- /dev/null +++ b/x-pack/test/api_integration/apis/synthetics/sample_data/test_project_monitor_policy.ts @@ -0,0 +1,323 @@ +/* + * 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 { PackagePolicy } from '@kbn/fleet-plugin/common'; + +export const getTestProjectSyntheticsPolicy = ( + { + name, + inputs = {}, + configId, + id, + projectId = 'test-suite', + locationName = 'Fleet Managed', + }: { + name?: string; + inputs: Record; + configId: string; + id: string; + projectId?: string; + locationName?: string; + } = { + name: 'check if title is present-Test private location 0', + inputs: {}, + configId: '', + id: '', + locationName: 'Fleet Managed', + } +): PackagePolicy => ({ + id: `4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, + version: 'WzEzMDksMV0=', + name: `4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-Test private location 0`, + namespace: 'default', + package: { name: 'synthetics', title: 'Elastic Synthetics', version: '0.11.4' }, + enabled: true, + policy_id: '46034710-0ba6-11ed-ba04-5f123b9faa8b', + inputs: [ + { + type: 'synthetics/http', + policy_template: 'synthetics', + enabled: false, + streams: [ + { + enabled: false, + data_stream: { + type: 'synthetics', + dataset: 'http', + }, + vars: { + __ui: { type: 'yaml' }, + enabled: { value: true, type: 'bool' }, + type: { value: 'http', type: 'text' }, + name: { type: 'text' }, + schedule: { value: '"@every 3m"', type: 'text' }, + urls: { type: 'text' }, + 'service.name': { type: 'text' }, + timeout: { type: 'text' }, + max_redirects: { type: 'integer' }, + proxy_url: { type: 'text' }, + tags: { type: 'yaml' }, + username: { type: 'text' }, + password: { type: 'password' }, + 'response.include_headers': { type: 'bool' }, + 'response.include_body': { type: 'text' }, + 'check.request.method': { type: 'text' }, + 'check.request.headers': { type: 'yaml' }, + 'check.request.body': { type: 'yaml' }, + 'check.response.status': { type: 'yaml' }, + 'check.response.headers': { type: 'yaml' }, + 'check.response.body.positive': { type: 'yaml' }, + 'check.response.body.negative': { type: 'yaml' }, + 'ssl.certificate_authorities': { type: 'yaml' }, + 'ssl.certificate': { type: 'yaml' }, + 'ssl.key': { type: 'yaml' }, + 'ssl.key_passphrase': { type: 'text' }, + 'ssl.verification_mode': { type: 'text' }, + 'ssl.supported_protocols': { type: 'yaml' }, + location_name: { value: 'Fleet managed', type: 'text' }, + id: { type: 'text' }, + config_id: { type: 'text' }, + run_once: { value: false, type: 'bool' }, + origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, + }, + id: `synthetics/http-http-4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, + }, + ], + }, + { + type: 'synthetics/tcp', + policy_template: 'synthetics', + enabled: false, + streams: [ + { + enabled: false, + data_stream: { + type: 'synthetics', + dataset: 'tcp', + }, + vars: { + __ui: { type: 'yaml' }, + enabled: { value: true, type: 'bool' }, + type: { value: 'tcp', type: 'text' }, + name: { type: 'text' }, + schedule: { value: '"@every 3m"', type: 'text' }, + hosts: { type: 'text' }, + 'service.name': { type: 'text' }, + timeout: { type: 'text' }, + proxy_url: { type: 'text' }, + proxy_use_local_resolver: { value: false, type: 'bool' }, + tags: { type: 'yaml' }, + 'check.send': { type: 'text' }, + 'check.receive': { type: 'text' }, + 'ssl.certificate_authorities': { type: 'yaml' }, + 'ssl.certificate': { type: 'yaml' }, + 'ssl.key': { type: 'yaml' }, + 'ssl.key_passphrase': { type: 'text' }, + 'ssl.verification_mode': { type: 'text' }, + 'ssl.supported_protocols': { type: 'yaml' }, + location_name: { value: 'Fleet managed', type: 'text' }, + id: { type: 'text' }, + config_id: { type: 'text' }, + run_once: { value: false, type: 'bool' }, + origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, + }, + id: `synthetics/tcp-tcp-4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, + }, + ], + }, + { + type: 'synthetics/icmp', + policy_template: 'synthetics', + enabled: false, + streams: [ + { + enabled: false, + data_stream: { + type: 'synthetics', + dataset: 'icmp', + }, + vars: { + __ui: { type: 'yaml' }, + enabled: { value: true, type: 'bool' }, + type: { value: 'icmp', type: 'text' }, + name: { type: 'text' }, + schedule: { value: '"@every 3m"', type: 'text' }, + wait: { value: '1s', type: 'text' }, + hosts: { type: 'text' }, + 'service.name': { type: 'text' }, + timeout: { type: 'text' }, + tags: { type: 'yaml' }, + location_name: { value: 'Fleet managed', type: 'text' }, + id: { type: 'text' }, + config_id: { type: 'text' }, + run_once: { value: false, type: 'bool' }, + origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, + }, + id: `synthetics/icmp-icmp-4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, + }, + ], + }, + { + type: 'synthetics/browser', + policy_template: 'synthetics', + enabled: true, + streams: [ + { + enabled: true, + data_stream: { + type: 'synthetics', + dataset: 'browser', + elasticsearch: { + privileges: { + indices: ['auto_configure', 'create_doc', 'read'], + }, + }, + }, + vars: { + __ui: { + value: + '{"script_source":{"is_generated_script":false,"file_name":""},"is_zip_url_tls_enabled":false}', + type: 'yaml', + }, + enabled: { value: true, type: 'bool' }, + type: { value: 'browser', type: 'text' }, + name: { value: 'check if title is present', type: 'text' }, + schedule: { value: '"@every 10m"', type: 'text' }, + 'service.name': { value: '', type: 'text' }, + timeout: { value: null, type: 'text' }, + tags: { value: null, type: 'yaml' }, + 'source.zip_url.url': { value: '', type: 'text' }, + 'source.zip_url.username': { value: '', type: 'text' }, + 'source.zip_url.folder': { value: '', type: 'text' }, + 'source.zip_url.password': { value: '', type: 'password' }, + 'source.inline.script': { value: null, type: 'yaml' }, + 'source.project.content': { + value: + 'UEsDBBQACAAIAON5qVQAAAAAAAAAAAAAAAAfAAAAZXhhbXBsZXMvdG9kb3MvYmFzaWMuam91cm5leS50c22Q0WrDMAxF3/sVF7MHB0LMXlc6RvcN+wDPVWNviW0sdUsp/fe5SSiD7UFCWFfHujIGlpnkybwxFTZfoY/E3hsaLEtwhs9RPNWKDU12zAOxkXRIbN4tB9d9pFOJdO6EN2HMqQguWN9asFBuQVMmJ7jiWNII9fIXrbabdUYr58l9IhwhQQZCYORCTFFUC31Btj21NRc7Mq4Nds+4bDD/pNVgT9F52Jyr2Fa+g75LAPttg8yErk+S9ELpTmVotlVwnfNCuh2lepl3+JflUmSBJ3uggt1v9INW/lHNLKze9dJe1J3QJK8pSvWkm6aTtCet5puq+x63+AFQSwcIAPQ3VfcAAACcAQAAUEsBAi0DFAAIAAgA43mpVAD0N1X3AAAAnAEAAB8AAAAAAAAAAAAgAKSBAAAAAGV4YW1wbGVzL3RvZG9zL2Jhc2ljLmpvdXJuZXkudHNQSwUGAAAAAAEAAQBNAAAARAEAAAAA', + type: 'text', + }, + params: { value: '', type: 'yaml' }, + playwright_options: { + value: '{"headless":true,"chromiumSandbox":false}', + type: 'yaml', + }, + screenshots: { value: 'on', type: 'text' }, + synthetics_args: { value: null, type: 'text' }, + ignore_https_errors: { value: false, type: 'bool' }, + 'throttling.config': { value: '5d/3u/20l', type: 'text' }, + 'filter_journeys.tags': { value: null, type: 'yaml' }, + 'filter_journeys.match': { value: '"check if title is present"', type: 'text' }, + 'source.zip_url.ssl.certificate_authorities': { value: null, type: 'yaml' }, + 'source.zip_url.ssl.certificate': { value: null, type: 'yaml' }, + 'source.zip_url.ssl.key': { value: null, type: 'yaml' }, + 'source.zip_url.ssl.key_passphrase': { value: null, type: 'text' }, + 'source.zip_url.ssl.verification_mode': { value: null, type: 'text' }, + 'source.zip_url.ssl.supported_protocols': { value: null, type: 'yaml' }, + 'source.zip_url.proxy_url': { value: '', type: 'text' }, + location_name: { value: 'Test private location 0', type: 'text' }, + id: { value: id, type: 'text' }, + config_id: { value: configId, type: 'text' }, + run_once: { value: false, type: 'bool' }, + origin: { value: 'project', type: 'text' }, + 'monitor.project.id': { value: projectId, type: 'text' }, + 'monitor.project.name': { value: projectId, type: 'text' }, + ...inputs, + }, + id: `synthetics/browser-browser-4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, + compiled_stream: { + __ui: { + script_source: { is_generated_script: false, file_name: '' }, + is_zip_url_tls_enabled: false, + }, + type: 'browser', + name: 'check if title is present', + id, + origin: 'project', + enabled: true, + schedule: '@every 10m', + 'run_from.geo.name': locationName, + 'run_from.id': locationName, + timeout: null, + throttling: '5d/3u/20l', + 'source.project.content': + 'UEsDBBQACAAIAON5qVQAAAAAAAAAAAAAAAAfAAAAZXhhbXBsZXMvdG9kb3MvYmFzaWMuam91cm5leS50c22Q0WrDMAxF3/sVF7MHB0LMXlc6RvcN+wDPVWNviW0sdUsp/fe5SSiD7UFCWFfHujIGlpnkybwxFTZfoY/E3hsaLEtwhs9RPNWKDU12zAOxkXRIbN4tB9d9pFOJdO6EN2HMqQguWN9asFBuQVMmJ7jiWNII9fIXrbabdUYr58l9IhwhQQZCYORCTFFUC31Btj21NRc7Mq4Nds+4bDD/pNVgT9F52Jyr2Fa+g75LAPttg8yErk+S9ELpTmVotlVwnfNCuh2lepl3+JflUmSBJ3uggt1v9INW/lHNLKze9dJe1J3QJK8pSvWkm6aTtCet5puq+x63+AFQSwcIAPQ3VfcAAACcAQAAUEsBAi0DFAAIAAgA43mpVAD0N1X3AAAAnAEAAB8AAAAAAAAAAAAgAKSBAAAAAGV4YW1wbGVzL3RvZG9zL2Jhc2ljLmpvdXJuZXkudHNQSwUGAAAAAAEAAQBNAAAARAEAAAAA', + playwright_options: { headless: true, chromiumSandbox: false }, + screenshots: 'on', + 'filter_journeys.match': 'check if title is present', + processors: [ + { + add_fields: { + target: '', + fields: { + 'monitor.fleet_managed': true, + config_id: configId, + 'monitor.project.name': projectId, + 'monitor.project.id': projectId, + }, + }, + }, + ], + ...Object.keys(inputs).reduce((acc: Record, key) => { + acc[key] = inputs[key].value; + return acc; + }, {}), + }, + }, + { + enabled: true, + data_stream: { + type: 'synthetics', + dataset: 'browser.network', + elasticsearch: { + privileges: { + indices: ['auto_configure', 'create_doc', 'read'], + }, + }, + }, + id: `synthetics/browser-browser.network-4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, + compiled_stream: { + processors: [ + { add_observer_metadata: { geo: { name: 'Fleet managed' } } }, + { add_fields: { target: '', fields: { 'monitor.fleet_managed': true } } }, + ], + }, + }, + { + enabled: true, + data_stream: { + type: 'synthetics', + dataset: 'browser.screenshot', + elasticsearch: { + privileges: { + indices: ['auto_configure', 'create_doc', 'read'], + }, + }, + }, + id: `synthetics/browser-browser.screenshot-4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, + compiled_stream: { + processors: [ + { add_observer_metadata: { geo: { name: 'Fleet managed' } } }, + { add_fields: { target: '', fields: { 'monitor.fleet_managed': true } } }, + ], + }, + }, + ], + }, + ], + is_managed: true, + revision: 1, + created_at: '2022-08-23T13:52:42.531Z', + created_by: 'system', + updated_at: '2022-08-23T13:52:42.531Z', + updated_by: 'system', +}); diff --git a/x-pack/test/api_integration/apis/synthetics/sync_global_params.ts b/x-pack/test/api_integration/apis/synthetics/sync_global_params.ts new file mode 100644 index 0000000000000..1ea7933ce57de --- /dev/null +++ b/x-pack/test/api_integration/apis/synthetics/sync_global_params.ts @@ -0,0 +1,212 @@ +/* + * 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 { + ConfigKey, + HTTPFields, + SyntheticsParam, +} from '@kbn/synthetics-plugin/common/runtime_types'; +import { API_URLS, SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; +import { omit } from 'lodash'; +import { secretKeys } from '@kbn/synthetics-plugin/common/constants/monitor_management'; +import { PackagePolicy } from '@kbn/fleet-plugin/common'; +import expect from '@kbn/expect'; +import { syntheticsParamType } from '@kbn/synthetics-plugin/common/types/saved_objects'; +import { SavedObject } from '@kbn/core-saved-objects-common'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { getFixtureJson } from '../uptime/rest/helper/get_fixture_json'; +import { PrivateLocationTestService } from './services/private_location_test_service'; +import { getTestBrowserSyntheticsPolicy } from './sample_data/test_browser_policy'; +import { comparePolicies } from './sample_data/test_policy'; + +export default function ({ getService }: FtrProviderContext) { + describe('SyncGlobalParams', function () { + this.tags('skipCloud'); + const supertestAPI = getService('supertest'); + const kServer = getService('kibanaServer'); + + let testFleetPolicyID: string; + let _browserMonitorJson: HTTPFields; + let browserMonitorJson: HTTPFields; + let newMonitorId: string; + + const testPrivateLocations = new PrivateLocationTestService(getService); + const params: Record = {}; + + before(async () => { + await supertestAPI.post('/api/fleet/setup').set('kbn-xsrf', 'true').send().expect(200); + await supertestAPI + .post('/api/fleet/epm/packages/synthetics/0.11.4') + .set('kbn-xsrf', 'true') + .send({ force: true }) + .expect(200); + + _browserMonitorJson = getFixtureJson('browser_monitor'); + await kServer.savedObjects.clean({ types: [syntheticsParamType] }); + }); + + beforeEach(() => { + browserMonitorJson = _browserMonitorJson; + }); + + const testPolicyName = 'Fleet test server policy' + Date.now(); + + it('adds a test fleet policy', async () => { + const apiResponse = await testPrivateLocations.addFleetPolicy(testPolicyName); + testFleetPolicyID = apiResponse.body.item.id; + }); + + it('add a test private location', async () => { + await testPrivateLocations.setTestLocations([testFleetPolicyID]); + + const apiResponse = await supertestAPI.get(API_URLS.SERVICE_LOCATIONS); + + expect(apiResponse.body.locations).eql([ + { + id: 'localhost', + label: 'Local Synthetics Service', + geo: { lat: 0, lon: 0 }, + url: 'mockDevUrl', + isServiceManaged: true, + status: 'experimental', + isInvalid: false, + }, + { + concurrentMonitors: 1, + id: testFleetPolicyID, + isInvalid: false, + isServiceManaged: false, + label: 'Test private location 0', + geo: { + lat: '', + lon: '', + }, + agentPolicyId: testFleetPolicyID, + }, + ]); + }); + + it('adds a monitor in private location', async () => { + const newMonitor = browserMonitorJson; + + newMonitor.locations.push({ + id: testFleetPolicyID, + label: 'Test private location 0', + isServiceManaged: false, + }); + + const apiResponse = await supertestAPI + .post(API_URLS.SYNTHETICS_MONITORS) + .set('kbn-xsrf', 'true') + .send(newMonitor); + + expect(apiResponse.body.attributes).eql( + omit( + { + ...newMonitor, + [ConfigKey.MONITOR_QUERY_ID]: apiResponse.body.id, + [ConfigKey.CONFIG_ID]: apiResponse.body.id, + }, + secretKeys + ) + ); + newMonitorId = apiResponse.body.id; + }); + + it('added an integration for previously added monitor', async () => { + const apiResponse = await supertestAPI.get( + '/api/fleet/package_policies?page=1&perPage=2000&kuery=ingest-package-policies.package.name%3A%20synthetics' + ); + + const packagePolicy = apiResponse.body.items.find( + (pkgPolicy: PackagePolicy) => + pkgPolicy.id === newMonitorId + '-' + testFleetPolicyID + '-default' + ); + + expect(packagePolicy.policy_id).eql(testFleetPolicyID); + + comparePolicies( + packagePolicy, + getTestBrowserSyntheticsPolicy({ name: browserMonitorJson.name, id: newMonitorId }) + ); + }); + + it('adds a test param', async () => { + const apiResponse = await supertestAPI + .post(SYNTHETICS_API_URLS.PARAMS) + .set('kbn-xsrf', 'true') + .send({ key: 'test', value: 'test' }); + + expect(apiResponse.status).eql(200); + }); + + it('get list of params', async () => { + const apiResponse = await supertestAPI + .get(SYNTHETICS_API_URLS.PARAMS) + .set('kbn-xsrf', 'true') + .send({ key: 'test', value: 'test' }); + + expect(apiResponse.status).eql(200); + + apiResponse.body.data.forEach(({ attributes }: SavedObject) => { + params[attributes.key] = attributes.value; + }); + }); + + it('sync global params', async () => { + const apiResponse = await supertestAPI + .get(SYNTHETICS_API_URLS.SYNC_GLOBAL_PARAMS) + .set('kbn-xsrf', 'true') + .send({ key: 'test', value: 'test' }); + + expect(apiResponse.status).eql(200); + }); + + it('added params to for previously added integration', async () => { + const apiResponse = await supertestAPI.get( + '/api/fleet/package_policies?page=1&perPage=2000&kuery=ingest-package-policies.package.name%3A%20synthetics' + ); + + const packagePolicy = apiResponse.body.items.find( + (pkgPolicy: PackagePolicy) => + pkgPolicy.id === newMonitorId + '-' + testFleetPolicyID + '-default' + ); + + expect(packagePolicy.policy_id).eql(testFleetPolicyID); + + comparePolicies( + packagePolicy, + getTestBrowserSyntheticsPolicy({ name: browserMonitorJson.name, id: newMonitorId, params }) + ); + }); + + it('delete all params and sync again', async () => { + await kServer.savedObjects.clean({ types: [syntheticsParamType] }); + const apiResponseK = await supertestAPI + .get(SYNTHETICS_API_URLS.SYNC_GLOBAL_PARAMS) + .set('kbn-xsrf', 'true') + .send({ key: 'test', value: 'test' }); + + expect(apiResponseK.status).eql(200); + + const apiResponse = await supertestAPI.get( + '/api/fleet/package_policies?page=1&perPage=2000&kuery=ingest-package-policies.package.name%3A%20synthetics' + ); + + const packagePolicy = apiResponse.body.items.find( + (pkgPolicy: PackagePolicy) => + pkgPolicy.id === newMonitorId + '-' + testFleetPolicyID + '-default' + ); + + expect(packagePolicy.policy_id).eql(testFleetPolicyID); + + comparePolicies( + packagePolicy, + getTestBrowserSyntheticsPolicy({ name: browserMonitorJson.name, id: newMonitorId }) + ); + }); + }); +} diff --git a/x-pack/test/api_integration/apis/uptime/rest/fixtures/browser_monitor.json b/x-pack/test/api_integration/apis/uptime/rest/fixtures/browser_monitor.json index 1ec38eaf7633f..9b1176ff31377 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/fixtures/browser_monitor.json +++ b/x-pack/test/api_integration/apis/uptime/rest/fixtures/browser_monitor.json @@ -9,10 +9,7 @@ }, "service.name": "", "config_id": "", - "tags": [ - "cookie-test", - "browser" - ], + "tags": ["cookie-test", "browser"], "timeout": "16", "__ui": { "script_source": { @@ -29,7 +26,6 @@ "source.zip_url.proxy_url": "", "source.inline.script": "step(\"Visit /users api route\", async () => {\\n const response = await page.goto('https://nextjs-test-synthetics.vercel.app/api/users');\\n expect(response.status()).toEqual(200);\\n});", "source.project.content": "", - "is_push_monitor": false, "params": "", "screenshots": "on", "synthetics_args": [], @@ -49,5 +45,12 @@ "urls": "", "url.port": null, "id": "", - "hash": "" + "hash": "", + "playwright_options": "", + "playwright_text_assertion": "", + "ssl.certificate": "", + "ssl.certificate_authorities": "", + "ssl.supported_protocols": ["TLSv1.1", "TLSv1.2", "TLSv1.3"], + "ssl.verification_mode": "full", + "revision": 1 } diff --git a/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts b/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts deleted file mode 100644 index e7803bc48feee..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts +++ /dev/null @@ -1,598 +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 { omit, sortBy } from 'lodash'; -import expect from '@kbn/expect'; -import { PackagePolicy } from '@kbn/fleet-plugin/common'; - -export const getTestSyntheticsPolicy = ( - name: string, - id: string, - locationName?: string, - namespace?: string -): PackagePolicy => ({ - id: '2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', - version: 'WzE2MjYsMV0=', - name: 'test-monitor-name-Test private location 0-default', - namespace: namespace || 'testnamespace', - package: { name: 'synthetics', title: 'Elastic Synthetics', version: '0.10.3' }, - enabled: true, - policy_id: '5347cd10-0368-11ed-8df7-a7424c6f5167', - inputs: [ - { - type: 'synthetics/http', - policy_template: 'synthetics', - enabled: true, - streams: [ - { - enabled: true, - data_stream: { type: 'synthetics', dataset: 'http' }, - vars: { - __ui: { - value: - '{"is_tls_enabled":false,"is_zip_url_tls_enabled":false,"script_source":{"is_generated_script":false,"file_name":"test-file.name"}}', - type: 'yaml', - }, - enabled: { value: true, type: 'bool' }, - type: { value: 'http', type: 'text' }, - name: { value: name, type: 'text' }, - schedule: { value: '"@every 5m"', type: 'text' }, - urls: { value: 'https://nextjs-test-synthetics.vercel.app/api/users', type: 'text' }, - 'service.name': { value: '', type: 'text' }, - timeout: { value: '3ms', type: 'text' }, - max_redirects: { value: '3', type: 'integer' }, - proxy_url: { value: 'http://proxy.com', type: 'text' }, - tags: { value: '["tag1","tag2"]', type: 'yaml' }, - username: { value: 'test-username', type: 'text' }, - password: { value: 'test', type: 'password' }, - 'response.include_headers': { value: true, type: 'bool' }, - 'response.include_body': { value: 'never', type: 'text' }, - 'check.request.method': { value: '', type: 'text' }, - 'check.request.headers': { - value: '{"sampleHeader":"sampleHeaderValue"}', - type: 'yaml', - }, - 'check.request.body': { value: '"testValue"', type: 'yaml' }, - 'check.response.status': { value: '["200","201"]', type: 'yaml' }, - 'check.response.headers': { value: null, type: 'yaml' }, - 'check.response.body.positive': { value: null, type: 'yaml' }, - 'check.response.body.negative': { value: null, type: 'yaml' }, - 'ssl.certificate_authorities': { value: '"t.string"', type: 'yaml' }, - 'ssl.certificate': { value: '"t.string"', type: 'yaml' }, - 'ssl.key': { value: '"t.string"', type: 'yaml' }, - 'ssl.key_passphrase': { value: 't.string', type: 'text' }, - 'ssl.verification_mode': { value: 'certificate', type: 'text' }, - 'ssl.supported_protocols': { value: '["TLSv1.1","TLSv1.2"]', type: 'yaml' }, - location_name: { value: locationName || 'Test private location 0', type: 'text' }, - id: { value: id, type: 'text' }, - config_id: { value: id, type: 'text' }, - run_once: { value: false, type: 'bool' }, - origin: { value: 'ui', type: 'text' }, - 'monitor.project.id': { type: 'text', value: null }, - 'monitor.project.name': { type: 'text', value: null }, - }, - id: 'synthetics/http-http-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', - compiled_stream: { - __ui: { - is_tls_enabled: false, - is_zip_url_tls_enabled: false, - script_source: { is_generated_script: false, file_name: 'test-file.name' }, - }, - type: 'http', - name, - id, - origin: 'ui', - enabled: true, - urls: 'https://nextjs-test-synthetics.vercel.app/api/users', - schedule: '@every 5m', - timeout: '3ms', - max_redirects: 3, - proxy_url: 'http://proxy.com', - tags: ['tag1', 'tag2'], - username: 'test-username', - password: 'test', - 'response.include_headers': true, - 'response.include_body': 'never', - 'check.request.method': null, - 'check.request.headers': { sampleHeader: 'sampleHeaderValue' }, - 'check.request.body': 'testValue', - 'check.response.status': ['200', '201'], - 'ssl.certificate': 't.string', - 'ssl.certificate_authorities': 't.string', - 'ssl.key': 't.string', - 'ssl.key_passphrase': 't.string', - 'ssl.verification_mode': 'certificate', - 'ssl.supported_protocols': ['TLSv1.1', 'TLSv1.2'], - processors: [ - { - add_observer_metadata: { geo: { name: locationName || 'Test private location 0' } }, - }, - { - add_fields: { - target: '', - fields: { - 'monitor.fleet_managed': true, - config_id: id, - }, - }, - }, - ], - }, - }, - ], - }, - { - type: 'synthetics/tcp', - policy_template: 'synthetics', - enabled: false, - streams: [ - { - enabled: false, - data_stream: { type: 'synthetics', dataset: 'tcp' }, - vars: { - __ui: { type: 'yaml' }, - enabled: { value: true, type: 'bool' }, - type: { value: 'tcp', type: 'text' }, - name: { type: 'text' }, - schedule: { value: '"@every 3m"', type: 'text' }, - hosts: { type: 'text' }, - 'service.name': { type: 'text' }, - timeout: { type: 'text' }, - proxy_url: { type: 'text' }, - proxy_use_local_resolver: { value: false, type: 'bool' }, - tags: { type: 'yaml' }, - 'check.send': { type: 'text' }, - 'check.receive': { type: 'text' }, - 'ssl.certificate_authorities': { type: 'yaml' }, - 'ssl.certificate': { type: 'yaml' }, - 'ssl.key': { type: 'yaml' }, - 'ssl.key_passphrase': { type: 'text' }, - 'ssl.verification_mode': { type: 'text' }, - 'ssl.supported_protocols': { type: 'yaml' }, - location_name: { value: 'Fleet managed', type: 'text' }, - id: { type: 'text' }, - config_id: { type: 'text' }, - run_once: { value: false, type: 'bool' }, - origin: { type: 'text' }, - 'monitor.project.id': { type: 'text' }, - 'monitor.project.name': { type: 'text' }, - }, - id: 'synthetics/tcp-tcp-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', - }, - ], - }, - { - type: 'synthetics/icmp', - policy_template: 'synthetics', - enabled: false, - streams: [ - { - enabled: false, - data_stream: { type: 'synthetics', dataset: 'icmp' }, - vars: { - __ui: { type: 'yaml' }, - enabled: { value: true, type: 'bool' }, - type: { value: 'icmp', type: 'text' }, - name: { type: 'text' }, - schedule: { value: '"@every 3m"', type: 'text' }, - wait: { value: '1s', type: 'text' }, - hosts: { type: 'text' }, - 'service.name': { type: 'text' }, - timeout: { type: 'text' }, - tags: { type: 'yaml' }, - location_name: { value: 'Fleet managed', type: 'text' }, - id: { type: 'text' }, - config_id: { type: 'text' }, - run_once: { value: false, type: 'bool' }, - origin: { type: 'text' }, - 'monitor.project.id': { type: 'text' }, - 'monitor.project.name': { type: 'text' }, - }, - id: 'synthetics/icmp-icmp-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', - }, - ], - }, - { - type: 'synthetics/browser', - policy_template: 'synthetics', - enabled: false, - streams: [ - { - enabled: true, - data_stream: { type: 'synthetics', dataset: 'browser' }, - vars: { - __ui: { type: 'yaml' }, - enabled: { value: true, type: 'bool' }, - type: { value: 'browser', type: 'text' }, - name: { type: 'text' }, - schedule: { value: '"@every 3m"', type: 'text' }, - 'service.name': { type: 'text' }, - timeout: { type: 'text' }, - tags: { type: 'yaml' }, - 'source.zip_url.url': { type: 'text' }, - 'source.zip_url.username': { type: 'text' }, - 'source.zip_url.folder': { type: 'text' }, - 'source.zip_url.password': { type: 'password' }, - 'source.inline.script': { type: 'yaml' }, - 'source.project.content': { type: 'text' }, - params: { type: 'yaml' }, - playwright_options: { type: 'yaml' }, - screenshots: { type: 'text' }, - synthetics_args: { type: 'text' }, - ignore_https_errors: { type: 'bool' }, - 'throttling.config': { type: 'text' }, - 'filter_journeys.tags': { type: 'yaml' }, - 'filter_journeys.match': { type: 'text' }, - 'source.zip_url.ssl.certificate_authorities': { type: 'yaml' }, - 'source.zip_url.ssl.certificate': { type: 'yaml' }, - 'source.zip_url.ssl.key': { type: 'yaml' }, - 'source.zip_url.ssl.key_passphrase': { type: 'text' }, - 'source.zip_url.ssl.verification_mode': { type: 'text' }, - 'source.zip_url.ssl.supported_protocols': { type: 'yaml' }, - 'source.zip_url.proxy_url': { type: 'text' }, - location_name: { value: 'Fleet managed', type: 'text' }, - id: { type: 'text' }, - config_id: { type: 'text' }, - run_once: { value: false, type: 'bool' }, - origin: { type: 'text' }, - 'monitor.project.id': { type: 'text' }, - 'monitor.project.name': { type: 'text' }, - }, - id: 'synthetics/browser-browser-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', - compiled_stream: { - __ui: null, - type: 'browser', - name: null, - enabled: true, - schedule: '@every 3m', - timeout: null, - throttling: null, - processors: [ - { add_observer_metadata: { geo: { name: 'Fleet managed' } } }, - { add_fields: { target: '', fields: { 'monitor.fleet_managed': true } } }, - ], - }, - }, - { - enabled: true, - data_stream: { type: 'synthetics', dataset: 'browser.network' }, - id: 'synthetics/browser-browser.network-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', - compiled_stream: { - processors: [ - { add_observer_metadata: { geo: { name: 'Fleet managed' } } }, - { add_fields: { target: '', fields: { 'monitor.fleet_managed': true } } }, - ], - }, - }, - { - enabled: true, - data_stream: { type: 'synthetics', dataset: 'browser.screenshot' }, - id: 'synthetics/browser-browser.screenshot-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', - compiled_stream: { - processors: [ - { add_observer_metadata: { geo: { name: 'Fleet managed' } } }, - { add_fields: { target: '', fields: { 'monitor.fleet_managed': true } } }, - ], - }, - }, - ], - }, - ], - is_managed: true, - revision: 1, - created_at: '2022-08-23T14:09:17.176Z', - created_by: 'system', - updated_at: '2022-08-23T14:09:17.176Z', - updated_by: 'system', -}); - -export const getTestProjectSyntheticsPolicy = ( - { - name, - inputs = {}, - configId, - id, - projectId = 'test-suite', - }: { - name?: string; - inputs: Record; - configId: string; - id: string; - projectId?: string; - } = { - name: 'check if title is present-Test private location 0', - inputs: {}, - configId: '', - id: '', - } -): PackagePolicy => ({ - id: `4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, - version: 'WzEzMDksMV0=', - name: `4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-Test private location 0`, - namespace: 'default', - package: { name: 'synthetics', title: 'Elastic Synthetics', version: '0.10.3' }, - enabled: true, - policy_id: '46034710-0ba6-11ed-ba04-5f123b9faa8b', - inputs: [ - { - type: 'synthetics/http', - policy_template: 'synthetics', - enabled: false, - streams: [ - { - enabled: false, - data_stream: { type: 'synthetics', dataset: 'http' }, - vars: { - __ui: { type: 'yaml' }, - enabled: { value: true, type: 'bool' }, - type: { value: 'http', type: 'text' }, - name: { type: 'text' }, - schedule: { value: '"@every 3m"', type: 'text' }, - urls: { type: 'text' }, - 'service.name': { type: 'text' }, - timeout: { type: 'text' }, - max_redirects: { type: 'integer' }, - proxy_url: { type: 'text' }, - tags: { type: 'yaml' }, - username: { type: 'text' }, - password: { type: 'password' }, - 'response.include_headers': { type: 'bool' }, - 'response.include_body': { type: 'text' }, - 'check.request.method': { type: 'text' }, - 'check.request.headers': { type: 'yaml' }, - 'check.request.body': { type: 'yaml' }, - 'check.response.status': { type: 'yaml' }, - 'check.response.headers': { type: 'yaml' }, - 'check.response.body.positive': { type: 'yaml' }, - 'check.response.body.negative': { type: 'yaml' }, - 'ssl.certificate_authorities': { type: 'yaml' }, - 'ssl.certificate': { type: 'yaml' }, - 'ssl.key': { type: 'yaml' }, - 'ssl.key_passphrase': { type: 'text' }, - 'ssl.verification_mode': { type: 'text' }, - 'ssl.supported_protocols': { type: 'yaml' }, - location_name: { value: 'Fleet managed', type: 'text' }, - id: { type: 'text' }, - config_id: { type: 'text' }, - run_once: { value: false, type: 'bool' }, - origin: { type: 'text' }, - 'monitor.project.id': { type: 'text' }, - 'monitor.project.name': { type: 'text' }, - }, - id: `synthetics/http-http-4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, - }, - ], - }, - { - type: 'synthetics/tcp', - policy_template: 'synthetics', - enabled: false, - streams: [ - { - enabled: false, - data_stream: { type: 'synthetics', dataset: 'tcp' }, - vars: { - __ui: { type: 'yaml' }, - enabled: { value: true, type: 'bool' }, - type: { value: 'tcp', type: 'text' }, - name: { type: 'text' }, - schedule: { value: '"@every 3m"', type: 'text' }, - hosts: { type: 'text' }, - 'service.name': { type: 'text' }, - timeout: { type: 'text' }, - proxy_url: { type: 'text' }, - proxy_use_local_resolver: { value: false, type: 'bool' }, - tags: { type: 'yaml' }, - 'check.send': { type: 'text' }, - 'check.receive': { type: 'text' }, - 'ssl.certificate_authorities': { type: 'yaml' }, - 'ssl.certificate': { type: 'yaml' }, - 'ssl.key': { type: 'yaml' }, - 'ssl.key_passphrase': { type: 'text' }, - 'ssl.verification_mode': { type: 'text' }, - 'ssl.supported_protocols': { type: 'yaml' }, - location_name: { value: 'Fleet managed', type: 'text' }, - id: { type: 'text' }, - config_id: { type: 'text' }, - run_once: { value: false, type: 'bool' }, - origin: { type: 'text' }, - 'monitor.project.id': { type: 'text' }, - 'monitor.project.name': { type: 'text' }, - }, - id: `synthetics/tcp-tcp-4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, - }, - ], - }, - { - type: 'synthetics/icmp', - policy_template: 'synthetics', - enabled: false, - streams: [ - { - enabled: false, - data_stream: { type: 'synthetics', dataset: 'icmp' }, - vars: { - __ui: { type: 'yaml' }, - enabled: { value: true, type: 'bool' }, - type: { value: 'icmp', type: 'text' }, - name: { type: 'text' }, - schedule: { value: '"@every 3m"', type: 'text' }, - wait: { value: '1s', type: 'text' }, - hosts: { type: 'text' }, - 'service.name': { type: 'text' }, - timeout: { type: 'text' }, - tags: { type: 'yaml' }, - location_name: { value: 'Fleet managed', type: 'text' }, - id: { type: 'text' }, - config_id: { type: 'text' }, - run_once: { value: false, type: 'bool' }, - origin: { type: 'text' }, - 'monitor.project.id': { type: 'text' }, - 'monitor.project.name': { type: 'text' }, - }, - id: `synthetics/icmp-icmp-4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, - }, - ], - }, - { - type: 'synthetics/browser', - policy_template: 'synthetics', - enabled: true, - streams: [ - { - enabled: true, - data_stream: { type: 'synthetics', dataset: 'browser' }, - vars: { - __ui: { - value: - '{"script_source":{"is_generated_script":false,"file_name":""},"is_zip_url_tls_enabled":false}', - type: 'yaml', - }, - enabled: { value: true, type: 'bool' }, - type: { value: 'browser', type: 'text' }, - name: { value: 'check if title is present', type: 'text' }, - schedule: { value: '"@every 10m"', type: 'text' }, - 'service.name': { value: '', type: 'text' }, - timeout: { value: null, type: 'text' }, - tags: { value: null, type: 'yaml' }, - 'source.zip_url.url': { value: '', type: 'text' }, - 'source.zip_url.username': { value: '', type: 'text' }, - 'source.zip_url.folder': { value: '', type: 'text' }, - 'source.zip_url.password': { value: '', type: 'password' }, - 'source.inline.script': { value: null, type: 'yaml' }, - 'source.project.content': { - value: - 'UEsDBBQACAAIAON5qVQAAAAAAAAAAAAAAAAfAAAAZXhhbXBsZXMvdG9kb3MvYmFzaWMuam91cm5leS50c22Q0WrDMAxF3/sVF7MHB0LMXlc6RvcN+wDPVWNviW0sdUsp/fe5SSiD7UFCWFfHujIGlpnkybwxFTZfoY/E3hsaLEtwhs9RPNWKDU12zAOxkXRIbN4tB9d9pFOJdO6EN2HMqQguWN9asFBuQVMmJ7jiWNII9fIXrbabdUYr58l9IhwhQQZCYORCTFFUC31Btj21NRc7Mq4Nds+4bDD/pNVgT9F52Jyr2Fa+g75LAPttg8yErk+S9ELpTmVotlVwnfNCuh2lepl3+JflUmSBJ3uggt1v9INW/lHNLKze9dJe1J3QJK8pSvWkm6aTtCet5puq+x63+AFQSwcIAPQ3VfcAAACcAQAAUEsBAi0DFAAIAAgA43mpVAD0N1X3AAAAnAEAAB8AAAAAAAAAAAAgAKSBAAAAAGV4YW1wbGVzL3RvZG9zL2Jhc2ljLmpvdXJuZXkudHNQSwUGAAAAAAEAAQBNAAAARAEAAAAA', - type: 'text', - }, - params: { value: '', type: 'yaml' }, - playwright_options: { - value: '{"headless":true,"chromiumSandbox":false}', - type: 'yaml', - }, - screenshots: { value: 'on', type: 'text' }, - synthetics_args: { value: null, type: 'text' }, - ignore_https_errors: { value: false, type: 'bool' }, - 'throttling.config': { value: '5d/3u/20l', type: 'text' }, - 'filter_journeys.tags': { value: null, type: 'yaml' }, - 'filter_journeys.match': { value: '"check if title is present"', type: 'text' }, - 'source.zip_url.ssl.certificate_authorities': { value: null, type: 'yaml' }, - 'source.zip_url.ssl.certificate': { value: null, type: 'yaml' }, - 'source.zip_url.ssl.key': { value: null, type: 'yaml' }, - 'source.zip_url.ssl.key_passphrase': { value: null, type: 'text' }, - 'source.zip_url.ssl.verification_mode': { value: null, type: 'text' }, - 'source.zip_url.ssl.supported_protocols': { value: null, type: 'yaml' }, - 'source.zip_url.proxy_url': { value: '', type: 'text' }, - location_name: { value: 'Test private location 0', type: 'text' }, - id: { value: id, type: 'text' }, - config_id: { value: configId, type: 'text' }, - run_once: { value: false, type: 'bool' }, - origin: { value: 'project', type: 'text' }, - 'monitor.project.id': { value: projectId, type: 'text' }, - 'monitor.project.name': { value: projectId, type: 'text' }, - ...inputs, - }, - id: `synthetics/browser-browser-4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, - compiled_stream: { - __ui: { - script_source: { is_generated_script: false, file_name: '' }, - is_zip_url_tls_enabled: false, - }, - type: 'browser', - name: 'check if title is present', - id, - origin: 'project', - enabled: true, - schedule: '@every 10m', - timeout: null, - throttling: '5d/3u/20l', - 'source.project.content': - 'UEsDBBQACAAIAON5qVQAAAAAAAAAAAAAAAAfAAAAZXhhbXBsZXMvdG9kb3MvYmFzaWMuam91cm5leS50c22Q0WrDMAxF3/sVF7MHB0LMXlc6RvcN+wDPVWNviW0sdUsp/fe5SSiD7UFCWFfHujIGlpnkybwxFTZfoY/E3hsaLEtwhs9RPNWKDU12zAOxkXRIbN4tB9d9pFOJdO6EN2HMqQguWN9asFBuQVMmJ7jiWNII9fIXrbabdUYr58l9IhwhQQZCYORCTFFUC31Btj21NRc7Mq4Nds+4bDD/pNVgT9F52Jyr2Fa+g75LAPttg8yErk+S9ELpTmVotlVwnfNCuh2lepl3+JflUmSBJ3uggt1v9INW/lHNLKze9dJe1J3QJK8pSvWkm6aTtCet5puq+x63+AFQSwcIAPQ3VfcAAACcAQAAUEsBAi0DFAAIAAgA43mpVAD0N1X3AAAAnAEAAB8AAAAAAAAAAAAgAKSBAAAAAGV4YW1wbGVzL3RvZG9zL2Jhc2ljLmpvdXJuZXkudHNQSwUGAAAAAAEAAQBNAAAARAEAAAAA', - playwright_options: { headless: true, chromiumSandbox: false }, - screenshots: 'on', - 'filter_journeys.match': 'check if title is present', - processors: [ - { add_observer_metadata: { geo: { name: 'Test private location 0' } } }, - { - add_fields: { - target: '', - fields: { - 'monitor.fleet_managed': true, - config_id: configId, - 'monitor.project.name': projectId, - 'monitor.project.id': projectId, - }, - }, - }, - ], - ...Object.keys(inputs).reduce((acc: Record, key) => { - acc[key] = inputs[key].value; - return acc; - }, {}), - }, - }, - { - enabled: true, - data_stream: { type: 'synthetics', dataset: 'browser.network' }, - id: `synthetics/browser-browser.network-4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, - compiled_stream: { - processors: [ - { add_observer_metadata: { geo: { name: 'Fleet managed' } } }, - { add_fields: { target: '', fields: { 'monitor.fleet_managed': true } } }, - ], - }, - }, - { - enabled: true, - data_stream: { type: 'synthetics', dataset: 'browser.screenshot' }, - id: `synthetics/browser-browser.screenshot-4b6abc6c-118b-4d93-a489-1135500d09f1-${projectId}-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3`, - compiled_stream: { - processors: [ - { add_observer_metadata: { geo: { name: 'Fleet managed' } } }, - { add_fields: { target: '', fields: { 'monitor.fleet_managed': true } } }, - ], - }, - }, - ], - }, - ], - is_managed: true, - revision: 1, - created_at: '2022-08-23T13:52:42.531Z', - created_by: 'system', - updated_at: '2022-08-23T13:52:42.531Z', - updated_by: 'system', -}); - -export const omitIds = (policy: PackagePolicy) => { - policy.inputs = sortBy(policy.inputs, 'type'); - - policy.inputs.forEach((input) => { - input.streams = sortBy(input.streams, 'data_stream.dataset'); - input.streams.forEach((stream) => { - stream.id = ''; - }); - }); - - return omit(policy, ignoreTestFields); -}; - -export const comparePolicies = (aPolicy: PackagePolicy, bPolicy: PackagePolicy) => { - expect(omitIds(aPolicy)).eql(omitIds(bPolicy)); -}; - -export const ignoreTestFields = [ - 'id', - 'name', - 'created_at', - 'created_by', - 'updated_at', - 'updated_by', - 'policy_id', - 'version', - 'revision', -]; diff --git a/x-pack/test/apm_api_integration/common/config.ts b/x-pack/test/apm_api_integration/common/config.ts index 86b5ae9820199..82dd9d5b8b26f 100644 --- a/x-pack/test/apm_api_integration/common/config.ts +++ b/x-pack/test/apm_api_integration/common/config.ts @@ -28,7 +28,7 @@ import { RegistryProvider } from './registry'; export interface ApmFtrConfig { name: APMFtrConfigName; license: 'basic' | 'trial'; - kibanaConfig?: Record; + kibanaConfig?: Record; } async function getApmApiClient({ diff --git a/x-pack/test/apm_api_integration/configs/index.ts b/x-pack/test/apm_api_integration/configs/index.ts index e4dfc0b8e387c..eed3a3c9f2443 100644 --- a/x-pack/test/apm_api_integration/configs/index.ts +++ b/x-pack/test/apm_api_integration/configs/index.ts @@ -8,17 +8,25 @@ import { mapValues } from 'lodash'; import { createTestConfig, CreateTestConfig } from '../common/config'; +const apmDebugLogger = { + name: 'plugins.apm', + level: 'debug', + appenders: ['console'], +}; + const apmFtrConfigs = { basic: { license: 'basic' as const, kibanaConfig: { 'xpack.apm.forceSyntheticSource': 'true', + 'logging.loggers': [apmDebugLogger], }, }, trial: { license: 'trial' as const, kibanaConfig: { 'xpack.apm.forceSyntheticSource': 'true', + 'logging.loggers': [apmDebugLogger], }, }, rules: { @@ -26,6 +34,7 @@ const apmFtrConfigs = { kibanaConfig: { 'xpack.ruleRegistry.write.enabled': 'true', 'xpack.apm.forceSyntheticSource': 'true', + 'logging.loggers': [apmDebugLogger], }, }, }; diff --git a/x-pack/test/apm_api_integration/tests/index.ts b/x-pack/test/apm_api_integration/tests/index.ts index 53c685a07e8b3..deeffe9e9d677 100644 --- a/x-pack/test/apm_api_integration/tests/index.ts +++ b/x-pack/test/apm_api_integration/tests/index.ts @@ -22,7 +22,8 @@ function getGlobPattern() { export default function apmApiIntegrationTests({ getService, loadTestFile }: FtrProviderContext) { const registry = getService('registry'); - describe('APM API tests', function () { + // Failing: See https://github.com/elastic/kibana/issues/147473 + describe.skip('APM API tests', function () { const tests = globby.sync(getGlobPattern(), { cwd }); if (envGrepFiles) { diff --git a/x-pack/test/apm_api_integration/tests/sourcemaps/sourcemaps.ts b/x-pack/test/apm_api_integration/tests/sourcemaps/sourcemaps.ts index 0b3dbf2c6ebfc..ed5adcbcab685 100644 --- a/x-pack/test/apm_api_integration/tests/sourcemaps/sourcemaps.ts +++ b/x-pack/test/apm_api_integration/tests/sourcemaps/sourcemaps.ts @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; +import type { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; +import type { ApmSourceMap } from '@kbn/apm-plugin/server/routes/source_maps/create_apm_source_map_index_template'; import type { SourceMap } from '@kbn/apm-plugin/server/routes/source_maps/route'; import expect from '@kbn/expect'; import { first, last, times } from 'lodash'; @@ -13,6 +14,65 @@ import { FtrProviderContext } from '../../common/ftr_provider_context'; export default function ApiTest({ getService }: FtrProviderContext) { const registry = getService('registry'); const apmApiClient = getService('apmApiClient'); + const esClient = getService('es'); + + function sleep(ms: number) { + return new Promise((resolve) => setTimeout(resolve, ms)); + } + + async function waitFor( + cb: () => Promise, + { retries = 50, delay = 100 }: { retries?: number; delay?: number } = {} + ): Promise { + if (retries === 0) { + throw new Error(`Maximum number of retries reached`); + } + + const res = await cb(); + if (!res) { + await sleep(delay); + return waitFor(cb, { retries: retries - 1, delay }); + } + } + + async function waitForSourceMapCount( + count: number, + { retries, delay }: { retries?: number; delay?: number } = {} + ) { + await waitFor( + async () => { + const res = await esClient.search({ + index: '.apm-source-map', + size: 0, + track_total_hits: true, + }); + // @ts-expect-error + return res.hits.total.value === count; + }, + { retries, delay } + ); + return count; + } + + async function deleteAllApmSourceMaps() { + await esClient.deleteByQuery({ + index: '.apm-source-map*', + refresh: true, + query: { match_all: {} }, + }); + } + + async function deleteAllFleetSourceMaps() { + return esClient.deleteByQuery({ + index: '.fleet-artifacts*', + refresh: true, + query: { + bool: { + filter: [{ term: { type: 'sourcemap' } }, { term: { package_name: 'apm' } }], + }, + }, + }); + } async function uploadSourcemap({ bundleFilePath, @@ -40,6 +100,12 @@ export default function ApiTest({ getService }: FtrProviderContext) { return response.body; } + async function runSourceMapMigration() { + await apmApiClient.writeUser({ + endpoint: 'POST /internal/apm/sourcemaps/migrate_fleet_artifacts', + }); + } + async function deleteSourcemap(id: string) { await apmApiClient.writeUser({ endpoint: 'DELETE /api/apm/sourcemaps/{id}', @@ -58,6 +124,10 @@ export default function ApiTest({ getService }: FtrProviderContext) { } registry.when('source maps', { config: 'basic', archives: [] }, () => { + before(async () => { + await Promise.all([deleteAllFleetSourceMaps(), deleteAllApmSourceMaps()]); + }); + let resp: APIReturnType<'POST /api/apm/sourcemaps'>; describe('upload source map', () => { after(async () => { @@ -67,9 +137,9 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); }); - it('can upload a source map', async () => { + before(async () => { resp = await uploadSourcemap({ - serviceName: 'my_service', + serviceName: 'uploading-test', serviceVersion: '1.0.0', bundleFilePath: 'bar', sourcemap: { @@ -78,17 +148,50 @@ export default function ApiTest({ getService }: FtrProviderContext) { mappings: '', }, }); - expect(resp).to.not.empty(); + + await waitForSourceMapCount(1); + }); + + it('is uploaded as a fleet artifact', async () => { + const res = await esClient.search({ + index: '.fleet-artifacts', + size: 1, + query: { + bool: { + filter: [{ term: { type: 'sourcemap' } }, { term: { package_name: 'apm' } }], + }, + }, + }); + + // @ts-expect-error + expect(res.hits.hits[0]._source.identifier).to.be('uploading-test-1.0.0'); + }); + + it('is added to .apm-source-map index', async () => { + const res = await esClient.search({ + index: '.apm-source-map', + }); + + const doc = res.hits.hits[0]._source as ApmSourceMap; + expect(doc.content).to.be( + 'eJyrVipLLSrOzM9TsjI0MtZRKs4vLUpOLVayilZSitVRyk0sKMjMSwfylZRqAURLDgo=' + ); + expect(doc.content_sha256).to.be( + '02dd950aa88a66183d312a7a5f44d72fc9e3914cdbbe5e3a04f1509a8a3d7d83' + ); + expect(doc.file.path).to.be('bar'); + expect(doc.service.name).to.be('uploading-test'); + expect(doc.service.version).to.be('1.0.0'); }); }); describe('list source maps', async () => { - const uploadedSourcemapIds: string[] = []; before(async () => { - const sourcemapCount = times(15); + const totalCount = 6; + const sourcemapCount = times(totalCount); for (const i of sourcemapCount) { - const sourcemap = await uploadSourcemap({ - serviceName: 'my_service', + await uploadSourcemap({ + serviceName: 'list-test', serviceVersion: `1.0.${i}`, bundleFilePath: 'bar', sourcemap: { @@ -97,44 +200,44 @@ export default function ApiTest({ getService }: FtrProviderContext) { mappings: '', }, }); - uploadedSourcemapIds.push(sourcemap.id); } + await waitForSourceMapCount(totalCount); }); after(async () => { - await Promise.all(uploadedSourcemapIds.map((id) => deleteSourcemap(id))); + await Promise.all([deleteAllFleetSourceMaps(), deleteAllApmSourceMaps()]); }); describe('pagination', () => { it('can retrieve the first page', async () => { - const firstPageItems = await listSourcemaps({ page: 1, perPage: 5 }); - expect(first(firstPageItems.artifacts)?.identifier).to.eql('my_service-1.0.14'); - expect(last(firstPageItems.artifacts)?.identifier).to.eql('my_service-1.0.10'); - expect(firstPageItems.artifacts.length).to.be(5); - expect(firstPageItems.total).to.be(15); + const res = await listSourcemaps({ page: 1, perPage: 2 }); + expect(first(res.artifacts)?.identifier).to.eql('list-test-1.0.5'); + expect(last(res.artifacts)?.identifier).to.eql('list-test-1.0.4'); + expect(res.artifacts.length).to.be(2); + expect(res.total).to.be(6); }); it('can retrieve the second page', async () => { - const secondPageItems = await listSourcemaps({ page: 2, perPage: 5 }); - expect(first(secondPageItems.artifacts)?.identifier).to.eql('my_service-1.0.9'); - expect(last(secondPageItems.artifacts)?.identifier).to.eql('my_service-1.0.5'); - expect(secondPageItems.artifacts.length).to.be(5); - expect(secondPageItems.total).to.be(15); + const res = await listSourcemaps({ page: 2, perPage: 2 }); + expect(first(res.artifacts)?.identifier).to.eql('list-test-1.0.3'); + expect(last(res.artifacts)?.identifier).to.eql('list-test-1.0.2'); + expect(res.artifacts.length).to.be(2); + expect(res.total).to.be(6); }); it('can retrieve the third page', async () => { - const thirdPageItems = await listSourcemaps({ page: 3, perPage: 5 }); - expect(first(thirdPageItems.artifacts)?.identifier).to.eql('my_service-1.0.4'); - expect(last(thirdPageItems.artifacts)?.identifier).to.eql('my_service-1.0.0'); - expect(thirdPageItems.artifacts.length).to.be(5); - expect(thirdPageItems.total).to.be(15); + const res = await listSourcemaps({ page: 3, perPage: 2 }); + expect(first(res.artifacts)?.identifier).to.eql('list-test-1.0.1'); + expect(last(res.artifacts)?.identifier).to.eql('list-test-1.0.0'); + expect(res.artifacts.length).to.be(2); + expect(res.total).to.be(6); }); }); - it('can list source maps', async () => { + it('can list source maps without specifying pagination options', async () => { const sourcemaps = await listSourcemaps(); - expect(sourcemaps.artifacts.length).to.be(15); - expect(sourcemaps.total).to.be(15); + expect(sourcemaps.artifacts.length).to.be(6); + expect(sourcemaps.total).to.be(6); }); it('returns newest source maps first', async () => { @@ -144,10 +247,14 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); }); + function getRandomString() { + return Math.random().toString(36).substring(7); + } + describe('delete source maps', () => { - it('can delete a source map', async () => { + before(async () => { const sourcemap = await uploadSourcemap({ - serviceName: 'my_service', + serviceName: `delete-test_${getRandomString()}`, serviceVersion: '1.0.0', bundleFilePath: 'bar', sourcemap: { @@ -157,11 +264,63 @@ export default function ApiTest({ getService }: FtrProviderContext) { }, }); + // wait for the sourcemap to be indexed in .apm-source-map index + await waitForSourceMapCount(1); + + // delete sourcemap await deleteSourcemap(sourcemap.id); + + // wait for the sourcemap to be deleted from .apm-source-map index + await waitForSourceMapCount(0); + }); + + it('can delete a fleet source map artifact', async () => { const { artifacts, total } = await listSourcemaps(); expect(artifacts).to.be.empty(); expect(total).to.be(0); }); + + it('can delete an apm source map', async () => { + // check that the sourcemap is deleted from .apm-source-map index + const res = await esClient.search({ index: '.apm-source-map' }); + // @ts-expect-error + expect(res.hits.total.value).to.be(0); + }); + }); + + describe('source map migration from fleet artifacts to `.apm-source-map`', () => { + const totalCount = 100; + + before(async () => { + await Promise.all( + times(totalCount).map(async (i) => { + await uploadSourcemap({ + serviceName: `migration-test`, + serviceVersion: `1.0.${i}`, + bundleFilePath: 'bar', + sourcemap: { + version: 123, + sources: [''], + mappings: '', + }, + }); + }) + ); + + // wait for sourcemaps to be indexed in .apm-source-map index + await waitForSourceMapCount(totalCount); + }); + + it('it will migrate fleet artifacts to `.apm-source-map`', async () => { + await deleteAllApmSourceMaps(); + + // wait for source maps to be deleted before running migration + await waitForSourceMapCount(0); + + await runSourceMapMigration(); + + expect(await waitForSourceMapCount(totalCount)).to.be(totalCount); + }); }); }); } diff --git a/x-pack/test/functional/apps/api_keys/home_page.ts b/x-pack/test/functional/apps/api_keys/home_page.ts index 4813115bf9072..c984f58dc6cc1 100644 --- a/x-pack/test/functional/apps/api_keys/home_page.ts +++ b/x-pack/test/functional/apps/api_keys/home_page.ts @@ -37,7 +37,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }, }; - describe('Home page', function () { + // Failing: See https://github.com/elastic/kibana/issues/141868 + describe.skip('Home page', function () { before(async () => { await clearAllApiKeys(es, log); await security.testUser.setRoles(['kibana_admin']); diff --git a/x-pack/test/functional/apps/cross_cluster_replication/feature_controls/ccr_security.ts b/x-pack/test/functional/apps/cross_cluster_replication/feature_controls/ccr_security.ts index c8ecc01e60857..fa1faf1bdb3af 100644 --- a/x-pack/test/functional/apps/cross_cluster_replication/feature_controls/ccr_security.ts +++ b/x-pack/test/functional/apps/cross_cluster_replication/feature_controls/ccr_security.ts @@ -71,6 +71,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { 'transform', 'cross_cluster_replication', 'remote_clusters', + 'migrate_data', ], }); }); diff --git a/x-pack/test/functional/apps/remote_clusters/feature_controls/remote_clusters_security.ts b/x-pack/test/functional/apps/remote_clusters/feature_controls/remote_clusters_security.ts index 4e5f66e0c5bb6..30cfe581039a1 100644 --- a/x-pack/test/functional/apps/remote_clusters/feature_controls/remote_clusters_security.ts +++ b/x-pack/test/functional/apps/remote_clusters/feature_controls/remote_clusters_security.ts @@ -70,6 +70,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { 'rollup_jobs', 'transform', 'remote_clusters', + 'migrate_data', ], }); }); diff --git a/x-pack/test/functional/es_archives/ml/module_security_auditbeat/data.json.gz b/x-pack/test/functional/es_archives/ml/module_security_auditbeat/data.json.gz new file mode 100644 index 0000000000000..27b07f53421d9 Binary files /dev/null and b/x-pack/test/functional/es_archives/ml/module_security_auditbeat/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/ml/module_siem_auditbeat/mappings.json b/x-pack/test/functional/es_archives/ml/module_security_auditbeat/mappings.json similarity index 99% rename from x-pack/test/functional/es_archives/ml/module_siem_auditbeat/mappings.json rename to x-pack/test/functional/es_archives/ml/module_security_auditbeat/mappings.json index 818036fa32ebf..45a420c6a7523 100644 --- a/x-pack/test/functional/es_archives/ml/module_siem_auditbeat/mappings.json +++ b/x-pack/test/functional/es_archives/ml/module_security_auditbeat/mappings.json @@ -3,7 +3,7 @@ "value": { "aliases": { }, - "index": "ft_module_siem_auditbeat", + "index": "ft_module_security_auditbeat", "mappings": { "properties": { "@timestamp": { @@ -1660,4 +1660,4 @@ } } } -} \ No newline at end of file +} diff --git a/x-pack/test/functional/es_archives/ml/module_security_cloudtrail/data.json.gz b/x-pack/test/functional/es_archives/ml/module_security_cloudtrail/data.json.gz new file mode 100644 index 0000000000000..bff03fc8d6813 Binary files /dev/null and b/x-pack/test/functional/es_archives/ml/module_security_cloudtrail/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/ml/module_siem_cloudtrail/mappings.json b/x-pack/test/functional/es_archives/ml/module_security_cloudtrail/mappings.json similarity index 99% rename from x-pack/test/functional/es_archives/ml/module_siem_cloudtrail/mappings.json rename to x-pack/test/functional/es_archives/ml/module_security_cloudtrail/mappings.json index 1df167c60dd48..9080e4a62fc4b 100644 --- a/x-pack/test/functional/es_archives/ml/module_siem_cloudtrail/mappings.json +++ b/x-pack/test/functional/es_archives/ml/module_security_cloudtrail/mappings.json @@ -3,7 +3,7 @@ "value": { "aliases": { }, - "index": "ft_module_siem_cloudtrail", + "index": "ft_module_security_cloudtrail", "mappings": { "_meta": { "beat": "filebeat", @@ -12947,4 +12947,4 @@ } } } -} \ No newline at end of file +} diff --git a/x-pack/test/functional/es_archives/ml/module_security_packetbeat/data.json.gz b/x-pack/test/functional/es_archives/ml/module_security_packetbeat/data.json.gz new file mode 100644 index 0000000000000..acea6b2d2a23f Binary files /dev/null and b/x-pack/test/functional/es_archives/ml/module_security_packetbeat/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/ml/module_siem_packetbeat/mappings.json b/x-pack/test/functional/es_archives/ml/module_security_packetbeat/mappings.json similarity index 99% rename from x-pack/test/functional/es_archives/ml/module_siem_packetbeat/mappings.json rename to x-pack/test/functional/es_archives/ml/module_security_packetbeat/mappings.json index 9c0ca8901a0da..690adf90b76d3 100644 --- a/x-pack/test/functional/es_archives/ml/module_siem_packetbeat/mappings.json +++ b/x-pack/test/functional/es_archives/ml/module_security_packetbeat/mappings.json @@ -3,7 +3,7 @@ "value": { "aliases": { }, - "index": "ft_module_siem_packetbeat", + "index": "ft_module_security_packetbeat", "mappings": { "_meta": { "beat": "packetbeat", @@ -4640,4 +4640,4 @@ } } } -} \ No newline at end of file +} diff --git a/x-pack/test/functional/es_archives/ml/module_security_winlogbeat/data.json.gz b/x-pack/test/functional/es_archives/ml/module_security_winlogbeat/data.json.gz new file mode 100644 index 0000000000000..d4957da38fa32 Binary files /dev/null and b/x-pack/test/functional/es_archives/ml/module_security_winlogbeat/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/ml/module_siem_winlogbeat/mappings.json b/x-pack/test/functional/es_archives/ml/module_security_winlogbeat/mappings.json similarity index 99% rename from x-pack/test/functional/es_archives/ml/module_siem_winlogbeat/mappings.json rename to x-pack/test/functional/es_archives/ml/module_security_winlogbeat/mappings.json index 3eeda43fbebbe..9e7c9f89da3a9 100644 --- a/x-pack/test/functional/es_archives/ml/module_siem_winlogbeat/mappings.json +++ b/x-pack/test/functional/es_archives/ml/module_security_winlogbeat/mappings.json @@ -3,7 +3,7 @@ "value": { "aliases": { }, - "index": "ft_module_siem_winlogbeat", + "index": "ft_module_security_winlogbeat", "mappings": { "_meta": { "beat": "winlogbeat", @@ -4219,4 +4219,4 @@ } } } -} \ No newline at end of file +} diff --git a/x-pack/test/functional/es_archives/ml/module_siem_auditbeat/data.json.gz b/x-pack/test/functional/es_archives/ml/module_siem_auditbeat/data.json.gz deleted file mode 100644 index 64f582011db50..0000000000000 Binary files a/x-pack/test/functional/es_archives/ml/module_siem_auditbeat/data.json.gz and /dev/null differ diff --git a/x-pack/test/functional/es_archives/ml/module_siem_cloudtrail/data.json.gz b/x-pack/test/functional/es_archives/ml/module_siem_cloudtrail/data.json.gz deleted file mode 100644 index 9ec312602a5dd..0000000000000 Binary files a/x-pack/test/functional/es_archives/ml/module_siem_cloudtrail/data.json.gz and /dev/null differ diff --git a/x-pack/test/functional/es_archives/ml/module_siem_packetbeat/data.json.gz b/x-pack/test/functional/es_archives/ml/module_siem_packetbeat/data.json.gz deleted file mode 100644 index d8e3af5eeb48d..0000000000000 Binary files a/x-pack/test/functional/es_archives/ml/module_siem_packetbeat/data.json.gz and /dev/null differ diff --git a/x-pack/test/functional/es_archives/ml/module_siem_winlogbeat/data.json.gz b/x-pack/test/functional/es_archives/ml/module_siem_winlogbeat/data.json.gz deleted file mode 100644 index a8ddcd19aad1d..0000000000000 Binary files a/x-pack/test/functional/es_archives/ml/module_siem_winlogbeat/data.json.gz and /dev/null differ diff --git a/x-pack/test/functional/es_archives/rule_registry/alerts/data.json b/x-pack/test/functional/es_archives/rule_registry/alerts/data.json index 65719c78a864e..ce709e126266f 100644 --- a/x-pack/test/functional/es_archives/rule_registry/alerts/data.json +++ b/x-pack/test/functional/es_archives/rule_registry/alerts/data.json @@ -10,6 +10,10 @@ "message": "hello world 1", "kibana.alert.rule.consumer": "apm", "kibana.alert.workflow_status": "open", + "kibana.alert.time_range": { + "gte": "2020-12-16T15:16:18.570Z" + }, + "kibana.alert.status": "active", "kibana.space_ids": ["space1", "space2"] } } @@ -26,7 +30,12 @@ "kibana.alert.rule.rule_type_id": "apm.error_rate", "message": "hello world 1", "kibana.alert.rule.consumer": "apm", - "kibana.alert.workflow_status": "open", + "kibana.alert.workflow_status": "recovered", + "kibana.alert.time_range": { + "gte": "2020-12-16T15:16:18.570Z", + "lte": "2020-12-16T15:16:19.570Z" + }, + "kibana.alert.status": "recovered", "kibana.space_ids": ["space1"] } } @@ -44,6 +53,7 @@ "message": "hello world 1", "kibana.alert.rule.consumer": "apm", "kibana.alert.workflow_status": "open", + "kibana.alert.status": "active", "kibana.space_ids": ["space2"] } } @@ -114,3 +124,47 @@ } } } + +{ + "type": "doc", + "value": { + "index": ".alerts-observability.logs.alerts-default", + "id": "123456789XYZ", + "source": { + "event.kind": "signal", + "@timestamp": "2020-12-16T15:16:18.570Z", + "kibana.alert.rule.rule_type_id": "apm.error_rate", + "message": "hello world 1", + "kibana.alert.rule.consumer": "apm", + "kibana.alert.workflow_status": "open", + "kibana.alert.time_range": { + "gte": "2020-12-16T15:16:18.570Z" + }, + "kibana.alert.status": "active", + "kibana.space_ids": ["space1", "space2"] + } + } +} + +{ + "type": "doc", + "value": { + "index": ".alerts-observability.logs.alerts-default", + "id": "space1alertLogs", + "source": { + "event.kind": "signal", + "@timestamp": "2020-12-16T15:16:18.570Z", + "kibana.alert.rule.rule_type_id": "apm.error_rate", + "message": "hello world 1", + "kibana.alert.rule.consumer": "apm", + "kibana.alert.workflow_status": "recovered", + "kibana.alert.time_range": { + "gte": "2020-12-16T15:16:18.570Z", + "lte": "2020-12-16T15:27:19.570Z" + }, + "kibana.alert.end": "2020-12-16T15:27:19.570Z", + "kibana.alert.status": "recovered", + "kibana.space_ids": ["space1"] + } + } +} diff --git a/x-pack/test/functional/es_archives/rule_registry/alerts/mappings.json b/x-pack/test/functional/es_archives/rule_registry/alerts/mappings.json index f55241f25c90e..16229e93e6255 100644 --- a/x-pack/test/functional/es_archives/rule_registry/alerts/mappings.json +++ b/x-pack/test/functional/es_archives/rule_registry/alerts/mappings.json @@ -16,6 +16,10 @@ "kibana.alert.rule.consumer": { "type": "keyword", "ignore_above": 256 + }, + "kibana.alert.time_range": { + "type": "date_range", + "format": "epoch_millis||strict_date_optional_time" } } } @@ -45,3 +49,38 @@ } } } + +{ + "type": "index", + "value": { + "index": ".alerts-observability.logs.alerts-default", + "mappings": { + "properties": { + "message": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "kibana.alert.rule.consumer": { + "type": "keyword", + "ignore_above": 256 + }, + "kibana.alert.status": { + "type": "keyword", + "ignore_above": 256 + }, + "kibana.alert.time_range": { + "type": "date_range", + "format": "epoch_millis||strict_date_optional_time" + }, + "kibana.alert.end": { + "type": "date" + } + } + } + } +} diff --git a/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts b/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts index 91295ad7ceaf6..4351081703bd7 100644 --- a/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts +++ b/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts @@ -106,6 +106,7 @@ export default function ({ getService }: FtrProviderContext) { 'alerting_health_check', 'alerting_telemetry', 'alerts_invalidate_api_keys', + 'apm-source-map-migration-task', 'apm-telemetry-task', 'cases-telemetry-task', 'cleanup_failed_action_executions', diff --git a/x-pack/test/rule_registry/common/lib/authentication/roles.ts b/x-pack/test/rule_registry/common/lib/authentication/roles.ts index 5a75f5bc4f8da..36fe754d3e50a 100644 --- a/x-pack/test/rule_registry/common/lib/authentication/roles.ts +++ b/x-pack/test/rule_registry/common/lib/authentication/roles.ts @@ -109,6 +109,7 @@ export const observabilityOnlyAll: Role = { { feature: { apm: ['all'], + logs: ['all'], }, spaces: ['space1'], }, @@ -126,6 +127,7 @@ export const observabilityOnlyAllSpace2: Role = { { feature: { apm: ['all'], + logs: ['all'], }, spaces: ['space2'], }, @@ -143,6 +145,7 @@ export const observabilityOnlyRead: Role = { { feature: { apm: ['read'], + logs: ['read'], }, spaces: ['space1'], }, @@ -160,6 +163,7 @@ export const observabilityOnlyReadSpace2: Role = { { feature: { apm: ['read'], + logs: ['read'], }, spaces: ['space2'], }, @@ -214,6 +218,7 @@ export const observabilityOnlyAllSpacesAll: Role = { { feature: { apm: ['all'], + logs: ['all'], }, spaces: ['*'], }, @@ -260,6 +265,7 @@ export const observabilityOnlyAllSpacesAllWithReadESIndices: Role = { { feature: { apm: ['all'], + logs: ['all'], }, spaces: ['default', 'space1'], }, @@ -277,6 +283,7 @@ export const observabilityOnlyReadSpacesAll: Role = { { feature: { apm: ['read'], + logs: ['read'], }, spaces: ['*'], }, diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alert_summary.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alert_summary.ts new file mode 100644 index 0000000000000..b22fc830cb73d --- /dev/null +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alert_summary.ts @@ -0,0 +1,159 @@ +/* + * 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 '../../../common/ftr_provider_context'; +import { getSpaceUrlPrefix } from '../../../common/lib/authentication/spaces'; +import { superUser } from '../../../common/lib/authentication/users'; + +// eslint-disable-next-line import/no-default-export +export default ({ getService }: FtrProviderContext) => { + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const esArchiver = getService('esArchiver'); + + const TEST_URL = '/internal/rac/alerts'; + const SPACE1 = 'space1'; + const ALERT_SUMMARY_URL = `${TEST_URL}/_alert_summary`; + const LOGS_ALERT_ID = '123456789XYZ'; + const LOGS_ALERT_ID2 = 'space1alertLogs'; + + describe('Alerts - GET - _alert_summary', () => { + before(async () => { + await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts'); + }); + + after(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/rule_registry/alerts'); + }); + + it('Alert summary for all LOGS alerts with features', async () => { + const alertSummary = await supertestWithoutAuth + .post(`${getSpaceUrlPrefix(SPACE1)}${ALERT_SUMMARY_URL}`) + .auth(superUser.username, superUser.password) + .set('kbn-xsrf', 'true') + .send({ + gte: '2020-12-16T15:00:00.000Z', + lte: '2020-12-16T16:00:00.000Z', + featureIds: ['logs'], + fixed_interval: '10m', + }) + .expect(200); + + expect(alertSummary.body).to.eql({ + activeAlertCount: 1, + recoveredAlertCount: 1, + activeAlerts: [ + { key_as_string: '1608130800000', key: 1608130800000, doc_count: 0 }, + { key_as_string: '1608131400000', key: 1608131400000, doc_count: 2 }, + { key_as_string: '1608132000000', key: 1608132000000, doc_count: 2 }, + { key_as_string: '1608132600000', key: 1608132600000, doc_count: 1 }, + { key_as_string: '1608133200000', key: 1608133200000, doc_count: 1 }, + { key_as_string: '1608133800000', key: 1608133800000, doc_count: 1 }, + { key_as_string: '1608134400000', key: 1608134400000, doc_count: 1 }, + ], + recoveredAlerts: [ + { key_as_string: '2020-12-16T15:00:00.000Z', key: 1608130800000, doc_count: 0 }, + { key_as_string: '2020-12-16T15:10:00.000Z', key: 1608131400000, doc_count: 0 }, + { key_as_string: '2020-12-16T15:20:00.000Z', key: 1608132000000, doc_count: 1 }, + { key_as_string: '2020-12-16T15:30:00.000Z', key: 1608132600000, doc_count: 0 }, + { key_as_string: '2020-12-16T15:40:00.000Z', key: 1608133200000, doc_count: 0 }, + { key_as_string: '2020-12-16T15:50:00.000Z', key: 1608133800000, doc_count: 0 }, + { key_as_string: '2020-12-16T16:00:00.000Z', key: 1608134400000, doc_count: 0 }, + ], + }); + }); + + it('Alert summary with a filter where the alert is recovered', async () => { + const alertSummary = await supertestWithoutAuth + .post(`${getSpaceUrlPrefix(SPACE1)}${ALERT_SUMMARY_URL}`) + .auth(superUser.username, superUser.password) + .set('kbn-xsrf', 'true') + .send({ + gte: '2020-12-16T15:00:00.000Z', + lte: '2020-12-16T16:00:00.000Z', + filter: [ + { + terms: { + _id: [LOGS_ALERT_ID2], + }, + }, + ], + featureIds: ['logs'], + fixed_interval: '10m', + }) + .expect(200); + + expect(alertSummary.body).to.eql({ + activeAlertCount: 0, + recoveredAlertCount: 1, + activeAlerts: [ + { key_as_string: '1608130800000', key: 1608130800000, doc_count: 0 }, + { key_as_string: '1608131400000', key: 1608131400000, doc_count: 1 }, + { key_as_string: '1608132000000', key: 1608132000000, doc_count: 1 }, + { key_as_string: '1608132600000', key: 1608132600000, doc_count: 0 }, + { key_as_string: '1608133200000', key: 1608133200000, doc_count: 0 }, + { key_as_string: '1608133800000', key: 1608133800000, doc_count: 0 }, + { key_as_string: '1608134400000', key: 1608134400000, doc_count: 0 }, + ], + recoveredAlerts: [ + { key_as_string: '2020-12-16T15:00:00.000Z', key: 1608130800000, doc_count: 0 }, + { key_as_string: '2020-12-16T15:10:00.000Z', key: 1608131400000, doc_count: 0 }, + { key_as_string: '2020-12-16T15:20:00.000Z', key: 1608132000000, doc_count: 1 }, + { key_as_string: '2020-12-16T15:30:00.000Z', key: 1608132600000, doc_count: 0 }, + { key_as_string: '2020-12-16T15:40:00.000Z', key: 1608133200000, doc_count: 0 }, + { key_as_string: '2020-12-16T15:50:00.000Z', key: 1608133800000, doc_count: 0 }, + { key_as_string: '2020-12-16T16:00:00.000Z', key: 1608134400000, doc_count: 0 }, + ], + }); + }); + + it('Alert summary with a filter where the alert is active', async () => { + const alertSummary = await supertestWithoutAuth + .post(`${getSpaceUrlPrefix(SPACE1)}${ALERT_SUMMARY_URL}`) + .auth(superUser.username, superUser.password) + .set('kbn-xsrf', 'true') + .send({ + gte: '2020-12-16T15:00:00.000Z', + lte: '2020-12-16T16:00:00.000Z', + filter: [ + { + terms: { + _id: [LOGS_ALERT_ID], + }, + }, + ], + featureIds: ['logs'], + fixed_interval: '10m', + }) + .expect(200); + + expect(alertSummary.body).to.eql({ + activeAlertCount: 1, + recoveredAlertCount: 0, + activeAlerts: [ + { key_as_string: '1608130800000', key: 1608130800000, doc_count: 0 }, + { key_as_string: '1608131400000', key: 1608131400000, doc_count: 1 }, + { key_as_string: '1608132000000', key: 1608132000000, doc_count: 1 }, + { key_as_string: '1608132600000', key: 1608132600000, doc_count: 1 }, + { key_as_string: '1608133200000', key: 1608133200000, doc_count: 1 }, + { key_as_string: '1608133800000', key: 1608133800000, doc_count: 1 }, + { key_as_string: '1608134400000', key: 1608134400000, doc_count: 1 }, + ], + recoveredAlerts: [ + { key_as_string: '2020-12-16T15:00:00.000Z', key: 1608130800000, doc_count: 0 }, + { key_as_string: '2020-12-16T15:10:00.000Z', key: 1608131400000, doc_count: 0 }, + { key_as_string: '2020-12-16T15:20:00.000Z', key: 1608132000000, doc_count: 0 }, + { key_as_string: '2020-12-16T15:30:00.000Z', key: 1608132600000, doc_count: 0 }, + { key_as_string: '2020-12-16T15:40:00.000Z', key: 1608133200000, doc_count: 0 }, + { key_as_string: '2020-12-16T15:50:00.000Z', key: 1608133800000, doc_count: 0 }, + { key_as_string: '2020-12-16T16:00:00.000Z', key: 1608134400000, doc_count: 0 }, + ], + }); + }); + }); +}; diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alerts_index.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alerts_index.ts index 3d333d91da153..2ac420a8beb6b 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alerts_index.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alerts_index.ts @@ -20,7 +20,6 @@ export default ({ getService }: FtrProviderContext) => { const TEST_URL = '/internal/rac/alerts'; const ALERTS_INDEX_URL = `${TEST_URL}/index`; const SPACE1 = 'space1'; - const INDEX_ALIAS = '*'; const APM_ALERT_INDEX = '.alerts-observability.apm.alerts'; const SECURITY_SOLUTION_ALERT_INDEX = '.alerts-security.alerts'; @@ -54,12 +53,12 @@ export default ({ getService }: FtrProviderContext) => { describe('Users:', () => { it(`${obsOnlySpacesAll.username} should be able to access the APM alert in ${SPACE1}`, async () => { const indexNames = await getAPMIndexName(obsOnlySpacesAll, SPACE1); - expect(indexNames.includes(`${APM_ALERT_INDEX}-${INDEX_ALIAS}`)).to.eql(true); // assert this here so we can use constants in the dynamically-defined test cases below + expect(indexNames.includes(`${APM_ALERT_INDEX}-*`)).to.eql(true); // assert this here so we can use constants in the dynamically-defined test cases below }); it(`${superUser.username} should be able to access the APM alert in ${SPACE1}`, async () => { const indexNames = await getAPMIndexName(superUser, SPACE1); - expect(indexNames.includes(`${APM_ALERT_INDEX}-${INDEX_ALIAS}`)).to.eql(true); // assert this here so we can use constants in the dynamically-defined test cases below + expect(indexNames.includes(`${APM_ALERT_INDEX}-*`)).to.eql(true); // assert this here so we can use constants in the dynamically-defined test cases below }); it(`${secOnlyRead.username} should NOT be able to access the APM alert in ${SPACE1}`, async () => { diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_browser_fields_by_feature_id.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_browser_fields_by_feature_id.ts index 6acbc14a47352..50504efd75ac0 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_browser_fields_by_feature_id.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_browser_fields_by_feature_id.ts @@ -46,7 +46,7 @@ export default ({ getService }: FtrProviderContext) => { 'logs', 'uptime', ]); - expect(Object.keys(browserFields)).to.eql(['base']); + expect(Object.keys(browserFields)).to.eql(['base', 'event', 'kibana', 'message']); }); it(`${superUser.username} should be able to get browser fields for o11y featureIds`, async () => { @@ -56,7 +56,7 @@ export default ({ getService }: FtrProviderContext) => { 'logs', 'uptime', ]); - expect(Object.keys(browserFields)).to.eql(['base']); + expect(Object.keys(browserFields)).to.eql(['base', 'event', 'kibana', 'message']); }); it(`${superUser.username} should NOT be able to get browser fields for siem featureId`, async () => { diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/index.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/index.ts index e1046b2dca6d7..8d71a4ce1f963 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/index.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/index.ts @@ -30,5 +30,6 @@ export default ({ loadTestFile, getService }: FtrProviderContext): void => { loadTestFile(require.resolve('./find_alerts')); loadTestFile(require.resolve('./search_strategy')); loadTestFile(require.resolve('./get_browser_fields_by_feature_id')); + loadTestFile(require.resolve('./get_alert_summary')); }); }; diff --git a/x-pack/test/search_sessions_integration/tests/apps/discover/async_search.ts b/x-pack/test/search_sessions_integration/tests/apps/discover/async_search.ts index cd13f71cf1bb7..021aab2212165 100644 --- a/x-pack/test/search_sessions_integration/tests/apps/discover/async_search.ts +++ b/x-pack/test/search_sessions_integration/tests/apps/discover/async_search.ts @@ -34,6 +34,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await kibanaServer.importExport.load( 'x-pack/test/functional/fixtures/kbn_archiver/discover/default' ); + await kibanaServer.uiSettings.replace({ + 'discover:enableSql': true, + }); await PageObjects.common.navigateToApp('discover'); await PageObjects.timePicker.setDefaultAbsoluteRange(); await PageObjects.header.waitUntilLoadingHasFinished(); @@ -128,6 +131,19 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { expect(searchesCountBeforeRestore).to.be(searchesCountAfterRestore); // no new searches started during restore }); + + it('should should clean the search session when navigating to SQL mode, and reinitialize when navigating back', async () => { + await PageObjects.common.navigateToApp('discover'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + await PageObjects.header.waitUntilLoadingHasFinished(); + expect(await searchSessions.exists()).to.be(true); + await PageObjects.discover.selectTextBaseLang('SQL'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await searchSessions.missingOrFail(); + await browser.goBack(); + await PageObjects.header.waitUntilLoadingHasFinished(); + expect(await searchSessions.exists()).to.be(true); + }); }); async function getSearchSessionId(): Promise { diff --git a/x-pack/test/security_api_integration/tests/audit/audit_log.ts b/x-pack/test/security_api_integration/tests/audit/audit_log.ts index 553efa63431f1..df4dd45be0e10 100644 --- a/x-pack/test/security_api_integration/tests/audit/audit_log.ts +++ b/x-pack/test/security_api_integration/tests/audit/audit_log.ts @@ -55,6 +55,7 @@ export default function ({ getService }: FtrProviderContext) { await supertest .post('/internal/security/login') .set('kbn-xsrf', 'xxx') + .set('X-Forwarded-For', '1.1.1.1, 2.2.2.2') .send({ providerType: 'basic', providerName: 'basic', @@ -71,12 +72,15 @@ export default function ({ getService }: FtrProviderContext) { expect(loginEvent.event.outcome).to.be('success'); expect(loginEvent.trace.id).to.be.ok(); expect(loginEvent.user.name).to.be(username); + expect(loginEvent.client.ip).to.be.ok(); + expect(loginEvent.http.request.headers['x-forwarded-for']).to.be('1.1.1.1, 2.2.2.2'); }); it('logs audit events when failing to log in', async () => { await supertest .post('/internal/security/login') .set('kbn-xsrf', 'xxx') + .set('X-Forwarded-For', '1.1.1.1, 2.2.2.2') .send({ providerType: 'basic', providerName: 'basic', @@ -93,6 +97,8 @@ export default function ({ getService }: FtrProviderContext) { expect(loginEvent.event.outcome).to.be('failure'); expect(loginEvent.trace.id).to.be.ok(); expect(loginEvent.user).not.to.be.ok(); + expect(loginEvent.client.ip).to.be.ok(); + expect(loginEvent.http.request.headers['x-forwarded-for']).to.be('1.1.1.1, 2.2.2.2'); }); }); } diff --git a/x-pack/test/security_solution_endpoint_api_int/apis/endpoint_authz.ts b/x-pack/test/security_solution_endpoint_api_int/apis/endpoint_authz.ts index 7e1b8c5d9e1aa..b9da2c5f67601 100644 --- a/x-pack/test/security_solution_endpoint_api_int/apis/endpoint_authz.ts +++ b/x-pack/test/security_solution_endpoint_api_int/apis/endpoint_authz.ts @@ -36,8 +36,7 @@ export default function ({ getService }: FtrProviderContext) { body: Record | undefined; } - // Failing: See https://github.com/elastic/kibana/issues/147640 - describe.skip('When attempting to call an endpoint api', () => { + describe('When attempting to call an endpoint api', () => { let indexedData: IndexedHostsAndAlertsResponse; let actionId = ''; let agentId = ''; diff --git a/x-pack/test/ui_capabilities/security_and_spaces/tests/catalogue.ts b/x-pack/test/ui_capabilities/security_and_spaces/tests/catalogue.ts index 1934a22da6ddb..2422bd8e115c6 100644 --- a/x-pack/test/ui_capabilities/security_and_spaces/tests/catalogue.ts +++ b/x-pack/test/ui_capabilities/security_and_spaces/tests/catalogue.ts @@ -18,6 +18,7 @@ export default function catalogueTests({ getService }: FtrProviderContext) { const esFeatureExceptions = [ 'security', 'index_lifecycle_management', + 'migrate_data', 'snapshot_restore', 'rollup_jobs', 'reporting', diff --git a/x-pack/test/ui_capabilities/spaces_only/tests/catalogue.ts b/x-pack/test/ui_capabilities/spaces_only/tests/catalogue.ts index 60f13694a6326..222b2c78c69e7 100644 --- a/x-pack/test/ui_capabilities/spaces_only/tests/catalogue.ts +++ b/x-pack/test/ui_capabilities/spaces_only/tests/catalogue.ts @@ -18,6 +18,7 @@ export default function catalogueTests({ getService }: FtrProviderContext) { const esFeatureExceptions = [ 'security', 'index_lifecycle_management', + 'migrate_data', 'snapshot_restore', 'rollup_jobs', 'reporting', diff --git a/yarn.lock b/yarn.lock index c7df66852875c..1f0aa7001063c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2817,7 +2817,7 @@ version "0.0.0" uid "" -"@kbn/content-management-inspector@link:bazel-bin/packages/content-management/inspector": +"@kbn/content-management-content-editor@link:bazel-bin/packages/content-management/content_editor": version "0.0.0" uid ""