From 9575ebbcafbb059f476622c2129e7fe93f5c88c4 Mon Sep 17 00:00:00 2001
From: Faisal Kanout
Date: Thu, 27 Jan 2022 14:09:40 +0300
Subject: [PATCH 01/45] 121273 [RAC][APM] review readability alert reason msg
(#123018)
* Update Error count reason msg
* Update anomaly reason message
* Add interval and update reason msg for Trasn Error and Latency
* Add threshold to Latency duration anomaly
* Update errorCount reason msg
* Update interval format
* Update the test msgs
* Remove unused import
* Update i18n msgs
* Add missing points in the text
* Update test msg
* Code review fixes
* Remove > sign from serverity alert
* Remove the threashold value from the reason message for Anomaly alert
* Remove moment and use O11Y shared duration format function
* Remove empty spaces
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
---
x-pack/plugins/apm/common/alert_types.ts | 55 +++++++++++++++++--
.../alerting/register_apm_alerts.ts | 41 +++-----------
.../alerts/register_error_count_alert_type.ts | 2 +
...egister_transaction_duration_alert_type.ts | 3 +
...transaction_duration_anomaly_alert_type.ts | 2 +
...ister_transaction_error_rate_alert_type.ts | 2 +
.../translations/translations/ja-JP.json | 4 --
.../translations/translations/zh-CN.json | 4 --
.../trial/__snapshots__/create_rule.snap | 4 +-
9 files changed, 68 insertions(+), 49 deletions(-)
diff --git a/x-pack/plugins/apm/common/alert_types.ts b/x-pack/plugins/apm/common/alert_types.ts
index 68ca22c41ec92..04288fccf0a05 100644
--- a/x-pack/plugins/apm/common/alert_types.ts
+++ b/x-pack/plugins/apm/common/alert_types.ts
@@ -7,9 +7,14 @@
import { i18n } from '@kbn/i18n';
import type { ValuesType } from 'utility-types';
-import type { AsDuration, AsPercent } from '../../observability/common';
+import type {
+ AsDuration,
+ AsPercent,
+ TimeUnitChar,
+} from '../../observability/common';
import type { ActionGroup } from '../../alerting/common';
import { ANOMALY_SEVERITY, ANOMALY_THRESHOLD } from './ml_constants';
+import { formatDurationFromTimeUnitChar } from '../../observability/common';
export const APM_SERVER_FEATURE_ID = 'apm';
@@ -33,17 +38,25 @@ export function formatErrorCountReason({
threshold,
measured,
serviceName,
+ windowSize,
+ windowUnit,
}: {
threshold: number;
measured: number;
serviceName: string;
+ windowSize: number;
+ windowUnit: string;
}) {
return i18n.translate('xpack.apm.alertTypes.errorCount.reason', {
- defaultMessage: `Error count is greater than {threshold} (current value is {measured}) for {serviceName}`,
+ defaultMessage: `Error count is {measured} in the last {interval} for {serviceName}. Alert when > {threshold}.`,
values: {
threshold,
measured,
serviceName,
+ interval: formatDurationFromTimeUnitChar(
+ windowSize,
+ windowUnit as TimeUnitChar
+ ),
},
});
}
@@ -53,18 +66,34 @@ export function formatTransactionDurationReason({
measured,
serviceName,
asDuration,
+ aggregationType,
+ windowSize,
+ windowUnit,
}: {
threshold: number;
measured: number;
serviceName: string;
asDuration: AsDuration;
+ aggregationType: string;
+ windowSize: number;
+ windowUnit: string;
}) {
+ let aggregationTypeFormatted =
+ aggregationType.charAt(0).toUpperCase() + aggregationType.slice(1);
+ if (aggregationTypeFormatted === 'Avg')
+ aggregationTypeFormatted = aggregationTypeFormatted + '.';
+
return i18n.translate('xpack.apm.alertTypes.transactionDuration.reason', {
- defaultMessage: `Latency is above {threshold} (current value is {measured}) for {serviceName}`,
+ defaultMessage: `{aggregationType} latency is {measured} in the last {interval} for {serviceName}. Alert when > {threshold}.`,
values: {
threshold: asDuration(threshold),
measured: asDuration(measured),
serviceName,
+ aggregationType: aggregationTypeFormatted,
+ interval: formatDurationFromTimeUnitChar(
+ windowSize,
+ windowUnit as TimeUnitChar
+ ),
},
});
}
@@ -74,18 +103,26 @@ export function formatTransactionErrorRateReason({
measured,
serviceName,
asPercent,
+ windowSize,
+ windowUnit,
}: {
threshold: number;
measured: number;
serviceName: string;
asPercent: AsPercent;
+ windowSize: number;
+ windowUnit: string;
}) {
return i18n.translate('xpack.apm.alertTypes.transactionErrorRate.reason', {
- defaultMessage: `Failed transactions rate is greater than {threshold} (current value is {measured}) for {serviceName}`,
+ defaultMessage: `Failed transactions is {measured} in the last {interval} for {serviceName}. Alert when > {threshold}.`,
values: {
threshold: asPercent(threshold, 100),
measured: asPercent(measured, 100),
serviceName,
+ interval: formatDurationFromTimeUnitChar(
+ windowSize,
+ windowUnit as TimeUnitChar
+ ),
},
});
}
@@ -94,19 +131,27 @@ export function formatTransactionDurationAnomalyReason({
serviceName,
severityLevel,
measured,
+ windowSize,
+ windowUnit,
}: {
serviceName: string;
severityLevel: string;
measured: number;
+ windowSize: number;
+ windowUnit: string;
}) {
return i18n.translate(
'xpack.apm.alertTypes.transactionDurationAnomaly.reason',
{
- defaultMessage: `{severityLevel} anomaly detected for {serviceName} (score was {measured})`,
+ defaultMessage: `{severityLevel} anomaly with a score of {measured} was detected in the last {interval} for {serviceName}.`,
values: {
serviceName,
severityLevel,
measured,
+ interval: formatDurationFromTimeUnitChar(
+ windowSize,
+ windowUnit as TimeUnitChar
+ ),
},
}
);
diff --git a/x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts b/x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts
index db50a68aa0018..3be124573728b 100644
--- a/x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts
+++ b/x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts
@@ -8,20 +8,10 @@
import { i18n } from '@kbn/i18n';
import { lazy } from 'react';
import { stringify } from 'querystring';
-import {
- ALERT_EVALUATION_THRESHOLD,
- ALERT_EVALUATION_VALUE,
- ALERT_SEVERITY,
-} from '@kbn/rule-data-utils';
+import { ALERT_REASON } from '@kbn/rule-data-utils';
import type { ObservabilityRuleTypeRegistry } from '../../../../observability/public';
import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values';
-import {
- AlertType,
- formatErrorCountReason,
- formatTransactionDurationAnomalyReason,
- formatTransactionDurationReason,
- formatTransactionErrorRateReason,
-} from '../../../common/alert_types';
+import { AlertType } from '../../../common/alert_types';
// copied from elasticsearch_fieldnames.ts to limit page load bundle size
const SERVICE_ENVIRONMENT = 'service.environment';
@@ -49,11 +39,7 @@ export function registerApmAlerts(
}),
format: ({ fields }) => {
return {
- reason: formatErrorCountReason({
- threshold: fields[ALERT_EVALUATION_THRESHOLD]!,
- measured: fields[ALERT_EVALUATION_VALUE]!,
- serviceName: String(fields[SERVICE_NAME][0]),
- }),
+ reason: fields[ALERT_REASON]!,
link: format({
pathname: `/app/apm/services/${String(
fields[SERVICE_NAME][0]
@@ -98,12 +84,8 @@ export function registerApmAlerts(
}
),
format: ({ fields, formatters: { asDuration } }) => ({
- reason: formatTransactionDurationReason({
- threshold: fields[ALERT_EVALUATION_THRESHOLD]!,
- measured: fields[ALERT_EVALUATION_VALUE]!,
- serviceName: String(fields[SERVICE_NAME][0]),
- asDuration,
- }),
+ reason: fields[ALERT_REASON]!,
+
link: format({
pathname: `/app/apm/services/${fields[SERVICE_NAME][0]!}`,
query: {
@@ -149,12 +131,7 @@ export function registerApmAlerts(
}
),
format: ({ fields, formatters: { asPercent } }) => ({
- reason: formatTransactionErrorRateReason({
- threshold: fields[ALERT_EVALUATION_THRESHOLD]!,
- measured: fields[ALERT_EVALUATION_VALUE]!,
- serviceName: String(fields[SERVICE_NAME][0]),
- asPercent,
- }),
+ reason: fields[ALERT_REASON]!,
link: format({
pathname: `/app/apm/services/${String(fields[SERVICE_NAME][0]!)}`,
query: {
@@ -199,11 +176,7 @@ export function registerApmAlerts(
}
),
format: ({ fields }) => ({
- reason: formatTransactionDurationAnomalyReason({
- serviceName: String(fields[SERVICE_NAME][0]),
- severityLevel: String(fields[ALERT_SEVERITY]),
- measured: Number(fields[ALERT_EVALUATION_VALUE]),
- }),
+ reason: fields[ALERT_REASON]!,
link: format({
pathname: `/app/apm/services/${String(fields[SERVICE_NAME][0])}`,
query: {
diff --git a/x-pack/plugins/apm/server/routes/alerts/register_error_count_alert_type.ts b/x-pack/plugins/apm/server/routes/alerts/register_error_count_alert_type.ts
index 9e0c58b70b6ea..b75f687d0dcaf 100644
--- a/x-pack/plugins/apm/server/routes/alerts/register_error_count_alert_type.ts
+++ b/x-pack/plugins/apm/server/routes/alerts/register_error_count_alert_type.ts
@@ -155,6 +155,8 @@ export function registerErrorCountAlertType({
serviceName,
threshold: ruleParams.threshold,
measured: errorCount,
+ windowSize: ruleParams.windowSize,
+ windowUnit: ruleParams.windowUnit,
}),
},
})
diff --git a/x-pack/plugins/apm/server/routes/alerts/register_transaction_duration_alert_type.ts b/x-pack/plugins/apm/server/routes/alerts/register_transaction_duration_alert_type.ts
index eee0a3888e1b7..0c5546f3549f5 100644
--- a/x-pack/plugins/apm/server/routes/alerts/register_transaction_duration_alert_type.ts
+++ b/x-pack/plugins/apm/server/routes/alerts/register_transaction_duration_alert_type.ts
@@ -196,6 +196,9 @@ export function registerTransactionDurationAlertType({
serviceName: ruleParams.serviceName,
threshold: thresholdMicroseconds,
asDuration,
+ aggregationType: String(ruleParams.aggregationType),
+ windowSize: ruleParams.windowSize,
+ windowUnit: ruleParams.windowUnit,
}),
},
})
diff --git a/x-pack/plugins/apm/server/routes/alerts/register_transaction_duration_anomaly_alert_type.ts b/x-pack/plugins/apm/server/routes/alerts/register_transaction_duration_anomaly_alert_type.ts
index 00261e2efffd5..d95432458d068 100644
--- a/x-pack/plugins/apm/server/routes/alerts/register_transaction_duration_anomaly_alert_type.ts
+++ b/x-pack/plugins/apm/server/routes/alerts/register_transaction_duration_anomaly_alert_type.ts
@@ -233,6 +233,8 @@ export function registerTransactionDurationAnomalyAlertType({
measured: score,
serviceName,
severityLevel,
+ windowSize: params.windowSize,
+ windowUnit: params.windowUnit,
}),
},
})
diff --git a/x-pack/plugins/apm/server/routes/alerts/register_transaction_error_rate_alert_type.ts b/x-pack/plugins/apm/server/routes/alerts/register_transaction_error_rate_alert_type.ts
index 2855ac60e571c..c48baf0457335 100644
--- a/x-pack/plugins/apm/server/routes/alerts/register_transaction_error_rate_alert_type.ts
+++ b/x-pack/plugins/apm/server/routes/alerts/register_transaction_error_rate_alert_type.ts
@@ -221,6 +221,8 @@ export function registerTransactionErrorRateAlertType({
measured: errorRate,
asPercent,
serviceName,
+ windowSize: ruleParams.windowSize,
+ windowUnit: ruleParams.windowUnit,
}),
},
})
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index eab63af4637ed..33d693d3598b2 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -6382,16 +6382,12 @@
"xpack.apm.alerts.anomalySeverity.warningLabel": "警告",
"xpack.apm.alertTypes.errorCount.defaultActionMessage": "次の条件のため、\\{\\{alertName\\}\\}アラートが実行されています。\n\n- サービス名:\\{\\{context.serviceName\\}\\}\n- 環境:\\{\\{context.environment\\}\\}\n- しきい値\\{\\{context.threshold\\}\\}エラー\n- トリガーされた値:過去\\{\\{context.interval\\}\\}に\\{\\{context.triggerValue\\}\\}件のエラー",
"xpack.apm.alertTypes.errorCount.description": "サービスのエラー数が定義されたしきい値を超過したときにアラートを発行します。",
- "xpack.apm.alertTypes.errorCount.reason": "エラー数が{serviceName}の{threshold}を超えています(現在の値は{measured})",
"xpack.apm.alertTypes.transactionDuration.defaultActionMessage": "次の条件のため、\\{\\{alertName\\}\\}アラートが実行されています。\n\n- サービス名:\\{\\{context.serviceName\\}\\}\n- タイプ:\\{\\{context.transactionType\\}\\}\n- 環境:\\{\\{context.environment\\}\\}\n- レイテンシしきい値:\\{\\{context.threshold\\}\\}ミリ秒\n- 観察されたレイテンシ:直前の\\{\\{context.interval\\}\\}に\\{\\{context.triggerValue\\}\\}",
"xpack.apm.alertTypes.transactionDuration.description": "サービスの特定のトランザクションタイプのレイテンシが定義されたしきい値を超えたときにアラートを発行します。",
- "xpack.apm.alertTypes.transactionDuration.reason": "レイテンシが{serviceName}の{threshold}を超えています(現在の値は{measured})",
"xpack.apm.alertTypes.transactionDurationAnomaly.defaultActionMessage": "次の条件のため、\\{\\{alertName\\}\\}アラートが実行されています。\n\n- サービス名:\\{\\{context.serviceName\\}\\}\n- タイプ:\\{\\{context.transactionType\\}\\}\n- 環境:\\{\\{context.environment\\}\\}\n- 重要度しきい値:\\{\\{context.threshold\\}\\}%\n- 重要度値:\\{\\{context.triggerValue\\}\\}\n",
"xpack.apm.alertTypes.transactionDurationAnomaly.description": "サービスのレイテンシが異常であるときにアラートを表示します。",
- "xpack.apm.alertTypes.transactionDurationAnomaly.reason": "{serviceName}の{severityLevel}異常が検知されました(スコアは{measured})",
"xpack.apm.alertTypes.transactionErrorRate.defaultActionMessage": "次の条件のため、\\{\\{alertName\\}\\}アラートが実行されています。\n\n- サービス名:\\{\\{context.serviceName\\}\\}\n- タイプ:\\{\\{context.transactionType\\}\\}\n- 環境:\\{\\{context.environment\\}\\}\n- しきい値:\\{\\{context.threshold\\}\\}%\n- トリガーされた値:過去\\{\\{context.interval\\}\\}にエラーの\\{\\{context.triggerValue\\}\\}%",
"xpack.apm.alertTypes.transactionErrorRate.description": "サービスのトランザクションエラー率が定義されたしきい値を超過したときにアラートを発行します。",
- "xpack.apm.alertTypes.transactionErrorRate.reason": "トランザクションエラー率が{serviceName}の{threshold}を超えています(現在の値は{measured})",
"xpack.apm.analyzeDataButton.label": "データの探索",
"xpack.apm.analyzeDataButton.tooltip": "データの探索では、任意のディメンションの結果データを選択してフィルタリングし、パフォーマンスの問題の原因または影響を調査することができます。",
"xpack.apm.analyzeDataButtonLabel": "データの探索",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index e5b29b15c25f7..416a2187fac95 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -6434,16 +6434,12 @@
"xpack.apm.alerts.anomalySeverity.warningLabel": "警告",
"xpack.apm.alertTypes.errorCount.defaultActionMessage": "由于以下条件 \\{\\{alertName\\}\\} 告警触发:\n\n- 服务名称:\\{\\{context.serviceName\\}\\}\n- 环境:\\{\\{context.environment\\}\\}\n- 阈值:\\{\\{context.threshold\\}\\} 个错误\n- 已触发的值:在过去 \\{\\{context.interval\\}\\}有 \\{\\{context.triggerValue\\}\\} 个错误",
"xpack.apm.alertTypes.errorCount.description": "当服务中的错误数量超过定义的阈值时告警。",
- "xpack.apm.alertTypes.errorCount.reason": "{serviceName} 的错误计数大于 {threshold}(当前值为 {measured})",
"xpack.apm.alertTypes.transactionDuration.defaultActionMessage": "由于以下条件 \\{\\{alertName\\}\\} 告警触发:\n\n- 服务名称:\\{\\{context.serviceName\\}\\}\n- 类型:\\{\\{context.transactionType\\}\\}\n- 环境:\\{\\{context.environment\\}\\}\n- 延迟阈值:\\{\\{context.threshold\\}\\}ms\n- 观察的延迟:在过去 \\{\\{context.interval\\}\\}为 \\{\\{context.triggerValue\\}\\}",
"xpack.apm.alertTypes.transactionDuration.description": "当服务中特定事务类型的延迟超过定义的阈值时告警。",
- "xpack.apm.alertTypes.transactionDuration.reason": "{serviceName} 的延迟高于 {threshold}(当前值为 {measured})",
"xpack.apm.alertTypes.transactionDurationAnomaly.defaultActionMessage": "由于以下条件 \\{\\{alertName\\}\\} 告警触发:\n\n- 服务名称:\\{\\{context.serviceName\\}\\}\n- 类型:\\{\\{context.transactionType\\}\\}\n- 环境:\\{\\{context.environment\\}\\}\n- 严重性阈值:\\{\\{context.threshold\\}\\}\n- 严重性值:\\{\\{context.triggerValue\\}\\}\n",
"xpack.apm.alertTypes.transactionDurationAnomaly.description": "服务的延迟异常时告警。",
- "xpack.apm.alertTypes.transactionDurationAnomaly.reason": "{serviceName} 检查到 {severityLevel} 异常(分数为 {measured})",
"xpack.apm.alertTypes.transactionErrorRate.defaultActionMessage": "由于以下条件 \\{\\{alertName\\}\\} 告警触发:\n\n- 服务名称:\\{\\{context.serviceName\\}\\}\n- 类型:\\{\\{context.transactionType\\}\\}\n- 环境:\\{\\{context.environment\\}\\}\n- 阈值:\\{\\{context.threshold\\}\\}%\n- 已触发的值:在过去 \\{\\{context.interval\\}\\}有 \\{\\{context.triggerValue\\}\\}% 的错误",
"xpack.apm.alertTypes.transactionErrorRate.description": "当服务中的事务错误率超过定义的阈值时告警。",
- "xpack.apm.alertTypes.transactionErrorRate.reason": "{serviceName} 的失败事务率大于 {threshold}(当前值为 {measured})",
"xpack.apm.analyzeDataButton.label": "浏览数据",
"xpack.apm.analyzeDataButton.tooltip": "“浏览数据”允许您选择和筛选任意维度中的结果数据以及查找性能问题的原因或影响",
"xpack.apm.analyzeDataButtonLabel": "浏览数据",
diff --git a/x-pack/test/rule_registry/spaces_only/tests/trial/__snapshots__/create_rule.snap b/x-pack/test/rule_registry/spaces_only/tests/trial/__snapshots__/create_rule.snap
index 7e74063480e90..a080cbf7247a6 100644
--- a/x-pack/test/rule_registry/spaces_only/tests/trial/__snapshots__/create_rule.snap
+++ b/x-pack/test/rule_registry/spaces_only/tests/trial/__snapshots__/create_rule.snap
@@ -21,7 +21,7 @@ Object {
"apm.transaction_error_rate_opbeans-go_request_ENVIRONMENT_NOT_DEFINED",
],
"kibana.alert.reason": Array [
- "Failed transactions rate is greater than 30% (current value is 50%) for opbeans-go",
+ "Failed transactions is 50% in the last 5 mins for opbeans-go. Alert when > 30%.",
],
"kibana.alert.rule.category": Array [
"Failed transaction rate threshold",
@@ -85,7 +85,7 @@ Object {
"apm.transaction_error_rate_opbeans-go_request_ENVIRONMENT_NOT_DEFINED",
],
"kibana.alert.reason": Array [
- "Failed transactions rate is greater than 30% (current value is 50%) for opbeans-go",
+ "Failed transactions is 50% in the last 5 mins for opbeans-go. Alert when > 30%.",
],
"kibana.alert.rule.category": Array [
"Failed transaction rate threshold",
From 71e9c609fc1fa32552b7b41c059d3fe8c7d83e90 Mon Sep 17 00:00:00 2001
From: Nick Partridge
Date: Thu, 27 Jan 2022 05:15:33 -0600
Subject: [PATCH 02/45] Upgrade elastic charts v43.1.1 (#121593)
---
package.json | 2 +-
.../gauge_component.test.tsx.snap | 4 +-
.../public/components/heatmap_component.tsx | 121 +-
.../public/components/pie_vis_component.tsx | 14 +-
.../expression_pie/public/utils/get_config.ts | 81 --
.../expression_pie/public/utils/get_layers.ts | 10 +-
...ig.test.ts => get_partition_theme.test.ts} | 16 +-
.../public/utils/get_partition_theme.ts | 85 ++
.../expression_pie/public/utils/index.ts | 2 +-
.../public/services/theme/theme.test.tsx | 2 +-
.../charts/public/services/theme/theme.ts | 5 +-
.../static/utils/transform_click_event.ts | 17 +-
.../public/components/series/area.tsx | 51 +-
.../__snapshots__/area_decorator.test.js.snap | 2 +-
.../__snapshots__/bar_decorator.test.js.snap | 2 +-
.../xy/public/components/xy_settings.tsx | 4 +-
.../page_objects/visualize_chart_page.ts | 2 +-
.../charts/page_load_dist_chart.tsx | 2 +
.../charts/visitor_breakdown_chart.tsx | 16 +-
.../breakdown_series.tsx | 2 +
.../service_profiling_flamegraph.tsx | 30 +-
.../service_profiling_timeline.tsx | 1 +
.../shared/charts/breakdown_chart/index.tsx | 7 +-
.../shared/charts/spark_plot/index.tsx | 8 +-
.../shared/charts/timeseries_chart.tsx | 14 +-
.../transaction_distribution_chart/index.tsx | 39 +-
.../get_time_range_comparison.ts | 3 +-
.../metric_distribution_chart.tsx | 4 +-
.../render_function.test.tsx | 11 +-
.../pie_visualization/render_function.tsx | 81 +-
.../__snapshots__/expression.test.tsx.snap | 70 +-
.../public/xy_visualization/expression.tsx | 8 +-
.../feature_importance_summary.tsx | 23 +-
.../explorer/swimlane_container.tsx | 103 +-
.../public/hooks/use_chart_theme.tsx | 42 +-
.../common/components/charts/common.tsx | 4 +-
.../__snapshots__/donut_chart.test.tsx.snap | 1078 ++++++++++-------
.../components/common/charts/donut_chart.tsx | 33 +-
yarn.lock | 8 +-
39 files changed, 1102 insertions(+), 905 deletions(-)
delete mode 100644 src/plugins/chart_expressions/expression_pie/public/utils/get_config.ts
rename src/plugins/chart_expressions/expression_pie/public/utils/{get_config.test.ts => get_partition_theme.test.ts} (80%)
create mode 100644 src/plugins/chart_expressions/expression_pie/public/utils/get_partition_theme.ts
diff --git a/package.json b/package.json
index 69bf4f62918aa..f17b4017058d8 100644
--- a/package.json
+++ b/package.json
@@ -103,7 +103,7 @@
"@elastic/apm-rum": "^5.10.1",
"@elastic/apm-rum-react": "^1.3.3",
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace",
- "@elastic/charts": "40.2.0",
+ "@elastic/charts": "43.1.1",
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.1.0-canary.2",
"@elastic/ems-client": "8.0.0",
diff --git a/src/plugins/chart_expressions/expression_gauge/public/components/__snapshots__/gauge_component.test.tsx.snap b/src/plugins/chart_expressions/expression_gauge/public/components/__snapshots__/gauge_component.test.tsx.snap
index b588c1d341a75..bd39344807643 100644
--- a/src/plugins/chart_expressions/expression_gauge/public/components/__snapshots__/gauge_component.test.tsx.snap
+++ b/src/plugins/chart_expressions/expression_gauge/public/components/__snapshots__/gauge_component.test.tsx.snap
@@ -4,11 +4,11 @@ exports[`GaugeComponent renders the chart 1`] = `
-
- = memo(
}
};
- const config: HeatmapSpec['config'] = {
- grid: {
- stroke: {
- width:
- args.gridConfig.strokeWidth ?? chartTheme.axes?.gridLine?.horizontal?.strokeWidth ?? 1,
- color:
- args.gridConfig.strokeColor ??
- chartTheme.axes?.gridLine?.horizontal?.stroke ??
- '#D3DAE6',
- },
- cellHeight: {
- max: 'fill',
- min: 1,
+ const themeOverrides: PartialTheme = {
+ legend: {
+ labelOptions: {
+ maxLines: args.legend.shouldTruncate ? args.legend?.maxLines ?? 1 : 0,
},
},
- cell: {
- maxWidth: 'fill',
- maxHeight: 'fill',
- label: {
- visible: args.gridConfig.isCellLabelVisible ?? false,
- minFontSize: 8,
- maxFontSize: 18,
- useGlobalMinFontSize: true, // override the min if there's a different directive upstream
+ heatmap: {
+ grid: {
+ stroke: {
+ width:
+ args.gridConfig.strokeWidth ??
+ chartTheme.axes?.gridLine?.horizontal?.strokeWidth ??
+ 1,
+ color:
+ args.gridConfig.strokeColor ??
+ chartTheme.axes?.gridLine?.horizontal?.stroke ??
+ '#D3DAE6',
+ },
+ cellHeight: {
+ max: 'fill',
+ min: 1,
+ },
},
- border: {
- strokeWidth: 0,
+ cell: {
+ maxWidth: 'fill',
+ maxHeight: 'fill',
+ label: {
+ visible: args.gridConfig.isCellLabelVisible ?? false,
+ minFontSize: 8,
+ maxFontSize: 18,
+ useGlobalMinFontSize: true, // override the min if there's a different directive upstream
+ },
+ border: {
+ strokeWidth: 0,
+ },
+ },
+ yAxisLabel: {
+ visible: !!yAxisColumn && args.gridConfig.isYAxisLabelVisible,
+ // eui color subdued
+ textColor: chartTheme.axes?.tickLabel?.fill ?? '#6a717d',
+ padding: yAxisColumn?.name ? 8 : 0,
+ },
+ xAxisLabel: {
+ visible: Boolean(args.gridConfig.isXAxisLabelVisible && xAxisColumn),
+ // eui color subdued
+ textColor: chartTheme.axes?.tickLabel?.fill ?? `#6a717d`,
+ padding: xAxisColumn?.name ? 8 : 0,
+ },
+ brushMask: {
+ fill: isDarkTheme ? 'rgb(30,31,35,80%)' : 'rgb(247,247,247,50%)',
+ },
+ brushArea: {
+ stroke: isDarkTheme ? 'rgb(255, 255, 255)' : 'rgb(105, 112, 125)',
},
},
- yAxisLabel: {
- visible: !!yAxisColumn && args.gridConfig.isYAxisLabelVisible,
- // eui color subdued
- textColor: chartTheme.axes?.tickLabel?.fill ?? '#6a717d',
- padding: yAxisColumn?.name ? 8 : 0,
- name: yAxisColumn?.name ?? '',
- ...(yAxisColumn
- ? {
- formatter: (v: number | string) =>
- `${formatFactory(yAxisColumn.meta.params).convert(v) ?? ''}`,
- }
- : {}),
- },
- xAxisLabel: {
- visible: Boolean(args.gridConfig.isXAxisLabelVisible && xAxisColumn),
- // eui color subdued
- textColor: chartTheme.axes?.tickLabel?.fill ?? `#6a717d`,
- padding: xAxisColumn?.name ? 8 : 0,
- formatter: (v: number | string) => `${xValuesFormatter.convert(v) ?? ''}`,
- name: xAxisColumn?.name ?? '',
- },
- brushMask: {
- fill: isDarkTheme ? 'rgb(30,31,35,80%)' : 'rgb(247,247,247,50%)',
- },
- brushArea: {
- stroke: isDarkTheme ? 'rgb(255, 255, 255)' : 'rgb(105, 112, 125)',
- },
- timeZone,
};
return (
@@ -456,14 +456,7 @@ export const HeatmapComponent: FC = memo(
legendColorPicker={uiState ? legendColorPicker : undefined}
debugState={window._echDebugStateFlag ?? false}
tooltip={tooltip}
- theme={{
- ...chartTheme,
- legend: {
- labelOptions: {
- maxLines: args.legend.shouldTruncate ? args.legend?.maxLines ?? 1 : 0,
- },
- },
- }}
+ theme={[themeOverrides, chartTheme]}
xDomain={{
min:
dateHistogramMeta && dateHistogramMeta.timeRange
@@ -483,6 +476,7 @@ export const HeatmapComponent: FC = memo(
type: 'bands',
bands,
}}
+ timeZone={timeZone}
data={chartData}
xAccessor={xAccessor}
yAccessor={yAccessor || 'unifiedY'}
@@ -490,8 +484,15 @@ export const HeatmapComponent: FC = memo(
valueFormatter={valueFormatter}
xScale={xScale}
ySortPredicate={yAxisColumn ? getSortPredicate(yAxisColumn) : 'dataIndex'}
- config={config}
xSortPredicate={xAxisColumn ? getSortPredicate(xAxisColumn) : 'dataIndex'}
+ xAxisLabelName={xAxisColumn?.name}
+ yAxisLabelName={yAxisColumn?.name}
+ xAxisLabelFormatter={(v) => `${xValuesFormatter.convert(v) ?? ''}`}
+ yAxisLabelFormatter={
+ yAxisColumn
+ ? (v) => `${formatFactory(yAxisColumn.meta.params).convert(v) ?? ''}`
+ : undefined
+ }
/>
>
diff --git a/src/plugins/chart_expressions/expression_pie/public/components/pie_vis_component.tsx b/src/plugins/chart_expressions/expression_pie/public/components/pie_vis_component.tsx
index 02e1617b3b294..dff56c34e6c1a 100644
--- a/src/plugins/chart_expressions/expression_pie/public/components/pie_vis_component.tsx
+++ b/src/plugins/chart_expressions/expression_pie/public/components/pie_vis_component.tsx
@@ -18,6 +18,7 @@ import {
TooltipProps,
TooltipType,
SeriesIdentifier,
+ PartitionLayout,
} from '@elastic/charts';
import { useEuiTheme } from '@elastic/eui';
import {
@@ -47,7 +48,7 @@ import {
canFilter,
getFilterClickData,
getFilterEventData,
- getConfig,
+ getPartitionTheme,
getColumns,
getSplitDimensionAccessor,
getColumnByAccessor,
@@ -251,8 +252,8 @@ const PieComponent = (props: PieComponentProps) => {
return 1;
}, [visData.rows, metricColumn]);
- const config = useMemo(
- () => getConfig(visParams, chartTheme, dimensions, rescaleFactor),
+ const themeOverrides = useMemo(
+ () => getPartitionTheme(visParams, chartTheme, dimensions, rescaleFactor),
[chartTheme, visParams, dimensions, rescaleFactor]
);
const tooltip: TooltipProps = {
@@ -369,7 +370,9 @@ const PieComponent = (props: PieComponentProps) => {
)}
theme={[
// Chart background should be transparent for the usage at Canvas.
- { ...chartTheme, background: { color: 'transparent' } },
+ { background: { color: 'transparent' } },
+ themeOverrides,
+ chartTheme,
{
legend: {
labelOptions: {
@@ -385,6 +388,8 @@ const PieComponent = (props: PieComponentProps) => {
id="pie"
smallMultiples={SMALL_MULTIPLES_ID}
data={visData.rows}
+ layout={PartitionLayout.sunburst}
+ specialFirstInnermostSector={false}
valueAccessor={(d: Datum) => getSliceValue(d, metricColumn)}
percentFormatter={(d: number) => percentFormatter.convert(d / 100)}
valueGetter={
@@ -400,7 +405,6 @@ const PieComponent = (props: PieComponentProps) => {
: metricFieldFormatter.convert(d)
}
layers={layers}
- config={config}
topGroove={!visParams.labels.show ? 0 : undefined}
/>
diff --git a/src/plugins/chart_expressions/expression_pie/public/utils/get_config.ts b/src/plugins/chart_expressions/expression_pie/public/utils/get_config.ts
deleted file mode 100644
index 0da439884ae68..0000000000000
--- a/src/plugins/chart_expressions/expression_pie/public/utils/get_config.ts
+++ /dev/null
@@ -1,81 +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 { PartitionConfig, PartitionLayout, RecursivePartial, Theme } from '@elastic/charts';
-import { LabelPositions, PieVisParams, PieContainerDimensions } from '../../common/types';
-
-const MAX_SIZE = 1000;
-
-export const getConfig = (
- visParams: PieVisParams,
- chartTheme: RecursivePartial,
- dimensions?: PieContainerDimensions,
- rescaleFactor: number = 1
-): RecursivePartial => {
- // On small multiples we want the labels to only appear inside
- const isSplitChart = Boolean(visParams.dimensions.splitColumn || visParams.dimensions.splitRow);
- const usingMargin =
- dimensions && !isSplitChart
- ? {
- margin: {
- top: (1 - Math.min(1, MAX_SIZE / dimensions?.height)) / 2,
- bottom: (1 - Math.min(1, MAX_SIZE / dimensions?.height)) / 2,
- left: (1 - Math.min(1, MAX_SIZE / dimensions?.width)) / 2,
- right: (1 - Math.min(1, MAX_SIZE / dimensions?.width)) / 2,
- },
- }
- : null;
-
- const usingOuterSizeRatio =
- dimensions && !isSplitChart
- ? {
- outerSizeRatio:
- // Cap the ratio to 1 and then rescale
- rescaleFactor * Math.min(MAX_SIZE / Math.min(dimensions?.width, dimensions?.height), 1),
- }
- : null;
- const config: RecursivePartial = {
- partitionLayout: PartitionLayout.sunburst,
- fontFamily: chartTheme.barSeriesStyle?.displayValue?.fontFamily,
- ...usingOuterSizeRatio,
- specialFirstInnermostSector: false,
- minFontSize: 10,
- maxFontSize: 16,
- linkLabel: {
- maxCount: 5,
- fontSize: 11,
- textColor: chartTheme.axes?.axisTitle?.fill,
- maxTextLength: visParams.labels.truncate ?? undefined,
- },
- sectorLineStroke: chartTheme.lineSeriesStyle?.point?.fill,
- sectorLineWidth: 1.5,
- circlePadding: 4,
- emptySizeRatio: visParams.isDonut ? visParams.emptySizeRatio : 0,
- ...usingMargin,
- };
- if (!visParams.labels.show) {
- // Force all labels to be linked, then prevent links from showing
- config.linkLabel = { maxCount: 0, maximumSection: Number.POSITIVE_INFINITY };
- }
-
- if (visParams.labels.last_level && visParams.labels.show) {
- config.linkLabel = {
- maxCount: Number.POSITIVE_INFINITY,
- maximumSection: Number.POSITIVE_INFINITY,
- maxTextLength: visParams.labels.truncate ?? undefined,
- };
- }
-
- if (
- (visParams.labels.position === LabelPositions.INSIDE || isSplitChart) &&
- visParams.labels.show
- ) {
- config.linkLabel = { maxCount: 0 };
- }
- return config;
-};
diff --git a/src/plugins/chart_expressions/expression_pie/public/utils/get_layers.ts b/src/plugins/chart_expressions/expression_pie/public/utils/get_layers.ts
index 05512eab72fe0..9268f5631e735 100644
--- a/src/plugins/chart_expressions/expression_pie/public/utils/get_layers.ts
+++ b/src/plugins/chart_expressions/expression_pie/public/utils/get_layers.ts
@@ -6,13 +6,7 @@
* Side Public License, v 1.
*/
-import {
- Datum,
- PartitionFillLabel,
- PartitionLayer,
- ShapeTreeNode,
- ArrayEntry,
-} from '@elastic/charts';
+import { Datum, PartitionLayer, ShapeTreeNode, ArrayEntry } from '@elastic/charts';
import { isEqual } from 'lodash';
import type { FieldFormatsStart } from 'src/plugins/field_formats/public';
import { SeriesLayer, PaletteRegistry, lightenColor } from '../../../../charts/public';
@@ -137,7 +131,7 @@ export const getLayers = (
formatter: FieldFormatsStart,
syncColors: boolean
): PartitionLayer[] => {
- const fillLabel: Partial = {
+ const fillLabel: PartitionLayer['fillLabel'] = {
valueFont: {
fontWeight: 700,
},
diff --git a/src/plugins/chart_expressions/expression_pie/public/utils/get_config.test.ts b/src/plugins/chart_expressions/expression_pie/public/utils/get_partition_theme.test.ts
similarity index 80%
rename from src/plugins/chart_expressions/expression_pie/public/utils/get_config.test.ts
rename to src/plugins/chart_expressions/expression_pie/public/utils/get_partition_theme.test.ts
index 5eaa1bb9b2848..1cccdf8a5e47b 100644
--- a/src/plugins/chart_expressions/expression_pie/public/utils/get_config.test.ts
+++ b/src/plugins/chart_expressions/expression_pie/public/utils/get_partition_theme.test.ts
@@ -6,19 +6,21 @@
* Side Public License, v 1.
*/
-import { getConfig } from './get_config';
+import { getPartitionTheme } from './get_partition_theme';
import { createMockPieParams } from '../mocks';
const visParams = createMockPieParams();
describe('getConfig', () => {
it('should cap the outerSizeRatio to 1', () => {
- expect(getConfig(visParams, {}, { width: 400, height: 400 }).outerSizeRatio).toBe(1);
+ expect(
+ getPartitionTheme(visParams, {}, { width: 400, height: 400 }).partition?.outerSizeRatio
+ ).toBe(1);
});
it('should not have outerSizeRatio for split chart', () => {
expect(
- getConfig(
+ getPartitionTheme(
{
...visParams,
dimensions: {
@@ -37,11 +39,11 @@ describe('getConfig', () => {
},
{},
{ width: 400, height: 400 }
- ).outerSizeRatio
+ ).partition?.outerSizeRatio
).toBeUndefined();
expect(
- getConfig(
+ getPartitionTheme(
{
...visParams,
dimensions: {
@@ -60,11 +62,11 @@ describe('getConfig', () => {
},
{},
{ width: 400, height: 400 }
- ).outerSizeRatio
+ ).partition?.outerSizeRatio
).toBeUndefined();
});
it('should not set outerSizeRatio if dimensions are not defined', () => {
- expect(getConfig(visParams, {}).outerSizeRatio).toBeUndefined();
+ expect(getPartitionTheme(visParams, {}).partition?.outerSizeRatio).toBeUndefined();
});
});
diff --git a/src/plugins/chart_expressions/expression_pie/public/utils/get_partition_theme.ts b/src/plugins/chart_expressions/expression_pie/public/utils/get_partition_theme.ts
new file mode 100644
index 0000000000000..4daaf835fa782
--- /dev/null
+++ b/src/plugins/chart_expressions/expression_pie/public/utils/get_partition_theme.ts
@@ -0,0 +1,85 @@
+/*
+ * 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 { PartialTheme } from '@elastic/charts';
+import { Required } from '@kbn/utility-types';
+import { LabelPositions, PieVisParams, PieContainerDimensions } from '../../common/types';
+
+const MAX_SIZE = 1000;
+
+export const getPartitionTheme = (
+ visParams: PieVisParams,
+ chartTheme: PartialTheme,
+ dimensions?: PieContainerDimensions,
+ rescaleFactor: number = 1
+): PartialTheme => {
+ // On small multiples we want the labels to only appear inside
+ const isSplitChart = Boolean(visParams.dimensions.splitColumn || visParams.dimensions.splitRow);
+ const paddingProps: PartialTheme | null =
+ dimensions && !isSplitChart
+ ? {
+ chartPaddings: {
+ // TODO: simplify ratio logic to be static px units
+ top: ((1 - Math.min(1, MAX_SIZE / dimensions?.height)) / 2) * dimensions?.height,
+ bottom: ((1 - Math.min(1, MAX_SIZE / dimensions?.height)) / 2) * dimensions?.height,
+ left: ((1 - Math.min(1, MAX_SIZE / dimensions?.width)) / 2) * dimensions?.height,
+ right: ((1 - Math.min(1, MAX_SIZE / dimensions?.width)) / 2) * dimensions?.height,
+ },
+ }
+ : null;
+
+ const outerSizeRatio: PartialTheme['partition'] | null =
+ dimensions && !isSplitChart
+ ? {
+ outerSizeRatio:
+ // Cap the ratio to 1 and then rescale
+ rescaleFactor * Math.min(MAX_SIZE / Math.min(dimensions?.width, dimensions?.height), 1),
+ }
+ : null;
+ const theme: Required = {
+ chartMargins: { top: 0, bottom: 0, left: 0, right: 0 },
+ ...paddingProps,
+ partition: {
+ fontFamily: chartTheme.barSeriesStyle?.displayValue?.fontFamily,
+ ...outerSizeRatio,
+ minFontSize: 10,
+ maxFontSize: 16,
+ linkLabel: {
+ maxCount: 5,
+ fontSize: 11,
+ textColor: chartTheme.axes?.axisTitle?.fill,
+ maxTextLength: visParams.labels.truncate ?? undefined,
+ },
+ sectorLineStroke: chartTheme.lineSeriesStyle?.point?.fill,
+ sectorLineWidth: 1.5,
+ circlePadding: 4,
+ emptySizeRatio: visParams.isDonut ? visParams.emptySizeRatio : 0,
+ },
+ };
+ if (!visParams.labels.show) {
+ // Force all labels to be linked, then prevent links from showing
+ theme.partition.linkLabel = { maxCount: 0, maximumSection: Number.POSITIVE_INFINITY };
+ }
+
+ if (visParams.labels.last_level && visParams.labels.show) {
+ theme.partition.linkLabel = {
+ maxCount: Number.POSITIVE_INFINITY,
+ maximumSection: Number.POSITIVE_INFINITY,
+ maxTextLength: visParams.labels.truncate ?? undefined,
+ };
+ }
+
+ if (
+ (visParams.labels.position === LabelPositions.INSIDE || isSplitChart) &&
+ visParams.labels.show
+ ) {
+ theme.partition.linkLabel = { maxCount: 0 };
+ }
+
+ return theme;
+};
diff --git a/src/plugins/chart_expressions/expression_pie/public/utils/index.ts b/src/plugins/chart_expressions/expression_pie/public/utils/index.ts
index 3ee51003ca1e9..e1b779c511bfc 100644
--- a/src/plugins/chart_expressions/expression_pie/public/utils/index.ts
+++ b/src/plugins/chart_expressions/expression_pie/public/utils/index.ts
@@ -10,7 +10,7 @@ export { getLayers } from './get_layers';
export { getColorPicker } from './get_color_picker';
export { getLegendActions } from './get_legend_actions';
export { canFilter, getFilterClickData, getFilterEventData } from './filter_helpers';
-export { getConfig } from './get_config';
+export { getPartitionTheme } from './get_partition_theme';
export { getColumns } from './get_columns';
export { getSplitDimensionAccessor } from './get_split_dimension_accessor';
export { getDistinctSeries } from './get_distinct_series';
diff --git a/src/plugins/charts/public/services/theme/theme.test.tsx b/src/plugins/charts/public/services/theme/theme.test.tsx
index 079acbb5fefbc..5154c1ce5ad63 100644
--- a/src/plugins/charts/public/services/theme/theme.test.tsx
+++ b/src/plugins/charts/public/services/theme/theme.test.tsx
@@ -12,11 +12,11 @@ import { take } from 'rxjs/operators';
import { renderHook, act } from '@testing-library/react-hooks';
import { render, act as renderAct } from '@testing-library/react';
+import { LIGHT_THEME, DARK_THEME } from '@elastic/charts';
import { EUI_CHARTS_THEME_DARK, EUI_CHARTS_THEME_LIGHT } from '@elastic/eui/dist/eui_charts_theme';
import { ThemeService } from './theme';
import { coreMock } from '../../../../../core/public/mocks';
-import { LIGHT_THEME, DARK_THEME } from '@elastic/charts';
const { uiSettings: setupMockUiSettings } = coreMock.createSetup();
diff --git a/src/plugins/charts/public/services/theme/theme.ts b/src/plugins/charts/public/services/theme/theme.ts
index 1aad4f0ab6328..4397084d890ae 100644
--- a/src/plugins/charts/public/services/theme/theme.ts
+++ b/src/plugins/charts/public/services/theme/theme.ts
@@ -89,9 +89,8 @@ export class ThemeService {
public init(uiSettings: CoreSetup['uiSettings']) {
this._uiSettingsDarkMode$ = uiSettings.get$('theme:darkMode');
this._uiSettingsDarkMode$.subscribe((darkMode) => {
- this._chartsTheme$.next(
- darkMode ? EUI_CHARTS_THEME_DARK.theme : EUI_CHARTS_THEME_LIGHT.theme
- );
+ const theme = darkMode ? EUI_CHARTS_THEME_DARK.theme : EUI_CHARTS_THEME_LIGHT.theme;
+ this._chartsTheme$.next(theme);
this._chartsBaseTheme$.next(darkMode ? DARK_THEME : LIGHT_THEME);
});
}
diff --git a/src/plugins/charts/public/static/utils/transform_click_event.ts b/src/plugins/charts/public/static/utils/transform_click_event.ts
index d175046b20ebb..ae255455b39b1 100644
--- a/src/plugins/charts/public/static/utils/transform_click_event.ts
+++ b/src/plugins/charts/public/static/utils/transform_click_event.ts
@@ -28,19 +28,21 @@ export interface BrushTriggerEvent {
data: RangeSelectContext['data'];
}
-type AllSeriesAccessors = Array<[accessor: Accessor | AccessorFn, value: string | number]>;
+type AllSeriesAccessors = Array<
+ [accessor: Accessor | AccessorFn, value: string | number]
+>;
/**
* returns accessor value from string or function accessor
* @param datum
* @param accessor
*/
-function getAccessorValue(datum: Datum, accessor: Accessor | AccessorFn) {
+function getAccessorValue(datum: D, accessor: Accessor | AccessorFn) {
if (typeof accessor === 'function') {
return accessor(datum);
}
- return datum[accessor];
+ return (datum as Datum)[accessor];
}
/**
@@ -259,9 +261,11 @@ export const getFilterFromSeriesFn =
/**
* Helper function to transform `@elastic/charts` brush event into brush action event
*/
-export const getBrushFromChartBrushEventFn =
- (table: Datatable, xAccessor: Accessor | AccessorFn) =>
- ({ x: selectedRange }: XYBrushEvent): BrushTriggerEvent => {
+export function getBrushFromChartBrushEventFn(
+ table: Datatable,
+ xAccessor: Accessor | AccessorFn
+) {
+ return ({ x: selectedRange }: XYBrushEvent): BrushTriggerEvent => {
const [start, end] = selectedRange ?? [0, 0];
const range: [number, number] = [start, end];
const column = table.columns.findIndex(({ id }) => validateAccessorId(id, xAccessor));
@@ -275,3 +279,4 @@ export const getBrushFromChartBrushEventFn =
name: 'brush',
};
};
+}
diff --git a/src/plugins/vis_types/timelion/public/components/series/area.tsx b/src/plugins/vis_types/timelion/public/components/series/area.tsx
index d149d675d63d7..50c52f69de5bb 100644
--- a/src/plugins/vis_types/timelion/public/components/series/area.tsx
+++ b/src/plugins/vis_types/timelion/public/components/series/area.tsx
@@ -38,30 +38,32 @@ const getPointFillColor = (points: VisSeries['points'], color: string | undefine
);
};
-const getAreaSeriesStyle = ({ color, lines, points }: AreaSeriesComponentProps['visData']) =>
- ({
- line: {
- opacity: isShowLines(lines, points) ? 1 : 0,
- stroke: color,
- strokeWidth: lines?.lineWidth !== undefined ? Number(lines.lineWidth) : 3,
- visible: isShowLines(lines, points),
- },
- area: {
- fill: color,
- opacity: lines?.fill ?? 0,
- visible: lines?.show ?? points?.show ?? true,
- },
- point: {
- fill: getPointFillColor(points, color),
- opacity: 1,
- radius: points?.radius ?? 3,
- stroke: color,
- strokeWidth: points?.lineWidth ?? 2,
- visible: points?.show ?? false,
- shape: points?.symbol === 'cross' ? PointShape.X : points?.symbol,
- },
- curve: lines?.steps ? CurveType.CURVE_STEP : CurveType.LINEAR,
- } as RecursivePartial);
+const getAreaSeriesStyle = ({
+ color,
+ lines,
+ points,
+}: AreaSeriesComponentProps['visData']): RecursivePartial => ({
+ line: {
+ opacity: isShowLines(lines, points) ? 1 : 0,
+ stroke: color,
+ strokeWidth: lines?.lineWidth !== undefined ? Number(lines.lineWidth) : 3,
+ visible: isShowLines(lines, points),
+ },
+ area: {
+ fill: color,
+ opacity: lines?.fill ?? 0,
+ visible: lines?.show ?? points?.show ?? true,
+ },
+ point: {
+ fill: getPointFillColor(points, color),
+ opacity: 1,
+ radius: points?.radius ?? 3,
+ stroke: color,
+ strokeWidth: points?.lineWidth ?? 2,
+ visible: points?.show ?? false,
+ shape: points?.symbol === 'cross' ? PointShape.X : points?.symbol,
+ },
+});
export const AreaSeriesComponent = ({ index, groupId, visData }: AreaSeriesComponentProps) => (
diff --git a/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/decorators/__snapshots__/area_decorator.test.js.snap b/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/decorators/__snapshots__/area_decorator.test.js.snap
index fceb9c3fdb819..7ded8e2254aa9 100644
--- a/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/decorators/__snapshots__/area_decorator.test.js.snap
+++ b/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/decorators/__snapshots__/area_decorator.test.js.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`src/legacy/core_plugins/metrics/public/visualizations/views/timeseries/decorators/area_decorator.js should render and match a snapshot 1`] = `
- should render and match a snapshot 1`] = `
- & {
- onPointerUpdate: SettingsSpecProps['onPointerUpdate'];
+ onPointerUpdate: SettingsProps['onPointerUpdate'];
xDomain?: DomainRange;
adjustedXDomain?: DomainRange;
showLegend: boolean;
diff --git a/test/functional/page_objects/visualize_chart_page.ts b/test/functional/page_objects/visualize_chart_page.ts
index dc36197034691..a3fbd631722f5 100644
--- a/test/functional/page_objects/visualize_chart_page.ts
+++ b/test/functional/page_objects/visualize_chart_page.ts
@@ -255,7 +255,7 @@ export class VisualizeChartPageObject extends FtrService {
if (isVisTypeHeatmapChart) {
const legendItems =
- (await this.getEsChartDebugState(heatmapChartSelector))?.legend!.items ?? [];
+ (await this.getEsChartDebugState(heatmapChartSelector))?.legend?.items ?? [];
return legendItems.map(({ name }) => name);
}
diff --git a/x-pack/plugins/apm/public/components/app/rum_dashboard/charts/page_load_dist_chart.tsx b/x-pack/plugins/apm/public/components/app/rum_dashboard/charts/page_load_dist_chart.tsx
index 8b34ad8980774..ff9fb97197db0 100644
--- a/x-pack/plugins/apm/public/components/app/rum_dashboard/charts/page_load_dist_chart.tsx
+++ b/x-pack/plugins/apm/public/components/app/rum_dashboard/charts/page_load_dist_chart.tsx
@@ -121,6 +121,8 @@ export function PageLoadDistChart({
fit={Fit.Linear}
id={'PagesPercentage'}
name={I18LABELS.overall}
+ xAccessor="x"
+ yAccessors={['y']}
xScaleType={ScaleType.Linear}
yScaleType={ScaleType.Linear}
data={data?.pageLoadDistribution ?? []}
diff --git a/x-pack/plugins/apm/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.tsx b/x-pack/plugins/apm/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.tsx
index 89f49a9669b45..2cdeb7be85ce3 100644
--- a/x-pack/plugins/apm/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.tsx
+++ b/x-pack/plugins/apm/public/components/app/rum_dashboard/charts/visitor_breakdown_chart.tsx
@@ -38,9 +38,15 @@ interface Props {
}
const theme: PartialTheme = {
+ chartMargins: { top: 0, bottom: 0, left: 0, right: 0 },
legend: {
verticalWidth: 100,
},
+ partition: {
+ linkLabel: { maximumSection: Infinity, maxCount: 0 },
+ outerSizeRatio: 1, // - 0.5 * Math.random(),
+ circlePadding: 4,
+ },
};
export function VisitorBreakdownChart({ loading, options }: Props) {
@@ -64,6 +70,8 @@ export function VisitorBreakdownChart({ loading, options }: Props) {
data={
options?.length ? options : [{ count: 1, name: I18LABELS.noData }]
}
+ layout={PartitionLayout.sunburst}
+ clockwiseSectors={false}
valueAccessor={(d: Datum) => d.count as number}
valueGetter="percent"
percentFormatter={(d: number) =>
@@ -78,14 +86,6 @@ export function VisitorBreakdownChart({ loading, options }: Props) {
},
},
]}
- config={{
- partitionLayout: PartitionLayout.sunburst,
- linkLabel: { maximumSection: Infinity, maxCount: 0 },
- margin: { top: 0, bottom: 0, left: 0, right: 0 },
- outerSizeRatio: 1, // - 0.5 * Math.random(),
- circlePadding: 4,
- clockwiseSectors: false,
- }}
/>
diff --git a/x-pack/plugins/apm/public/components/app/rum_dashboard/page_load_distribution/breakdown_series.tsx b/x-pack/plugins/apm/public/components/app/rum_dashboard/page_load_distribution/breakdown_series.tsx
index db5932a96fb12..5e98f36cc0798 100644
--- a/x-pack/plugins/apm/public/components/app/rum_dashboard/page_load_distribution/breakdown_series.tsx
+++ b/x-pack/plugins/apm/public/components/app/rum_dashboard/page_load_distribution/breakdown_series.tsx
@@ -54,6 +54,8 @@ export function BreakdownSeries({
id={`${field}-${value}-${name}`}
key={`${field}-${value}-${name}`}
name={name}
+ xAccessor="x"
+ yAccessors={['y']}
xScaleType={ScaleType.Linear}
yScaleType={ScaleType.Linear}
curve={CurveType.CURVE_CATMULL_ROM}
diff --git a/x-pack/plugins/apm/public/components/app/service_profiling/service_profiling_flamegraph.tsx b/x-pack/plugins/apm/public/components/app/service_profiling/service_profiling_flamegraph.tsx
index 6f8c1d685ba2b..e0c2483b70f88 100644
--- a/x-pack/plugins/apm/public/components/app/service_profiling/service_profiling_flamegraph.tsx
+++ b/x-pack/plugins/apm/public/components/app/service_profiling/service_profiling_flamegraph.tsx
@@ -12,6 +12,7 @@ import {
PrimitiveValue,
Settings,
TooltipInfo,
+ PartialTheme,
} from '@elastic/charts';
import {
EuiCheckbox,
@@ -286,6 +287,18 @@ export function ServiceProfilingFlamegraph({
}, [points, highlightFilter, data]);
const chartTheme = useChartTheme();
+ const themeOverrides: PartialTheme = {
+ chartMargins: { top: 0, bottom: 0, left: 0, right: 0 },
+ partition: {
+ fillLabel: {
+ fontFamily: theme.eui.euiCodeFontFamily,
+ clipText: true,
+ },
+ fontFamily: theme.eui.euiCodeFontFamily,
+ minFontSize: 9,
+ maxFontSize: 9,
+ },
+ };
const chartSize = {
height: layers.length * 20,
@@ -305,7 +318,7 @@ export function ServiceProfilingFlamegraph({
(
d.value as number}
valueFormatter={() => ''}
- config={{
- fillLabel: {
- fontFamily: theme.eui.euiCodeFontFamily,
- clipText: true,
- },
- drilldown: true,
- fontFamily: theme.eui.euiCodeFontFamily,
- minFontSize: 9,
- maxFontSize: 9,
- maxRowCount: 1,
- partitionLayout: PartitionLayout.icicle,
- }}
/>
diff --git a/x-pack/plugins/apm/public/components/app/service_profiling/service_profiling_timeline.tsx b/x-pack/plugins/apm/public/components/app/service_profiling/service_profiling_timeline.tsx
index d5dc2f5d56afc..a625d87f05d9c 100644
--- a/x-pack/plugins/apm/public/components/app/service_profiling/service_profiling_timeline.tsx
+++ b/x-pack/plugins/apm/public/components/app/service_profiling/service_profiling_timeline.tsx
@@ -98,6 +98,7 @@ export function ServiceProfilingTimeline({
xScaleType={ScaleType.Time}
yScaleType={ScaleType.Linear}
xAccessor="x"
+ yAccessors={['y']}
stackAccessors={['x']}
/>
))}
diff --git a/x-pack/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx
index 78bfd8911c351..a6989897641bd 100644
--- a/x-pack/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx
+++ b/x-pack/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx
@@ -171,7 +171,12 @@ export function BreakdownChart({
})
) : (
// When timeseries is empty, loads an AreaSeries chart to show the default empty message.
-
+
)}
diff --git a/x-pack/plugins/apm/public/components/shared/charts/spark_plot/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/spark_plot/index.tsx
index 2f38ab9cdeb4b..0843fafe0f92f 100644
--- a/x-pack/plugins/apm/public/components/shared/charts/spark_plot/index.tsx
+++ b/x-pack/plugins/apm/public/components/shared/charts/spark_plot/index.tsx
@@ -10,11 +10,11 @@ import {
Chart,
CurveType,
LineSeries,
+ PartialTheme,
ScaleType,
Settings,
} from '@elastic/charts';
import { EuiFlexGroup, EuiFlexItem, EuiIcon } from '@elastic/eui';
-import { merge } from 'lodash';
import React from 'react';
import { useChartTheme } from '../../../../../../observability/public';
import { Coordinate } from '../../../../../typings/timeseries';
@@ -60,7 +60,7 @@ export function SparkPlot({
const comparisonChartTheme = getComparisonChartTheme(theme);
const hasComparisonSeries = !!comparisonSeries?.length;
- const sparkplotChartTheme = merge({}, defaultChartTheme, {
+ const sparkplotChartTheme: PartialTheme = {
chartMargins: { left: 0, right: 0, top: 0, bottom: 0 },
lineSeriesStyle: {
point: { opacity: 0 },
@@ -69,7 +69,7 @@ export function SparkPlot({
point: { opacity: 0 },
},
...(hasComparisonSeries ? comparisonChartTheme : {}),
- });
+ };
const colorValue = theme.eui[color];
@@ -95,7 +95,7 @@ export function SparkPlot({
{hasValidTimeseries(series) ? (
diff --git a/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx b/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx
index 1cb8a4facfd69..64c070c25f94b 100644
--- a/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx
+++ b/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx
@@ -126,13 +126,15 @@ export function TimeseriesChart({
onBrushEnd={(event) =>
onBrushEnd({ x: (event as XYBrushEvent).x, history })
}
- theme={{
- ...chartTheme,
- areaSeriesStyle: {
- line: { visible: false },
+ theme={[
+ customTheme,
+ {
+ areaSeriesStyle: {
+ line: { visible: false },
+ },
},
- ...customTheme,
- }}
+ ...chartTheme,
+ ]}
onPointerUpdate={setPointerEvent}
externalPointerEvents={{
tooltip: { visible: true },
diff --git a/x-pack/plugins/apm/public/components/shared/charts/transaction_distribution_chart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/transaction_distribution_chart/index.tsx
index b33f152a63016..91d3c0a727877 100644
--- a/x-pack/plugins/apm/public/components/shared/charts/transaction_distribution_chart/index.tsx
+++ b/x-pack/plugins/apm/public/components/shared/charts/transaction_distribution_chart/index.tsx
@@ -156,28 +156,31 @@ export function TransactionDistributionChart({
= ({
yScaleType={ScaleType.Linear}
xAccessor="x"
yAccessors={['y']}
- data={chartData.length > 0 ? chartData : [{ x: 0, y: 0 }]}
+ data={
+ chartData.length > 0 ? chartData : [{ x: 0, y: 0, dataMin: 0, dataMax: 0, percent: 0 }]
+ }
curve={CurveType.CURVE_STEP_AFTER}
/>
diff --git a/x-pack/plugins/lens/public/pie_visualization/render_function.test.tsx b/x-pack/plugins/lens/public/pie_visualization/render_function.test.tsx
index ef160b1dd682b..8cd8e4f50d625 100644
--- a/x-pack/plugins/lens/public/pie_visualization/render_function.test.tsx
+++ b/x-pack/plugins/lens/public/pie_visualization/render_function.test.tsx
@@ -14,6 +14,7 @@ import {
ShapeTreeNode,
HierarchyOfArrays,
Chart,
+ PartialTheme,
} from '@elastic/charts';
import { shallow } from 'enzyme';
import type { LensMultiTable } from '../../common';
@@ -110,7 +111,7 @@ describe('PieVisualization component', () => {
test('it sets the correct lines per legend item', () => {
const component = shallow();
- expect(component.find(Settings).prop('theme')).toEqual({
+ expect(component.find(Settings).prop('theme')[0]).toMatchObject({
background: {
color: undefined,
},
@@ -395,7 +396,9 @@ describe('PieVisualization component', () => {
const component = shallow(
);
- expect(component.find(Partition).prop('config')?.outerSizeRatio).toBeCloseTo(1 / 1.05);
+ expect(
+ component.find(Settings).prop('theme')[0].partition?.outerSizeRatio
+ ).toBeCloseTo(1 / 1.05);
});
test('it should bound the shrink the chart area to ~20% when some small slices are detected', () => {
@@ -419,7 +422,9 @@ describe('PieVisualization component', () => {
const component = shallow(
);
- expect(component.find(Partition).prop('config')?.outerSizeRatio).toBeCloseTo(1 / 1.2);
+ expect(
+ component.find(Settings).prop('theme')[0].partition?.outerSizeRatio
+ ).toBeCloseTo(1 / 1.2);
});
});
});
diff --git a/x-pack/plugins/lens/public/pie_visualization/render_function.tsx b/x-pack/plugins/lens/public/pie_visualization/render_function.tsx
index 9fb016dc0a2d7..008ab9a9cae9e 100644
--- a/x-pack/plugins/lens/public/pie_visualization/render_function.tsx
+++ b/x-pack/plugins/lens/public/pie_visualization/render_function.tsx
@@ -8,19 +8,18 @@
import { uniq } from 'lodash';
import React from 'react';
import { FormattedMessage } from '@kbn/i18n-react';
+import { Required } from '@kbn/utility-types';
import { EuiText } from '@elastic/eui';
import {
Chart,
Datum,
LayerValue,
Partition,
- PartitionConfig,
PartitionLayer,
- PartitionFillLabel,
- RecursivePartial,
Position,
Settings,
ElementClickListener,
+ PartialTheme,
} from '@elastic/charts';
import { RenderMode } from 'src/plugins/expressions';
import type { LensFilterEvent } from '../types';
@@ -99,7 +98,7 @@ export function PieComponent(
});
}
- const fillLabel: Partial = {
+ const fillLabel: PartitionLayer['fillLabel'] = {
valueFont: {
fontWeight: 700,
},
@@ -202,42 +201,52 @@ export function PieComponent(
};
});
- const { legend, partitionType: partitionLayout, label: chartType } = PartitionChartsMeta[shape];
+ const { legend, partitionType, label: chartType } = PartitionChartsMeta[shape];
- const config: RecursivePartial = {
- partitionLayout,
- fontFamily: chartTheme.barSeriesStyle?.displayValue?.fontFamily,
- outerSizeRatio: 1,
- specialFirstInnermostSector: true,
- minFontSize: 10,
- maxFontSize: 16,
- // Labels are added outside the outer ring when the slice is too small
- linkLabel: {
- maxCount: 5,
- fontSize: 11,
- // Dashboard background color is affected by dark mode, which we need
- // to account for in outer labels
- // This does not handle non-dashboard embeddables, which are allowed to
- // have different backgrounds.
- textColor: chartTheme.axes?.axisTitle?.fill,
+ const themeOverrides: Required = {
+ chartMargins: { top: 0, bottom: 0, left: 0, right: 0 },
+ background: {
+ color: undefined, // removes background for embeddables
+ },
+ legend: {
+ labelOptions: { maxLines: truncateLegend ? legendMaxLines ?? 1 : 0 },
+ },
+ partition: {
+ fontFamily: chartTheme.barSeriesStyle?.displayValue?.fontFamily,
+ outerSizeRatio: 1,
+ minFontSize: 10,
+ maxFontSize: 16,
+ // Labels are added outside the outer ring when the slice is too small
+ linkLabel: {
+ maxCount: 5,
+ fontSize: 11,
+ // Dashboard background color is affected by dark mode, which we need
+ // to account for in outer labels
+ // This does not handle non-dashboard embeddables, which are allowed to
+ // have different backgrounds.
+ textColor: chartTheme.axes?.axisTitle?.fill,
+ },
+ sectorLineStroke: chartTheme.lineSeriesStyle?.point?.fill,
+ sectorLineWidth: 1.5,
+ circlePadding: 4,
},
- sectorLineStroke: chartTheme.lineSeriesStyle?.point?.fill,
- sectorLineWidth: 1.5,
- circlePadding: 4,
};
if (isTreemapOrMosaicShape(shape)) {
if (hideLabels || categoryDisplay === 'hide') {
- config.fillLabel = { textColor: 'rgba(0,0,0,0)' };
+ themeOverrides.partition.fillLabel = { textColor: 'rgba(0,0,0,0)' };
}
} else {
- config.emptySizeRatio = shape === 'donut' ? emptySizeRatio : 0;
+ themeOverrides.partition.emptySizeRatio = shape === 'donut' ? emptySizeRatio : 0;
if (hideLabels || categoryDisplay === 'hide') {
// Force all labels to be linked, then prevent links from showing
- config.linkLabel = { maxCount: 0, maximumSection: Number.POSITIVE_INFINITY };
+ themeOverrides.partition.linkLabel = {
+ maxCount: 0,
+ maximumSection: Number.POSITIVE_INFINITY,
+ };
} else if (categoryDisplay === 'inside') {
// Prevent links from showing
- config.linkLabel = { maxCount: 0 };
+ themeOverrides.partition.linkLabel = { maxCount: 0 };
} else {
// if it contains any slice below 2% reduce the ratio
// first step: sum it up the overall sum
@@ -246,7 +255,7 @@ export function PieComponent(
const smallSlices = slices.filter((value) => value < 0.02).length;
if (smallSlices) {
// shrink up to 20% to give some room for the linked values
- config.outerSizeRatio = 1 / (1 + Math.min(smallSlices * 0.05, 0.2));
+ themeOverrides.partition.outerSizeRatio = 1 / (1 + Math.min(smallSlices * 0.05, 0.2));
}
}
}
@@ -322,27 +331,19 @@ export function PieComponent(
legendMaxDepth={nestedLegend ? undefined : 1 /* Color is based only on first layer */}
onElementClick={props.interactive ?? true ? onElementClickHandler : undefined}
legendAction={props.interactive ? getLegendAction(firstTable, onClickValue) : undefined}
- theme={{
- ...chartTheme,
- background: {
- ...chartTheme.background,
- color: undefined, // removes background for embeddables
- },
- legend: {
- labelOptions: { maxLines: truncateLegend ? legendMaxLines ?? 1 : 0 },
- },
- }}
+ theme={[themeOverrides, chartTheme]}
baseTheme={chartBaseTheme}
/>
getSliceValue(d, metricColumn)}
percentFormatter={(d: number) => percentFormatter.convert(d / 100)}
valueGetter={hideLabels || numberDisplay === 'value' ? undefined : 'percent'}
valueFormatter={(d: number) => (hideLabels ? '' : formatters[metricColumn.id].convert(d))}
layers={layers}
- config={config}
topGroove={hideLabels || categoryDisplay === 'hide' ? 0 : undefined}
/>
diff --git a/x-pack/plugins/lens/public/xy_visualization/__snapshots__/expression.test.tsx.snap b/x-pack/plugins/lens/public/xy_visualization/__snapshots__/expression.test.tsx.snap
index e2566aa22ce9e..1402cd715283a 100644
--- a/x-pack/plugins/lens/public/xy_visualization/__snapshots__/expression.test.tsx.snap
+++ b/x-pack/plugins/lens/public/xy_visualization/__snapshots__/expression.test.tsx.snap
@@ -4,7 +4,7 @@ exports[`xy_expression XYChart component it renders area 1`] = `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- = T extends React.FunctionComponent ? P : T;
-type SeriesSpec = InferPropType &
- InferPropType &
- InferPropType;
+type SeriesSpec = LineSeriesProps & BarSeriesProps & AreaSeriesProps;
export type XYChartRenderProps = XYChartProps & {
chartsThemeService: ChartsPluginSetup['theme'];
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/total_feature_importance_summary/feature_importance_summary.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/total_feature_importance_summary/feature_importance_summary.tsx
index 8d5d4c5e4ca23..7d80b91f94c77 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/total_feature_importance_summary/feature_importance_summary.tsx
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/total_feature_importance_summary/feature_importance_summary.tsx
@@ -18,7 +18,7 @@ import {
RecursivePartial,
AxisStyle,
PartialTheme,
- BarSeriesSpec,
+ BarSeriesProps,
} from '@elastic/charts';
import { i18n } from '@kbn/i18n';
import { euiLightVars as euiVars } from '@kbn/ui-theme';
@@ -100,13 +100,18 @@ export const FeatureImportanceSummaryPanel: FC {
- let sortedData: Array<{
- featureName: string;
- meanImportance: number;
- className?: FeatureImportanceClassName;
- }> = [];
- let _barSeriesSpec: Partial = {
+ interface Datum {
+ featureName: string;
+ meanImportance: number;
+ className?: FeatureImportanceClassName;
+ }
+ type PlotData = Datum[];
+ type SeriesProps = Omit;
+ const [plotData, barSeriesSpec, showLegend, chartHeight] = useMemo<
+ [plotData: PlotData, barSeriesSpec: SeriesProps, showLegend?: boolean, chartHeight?: number]
+ >(() => {
+ let sortedData: PlotData = [];
+ let _barSeriesSpec: SeriesProps = {
xAccessor: 'featureName',
yAccessors: ['meanImportance'],
name: i18n.translate(
@@ -122,7 +127,7 @@ export const FeatureImportanceSummaryPanel: FC = ({
const showBrush = !!onCellsSelection;
- const swimLaneConfig = useMemo(() => {
+ const themeOverrides = useMemo(() => {
if (!showSwimlane) return {};
- const config: HeatmapSpec['config'] = {
- grid: {
- cellHeight: {
- min: CELL_HEIGHT,
- max: CELL_HEIGHT,
+ const theme: PartialTheme = {
+ heatmap: {
+ grid: {
+ cellHeight: {
+ min: CELL_HEIGHT,
+ max: CELL_HEIGHT,
+ },
+ stroke: {
+ width: 1,
+ color: euiTheme.euiBorderColor,
+ },
},
- stroke: {
- width: 1,
- color: euiTheme.euiBorderColor,
+ cell: {
+ maxWidth: 'fill',
+ maxHeight: 'fill',
+ label: {
+ visible: false,
+ },
+ border: {
+ stroke: euiTheme.euiBorderColor,
+ strokeWidth: 0,
+ },
},
- },
- cell: {
- maxWidth: 'fill',
- maxHeight: 'fill',
- label: {
- visible: false,
+ yAxisLabel: {
+ visible: showYAxis,
+ width: Y_AXIS_LABEL_WIDTH,
+ textColor: euiTheme.euiTextSubduedColor,
+ padding: Y_AXIS_LABEL_PADDING,
+ fontSize: parseInt(euiTheme.euiFontSizeXS, 10),
},
- border: {
- stroke: euiTheme.euiBorderColor,
- strokeWidth: 0,
+ xAxisLabel: {
+ visible: showTimeline,
+ textColor: euiTheme.euiTextSubduedColor,
+ fontSize: parseInt(euiTheme.euiFontSizeXS, 10),
+ // Required to calculate where the swimlane ends
+ width: X_AXIS_RIGHT_OVERFLOW * 2,
},
- },
- yAxisLabel: {
- visible: showYAxis,
- width: Y_AXIS_LABEL_WIDTH,
- textColor: euiTheme.euiTextSubduedColor,
- padding: Y_AXIS_LABEL_PADDING,
- formatter: (laneLabel: string) => {
- return laneLabel === '' ? EMPTY_FIELD_VALUE_LABEL : laneLabel;
+ brushMask: {
+ visible: showBrush,
+ fill: isDarkTheme ? 'rgb(30,31,35,80%)' : 'rgb(247,247,247,50%)',
},
- fontSize: parseInt(euiTheme.euiFontSizeXS, 10),
- },
- xAxisLabel: {
- visible: showTimeline,
- textColor: euiTheme.euiTextSubduedColor,
- formatter: (v: number) => {
- timeBuckets.setInterval(`${swimlaneData.interval}s`);
- const scaledDateFormat = timeBuckets.getScaledDateFormat();
- return moment(v).format(scaledDateFormat);
+ brushArea: {
+ visible: showBrush,
+ stroke: isDarkTheme ? 'rgb(255, 255, 255)' : 'rgb(105, 112, 125)',
},
- fontSize: parseInt(euiTheme.euiFontSizeXS, 10),
- // Required to calculate where the swimlane ends
- width: X_AXIS_RIGHT_OVERFLOW * 2,
- },
- brushMask: {
- visible: showBrush,
- fill: isDarkTheme ? 'rgb(30,31,35,80%)' : 'rgb(247,247,247,50%)',
- },
- brushArea: {
- visible: showBrush,
- stroke: isDarkTheme ? 'rgb(255, 255, 255)' : 'rgb(105, 112, 125)',
+ ...(showLegend ? { maxLegendHeight: LEGEND_HEIGHT } : {}),
},
- ...(showLegend ? { maxLegendHeight: LEGEND_HEIGHT } : {}),
- timeZone: 'UTC',
};
- return config;
+ return theme;
}, [
showSwimlane,
swimlaneType,
@@ -427,6 +421,7 @@ export const SwimlaneContainer: FC = ({
{showSwimlane && !isLoading && (
= ({
= ({
},
}}
ySortPredicate="dataIndex"
- config={swimLaneConfig}
+ yAxisLabelFormatter={(laneLabel) => {
+ return laneLabel === '' ? EMPTY_FIELD_VALUE_LABEL : String(laneLabel);
+ }}
+ xAxisLabelFormatter={(v) => {
+ timeBuckets.setInterval(`${swimlaneData.interval}s`);
+ const scaledDateFormat = timeBuckets.getScaledDateFormat();
+ return moment(v).format(scaledDateFormat);
+ }}
/>
)}
diff --git a/x-pack/plugins/observability/public/hooks/use_chart_theme.tsx b/x-pack/plugins/observability/public/hooks/use_chart_theme.tsx
index 02fc0ef32dde9..42ff021679ce0 100644
--- a/x-pack/plugins/observability/public/hooks/use_chart_theme.tsx
+++ b/x-pack/plugins/observability/public/hooks/use_chart_theme.tsx
@@ -5,34 +5,34 @@
* 2.0.
*/
+import { PartialTheme } from '@elastic/charts';
import { EUI_CHARTS_THEME_DARK, EUI_CHARTS_THEME_LIGHT } from '@elastic/eui/dist/eui_charts_theme';
import { useTheme } from './use_theme';
-export function useChartTheme() {
+export function useChartTheme(): PartialTheme[] {
const theme = useTheme();
const baseChartTheme = theme.darkMode
? EUI_CHARTS_THEME_DARK.theme
: EUI_CHARTS_THEME_LIGHT.theme;
- return {
- ...baseChartTheme,
- chartMargins: {
- left: 10,
- right: 10,
- top: 10,
- bottom: 10,
+ return [
+ {
+ chartMargins: {
+ left: 10,
+ right: 10,
+ top: 10,
+ bottom: 10,
+ },
+ background: {
+ color: 'transparent',
+ },
+ lineSeriesStyle: {
+ point: { visible: false },
+ },
+ areaSeriesStyle: {
+ point: { visible: false },
+ },
},
- background: {
- ...baseChartTheme.background,
- color: 'transparent',
- },
- lineSeriesStyle: {
- ...baseChartTheme.lineSeriesStyle,
- point: { visible: false },
- },
- areaSeriesStyle: {
- ...baseChartTheme.areaSeriesStyle,
- point: { visible: false },
- },
- };
+ baseChartTheme,
+ ];
}
diff --git a/x-pack/plugins/security_solution/public/common/components/charts/common.tsx b/x-pack/plugins/security_solution/public/common/components/charts/common.tsx
index ee292a66702e5..d7bafffec9a8f 100644
--- a/x-pack/plugins/security_solution/public/common/components/charts/common.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/charts/common.tsx
@@ -13,7 +13,7 @@ import {
Rendering,
Rotation,
ScaleType,
- SettingsSpecProps,
+ SettingsProps,
TickFormatter,
Position,
BrushEndListener,
@@ -52,7 +52,7 @@ export interface ChartSeriesConfigs {
tickSize?: number | undefined;
};
yAxisTitle?: string | undefined;
- settings?: Partial;
+ settings?: SettingsProps;
}
export interface ChartSeriesData {
diff --git a/x-pack/plugins/uptime/public/components/common/charts/__snapshots__/donut_chart.test.tsx.snap b/x-pack/plugins/uptime/public/components/common/charts/__snapshots__/donut_chart.test.tsx.snap
index 5f463751fae24..c90283a8386f4 100644
--- a/x-pack/plugins/uptime/public/components/common/charts/__snapshots__/donut_chart.test.tsx.snap
+++ b/x-pack/plugins/uptime/public/components/common/charts/__snapshots__/donut_chart.test.tsx.snap
@@ -15,530 +15,673 @@ exports[`DonutChart component passes correct props without errors for valid prop
>
+
-
-
+
diff --git a/x-pack/plugins/uptime/public/components/common/charts/donut_chart.tsx b/x-pack/plugins/uptime/public/components/common/charts/donut_chart.tsx
index 007ec8f737852..3638b52e39783 100644
--- a/x-pack/plugins/uptime/public/components/common/charts/donut_chart.tsx
+++ b/x-pack/plugins/uptime/public/components/common/charts/donut_chart.tsx
@@ -9,7 +9,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiIcon } from '@elastic/eui';
import React, { useContext } from 'react';
import { i18n } from '@kbn/i18n';
import styled from 'styled-components';
-import { Chart, Datum, Partition, Settings, PartitionLayout } from '@elastic/charts';
+import { Chart, Datum, Partition, Settings, PartitionLayout, PartialTheme } from '@elastic/charts';
import { DonutChartLegend } from './donut_chart_legend';
import { UptimeThemeContext } from '../../../contexts';
@@ -28,6 +28,19 @@ export const GreenCheckIcon = styled(EuiIcon)`
position: absolute;
`;
+const themeOverrides: PartialTheme = {
+ chartMargins: { top: 0, bottom: 0, left: 0, right: 0 },
+ partition: {
+ linkLabel: {
+ maximumSection: Infinity,
+ },
+ idealFontSizeJump: 1.1,
+ outerSizeRatio: 0.9,
+ emptySizeRatio: 0.4,
+ circlePadding: 4,
+ },
+};
+
export const DonutChart = ({ height, down, up }: DonutChartProps) => {
const {
colors: { danger, gray },
@@ -44,15 +57,18 @@ export const DonutChart = ({ height, down, up }: DonutChartProps) => {
'Pie chart showing the current status. {down} of {total} monitors are down.',
values: { down, total: up + down },
})}
- {...chartTheme}
>
-
+
d.value as number}
layers={[
{
@@ -65,17 +81,6 @@ export const DonutChart = ({ height, down, up }: DonutChartProps) => {
},
},
]}
- config={{
- partitionLayout: PartitionLayout.sunburst,
- linkLabel: {
- maximumSection: Infinity,
- },
- margin: { top: 0, bottom: 0, left: 0, right: 0 },
- idealFontSizeJump: 1.1,
- outerSizeRatio: 0.9,
- emptySizeRatio: 0.4,
- circlePadding: 4,
- }}
/>
{down === 0 && }
diff --git a/yarn.lock b/yarn.lock
index 50a4bdea73c76..c92b32c7d0451 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1431,10 +1431,10 @@
dependencies:
object-hash "^1.3.0"
-"@elastic/charts@40.2.0":
- version "40.2.0"
- resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-40.2.0.tgz#2e329ce4f495731f478cbaf2f8f3b89b5167a65b"
- integrity sha512-N0t7YK58Kce/s9LEgaocrD75NYuFMwrcI1QNIPcwZ9IAOHY8/9yRHD5Ipoz0caGibAgOE8OunGkpyPY/NHKB5Q==
+"@elastic/charts@43.1.1":
+ version "43.1.1"
+ resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-43.1.1.tgz#2a9cd4bbde9397b86a45d8aa604a1950ae0997c0"
+ integrity sha512-lYTdwpARIDXD15iC4cujKplBhGXb3zriBATp0wFsqgT9XE9TMOzlQ9dgylWQ+2x6OlataZLrOMnWXiFQ3uJqqQ==
dependencies:
"@popperjs/core" "^2.4.0"
chroma-js "^2.1.0"
From 95e6dd695e09d4853a2cae4ffcce233bbddaf2e4 Mon Sep 17 00:00:00 2001
From: Robert Oskamp
Date: Thu, 27 Jan 2022 13:20:56 +0100
Subject: [PATCH 03/45] [ML] Add codeowner for docs screenshots (#123901)
This PR adds elastic/ml-ui as code owner for the ML specific bits of the screenshot_creation directory.
---
.github/CODEOWNERS | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index f218cffe032b8..dee16cf2fa94c 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -184,6 +184,8 @@
/x-pack/test/functional_with_es_ssl/apps/ml/ @elastic/ml-ui
/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/ml_rule_types/ @elastic/ml-ui
/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/transform_rule_types/ @elastic/ml-ui
+/x-pack/test/screenshot_creation/apps/ml_docs @elastic/ml-ui
+/x-pack/test/screenshot_creation/services/ml_screenshots.ts @elastic/ml-ui
# ML team owns and maintains the transform plugin despite it living in the Data management section.
/x-pack/plugins/transform/ @elastic/ml-ui
From e0bbd3c4e4929dfe5e0c989309fa808ae78e62b4 Mon Sep 17 00:00:00 2001
From: Joe Reuter
Date: Thu, 27 Jan 2022 13:32:00 +0100
Subject: [PATCH 04/45] [Lens] Filtered field list using field caps API
(#122915)
---
x-pack/plugins/lens/kibana.json | 1 +
x-pack/plugins/lens/server/plugin.tsx | 4 +
.../server/routes/existing_fields.test.ts | 46 ++-
.../lens/server/routes/existing_fields.ts | 143 +++++--
x-pack/plugins/lens/server/ui_settings.ts | 31 ++
.../apis/lens/existing_fields.ts | 268 ++++---------
.../test/api_integration/apis/lens/index.ts | 1 +
.../apis/lens/legacy_existing_fields.ts | 269 +++++++++++++
.../lens/constant_keyword/data.json | 25 ++
.../lens/constant_keyword/mappings.json | 59 +++
.../kbn_archiver/lens/constant_keyword.json | 16 +
.../functional/apps/lens/drag_and_drop.ts | 2 +
.../test/functional/apps/lens/epoch_millis.ts | 4 +-
.../es_archives/lens/epoch_millis/data.json | 4 +-
.../lens/epoch_millis/mappings.json | 377 +++++++++++++++++-
.../kbn_archiver/lens/epoch_millis.json | 2 +-
16 files changed, 1012 insertions(+), 240 deletions(-)
create mode 100644 x-pack/plugins/lens/server/ui_settings.ts
create mode 100644 x-pack/test/api_integration/apis/lens/legacy_existing_fields.ts
create mode 100644 x-pack/test/api_integration/es_archives/lens/constant_keyword/data.json
create mode 100644 x-pack/test/api_integration/es_archives/lens/constant_keyword/mappings.json
create mode 100644 x-pack/test/api_integration/fixtures/kbn_archiver/lens/constant_keyword.json
diff --git a/x-pack/plugins/lens/kibana.json b/x-pack/plugins/lens/kibana.json
index 884b17a085ad6..1debe6e6141b2 100644
--- a/x-pack/plugins/lens/kibana.json
+++ b/x-pack/plugins/lens/kibana.json
@@ -6,6 +6,7 @@
"ui": true,
"requiredPlugins": [
"data",
+ "dataViews",
"charts",
"expressions",
"fieldFormats",
diff --git a/x-pack/plugins/lens/server/plugin.tsx b/x-pack/plugins/lens/server/plugin.tsx
index 3f0a41efc21c7..5f8f15b21ff94 100644
--- a/x-pack/plugins/lens/server/plugin.tsx
+++ b/x-pack/plugins/lens/server/plugin.tsx
@@ -7,6 +7,7 @@
import { Plugin, CoreSetup, CoreStart, PluginInitializerContext, Logger } from 'src/core/server';
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
+import { PluginStart as DataViewsServerPluginStart } from 'src/plugins/data_views/server';
import {
PluginStart as DataPluginStart,
PluginSetup as DataPluginSetup,
@@ -15,6 +16,7 @@ import { ExpressionsServerSetup } from 'src/plugins/expressions/server';
import { FieldFormatsStart } from 'src/plugins/field_formats/server';
import { TaskManagerSetupContract, TaskManagerStartContract } from '../../task_manager/server';
import { setupRoutes } from './routes';
+import { getUiSettings } from './ui_settings';
import {
registerLensUsageCollector,
initializeLensTelemetry,
@@ -37,6 +39,7 @@ export interface PluginStartContract {
taskManager?: TaskManagerStartContract;
fieldFormats: FieldFormatsStart;
data: DataPluginStart;
+ dataViews: DataViewsServerPluginStart;
}
export interface LensServerPluginSetup {
@@ -55,6 +58,7 @@ export class LensServerPlugin implements Plugin {
+ it('should remove missing fields by matching names', () => {
+ expect(
+ existingFields(
+ [
+ { name: 'a', aggregatable: true, searchable: true, type: 'string' },
+ { name: 'b', aggregatable: true, searchable: true, type: 'string' },
+ ],
+ [
+ { name: 'a', isScript: false, isMeta: false },
+ { name: 'b', isScript: false, isMeta: true },
+ { name: 'c', isScript: false, isMeta: false },
+ ]
+ )
+ ).toEqual(['a', 'b']);
+ });
+
+ it('should keep scripted and runtime fields', () => {
+ expect(
+ existingFields(
+ [{ name: 'a', aggregatable: true, searchable: true, type: 'string' }],
+ [
+ { name: 'a', isScript: false, isMeta: false },
+ { name: 'b', isScript: true, isMeta: false },
+ { name: 'c', runtimeField: { type: 'keyword' }, isMeta: false, isScript: false },
+ { name: 'd', isMeta: true, isScript: false },
+ ]
+ )
+ ).toEqual(['a', 'b', 'c']);
+ });
+});
+
+describe('legacyExistingFields', () => {
function field(opts: string | Partial): Field {
const obj = typeof opts === 'object' ? opts : {};
const name = (typeof opts === 'string' ? opts : opts.name) || 'test';
@@ -26,7 +58,7 @@ describe('existingFields', () => {
}
it('should handle root level fields', () => {
- const result = existingFields(
+ const result = legacyExistingFields(
[searchResults({ foo: ['bar'] }), searchResults({ baz: [0] })],
[field('foo'), field('bar'), field('baz')]
);
@@ -35,7 +67,7 @@ describe('existingFields', () => {
});
it('should handle basic arrays, ignoring empty ones', () => {
- const result = existingFields(
+ const result = legacyExistingFields(
[searchResults({ stuff: ['heyo', 'there'], empty: [] })],
[field('stuff'), field('empty')]
);
@@ -44,7 +76,7 @@ describe('existingFields', () => {
});
it('should handle objects with dotted fields', () => {
- const result = existingFields(
+ const result = legacyExistingFields(
[searchResults({ 'geo.country_name': ['US'] })],
[field('geo.country_name')]
);
@@ -53,7 +85,7 @@ describe('existingFields', () => {
});
it('supports scripted fields', () => {
- const result = existingFields(
+ const result = legacyExistingFields(
[searchResults({ bar: ['scriptvalue'] })],
[field({ name: 'bar', isScript: true })]
);
@@ -62,7 +94,7 @@ describe('existingFields', () => {
});
it('supports runtime fields', () => {
- const result = existingFields(
+ const result = legacyExistingFields(
[searchResults({ runtime_foo: ['scriptvalue'] })],
[
field({
@@ -76,7 +108,7 @@ describe('existingFields', () => {
});
it('supports meta fields', () => {
- const result = existingFields(
+ const result = legacyExistingFields(
[
{
// @ts-expect-error _mymeta is not defined on estypes.SearchHit
diff --git a/x-pack/plugins/lens/server/routes/existing_fields.ts b/x-pack/plugins/lens/server/routes/existing_fields.ts
index 3a57a77a97726..0ee1d92d1b4ec 100644
--- a/x-pack/plugins/lens/server/routes/existing_fields.ts
+++ b/x-pack/plugins/lens/server/routes/existing_fields.ts
@@ -11,9 +11,11 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { schema } from '@kbn/config-schema';
import { RequestHandlerContext, ElasticsearchClient } from 'src/core/server';
import { CoreSetup, Logger } from 'src/core/server';
-import { IndexPattern, IndexPatternsService, RuntimeField } from 'src/plugins/data/common';
+import { RuntimeField } from 'src/plugins/data/common';
+import { DataViewsService, DataView, FieldSpec } from 'src/plugins/data_views/common';
import { BASE_API_URL } from '../../common';
import { UI_SETTINGS } from '../../../../../src/plugins/data/server';
+import { FIELD_EXISTENCE_SETTING } from '../ui_settings';
import { PluginStartContract } from '../plugin';
export function isBoomError(error: { isBoom?: boolean }): error is Boom.Boom {
@@ -53,24 +55,24 @@ export async function existingFieldsRoute(setup: CoreSetup,
},
},
async (context, req, res) => {
- const [{ savedObjects, elasticsearch, uiSettings }, { data }] =
+ const [{ savedObjects, elasticsearch, uiSettings }, { dataViews }] =
await setup.getStartServices();
const savedObjectsClient = savedObjects.getScopedClient(req);
- const includeFrozen: boolean = await uiSettings
- .asScopedToClient(savedObjectsClient)
- .get(UI_SETTINGS.SEARCH_INCLUDE_FROZEN);
+ const uiSettingsClient = uiSettings.asScopedToClient(savedObjectsClient);
+ const [includeFrozen, useSampling]: boolean[] = await Promise.all([
+ uiSettingsClient.get(UI_SETTINGS.SEARCH_INCLUDE_FROZEN),
+ uiSettingsClient.get(FIELD_EXISTENCE_SETTING),
+ ]);
const esClient = elasticsearch.client.asScoped(req).asCurrentUser;
try {
return res.ok({
body: await fetchFieldExistence({
...req.params,
...req.body,
- indexPatternsService: await data.indexPatterns.indexPatternsServiceFactory(
- savedObjectsClient,
- esClient
- ),
+ dataViewsService: await dataViews.dataViewsServiceFactory(savedObjectsClient, esClient),
context,
includeFrozen,
+ useSampling,
}),
});
} catch (e) {
@@ -103,16 +105,64 @@ export async function existingFieldsRoute(setup: CoreSetup,
async function fetchFieldExistence({
context,
indexPatternId,
- indexPatternsService,
+ dataViewsService,
dslQuery = { match_all: {} },
fromDate,
toDate,
timeFieldName,
includeFrozen,
+ useSampling,
}: {
indexPatternId: string;
context: RequestHandlerContext;
- indexPatternsService: IndexPatternsService;
+ dataViewsService: DataViewsService;
+ dslQuery: object;
+ fromDate?: string;
+ toDate?: string;
+ timeFieldName?: string;
+ includeFrozen: boolean;
+ useSampling: boolean;
+}) {
+ if (useSampling) {
+ return legacyFetchFieldExistenceSampling({
+ context,
+ indexPatternId,
+ dataViewsService,
+ dslQuery,
+ fromDate,
+ toDate,
+ timeFieldName,
+ includeFrozen,
+ });
+ }
+
+ const metaFields: string[] = await context.core.uiSettings.client.get(UI_SETTINGS.META_FIELDS);
+ const dataView = await dataViewsService.get(indexPatternId);
+ const allFields = buildFieldList(dataView, metaFields);
+ const existingFieldList = await dataViewsService.getFieldsForIndexPattern(dataView, {
+ // filled in by data views service
+ pattern: '',
+ filter: toQuery(timeFieldName, fromDate, toDate, dslQuery),
+ });
+ return {
+ indexPatternTitle: dataView.title,
+ existingFieldNames: existingFields(existingFieldList, allFields),
+ };
+}
+
+async function legacyFetchFieldExistenceSampling({
+ context,
+ indexPatternId,
+ dataViewsService,
+ dslQuery,
+ fromDate,
+ toDate,
+ timeFieldName,
+ includeFrozen,
+}: {
+ indexPatternId: string;
+ context: RequestHandlerContext;
+ dataViewsService: DataViewsService;
dslQuery: object;
fromDate?: string;
toDate?: string;
@@ -120,7 +170,7 @@ async function fetchFieldExistence({
includeFrozen: boolean;
}) {
const metaFields: string[] = await context.core.uiSettings.client.get(UI_SETTINGS.META_FIELDS);
- const indexPattern = await indexPatternsService.get(indexPatternId);
+ const indexPattern = await dataViewsService.get(indexPatternId);
const fields = buildFieldList(indexPattern, metaFields);
const docs = await fetchIndexPatternStats({
@@ -136,14 +186,14 @@ async function fetchFieldExistence({
return {
indexPatternTitle: indexPattern.title,
- existingFieldNames: existingFields(docs, fields),
+ existingFieldNames: legacyExistingFields(docs, fields),
};
}
/**
* Exported only for unit tests.
*/
-export function buildFieldList(indexPattern: IndexPattern, metaFields: string[]): Field[] {
+export function buildFieldList(indexPattern: DataView, metaFields: string[]): Field[] {
return indexPattern.fields.map((field) => {
return {
name: field.name,
@@ -177,27 +227,7 @@ async function fetchIndexPatternStats({
fields: Field[];
includeFrozen: boolean;
}) {
- const filter =
- timeFieldName && fromDate && toDate
- ? [
- {
- range: {
- [timeFieldName]: {
- format: 'strict_date_optional_time',
- gte: fromDate,
- lte: toDate,
- },
- },
- },
- dslQuery,
- ]
- : [dslQuery];
-
- const query = {
- bool: {
- filter,
- },
- };
+ const query = toQuery(timeFieldName, fromDate, toDate, dslQuery);
const scriptedFields = fields.filter((f) => f.isScript);
const runtimeFields = fields.filter((f) => f.runtimeField);
@@ -242,10 +272,51 @@ async function fetchIndexPatternStats({
return result.hits.hits;
}
+function toQuery(
+ timeFieldName: string | undefined,
+ fromDate: string | undefined,
+ toDate: string | undefined,
+ dslQuery: object
+) {
+ const filter =
+ timeFieldName && fromDate && toDate
+ ? [
+ {
+ range: {
+ [timeFieldName]: {
+ format: 'strict_date_optional_time',
+ gte: fromDate,
+ lte: toDate,
+ },
+ },
+ },
+ dslQuery,
+ ]
+ : [dslQuery];
+
+ const query = {
+ bool: {
+ filter,
+ },
+ };
+ return query;
+}
+
+/**
+ * Exported only for unit tests.
+ */
+export function existingFields(filteredFields: FieldSpec[], allFields: Field[]): string[] {
+ const filteredFieldsSet = new Set(filteredFields.map((f) => f.name));
+
+ return allFields
+ .filter((field) => field.isScript || field.runtimeField || filteredFieldsSet.has(field.name))
+ .map((f) => f.name);
+}
+
/**
* Exported only for unit tests.
*/
-export function existingFields(docs: estypes.SearchHit[], fields: Field[]): string[] {
+export function legacyExistingFields(docs: estypes.SearchHit[], fields: Field[]): string[] {
const missingFields = new Set(fields);
for (const doc of docs) {
diff --git a/x-pack/plugins/lens/server/ui_settings.ts b/x-pack/plugins/lens/server/ui_settings.ts
new file mode 100644
index 0000000000000..63f16f3aeebb7
--- /dev/null
+++ b/x-pack/plugins/lens/server/ui_settings.ts
@@ -0,0 +1,31 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { i18n } from '@kbn/i18n';
+import { schema } from '@kbn/config-schema';
+
+import { UiSettingsParams } from 'kibana/server';
+
+export const FIELD_EXISTENCE_SETTING = 'lens:useFieldExistenceSampling';
+
+export const getUiSettings: () => Record = () => ({
+ [FIELD_EXISTENCE_SETTING]: {
+ name: i18n.translate('xpack.lens.advancedSettings.useFieldExistenceSampling.title', {
+ defaultMessage: 'Use field existence sampling',
+ }),
+ value: false,
+ description: i18n.translate(
+ 'xpack.lens.advancedSettings.useFieldExistenceSampling.description',
+ {
+ defaultMessage:
+ 'If enabled, document sampling is used to determine field existence (available or empty) for the Lens field list instead of relying on index mappings.',
+ }
+ ),
+ category: ['visualization'],
+ schema: schema.boolean(),
+ },
+});
diff --git a/x-pack/test/api_integration/apis/lens/existing_fields.ts b/x-pack/test/api_integration/apis/lens/existing_fields.ts
index 952659c2960d4..e51980e47fd06 100644
--- a/x-pack/test/api_integration/apis/lens/existing_fields.ts
+++ b/x-pack/test/api_integration/apis/lens/existing_fields.ts
@@ -9,171 +9,46 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';
-const TEST_START_TIME = '2015-09-19T06:31:44.000';
-const TEST_END_TIME = '2015-09-23T18:31:44.000';
+const TEST_START_TIME = '2010-09-19T06:31:44.000';
+const TEST_END_TIME = '2023-09-23T18:31:44.000';
const COMMON_HEADERS = {
'kbn-xsrf': 'some-xsrf-token',
};
+const metaFields = ['_id', '_index', '_score', '_source', '_type'];
const fieldsWithData = [
- '@message',
- '@message.raw',
- '@tags',
- '@tags.raw',
- '@timestamp',
- '_id',
- '_index',
- 'agent',
- 'agent.raw',
- 'bytes',
- 'clientip',
- 'extension',
- 'extension.raw',
- 'geo.coordinates',
- 'geo.dest',
- 'geo.src',
- 'geo.srcdest',
- 'headings',
- 'headings.raw',
- 'host',
- 'host.raw',
- 'index',
- 'index.raw',
- 'ip',
- 'links',
- 'links.raw',
- 'machine.os',
- 'machine.os.raw',
- 'machine.ram',
- 'machine.ram_range',
- 'memory',
- 'phpmemory',
- 'referer',
- 'request',
- 'request.raw',
- 'response',
- 'response.raw',
- 'spaces',
- 'spaces.raw',
- 'type',
- 'url',
- 'url.raw',
- 'utc_time',
- 'xss',
- 'xss.raw',
- 'runtime_number',
-
- 'relatedContent.article:modified_time',
- 'relatedContent.article:published_time',
- 'relatedContent.article:section',
- 'relatedContent.article:section.raw',
- 'relatedContent.article:tag',
- 'relatedContent.article:tag.raw',
- 'relatedContent.og:description',
- 'relatedContent.og:description.raw',
- 'relatedContent.og:image',
- 'relatedContent.og:image.raw',
- 'relatedContent.og:image:height',
- 'relatedContent.og:image:height.raw',
- 'relatedContent.og:image:width',
- 'relatedContent.og:image:width.raw',
- 'relatedContent.og:site_name',
- 'relatedContent.og:site_name.raw',
- 'relatedContent.og:title',
- 'relatedContent.og:title.raw',
- 'relatedContent.og:type',
- 'relatedContent.og:type.raw',
- 'relatedContent.og:url',
- 'relatedContent.og:url.raw',
- 'relatedContent.twitter:card',
- 'relatedContent.twitter:card.raw',
- 'relatedContent.twitter:description',
- 'relatedContent.twitter:description.raw',
- 'relatedContent.twitter:image',
- 'relatedContent.twitter:image.raw',
- 'relatedContent.twitter:site',
- 'relatedContent.twitter:site.raw',
- 'relatedContent.twitter:title',
- 'relatedContent.twitter:title.raw',
- 'relatedContent.url',
- 'relatedContent.url.raw',
-];
-
-const metricBeatData = [
- '@timestamp',
- '_id',
- '_index',
- 'agent.ephemeral_id',
- 'agent.ephemeral_id.keyword',
- 'agent.hostname',
- 'agent.hostname.keyword',
- 'agent.id',
- 'agent.id.keyword',
- 'agent.type',
- 'agent.type.keyword',
- 'agent.version',
- 'agent.version.keyword',
- 'ecs.version',
- 'ecs.version.keyword',
- 'event.dataset',
- 'event.dataset.keyword',
- 'event.duration',
- 'event.module',
- 'event.module.keyword',
- 'host.architecture',
- 'host.architecture.keyword',
- 'host.hostname',
- 'host.hostname.keyword',
- 'host.id',
- 'host.id.keyword',
- 'host.name',
- 'host.name.keyword',
- 'host.os.build',
- 'host.os.build.keyword',
- 'host.os.family',
- 'host.os.family.keyword',
- 'host.os.kernel',
- 'host.os.kernel.keyword',
- 'host.os.name',
- 'host.os.name.keyword',
- 'host.os.platform',
- 'host.os.platform.keyword',
- 'host.os.version',
- 'host.os.version.keyword',
- 'metricset.name',
- 'metricset.name.keyword',
- 'service.type',
- 'service.type.keyword',
- 'system.cpu.cores',
- 'system.cpu.idle.pct',
- 'system.cpu.iowait.pct',
- 'system.cpu.irq.pct',
- 'system.cpu.nice.pct',
- 'system.cpu.softirq.pct',
- 'system.cpu.steal.pct',
- 'system.cpu.system.pct',
- 'system.cpu.total.pct',
- 'system.cpu.user.pct',
+ 'ts',
+ 'filter_field',
+ 'textfield1',
+ 'textfield2',
+ 'mapping_runtime_field',
+ 'data_view_runtime_field',
];
export default ({ getService }: FtrProviderContext) => {
const esArchiver = getService('esArchiver');
const supertest = getService('supertest');
+ const kibanaServer = getService('kibanaServer');
describe('existing_fields apis', () => {
before(async () => {
- await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');
- await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/visualize/default');
+ await esArchiver.load('x-pack/test/api_integration/es_archives/lens/constant_keyword');
+ await kibanaServer.importExport.load(
+ 'x-pack/test/api_integration/fixtures/kbn_archiver/lens/constant_keyword.json'
+ );
});
+
after(async () => {
- await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
- await esArchiver.unload('x-pack/test/functional/es_archives/visualize/default');
+ await esArchiver.unload('x-pack/test/api_integration/es_archives/lens/constant_keyword');
+ await kibanaServer.importExport.unload(
+ 'x-pack/test/api_integration/fixtures/kbn_archiver/lens/constant_keyword.json'
+ );
});
describe('existence', () => {
it('should find which fields exist in the sample documents', async () => {
const { body } = await supertest
- .post(`/api/lens/existing_fields/${encodeURIComponent('logstash-*')}`)
+ .post(`/api/lens/existing_fields/existence_index`)
.set(COMMON_HEADERS)
.send({
dslQuery: {
@@ -186,76 +61,89 @@ export default ({ getService }: FtrProviderContext) => {
})
.expect(200);
- expect(body.indexPatternTitle).to.eql('logstash-*');
- expect(body.existingFieldNames.sort()).to.eql(fieldsWithData.sort());
+ expect(body.indexPatternTitle).to.eql('existence_index_*');
+ expect(body.existingFieldNames.sort()).to.eql([...metaFields, ...fieldsWithData].sort());
});
- it('should succeed for thousands of fields', async () => {
+ it('should return fields filtered by term query', async () => {
+ const expectedFieldNames = [
+ 'ts',
+ 'filter_field',
+ 'textfield1',
+ // textfield2 and mapping_runtime_field are defined on the other index
+ 'data_view_runtime_field',
+ ];
+
const { body } = await supertest
- .post(`/api/lens/existing_fields/${encodeURIComponent('metricbeat-*')}`)
+ .post(`/api/lens/existing_fields/existence_index`)
.set(COMMON_HEADERS)
.send({
- dslQuery: { match_all: {} },
+ dslQuery: {
+ bool: {
+ filter: [{ term: { filter_field: 'a' } }],
+ },
+ },
fromDate: TEST_START_TIME,
toDate: TEST_END_TIME,
})
.expect(200);
-
- expect(body.indexPatternTitle).to.eql('metricbeat-*');
- expect(body.existingFieldNames.sort()).to.eql(metricBeatData.sort());
+ expect(body.existingFieldNames.sort()).to.eql(
+ [...metaFields, ...expectedFieldNames].sort()
+ );
});
- it('should return fields filtered by query and filters', async () => {
+ it('should return fields filtered by match_phrase query', async () => {
const expectedFieldNames = [
- '@message',
- '@message.raw',
- '@tags',
- '@tags.raw',
- '@timestamp',
- '_id',
- '_index',
- 'agent',
- 'agent.raw',
- 'bytes',
- 'clientip',
- 'extension',
- 'extension.raw',
- 'headings',
- 'headings.raw',
- 'host',
- 'host.raw',
- 'index',
- 'index.raw',
- 'referer',
- 'request',
- 'request.raw',
- 'response',
- 'response.raw',
- 'runtime_number',
- 'spaces',
- 'spaces.raw',
- 'type',
- 'url',
- 'url.raw',
- 'utc_time',
- 'xss',
- 'xss.raw',
+ 'ts',
+ 'filter_field',
+ 'textfield1',
+ // textfield2 and mapping_runtime_field are defined on the other index
+ 'data_view_runtime_field',
];
const { body } = await supertest
- .post(`/api/lens/existing_fields/${encodeURIComponent('logstash-*')}`)
+ .post(`/api/lens/existing_fields/existence_index`)
.set(COMMON_HEADERS)
.send({
dslQuery: {
bool: {
- filter: [{ match: { referer: 'https://www.taylorswift.com/' } }],
+ filter: [{ match_phrase: { filter_field: 'a' } }],
},
},
fromDate: TEST_START_TIME,
toDate: TEST_END_TIME,
})
.expect(200);
- expect(body.existingFieldNames.sort()).to.eql(expectedFieldNames.sort());
+ expect(body.existingFieldNames.sort()).to.eql(
+ [...metaFields, ...expectedFieldNames].sort()
+ );
+ });
+
+ it('should return fields filtered by time range', async () => {
+ const expectedFieldNames = [
+ 'ts',
+ 'filter_field',
+ 'textfield1',
+ // textfield2 and mapping_runtime_field are defined on the other index
+ 'data_view_runtime_field',
+ ];
+
+ const { body } = await supertest
+ .post(`/api/lens/existing_fields/existence_index`)
+ .set(COMMON_HEADERS)
+ .send({
+ dslQuery: {
+ bool: {
+ filter: [{ term: { filter_field: 'a' } }],
+ },
+ },
+ fromDate: TEST_START_TIME,
+ toDate: '2021-12-12',
+ })
+ .expect(200);
+ expect(body.existingFieldNames.sort()).to.eql(
+ [...metaFields, ...expectedFieldNames].sort()
+ );
});
});
});
diff --git a/x-pack/test/api_integration/apis/lens/index.ts b/x-pack/test/api_integration/apis/lens/index.ts
index 5b51f2dbd94e3..04508f011158a 100644
--- a/x-pack/test/api_integration/apis/lens/index.ts
+++ b/x-pack/test/api_integration/apis/lens/index.ts
@@ -10,6 +10,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function lensApiIntegrationTests({ loadTestFile }: FtrProviderContext) {
describe('Lens', () => {
loadTestFile(require.resolve('./existing_fields'));
+ loadTestFile(require.resolve('./legacy_existing_fields'));
loadTestFile(require.resolve('./field_stats'));
loadTestFile(require.resolve('./telemetry'));
});
diff --git a/x-pack/test/api_integration/apis/lens/legacy_existing_fields.ts b/x-pack/test/api_integration/apis/lens/legacy_existing_fields.ts
new file mode 100644
index 0000000000000..370807c99d806
--- /dev/null
+++ b/x-pack/test/api_integration/apis/lens/legacy_existing_fields.ts
@@ -0,0 +1,269 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import expect from '@kbn/expect';
+
+import { FtrProviderContext } from '../../ftr_provider_context';
+
+const TEST_START_TIME = '2015-09-19T06:31:44.000';
+const TEST_END_TIME = '2015-09-23T18:31:44.000';
+const COMMON_HEADERS = {
+ 'kbn-xsrf': 'some-xsrf-token',
+};
+
+const fieldsWithData = [
+ '@message',
+ '@message.raw',
+ '@tags',
+ '@tags.raw',
+ '@timestamp',
+ '_id',
+ '_index',
+ 'agent',
+ 'agent.raw',
+ 'bytes',
+ 'clientip',
+ 'extension',
+ 'extension.raw',
+ 'geo.coordinates',
+ 'geo.dest',
+ 'geo.src',
+ 'geo.srcdest',
+ 'headings',
+ 'headings.raw',
+ 'host',
+ 'host.raw',
+ 'index',
+ 'index.raw',
+ 'ip',
+ 'links',
+ 'links.raw',
+ 'machine.os',
+ 'machine.os.raw',
+ 'machine.ram',
+ 'machine.ram_range',
+ 'memory',
+ 'phpmemory',
+ 'referer',
+ 'request',
+ 'request.raw',
+ 'response',
+ 'response.raw',
+ 'spaces',
+ 'spaces.raw',
+ 'type',
+ 'url',
+ 'url.raw',
+ 'utc_time',
+ 'xss',
+ 'xss.raw',
+ 'runtime_number',
+
+ 'relatedContent.article:modified_time',
+ 'relatedContent.article:published_time',
+ 'relatedContent.article:section',
+ 'relatedContent.article:section.raw',
+ 'relatedContent.article:tag',
+ 'relatedContent.article:tag.raw',
+ 'relatedContent.og:description',
+ 'relatedContent.og:description.raw',
+ 'relatedContent.og:image',
+ 'relatedContent.og:image.raw',
+ 'relatedContent.og:image:height',
+ 'relatedContent.og:image:height.raw',
+ 'relatedContent.og:image:width',
+ 'relatedContent.og:image:width.raw',
+ 'relatedContent.og:site_name',
+ 'relatedContent.og:site_name.raw',
+ 'relatedContent.og:title',
+ 'relatedContent.og:title.raw',
+ 'relatedContent.og:type',
+ 'relatedContent.og:type.raw',
+ 'relatedContent.og:url',
+ 'relatedContent.og:url.raw',
+ 'relatedContent.twitter:card',
+ 'relatedContent.twitter:card.raw',
+ 'relatedContent.twitter:description',
+ 'relatedContent.twitter:description.raw',
+ 'relatedContent.twitter:image',
+ 'relatedContent.twitter:image.raw',
+ 'relatedContent.twitter:site',
+ 'relatedContent.twitter:site.raw',
+ 'relatedContent.twitter:title',
+ 'relatedContent.twitter:title.raw',
+ 'relatedContent.url',
+ 'relatedContent.url.raw',
+];
+
+const metricBeatData = [
+ '@timestamp',
+ '_id',
+ '_index',
+ 'agent.ephemeral_id',
+ 'agent.ephemeral_id.keyword',
+ 'agent.hostname',
+ 'agent.hostname.keyword',
+ 'agent.id',
+ 'agent.id.keyword',
+ 'agent.type',
+ 'agent.type.keyword',
+ 'agent.version',
+ 'agent.version.keyword',
+ 'ecs.version',
+ 'ecs.version.keyword',
+ 'event.dataset',
+ 'event.dataset.keyword',
+ 'event.duration',
+ 'event.module',
+ 'event.module.keyword',
+ 'host.architecture',
+ 'host.architecture.keyword',
+ 'host.hostname',
+ 'host.hostname.keyword',
+ 'host.id',
+ 'host.id.keyword',
+ 'host.name',
+ 'host.name.keyword',
+ 'host.os.build',
+ 'host.os.build.keyword',
+ 'host.os.family',
+ 'host.os.family.keyword',
+ 'host.os.kernel',
+ 'host.os.kernel.keyword',
+ 'host.os.name',
+ 'host.os.name.keyword',
+ 'host.os.platform',
+ 'host.os.platform.keyword',
+ 'host.os.version',
+ 'host.os.version.keyword',
+ 'metricset.name',
+ 'metricset.name.keyword',
+ 'service.type',
+ 'service.type.keyword',
+ 'system.cpu.cores',
+ 'system.cpu.idle.pct',
+ 'system.cpu.iowait.pct',
+ 'system.cpu.irq.pct',
+ 'system.cpu.nice.pct',
+ 'system.cpu.softirq.pct',
+ 'system.cpu.steal.pct',
+ 'system.cpu.system.pct',
+ 'system.cpu.total.pct',
+ 'system.cpu.user.pct',
+];
+
+export default ({ getService }: FtrProviderContext) => {
+ const esArchiver = getService('esArchiver');
+ const supertest = getService('supertest');
+ const kibanaServer = getService('kibanaServer');
+
+ describe('existing_fields apis legacy', () => {
+ before(async () => {
+ await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');
+ await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/visualize/default');
+ await kibanaServer.uiSettings.update({
+ 'lens:useFieldExistenceSampling': true,
+ });
+ });
+ after(async () => {
+ await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
+ await esArchiver.unload('x-pack/test/functional/es_archives/visualize/default');
+ await kibanaServer.uiSettings.update({
+ 'lens:useFieldExistenceSampling': false,
+ });
+ });
+
+ describe('existence', () => {
+ it('should find which fields exist in the sample documents', async () => {
+ const { body } = await supertest
+ .post(`/api/lens/existing_fields/${encodeURIComponent('logstash-*')}`)
+ .set(COMMON_HEADERS)
+ .send({
+ dslQuery: {
+ bool: {
+ filter: [{ match_all: {} }],
+ },
+ },
+ fromDate: TEST_START_TIME,
+ toDate: TEST_END_TIME,
+ })
+ .expect(200);
+
+ expect(body.indexPatternTitle).to.eql('logstash-*');
+ expect(body.existingFieldNames.sort()).to.eql(fieldsWithData.sort());
+ });
+
+ it('should succeed for thousands of fields', async () => {
+ const { body } = await supertest
+ .post(`/api/lens/existing_fields/${encodeURIComponent('metricbeat-*')}`)
+ .set(COMMON_HEADERS)
+ .send({
+ dslQuery: { match_all: {} },
+ fromDate: TEST_START_TIME,
+ toDate: TEST_END_TIME,
+ })
+ .expect(200);
+
+ expect(body.indexPatternTitle).to.eql('metricbeat-*');
+ expect(body.existingFieldNames.sort()).to.eql(metricBeatData.sort());
+ });
+
+ it('should return fields filtered by query and filters', async () => {
+ const expectedFieldNames = [
+ '@message',
+ '@message.raw',
+ '@tags',
+ '@tags.raw',
+ '@timestamp',
+ '_id',
+ '_index',
+ 'agent',
+ 'agent.raw',
+ 'bytes',
+ 'clientip',
+ 'extension',
+ 'extension.raw',
+ 'headings',
+ 'headings.raw',
+ 'host',
+ 'host.raw',
+ 'index',
+ 'index.raw',
+ 'referer',
+ 'request',
+ 'request.raw',
+ 'response',
+ 'response.raw',
+ 'runtime_number',
+ 'spaces',
+ 'spaces.raw',
+ 'type',
+ 'url',
+ 'url.raw',
+ 'utc_time',
+ 'xss',
+ 'xss.raw',
+ ];
+
+ const { body } = await supertest
+ .post(`/api/lens/existing_fields/${encodeURIComponent('logstash-*')}`)
+ .set(COMMON_HEADERS)
+ .send({
+ dslQuery: {
+ bool: {
+ filter: [{ match: { referer: 'https://www.taylorswift.com/' } }],
+ },
+ },
+ fromDate: TEST_START_TIME,
+ toDate: TEST_END_TIME,
+ })
+ .expect(200);
+ expect(body.existingFieldNames.sort()).to.eql(expectedFieldNames.sort());
+ });
+ });
+ });
+};
diff --git a/x-pack/test/api_integration/es_archives/lens/constant_keyword/data.json b/x-pack/test/api_integration/es_archives/lens/constant_keyword/data.json
new file mode 100644
index 0000000000000..8ef482e7b40c3
--- /dev/null
+++ b/x-pack/test/api_integration/es_archives/lens/constant_keyword/data.json
@@ -0,0 +1,25 @@
+{
+ "type": "doc",
+ "value": {
+ "id": "1",
+ "index": "existence_index_1",
+ "source": {
+ "filter_field": "a",
+ "textfield1": "test",
+ "ts": "2021-01-02"
+ }
+ }
+}
+
+{
+ "type": "doc",
+ "value": {
+ "id": "1",
+ "index": "existence_index_2",
+ "source": {
+ "filter_field": "b",
+ "textfield2": "test",
+ "ts": "2022-01-02"
+ }
+ }
+}
diff --git a/x-pack/test/api_integration/es_archives/lens/constant_keyword/mappings.json b/x-pack/test/api_integration/es_archives/lens/constant_keyword/mappings.json
new file mode 100644
index 0000000000000..af5dc3a651e96
--- /dev/null
+++ b/x-pack/test/api_integration/es_archives/lens/constant_keyword/mappings.json
@@ -0,0 +1,59 @@
+{
+ "type": "index",
+ "value": {
+ "index": "existence_index_1",
+ "mappings": {
+ "properties": {
+ "filter_field": {
+ "type": "constant_keyword",
+ "value": "a"
+ },
+ "textfield1": {
+ "type": "keyword"
+ },
+ "ts": {
+ "type": "date"
+ }
+ }
+ },
+ "settings": {
+ "index": {
+ "number_of_replicas": "0",
+ "number_of_shards": "1"
+ }
+ }
+ }
+}
+
+{
+ "type": "index",
+ "value": {
+ "index": "existence_index_2",
+ "mappings": {
+ "runtime": {
+ "mapping_runtime_field": {
+ "type": "keyword",
+ "script" : { "source" : "emit('abc')" }
+ }
+ },
+ "properties": {
+ "filter_field": {
+ "type": "constant_keyword",
+ "value": "b"
+ },
+ "textfield2": {
+ "type": "keyword"
+ },
+ "ts": {
+ "type": "date"
+ }
+ }
+ },
+ "settings": {
+ "index": {
+ "number_of_replicas": "0",
+ "number_of_shards": "1"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/x-pack/test/api_integration/fixtures/kbn_archiver/lens/constant_keyword.json b/x-pack/test/api_integration/fixtures/kbn_archiver/lens/constant_keyword.json
new file mode 100644
index 0000000000000..fb7c105ec462b
--- /dev/null
+++ b/x-pack/test/api_integration/fixtures/kbn_archiver/lens/constant_keyword.json
@@ -0,0 +1,16 @@
+{
+ "attributes": {
+ "timeFieldName": "ts",
+ "title": "existence_index_*",
+ "runtimeFieldMap":"{\"data_view_runtime_field\":{\"type\":\"keyword\",\"script\":{\"source\":\"emit('a')\"}}}"
+ },
+ "coreMigrationVersion": "8.0.0",
+ "id": "existence_index",
+ "migrationVersion": {
+ "index-pattern": "7.11.0"
+ },
+ "references": [],
+ "type": "index-pattern",
+ "updated_at": "2018-12-21T00:43:07.096Z",
+ "version": "WzEzLDJd"
+}
diff --git a/x-pack/test/functional/apps/lens/drag_and_drop.ts b/x-pack/test/functional/apps/lens/drag_and_drop.ts
index 2858ff1588f7c..27e336a1cbc12 100644
--- a/x-pack/test/functional/apps/lens/drag_and_drop.ts
+++ b/x-pack/test/functional/apps/lens/drag_and_drop.ts
@@ -328,8 +328,10 @@ export default function ({ getPageObjects }: FtrProviderContext) {
});
it('overwrite existing time dimension if one exists already', async () => {
+ await PageObjects.lens.searchField('utc');
await PageObjects.lens.dragFieldToWorkspace('utc_time');
await PageObjects.lens.waitForVisualization();
+ await PageObjects.lens.searchField('client');
await PageObjects.lens.dragFieldToWorkspace('clientip');
await PageObjects.lens.waitForVisualization();
expect(await PageObjects.lens.getDimensionTriggersTexts('lnsXY_xDimensionPanel')).to.eql([
diff --git a/x-pack/test/functional/apps/lens/epoch_millis.ts b/x-pack/test/functional/apps/lens/epoch_millis.ts
index 9ff418c8e5ce8..deaa3e720101e 100644
--- a/x-pack/test/functional/apps/lens/epoch_millis.ts
+++ b/x-pack/test/functional/apps/lens/epoch_millis.ts
@@ -30,13 +30,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
it('should show field list', async () => {
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickVisType('lens');
- await PageObjects.lens.switchDataPanelIndexPattern('epoch-millis');
+ await PageObjects.lens.switchDataPanelIndexPattern('epoch-millis*');
await PageObjects.lens.goToTimeRange();
await PageObjects.lens.switchToVisualization('lnsDatatable');
const fieldList = await PageObjects.lens.findAllFields();
expect(fieldList).to.contain('@timestamp');
- // not defined for document in time range, only out of time range
- expect(fieldList).not.to.contain('agent.raw');
});
it('should able to configure a regular metric', async () => {
diff --git a/x-pack/test/functional/es_archives/lens/epoch_millis/data.json b/x-pack/test/functional/es_archives/lens/epoch_millis/data.json
index db9d5ccc379d7..a15bc25f56802 100644
--- a/x-pack/test/functional/es_archives/lens/epoch_millis/data.json
+++ b/x-pack/test/functional/es_archives/lens/epoch_millis/data.json
@@ -2,7 +2,7 @@
"type": "doc",
"value": {
"id": "AU_x4-TaGFA8no6QjiSJ",
- "index": "epoch-millis",
+ "index": "epoch-millis1",
"source": {
"@message": "212.113.62.183 - - [2015-09-21T06:09:20.045Z] \"GET /uploads/dafydd-williams.jpg HTTP/1.1\" 200 3182 \"-\" \"Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110421 Firefox/6.0a1\"",
"@tags": [
@@ -75,7 +75,7 @@
"type": "doc",
"value": {
"id": "AU_x4-TaGFA8no6QjiSL",
- "index": "epoch-millis",
+ "index": "epoch-millis2",
"source": {
"@message": "156.252.112.76 - - [2015-09-21T21:13:02.070Z] \"GET /uploads/aleksandr-samokutyayev.jpg HTTP/1.1\" 200 6176 \"-\" \"Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.50 Safari/534.24\"",
"@tags": [
diff --git a/x-pack/test/functional/es_archives/lens/epoch_millis/mappings.json b/x-pack/test/functional/es_archives/lens/epoch_millis/mappings.json
index ee1c8dce8219d..ae803d98870d7 100644
--- a/x-pack/test/functional/es_archives/lens/epoch_millis/mappings.json
+++ b/x-pack/test/functional/es_archives/lens/epoch_millis/mappings.json
@@ -1,7 +1,382 @@
{
"type": "index",
"value": {
- "index": "epoch-millis",
+ "index": "epoch-millis1",
+ "mappings": {
+ "dynamic_templates": [
+ {
+ "string_fields": {
+ "mapping": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "match": "*",
+ "match_mapping_type": "string"
+ }
+ }
+ ],
+ "runtime": {
+ "runtime_number": {
+ "type": "long",
+ "script" : { "source" : "emit(doc['bytes'].value)" }
+ }
+ },
+ "properties": {
+ "@message": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "@tags": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "@timestamp": {
+ "type": "date",
+ "format": "epoch_millis"
+ },
+ "agent": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "bytes": {
+ "type": "long"
+ },
+ "clientip": {
+ "type": "ip"
+ },
+ "extension": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "geo": {
+ "properties": {
+ "coordinates": {
+ "type": "geo_point"
+ },
+ "dest": {
+ "type": "keyword"
+ },
+ "src": {
+ "type": "keyword"
+ },
+ "srcdest": {
+ "type": "keyword"
+ }
+ }
+ },
+ "headings": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "host": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "index": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "ip": {
+ "type": "ip"
+ },
+ "links": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "machine": {
+ "properties": {
+ "os": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "ram": {
+ "type": "long"
+ },
+ "ram_range": {
+ "type": "long_range"
+ }
+ }
+ },
+ "memory": {
+ "type": "double"
+ },
+ "meta": {
+ "properties": {
+ "char": {
+ "type": "keyword"
+ },
+ "related": {
+ "type": "text"
+ },
+ "user": {
+ "properties": {
+ "firstname": {
+ "type": "text"
+ },
+ "lastname": {
+ "type": "integer"
+ }
+ }
+ }
+ }
+ },
+ "phpmemory": {
+ "type": "long"
+ },
+ "referer": {
+ "type": "keyword"
+ },
+ "relatedContent": {
+ "properties": {
+ "article:modified_time": {
+ "type": "date"
+ },
+ "article:published_time": {
+ "type": "date"
+ },
+ "article:section": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "article:tag": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "og:description": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "og:image": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "og:image:height": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "og:image:width": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "og:site_name": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "og:title": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "og:type": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "og:url": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "twitter:card": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "twitter:description": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "twitter:image": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "twitter:site": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "twitter:title": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "url": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ }
+ }
+ },
+ "request": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "response": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "spaces": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "type": {
+ "type": "keyword"
+ },
+ "url": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ },
+ "utc_time": {
+ "type": "date"
+ },
+ "xss": {
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ },
+ "type": "text"
+ }
+ }
+ },
+ "settings": {
+ "index": {
+ "analysis": {
+ "analyzer": {
+ "url": {
+ "max_token_length": "1000",
+ "tokenizer": "uax_url_email",
+ "type": "standard"
+ }
+ }
+ },
+ "number_of_replicas": "0",
+ "number_of_shards": "1"
+ }
+ }
+ }
+}
+
+{
+ "type": "index",
+ "value": {
+ "index": "epoch-millis2",
"mappings": {
"dynamic_templates": [
{
diff --git a/x-pack/test/functional/fixtures/kbn_archiver/lens/epoch_millis.json b/x-pack/test/functional/fixtures/kbn_archiver/lens/epoch_millis.json
index fc7deabc0ead1..bd4a9ed17cc6e 100644
--- a/x-pack/test/functional/fixtures/kbn_archiver/lens/epoch_millis.json
+++ b/x-pack/test/functional/fixtures/kbn_archiver/lens/epoch_millis.json
@@ -1,7 +1,7 @@
{
"attributes": {
"timeFieldName": "@timestamp",
- "title": "epoch-millis"
+ "title": "epoch-millis*"
},
"coreMigrationVersion": "8.0.0",
"id": "epoch-millis",
From b1e3bdfa3dd261dc9c7853087cd1793b5c66f88f Mon Sep 17 00:00:00 2001
From: Matthias Wilhelm
Date: Thu, 27 Jan 2022 13:44:37 +0100
Subject: [PATCH 05/45] [Discover] Fix document explorer cell popover rendering
(#123194)
---
.../get_render_cell_value.test.tsx | 86 ++++++--
.../discover_grid/get_render_cell_value.tsx | 205 ++++++++++--------
2 files changed, 181 insertions(+), 110 deletions(-)
diff --git a/src/plugins/discover/public/components/discover_grid/get_render_cell_value.test.tsx b/src/plugins/discover/public/components/discover_grid/get_render_cell_value.test.tsx
index 4479e051b1f26..07ed170258fb1 100644
--- a/src/plugins/discover/public/components/discover_grid/get_render_cell_value.test.tsx
+++ b/src/plugins/discover/public/components/discover_grid/get_render_cell_value.test.tsx
@@ -96,6 +96,50 @@ describe('Discover grid cell rendering', function () {
expect(component.html()).toMatchInlineSnapshot(`"100"`);
});
+ it('renders bytes column correctly using _source when details is true', () => {
+ const DiscoverGridCellValue = getRenderCellValueFn(
+ indexPatternMock,
+ rowsSource,
+ rowsSource.map(flatten),
+ false,
+ [],
+ 100
+ );
+ const component = shallow(
+
+ );
+ expect(component.html()).toMatchInlineSnapshot(`"100"`);
+ });
+
+ it('renders bytes column correctly using fields when details is true', () => {
+ const DiscoverGridCellValue = getRenderCellValueFn(
+ indexPatternMock,
+ rowsFields,
+ rowsFields.map(flatten),
+ false,
+ [],
+ 100
+ );
+ const component = shallow(
+
+ );
+ expect(component.html()).toMatchInlineSnapshot(`"100"`);
+ });
+
it('renders _source column correctly', () => {
const DiscoverGridCellValue = getRenderCellValueFn(
indexPatternMock,
@@ -514,13 +558,16 @@ describe('Discover grid cell rendering', function () {
/>
);
expect(component).toMatchInlineSnapshot(`
-
- {
- "object.value": [
- 100
- ]
- }
-
+
`);
});
@@ -634,9 +681,15 @@ describe('Discover grid cell rendering', function () {
/>
);
expect(component).toMatchInlineSnapshot(`
-
- .gz
-
+
`);
const componentWithDetails = shallow(
@@ -650,13 +703,14 @@ describe('Discover grid cell rendering', function () {
/>
);
expect(componentWithDetails).toMatchInlineSnapshot(`
-
`);
});
diff --git a/src/plugins/discover/public/components/discover_grid/get_render_cell_value.tsx b/src/plugins/discover/public/components/discover_grid/get_render_cell_value.tsx
index 436281b119bff..5e1a1a7e39db8 100644
--- a/src/plugins/discover/public/components/discover_grid/get_render_cell_value.tsx
+++ b/src/plugins/discover/public/components/discover_grid/get_render_cell_value.tsx
@@ -8,8 +8,7 @@
import React, { Fragment, useContext, useEffect } from 'react';
import { euiLightVars as themeLight, euiDarkVars as themeDark } from '@kbn/ui-theme';
-import type { DataView } from 'src/plugins/data/common';
-
+import type { DataView, DataViewField } from 'src/plugins/data/common';
import {
EuiDataGridCellValueElementProps,
EuiDescriptionList,
@@ -64,89 +63,35 @@ export const getRenderCellValueFn =
return -;
}
- if (
+ /**
+ * when using the fields api this code is used to show top level objects
+ * this is used for legacy stuff like displaying products of our ecommerce dataset
+ */
+ const useTopLevelObjectColumns = Boolean(
useNewFieldsApi &&
- !field &&
- row &&
- row.fields &&
- !(row.fields as Record)[columnId]
- ) {
- const innerColumns = Object.fromEntries(
- Object.entries(row.fields as Record).filter(([key]) => {
- return key.indexOf(`${columnId}.`) === 0;
- })
- );
- if (isDetails) {
- // nicely formatted JSON for the expanded view
- return {JSON.stringify(innerColumns, null, 2)};
- }
-
- // Put the most important fields first
- const highlights: Record = (row.highlight as Record) ?? {};
- const highlightPairs: Array<[string, string]> = [];
- const sourcePairs: Array<[string, string]> = [];
- Object.entries(innerColumns).forEach(([key, values]) => {
- const subField = indexPattern.getFieldByName(key);
- const displayKey = indexPattern.fields.getByName
- ? indexPattern.fields.getByName(key)?.displayName
- : undefined;
- const formatter = subField
- ? indexPattern.getFormatterForField(subField)
- : { convert: (v: unknown, ...rest: unknown[]) => String(v) };
- const formatted = (values as unknown[])
- .map((val: unknown) =>
- formatter.convert(val, 'html', {
- field: subField,
- hit: row,
- indexPattern,
- })
- )
- .join(', ');
- const pairs = highlights[key] ? highlightPairs : sourcePairs;
- if (displayKey) {
- if (fieldsToShow.includes(displayKey)) {
- pairs.push([displayKey, formatted]);
- }
- } else {
- pairs.push([key, formatted]);
- }
- });
-
- return (
- // If you change the styling of this list (specifically something that will change the line-height)
- // make sure to adjust the img overwrites attached to dscDiscoverGrid__descriptionListDescription
- // in discover_grid.scss
-
- {[...highlightPairs, ...sourcePairs]
- .slice(0, maxDocFieldsDisplayed)
- .map(([key, value]) => (
-
- {key}
-
-
- ))}
-
- );
- }
+ !field &&
+ row?.fields &&
+ !(row.fields as Record)[columnId]
+ );
- if (typeof rowFlattened[columnId] === 'object' && isDetails) {
- return (
- }
- width={defaultMonacoEditorWidth}
- />
+ if (isDetails) {
+ return renderPopoverContent(
+ row,
+ rowFlattened,
+ field,
+ columnId,
+ indexPattern,
+ useTopLevelObjectColumns
);
}
- if (field && field.type === '_source') {
- if (isDetails) {
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- return ;
- }
- const pairs = formatHit(row, indexPattern, fieldsToShow);
+ if (field?.type === '_source' || useTopLevelObjectColumns) {
+ const pairs = useTopLevelObjectColumns
+ ? getTopLevelObjectPairs(row, columnId, indexPattern, fieldsToShow).slice(
+ 0,
+ maxDocFieldsDisplayed
+ )
+ : formatHit(row, indexPattern, fieldsToShow);
return (
@@ -163,20 +108,6 @@ export const getRenderCellValueFn =
);
}
- if (!field?.type && rowFlattened && typeof rowFlattened[columnId] === 'object') {
- if (isDetails) {
- // nicely formatted JSON for the expanded view
- return (
- }
- width={defaultMonacoEditorWidth}
- />
- );
- }
-
- return <>{formatFieldValue(rowFlattened[columnId], row, indexPattern, field)}>;
- }
-
return (
);
};
+
+/**
+ * Helper function to show top level objects
+ * this is used for legacy stuff like displaying products of our ecommerce dataset
+ */
+function getInnerColumns(fields: Record, columnId: string) {
+ return Object.fromEntries(
+ Object.entries(fields).filter(([key]) => {
+ return key.indexOf(`${columnId}.`) === 0;
+ })
+ );
+}
+
+/**
+ * Helper function for the cell popover
+ */
+function renderPopoverContent(
+ rowRaw: ElasticSearchHit,
+ rowFlattened: Record,
+ field: DataViewField | undefined,
+ columnId: string,
+ dataView: DataView,
+ useTopLevelObjectColumns: boolean
+) {
+ if (useTopLevelObjectColumns || field?.type === '_source') {
+ const json = useTopLevelObjectColumns
+ ? getInnerColumns(rowRaw.fields as Record, columnId)
+ : rowRaw;
+ return (
+ } width={defaultMonacoEditorWidth} />
+ );
+ }
+
+ return (
+
+ );
+}
+/**
+ * Helper function to show top level objects
+ * this is used for legacy stuff like displaying products of our ecommerce dataset
+ */
+function getTopLevelObjectPairs(
+ row: ElasticSearchHit,
+ columnId: string,
+ dataView: DataView,
+ fieldsToShow: string[]
+) {
+ const innerColumns = getInnerColumns(row.fields as Record, columnId);
+ // Put the most important fields first
+ const highlights: Record = (row.highlight as Record) ?? {};
+ const highlightPairs: Array<[string, string]> = [];
+ const sourcePairs: Array<[string, string]> = [];
+ Object.entries(innerColumns).forEach(([key, values]) => {
+ const subField = dataView.getFieldByName(key);
+ const displayKey = dataView.fields.getByName
+ ? dataView.fields.getByName(key)?.displayName
+ : undefined;
+ const formatter = subField
+ ? dataView.getFormatterForField(subField)
+ : { convert: (v: unknown, ...rest: unknown[]) => String(v) };
+ const formatted = (values as unknown[])
+ .map((val: unknown) =>
+ formatter.convert(val, 'html', {
+ field: subField,
+ hit: row,
+ indexPattern: dataView,
+ })
+ )
+ .join(', ');
+ const pairs = highlights[key] ? highlightPairs : sourcePairs;
+ if (displayKey) {
+ if (fieldsToShow.includes(displayKey)) {
+ pairs.push([displayKey, formatted]);
+ }
+ } else {
+ pairs.push([key, formatted]);
+ }
+ });
+ return [...highlightPairs, ...sourcePairs];
+}
From f2447cfd7b444cbe60aa86f35731289e945d8176 Mon Sep 17 00:00:00 2001
From: Gloria Hornero
Date: Thu, 27 Jan 2022 13:47:14 +0100
Subject: [PATCH 06/45] [Security Solution] [Detections] Fixes EQL error
message when there is an empty query (#123533)
* fixes issues 121983
* refactor
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
---
.../rules/step_define_rule/schema.tsx | 23 +++++++++++--------
.../rules/step_define_rule/translations.tsx | 7 ++++++
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx
index 4717dd6f92104..a2018280bebc6 100644
--- a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx
@@ -16,7 +16,11 @@ import {
containsInvalidItems,
customValidators,
} from '../../../../common/components/threat_match/helpers';
-import { isThreatMatchRule, isThresholdRule } from '../../../../../common/detection_engine/utils';
+import {
+ isEqlRule,
+ isThreatMatchRule,
+ isThresholdRule,
+} from '../../../../../common/detection_engine/utils';
import { isMlRule } from '../../../../../common/machine_learning/helpers';
import { FieldValueQueryBar } from '../query_bar';
import {
@@ -30,6 +34,7 @@ import { DefineStepRule } from '../../../pages/detection_engine/rules/types';
import { debounceAsync, eqlValidator } from '../eql_query_bar/validators';
import {
CUSTOM_QUERY_REQUIRED,
+ EQL_QUERY_REQUIRED,
INVALID_CUSTOM_QUERY,
INDEX_HELPER_TEXT,
THREAT_MATCH_INDEX_HELPER_TEXT,
@@ -82,16 +87,14 @@ export const schema: FormSchema = {
const { query, filters } = value as FieldValueQueryBar;
const needsValidation = !isMlRule(formData.ruleType);
if (!needsValidation) {
- return;
+ return undefined;
}
-
- return isEmpty(query.query as string) && isEmpty(filters)
- ? {
- code: 'ERR_FIELD_MISSING',
- path,
- message: CUSTOM_QUERY_REQUIRED,
- }
- : undefined;
+ const isFieldEmpty = isEmpty(query.query as string) && isEmpty(filters);
+ if (!isFieldEmpty) {
+ return undefined;
+ }
+ const message = isEqlRule(formData.ruleType) ? EQL_QUERY_REQUIRED : CUSTOM_QUERY_REQUIRED;
+ return { code: 'ERR_FIELD_MISSING', path, message };
},
},
{
diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/translations.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/translations.tsx
index d41d36813dee2..a2b01ba87dd69 100644
--- a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/translations.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/translations.tsx
@@ -14,6 +14,13 @@ export const CUSTOM_QUERY_REQUIRED = i18n.translate(
}
);
+export const EQL_QUERY_REQUIRED = i18n.translate(
+ 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.eqlQueryFieldRequiredError',
+ {
+ defaultMessage: 'An EQL query is required.',
+ }
+);
+
export const INVALID_CUSTOM_QUERY = i18n.translate(
'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.customQueryFieldInvalidError',
{
From 7e1b7806724d611b734b6c19346c4077f65e5382 Mon Sep 17 00:00:00 2001
From: Alexey Antonov
Date: Thu, 27 Jan 2022 16:12:50 +0300
Subject: [PATCH 07/45] [TSVB] Fix shard failures are not reported (#123474)
* [TSVB] Fix shard failures are not reported #122944
Closes: #122944
* fix PR comments
* Update ui_settings.ts
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
---
src/plugins/data/public/index.ts | 1 +
src/plugins/data/public/search/index.ts | 1 +
.../adapters/request/request_responder.ts | 2 +-
.../common/adapters/request/types.ts | 1 +
.../vis_types/timeseries/common/constants.ts | 1 +
.../timeseries/common/types/index.ts | 10 +++-
.../timeseries/common/types/vis_data.ts | 32 ++++++++-----
src/plugins/vis_types/timeseries/kibana.json | 2 +-
.../application/components/annotation_row.tsx | 4 +-
.../field_text_select.tsx | 2 +-
.../index_pattern_select.tsx | 2 +-
.../vis_types/timeseries/public/metrics_fn.ts | 7 ++-
.../timeseries/public/metrics_type.ts | 5 +-
.../timeseries/public/request_handler.ts | 26 ++++++++--
.../server/lib/search_strategies/index.ts | 1 +
.../abstract_search_strategy.test.ts | 6 +--
.../strategies/abstract_search_strategy.ts | 35 ++++++++++++--
.../strategies/rollup_search_strategy.ts | 9 ++--
.../annotations/get_request_params.ts | 15 ++++--
.../server/lib/vis_data/get_annotations.ts | 28 ++++++-----
.../server/lib/vis_data/get_series_data.ts | 12 +++--
.../server/lib/vis_data/get_table_data.ts | 48 +++++++++++--------
.../lib/vis_data/series/get_request_params.ts | 15 ++++--
.../timeseries/server/ui_settings.ts | 14 ++++++
test/functional/apps/visualize/_tsvb_chart.ts | 4 +-
.../metrics/kibana_metrics_adapter.ts | 4 +-
26 files changed, 208 insertions(+), 79 deletions(-)
diff --git a/src/plugins/data/public/index.ts b/src/plugins/data/public/index.ts
index 2e746e4ecec93..ec380a0845985 100644
--- a/src/plugins/data/public/index.ts
+++ b/src/plugins/data/public/index.ts
@@ -206,6 +206,7 @@ export {
isEsError,
SearchSessionState,
SortDirection,
+ handleResponse,
} from './search';
export type {
diff --git a/src/plugins/data/public/search/index.ts b/src/plugins/data/public/search/index.ts
index 810436dc30b98..6923ec7e8705b 100644
--- a/src/plugins/data/public/search/index.ts
+++ b/src/plugins/data/public/search/index.ts
@@ -54,6 +54,7 @@ export {
waitUntilNextSessionCompletes$,
} from './session';
export { getEsPreference } from './es_search';
+export { handleResponse } from './fetch';
export type { SearchInterceptorDeps } from './search_interceptor';
export { SearchInterceptor } from './search_interceptor';
diff --git a/src/plugins/inspector/common/adapters/request/request_responder.ts b/src/plugins/inspector/common/adapters/request/request_responder.ts
index 1b8da2e57e7f2..1d3a999e4834d 100644
--- a/src/plugins/inspector/common/adapters/request/request_responder.ts
+++ b/src/plugins/inspector/common/adapters/request/request_responder.ts
@@ -51,7 +51,7 @@ export class RequestResponder {
}
public finish(status: RequestStatus, response: Response): void {
- this.request.time = Date.now() - this.request.startTime;
+ this.request.time = response.time ?? Date.now() - this.request.startTime;
this.request.status = status;
this.request.response = response;
this.onChange();
diff --git a/src/plugins/inspector/common/adapters/request/types.ts b/src/plugins/inspector/common/adapters/request/types.ts
index a204a7aa00a4a..4e6a8d324559f 100644
--- a/src/plugins/inspector/common/adapters/request/types.ts
+++ b/src/plugins/inspector/common/adapters/request/types.ts
@@ -53,4 +53,5 @@ export interface RequestStatistic {
export interface Response {
json?: object;
+ time?: number;
}
diff --git a/src/plugins/vis_types/timeseries/common/constants.ts b/src/plugins/vis_types/timeseries/common/constants.ts
index 4f15cea7faad3..30fb814990925 100644
--- a/src/plugins/vis_types/timeseries/common/constants.ts
+++ b/src/plugins/vis_types/timeseries/common/constants.ts
@@ -9,6 +9,7 @@
export const UI_SETTINGS = {
MAX_BUCKETS_SETTING: 'metrics:max_buckets',
ALLOW_STRING_INDICES: 'metrics:allowStringIndices',
+ ALLOW_CHECKING_FOR_FAILED_SHARDS: 'metrics:allowCheckingForFailedShards',
};
export const INDEXES_SEPARATOR = ',';
export const AUTO_INTERVAL = 'auto';
diff --git a/src/plugins/vis_types/timeseries/common/types/index.ts b/src/plugins/vis_types/timeseries/common/types/index.ts
index 7a35532802678..01b200c6774d1 100644
--- a/src/plugins/vis_types/timeseries/common/types/index.ts
+++ b/src/plugins/vis_types/timeseries/common/types/index.ts
@@ -11,7 +11,15 @@ import { IndexPattern, Query } from '../../../../data/common';
import { Panel } from './panel_model';
export type { Metric, Series, Panel, MetricType } from './panel_model';
-export type { TimeseriesVisData, PanelData, SeriesData, TableData } from './vis_data';
+export type {
+ TimeseriesVisData,
+ PanelData,
+ SeriesData,
+ TableData,
+ DataResponseMeta,
+ TrackedEsSearches,
+ PanelSeries,
+} from './vis_data';
export interface FetchedIndexPattern {
indexPattern: IndexPattern | undefined | null;
diff --git a/src/plugins/vis_types/timeseries/common/types/vis_data.ts b/src/plugins/vis_types/timeseries/common/types/vis_data.ts
index 1a7be0b467004..07c078a6e8aae 100644
--- a/src/plugins/vis_types/timeseries/common/types/vis_data.ts
+++ b/src/plugins/vis_types/timeseries/common/types/vis_data.ts
@@ -7,30 +7,38 @@
*/
import { PANEL_TYPES } from '../enums';
-import { TimeseriesUIRestrictions } from '../ui_restrictions';
+import type { TimeseriesUIRestrictions } from '../ui_restrictions';
export type TimeseriesVisData = SeriesData | TableData;
-export interface TableData {
- type: PANEL_TYPES.TABLE;
+export type TrackedEsSearches = Record<
+ string,
+ {
+ body: Record;
+ label?: string;
+ time: number;
+ response?: Record;
+ }
+>;
+
+export interface DataResponseMeta {
+ type: PANEL_TYPES;
uiRestrictions: TimeseriesUIRestrictions;
+ trackedEsSearches: TrackedEsSearches;
+}
+
+export interface TableData extends DataResponseMeta {
series?: PanelData[];
pivot_label?: string;
}
// series data is not fully typed yet
-export type SeriesData = {
- type: Exclude;
- uiRestrictions: TimeseriesUIRestrictions;
+export type SeriesData = DataResponseMeta & {
error?: string;
-} & {
- [key: string]: PanelSeries;
-};
+} & Record;
export interface PanelSeries {
- annotations: {
- [key: string]: Annotation[];
- };
+ annotations: Record;
id: string;
series: PanelData[];
error?: string;
diff --git a/src/plugins/vis_types/timeseries/kibana.json b/src/plugins/vis_types/timeseries/kibana.json
index 40f934e531973..66c5b416a0d96 100644
--- a/src/plugins/vis_types/timeseries/kibana.json
+++ b/src/plugins/vis_types/timeseries/kibana.json
@@ -4,7 +4,7 @@
"kibanaVersion": "kibana",
"server": true,
"ui": true,
- "requiredPlugins": ["charts", "data", "expressions", "visualizations"],
+ "requiredPlugins": ["charts", "data", "expressions", "visualizations", "inspector"],
"optionalPlugins": ["home","usageCollection"],
"requiredBundles": ["kibanaUtils", "kibanaReact", "fieldFormats"],
"owner": {
diff --git a/src/plugins/vis_types/timeseries/public/application/components/annotation_row.tsx b/src/plugins/vis_types/timeseries/public/application/components/annotation_row.tsx
index bc408aef7092a..856948cb7601e 100644
--- a/src/plugins/vis_types/timeseries/public/application/components/annotation_row.tsx
+++ b/src/plugins/vis_types/timeseries/public/application/components/annotation_row.tsx
@@ -80,7 +80,9 @@ export const AnnotationRow = ({
try {
fetchedIndexPattern = index
- ? await fetchIndexPattern(index, indexPatterns)
+ ? await fetchIndexPattern(index, indexPatterns, {
+ fetchKibanaIndexForStringIndexes: true,
+ })
: {
...fetchedIndexPattern,
defaultIndex: await indexPatterns.getDefault(),
diff --git a/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/field_text_select.tsx b/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/field_text_select.tsx
index 86d1758932301..682279d5639e5 100644
--- a/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/field_text_select.tsx
+++ b/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/field_text_select.tsx
@@ -37,7 +37,7 @@ export const FieldTextSelect = ({
useDebounce(
() => {
- if (inputValue !== indexPatternString) {
+ if ((inputValue ?? '') !== (indexPatternString ?? '')) {
onIndexChange(inputValue);
}
},
diff --git a/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/index_pattern_select.tsx b/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/index_pattern_select.tsx
index 840787e2af1af..6c095a9074bb7 100644
--- a/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/index_pattern_select.tsx
+++ b/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/index_pattern_select.tsx
@@ -111,7 +111,7 @@ export const IndexPatternSelect = ({
label={indexPatternLabel}
helpText={fetchedIndex.defaultIndex && getIndexPatternHelpText(useKibanaIndices)}
labelAppend={
- fetchedIndex.indexPatternString && !fetchedIndex.indexPattern ? (
+ !useKibanaIndices && fetchedIndex.indexPatternString && !fetchedIndex.indexPattern ? (
({
help: '',
},
},
- async fn(input, args, { getSearchSessionId, isSyncColorsEnabled, getExecutionContext }) {
+ async fn(
+ input,
+ args,
+ { getSearchSessionId, isSyncColorsEnabled, getExecutionContext, inspectorAdapters }
+ ) {
const visParams: TimeseriesVisParams = JSON.parse(args.params);
const uiState = JSON.parse(args.uiState);
const syncColors = isSyncColorsEnabled?.() ?? false;
@@ -65,6 +69,7 @@ export const createMetricsFn = (): TimeseriesExpressionFunctionDefinition => ({
uiState,
searchSessionId: getSearchSessionId(),
executionContext: getExecutionContext(),
+ inspectorAdapters,
});
return {
diff --git a/src/plugins/vis_types/timeseries/public/metrics_type.ts b/src/plugins/vis_types/timeseries/public/metrics_type.ts
index a51e0a48c3212..548368b30759a 100644
--- a/src/plugins/vis_types/timeseries/public/metrics_type.ts
+++ b/src/plugins/vis_types/timeseries/public/metrics_type.ts
@@ -27,6 +27,7 @@ import {
import { getDataStart } from './services';
import type { TimeseriesVisDefaultParams, TimeseriesVisParams } from './types';
import type { IndexPatternValue, Panel } from '../common/types';
+import { RequestAdapter } from '../../../inspector/public';
export const withReplacedIds = (
vis: Vis
@@ -153,7 +154,9 @@ export const metricsVisDefinition: VisTypeDefinition<
}
return [];
},
- inspectorAdapters: {},
+ inspectorAdapters: () => ({
+ requests: new RequestAdapter(),
+ }),
requiresSearch: true,
getUsedIndexPattern: getUsedIndexPatterns,
};
diff --git a/src/plugins/vis_types/timeseries/public/request_handler.ts b/src/plugins/vis_types/timeseries/public/request_handler.ts
index e9037c0b84a5e..bb15f32886cdc 100644
--- a/src/plugins/vis_types/timeseries/public/request_handler.ts
+++ b/src/plugins/vis_types/timeseries/public/request_handler.ts
@@ -6,13 +6,14 @@
* Side Public License, v 1.
*/
import type { KibanaExecutionContext } from 'src/core/public';
+import type { Adapters } from 'src/plugins/inspector';
import { getTimezone } from './application/lib/get_timezone';
import { getUISettings, getDataStart, getCoreStart } from './services';
-import { ROUTES } from '../common/constants';
+import { ROUTES, UI_SETTINGS } from '../common/constants';
+import { KibanaContext, handleResponse } from '../../../data/public';
import type { TimeseriesVisParams } from './types';
import type { TimeseriesVisData } from '../common/types';
-import type { KibanaContext } from '../../../data/public';
interface MetricsRequestHandlerParams {
input: KibanaContext | null;
@@ -20,6 +21,7 @@ interface MetricsRequestHandlerParams {
visParams: TimeseriesVisParams;
searchSessionId?: string;
executionContext?: KibanaExecutionContext;
+ inspectorAdapters?: Adapters;
}
export const metricsRequestHandler = async ({
@@ -28,9 +30,11 @@ export const metricsRequestHandler = async ({
visParams,
searchSessionId,
executionContext,
+ inspectorAdapters,
}: MetricsRequestHandlerParams): Promise => {
const config = getUISettings();
const data = getDataStart();
+ const theme = getCoreStart().theme;
const timezone = getTimezone(config);
const uiStateObj = uiState[visParams.type] ?? {};
@@ -48,7 +52,8 @@ export const metricsRequestHandler = async ({
try {
const searchSessionOptions = dataSearch.session.getSearchOptions(searchSessionId);
- return await getCoreStart().http.post(ROUTES.VIS_DATA, {
+
+ const visData: TimeseriesVisData = await getCoreStart().http.post(ROUTES.VIS_DATA, {
body: JSON.stringify({
timerange: {
timezone,
@@ -64,6 +69,21 @@ export const metricsRequestHandler = async ({
}),
context: executionContext,
});
+
+ inspectorAdapters?.requests?.reset();
+
+ Object.entries(visData.trackedEsSearches || {}).forEach(([key, query]) => {
+ inspectorAdapters?.requests
+ ?.start(query.label ?? key, { searchSessionId })
+ .json(query.body)
+ .ok({ time: query.time });
+
+ if (query.response && config.get(UI_SETTINGS.ALLOW_CHECKING_FOR_FAILED_SHARDS)) {
+ handleResponse({ body: query.body }, { rawResponse: query.response }, theme);
+ }
+ });
+
+ return visData;
} finally {
if (untrackSearch && dataSearch.session.isCurrentSession(searchSessionId)) {
// untrack if this search still belongs to current session
diff --git a/src/plugins/vis_types/timeseries/server/lib/search_strategies/index.ts b/src/plugins/vis_types/timeseries/server/lib/search_strategies/index.ts
index ca0c50a79564a..721e1dad473f0 100644
--- a/src/plugins/vis_types/timeseries/server/lib/search_strategies/index.ts
+++ b/src/plugins/vis_types/timeseries/server/lib/search_strategies/index.ts
@@ -11,6 +11,7 @@ import { AbstractSearchStrategy } from './strategies';
export { SearchStrategyRegistry } from './search_strategy_registry';
export { AbstractSearchStrategy, RollupSearchStrategy, DefaultSearchStrategy } from './strategies';
+export type { EsSearchRequest } from './strategies/abstract_search_strategy';
export type SearchCapabilities = DefaultSearchCapabilities;
export type SearchStrategy = AbstractSearchStrategy;
diff --git a/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.test.ts b/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.test.ts
index 6216bce00fc7d..1a52132612f71 100644
--- a/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.test.ts
+++ b/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.test.ts
@@ -9,7 +9,7 @@
import { IndexPatternsService } from '../../../../../../data/common';
import { from } from 'rxjs';
-import { AbstractSearchStrategy } from './abstract_search_strategy';
+import { AbstractSearchStrategy, EsSearchRequest } from './abstract_search_strategy';
import type { FieldSpec } from '../../../../../../data/common';
import type { CachedIndexPatternFetcher } from '../lib/cached_index_pattern_fetcher';
import type {
@@ -64,7 +64,7 @@ describe('AbstractSearchStrategy', () => {
});
test('should return response', async () => {
- const searches = [{ body: 'body', index: 'index' }];
+ const searches: EsSearchRequest[] = [{ body: {}, index: 'index' }];
const responses = await abstractSearchStrategy.search(
requestContext,
@@ -84,7 +84,7 @@ describe('AbstractSearchStrategy', () => {
expect(requestContext.search.search).toHaveBeenCalledWith(
{
params: {
- body: 'body',
+ body: {},
index: 'index',
},
indexType: undefined,
diff --git a/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts b/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts
index bce07d2cdb300..1d3650ccedbd3 100644
--- a/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts
+++ b/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts
@@ -6,40 +6,67 @@
* Side Public License, v 1.
*/
+import { tap } from 'rxjs/operators';
+import { omit } from 'lodash';
import { IndexPatternsService } from '../../../../../../data/server';
import { toSanitizedFieldType } from '../../../../common/fields_utils';
-import type { FetchedIndexPattern } from '../../../../common/types';
+import type { FetchedIndexPattern, TrackedEsSearches } from '../../../../common/types';
import type {
VisTypeTimeseriesRequest,
VisTypeTimeseriesRequestHandlerContext,
VisTypeTimeseriesVisDataRequest,
} from '../../../types';
+export interface EsSearchRequest {
+ body: Record;
+ index?: string;
+ trackingEsSearchMeta?: {
+ requestId: string;
+ requestLabel?: string;
+ };
+}
+
export abstract class AbstractSearchStrategy {
async search(
requestContext: VisTypeTimeseriesRequestHandlerContext,
req: VisTypeTimeseriesVisDataRequest,
- bodies: any[],
+ esRequests: EsSearchRequest[],
+ trackedEsSearches?: TrackedEsSearches,
indexType?: string
) {
const requests: any[] = [];
- bodies.forEach((body) => {
+ esRequests.forEach(({ body, index, trackingEsSearchMeta }) => {
+ const startTime = Date.now();
requests.push(
requestContext.search
.search(
{
indexType,
params: {
- ...body,
+ body,
+ index,
},
},
req.body.searchSession
)
+ .pipe(
+ tap((data) => {
+ if (trackingEsSearchMeta?.requestId && trackedEsSearches) {
+ trackedEsSearches[trackingEsSearchMeta.requestId] = {
+ body,
+ time: Date.now() - startTime,
+ label: trackingEsSearchMeta.requestLabel,
+ response: omit(data.rawResponse, 'aggregations'),
+ };
+ }
+ })
+ )
.toPromise()
);
});
+
return Promise.all(requests);
}
diff --git a/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/rollup_search_strategy.ts b/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/rollup_search_strategy.ts
index e3ede57774224..2508c68066017 100644
--- a/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/rollup_search_strategy.ts
+++ b/src/plugins/vis_types/timeseries/server/lib/search_strategies/strategies/rollup_search_strategy.ts
@@ -10,10 +10,10 @@ import {
getCapabilitiesForRollupIndices,
IndexPatternsService,
} from '../../../../../../data/server';
-import { AbstractSearchStrategy } from './abstract_search_strategy';
+import { AbstractSearchStrategy, EsSearchRequest } from './abstract_search_strategy';
import { RollupSearchCapabilities } from '../capabilities/rollup_search_capabilities';
-import type { FetchedIndexPattern } from '../../../../common/types';
+import type { FetchedIndexPattern, TrackedEsSearches } from '../../../../common/types';
import type { CachedIndexPatternFetcher } from '../lib/cached_index_pattern_fetcher';
import type {
VisTypeTimeseriesRequest,
@@ -29,9 +29,10 @@ export class RollupSearchStrategy extends AbstractSearchStrategy {
async search(
requestContext: VisTypeTimeseriesRequestHandlerContext,
req: VisTypeTimeseriesVisDataRequest,
- bodies: any[]
+ esRequests: EsSearchRequest[],
+ trackedEsSearches?: TrackedEsSearches
) {
- return super.search(requestContext, req, bodies, 'rollup');
+ return super.search(requestContext, req, esRequests, trackedEsSearches, 'rollup');
}
async getRollupData(
diff --git a/src/plugins/vis_types/timeseries/server/lib/vis_data/annotations/get_request_params.ts b/src/plugins/vis_types/timeseries/server/lib/vis_data/annotations/get_request_params.ts
index 1973e3b85b966..41f7e7c86708f 100644
--- a/src/plugins/vis_types/timeseries/server/lib/vis_data/annotations/get_request_params.ts
+++ b/src/plugins/vis_types/timeseries/server/lib/vis_data/annotations/get_request_params.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 { i18n } from '@kbn/i18n';
import type { Annotation, Panel } from '../../../../common/types';
import { buildAnnotationRequest } from './build_request_body';
import type {
@@ -13,7 +13,7 @@ import type {
VisTypeTimeseriesRequestServices,
VisTypeTimeseriesVisDataRequest,
} from '../../../types';
-import type { SearchStrategy, SearchCapabilities } from '../../search_strategies';
+import type { SearchStrategy, SearchCapabilities, EsSearchRequest } from '../../search_strategies';
export type AnnotationServices = VisTypeTimeseriesRequestServices & {
capabilities: SearchCapabilities;
@@ -32,7 +32,7 @@ export async function getAnnotationRequestParams(
uiSettings,
cachedIndexPatternFetcher,
}: AnnotationServices
-) {
+): Promise {
const annotationIndex = await cachedIndexPatternFetcher(annotation.index_pattern);
const request = await buildAnnotationRequest({
@@ -52,5 +52,14 @@ export async function getAnnotationRequestParams(
runtime_mappings: annotationIndex.indexPattern?.getComputedFields().runtimeFields ?? {},
timeout: esShardTimeout > 0 ? `${esShardTimeout}ms` : undefined,
},
+ trackingEsSearchMeta: {
+ requestId: annotation.id,
+ requestLabel: i18n.translate('visTypeTimeseries.annotationRequest.label', {
+ defaultMessage: 'Annotation: {id}',
+ values: {
+ id: annotation.id,
+ },
+ }),
+ },
};
}
diff --git a/src/plugins/vis_types/timeseries/server/lib/vis_data/get_annotations.ts b/src/plugins/vis_types/timeseries/server/lib/vis_data/get_annotations.ts
index 8a005deccaea9..481ddc7891817 100644
--- a/src/plugins/vis_types/timeseries/server/lib/vis_data/get_annotations.ts
+++ b/src/plugins/vis_types/timeseries/server/lib/vis_data/get_annotations.ts
@@ -10,8 +10,7 @@ import { handleAnnotationResponse } from './response_processors/annotations';
import { AnnotationServices, getAnnotationRequestParams } from './annotations/get_request_params';
import { getLastSeriesTimestamp } from './helpers/timestamp';
import type { VisTypeTimeseriesVisDataRequest } from '../../types';
-import type { Annotation, Panel } from '../../../common/types';
-import type { PanelSeries } from '../../../common/types/vis_data';
+import type { Annotation, Panel, TrackedEsSearches, PanelSeries } from '../../../common/types';
function validAnnotation(annotation: Annotation) {
return annotation.fields && annotation.icon && annotation.template && !annotation.hidden;
@@ -22,26 +21,33 @@ interface GetAnnotationsParams {
panel: Panel;
series: Array;
services: AnnotationServices;
+ trackedEsSearches: TrackedEsSearches;
}
-export async function getAnnotations({ req, panel, series, services }: GetAnnotationsParams) {
+export async function getAnnotations({
+ req,
+ panel,
+ series,
+ services,
+ trackedEsSearches,
+}: GetAnnotationsParams) {
const annotations = panel.annotations!.filter(validAnnotation);
const lastSeriesTimestamp = getLastSeriesTimestamp(series);
const handleAnnotationResponseBy = handleAnnotationResponse(lastSeriesTimestamp);
- const bodiesPromises = annotations.map((annotation) =>
- getAnnotationRequestParams(req, panel, annotation, services)
- );
-
- const searches = (await Promise.all(bodiesPromises)).reduce(
- (acc, items) => acc.concat(items as any),
- []
+ const searches = await Promise.all(
+ annotations.map((annotation) => getAnnotationRequestParams(req, panel, annotation, services))
);
if (!searches.length) return { responses: [] };
try {
- const data = await services.searchStrategy.search(services.requestContext, req, searches);
+ const data = await services.searchStrategy.search(
+ services.requestContext,
+ req,
+ searches,
+ trackedEsSearches
+ );
return annotations.reduce((acc, annotation, index) => {
acc[annotation.id] = handleAnnotationResponseBy(data[index].rawResponse, annotation);
diff --git a/src/plugins/vis_types/timeseries/server/lib/vis_data/get_series_data.ts b/src/plugins/vis_types/timeseries/server/lib/vis_data/get_series_data.ts
index e67592271728d..9b111b0469d22 100644
--- a/src/plugins/vis_types/timeseries/server/lib/vis_data/get_series_data.ts
+++ b/src/plugins/vis_types/timeseries/server/lib/vis_data/get_series_data.ts
@@ -20,7 +20,7 @@ import type {
VisTypeTimeseriesVisDataRequest,
VisTypeTimeseriesRequestServices,
} from '../../types';
-import type { Panel } from '../../../common/types';
+import type { Panel, DataResponseMeta } from '../../../common/types';
import { PANEL_TYPES } from '../../../common/enums';
export async function getSeriesData(
@@ -52,13 +52,14 @@ export async function getSeriesData(
}
const { searchStrategy, capabilities } = strategy;
- const meta = {
+ const handleError = handleErrorResponse(panel);
+
+ const meta: DataResponseMeta = {
type: panel.type,
uiRestrictions: capabilities.uiRestrictions,
+ trackedEsSearches: {},
};
- const handleError = handleErrorResponse(panel);
-
try {
const bodiesPromises = getActiveSeries(panel).map((series) => {
isAggSupported(series.metrics, capabilities);
@@ -80,7 +81,7 @@ export async function getSeriesData(
);
const searches = await Promise.all(bodiesPromises);
- const data = await searchStrategy.search(requestContext, req, searches);
+ const data = await searchStrategy.search(requestContext, req, searches, meta.trackedEsSearches);
const series = await Promise.all(
data.map(
@@ -101,6 +102,7 @@ export async function getSeriesData(
searchStrategy,
capabilities,
},
+ trackedEsSearches: meta.trackedEsSearches,
});
}
diff --git a/src/plugins/vis_types/timeseries/server/lib/vis_data/get_table_data.ts b/src/plugins/vis_types/timeseries/server/lib/vis_data/get_table_data.ts
index d810fba50abce..2b63749fac642 100644
--- a/src/plugins/vis_types/timeseries/server/lib/vis_data/get_table_data.ts
+++ b/src/plugins/vis_types/timeseries/server/lib/vis_data/get_table_data.ts
@@ -24,7 +24,8 @@ import type {
VisTypeTimeseriesRequestServices,
VisTypeTimeseriesVisDataRequest,
} from '../../types';
-import type { Panel } from '../../../common/types';
+import type { Panel, DataResponseMeta } from '../../../common/types';
+import type { EsSearchRequest } from '../search_strategies';
export async function getTableData(
requestContext: VisTypeTimeseriesRequestHandlerContext,
@@ -69,11 +70,11 @@ export async function getTableData(
return panel.pivot_id;
};
- const meta = {
+ const meta: DataResponseMeta = {
type: panel.type,
uiRestrictions: capabilities.uiRestrictions,
+ trackedEsSearches: {},
};
-
const handleError = handleErrorResponse(panel);
try {
@@ -88,29 +89,38 @@ export async function getTableData(
throw new PivotNotSelectedForTableError();
}
- const body = await buildTableRequest({
- req,
- panel,
- esQueryConfig: services.esQueryConfig,
- seriesIndex: panelIndex,
- capabilities,
- uiSettings: services.uiSettings,
- buildSeriesMetaParams: () =>
- services.buildSeriesMetaParams(panelIndex, Boolean(panel.use_kibana_indexes)),
- });
-
- const [resp] = await searchStrategy.search(requestContext, req, [
+ const searches: EsSearchRequest[] = [
{
+ index: panelIndex.indexPatternString,
body: {
- ...body,
+ ...(await buildTableRequest({
+ req,
+ panel,
+ esQueryConfig: services.esQueryConfig,
+ seriesIndex: panelIndex,
+ capabilities,
+ uiSettings: services.uiSettings,
+ buildSeriesMetaParams: () =>
+ services.buildSeriesMetaParams(panelIndex, Boolean(panel.use_kibana_indexes)),
+ })),
runtime_mappings: panelIndex.indexPattern?.getComputedFields().runtimeFields ?? {},
},
- index: panelIndex.indexPatternString,
+ trackingEsSearchMeta: {
+ requestId: panel.id,
+ requestLabel: i18n.translate('visTypeTimeseries.tableRequest.label', {
+ defaultMessage: 'Table: {id}',
+ values: {
+ id: panel.id,
+ },
+ }),
+ },
},
- ]);
+ ];
+
+ const data = await searchStrategy.search(requestContext, req, searches, meta.trackedEsSearches);
const buckets = get(
- resp.rawResponse ? resp.rawResponse : resp,
+ data[0].rawResponse ? data[0].rawResponse : data[0],
'aggregations.pivot.buckets',
[]
);
diff --git a/src/plugins/vis_types/timeseries/server/lib/vis_data/series/get_request_params.ts b/src/plugins/vis_types/timeseries/server/lib/vis_data/series/get_request_params.ts
index 046b207050ca0..d176eb8b99392 100644
--- a/src/plugins/vis_types/timeseries/server/lib/vis_data/series/get_request_params.ts
+++ b/src/plugins/vis_types/timeseries/server/lib/vis_data/series/get_request_params.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 { i18n } from '@kbn/i18n';
import { buildRequestBody } from './build_request_body';
import type { FetchedIndexPattern, Panel, Series } from '../../../../common/types';
@@ -13,7 +13,7 @@ import type {
VisTypeTimeseriesRequestServices,
VisTypeTimeseriesVisDataRequest,
} from '../../../types';
-import type { SearchCapabilities } from '../../search_strategies';
+import type { SearchCapabilities, EsSearchRequest } from '../../search_strategies';
export async function getSeriesRequestParams(
req: VisTypeTimeseriesVisDataRequest,
@@ -28,7 +28,7 @@ export async function getSeriesRequestParams(
cachedIndexPatternFetcher,
buildSeriesMetaParams,
}: VisTypeTimeseriesRequestServices
-) {
+): Promise {
let seriesIndex = panelIndex;
if (series.override_index_pattern) {
@@ -53,5 +53,14 @@ export async function getSeriesRequestParams(
runtime_mappings: seriesIndex.indexPattern?.getComputedFields().runtimeFields ?? {},
timeout: esShardTimeout > 0 ? `${esShardTimeout}ms` : undefined,
},
+ trackingEsSearchMeta: {
+ requestId: series.id,
+ requestLabel: i18n.translate('visTypeTimeseries.seriesRequest.label', {
+ defaultMessage: 'Series: {id}',
+ values: {
+ id: series.id,
+ },
+ }),
+ },
};
}
diff --git a/src/plugins/vis_types/timeseries/server/ui_settings.ts b/src/plugins/vis_types/timeseries/server/ui_settings.ts
index 2adbc31482f04..c64d5771479b6 100644
--- a/src/plugins/vis_types/timeseries/server/ui_settings.ts
+++ b/src/plugins/vis_types/timeseries/server/ui_settings.ts
@@ -36,4 +36,18 @@ export const getUiSettings: () => Record = () => ({
}),
schema: schema.boolean(),
},
+ [UI_SETTINGS.ALLOW_CHECKING_FOR_FAILED_SHARDS]: {
+ name: i18n.translate('visTypeTimeseries.advancedSettings.allowCheckingForFailedShardsTitle', {
+ defaultMessage: 'Show TSVB request shard failures',
+ }),
+ value: true,
+ description: i18n.translate(
+ 'visTypeTimeseries.advancedSettings.allowCheckingForFailedShardsText',
+ {
+ defaultMessage:
+ 'Show warning message for partial data in TSVB charts if the request succeeds for some shards but fails for others.',
+ }
+ ),
+ schema: schema.boolean(),
+ },
});
diff --git a/test/functional/apps/visualize/_tsvb_chart.ts b/test/functional/apps/visualize/_tsvb_chart.ts
index 1958cc4699f92..4080ca2a0ba75 100644
--- a/test/functional/apps/visualize/_tsvb_chart.ts
+++ b/test/functional/apps/visualize/_tsvb_chart.ts
@@ -52,8 +52,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await visualBuilder.clickDataTab('metric');
});
- it('should not have inspector enabled', async () => {
- await inspector.expectIsNotEnabled();
+ it('should have inspector enabled', async () => {
+ await inspector.expectIsEnabled();
});
it('should show correct data', async () => {
diff --git a/x-pack/plugins/infra/server/lib/adapters/metrics/kibana_metrics_adapter.ts b/x-pack/plugins/infra/server/lib/adapters/metrics/kibana_metrics_adapter.ts
index e05a5b647ad2b..2a87c9cbca994 100644
--- a/x-pack/plugins/infra/server/lib/adapters/metrics/kibana_metrics_adapter.ts
+++ b/x-pack/plugins/infra/server/lib/adapters/metrics/kibana_metrics_adapter.ts
@@ -6,8 +6,8 @@
*/
import { i18n } from '@kbn/i18n';
-import { flatten, get } from 'lodash';
import { KibanaRequest } from 'src/core/server';
+import { flatten, get } from 'lodash';
import { TIMESTAMP_FIELD } from '../../../../common/constants';
import { NodeDetailsMetricData } from '../../../../common/http_api/node_details_api';
import { KibanaFramework } from '../framework/kibana_framework_adapter';
@@ -63,7 +63,7 @@ export class KibanaMetricsAdapter implements InfraMetricsAdapter {
.then((results) => {
return results.filter(isVisSeriesData).map((result) => {
const metricIds = Object.keys(result).filter(
- (k) => !['type', 'uiRestrictions'].includes(k)
+ (k) => !['type', 'uiRestrictions', 'trackedEsSearches'].includes(k)
);
return metricIds.map((id: string) => {
From c5fa8e2be4a0be267242d4e63ddcfe99036a2bba Mon Sep 17 00:00:00 2001
From: Alison Goryachev
Date: Thu, 27 Jan 2022 08:15:04 -0500
Subject: [PATCH 08/45] [Upgrade Assistant] Fix deprecated index settings
resolution (#123599) (#123763)
---
.../fix_issues_step/mock_es_issues.ts | 2 +-
.../upgrade_assistant/common/constants.ts | 2 +-
.../lib/__fixtures__/fake_deprecations.json | 2 +-
.../es_deprecations_status.test.ts.snap | 2 +-
.../apis/upgrade_assistant/es_deprecations.ts | 109 ++++++++++++++----
5 files changed, 91 insertions(+), 26 deletions(-)
diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/mock_es_issues.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/mock_es_issues.ts
index 13505b47c5a7f..a5106ccc314e9 100644
--- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/mock_es_issues.ts
+++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/mock_es_issues.ts
@@ -23,7 +23,7 @@ export const esCriticalAndWarningDeprecations: ESUpgradeStatus = {
isCritical: false,
type: 'index_settings',
resolveDuringUpgrade: false,
- message: 'translog retention settings are ignored',
+ message: 'Translog retention settings are deprecated',
url: 'https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-translog.html',
details:
'translog retention settings [index.translog.retention.size] and [index.translog.retention.age] are ignored because translog is no longer used in peer recoveries with soft-deletes enabled (default in 7.0 or later)',
diff --git a/x-pack/plugins/upgrade_assistant/common/constants.ts b/x-pack/plugins/upgrade_assistant/common/constants.ts
index bbe50d940af87..06659ad073302 100644
--- a/x-pack/plugins/upgrade_assistant/common/constants.ts
+++ b/x-pack/plugins/upgrade_assistant/common/constants.ts
@@ -17,7 +17,7 @@ export const MAJOR_VERSION = '8.0.0';
*/
export const indexSettingDeprecations = {
translog: {
- deprecationMessage: 'translog retention settings are ignored', // expected message from ES deprecation info API
+ deprecationMessage: 'Translog retention settings are deprecated', // expected message from ES deprecation info API
settings: ['translog.retention.size', 'translog.retention.age'],
},
};
diff --git a/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/fake_deprecations.json b/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/fake_deprecations.json
index 2337e0e2dc039..00ae96ba33f7a 100644
--- a/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/fake_deprecations.json
+++ b/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/fake_deprecations.json
@@ -85,7 +85,7 @@
"deprecated_settings": [
{
"level": "warning",
- "message": "translog retention settings are ignored",
+ "message": "Translog retention settings are deprecated",
"url":
"https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-translog.html",
"details":
diff --git a/x-pack/plugins/upgrade_assistant/server/lib/__snapshots__/es_deprecations_status.test.ts.snap b/x-pack/plugins/upgrade_assistant/server/lib/__snapshots__/es_deprecations_status.test.ts.snap
index be9ea11a4886e..23cbf7aa265e7 100644
--- a/x-pack/plugins/upgrade_assistant/server/lib/__snapshots__/es_deprecations_status.test.ts.snap
+++ b/x-pack/plugins/upgrade_assistant/server/lib/__snapshots__/es_deprecations_status.test.ts.snap
@@ -109,7 +109,7 @@ Object {
"details": "translog retention settings [index.translog.retention.size] and [index.translog.retention.age] are ignored because translog is no longer used in peer recoveries with soft-deletes enabled (default in 7.0 or later)",
"index": "deprecated_settings",
"isCritical": false,
- "message": "translog retention settings are ignored",
+ "message": "Translog retention settings are deprecated",
"resolveDuringUpgrade": false,
"type": "index_settings",
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-translog.html",
diff --git a/x-pack/test/api_integration/apis/upgrade_assistant/es_deprecations.ts b/x-pack/test/api_integration/apis/upgrade_assistant/es_deprecations.ts
index aea003a317963..b05cf8b901b5b 100644
--- a/x-pack/test/api_integration/apis/upgrade_assistant/es_deprecations.ts
+++ b/x-pack/test/api_integration/apis/upgrade_assistant/es_deprecations.ts
@@ -5,36 +5,101 @@
* 2.0.
*/
+import type { IndicesCreateRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
+import expect from '@kbn/expect';
+
import { FtrProviderContext } from '../../ftr_provider_context';
+import {
+ API_BASE_PATH,
+ indexSettingDeprecations,
+} from '../../../../plugins/upgrade_assistant/common/constants';
+import { EnrichedDeprecationInfo } from '../../../../plugins/upgrade_assistant/common/types';
+
+const translogSettingsIndexDeprecation: IndicesCreateRequest = {
+ index: 'deprecated_settings',
+ body: {
+ settings: {
+ // @ts-expect-error setting is removed in 8.0
+ 'translog.retention.size': '1b',
+ 'translog.retention.age': '5m',
+ 'index.soft_deletes.enabled': true,
+ },
+ },
+};
export default function ({ getService }: FtrProviderContext) {
const supertestWithoutAuth = getService('supertestWithoutAuth');
+ const supertest = getService('supertest');
const security = getService('security');
+ const es = getService('es');
+ const log = getService('log');
describe('Elasticsearch deprecations', () => {
describe('GET /api/upgrade_assistant/es_deprecations', () => {
- it('handles auth error', async () => {
- const ROLE_NAME = 'authErrorRole';
- const USER_NAME = 'authErrorUser';
- const USER_PASSWORD = 'password';
-
- try {
- await security.role.create(ROLE_NAME, {});
- await security.user.create(USER_NAME, {
- password: USER_PASSWORD,
- roles: [ROLE_NAME],
- });
-
- await supertestWithoutAuth
- .get('/api/upgrade_assistant/es_deprecations')
- .auth(USER_NAME, USER_PASSWORD)
- .set('kbn-xsrf', 'kibana')
- .send()
- .expect(403);
- } finally {
- await security.role.delete(ROLE_NAME);
- await security.user.delete(USER_NAME);
- }
+ describe('error handling', () => {
+ it('handles auth error', async () => {
+ const ROLE_NAME = 'authErrorRole';
+ const USER_NAME = 'authErrorUser';
+ const USER_PASSWORD = 'password';
+
+ try {
+ await security.role.create(ROLE_NAME, {});
+ await security.user.create(USER_NAME, {
+ password: USER_PASSWORD,
+ roles: [ROLE_NAME],
+ });
+
+ await supertestWithoutAuth
+ .get(`${API_BASE_PATH}/es_deprecations`)
+ .auth(USER_NAME, USER_PASSWORD)
+ .set('kbn-xsrf', 'kibana')
+ .send()
+ .expect(403);
+ } finally {
+ await security.role.delete(ROLE_NAME);
+ await security.user.delete(USER_NAME);
+ }
+ });
+ });
+
+ // Only applicable on 7.x
+ describe.skip('index setting deprecation', () => {
+ before(async () => {
+ try {
+ // Create index that will trigger deprecation warning
+ await es.indices.create(translogSettingsIndexDeprecation);
+ } catch (e) {
+ log.debug('Error creating test index');
+ throw e;
+ }
+ });
+
+ after(async () => {
+ try {
+ await es.indices.delete({
+ index: [translogSettingsIndexDeprecation.index],
+ });
+ } catch (e) {
+ log.debug('Error deleting text index');
+ throw e;
+ }
+ });
+
+ it('returns the expected deprecation message for deprecated translog index settings', async () => {
+ const { body: apiRequestResponse } = await supertest
+ .get(`${API_BASE_PATH}/es_deprecations`)
+ .set('kbn-xsrf', 'xxx')
+ .expect(200);
+
+ const indexSettingDeprecation = apiRequestResponse.deprecations.find(
+ (deprecation: EnrichedDeprecationInfo) =>
+ deprecation.index === translogSettingsIndexDeprecation.index
+ );
+
+ expect(indexSettingDeprecation.message).to.equal(
+ indexSettingDeprecations.translog.deprecationMessage
+ );
+ });
});
});
});
From 481fb8f536880e09a73c5e35253b7bec8eacb22f Mon Sep 17 00:00:00 2001
From: Alison Goryachev
Date: Thu, 27 Jan 2022 08:16:35 -0500
Subject: [PATCH 09/45] [Upgrade Assistant] Avoid creating the new index if it
already exists when reindexing (#123817) (#123865)
---
.../server/lib/reindexing/reindex_service.ts | 27 +++++++++++++------
.../upgrade_assistant/reindexing.js | 26 ++++++++++++++++++
2 files changed, 45 insertions(+), 8 deletions(-)
diff --git a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts
index db427161f50d3..724b282a87747 100644
--- a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts
+++ b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts
@@ -191,15 +191,26 @@ export const reindexServiceFactory = (
const { settings, mappings } = transformFlatSettings(flatSettings);
- const { body: createIndex } = await esClient.indices.create({
- index: newIndexName,
- body: {
- settings,
- mappings,
- },
- });
+ let createIndex;
+ try {
+ createIndex = await esClient.indices.create({
+ index: newIndexName,
+ body: {
+ settings,
+ mappings,
+ },
+ });
+ } catch (err) {
+ // If for any reason the new index name generated by the `generateNewIndexName` already
+ // exists (this could happen if kibana is restarted during reindexing), we can just go
+ // ahead with the process without needing to create the index again.
+ // See: https://github.com/elastic/kibana/issues/123816
+ if (err?.body?.error?.type !== 'resource_already_exists_exception') {
+ throw err;
+ }
+ }
- if (!createIndex.acknowledged) {
+ if (createIndex && !createIndex?.body?.acknowledged) {
throw error.cannotCreateIndex(`Index could not be created: ${newIndexName}`);
}
diff --git a/x-pack/test/upgrade_assistant_integration/upgrade_assistant/reindexing.js b/x-pack/test/upgrade_assistant_integration/upgrade_assistant/reindexing.js
index 6a326840bc551..635cb8e288ae1 100644
--- a/x-pack/test/upgrade_assistant_integration/upgrade_assistant/reindexing.js
+++ b/x-pack/test/upgrade_assistant_integration/upgrade_assistant/reindexing.js
@@ -83,6 +83,32 @@ export default function ({ getService }) {
});
});
+ it('can resume after reindexing was stopped right after creating the new index', async () => {
+ await esArchiver.load('x-pack/test/functional/es_archives/upgrade_assistant/reindex');
+
+ // This new index is the new soon to be created reindexed index. We create it
+ // upfront to simulate a situation in which the user restarted kibana half
+ // way through the reindex process and ended up with an extra index.
+ await es.indices.create({ index: 'reindexed-v7-dummydata' });
+
+ const { body } = await supertest
+ .post(`/api/upgrade_assistant/reindex/dummydata`)
+ .set('kbn-xsrf', 'xxx')
+ .expect(200);
+
+ expect(body.indexName).to.equal('dummydata');
+ expect(body.status).to.equal(ReindexStatus.inProgress);
+
+ const lastState = await waitForReindexToComplete('dummydata');
+ expect(lastState.errorMessage).to.equal(null);
+ expect(lastState.status).to.equal(ReindexStatus.completed);
+
+ // Cleanup newly created index
+ await es.indices.delete({
+ index: lastState.newIndexName,
+ });
+ });
+
it('should update any aliases', async () => {
await esArchiver.load('x-pack/test/functional/es_archives/upgrade_assistant/reindex');
From 94e64e4da53c3bd52a0f593906bf82b8dc31a3d0 Mon Sep 17 00:00:00 2001
From: Alison Goryachev
Date: Thu, 27 Jan 2022 08:26:56 -0500
Subject: [PATCH 10/45] [Upgrade Assistant] Minimize reindex attributes used to
create credential hash (#123727) (#123864)
---
.../server/lib/reindexing/credential_store.ts | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/credential_store.ts b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/credential_store.ts
index 66885a23cf96b..b3d4d5e165a13 100644
--- a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/credential_store.ts
+++ b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/credential_store.ts
@@ -16,10 +16,14 @@ import { ReindexSavedObject, ReindexStatus } from '../../../common/types';
export type Credential = Record;
// Generates a stable hash for the reindex operation's current state.
-const getHash = (reindexOp: ReindexSavedObject) =>
- createHash('sha256')
- .update(stringify({ id: reindexOp.id, ...reindexOp.attributes }))
+const getHash = (reindexOp: ReindexSavedObject) => {
+ // Remove reindexOptions from the SO attributes as it creates an unstable hash
+ // This needs further investigation, see: https://github.com/elastic/kibana/issues/123752
+ const { reindexOptions, ...attributes } = reindexOp.attributes;
+ return createHash('sha256')
+ .update(stringify({ id: reindexOp.id, ...attributes }))
.digest('base64');
+};
// Returns a base64-encoded API key string or undefined
const getApiKey = async ({
From cc082bc5f394a3ef65cb577c8863932270c1c95d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20S=C3=A1nchez?=
Date: Thu, 27 Jan 2022 14:45:22 +0100
Subject: [PATCH 11/45] Adds error message when there are duplicated entries.
Also adds unit test for that use case (#123812)
---
.../create_trusted_app_form.test.tsx | 12 ++++++++++++
.../components/create_trusted_app_form.tsx | 19 ++++++++++++++++++-
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.test.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.test.tsx
index 952b707b5d5c3..f2313a4d0f794 100644
--- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.test.tsx
+++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.test.tsx
@@ -432,6 +432,18 @@ describe('When using the Trusted App Form', () => {
expect(renderResult.getByText('[2] Field entry must have a value'));
});
+ it('should validate duplicated conditions', () => {
+ const andButton = getConditionBuilderAndButton();
+ reactTestingLibrary.act(() => {
+ fireEvent.click(andButton, { button: 1 });
+ });
+
+ setTextFieldValue(getConditionValue(getCondition()), '');
+ rerenderWithLatestTrustedApp();
+
+ expect(renderResult.getByText('Hash cannot be added more than once'));
+ });
+
it('should validate multiple errors in form', () => {
const andButton = getConditionBuilderAndButton();
diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.tsx
index d9b1cc6624042..7cff989f008a0 100644
--- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.tsx
+++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.tsx
@@ -20,6 +20,7 @@ import {
import { i18n } from '@kbn/i18n';
import { EuiFormProps } from '@elastic/eui/src/components/form/form';
import {
+ ConditionEntry,
ConditionEntryField,
EffectScope,
MacosLinuxConditionEntry,
@@ -31,6 +32,7 @@ import {
isValidHash,
isPathValid,
hasSimpleExecutableName,
+ getDuplicateFields,
} from '../../../../../../common/endpoint/service/trusted_apps/validations';
import {
@@ -40,7 +42,7 @@ import {
isWindowsTrustedAppCondition,
} from '../../state/type_guards';
import { defaultConditionEntry } from '../../store/builders';
-import { OS_TITLES } from '../translations';
+import { CONDITION_FIELD_TITLE, OS_TITLES } from '../translations';
import { LogicalConditionBuilder, LogicalConditionBuilderProps } from './logical_condition';
import { useTestIdGenerator } from '../../../../components/hooks/use_test_id_generator';
import { useLicense } from '../../../../../common/hooks/use_license';
@@ -135,6 +137,21 @@ const validateFormValues = (values: MaybeImmutable): ValidationRe
})
);
} else {
+ const duplicated = getDuplicateFields(values.entries as ConditionEntry[]);
+ if (duplicated.length) {
+ isValid = false;
+ duplicated.forEach((field) => {
+ addResultToValidation(
+ validation,
+ 'entries',
+ 'errors',
+ i18n.translate('xpack.securitySolution.trustedapps.create.conditionFieldDuplicatedMsg', {
+ defaultMessage: '{field} cannot be added more than once',
+ values: { field: CONDITION_FIELD_TITLE[field] },
+ })
+ );
+ });
+ }
values.entries.forEach((entry, index) => {
const isValidPathEntry = isPathValid({
os: values.os,
From 4f1d97a908273d3bf21a94269d48d3b0c5d6283b Mon Sep 17 00:00:00 2001
From: Robert Oskamp
Date: Thu, 27 Jan 2022 15:04:17 +0100
Subject: [PATCH 12/45] [ML] Functional tests - reduce job run time in date
nanos and categorization tests (#123899)
This PR stabilizes the date nanos job and categorization job tests for cloud execution by reducing the job run time.
---
.../anomaly_detection/categorization_job.ts | 40 +++++++++----------
.../ml/anomaly_detection/date_nanos_job.ts | 8 ++--
x-pack/test/functional/apps/ml/index.ts | 2 +-
3 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts
index 2d2da23213f8f..7c07acd7e7185 100644
--- a/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts
+++ b/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts
@@ -21,7 +21,7 @@ export default function ({ getService }: FtrProviderContext) {
const detectorTypeIdentifier = 'Rare';
const categorizationFieldIdentifier = 'field1';
const categorizationExampleCount = 5;
- const bucketSpan = '15m';
+ const bucketSpan = '1d';
const memoryLimit = '15mb';
function getExpectedRow(expectedJobId: string, expectedJobGroups: string[]) {
@@ -29,32 +29,32 @@ export default function ({ getService }: FtrProviderContext) {
id: expectedJobId,
description: jobDescription,
jobGroups: [...new Set(expectedJobGroups)].sort(),
- recordCount: '1,501',
+ recordCount: '1,000',
memoryStatus: 'ok',
jobState: 'closed',
datafeedState: 'stopped',
- latestTimestamp: '2019-11-21 06:01:13',
+ latestTimestamp: '2019-11-21 00:01:13',
};
}
function getExpectedCounts(expectedJobId: string) {
return {
job_id: expectedJobId,
- processed_record_count: '1,501',
- processed_field_count: '1,501',
- input_bytes: '335.4 KB',
- input_field_count: '1,501',
+ processed_record_count: '1,000',
+ processed_field_count: '1,000',
+ input_bytes: '148.8 KB',
+ input_field_count: '1,000',
invalid_date_count: '0',
missing_field_count: '0',
out_of_order_timestamp_count: '0',
- empty_bucket_count: '21,428',
+ empty_bucket_count: '23',
sparse_bucket_count: '0',
- bucket_count: '22,059',
+ bucket_count: '230',
earliest_record_timestamp: '2019-04-05 11:25:35',
- latest_record_timestamp: '2019-11-21 06:01:13',
- input_record_count: '1,501',
- latest_bucket_timestamp: '2019-11-21 06:00:00',
- latest_empty_bucket_timestamp: '2019-11-21 05:45:00',
+ latest_record_timestamp: '2019-11-21 00:01:13',
+ input_record_count: '1,000',
+ latest_bucket_timestamp: '2019-11-21 00:00:00',
+ latest_empty_bucket_timestamp: '2019-11-17 00:00:00',
};
}
@@ -68,7 +68,7 @@ export default function ({ getService }: FtrProviderContext) {
total_partition_field_count: '2',
bucket_allocation_failures_count: '0',
memory_status: 'ok',
- timestamp: '2019-11-21 05:45:00',
+ timestamp: '2019-11-20 00:00:00',
};
}
@@ -77,8 +77,8 @@ export default function ({ getService }: FtrProviderContext) {
describe('categorization', function () {
this.tags(['mlqa']);
before(async () => {
- await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/categorization');
- await ml.testResources.createIndexPatternIfNeeded('ft_categorization', '@timestamp');
+ await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/categorization_small');
+ await ml.testResources.createIndexPatternIfNeeded('ft_categorization_small', '@timestamp');
await ml.testResources.setKibanaTimeZoneToUTC();
await ml.api.createCalendar(calendarId);
@@ -87,7 +87,7 @@ export default function ({ getService }: FtrProviderContext) {
after(async () => {
await ml.api.cleanMlIndices();
- await ml.testResources.deleteIndexPatternByTitle('ft_categorization');
+ await ml.testResources.deleteIndexPatternByTitle('ft_categorization_small');
});
it('job creation loads the categorization wizard for the source data', async () => {
@@ -100,7 +100,7 @@ export default function ({ getService }: FtrProviderContext) {
await ml.jobManagement.navigateToNewJobSourceSelection();
await ml.testExecution.logTestStep('job creation loads the job type selection page');
- await ml.jobSourceSelection.selectSourceForAnomalyDetectionJob('ft_categorization');
+ await ml.jobSourceSelection.selectSourceForAnomalyDetectionJob('ft_categorization_small');
await ml.testExecution.logTestStep('job creation loads the categorization job wizard page');
await ml.jobTypeSelection.selectCategorizationJob();
@@ -113,7 +113,7 @@ export default function ({ getService }: FtrProviderContext) {
await ml.testExecution.logTestStep('job creation sets the time range');
await ml.jobWizardCommon.clickUseFullDataButton(
'Apr 5, 2019 @ 11:25:35.770',
- 'Nov 21, 2019 @ 06:01:13.914'
+ 'Nov 21, 2019 @ 00:01:13.923'
);
await ml.testExecution.logTestStep('job creation displays the event rate chart');
@@ -235,7 +235,7 @@ export default function ({ getService }: FtrProviderContext) {
await ml.testExecution.logTestStep('job cloning sets the time range');
await ml.jobWizardCommon.clickUseFullDataButton(
'Apr 5, 2019 @ 11:25:35.770',
- 'Nov 21, 2019 @ 06:01:13.914'
+ 'Nov 21, 2019 @ 00:01:13.923'
);
await ml.testExecution.logTestStep('job cloning displays the event rate chart');
diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/date_nanos_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/date_nanos_job.ts
index efa9e7812e20d..fb60534b87aa0 100644
--- a/x-pack/test/functional/apps/ml/anomaly_detection/date_nanos_job.ts
+++ b/x-pack/test/functional/apps/ml/anomaly_detection/date_nanos_job.ts
@@ -57,7 +57,7 @@ export default function ({ getService }: FtrProviderContext) {
jobSource: 'ft_event_rate_gen_trend_nanos',
jobId: `event_rate_nanos_count_1_${Date.now()}`,
jobDescription:
- 'Create advanced job based on the event rate dataset with a date_nanos time field, 30m bucketspan and count',
+ 'Create advanced job based on the event rate dataset with a date_nanos time field, 1d bucketspan and count',
jobGroups: ['automated', 'event-rate', 'date-nanos'],
pickFieldsConfig: {
detectors: [
@@ -69,7 +69,7 @@ export default function ({ getService }: FtrProviderContext) {
],
summaryCountField: 'count',
influencers: [],
- bucketSpan: '30m',
+ bucketSpan: '1d',
memoryLimit: '10mb',
} as PickFieldsConfig,
datafeedConfig: {} as DatafeedConfig,
@@ -94,7 +94,7 @@ export default function ({ getService }: FtrProviderContext) {
out_of_order_timestamp_count: '0',
empty_bucket_count: '0',
sparse_bucket_count: '0',
- bucket_count: '17,520',
+ bucket_count: '365',
earliest_record_timestamp: '2015-01-01 00:10:00',
latest_record_timestamp: '2016-01-01 00:00:00',
input_record_count: '105,120',
@@ -108,7 +108,7 @@ export default function ({ getService }: FtrProviderContext) {
total_partition_field_count: '2',
bucket_allocation_failures_count: '0',
memory_status: 'ok',
- timestamp: '2015-12-31 23:30:00',
+ timestamp: '2015-12-31 00:00:00',
},
},
},
diff --git a/x-pack/test/functional/apps/ml/index.ts b/x-pack/test/functional/apps/ml/index.ts
index 7ac4d46b4dfbd..eeae200f35ba7 100644
--- a/x-pack/test/functional/apps/ml/index.ts
+++ b/x-pack/test/functional/apps/ml/index.ts
@@ -26,7 +26,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote');
await esArchiver.unload('x-pack/test/functional/es_archives/ml/ecommerce');
- await esArchiver.unload('x-pack/test/functional/es_archives/ml/categorization');
+ await esArchiver.unload('x-pack/test/functional/es_archives/ml/categorization_small');
await esArchiver.unload('x-pack/test/functional/es_archives/ml/event_rate_nanos');
await esArchiver.unload('x-pack/test/functional/es_archives/ml/bm_classification');
await esArchiver.unload('x-pack/test/functional/es_archives/ml/ihp_outlier');
From baa6510547a79aab39ad819a94f2330cd2fca2c5 Mon Sep 17 00:00:00 2001
From: Maja Grubic
Date: Thu, 27 Jan 2022 15:05:58 +0100
Subject: [PATCH 13/45] [Discover] Redirect if no data views (#123366)
* [Discover] Redirect if new Kibana instance
* Add a functional test
* Remove state; add redirect
* Code polishing
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
---
.../application/main/discover_main_route.tsx | 27 ++++++++++++++---
test/functional/apps/discover/_empty_state.ts | 30 +++++++++++++++++++
test/functional/apps/discover/index.ts | 1 +
3 files changed, 54 insertions(+), 4 deletions(-)
create mode 100644 test/functional/apps/discover/_empty_state.ts
diff --git a/src/plugins/discover/public/application/main/discover_main_route.tsx b/src/plugins/discover/public/application/main/discover_main_route.tsx
index dd1d036b811a2..f1d7cc2385cd0 100644
--- a/src/plugins/discover/public/application/main/discover_main_route.tsx
+++ b/src/plugins/discover/public/application/main/discover_main_route.tsx
@@ -5,7 +5,7 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
-import React, { useEffect, useState, memo } from 'react';
+import React, { useEffect, useState, memo, useCallback } from 'react';
import { History } from 'history';
import { useParams } from 'react-router-dom';
@@ -21,10 +21,10 @@ import { DiscoverMainApp } from './discover_main_app';
import { getRootBreadcrumbs, getSavedSearchBreadcrumbs } from '../../utils/breadcrumbs';
import { redirectWhenMissing } from '../../../../kibana_utils/public';
import { DataViewSavedObjectConflictError } from '../../../../data_views/common';
-import { getUrlTracker } from '../../kibana_services';
import { LoadingIndicator } from '../../components/common/loading_indicator';
import { DiscoverError } from '../../components/common/error_alert';
import { DiscoverRouteProps } from '../types';
+import { getUrlTracker } from '../../kibana_services';
const DiscoverMainAppMemoized = memo(DiscoverMainApp);
@@ -54,15 +54,29 @@ export function DiscoverMainRoute({ services, history }: DiscoverMainProps) {
const [indexPatternList, setIndexPatternList] = useState<
Array>
>([]);
-
const { id } = useParams();
+ const navigateToOverview = useCallback(() => {
+ core.application.navigateToApp('kibanaOverview', { path: '#' });
+ }, [core.application]);
+
+ const checkForDataViews = useCallback(async () => {
+ const hasUserDataView = await data.dataViews.hasUserDataView().catch(() => true);
+ if (!hasUserDataView) {
+ navigateToOverview();
+ }
+ const defaultDataView = await data.dataViews.getDefaultDataView();
+ if (!defaultDataView) {
+ navigateToOverview();
+ }
+ }, [navigateToOverview, data.dataViews]);
+
useEffect(() => {
const savedSearchId = id;
async function loadDefaultOrCurrentIndexPattern(searchSource: ISearchSource) {
try {
- await data.indexPatterns.ensureDefaultDataView();
+ await checkForDataViews();
const { appStateContainer } = getState({ history, uiSettings: config });
const { index } = appStateContainer.getState();
const ip = await loadIndexPattern(index || '', data.indexPatterns, config);
@@ -90,6 +104,10 @@ export function DiscoverMainRoute({ services, history }: DiscoverMainProps) {
currentSavedSearch.searchSource
);
+ if (!loadedIndexPattern) {
+ return;
+ }
+
if (!currentSavedSearch.searchSource.getField('index')) {
currentSavedSearch.searchSource.setField('index', loadedIndexPattern);
}
@@ -141,6 +159,7 @@ export function DiscoverMainRoute({ services, history }: DiscoverMainProps) {
services,
toastNotifications,
core.theme,
+ checkForDataViews,
]);
useEffect(() => {
diff --git a/test/functional/apps/discover/_empty_state.ts b/test/functional/apps/discover/_empty_state.ts
new file mode 100644
index 0000000000000..e78f5de8bd780
--- /dev/null
+++ b/test/functional/apps/discover/_empty_state.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 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 expect from '@kbn/expect';
+import { FtrProviderContext } from '../../ftr_provider_context';
+
+export default function ({ getService, getPageObjects }: FtrProviderContext) {
+ const testSubjects = getService('testSubjects');
+ const kibanaServer = getService('kibanaServer');
+ const PageObjects = getPageObjects(['common', 'timePicker', 'discover']);
+
+ describe('empty state', () => {
+ before(async () => {
+ await kibanaServer.uiSettings.unset('defaultIndex');
+ await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] });
+ });
+
+ it('redirects to Overview app', async () => {
+ await PageObjects.common.navigateToApp('discover');
+ const selector = await testSubjects.find('kibanaChrome');
+ const content = await selector.findByCssSelector('.kbnNoDataPageContents');
+ expect(content).not.to.be(null);
+ });
+ });
+}
diff --git a/test/functional/apps/discover/index.ts b/test/functional/apps/discover/index.ts
index 1241b0e892e9c..b5eb160526876 100644
--- a/test/functional/apps/discover/index.ts
+++ b/test/functional/apps/discover/index.ts
@@ -54,5 +54,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
loadTestFile(require.resolve('./_search_on_page_load'));
loadTestFile(require.resolve('./_chart_hidden'));
loadTestFile(require.resolve('./_context_encoded_url_param'));
+ loadTestFile(require.resolve('./_empty_state'));
});
}
From d965ba791a396ba7f3578f35f5a6d6b1f418971d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20S=C3=A1nchez?=
Date: Thu, 27 Jan 2022 15:30:49 +0100
Subject: [PATCH 14/45] [Security Solution][Endpoint] Event filters ux
adjustments for 8.1 (#123853)
* Don't show a default value '-' for emoty descriptions on artifacts list. Also removes empty spaces
* Update copy to say 'event filters' instead of 'exceptions'
* Decrease spacing between avatar and comments textbox
* Adds extra spacing between last exception builder field and the buttons group
* Reduces effect scope togle width to by dynamic depending on translations
* Makes effected policy button group persistent across different artifact forms
* Removes unused import
* Center button group for small devices
---
.../builder/exception_items_renderer.tsx | 4 ++-
.../exceptions/add_exception_comments.tsx | 2 +-
.../effected_policy_select.tsx | 25 ++++++++++++++-----
.../view/event_filters_list_page.tsx | 2 ++
.../view/host_isolation_exceptions_list.tsx | 2 ++
.../list/policy_event_filters_list.test.tsx | 2 +-
.../list/policy_event_filters_list.tsx | 3 ++-
.../components/trusted_apps_grid/index.tsx | 1 +
8 files changed, 31 insertions(+), 10 deletions(-)
diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/exception_items_renderer.tsx b/x-pack/plugins/lists/public/exceptions/components/builder/exception_items_renderer.tsx
index 54cb00bfe3868..9656f0815dd7d 100644
--- a/x-pack/plugins/lists/public/exceptions/components/builder/exception_items_renderer.tsx
+++ b/x-pack/plugins/lists/public/exceptions/components/builder/exception_items_renderer.tsx
@@ -6,7 +6,7 @@
*/
import React, { useCallback, useEffect, useReducer } from 'react';
-import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
+import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui';
import styled from 'styled-components';
import { HttpStart } from 'kibana/public';
import { addIdToItem } from '@kbn/securitysolution-utils';
@@ -425,6 +425,8 @@ export const ExceptionBuilderComponent = ({
))}
+
+
{andLogicIncluded && (
diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_comments.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_comments.tsx
index 87f7f5fe2f507..8cc9a6a43c895 100644
--- a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_comments.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_comments.tsx
@@ -32,7 +32,7 @@ const COMMENT_ACCORDION_BUTTON_CLASS_NAME = 'exceptionCommentAccordionButton';
const MyAvatar = styled(EuiAvatar)`
${({ theme }) => css`
- margin-right: ${theme.eui.paddingSizes.m};
+ margin-right: ${theme.eui.paddingSizes.s};
`}
`;
diff --git a/x-pack/plugins/security_solution/public/management/components/effected_policy_select/effected_policy_select.tsx b/x-pack/plugins/security_solution/public/management/components/effected_policy_select/effected_policy_select.tsx
index e20df0c122956..ee2d274704408 100644
--- a/x-pack/plugins/security_solution/public/management/components/effected_policy_select/effected_policy_select.tsx
+++ b/x-pack/plugins/security_solution/public/management/components/effected_policy_select/effected_policy_select.tsx
@@ -46,6 +46,20 @@ const StyledEuiSelectable = styled.div`
}
`;
+const StyledEuiFlexItemButtonGroup = styled(EuiFlexItem)`
+ @media only screen and (max-width: ${(props) => props.theme.eui.euiBreakpoints.m}) {
+ align-items: center;
+ }
+`;
+
+const StyledButtonGroup = styled(EuiButtonGroup)`
+ display: flex;
+ justify-content: right;
+ .euiButtonGroupButton {
+ padding-right: ${(props) => props.theme.eui.paddingSizes.l};
+ }
+`;
+
const EffectivePolicyFormContainer = styled.div`
.policy-name .euiSelectableListItem__text {
text-decoration: none !important;
@@ -99,7 +113,7 @@ export const EffectedPolicySelect = memo(
label: i18n.translate('xpack.securitySolution.endpoint.effectedPolicySelect.global', {
defaultMessage: 'Global',
}),
- iconType: isGlobal ? 'checkInCircleFilled' : '',
+ iconType: isGlobal ? 'checkInCircleFilled' : 'empty',
'data-test-subj': getTestId('global'),
},
{
@@ -107,7 +121,7 @@ export const EffectedPolicySelect = memo(
label: i18n.translate('xpack.securitySolution.endpoint.effectedPolicySelect.perPolicy', {
defaultMessage: 'Per Policy',
}),
- iconType: !isGlobal ? 'checkInCircleFilled' : '',
+ iconType: !isGlobal ? 'checkInCircleFilled' : 'empty',
'data-test-subj': getTestId('perPolicy'),
},
],
@@ -208,19 +222,18 @@ export const EffectedPolicySelect = memo(
-
+
-
-
+
{!isGlobal &&
diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list_page.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list_page.tsx
index d83bc8d36dd23..adb76683ebb77 100644
--- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list_page.tsx
+++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list_page.tsx
@@ -230,6 +230,8 @@ export const EventFiltersListPage = memo(() => {
children: DELETE_EVENT_FILTER_ACTION_LABEL,
},
],
+ hideDescription: !eventFilter.description,
+ hideComments: !eventFilter.comments.length,
};
}
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 8a1bc3fa2128f..96b095826cbe2 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
@@ -157,6 +157,8 @@ export const HostIsolationExceptionsList = () => {
'data-test-subj': `hostIsolationExceptionsCard`,
actions: privileges.canIsolateHost ? [editAction, deleteAction] : [deleteAction],
policies: artifactCardPolicies,
+ hideDescription: !element.description,
+ hideComments: !element.comments.length,
};
}
diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/event_filters/list/policy_event_filters_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/event_filters/list/policy_event_filters_list.test.tsx
index dc78c3edb87fa..e8425a57b4012 100644
--- a/x-pack/plugins/security_solution/public/management/pages/policy/view/event_filters/list/policy_event_filters_list.test.tsx
+++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/event_filters/list/policy_event_filters_list.test.tsx
@@ -66,7 +66,7 @@ describe('Policy details event filters list', () => {
);
await render();
expect(renderResult.getByTestId('policyDetailsEventFiltersSearchCount')).toHaveTextContent(
- 'Showing 0 exceptions'
+ 'Showing 0 event filters'
);
expect(renderResult.getByTestId('searchField')).toBeTruthy();
});
diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/event_filters/list/policy_event_filters_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/event_filters/list/policy_event_filters_list.tsx
index 2e2ca9b4835fd..5ab6f4bfb0eba 100644
--- a/x-pack/plugins/security_solution/public/management/pages/policy/view/event_filters/list/policy_event_filters_list.tsx
+++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/event_filters/list/policy_event_filters_list.tsx
@@ -96,7 +96,8 @@ export const PolicyEventFiltersList = React.memo(({
return i18n.translate(
'xpack.securitySolution.endpoint.policy.eventFilters.list.totalItemCount',
{
- defaultMessage: 'Showing {totalItemsCount, plural, one {# exception} other {# exceptions}}',
+ defaultMessage:
+ 'Showing {totalItemsCount, plural, one {# event filter} other {# event filters}}',
values: { totalItemsCount: eventFilters?.data.length || 0 },
}
);
diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_grid/index.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_grid/index.tsx
index 72b52b0f35278..a8e2187083523 100644
--- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_grid/index.tsx
+++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_grid/index.tsx
@@ -177,6 +177,7 @@ export const TrustedAppsGrid = memo(() => {
children: DELETE_TRUSTED_APP_ACTION_LABEL,
},
],
+ hideDescription: !trustedApp.description,
};
}
From eeeef83ea480a942fd7f87f876206b98950b175a Mon Sep 17 00:00:00 2001
From: Scotty Bollinger
Date: Thu, 27 Jan 2022 08:35:52 -0600
Subject: [PATCH 15/45] [Enterprise Search] Fix bug where no content when user
has no Enterprise Search access (#123877)
* Add docs link for kibana xpack-security
* Add callout when user has no Enterprise Search access
* Updated API documentation and the API review file
---
...-plugin-core-public.doclinksstart.links.md | 1 +
...kibana-plugin-core-public.doclinksstart.md | 2 +-
.../public/doc_links/doc_links_service.ts | 2 +
src/core/public/public.api.md | 1 +
.../product_selector/lock_light.svg | 1 +
.../product_selector.test.tsx | 18 ++-
.../product_selector/product_selector.tsx | 115 ++++++++++++++----
.../shared/doc_links/doc_links.ts | 3 +
8 files changed, 118 insertions(+), 25 deletions(-)
create mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/product_selector/lock_light.svg
diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md
index 03862cedf5477..7864f2ca828db 100644
--- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md
+++ b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md
@@ -197,6 +197,7 @@ readonly links: {
readonly kibana: {
readonly guide: string;
readonly autocompleteSuggestions: string;
+ readonly xpackSecurity: string;
};
readonly upgradeAssistant: {
readonly overview: string;
diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
index 618aef54423bb..ed7fd160f8f3f 100644
--- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
+++ b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
@@ -17,5 +17,5 @@ export interface DocLinksStart
| --- | --- | --- |
| [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md) | string | |
| [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md) | string | |
-| [links](./kibana-plugin-core-public.doclinksstart.links.md) | { readonly settings: string; readonly elasticStackGetStarted: string; readonly upgrade: { readonly upgradingElasticStack: string; }; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; readonly customLinks: string; readonly droppedTransactionSpans: string; readonly upgrading: string; readonly metaData: string; }; readonly canvas: { readonly guide: string; }; readonly cloud: { readonly indexManagement: string; }; readonly console: { readonly guide: string; }; readonly dashboard: { readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }; readonly discover: Record<string, string>; readonly filebeat: { readonly base: string; readonly installation: string; readonly configuration: string; readonly elasticsearchOutput: string; readonly elasticsearchModule: string; readonly startup: string; readonly exportedFields: string; readonly suricataModule: string; readonly zeekModule: string; }; readonly auditbeat: { readonly base: string; readonly auditdModule: string; readonly systemModule: string; }; readonly metricbeat: { readonly base: string; readonly configure: string; readonly httpEndpoint: string; readonly install: string; readonly start: string; }; readonly appSearch: { readonly apiRef: string; readonly apiClients: string; readonly apiKeys: string; readonly authentication: string; readonly crawlRules: string; readonly curations: string; readonly duplicateDocuments: string; readonly entryPoints: string; readonly guide: string; readonly indexingDocuments: string; readonly indexingDocumentsSchema: string; readonly logSettings: string; readonly metaEngines: string; readonly precisionTuning: string; readonly relevanceTuning: string; readonly resultSettings: string; readonly searchUI: string; readonly security: string; readonly synonyms: string; readonly webCrawler: string; readonly webCrawlerEventLogs: string; }; readonly enterpriseSearch: { readonly configuration: string; readonly licenseManagement: string; readonly mailService: string; readonly usersAccess: string; }; readonly workplaceSearch: { readonly apiKeys: string; readonly box: string; readonly confluenceCloud: string; readonly confluenceServer: string; readonly customSources: string; readonly customSourcePermissions: string; readonly documentPermissions: string; readonly dropbox: string; readonly externalIdentities: string; readonly gitHub: string; readonly gettingStarted: string; readonly gmail: string; readonly googleDrive: string; readonly indexingSchedule: string; readonly jiraCloud: string; readonly jiraServer: string; readonly oneDrive: string; readonly permissions: string; readonly salesforce: string; readonly security: string; readonly serviceNow: string; readonly sharePoint: string; readonly slack: string; readonly synch: string; readonly zendesk: string; }; readonly heartbeat: { readonly base: string; }; readonly libbeat: { readonly getStarted: string; }; readonly logstash: { readonly base: string; }; readonly functionbeat: { readonly base: string; }; readonly winlogbeat: { readonly base: string; }; readonly aggs: { readonly composite: string; readonly composite\_missing\_bucket: string; readonly date\_histogram: string; readonly date\_range: string; readonly date\_format\_pattern: string; readonly filter: string; readonly filters: string; readonly geohash\_grid: string; readonly histogram: string; readonly ip\_range: string; readonly range: string; readonly significant\_terms: string; readonly terms: string; readonly terms\_doc\_count\_error: string; readonly rare\_terms: string; readonly avg: string; readonly avg\_bucket: string; readonly max\_bucket: string; readonly min\_bucket: string; readonly sum\_bucket: string; readonly cardinality: string; readonly count: string; readonly cumulative\_sum: string; readonly derivative: string; readonly geo\_bounds: string; readonly geo\_centroid: string; readonly max: string; readonly median: string; readonly min: string; readonly moving\_avg: string; readonly percentile\_ranks: string; readonly serial\_diff: string; readonly std\_dev: string; readonly sum: string; readonly top\_hits: string; }; readonly runtimeFields: { readonly overview: string; readonly mapping: string; }; readonly scriptedFields: { readonly scriptFields: string; readonly scriptAggs: string; readonly painless: string; readonly painlessApi: string; readonly painlessLangSpec: string; readonly painlessSyntax: string; readonly painlessWalkthrough: string; readonly luceneExpressions: string; }; readonly search: { readonly sessions: string; readonly sessionLimits: string; }; readonly indexPatterns: { readonly introduction: string; readonly fieldFormattersNumber: string; readonly fieldFormattersString: string; readonly runtimeFields: string; }; readonly addData: string; readonly kibana: string; readonly upgradeAssistant: { readonly overview: string; readonly batchReindex: string; readonly remoteReindex: string; }; readonly rollupJobs: string; readonly elasticsearch: Record<string, string>; readonly siem: { readonly privileges: string; readonly guide: string; readonly gettingStarted: string; readonly ml: string; readonly ruleChangeLog: string; readonly detectionsReq: string; readonly networkMap: string; readonly troubleshootGaps: string; }; readonly securitySolution: { readonly trustedApps: string; readonly eventFilters: string; }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; readonly luceneQuerySyntax: string; readonly percolate: string; readonly queryDsl: string; }; readonly date: { readonly dateMath: string; readonly dateMathIndexNames: string; }; readonly management: Record<string, string>; readonly ml: Record<string, string>; readonly transforms: Record<string, string>; readonly visualize: Record<string, string>; readonly apis: Readonly<{ bulkIndexAlias: string; byteSizeUnits: string; createAutoFollowPattern: string; createFollower: string; createIndex: string; createSnapshotLifecyclePolicy: string; createRoleMapping: string; createRoleMappingTemplates: string; createRollupJobsRequest: string; createApiKey: string; createPipeline: string; createTransformRequest: string; cronExpressions: string; executeWatchActionModes: string; indexExists: string; openIndex: string; putComponentTemplate: string; painlessExecute: string; painlessExecuteAPIContexts: string; putComponentTemplateMetadata: string; putSnapshotLifecyclePolicy: string; putIndexTemplateV1: string; putWatch: string; simulatePipeline: string; timeUnits: string; updateTransform: string; }>; readonly observability: Readonly<{ guide: string; infrastructureThreshold: string; logsThreshold: string; metricsThreshold: string; monitorStatus: string; monitorUptime: string; tlsCertificate: string; uptimeDurationAnomaly: string; }>; readonly alerting: Record<string, string>; readonly maps: Readonly<{ guide: string; importGeospatialPrivileges: string; gdalTutorial: string; }>; readonly monitoring: Record<string, string>; readonly security: Readonly<{ apiKeyServiceSettings: string; clusterPrivileges: string; elasticsearchSettings: string; elasticsearchEnableSecurity: string; elasticsearchEnableApiKeys: string; indicesPrivileges: string; kibanaTLS: string; kibanaPrivileges: string; mappingRoles: string; mappingRolesFieldRules: string; runAsPrivilege: string; }>; readonly spaces: Readonly<{ kibanaLegacyUrlAliases: string; kibanaDisableLegacyUrlAliasesApi: string; }>; readonly watcher: Record<string, string>; readonly ccs: Record<string, string>; readonly plugins: { azureRepo: string; gcsRepo: string; hdfsRepo: string; s3Repo: string; snapshotRestoreRepos: string; mapperSize: string; }; readonly snapshotRestore: Record<string, string>; readonly ingest: Record<string, string>; readonly fleet: Readonly<{ beatsAgentComparison: string; guide: string; fleetServer: string; fleetServerAddFleetServer: string; settings: string; settingsFleetServerHostSettings: string; settingsFleetServerProxySettings: string; troubleshooting: string; elasticAgent: string; datastreams: string; datastreamsNamingScheme: string; installElasticAgent: string; installElasticAgentStandalone: string; upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; apiKeysLearnMore: string; onPremRegistry: string; }>; readonly ecs: { readonly guide: string; }; readonly clients: { readonly guide: string; readonly goOverview: string; readonly javaIndex: string; readonly jsIntro: string; readonly netGuide: string; readonly perlGuide: string; readonly phpGuide: string; readonly pythonGuide: string; readonly rubyOverview: string; readonly rustGuide: string; }; readonly endpoints: { readonly troubleshooting: string; }; } | |
+| [links](./kibana-plugin-core-public.doclinksstart.links.md) | { readonly settings: string; readonly elasticStackGetStarted: string; readonly upgrade: { readonly upgradingElasticStack: string; }; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; readonly customLinks: string; readonly droppedTransactionSpans: string; readonly upgrading: string; readonly metaData: string; }; readonly canvas: { readonly guide: string; }; readonly cloud: { readonly indexManagement: string; }; readonly console: { readonly guide: string; }; readonly dashboard: { readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }; readonly discover: Record<string, string>; readonly filebeat: { readonly base: string; readonly installation: string; readonly configuration: string; readonly elasticsearchOutput: string; readonly elasticsearchModule: string; readonly startup: string; readonly exportedFields: string; readonly suricataModule: string; readonly zeekModule: string; }; readonly auditbeat: { readonly base: string; readonly auditdModule: string; readonly systemModule: string; }; readonly metricbeat: { readonly base: string; readonly configure: string; readonly httpEndpoint: string; readonly install: string; readonly start: string; }; readonly appSearch: { readonly apiRef: string; readonly apiClients: string; readonly apiKeys: string; readonly authentication: string; readonly crawlRules: string; readonly curations: string; readonly duplicateDocuments: string; readonly entryPoints: string; readonly guide: string; readonly indexingDocuments: string; readonly indexingDocumentsSchema: string; readonly logSettings: string; readonly metaEngines: string; readonly precisionTuning: string; readonly relevanceTuning: string; readonly resultSettings: string; readonly searchUI: string; readonly security: string; readonly synonyms: string; readonly webCrawler: string; readonly webCrawlerEventLogs: string; }; readonly enterpriseSearch: { readonly configuration: string; readonly licenseManagement: string; readonly mailService: string; readonly usersAccess: string; }; readonly workplaceSearch: { readonly apiKeys: string; readonly box: string; readonly confluenceCloud: string; readonly confluenceServer: string; readonly customSources: string; readonly customSourcePermissions: string; readonly documentPermissions: string; readonly dropbox: string; readonly externalIdentities: string; readonly gitHub: string; readonly gettingStarted: string; readonly gmail: string; readonly googleDrive: string; readonly indexingSchedule: string; readonly jiraCloud: string; readonly jiraServer: string; readonly oneDrive: string; readonly permissions: string; readonly salesforce: string; readonly security: string; readonly serviceNow: string; readonly sharePoint: string; readonly slack: string; readonly synch: string; readonly zendesk: string; }; readonly heartbeat: { readonly base: string; }; readonly libbeat: { readonly getStarted: string; }; readonly logstash: { readonly base: string; }; readonly functionbeat: { readonly base: string; }; readonly winlogbeat: { readonly base: string; }; readonly aggs: { readonly composite: string; readonly composite\_missing\_bucket: string; readonly date\_histogram: string; readonly date\_range: string; readonly date\_format\_pattern: string; readonly filter: string; readonly filters: string; readonly geohash\_grid: string; readonly histogram: string; readonly ip\_range: string; readonly range: string; readonly significant\_terms: string; readonly terms: string; readonly terms\_doc\_count\_error: string; readonly rare\_terms: string; readonly avg: string; readonly avg\_bucket: string; readonly max\_bucket: string; readonly min\_bucket: string; readonly sum\_bucket: string; readonly cardinality: string; readonly count: string; readonly cumulative\_sum: string; readonly derivative: string; readonly geo\_bounds: string; readonly geo\_centroid: string; readonly max: string; readonly median: string; readonly min: string; readonly moving\_avg: string; readonly percentile\_ranks: string; readonly serial\_diff: string; readonly std\_dev: string; readonly sum: string; readonly top\_hits: string; }; readonly runtimeFields: { readonly overview: string; readonly mapping: string; }; readonly scriptedFields: { readonly scriptFields: string; readonly scriptAggs: string; readonly painless: string; readonly painlessApi: string; readonly painlessLangSpec: string; readonly painlessSyntax: string; readonly painlessWalkthrough: string; readonly luceneExpressions: string; }; readonly search: { readonly sessions: string; readonly sessionLimits: string; }; readonly indexPatterns: { readonly introduction: string; readonly fieldFormattersNumber: string; readonly fieldFormattersString: string; readonly runtimeFields: string; }; readonly addData: string; readonly kibana: { readonly guide: string; readonly autocompleteSuggestions: string; readonly xpackSecurity: string; }; readonly upgradeAssistant: { readonly overview: string; readonly batchReindex: string; readonly remoteReindex: string; }; readonly rollupJobs: string; readonly elasticsearch: Record<string, string>; readonly siem: { readonly privileges: string; readonly guide: string; readonly gettingStarted: string; readonly ml: string; readonly ruleChangeLog: string; readonly detectionsReq: string; readonly networkMap: string; readonly troubleshootGaps: string; }; readonly securitySolution: { readonly trustedApps: string; readonly eventFilters: string; }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; readonly luceneQuery: string; readonly luceneQuerySyntax: string; readonly percolate: string; readonly queryDsl: string; }; readonly date: { readonly dateMath: string; readonly dateMathIndexNames: string; }; readonly management: Record<string, string>; readonly ml: Record<string, string>; readonly transforms: Record<string, string>; readonly visualize: Record<string, string>; readonly apis: Readonly<{ bulkIndexAlias: string; byteSizeUnits: string; createAutoFollowPattern: string; createFollower: string; createIndex: string; createSnapshotLifecyclePolicy: string; createRoleMapping: string; createRoleMappingTemplates: string; createRollupJobsRequest: string; createApiKey: string; createPipeline: string; createTransformRequest: string; cronExpressions: string; executeWatchActionModes: string; indexExists: string; multiSearch: string; openIndex: string; putComponentTemplate: string; painlessExecute: string; painlessExecuteAPIContexts: string; putComponentTemplateMetadata: string; putSnapshotLifecyclePolicy: string; putIndexTemplateV1: string; putWatch: string; searchPreference: string; simulatePipeline: string; timeUnits: string; unfreezeIndex: string; updateTransform: string; }>; readonly observability: Readonly<{ guide: string; infrastructureThreshold: string; logsThreshold: string; metricsThreshold: string; monitorStatus: string; monitorUptime: string; tlsCertificate: string; uptimeDurationAnomaly: string; }>; readonly alerting: Record<string, string>; readonly maps: Readonly<{ guide: string; importGeospatialPrivileges: string; gdalTutorial: string; }>; readonly monitoring: Record<string, string>; readonly security: Readonly<{ apiKeyServiceSettings: string; clusterPrivileges: string; elasticsearchSettings: string; elasticsearchEnableSecurity: string; elasticsearchEnableApiKeys: string; indicesPrivileges: string; kibanaTLS: string; kibanaPrivileges: string; mappingRoles: string; mappingRolesFieldRules: string; runAsPrivilege: string; }>; readonly spaces: Readonly<{ kibanaLegacyUrlAliases: string; kibanaDisableLegacyUrlAliasesApi: string; }>; readonly watcher: Record<string, string>; readonly ccs: Record<string, string>; readonly plugins: { azureRepo: string; gcsRepo: string; hdfsRepo: string; s3Repo: string; snapshotRestoreRepos: string; mapperSize: string; }; readonly snapshotRestore: Record<string, string>; readonly ingest: Record<string, string>; readonly fleet: Readonly<{ beatsAgentComparison: string; guide: string; fleetServer: string; fleetServerAddFleetServer: string; settings: string; settingsFleetServerHostSettings: string; settingsFleetServerProxySettings: string; troubleshooting: string; elasticAgent: string; datastreams: string; datastreamsNamingScheme: string; installElasticAgent: string; installElasticAgentStandalone: string; upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; apiKeysLearnMore: string; onPremRegistry: string; }>; readonly ecs: { readonly guide: string; }; readonly clients: { readonly guide: string; readonly goOverview: string; readonly javaIndex: string; readonly jsIntro: string; readonly netGuide: string; readonly perlGuide: string; readonly phpGuide: string; readonly pythonGuide: string; readonly rubyOverview: string; readonly rustGuide: string; }; readonly endpoints: { readonly troubleshooting: string; }; } | |
diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts
index 763cd4b70a880..186f6b337fbde 100644
--- a/src/core/public/doc_links/doc_links_service.ts
+++ b/src/core/public/doc_links/doc_links_service.ts
@@ -226,6 +226,7 @@ export class DocLinksService {
kibana: {
guide: `${KIBANA_DOCS}index.html`,
autocompleteSuggestions: `${KIBANA_DOCS}kibana-concepts-analysts.html#autocomplete-suggestions`,
+ xpackSecurity: `${KIBANA_DOCS}xpack-security.html`,
},
upgradeAssistant: {
overview: `${KIBANA_DOCS}upgrade-assistant.html`,
@@ -797,6 +798,7 @@ export interface DocLinksStart {
readonly kibana: {
readonly guide: string;
readonly autocompleteSuggestions: string;
+ readonly xpackSecurity: string;
};
readonly upgradeAssistant: {
readonly overview: string;
diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md
index 603d6f184dd6f..a29b8d0b5cc68 100644
--- a/src/core/public/public.api.md
+++ b/src/core/public/public.api.md
@@ -680,6 +680,7 @@ export interface DocLinksStart {
readonly kibana: {
readonly guide: string;
readonly autocompleteSuggestions: string;
+ readonly xpackSecurity: string;
};
readonly upgradeAssistant: {
readonly overview: string;
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/product_selector/lock_light.svg b/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/product_selector/lock_light.svg
new file mode 100644
index 0000000000000..2a93dbdde2efe
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/product_selector/lock_light.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/product_selector/product_selector.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/product_selector/product_selector.test.tsx
index c713507083b08..ff2ea86bb3911 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/product_selector/product_selector.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/product_selector/product_selector.test.tsx
@@ -11,6 +11,8 @@ import React from 'react';
import { shallow } from 'enzyme';
+import { EuiEmptyPrompt } from '@elastic/eui';
+
import { WORKPLACE_SEARCH_PLUGIN } from '../../../../../common/constants';
import { LicenseCallout } from '../license_callout';
@@ -35,12 +37,11 @@ describe('ProductSelector', () => {
expect(wrapper.find(LicenseCallout)).toHaveLength(0);
});
- it('renders the license and trial callouts', () => {
+ it('renders the trial callout', () => {
setMockValues({ config: { host: 'localhost' } });
const wrapper = shallow();
expect(wrapper.find(TrialCallout)).toHaveLength(1);
- expect(wrapper.find(LicenseCallout)).toHaveLength(1);
});
it('passes correct URL when Workplace Search user is not an admin', () => {
@@ -57,6 +58,15 @@ describe('ProductSelector', () => {
setMockValues({ config: { host: 'localhost' } });
});
+ it('renders the license callout when user has access to a product', () => {
+ setMockValues({ config: { host: 'localhost' } });
+ const wrapper = shallow(
+
+ );
+
+ expect(wrapper.find(LicenseCallout)).toHaveLength(1);
+ });
+
it('does not render the App Search card if the user does not have access to AS', () => {
const wrapper = shallow(
{
expect(wrapper.find(ProductCard).prop('product').ID).toEqual('appSearch');
});
- it('does not render any cards if the user does not have access', () => {
+ it('renders empty prompt and no cards or license callout if the user does not have access', () => {
const wrapper = shallow();
+ expect(wrapper.find(EuiEmptyPrompt)).toHaveLength(1);
expect(wrapper.find(ProductCard)).toHaveLength(0);
+ expect(wrapper.find(LicenseCallout)).toHaveLength(0);
});
});
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/product_selector/product_selector.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/product_selector/product_selector.tsx
index 690122efc2f20..a94c5d008b124 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/product_selector/product_selector.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search/components/product_selector/product_selector.tsx
@@ -9,7 +9,17 @@ import React from 'react';
import { useValues } from 'kea';
-import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText } from '@elastic/eui';
+import {
+ EuiButton,
+ EuiEmptyPrompt,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiImage,
+ EuiLink,
+ EuiSpacer,
+ EuiText,
+ EuiTitle,
+} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import {
@@ -18,6 +28,7 @@ import {
NO_DATA_PAGE_TEMPLATE_PROPS,
} from '../../../../../../../../src/plugins/kibana_react/public';
import { APP_SEARCH_PLUGIN, WORKPLACE_SEARCH_PLUGIN } from '../../../../../common/constants';
+import { docLinks } from '../../../shared/doc_links';
import { KibanaLogic } from '../../../shared/kibana';
import { SetEnterpriseSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
import { SendEnterpriseSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
@@ -29,6 +40,8 @@ import { ProductCard } from '../product_card';
import { SetupGuideCta } from '../setup_guide';
import { TrialCallout } from '../trial_callout';
+import illustration from './lock_light.svg';
+
interface ProductSelectorProps {
access: {
hasAppSearchAccess?: boolean;
@@ -48,10 +61,89 @@ export const ProductSelector: React.FC = ({
const shouldShowAppSearchCard = !config.host || hasAppSearchAccess;
const shouldShowWorkplaceSearchCard = !config.host || hasWorkplaceSearchAccess;
+ // If Enterprise Search has been set up and the user does not have access to either product, show a message saying they
+ // need to contact an administrator to get access to one of the products.
+ const shouldShowEnterpriseSearchCards = shouldShowAppSearchCard || shouldShowWorkplaceSearchCard;
+
const WORKPLACE_SEARCH_URL = isWorkplaceSearchAdmin
? WORKPLACE_SEARCH_PLUGIN.URL
: WORKPLACE_SEARCH_PLUGIN.NON_ADMIN_URL;
+ const productCards = (
+ <>
+
+ {shouldShowAppSearchCard && (
+
+
+
+ )}
+ {shouldShowWorkplaceSearchCard && (
+
+
+
+ )}
+
+
+
+
+ {config.host ? : }
+ >
+ );
+
+ const insufficientAccessMessage = (
+ }
+ title={
+
+ {i18n.translate('xpack.enterpriseSearch.overview.insufficientPermissionsTitle', {
+ defaultMessage: 'Insufficient permissions',
+ })}
+
+ }
+ layout="horizontal"
+ color="plain"
+ body={
+ <>
+
+ {i18n.translate('xpack.enterpriseSearch.overview.insufficientPermissionsBody', {
+ defaultMessage:
+ 'You don’t have access to view this page. If you feel this may be an error, please contact your administrator.',
+ })}
+
+ >
+ }
+ actions={
+
+ {i18n.translate('xpack.enterpriseSearch.overview.insufficientPermissionsButtonLabel', {
+ defaultMessage: 'Go to the Kibana dashboard',
+ })}
+
+ }
+ footer={
+ <>
+
+
+ {i18n.translate('xpack.enterpriseSearch.overview.insufficientPermissionsFooterBody', {
+ defaultMessage: 'Go to the Kibana dashboard',
+ })}
+
+ {' '}
+
+ {i18n.translate(
+ 'xpack.enterpriseSearch.overview.insufficientPermissionsFooterLinkLabel',
+ {
+ defaultMessage: 'Read documentation',
+ }
+ )}
+
+ >
+ }
+ />
+ );
return (
@@ -84,26 +176,7 @@ export const ProductSelector: React.FC = ({
-
- {shouldShowAppSearchCard && (
-
-
-
- )}
- {shouldShowWorkplaceSearchCard && (
-
-
-
- )}
-
-
-
-
- {config.host ? : }
+ {shouldShowEnterpriseSearchCards ? productCards : insufficientAccessMessage}
);
};
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts
index 376941b018f6a..841bf8e35731d 100644
--- a/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/doc_links/doc_links.ts
@@ -33,6 +33,7 @@ class DocLinks {
public enterpriseSearchConfig: string;
public enterpriseSearchMailService: string;
public enterpriseSearchUsersAccess: string;
+ public kibanaSecurity: string;
public licenseManagement: string;
public workplaceSearchApiKeys: string;
public workplaceSearchBox: string;
@@ -86,6 +87,7 @@ class DocLinks {
this.enterpriseSearchConfig = '';
this.enterpriseSearchMailService = '';
this.enterpriseSearchUsersAccess = '';
+ this.kibanaSecurity = '';
this.licenseManagement = '';
this.workplaceSearchApiKeys = '';
this.workplaceSearchBox = '';
@@ -140,6 +142,7 @@ class DocLinks {
this.enterpriseSearchConfig = docLinks.links.enterpriseSearch.configuration;
this.enterpriseSearchMailService = docLinks.links.enterpriseSearch.mailService;
this.enterpriseSearchUsersAccess = docLinks.links.enterpriseSearch.usersAccess;
+ this.kibanaSecurity = docLinks.links.kibana.xpackSecurity;
this.licenseManagement = docLinks.links.enterpriseSearch.licenseManagement;
this.workplaceSearchApiKeys = docLinks.links.workplaceSearch.apiKeys;
this.workplaceSearchBox = docLinks.links.workplaceSearch.box;
From 2d982c0070067f3d3be4bf0427ee3ab0b55517ce Mon Sep 17 00:00:00 2001
From: Stacey Gammon
Date: Thu, 27 Jan 2022 09:48:49 -0500
Subject: [PATCH 16/45] Update api docs (#123839)
* Support the docs scripts knowing which json files are specifically for dev docs.
* Update jest snapshot docs
* Update api docs
---
.../{actions.json => actions.devdocs.json} | 2 +-
api_docs/actions.mdx | 2 +-
...gs.json => advanced_settings.devdocs.json} | 0
api_docs/advanced_settings.mdx | 2 +-
.../{alerting.json => alerting.devdocs.json} | 146 +-
api_docs/alerting.mdx | 4 +-
api_docs/{apm.json => apm.devdocs.json} | 4069 +++++++++--------
api_docs/apm.mdx | 4 +-
.../{banners.json => banners.devdocs.json} | 0
api_docs/banners.mdx | 2 +-
api_docs/{bfetch.json => bfetch.devdocs.json} | 0
api_docs/bfetch.mdx | 2 +-
api_docs/{canvas.json => canvas.devdocs.json} | 0
api_docs/canvas.mdx | 2 +-
api_docs/{cases.json => cases.devdocs.json} | 0
api_docs/cases.mdx | 8 +-
api_docs/{charts.json => charts.devdocs.json} | 160 +-
api_docs/charts.mdx | 4 +-
api_docs/{cloud.json => cloud.devdocs.json} | 0
api_docs/cloud.mdx | 2 +-
.../{console.json => console.devdocs.json} | 0
api_docs/console.mdx | 2 +-
.../{controls.json => controls.devdocs.json} | 0
api_docs/controls.mdx | 2 +-
api_docs/{core.json => core.devdocs.json} | 495 +-
api_docs/core.mdx | 4 +-
...ion.json => core_application.devdocs.json} | 56 +-
api_docs/core_application.mdx | 4 +-
...e_chrome.json => core_chrome.devdocs.json} | 0
api_docs/core_chrome.mdx | 4 +-
...{core_http.json => core_http.devdocs.json} | 12 +-
api_docs/core_http.mdx | 4 +-
...s.json => core_saved_objects.devdocs.json} | 0
api_docs/core_saved_objects.mdx | 4 +-
....json => custom_integrations.devdocs.json} | 0
api_docs/custom_integrations.mdx | 2 +-
...{dashboard.json => dashboard.devdocs.json} | 19 +-
api_docs/dashboard.mdx | 4 +-
...d.json => dashboard_enhanced.devdocs.json} | 0
api_docs/dashboard_enhanced.mdx | 2 +-
api_docs/{data.json => data.devdocs.json} | 2211 +++------
api_docs/data.mdx | 4 +-
...te.json => data_autocomplete.devdocs.json} | 0
api_docs/data_autocomplete.mdx | 4 +-
...hanced.json => data_enhanced.devdocs.json} | 0
api_docs/data_enhanced.mdx | 2 +-
...ata_query.json => data_query.devdocs.json} | 0
api_docs/data_query.mdx | 4 +-
...a_search.json => data_search.devdocs.json} | 345 +-
api_docs/data_search.mdx | 4 +-
.../{data_ui.json => data_ui.devdocs.json} | 0
api_docs/data_ui.mdx | 4 +-
...tor.json => data_view_editor.devdocs.json} | 0
api_docs/data_view_editor.mdx | 2 +-
...on => data_view_field_editor.devdocs.json} | 0
api_docs/data_view_field_editor.mdx | 2 +-
...json => data_view_management.devdocs.json} | 0
api_docs/data_view_management.mdx | 2 +-
...ata_views.json => data_views.devdocs.json} | 1269 ++---
api_docs/data_views.mdx | 7 +-
api_docs/data_visualizer.devdocs.json | 364 ++
api_docs/data_visualizer.json | 1192 -----
api_docs/data_visualizer.mdx | 18 +-
api_docs/deprecations_by_api.mdx | 96 +-
api_docs/deprecations_by_plugin.mdx | 146 +-
...{dev_tools.json => dev_tools.devdocs.json} | 0
api_docs/dev_tools.mdx | 2 +-
.../{discover.json => discover.devdocs.json} | 0
api_docs/discover.mdx | 2 +-
...ed.json => discover_enhanced.devdocs.json} | 0
api_docs/discover_enhanced.mdx | 2 +-
...on => elastic_apm_synthtrace.devdocs.json} | 0
api_docs/elastic_apm_synthtrace.mdx | 2 +-
...ath.json => elastic_datemath.devdocs.json} | 0
api_docs/elastic_datemath.mdx | 2 +-
...mbeddable.json => embeddable.devdocs.json} | 416 +-
api_docs/embeddable.mdx | 4 +-
....json => embeddable_enhanced.devdocs.json} | 0
api_docs/embeddable_enhanced.mdx | 2 +-
...n => encrypted_saved_objects.devdocs.json} | 0
api_docs/encrypted_saved_objects.mdx | 2 +-
...ch.json => enterprise_search.devdocs.json} | 0
api_docs/enterprise_search.mdx | 2 +-
..._shared.json => es_ui_shared.devdocs.json} | 0
api_docs/es_ui_shared.mdx | 2 +-
...{event_log.json => event_log.devdocs.json} | 21 +-
api_docs/event_log.mdx | 4 +-
...ror.json => expression_error.devdocs.json} | 0
api_docs/expression_error.mdx | 2 +-
...uge.json => expression_gauge.devdocs.json} | 4 +-
api_docs/expression_gauge.mdx | 2 +-
...p.json => expression_heatmap.devdocs.json} | 204 +-
api_docs/expression_heatmap.mdx | 4 +-
...age.json => expression_image.devdocs.json} | 0
api_docs/expression_image.mdx | 2 +-
...ic.json => expression_metric.devdocs.json} | 2 +-
api_docs/expression_metric.mdx | 2 +-
...son => expression_metric_vis.devdocs.json} | 0
api_docs/expression_metric_vis.mdx | 2 +-
...n_pie.json => expression_pie.devdocs.json} | 0
api_docs/expression_pie.mdx | 2 +-
...n => expression_repeat_image.devdocs.json} | 2 +-
api_docs/expression_repeat_image.mdx | 2 +-
...n => expression_reveal_image.devdocs.json} | 2 +-
api_docs/expression_reveal_image.mdx | 2 +-
...ape.json => expression_shape.devdocs.json} | 0
api_docs/expression_shape.mdx | 2 +-
....json => expression_tagcloud.devdocs.json} | 0
api_docs/expression_tagcloud.mdx | 2 +-
...ressions.json => expressions.devdocs.json} | 227 +-
api_docs/expressions.mdx | 2 +-
.../{features.json => features.devdocs.json} | 16 +-
api_docs/features.mdx | 2 +-
...ormats.json => field_formats.devdocs.json} | 0
api_docs/field_formats.mdx | 2 +-
api_docs/file_upload.devdocs.json | 899 ++++
api_docs/file_upload.json | 1942 --------
api_docs/file_upload.mdx | 10 +-
api_docs/{fleet.json => fleet.devdocs.json} | 467 +-
api_docs/fleet.mdx | 4 +-
...search.json => global_search.devdocs.json} | 0
api_docs/global_search.mdx | 2 +-
api_docs/{home.json => home.devdocs.json} | 14 +-
api_docs/home.mdx | 2 +-
...> index_lifecycle_management.devdocs.json} | 0
api_docs/index_lifecycle_management.mdx | 2 +-
...ent.json => index_management.devdocs.json} | 0
api_docs/index_management.mdx | 2 +-
api_docs/{infra.json => infra.devdocs.json} | 57 +-
api_docs/infra.mdx | 7 +-
...{inspector.json => inspector.devdocs.json} | 0
api_docs/inspector.mdx | 2 +-
...up.json => interactive_setup.devdocs.json} | 0
api_docs/interactive_setup.mdx | 2 +-
.../{kbn_ace.json => kbn_ace.devdocs.json} | 0
api_docs/kbn_ace.mdx | 2 +-
...bn_alerts.json => kbn_alerts.devdocs.json} | 0
api_docs/kbn_alerts.mdx | 2 +-
...lytics.json => kbn_analytics.devdocs.json} | 0
api_docs/kbn_analytics.mdx | 2 +-
...son => kbn_apm_config_loader.devdocs.json} | 0
api_docs/kbn_apm_config_loader.mdx | 2 +-
..._utils.json => kbn_apm_utils.devdocs.json} | 0
api_docs/kbn_apm_utils.mdx | 2 +-
...ode.json => kbn_cli_dev_mode.devdocs.json} | 0
api_docs/kbn_cli_dev_mode.mdx | 2 +-
...bn_config.json => kbn_config.devdocs.json} | 84 +-
api_docs/kbn_config.mdx | 4 +-
...ma.json => kbn_config_schema.devdocs.json} | 0
api_docs/kbn_config_schema.mdx | 2 +-
...bn_crypto.json => kbn_crypto.devdocs.json} | 0
api_docs/kbn_crypto.mdx | 2 +-
..._utils.json => kbn_dev_utils.devdocs.json} | 4 +-
api_docs/kbn_dev_utils.mdx | 2 +-
...utils.json => kbn_docs_utils.devdocs.json} | 0
api_docs/kbn_docs_utils.mdx | 2 +-
...iver.json => kbn_es_archiver.devdocs.json} | 0
api_docs/kbn_es_archiver.mdx | 2 +-
...s_query.json => kbn_es_query.devdocs.json} | 31 +-
api_docs/kbn_es_query.mdx | 4 +-
...ypes.json => kbn_field_types.devdocs.json} | 0
api_docs/kbn_field_types.mdx | 2 +-
.../{kbn_i18n.json => kbn_i18n.devdocs.json} | 0
api_docs/kbn_i18n.mdx | 2 +-
...eter.json => kbn_interpreter.devdocs.json} | 337 +-
api_docs/kbn_interpreter.mdx | 8 +-
...tils.json => kbn_io_ts_utils.devdocs.json} | 49 +-
api_docs/kbn_io_ts_utils.mdx | 7 +-
..._logging.json => kbn_logging.devdocs.json} | 4 +-
api_docs/kbn_logging.mdx | 2 +-
...box_gl.json => kbn_mapbox_gl.devdocs.json} | 0
api_docs/kbn_mapbox_gl.mdx | 2 +-
...bn_monaco.json => kbn_monaco.devdocs.json} | 0
api_docs/kbn_monaco.mdx | 2 +-
...imizer.json => kbn_optimizer.devdocs.json} | 0
api_docs/kbn_optimizer.mdx | 2 +-
...json => kbn_plugin_generator.devdocs.json} | 0
api_docs/kbn_plugin_generator.mdx | 2 +-
...s.json => kbn_plugin_helpers.devdocs.json} | 0
api_docs/kbn_plugin_helpers.mdx | 2 +-
api_docs/{kbn_pm.json => kbn_pm.devdocs.json} | 0
api_docs/kbn_pm.mdx | 2 +-
...ield.json => kbn_react_field.devdocs.json} | 0
api_docs/kbn_react_field.mdx | 2 +-
....json => kbn_rule_data_utils.devdocs.json} | 16 +-
api_docs/kbn_rule_data_utils.mdx | 4 +-
...ecuritysolution_autocomplete.devdocs.json} | 0
.../kbn_securitysolution_autocomplete.mdx | 2 +-
...bn_securitysolution_es_utils.devdocs.json} | 0
api_docs/kbn_securitysolution_es_utils.mdx | 2 +-
..._securitysolution_hook_utils.devdocs.json} | 0
api_docs/kbn_securitysolution_hook_utils.mdx | 2 +-
...olution_io_ts_alerting_types.devdocs.json} | 0
..._securitysolution_io_ts_alerting_types.mdx | 2 +-
...itysolution_io_ts_list_types.devdocs.json} | 2 +-
.../kbn_securitysolution_io_ts_list_types.mdx | 2 +-
...securitysolution_io_ts_types.devdocs.json} | 0
api_docs/kbn_securitysolution_io_ts_types.mdx | 2 +-
...securitysolution_io_ts_utils.devdocs.json} | 0
api_docs/kbn_securitysolution_io_ts_utils.mdx | 2 +-
...bn_securitysolution_list_api.devdocs.json} | 0
api_docs/kbn_securitysolution_list_api.mdx | 2 +-
...uritysolution_list_constants.devdocs.json} | 0
.../kbn_securitysolution_list_constants.mdx | 2 +-
..._securitysolution_list_hooks.devdocs.json} | 0
api_docs/kbn_securitysolution_list_hooks.mdx | 2 +-
..._securitysolution_list_utils.devdocs.json} | 0
api_docs/kbn_securitysolution_list_utils.mdx | 2 +-
...> kbn_securitysolution_rules.devdocs.json} | 0
api_docs/kbn_securitysolution_rules.mdx | 2 +-
... kbn_securitysolution_t_grid.devdocs.json} | 0
api_docs/kbn_securitysolution_t_grid.mdx | 2 +-
...> kbn_securitysolution_utils.devdocs.json} | 0
api_docs/kbn_securitysolution_utils.mdx | 2 +-
...son => kbn_server_http_tools.devdocs.json} | 0
api_docs/kbn_server_http_tools.mdx | 2 +-
... kbn_server_route_repository.devdocs.json} | 339 +-
api_docs/kbn_server_route_repository.mdx | 4 +-
.../{kbn_std.json => kbn_std.devdocs.json} | 0
api_docs/kbn_std.mdx | 2 +-
...rybook.json => kbn_storybook.devdocs.json} | 0
api_docs/kbn_storybook.mdx | 2 +-
....json => kbn_telemetry_tools.devdocs.json} | 0
api_docs/kbn_telemetry_tools.mdx | 2 +-
.../{kbn_test.json => kbn_test.devdocs.json} | 396 +-
api_docs/kbn_test.mdx | 4 +-
...bn_typed_react_router_config.devdocs.json} | 881 +---
api_docs/kbn_typed_react_router_config.mdx | 4 +-
api_docs/kbn_ui_theme.devdocs.json | 123 +
api_docs/kbn_ui_theme.mdx | 30 +
...es.json => kbn_utility_types.devdocs.json} | 0
api_docs/kbn_utility_types.mdx | 2 +-
...{kbn_utils.json => kbn_utils.devdocs.json} | 0
api_docs/kbn_utils.mdx | 2 +-
...view.json => kibana_overview.devdocs.json} | 0
api_docs/kibana_overview.mdx | 2 +-
...a_react.json => kibana_react.devdocs.json} | 19 +
api_docs/kibana_react.mdx | 4 +-
...a_utils.json => kibana_utils.devdocs.json} | 80 +-
api_docs/kibana_utils.mdx | 4 +-
api_docs/{lens.json => lens.devdocs.json} | 283 +-
api_docs/lens.mdx | 4 +-
...rd.json => license_api_guard.devdocs.json} | 0
api_docs/license_api_guard.mdx | 2 +-
...t.json => license_management.devdocs.json} | 0
api_docs/license_management.mdx | 2 +-
...{licensing.json => licensing.devdocs.json} | 39 +-
api_docs/licensing.mdx | 2 +-
api_docs/{lists.json => lists.devdocs.json} | 170 +-
api_docs/lists.mdx | 4 +-
...anagement.json => management.devdocs.json} | 0
api_docs/management.mdx | 2 +-
api_docs/{maps.json => maps.devdocs.json} | 196 +-
api_docs/maps.mdx | 4 +-
.../{maps_ems.json => maps_ems.devdocs.json} | 1267 ++---
api_docs/maps_ems.mdx | 11 +-
...ies.json => metrics_entities.devdocs.json} | 0
api_docs/metrics_entities.mdx | 2 +-
api_docs/{ml.json => ml.devdocs.json} | 1333 +-----
api_docs/ml.mdx | 4 +-
...onitoring.json => monitoring.devdocs.json} | 4 +-
api_docs/monitoring.mdx | 2 +-
...avigation.json => navigation.devdocs.json} | 0
api_docs/navigation.mdx | 2 +-
.../{newsfeed.json => newsfeed.devdocs.json} | 0
api_docs/newsfeed.mdx | 2 +-
...bility.json => observability.devdocs.json} | 252 +-
api_docs/observability.mdx | 7 +-
.../{osquery.json => osquery.devdocs.json} | 0
api_docs/osquery.mdx | 2 +-
api_docs/plugin_directory.mdx | 82 +-
...il.json => presentation_util.devdocs.json} | 84 +-
api_docs/presentation_util.mdx | 4 +-
...ters.json => remote_clusters.devdocs.json} | 0
api_docs/remote_clusters.mdx | 2 +-
...{reporting.json => reporting.devdocs.json} | 72 +-
api_docs/reporting.mdx | 4 +-
api_docs/{rollup.json => rollup.devdocs.json} | 0
api_docs/rollup.mdx | 2 +-
...gistry.json => rule_registry.devdocs.json} | 23 +-
api_docs/rule_registry.mdx | 4 +-
...ields.json => runtime_fields.devdocs.json} | 0
api_docs/runtime_fields.mdx | 2 +-
...bjects.json => saved_objects.devdocs.json} | 16 +-
api_docs/saved_objects.mdx | 2 +-
... => saved_objects_management.devdocs.json} | 6 +-
api_docs/saved_objects_management.mdx | 2 +-
...son => saved_objects_tagging.devdocs.json} | 0
api_docs/saved_objects_tagging.mdx | 2 +-
...=> saved_objects_tagging_oss.devdocs.json} | 0
api_docs/saved_objects_tagging_oss.mdx | 2 +-
...mode.json => screenshot_mode.devdocs.json} | 0
api_docs/screenshot_mode.mdx | 2 +-
...tting.json => screenshotting.devdocs.json} | 0
api_docs/screenshotting.mdx | 2 +-
.../{security.json => security.devdocs.json} | 37 +-
api_docs/security.mdx | 4 +-
...on.json => security_solution.devdocs.json} | 6 +-
api_docs/security_solution.mdx | 4 +-
api_docs/{share.json => share.devdocs.json} | 40 +-
api_docs/share.mdx | 2 +-
...hared_u_x.json => shared_u_x.devdocs.json} | 0
api_docs/shared_u_x.mdx | 2 +-
...ore.json => snapshot_restore.devdocs.json} | 60 -
api_docs/snapshot_restore.mdx | 4 +-
api_docs/{spaces.json => spaces.devdocs.json} | 0
api_docs/spaces.mdx | 2 +-
..._alerts.json => stack_alerts.devdocs.json} | 0
api_docs/stack_alerts.mdx | 2 +-
...manager.json => task_manager.devdocs.json} | 0
api_docs/task_manager.mdx | 2 +-
...{telemetry.json => telemetry.devdocs.json} | 0
api_docs/telemetry.mdx | 2 +-
...telemetry_collection_manager.devdocs.json} | 0
api_docs/telemetry_collection_manager.mdx | 2 +-
...> telemetry_collection_xpack.devdocs.json} | 0
api_docs/telemetry_collection_xpack.mdx | 2 +-
...telemetry_management_section.devdocs.json} | 0
api_docs/telemetry_management_section.mdx | 2 +-
...{timelines.json => timelines.devdocs.json} | 25 +-
api_docs/timelines.mdx | 4 +-
...{transform.json => transform.devdocs.json} | 0
api_docs/transform.mdx | 2 +-
....json => triggers_actions_ui.devdocs.json} | 12 +-
api_docs/triggers_actions_ui.mdx | 2 +-
...i_actions.json => ui_actions.devdocs.json} | 0
api_docs/ui_actions.mdx | 2 +-
....json => ui_actions_enhanced.devdocs.json} | 16 +-
api_docs/ui_actions_enhanced.mdx | 2 +-
...rding.json => url_forwarding.devdocs.json} | 0
api_docs/url_forwarding.mdx | 2 +-
...ion.json => usage_collection.devdocs.json} | 0
api_docs/usage_collection.mdx | 2 +-
...r.json => vis_default_editor.devdocs.json} | 12 +-
api_docs/vis_default_editor.mdx | 2 +-
...map.json => vis_type_heatmap.devdocs.json} | 0
api_docs/vis_type_heatmap.mdx | 2 +-
...ype_pie.json => vis_type_pie.devdocs.json} | 0
api_docs/vis_type_pie.mdx | 2 +-
...table.json => vis_type_table.devdocs.json} | 0
api_docs/vis_type_table.mdx | 2 +-
...on.json => vis_type_timelion.devdocs.json} | 0
api_docs/vis_type_timelion.mdx | 2 +-
....json => vis_type_timeseries.devdocs.json} | 0
api_docs/vis_type_timeseries.mdx | 2 +-
...e_vega.json => vis_type_vega.devdocs.json} | 0
api_docs/vis_type_vega.mdx | 2 +-
...slib.json => vis_type_vislib.devdocs.json} | 0
api_docs/vis_type_vislib.mdx | 2 +-
..._type_xy.json => vis_type_xy.devdocs.json} | 0
api_docs/vis_type_xy.mdx | 2 +-
...tions.json => visualizations.devdocs.json} | 774 ++--
api_docs/visualizations.mdx | 4 +-
api_docs/visualize.json | 378 --
api_docs/visualize.mdx | 33 -
.../src/api_docs/mdx/write_plugin_mdx_docs.ts | 7 +-
.../{plugin_a.json => plugin_a.devdocs.json} | 2 +-
.../src/api_docs/tests/snapshots/plugin_a.mdx | 2 +-
...n_a_foo.json => plugin_a_foo.devdocs.json} | 0
.../api_docs/tests/snapshots/plugin_a_foo.mdx | 2 +-
.../{plugin_b.json => plugin_b.devdocs.json} | 0
.../src/api_docs/tests/snapshots/plugin_b.mdx | 2 +-
362 files changed, 10067 insertions(+), 12905 deletions(-)
rename api_docs/{actions.json => actions.devdocs.json} (99%)
rename api_docs/{advanced_settings.json => advanced_settings.devdocs.json} (100%)
rename api_docs/{alerting.json => alerting.devdocs.json} (97%)
rename api_docs/{apm.json => apm.devdocs.json} (93%)
rename api_docs/{banners.json => banners.devdocs.json} (100%)
rename api_docs/{bfetch.json => bfetch.devdocs.json} (100%)
rename api_docs/{canvas.json => canvas.devdocs.json} (100%)
rename api_docs/{cases.json => cases.devdocs.json} (100%)
rename api_docs/{charts.json => charts.devdocs.json} (96%)
rename api_docs/{cloud.json => cloud.devdocs.json} (100%)
rename api_docs/{console.json => console.devdocs.json} (100%)
rename api_docs/{controls.json => controls.devdocs.json} (100%)
rename api_docs/{core.json => core.devdocs.json} (96%)
rename api_docs/{core_application.json => core_application.devdocs.json} (98%)
rename api_docs/{core_chrome.json => core_chrome.devdocs.json} (100%)
rename api_docs/{core_http.json => core_http.devdocs.json} (98%)
rename api_docs/{core_saved_objects.json => core_saved_objects.devdocs.json} (100%)
rename api_docs/{custom_integrations.json => custom_integrations.devdocs.json} (100%)
rename api_docs/{dashboard.json => dashboard.devdocs.json} (99%)
rename api_docs/{dashboard_enhanced.json => dashboard_enhanced.devdocs.json} (100%)
rename api_docs/{data.json => data.devdocs.json} (95%)
rename api_docs/{data_autocomplete.json => data_autocomplete.devdocs.json} (100%)
rename api_docs/{data_enhanced.json => data_enhanced.devdocs.json} (100%)
rename api_docs/{data_query.json => data_query.devdocs.json} (100%)
rename api_docs/{data_search.json => data_search.devdocs.json} (99%)
rename api_docs/{data_ui.json => data_ui.devdocs.json} (100%)
rename api_docs/{data_view_editor.json => data_view_editor.devdocs.json} (100%)
rename api_docs/{data_view_field_editor.json => data_view_field_editor.devdocs.json} (100%)
rename api_docs/{data_view_management.json => data_view_management.devdocs.json} (100%)
rename api_docs/{data_views.json => data_views.devdocs.json} (95%)
create mode 100644 api_docs/data_visualizer.devdocs.json
delete mode 100644 api_docs/data_visualizer.json
rename api_docs/{dev_tools.json => dev_tools.devdocs.json} (100%)
rename api_docs/{discover.json => discover.devdocs.json} (100%)
rename api_docs/{discover_enhanced.json => discover_enhanced.devdocs.json} (100%)
rename api_docs/{elastic_apm_synthtrace.json => elastic_apm_synthtrace.devdocs.json} (100%)
rename api_docs/{elastic_datemath.json => elastic_datemath.devdocs.json} (100%)
rename api_docs/{embeddable.json => embeddable.devdocs.json} (96%)
rename api_docs/{embeddable_enhanced.json => embeddable_enhanced.devdocs.json} (100%)
rename api_docs/{encrypted_saved_objects.json => encrypted_saved_objects.devdocs.json} (100%)
rename api_docs/{enterprise_search.json => enterprise_search.devdocs.json} (100%)
rename api_docs/{es_ui_shared.json => es_ui_shared.devdocs.json} (100%)
rename api_docs/{event_log.json => event_log.devdocs.json} (88%)
rename api_docs/{expression_error.json => expression_error.devdocs.json} (100%)
rename api_docs/{expression_gauge.json => expression_gauge.devdocs.json} (99%)
rename api_docs/{expression_heatmap.json => expression_heatmap.devdocs.json} (86%)
rename api_docs/{expression_image.json => expression_image.devdocs.json} (100%)
rename api_docs/{expression_metric.json => expression_metric.devdocs.json} (97%)
rename api_docs/{expression_metric_vis.json => expression_metric_vis.devdocs.json} (100%)
rename api_docs/{expression_pie.json => expression_pie.devdocs.json} (100%)
rename api_docs/{expression_repeat_image.json => expression_repeat_image.devdocs.json} (96%)
rename api_docs/{expression_reveal_image.json => expression_reveal_image.devdocs.json} (96%)
rename api_docs/{expression_shape.json => expression_shape.devdocs.json} (100%)
rename api_docs/{expression_tagcloud.json => expression_tagcloud.devdocs.json} (100%)
rename api_docs/{expressions.json => expressions.devdocs.json} (99%)
rename api_docs/{features.json => features.devdocs.json} (99%)
rename api_docs/{field_formats.json => field_formats.devdocs.json} (100%)
create mode 100644 api_docs/file_upload.devdocs.json
delete mode 100644 api_docs/file_upload.json
rename api_docs/{fleet.json => fleet.devdocs.json} (98%)
rename api_docs/{global_search.json => global_search.devdocs.json} (100%)
rename api_docs/{home.json => home.devdocs.json} (98%)
rename api_docs/{index_lifecycle_management.json => index_lifecycle_management.devdocs.json} (100%)
rename api_docs/{index_management.json => index_management.devdocs.json} (100%)
rename api_docs/{infra.json => infra.devdocs.json} (88%)
rename api_docs/{inspector.json => inspector.devdocs.json} (100%)
rename api_docs/{interactive_setup.json => interactive_setup.devdocs.json} (100%)
rename api_docs/{kbn_ace.json => kbn_ace.devdocs.json} (100%)
rename api_docs/{kbn_alerts.json => kbn_alerts.devdocs.json} (100%)
rename api_docs/{kbn_analytics.json => kbn_analytics.devdocs.json} (100%)
rename api_docs/{kbn_apm_config_loader.json => kbn_apm_config_loader.devdocs.json} (100%)
rename api_docs/{kbn_apm_utils.json => kbn_apm_utils.devdocs.json} (100%)
rename api_docs/{kbn_cli_dev_mode.json => kbn_cli_dev_mode.devdocs.json} (100%)
rename api_docs/{kbn_config.json => kbn_config.devdocs.json} (95%)
rename api_docs/{kbn_config_schema.json => kbn_config_schema.devdocs.json} (100%)
rename api_docs/{kbn_crypto.json => kbn_crypto.devdocs.json} (100%)
rename api_docs/{kbn_dev_utils.json => kbn_dev_utils.devdocs.json} (99%)
rename api_docs/{kbn_docs_utils.json => kbn_docs_utils.devdocs.json} (100%)
rename api_docs/{kbn_es_archiver.json => kbn_es_archiver.devdocs.json} (100%)
rename api_docs/{kbn_es_query.json => kbn_es_query.devdocs.json} (99%)
rename api_docs/{kbn_field_types.json => kbn_field_types.devdocs.json} (100%)
rename api_docs/{kbn_i18n.json => kbn_i18n.devdocs.json} (100%)
rename api_docs/{kbn_interpreter.json => kbn_interpreter.devdocs.json} (64%)
rename api_docs/{kbn_io_ts_utils.json => kbn_io_ts_utils.devdocs.json} (87%)
rename api_docs/{kbn_logging.json => kbn_logging.devdocs.json} (99%)
rename api_docs/{kbn_mapbox_gl.json => kbn_mapbox_gl.devdocs.json} (100%)
rename api_docs/{kbn_monaco.json => kbn_monaco.devdocs.json} (100%)
rename api_docs/{kbn_optimizer.json => kbn_optimizer.devdocs.json} (100%)
rename api_docs/{kbn_plugin_generator.json => kbn_plugin_generator.devdocs.json} (100%)
rename api_docs/{kbn_plugin_helpers.json => kbn_plugin_helpers.devdocs.json} (100%)
rename api_docs/{kbn_pm.json => kbn_pm.devdocs.json} (100%)
rename api_docs/{kbn_react_field.json => kbn_react_field.devdocs.json} (100%)
rename api_docs/{kbn_rule_data_utils.json => kbn_rule_data_utils.devdocs.json} (94%)
rename api_docs/{kbn_securitysolution_autocomplete.json => kbn_securitysolution_autocomplete.devdocs.json} (100%)
rename api_docs/{kbn_securitysolution_es_utils.json => kbn_securitysolution_es_utils.devdocs.json} (100%)
rename api_docs/{kbn_securitysolution_hook_utils.json => kbn_securitysolution_hook_utils.devdocs.json} (100%)
rename api_docs/{kbn_securitysolution_io_ts_alerting_types.json => kbn_securitysolution_io_ts_alerting_types.devdocs.json} (100%)
rename api_docs/{kbn_securitysolution_io_ts_list_types.json => kbn_securitysolution_io_ts_list_types.devdocs.json} (99%)
rename api_docs/{kbn_securitysolution_io_ts_types.json => kbn_securitysolution_io_ts_types.devdocs.json} (100%)
rename api_docs/{kbn_securitysolution_io_ts_utils.json => kbn_securitysolution_io_ts_utils.devdocs.json} (100%)
rename api_docs/{kbn_securitysolution_list_api.json => kbn_securitysolution_list_api.devdocs.json} (100%)
rename api_docs/{kbn_securitysolution_list_constants.json => kbn_securitysolution_list_constants.devdocs.json} (100%)
rename api_docs/{kbn_securitysolution_list_hooks.json => kbn_securitysolution_list_hooks.devdocs.json} (100%)
rename api_docs/{kbn_securitysolution_list_utils.json => kbn_securitysolution_list_utils.devdocs.json} (100%)
rename api_docs/{kbn_securitysolution_rules.json => kbn_securitysolution_rules.devdocs.json} (100%)
rename api_docs/{kbn_securitysolution_t_grid.json => kbn_securitysolution_t_grid.devdocs.json} (100%)
rename api_docs/{kbn_securitysolution_utils.json => kbn_securitysolution_utils.devdocs.json} (100%)
rename api_docs/{kbn_server_http_tools.json => kbn_server_http_tools.devdocs.json} (100%)
rename api_docs/{kbn_server_route_repository.json => kbn_server_route_repository.devdocs.json} (64%)
rename api_docs/{kbn_std.json => kbn_std.devdocs.json} (100%)
rename api_docs/{kbn_storybook.json => kbn_storybook.devdocs.json} (100%)
rename api_docs/{kbn_telemetry_tools.json => kbn_telemetry_tools.devdocs.json} (100%)
rename api_docs/{kbn_test.json => kbn_test.devdocs.json} (89%)
rename api_docs/{kbn_typed_react_router_config.json => kbn_typed_react_router_config.devdocs.json} (81%)
create mode 100644 api_docs/kbn_ui_theme.devdocs.json
create mode 100644 api_docs/kbn_ui_theme.mdx
rename api_docs/{kbn_utility_types.json => kbn_utility_types.devdocs.json} (100%)
rename api_docs/{kbn_utils.json => kbn_utils.devdocs.json} (100%)
rename api_docs/{kibana_overview.json => kibana_overview.devdocs.json} (100%)
rename api_docs/{kibana_react.json => kibana_react.devdocs.json} (99%)
rename api_docs/{kibana_utils.json => kibana_utils.devdocs.json} (99%)
rename api_docs/{lens.json => lens.devdocs.json} (93%)
rename api_docs/{license_api_guard.json => license_api_guard.devdocs.json} (100%)
rename api_docs/{license_management.json => license_management.devdocs.json} (100%)
rename api_docs/{licensing.json => licensing.devdocs.json} (98%)
rename api_docs/{lists.json => lists.devdocs.json} (97%)
rename api_docs/{management.json => management.devdocs.json} (100%)
rename api_docs/{maps.json => maps.devdocs.json} (95%)
rename api_docs/{maps_ems.json => maps_ems.devdocs.json} (60%)
rename api_docs/{metrics_entities.json => metrics_entities.devdocs.json} (100%)
rename api_docs/{ml.json => ml.devdocs.json} (69%)
rename api_docs/{monitoring.json => monitoring.devdocs.json} (89%)
rename api_docs/{navigation.json => navigation.devdocs.json} (100%)
rename api_docs/{newsfeed.json => newsfeed.devdocs.json} (100%)
rename api_docs/{observability.json => observability.devdocs.json} (91%)
rename api_docs/{osquery.json => osquery.devdocs.json} (100%)
rename api_docs/{presentation_util.json => presentation_util.devdocs.json} (97%)
rename api_docs/{remote_clusters.json => remote_clusters.devdocs.json} (100%)
rename api_docs/{reporting.json => reporting.devdocs.json} (89%)
rename api_docs/{rollup.json => rollup.devdocs.json} (100%)
rename api_docs/{rule_registry.json => rule_registry.devdocs.json} (92%)
rename api_docs/{runtime_fields.json => runtime_fields.devdocs.json} (100%)
rename api_docs/{saved_objects.json => saved_objects.devdocs.json} (99%)
rename api_docs/{saved_objects_management.json => saved_objects_management.devdocs.json} (99%)
rename api_docs/{saved_objects_tagging.json => saved_objects_tagging.devdocs.json} (100%)
rename api_docs/{saved_objects_tagging_oss.json => saved_objects_tagging_oss.devdocs.json} (100%)
rename api_docs/{screenshot_mode.json => screenshot_mode.devdocs.json} (100%)
rename api_docs/{screenshotting.json => screenshotting.devdocs.json} (100%)
rename api_docs/{security.json => security.devdocs.json} (98%)
rename api_docs/{security_solution.json => security_solution.devdocs.json} (97%)
rename api_docs/{share.json => share.devdocs.json} (98%)
rename api_docs/{shared_u_x.json => shared_u_x.devdocs.json} (100%)
rename api_docs/{snapshot_restore.json => snapshot_restore.devdocs.json} (80%)
rename api_docs/{spaces.json => spaces.devdocs.json} (100%)
rename api_docs/{stack_alerts.json => stack_alerts.devdocs.json} (100%)
rename api_docs/{task_manager.json => task_manager.devdocs.json} (100%)
rename api_docs/{telemetry.json => telemetry.devdocs.json} (100%)
rename api_docs/{telemetry_collection_manager.json => telemetry_collection_manager.devdocs.json} (100%)
rename api_docs/{telemetry_collection_xpack.json => telemetry_collection_xpack.devdocs.json} (100%)
rename api_docs/{telemetry_management_section.json => telemetry_management_section.devdocs.json} (100%)
rename api_docs/{timelines.json => timelines.devdocs.json} (99%)
rename api_docs/{transform.json => transform.devdocs.json} (100%)
rename api_docs/{triggers_actions_ui.json => triggers_actions_ui.devdocs.json} (99%)
rename api_docs/{ui_actions.json => ui_actions.devdocs.json} (100%)
rename api_docs/{ui_actions_enhanced.json => ui_actions_enhanced.devdocs.json} (99%)
rename api_docs/{url_forwarding.json => url_forwarding.devdocs.json} (100%)
rename api_docs/{usage_collection.json => usage_collection.devdocs.json} (100%)
rename api_docs/{vis_default_editor.json => vis_default_editor.devdocs.json} (99%)
rename api_docs/{vis_type_heatmap.json => vis_type_heatmap.devdocs.json} (100%)
rename api_docs/{vis_type_pie.json => vis_type_pie.devdocs.json} (100%)
rename api_docs/{vis_type_table.json => vis_type_table.devdocs.json} (100%)
rename api_docs/{vis_type_timelion.json => vis_type_timelion.devdocs.json} (100%)
rename api_docs/{vis_type_timeseries.json => vis_type_timeseries.devdocs.json} (100%)
rename api_docs/{vis_type_vega.json => vis_type_vega.devdocs.json} (100%)
rename api_docs/{vis_type_vislib.json => vis_type_vislib.devdocs.json} (100%)
rename api_docs/{vis_type_xy.json => vis_type_xy.devdocs.json} (100%)
rename api_docs/{visualizations.json => visualizations.devdocs.json} (91%)
delete mode 100644 api_docs/visualize.json
delete mode 100644 api_docs/visualize.mdx
rename packages/kbn-docs-utils/src/api_docs/tests/snapshots/{plugin_a.json => plugin_a.devdocs.json} (99%)
rename packages/kbn-docs-utils/src/api_docs/tests/snapshots/{plugin_a_foo.json => plugin_a_foo.devdocs.json} (100%)
rename packages/kbn-docs-utils/src/api_docs/tests/snapshots/{plugin_b.json => plugin_b.devdocs.json} (100%)
diff --git a/api_docs/actions.json b/api_docs/actions.devdocs.json
similarity index 99%
rename from api_docs/actions.json
rename to api_docs/actions.devdocs.json
index 01f15db6c0893..29a799f020c22 100644
--- a/api_docs/actions.json
+++ b/api_docs/actions.devdocs.json
@@ -709,7 +709,7 @@
"label": "ActionParamsType",
"description": [],
"signature": [
- "{ readonly message: string; readonly level: \"error\" | \"info\" | \"trace\" | \"debug\" | \"warn\" | \"fatal\"; }"
+ "{ readonly message: string; readonly level: \"error\" | \"info\" | \"debug\" | \"trace\" | \"warn\" | \"fatal\"; }"
],
"path": "x-pack/plugins/actions/server/builtin_action_types/server_log.ts",
"deprecated": false,
diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx
index dc7d971d016d4..ca0c4b4e91795 100644
--- a/api_docs/actions.mdx
+++ b/api_docs/actions.mdx
@@ -8,7 +8,7 @@ date: 2020-11-16
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
warning: 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.
---
-import actionsObj from './actions.json';
+import actionsObj from './actions.devdocs.json';
diff --git a/api_docs/advanced_settings.json b/api_docs/advanced_settings.devdocs.json
similarity index 100%
rename from api_docs/advanced_settings.json
rename to api_docs/advanced_settings.devdocs.json
diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx
index bfad2205ddfd2..a60b799dce6c9 100644
--- a/api_docs/advanced_settings.mdx
+++ b/api_docs/advanced_settings.mdx
@@ -8,7 +8,7 @@ date: 2020-11-16
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
warning: 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.
---
-import advancedSettingsObj from './advanced_settings.json';
+import advancedSettingsObj from './advanced_settings.devdocs.json';
diff --git a/api_docs/alerting.json b/api_docs/alerting.devdocs.json
similarity index 97%
rename from api_docs/alerting.json
rename to api_docs/alerting.devdocs.json
index dd236a0e39110..871a2886848a5 100644
--- a/api_docs/alerting.json
+++ b/api_docs/alerting.devdocs.json
@@ -41,7 +41,15 @@
"label": "alert",
"description": [],
"signature": [
- "{ id: string; name: string; tags: string[]; enabled: boolean; params: never; actions: ",
+ "{ id: string; monitoring?: ",
+ {
+ "pluginId": "alerting",
+ "scope": "common",
+ "docId": "kibAlertingPluginApi",
+ "section": "def-common.RuleMonitoring",
+ "text": "RuleMonitoring"
+ },
+ " | undefined; name: string; tags: string[]; enabled: boolean; params: never; actions: ",
{
"pluginId": "alerting",
"scope": "common",
@@ -770,6 +778,63 @@
}
],
"functions": [
+ {
+ "parentPluginId": "alerting",
+ "id": "def-server.createAbortableEsClientFactory",
+ "type": "Function",
+ "tags": [],
+ "label": "createAbortableEsClientFactory",
+ "description": [],
+ "signature": [
+ "(opts: ",
+ "CreateAbortableEsClientFactoryOpts",
+ ") => { asInternalUser: { search: >(query: ",
+ "SearchRequest",
+ " | ",
+ "SearchRequest",
+ ", options?: ",
+ "TransportRequestOptions",
+ " | undefined) => Promise<",
+ "TransportResult",
+ "<",
+ "SearchResponse",
+ ", unknown>>; }; asCurrentUser: { search: >(query: ",
+ "SearchRequest",
+ " | ",
+ "SearchRequest",
+ ", options?: ",
+ "TransportRequestOptions",
+ " | undefined) => Promise<",
+ "TransportResult",
+ "<",
+ "SearchResponse",
+ ", unknown>>; }; }"
+ ],
+ "path": "x-pack/plugins/alerting/server/lib/create_abortable_es_client_factory.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "alerting",
+ "id": "def-server.createAbortableEsClientFactory.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "opts",
+ "description": [],
+ "signature": [
+ "CreateAbortableEsClientFactoryOpts"
+ ],
+ "path": "x-pack/plugins/alerting/server/lib/create_abortable_es_client_factory.ts",
+ "deprecated": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "alerting",
"id": "def-server.getEsErrorMessage",
@@ -912,6 +977,16 @@
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false
},
+ {
+ "parentPluginId": "alerting",
+ "id": "def-server.AlertExecutorOptions.executionId",
+ "type": "string",
+ "tags": [],
+ "label": "executionId",
+ "description": [],
+ "path": "x-pack/plugins/alerting/server/types.ts",
+ "deprecated": false
+ },
{
"parentPluginId": "alerting",
"id": "def-server.AlertExecutorOptions.startedAt",
@@ -2484,7 +2559,7 @@
"section": "def-server.PartialAlert",
"text": "PartialAlert"
},
- ">; enable: ({ id }: { id: string; }) => Promise; disable: ({ id }: { id: string; }) => Promise; muteAll: ({ id }: { id: string; }) => Promise; getAlertState: ({ id }: { id: string; }) => Promise; getAlertSummary: ({ id, dateStart }: ",
+ ">; enable: ({ id }: { id: string; }) => Promise; disable: ({ id }: { id: string; }) => Promise; muteAll: ({ id }: { id: string; }) => Promise; getAlertState: ({ id }: { id: string; }) => Promise; getAlertSummary: ({ id, dateStart, numberOfExecutions, }: ",
"GetAlertSummaryParams",
") => Promise<",
{
@@ -3205,6 +3280,26 @@
],
"path": "x-pack/plugins/alerting/common/alert.ts",
"deprecated": false
+ },
+ {
+ "parentPluginId": "alerting",
+ "id": "def-common.Alert.monitoring",
+ "type": "Object",
+ "tags": [],
+ "label": "monitoring",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "alerting",
+ "scope": "common",
+ "docId": "kibAlertingPluginApi",
+ "section": "def-common.RuleMonitoring",
+ "text": "RuleMonitoring"
+ },
+ " | undefined"
+ ],
+ "path": "x-pack/plugins/alerting/common/alert.ts",
+ "deprecated": false
}
],
"initialIsOpen": false
@@ -3910,6 +4005,43 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "alerting",
+ "id": "def-common.RuleMonitoring",
+ "type": "Interface",
+ "tags": [],
+ "label": "RuleMonitoring",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "alerting",
+ "scope": "common",
+ "docId": "kibAlertingPluginApi",
+ "section": "def-common.RuleMonitoring",
+ "text": "RuleMonitoring"
+ },
+ " extends ",
+ "SavedObjectAttributes"
+ ],
+ "path": "x-pack/plugins/alerting/common/alert.ts",
+ "deprecated": false,
+ "children": [
+ {
+ "parentPluginId": "alerting",
+ "id": "def-common.RuleMonitoring.execution",
+ "type": "Object",
+ "tags": [],
+ "label": "execution",
+ "description": [],
+ "signature": [
+ "{ history: { success: boolean; timestamp: number; }[]; calculated_metrics: { success_ratio: number; }; }"
+ ],
+ "path": "x-pack/plugins/alerting/common/alert.ts",
+ "deprecated": false
+ }
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "alerting",
"id": "def-common.RuleType",
@@ -4532,7 +4664,15 @@
"label": "SanitizedAlert",
"description": [],
"signature": [
- "{ id: string; name: string; tags: string[]; enabled: boolean; params: Params; actions: ",
+ "{ id: string; monitoring?: ",
+ {
+ "pluginId": "alerting",
+ "scope": "common",
+ "docId": "kibAlertingPluginApi",
+ "section": "def-common.RuleMonitoring",
+ "text": "RuleMonitoring"
+ },
+ " | undefined; name: string; tags: string[]; enabled: boolean; params: Params; actions: ",
{
"pluginId": "alerting",
"scope": "common",
diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx
index b1a48fb8b1656..a4c78c1249832 100644
--- a/api_docs/alerting.mdx
+++ b/api_docs/alerting.mdx
@@ -8,7 +8,7 @@ date: 2020-11-16
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting']
warning: 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.
---
-import alertingObj from './alerting.json';
+import alertingObj from './alerting.devdocs.json';
@@ -18,7 +18,7 @@ Contact [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting-
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 277 | 0 | 269 | 18 |
+| 283 | 0 | 275 | 19 |
## Client
diff --git a/api_docs/apm.json b/api_docs/apm.devdocs.json
similarity index 93%
rename from api_docs/apm.json
rename to api_docs/apm.devdocs.json
index a6e2b5f8c8216..5059a88c10b7d 100644
--- a/api_docs/apm.json
+++ b/api_docs/apm.devdocs.json
@@ -489,7 +489,37 @@
"section": "def-server.LicensingPluginStart",
"text": "LicensingPluginStart"
},
- ">; }; observability: { setup: { getScopedAnnotationsClient: (...args: unknown[]) => Promise; }; start: () => Promise; }; ruleRegistry: { setup: ",
+ ">; }; observability: { setup: { getScopedAnnotationsClient: (requestContext: ",
+ {
+ "pluginId": "core",
+ "scope": "server",
+ "docId": "kibCorePluginApi",
+ "section": "def-server.RequestHandlerContext",
+ "text": "RequestHandlerContext"
+ },
+ " & { licensing: ",
+ {
+ "pluginId": "licensing",
+ "scope": "server",
+ "docId": "kibLicensingPluginApi",
+ "section": "def-server.LicensingApiRequestHandlerContext",
+ "text": "LicensingApiRequestHandlerContext"
+ },
+ "; }, request: ",
+ {
+ "pluginId": "core",
+ "scope": "server",
+ "docId": "kibCoreHttpPluginApi",
+ "section": "def-server.KibanaRequest",
+ "text": "KibanaRequest"
+ },
+ ") => Promise<{ readonly index: string; create: (createParams: { annotation: { type: string; }; '@timestamp': string; message: string; } & { tags?: string[] | undefined; service?: { name?: string | undefined; environment?: string | undefined; version?: string | undefined; } | undefined; }) => Promise<{ _id: string; _index: string; _source: ",
+ "Annotation",
+ "; }>; getById: (getByIdParams: { id: string; }) => Promise<",
+ "GetResponse",
+ ">; delete: (deleteParams: { id: string; }) => Promise<",
+ "DeleteResponse",
+ ">; } | undefined>; }; start: () => Promise; }; ruleRegistry: { setup: ",
{
"pluginId": "ruleRegistry",
"scope": "server",
@@ -765,8 +795,31 @@
"label": "APMServerRouteRepository",
"description": [],
"signature": [
- "ServerRouteRepository",
+ "{ \"POST /api/apm/agent_keys\": ",
+ "ServerRoute",
+ "<\"POST /api/apm/agent_keys\", ",
+ "TypeC",
+ "<{ body: ",
+ "TypeC",
+ "<{ name: ",
+ "StringC",
+ "; privileges: ",
+ "ArrayC",
+ "<",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<",
+ "PrivilegeType",
+ ".SOURCEMAP>, ",
+ "LiteralC",
+ "<",
+ "PrivilegeType",
+ ".EVENT>, ",
+ "LiteralC",
"<",
+ "PrivilegeType",
+ ".AGENT_CONFIG>]>>; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -774,11 +827,19 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", ",
+ ", { agentKey: ",
+ "SecurityCreateApiKeyResponse",
+ "; }, ",
"APMRouteCreateOptions",
- ", { \"POST /internal/apm/data_view/static\": ",
+ ">; \"POST /internal/apm/api_key/invalidate\": ",
"ServerRoute",
- "<\"POST /internal/apm/data_view/static\", undefined, ",
+ "<\"POST /internal/apm/api_key/invalidate\", ",
+ "TypeC",
+ "<{ body: ",
+ "TypeC",
+ "<{ id: ",
+ "StringC",
+ "; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -786,11 +847,11 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { created: boolean; }, ",
+ ", { invalidatedAgentKeys: string[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/data_view/dynamic\": ",
+ ">; \"GET /internal/apm/agent_keys/privileges\": ",
"ServerRoute",
- "<\"GET /internal/apm/data_view/dynamic\", undefined, ",
+ "<\"GET /internal/apm/agent_keys/privileges\", undefined, ",
{
"pluginId": "apm",
"scope": "server",
@@ -798,27 +859,11 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { dynamicDataView: ",
- "DataViewTitleAndFields",
- " | undefined; }, ",
+ ", { areApiKeysEnabled: boolean; isAdmin: boolean; canManage: boolean; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/environments\": ",
+ ">; \"GET /internal/apm/agent_keys\": ",
"ServerRoute",
- "<\"GET /internal/apm/environments\", ",
- "TypeC",
- "<{ query: ",
- "IntersectionC",
- "<[",
- "PartialC",
- "<{ serviceName: ",
- "StringC",
- "; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>]>; }>, ",
+ "<\"GET /internal/apm/agent_keys\", undefined, ",
{
"pluginId": "apm",
"scope": "server",
@@ -826,61 +871,85 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { environments: (\"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ",
- "Branded",
- ")[]; }, ",
+ ", { agentKeys: ",
+ {
+ "pluginId": "security",
+ "scope": "common",
+ "docId": "kibSecurityPluginApi",
+ "section": "def-common.ApiKey",
+ "text": "ApiKey"
+ },
+ "[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\": ",
+ ">; \"GET /internal/apm/event_metadata/{processorEvent}/{id}\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\", ",
+ "<\"GET /internal/apm/event_metadata/{processorEvent}/{id}\", ",
"TypeC",
"<{ path: ",
"TypeC",
- "<{ serviceName: ",
- "StringC",
- "; }>; query: ",
- "IntersectionC",
- "<[",
- "PartialC",
- "<{ sortField: ",
- "StringC",
- "; sortDirection: ",
+ "<{ processorEvent: ",
"UnionC",
"<[",
"LiteralC",
- "<\"asc\">, ",
+ "<",
+ "ProcessorEvent",
+ ".transaction>, ",
"LiteralC",
- "<\"desc\">]>; }>, ",
- "TypeC",
- "<{ environment: ",
- "UnionC",
- "<[",
+ "<",
+ "ProcessorEvent",
+ ".error>, ",
"LiteralC",
- "<\"ENVIRONMENT_NOT_DEFINED\">, ",
+ "<",
+ "ProcessorEvent",
+ ".metric>, ",
+ "LiteralC",
+ "<",
+ "ProcessorEvent",
+ ".span>, ",
"LiteralC",
- "<\"ENVIRONMENT_ALL\">, ",
- "BrandC",
"<",
+ "ProcessorEvent",
+ ".profile>]>; id: ",
"StringC",
- ", ",
- "NonEmptyStringBrand",
- ">]>; }>, ",
+ "; }>; }>, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", { metadata: Partial>; }, ",
+ "APMRouteCreateOptions",
+ ">; \"GET /internal/apm/has_data\": ",
+ "ServerRoute",
+ "<\"GET /internal/apm/has_data\", undefined, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", { hasData: boolean; }, ",
+ "APMRouteCreateOptions",
+ ">; \"GET /internal/apm/fallback_to_transactions\": ",
+ "ServerRoute",
+ "<\"GET /internal/apm/fallback_to_transactions\", ",
+ "PartialC",
+ "<{ query: ",
+ "IntersectionC",
+ "<[",
"TypeC",
"<{ kuery: ",
"StringC",
"; }>, ",
- "TypeC",
+ "PartialC",
"<{ start: ",
"Type",
"; end: ",
"Type",
- "; }>, ",
- "TypeC",
- "<{ transactionType: ",
- "StringC",
- "; }>]>; }>, ",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -888,19 +957,23 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { errorGroups: { groupId: string; name: string; lastSeen: number; occurrences: number; culprit: string | undefined; handled: boolean | undefined; type: string | undefined; }[]; }, ",
+ ", { fallbackToTransactions: boolean; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\": ",
+ ">; \"POST /internal/apm/correlations/significant_correlations\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\", ",
- "TypeC",
- "<{ path: ",
+ "<\"POST /internal/apm/correlations/significant_correlations\", ",
"TypeC",
- "<{ serviceName: ",
- "StringC",
- "; }>; query: ",
+ "<{ body: ",
"IntersectionC",
"<[",
+ "PartialC",
+ "<{ serviceName: ",
+ "StringC",
+ "; transactionName: ",
+ "StringC",
+ "; transactionType: ",
+ "StringC",
+ "; }>, ",
"TypeC",
"<{ environment: ",
"UnionC",
@@ -925,20 +998,20 @@
"; end: ",
"Type",
"; }>, ",
- "PartialC",
- "<{ comparisonStart: ",
- "Type",
- "; comparisonEnd: ",
- "Type",
- "; }>, ",
"TypeC",
- "<{ numBuckets: ",
- "Type",
- "; transactionType: ",
+ "<{ fieldValuePairs: ",
+ "ArrayC",
+ "<",
+ "TypeC",
+ "<{ fieldName: ",
"StringC",
- "; groupIds: ",
+ "; fieldValue: ",
+ "UnionC",
+ "<[",
+ "StringC",
+ ", ",
"Type",
- "; }>]>; }>, ",
+ "]>; }>>; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -946,25 +1019,25 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { currentPeriod: _.Dictionary<{ groupId: string; timeseries: ",
- "Coordinate",
- "[]; }>; previousPeriod: _.Dictionary<{ timeseries: { x: number; y: ",
- "Maybe",
- "; }[]; groupId: string; }>; }, ",
+ ", { latencyCorrelations: ",
+ "LatencyCorrelation",
+ "[]; ccsWarning: boolean; totalDocCount: number; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/errors/{groupId}\": ",
+ ">; \"POST /internal/apm/correlations/field_value_pairs\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/errors/{groupId}\", ",
- "TypeC",
- "<{ path: ",
+ "<\"POST /internal/apm/correlations/field_value_pairs\", ",
"TypeC",
+ "<{ body: ",
+ "IntersectionC",
+ "<[",
+ "PartialC",
"<{ serviceName: ",
"StringC",
- "; groupId: ",
+ "; transactionName: ",
"StringC",
- "; }>; query: ",
- "IntersectionC",
- "<[",
+ "; transactionType: ",
+ "StringC",
+ "; }>, ",
"TypeC",
"<{ environment: ",
"UnionC",
@@ -988,7 +1061,13 @@
"Type",
"; end: ",
"Type",
- "; }>]>; }>, ",
+ "; }>, ",
+ "TypeC",
+ "<{ fieldCandidates: ",
+ "ArrayC",
+ "<",
+ "StringC",
+ ">; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -996,25 +1075,23 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { transaction: ",
- "Transaction",
- " | undefined; error: ",
- "APMError",
- "; occurrencesCount: number; }, ",
+ ", { fieldValuePairs: ",
+ "FieldValuePair",
+ "[]; errors: any[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/errors/distribution\": ",
+ ">; \"GET /internal/apm/correlations/field_value_stats\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/errors/distribution\", ",
- "TypeC",
- "<{ path: ",
+ "<\"GET /internal/apm/correlations/field_value_stats\", ",
"TypeC",
- "<{ serviceName: ",
- "StringC",
- "; }>; query: ",
+ "<{ query: ",
"IntersectionC",
"<[",
"PartialC",
- "<{ groupId: ",
+ "<{ serviceName: ",
+ "StringC",
+ "; transactionName: ",
+ "StringC",
+ "; transactionType: ",
"StringC",
"; }>, ",
"TypeC",
@@ -1041,12 +1118,16 @@
"; end: ",
"Type",
"; }>, ",
- "PartialC",
- "<{ comparisonStart: ",
- "Type",
- "; comparisonEnd: ",
- "Type",
- "; }>]>; }>, ",
+ "TypeC",
+ "<{ fieldName: ",
+ "StringC",
+ "; fieldValue: ",
+ "UnionC",
+ "<[",
+ "StringC",
+ ", ",
+ "NumberC",
+ "]>; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1054,13 +1135,13 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { currentPeriod: { x: number; y: number; }[]; previousPeriod: { x: number; y: ",
- "Maybe",
- "; }[]; bucketSize: number; }, ",
+ ", ",
+ "TopValuesStats",
+ ", ",
"APMRouteCreateOptions",
- ">; } & { \"POST /internal/apm/latency/overall_distribution\": ",
+ ">; \"POST /internal/apm/correlations/field_stats\": ",
"ServerRoute",
- "<\"POST /internal/apm/latency/overall_distribution\", ",
+ "<\"POST /internal/apm/correlations/field_stats\", ",
"TypeC",
"<{ body: ",
"IntersectionC",
@@ -1072,19 +1153,13 @@
"StringC",
"; transactionType: ",
"StringC",
- "; termFilters: ",
+ "; }>, ",
+ "TypeC",
+ "<{ fieldsToSample: ",
"ArrayC",
"<",
- "TypeC",
- "<{ fieldName: ",
- "StringC",
- "; fieldValue: ",
- "UnionC",
- "<[",
"StringC",
- ", ",
- "Type",
- "]>; }>>; }>, ",
+ ">; }>, ",
"TypeC",
"<{ environment: ",
"UnionC",
@@ -1108,11 +1183,7 @@
"Type",
"; end: ",
"Type",
- "; }>, ",
- "TypeC",
- "<{ percentileThreshold: ",
- "Type",
- "; }>]>; }>, ",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1120,27 +1191,23 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", ",
- "OverallLatencyDistributionResponse",
- ", ",
+ ", { stats: ",
+ "FieldStats",
+ "[]; errors: any[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/metrics/charts\": ",
+ ">; \"GET /internal/apm/correlations/field_candidates\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/metrics/charts\", ",
- "TypeC",
- "<{ path: ",
+ "<\"GET /internal/apm/correlations/field_candidates\", ",
"TypeC",
- "<{ serviceName: ",
- "StringC",
- "; }>; query: ",
+ "<{ query: ",
"IntersectionC",
"<[",
- "TypeC",
- "<{ agentName: ",
- "StringC",
- "; }>, ",
"PartialC",
- "<{ serviceNodeName: ",
+ "<{ serviceName: ",
+ "StringC",
+ "; transactionName: ",
+ "StringC",
+ "; transactionType: ",
"StringC",
"; }>, ",
"TypeC",
@@ -1174,59 +1241,39 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { charts: any[]; }, ",
+ ", { fieldCandidates: string[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/observability_overview\": ",
+ ">; \"POST /internal/apm/correlations/p_values\": ",
"ServerRoute",
- "<\"GET /internal/apm/observability_overview\", ",
+ "<\"POST /internal/apm/correlations/p_values\", ",
"TypeC",
- "<{ query: ",
+ "<{ body: ",
"IntersectionC",
"<[",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>, ",
- "TypeC",
- "<{ bucketSize: ",
- "Type",
- "; intervalString: ",
+ "PartialC",
+ "<{ serviceName: ",
"StringC",
- "; }>]>; }>, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { serviceCount: number; transactionPerMinute: { value: undefined; timeseries: never[]; } | { value: number; timeseries: { x: number; y: number | null; }[]; }; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/observability_overview/has_data\": ",
- "ServerRoute",
- "<\"GET /internal/apm/observability_overview/has_data\", undefined, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { hasData: boolean; indices: ",
- "ApmIndicesConfig",
- "; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/ux/client-metrics\": ",
- "ServerRoute",
- "<\"GET /internal/apm/ux/client-metrics\", ",
+ "; transactionName: ",
+ "StringC",
+ "; transactionType: ",
+ "StringC",
+ "; }>, ",
"TypeC",
- "<{ query: ",
- "IntersectionC",
+ "<{ environment: ",
+ "UnionC",
"<[",
+ "LiteralC",
+ "<\"ENVIRONMENT_NOT_DEFINED\">, ",
+ "LiteralC",
+ "<\"ENVIRONMENT_ALL\">, ",
+ "BrandC",
+ "<",
+ "StringC",
+ ", ",
+ "NonEmptyStringBrand",
+ ">]>; }>, ",
"TypeC",
- "<{ uiFilters: ",
+ "<{ kuery: ",
"StringC",
"; }>, ",
"TypeC",
@@ -1235,12 +1282,12 @@
"; end: ",
"Type",
"; }>, ",
- "PartialC",
- "<{ urlQuery: ",
- "StringC",
- "; percentile: ",
+ "TypeC",
+ "<{ fieldCandidates: ",
+ "ArrayC",
+ "<",
"StringC",
- "; }>]>; }>, ",
+ ">; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1248,19 +1295,19 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { pageViews: { value: number; }; totalPageLoadDuration: { value: number; }; backEnd: { value: number; }; frontEnd: { value: number; }; }, ",
+ ", { failedTransactionsCorrelations: ",
+ "FailedTransactionsCorrelation",
+ "[]; ccsWarning: boolean; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/ux/page-load-distribution\": ",
+ ">; \"GET /internal/apm/backends/charts/error_rate\": ",
"ServerRoute",
- "<\"GET /internal/apm/ux/page-load-distribution\", ",
+ "<\"GET /internal/apm/backends/charts/error_rate\", ",
"TypeC",
"<{ query: ",
"IntersectionC",
"<[",
- "IntersectionC",
- "<[",
"TypeC",
- "<{ uiFilters: ",
+ "<{ backendName: ",
"StringC",
"; }>, ",
"TypeC",
@@ -1269,16 +1316,26 @@
"; end: ",
"Type",
"; }>, ",
- "PartialC",
- "<{ urlQuery: ",
+ "TypeC",
+ "<{ kuery: ",
"StringC",
- "; percentile: ",
+ "; }>, ",
+ "TypeC",
+ "<{ environment: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"ENVIRONMENT_NOT_DEFINED\">, ",
+ "LiteralC",
+ "<\"ENVIRONMENT_ALL\">, ",
+ "BrandC",
+ "<",
"StringC",
- "; }>]>, ",
+ ", ",
+ "NonEmptyStringBrand",
+ ">]>; }>, ",
"PartialC",
- "<{ minPercentile: ",
- "StringC",
- "; maxPercentile: ",
+ "<{ offset: ",
"StringC",
"; }>]>; }>, ",
{
@@ -1288,19 +1345,17 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { pageLoadDistribution: { pageLoadDistribution: { x: number; y: number; }[]; percentiles: Record | undefined; minDuration: number; maxDuration: number; } | null; }, ",
+ ", { currentTimeseries: { x: number; y: number; }[]; comparisonTimeseries: { x: number; y: number; }[] | null; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/ux/page-load-distribution/breakdown\": ",
+ ">; \"GET /internal/apm/backends/charts/throughput\": ",
"ServerRoute",
- "<\"GET /internal/apm/ux/page-load-distribution/breakdown\", ",
+ "<\"GET /internal/apm/backends/charts/throughput\", ",
"TypeC",
"<{ query: ",
"IntersectionC",
"<[",
- "IntersectionC",
- "<[",
"TypeC",
- "<{ uiFilters: ",
+ "<{ backendName: ",
"StringC",
"; }>, ",
"TypeC",
@@ -1309,20 +1364,26 @@
"; end: ",
"Type",
"; }>, ",
- "PartialC",
- "<{ urlQuery: ",
- "StringC",
- "; percentile: ",
- "StringC",
- "; }>]>, ",
- "PartialC",
- "<{ minPercentile: ",
- "StringC",
- "; maxPercentile: ",
+ "TypeC",
+ "<{ kuery: ",
"StringC",
"; }>, ",
"TypeC",
- "<{ breakdown: ",
+ "<{ environment: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"ENVIRONMENT_NOT_DEFINED\">, ",
+ "LiteralC",
+ "<\"ENVIRONMENT_ALL\">, ",
+ "BrandC",
+ "<",
+ "StringC",
+ ", ",
+ "NonEmptyStringBrand",
+ ">]>; }>, ",
+ "PartialC",
+ "<{ offset: ",
"StringC",
"; }>]>; }>, ",
{
@@ -1332,19 +1393,17 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { pageLoadDistBreakdown: { name: string; data: { x: number; y: number; }[]; }[] | undefined; }, ",
+ ", { currentTimeseries: { x: number; y: number | null; }[]; comparisonTimeseries: { x: number; y: number | null; }[] | null; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/ux/page-view-trends\": ",
+ ">; \"GET /internal/apm/backends/charts/latency\": ",
"ServerRoute",
- "<\"GET /internal/apm/ux/page-view-trends\", ",
+ "<\"GET /internal/apm/backends/charts/latency\", ",
"TypeC",
"<{ query: ",
"IntersectionC",
"<[",
- "IntersectionC",
- "<[",
"TypeC",
- "<{ uiFilters: ",
+ "<{ backendName: ",
"StringC",
"; }>, ",
"TypeC",
@@ -1353,14 +1412,26 @@
"; end: ",
"Type",
"; }>, ",
- "PartialC",
- "<{ urlQuery: ",
+ "TypeC",
+ "<{ kuery: ",
"StringC",
- "; percentile: ",
+ "; }>, ",
+ "TypeC",
+ "<{ environment: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"ENVIRONMENT_NOT_DEFINED\">, ",
+ "LiteralC",
+ "<\"ENVIRONMENT_ALL\">, ",
+ "BrandC",
+ "<",
"StringC",
- "; }>]>, ",
+ ", ",
+ "NonEmptyStringBrand",
+ ">]>; }>, ",
"PartialC",
- "<{ breakdowns: ",
+ "<{ offset: ",
"StringC",
"; }>]>; }>, ",
{
@@ -1370,17 +1441,17 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { topItems: string[]; items: Record[]; }, ",
+ ", { currentTimeseries: { x: number; y: number; }[]; comparisonTimeseries: { x: number; y: number; }[] | null; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/ux/services\": ",
+ ">; \"GET /internal/apm/backends/metadata\": ",
"ServerRoute",
- "<\"GET /internal/apm/ux/services\", ",
+ "<\"GET /internal/apm/backends/metadata\", ",
"TypeC",
"<{ query: ",
"IntersectionC",
"<[",
"TypeC",
- "<{ uiFilters: ",
+ "<{ backendName: ",
"StringC",
"; }>, ",
"TypeC",
@@ -1396,17 +1467,19 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { rumServices: string[]; }, ",
+ ", { metadata: { spanType: string | undefined; spanSubtype: string | undefined; }; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/ux/visitor-breakdown\": ",
+ ">; \"GET /internal/apm/backends/upstream_services\": ",
"ServerRoute",
- "<\"GET /internal/apm/ux/visitor-breakdown\", ",
+ "<\"GET /internal/apm/backends/upstream_services\", ",
+ "IntersectionC",
+ "<[",
"TypeC",
"<{ query: ",
"IntersectionC",
"<[",
"TypeC",
- "<{ uiFilters: ",
+ "<{ backendName: ",
"StringC",
"; }>, ",
"TypeC",
@@ -1415,44 +1488,36 @@
"; end: ",
"Type",
"; }>, ",
- "PartialC",
- "<{ urlQuery: ",
- "StringC",
- "; percentile: ",
- "StringC",
- "; }>]>; }>, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { os: { count: number; name: string; }[]; browsers: { count: number; name: string; }[]; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/ux/web-core-vitals\": ",
- "ServerRoute",
- "<\"GET /internal/apm/ux/web-core-vitals\", ",
"TypeC",
+ "<{ numBuckets: ",
+ "Type",
+ "; }>]>; }>, ",
+ "PartialC",
"<{ query: ",
"IntersectionC",
"<[",
"TypeC",
- "<{ uiFilters: ",
+ "<{ environment: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"ENVIRONMENT_NOT_DEFINED\">, ",
+ "LiteralC",
+ "<\"ENVIRONMENT_ALL\">, ",
+ "BrandC",
+ "<",
"StringC",
- "; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>, ",
+ ", ",
+ "NonEmptyStringBrand",
+ ">]>; }>, ",
"PartialC",
- "<{ urlQuery: ",
+ "<{ offset: ",
"StringC",
- "; percentile: ",
+ "; }>, ",
+ "TypeC",
+ "<{ kuery: ",
"StringC",
- "; }>]>; }>, ",
+ "; }>]>; }>]>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1460,31 +1525,69 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { coreVitalPages: number; cls: number | null; fid: number | null | undefined; lcp: number | null | undefined; tbt: number; fcp: number | null | undefined; lcpRanks: number[]; fidRanks: number[]; clsRanks: number[]; }, ",
+ ", { services: { currentStats: { latency: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; throughput: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; errorRate: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; totalTime: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; } & { impact: number; }; previousStats: ({ latency: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; throughput: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; errorRate: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; totalTime: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; } & { impact: number; }) | null; location: ",
+ "Node",
+ "; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/ux/long-task-metrics\": ",
+ ">; \"GET /internal/apm/backends/top_backends\": ",
"ServerRoute",
- "<\"GET /internal/apm/ux/long-task-metrics\", ",
+ "<\"GET /internal/apm/backends/top_backends\", ",
+ "IntersectionC",
+ "<[",
"TypeC",
"<{ query: ",
"IntersectionC",
"<[",
"TypeC",
- "<{ uiFilters: ",
- "StringC",
- "; }>, ",
- "TypeC",
"<{ start: ",
"Type",
"; end: ",
"Type",
"; }>, ",
- "PartialC",
- "<{ urlQuery: ",
+ "TypeC",
+ "<{ environment: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"ENVIRONMENT_NOT_DEFINED\">, ",
+ "LiteralC",
+ "<\"ENVIRONMENT_ALL\">, ",
+ "BrandC",
+ "<",
"StringC",
- "; percentile: ",
+ ", ",
+ "NonEmptyStringBrand",
+ ">]>; }>, ",
+ "TypeC",
+ "<{ kuery: ",
"StringC",
- "; }>]>; }>, ",
+ "; }>, ",
+ "TypeC",
+ "<{ numBuckets: ",
+ "Type",
+ "; }>]>; }>, ",
+ "PartialC",
+ "<{ query: ",
+ "PartialC",
+ "<{ offset: ",
+ "StringC",
+ "; }>; }>]>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1492,31 +1595,29 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { noOfLongTasks: number; sumOfLongTasks: number; longestLongTask: number; }, ",
+ ", { backends: { currentStats: { latency: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; throughput: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; errorRate: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; totalTime: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; } & { impact: number; }; previousStats: ({ latency: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; throughput: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; errorRate: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; totalTime: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; } & { impact: number; }) | null; location: ",
+ "Node",
+ "; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/ux/url-search\": ",
+ ">; \"POST /internal/apm/fleet/cloud_apm_package_policy\": ",
"ServerRoute",
- "<\"GET /internal/apm/ux/url-search\", ",
- "TypeC",
- "<{ query: ",
- "IntersectionC",
- "<[",
- "TypeC",
- "<{ uiFilters: ",
- "StringC",
- "; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>, ",
- "PartialC",
- "<{ urlQuery: ",
- "StringC",
- "; percentile: ",
- "StringC",
- "; }>]>; }>, ",
+ "<\"POST /internal/apm/fleet/cloud_apm_package_policy\", undefined, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1524,35 +1625,19 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { total: number; items: { url: string; count: number; pld: number; }[]; }, ",
+ ", { cloudApmPackagePolicy: ",
+ {
+ "pluginId": "fleet",
+ "scope": "common",
+ "docId": "kibFleetPluginApi",
+ "section": "def-common.PackagePolicy",
+ "text": "PackagePolicy"
+ },
+ "; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/ux/js-errors\": ",
+ ">; \"GET /internal/apm/fleet/migration_check\": ",
"ServerRoute",
- "<\"GET /internal/apm/ux/js-errors\", ",
- "TypeC",
- "<{ query: ",
- "IntersectionC",
- "<[",
- "TypeC",
- "<{ uiFilters: ",
- "StringC",
- "; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>, ",
- "TypeC",
- "<{ pageSize: ",
- "StringC",
- "; pageIndex: ",
- "StringC",
- "; }>, ",
- "PartialC",
- "<{ urlQuery: ",
- "StringC",
- "; }>]>; }>, ",
+ "<\"GET /internal/apm/fleet/migration_check\", undefined, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1560,21 +1645,19 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { totalErrorPages: number; totalErrors: number; totalErrorGroups: number; items: { count: number; errorGroupId: string | number; errorMessage: string; }[] | undefined; }, ",
+ ", { has_cloud_agent_policy: boolean; has_cloud_apm_package_policy: boolean; cloud_apm_migration_enabled: boolean; has_required_role: boolean | undefined; cloud_apm_package_policy: ",
+ {
+ "pluginId": "fleet",
+ "scope": "common",
+ "docId": "kibFleetPluginApi",
+ "section": "def-common.PackagePolicy",
+ "text": "PackagePolicy"
+ },
+ " | undefined; has_apm_integrations: boolean; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /api/apm/observability_overview/has_rum_data\": ",
+ ">; \"GET /internal/apm/fleet/apm_server_schema/unsupported\": ",
"ServerRoute",
- "<\"GET /api/apm/observability_overview/has_rum_data\", ",
- "PartialC",
- "<{ query: ",
- "PartialC",
- "<{ uiFilters: ",
- "StringC",
- "; start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>; }>, ",
+ "<\"GET /internal/apm/fleet/apm_server_schema/unsupported\", undefined, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1582,39 +1665,21 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { indices: string; hasData: boolean; serviceName: string | number | undefined; }, ",
+ ", { unsupported: { key: string; value: any; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/service-map\": ",
+ ">; \"POST /api/apm/fleet/apm_server_schema\": ",
"ServerRoute",
- "<\"GET /internal/apm/service-map\", ",
+ "<\"POST /api/apm/fleet/apm_server_schema\", ",
"TypeC",
- "<{ query: ",
- "IntersectionC",
- "<[",
- "PartialC",
- "<{ serviceName: ",
- "StringC",
- "; }>, ",
+ "<{ body: ",
"TypeC",
- "<{ environment: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<\"ENVIRONMENT_NOT_DEFINED\">, ",
- "LiteralC",
- "<\"ENVIRONMENT_ALL\">, ",
- "BrandC",
+ "<{ schema: ",
+ "RecordC",
"<",
"StringC",
", ",
- "NonEmptyStringBrand",
- ">]>; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>]>; }>, ",
+ "UnknownC",
+ ">; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1622,47 +1687,11 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { elements: (",
- "ConnectionElement",
- " | { data: { id: string; 'span.type': string; label: string; groupedConnections: ({ 'service.name': string; 'service.environment': string | null; 'agent.name': string; serviceAnomalyStats?: ",
- "ServiceAnomalyStats",
- " | undefined; label: string | undefined; id?: string | undefined; parent?: string | undefined; position?: cytoscape.Position | undefined; } | { 'span.destination.service.resource': string; 'span.type': string; 'span.subtype': string; label: string | undefined; id?: string | undefined; parent?: string | undefined; position?: cytoscape.Position | undefined; } | { id: string; source: string | undefined; target: string | undefined; label: string | undefined; bidirectional?: boolean | undefined; isInverseEdge?: boolean | undefined; } | undefined)[]; }; } | { data: { id: string; source: string; target: string; }; })[]; }, ",
+ ", void, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/service-map/service/{serviceName}\": ",
+ ">; \"GET /internal/apm/fleet/agents\": ",
"ServerRoute",
- "<\"GET /internal/apm/service-map/service/{serviceName}\", ",
- "TypeC",
- "<{ path: ",
- "TypeC",
- "<{ serviceName: ",
- "StringC",
- "; }>; query: ",
- "IntersectionC",
- "<[",
- "TypeC",
- "<{ environment: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<\"ENVIRONMENT_NOT_DEFINED\">, ",
- "LiteralC",
- "<\"ENVIRONMENT_ALL\">, ",
- "BrandC",
- "<",
- "StringC",
- ", ",
- "NonEmptyStringBrand",
- ">]>; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>, ",
- "PartialC",
- "<{ offset: ",
- "StringC",
- "; }>]>; }>, ",
+ "<\"GET /internal/apm/fleet/agents\", undefined, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1670,47 +1699,11 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { currentPeriod: ",
- "NodeStats",
- "; previousPeriod: ",
- "NodeStats",
- " | undefined; }, ",
+ ", { cloudStandaloneSetup: { apmServerUrl: string | undefined; secretToken: string | undefined; } | undefined; fleetAgents: never[]; isFleetEnabled: false; } | { cloudStandaloneSetup: { apmServerUrl: string | undefined; secretToken: string | undefined; } | undefined; isFleetEnabled: true; fleetAgents: { id: string; name: string; apmServerUrl: any; secretToken: any; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/service-map/backend\": ",
+ ">; \"GET /internal/apm/fleet/has_data\": ",
"ServerRoute",
- "<\"GET /internal/apm/service-map/backend\", ",
- "TypeC",
- "<{ query: ",
- "IntersectionC",
- "<[",
- "TypeC",
- "<{ backendName: ",
- "StringC",
- "; }>, ",
- "TypeC",
- "<{ environment: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<\"ENVIRONMENT_NOT_DEFINED\">, ",
- "LiteralC",
- "<\"ENVIRONMENT_ALL\">, ",
- "BrandC",
- "<",
- "StringC",
- ", ",
- "NonEmptyStringBrand",
- ">]>; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>, ",
- "PartialC",
- "<{ offset: ",
- "StringC",
- "; }>]>; }>, ",
+ "<\"GET /internal/apm/fleet/has_data\", undefined, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1718,47 +1711,17 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { currentPeriod: ",
- "NodeStats",
- "; previousPeriod: ",
- "NodeStats",
- " | undefined; }, ",
+ ", { hasData: boolean; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/serviceNodes\": ",
+ ">; \"DELETE /api/apm/sourcemaps/{id}\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/serviceNodes\", ",
+ "<\"DELETE /api/apm/sourcemaps/{id}\", ",
"TypeC",
"<{ path: ",
"TypeC",
- "<{ serviceName: ",
- "StringC",
- "; }>; query: ",
- "IntersectionC",
- "<[",
- "TypeC",
- "<{ kuery: ",
- "StringC",
- "; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>, ",
- "TypeC",
- "<{ environment: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<\"ENVIRONMENT_NOT_DEFINED\">, ",
- "LiteralC",
- "<\"ENVIRONMENT_ALL\">, ",
- "BrandC",
- "<",
+ "<{ id: ",
"StringC",
- ", ",
- "NonEmptyStringBrand",
- ">]>; }>]>; }>, ",
+ "; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1766,39 +1729,23 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { serviceNodes: { name: string; cpu: number | null; heapMemory: number | null; hostName: string | null | undefined; nonHeapMemory: number | null; threadCount: number | null; }[]; }, ",
+ ", void, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services\": ",
+ ">; \"POST /api/apm/sourcemaps\": ",
"ServerRoute",
- "<\"GET /internal/apm/services\", ",
+ "<\"POST /api/apm/sourcemaps\", ",
"TypeC",
- "<{ query: ",
- "IntersectionC",
- "<[",
+ "<{ body: ",
"TypeC",
- "<{ environment: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<\"ENVIRONMENT_NOT_DEFINED\">, ",
- "LiteralC",
- "<\"ENVIRONMENT_ALL\">, ",
- "BrandC",
- "<",
+ "<{ service_name: ",
"StringC",
- ", ",
- "NonEmptyStringBrand",
- ">]>; }>, ",
- "TypeC",
- "<{ kuery: ",
+ "; service_version: ",
"StringC",
- "; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
+ "; bundle_filepath: ",
+ "StringC",
+ "; sourcemap: ",
"Type",
- "; }>]>; }>, ",
+ "<{ version: number; sources: string[]; mappings: string; } & { names?: string[] | undefined; file?: string | undefined; sourceRoot?: string | undefined; sourcesContent?: string[] | undefined; }, string | Buffer, unknown>; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1806,47 +1753,19 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { items: JoinedReturnType; hasLegacyData: boolean; }, ",
+ ", ",
+ {
+ "pluginId": "fleet",
+ "scope": "server",
+ "docId": "kibFleetPluginApi",
+ "section": "def-server.Artifact",
+ "text": "Artifact"
+ },
+ " | undefined, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/detailed_statistics\": ",
+ ">; \"GET /api/apm/sourcemaps\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/detailed_statistics\", ",
- "TypeC",
- "<{ query: ",
- "IntersectionC",
- "<[",
- "TypeC",
- "<{ environment: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<\"ENVIRONMENT_NOT_DEFINED\">, ",
- "LiteralC",
- "<\"ENVIRONMENT_ALL\">, ",
- "BrandC",
- "<",
- "StringC",
- ", ",
- "NonEmptyStringBrand",
- ">]>; }>, ",
- "TypeC",
- "<{ kuery: ",
- "StringC",
- "; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>, ",
- "PartialC",
- "<{ offset: ",
- "StringC",
- "; }>, ",
- "TypeC",
- "<{ serviceNames: ",
- "Type",
- "; }>]>; }>, ",
+ "<\"GET /api/apm/sourcemaps\", undefined, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1854,23 +1773,19 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { currentPeriod: _.Dictionary<{ serviceName: string; latency: { x: number; y: number | null; }[]; transactionErrorRate: { x: number; y: number; }[]; throughput: { x: number; y: number; }[]; }>; previousPeriod: _.Dictionary<{ serviceName: string; latency: { x: number; y: number | null; }[]; transactionErrorRate: { x: number; y: number; }[]; throughput: { x: number; y: number; }[]; }>; }, ",
+ ", { artifacts: ",
+ "ArtifactSourceMap",
+ "[]; } | undefined, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/metadata/details\": ",
+ ">; \"DELETE /internal/apm/settings/custom_links/{id}\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/metadata/details\", ",
+ "<\"DELETE /internal/apm/settings/custom_links/{id}\", ",
"TypeC",
"<{ path: ",
"TypeC",
- "<{ serviceName: ",
+ "<{ id: ",
"StringC",
- "; }>; query: ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>; }>, ",
+ "; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1878,25 +1793,49 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", ",
- "ServiceMetadataDetails",
- ", ",
+ ", { result: string; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/metadata/icons\": ",
+ ">; \"PUT /internal/apm/settings/custom_links/{id}\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/metadata/icons\", ",
+ "<\"PUT /internal/apm/settings/custom_links/{id}\", ",
"TypeC",
"<{ path: ",
"TypeC",
- "<{ serviceName: ",
+ "<{ id: ",
"StringC",
- "; }>; query: ",
+ "; }>; body: ",
+ "IntersectionC",
+ "<[",
"TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>; }>, ",
+ "<{ label: ",
+ "StringC",
+ "; url: ",
+ "StringC",
+ "; }>, ",
+ "PartialC",
+ "<{ id: ",
+ "StringC",
+ "; filters: ",
+ "ArrayC",
+ "<",
+ "TypeC",
+ "<{ key: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"\">, ",
+ "KeyofC",
+ "<{ 'service.name': ",
+ "StringC",
+ "; 'service.environment': ",
+ "StringC",
+ "; 'transaction.name': ",
+ "StringC",
+ "; 'transaction.type': ",
+ "StringC",
+ "; }>]>; value: ",
+ "StringC",
+ "; }>>; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1904,25 +1843,45 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", ",
- "ServiceMetadataIcons",
- ", ",
+ ", void, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/agent\": ",
+ ">; \"POST /internal/apm/settings/custom_links\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/agent\", ",
+ "<\"POST /internal/apm/settings/custom_links\", ",
"TypeC",
- "<{ path: ",
+ "<{ body: ",
+ "IntersectionC",
+ "<[",
"TypeC",
- "<{ serviceName: ",
+ "<{ label: ",
"StringC",
- "; }>; query: ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>; }>, ",
+ "; url: ",
+ "StringC",
+ "; }>, ",
+ "PartialC",
+ "<{ id: ",
+ "StringC",
+ "; filters: ",
+ "ArrayC",
+ "<",
+ "TypeC",
+ "<{ key: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"\">, ",
+ "KeyofC",
+ "<{ 'service.name': ",
+ "StringC",
+ "; 'service.environment': ",
+ "StringC",
+ "; 'transaction.name': ",
+ "StringC",
+ "; 'transaction.type': ",
+ "StringC",
+ "; }>]>; value: ",
+ "StringC",
+ "; }>>; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1930,23 +1889,23 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { agentName?: undefined; runtimeName?: undefined; } | { agentName: string | undefined; runtimeName: string | undefined; }, ",
+ ", void, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/transaction_types\": ",
+ ">; \"GET /internal/apm/settings/custom_links\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/transaction_types\", ",
- "TypeC",
- "<{ path: ",
- "TypeC",
- "<{ serviceName: ",
+ "<\"GET /internal/apm/settings/custom_links\", ",
+ "PartialC",
+ "<{ query: ",
+ "PartialC",
+ "<{ 'service.name': ",
"StringC",
- "; }>; query: ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>; }>, ",
+ "; 'service.environment': ",
+ "StringC",
+ "; 'transaction.name': ",
+ "StringC",
+ "; 'transaction.type': ",
+ "StringC",
+ "; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1954,31 +1913,25 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { transactionTypes: string[]; }, ",
+ ", { customLinks: ",
+ "CustomLink",
+ "[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\": ",
+ ">; \"GET /internal/apm/settings/custom_links/transaction\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\", ",
- "TypeC",
- "<{ path: ",
- "TypeC",
- "<{ serviceName: ",
+ "<\"GET /internal/apm/settings/custom_links/transaction\", ",
+ "PartialC",
+ "<{ query: ",
+ "PartialC",
+ "<{ 'service.name': ",
"StringC",
- "; serviceNodeName: ",
+ "; 'service.environment': ",
"StringC",
- "; }>; query: ",
- "IntersectionC",
- "<[",
- "TypeC",
- "<{ kuery: ",
+ "; 'transaction.name': ",
"StringC",
- "; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>]>; }>, ",
+ "; 'transaction.type': ",
+ "StringC",
+ "; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -1986,21 +1939,87 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { host: string | number; containerId: string | number; }, ",
+ ", ",
+ "Transaction",
+ ", ",
"APMRouteCreateOptions",
- ">; } & { \"GET /api/apm/services/{serviceName}/annotation/search\": ",
+ ">; \"POST /internal/apm/settings/apm-indices/save\": ",
"ServerRoute",
- "<\"GET /api/apm/services/{serviceName}/annotation/search\", ",
+ "<\"POST /internal/apm/settings/apm-indices/save\", ",
"TypeC",
- "<{ path: ",
+ "<{ body: ",
+ "PartialC",
+ "; }>, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", ",
+ "SavedObject",
+ "<{}>, ",
+ "APMRouteCreateOptions",
+ ">; \"GET /internal/apm/settings/apm-indices\": ",
+ "ServerRoute",
+ "<\"GET /internal/apm/settings/apm-indices\", undefined, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", ",
+ "ApmIndicesConfig",
+ ", ",
+ "APMRouteCreateOptions",
+ ">; \"GET /internal/apm/settings/apm-index-settings\": ",
+ "ServerRoute",
+ "<\"GET /internal/apm/settings/apm-index-settings\", undefined, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", { apmIndexSettings: { configurationName: \"error\" | \"span\" | \"metric\" | \"transaction\" | \"sourcemap\" | \"onboarding\"; defaultValue: string; savedValue: string | undefined; }[]; }, ",
+ "APMRouteCreateOptions",
+ ">; \"POST /internal/apm/settings/anomaly-detection/update_to_v3\": ",
+ "ServerRoute",
+ "<\"POST /internal/apm/settings/anomaly-detection/update_to_v3\", undefined, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", { update: boolean; }, ",
+ "APMRouteCreateOptions",
+ ">; \"GET /internal/apm/settings/anomaly-detection/environments\": ",
+ "ServerRoute",
+ "<\"GET /internal/apm/settings/anomaly-detection/environments\", undefined, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", { environments: string[]; }, ",
+ "APMRouteCreateOptions",
+ ">; \"POST /internal/apm/settings/anomaly-detection/jobs\": ",
+ "ServerRoute",
+ "<\"POST /internal/apm/settings/anomaly-detection/jobs\", ",
"TypeC",
- "<{ serviceName: ",
- "StringC",
- "; }>; query: ",
- "IntersectionC",
- "<[",
+ "<{ body: ",
"TypeC",
- "<{ environment: ",
+ "<{ environments: ",
+ "ArrayC",
+ "<",
"UnionC",
"<[",
"LiteralC",
@@ -2012,13 +2031,7 @@
"StringC",
", ",
"NonEmptyStringBrand",
- ">]>; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>]>; }>, ",
+ ">]>>; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2026,43 +2039,49 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { annotations: ",
- "Annotation",
- "[]; }, ",
+ ", { jobCreated: true; }, ",
"APMRouteCreateOptions",
- ">; } & { \"POST /api/apm/services/{serviceName}/annotation\": ",
+ ">; \"GET /internal/apm/settings/anomaly-detection/jobs\": ",
"ServerRoute",
- "<\"POST /api/apm/services/{serviceName}/annotation\", ",
+ "<\"GET /internal/apm/settings/anomaly-detection/jobs\", undefined, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", { jobs: ",
+ "ApmMlJob",
+ "[]; hasLegacyJobs: boolean; }, ",
+ "APMRouteCreateOptions",
+ ">; \"GET /api/apm/settings/agent-configuration/agent_name\": ",
+ "ServerRoute",
+ "<\"GET /api/apm/settings/agent-configuration/agent_name\", ",
"TypeC",
- "<{ path: ",
+ "<{ query: ",
"TypeC",
"<{ serviceName: ",
"StringC",
- "; }>; body: ",
- "IntersectionC",
- "<[",
- "TypeC",
- "<{ '@timestamp': ",
- "Type",
- "; service: ",
- "IntersectionC",
- "<[",
- "TypeC",
- "<{ version: ",
- "StringC",
- "; }>, ",
+ "; }>; }>, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", { agentName: string | undefined; }, ",
+ "APMRouteCreateOptions",
+ ">; \"GET /api/apm/settings/agent-configuration/environments\": ",
+ "ServerRoute",
+ "<\"GET /api/apm/settings/agent-configuration/environments\", ",
"PartialC",
- "<{ environment: ",
- "StringC",
- "; }>]>; }>, ",
+ "<{ query: ",
"PartialC",
- "<{ message: ",
- "StringC",
- "; tags: ",
- "ArrayC",
- "<",
+ "<{ serviceName: ",
"StringC",
- ">; }>]>; }>, ",
+ "; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2070,25 +2089,11 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", unknown, ",
+ ", { environments: { name: string; alreadyConfigured: boolean; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\": ",
+ ">; \"GET /api/apm/settings/agent-configuration/services\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\", ",
- "TypeC",
- "<{ path: ",
- "TypeC",
- "<{ serviceName: ",
- "StringC",
- "; serviceNodeName: ",
- "StringC",
- "; }>; query: ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>; }>, ",
+ "<\"GET /api/apm/settings/agent-configuration/services\", undefined, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2096,81 +2101,81 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { '@timestamp': string; agent: (",
- "Agent",
- " & { name: string; version: string; }) | ({ name: string; version: string; } & ",
- "Agent",
- "); service: ",
- "Service",
- " | (",
- "Service",
- " & { name: string; node?: { name: string; } | undefined; environment?: string | undefined; version?: string | undefined; }) | (",
- "Service",
- " & { node?: { name: string; } | undefined; }) | (",
- "Service",
- " & { name: string; node?: { name: string; } | undefined; environment?: string | undefined; version?: string | undefined; } & { node?: { name: string; } | undefined; }) | (",
- "Service",
- " & { node?: { name: string; } | undefined; } & { name: string; node?: { name: string; } | undefined; environment?: string | undefined; version?: string | undefined; }); container: ",
- "Container",
- " | undefined; kubernetes: ",
- "Kubernetes",
- " | undefined; host: ",
- "Host",
- " | undefined; cloud: ",
- "Cloud",
- " | undefined; }, ",
+ ", { serviceNames: string[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/throughput\": ",
+ ">; \"POST /api/apm/settings/agent-configuration/search\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/throughput\", ",
+ "<\"POST /api/apm/settings/agent-configuration/search\", ",
"TypeC",
- "<{ path: ",
+ "<{ body: ",
+ "IntersectionC",
+ "<[",
"TypeC",
- "<{ serviceName: ",
+ "<{ service: ",
+ "PartialC",
+ "<{ name: ",
"StringC",
- "; }>; query: ",
+ "; environment: ",
+ "StringC",
+ "; }>; }>, ",
+ "PartialC",
+ "<{ etag: ",
+ "StringC",
+ "; mark_as_applied_by_agent: ",
+ "BooleanC",
+ "; }>]>; }>, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", ",
+ "SearchHit",
+ "<",
+ "AgentConfiguration",
+ ", undefined, undefined> | null, ",
+ "APMRouteCreateOptions",
+ ">; \"PUT /api/apm/settings/agent-configuration\": ",
+ "ServerRoute",
+ "<\"PUT /api/apm/settings/agent-configuration\", ",
"IntersectionC",
"<[",
+ "PartialC",
+ "<{ query: ",
+ "PartialC",
+ "<{ overwrite: ",
+ "Type",
+ "; }>; }>, ",
"TypeC",
- "<{ transactionType: ",
+ "<{ body: ",
+ "IntersectionC",
+ "<[",
+ "PartialC",
+ "<{ agent_name: ",
"StringC",
"; }>, ",
+ "TypeC",
+ "<{ service: ",
"PartialC",
- "<{ transactionName: ",
+ "<{ name: ",
"StringC",
- "; }>, ",
+ "; environment: ",
+ "StringC",
+ "; }>; settings: ",
"IntersectionC",
"<[",
- "TypeC",
- "<{ environment: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<\"ENVIRONMENT_NOT_DEFINED\">, ",
- "LiteralC",
- "<\"ENVIRONMENT_ALL\">, ",
- "BrandC",
+ "RecordC",
"<",
"StringC",
", ",
- "NonEmptyStringBrand",
- ">]>; }>, ",
- "TypeC",
- "<{ kuery: ",
"StringC",
- "; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>, ",
+ ">, ",
"PartialC",
- "<{ comparisonStart: ",
- "Type",
- "; comparisonEnd: ",
- "Type",
- "; }>]>]>; }>, ",
+ ">]>; }>]>; }>]>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2178,45 +2183,87 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { currentPeriod: { x: number; y: number | null; }[]; previousPeriod: { x: number; y: ",
- "Maybe",
- "; }[]; }, ",
+ ", void, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\": ",
+ ">; \"DELETE /api/apm/settings/agent-configuration\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\", ",
+ "<\"DELETE /api/apm/settings/agent-configuration\", ",
"TypeC",
- "<{ path: ",
+ "<{ body: ",
"TypeC",
- "<{ serviceName: ",
+ "<{ service: ",
+ "PartialC",
+ "<{ name: ",
"StringC",
- "; }>; query: ",
+ "; environment: ",
+ "StringC",
+ "; }>; }>; }>, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", { result: string; }, ",
+ "APMRouteCreateOptions",
+ ">; \"GET /api/apm/settings/agent-configuration/view\": ",
+ "ServerRoute",
+ "<\"GET /api/apm/settings/agent-configuration/view\", ",
+ "PartialC",
+ "<{ query: ",
+ "PartialC",
+ "<{ name: ",
+ "StringC",
+ "; environment: ",
+ "StringC",
+ "; }>; }>, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", ",
+ "AgentConfiguration",
+ ", ",
+ "APMRouteCreateOptions",
+ ">; \"GET /api/apm/settings/agent-configuration\": ",
+ "ServerRoute",
+ "<\"GET /api/apm/settings/agent-configuration\", undefined, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", { configurations: ",
+ "AgentConfiguration",
+ "[]; }, ",
+ "APMRouteCreateOptions",
+ ">; \"GET /internal/apm/alerts/chart_preview/transaction_duration\": ",
+ "ServerRoute",
+ "<\"GET /internal/apm/alerts/chart_preview/transaction_duration\", ",
+ "TypeC",
+ "<{ query: ",
"IntersectionC",
"<[",
- "TypeC",
- "<{ latencyAggregationType: ",
+ "PartialC",
+ "<{ aggregationType: ",
"UnionC",
"<[",
"LiteralC",
- "<",
- "LatencyAggregationType",
- ".avg>, ",
+ "<\"avg\">, ",
"LiteralC",
- "<",
- "LatencyAggregationType",
- ".p95>, ",
+ "<\"95th\">, ",
"LiteralC",
- "<",
- "LatencyAggregationType",
- ".p99>]>; transactionType: ",
+ "<\"99th\">]>; serviceName: ",
+ "StringC",
+ "; transactionType: ",
"StringC",
"; }>, ",
- "PartialC",
- "<{ comparisonStart: ",
- "Type",
- "; comparisonEnd: ",
- "Type",
- "; }>, ",
"TypeC",
"<{ environment: ",
"UnionC",
@@ -2232,15 +2279,15 @@
"NonEmptyStringBrand",
">]>; }>, ",
"TypeC",
- "<{ kuery: ",
- "StringC",
- "; }>, ",
- "TypeC",
"<{ start: ",
"Type",
"; end: ",
"Type",
- "; }>]>; }>, ",
+ "; }>, ",
+ "TypeC",
+ "<{ interval: ",
+ "StringC",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2248,41 +2295,29 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { currentPeriod: { serviceNodeName: string; errorRate?: number | undefined; latency?: number | undefined; throughput?: number | undefined; cpuUsage?: number | null | undefined; memoryUsage?: number | null | undefined; }[]; previousPeriod: { serviceNodeName: string; errorRate?: number | undefined; latency?: number | undefined; throughput?: number | undefined; cpuUsage?: number | null | undefined; memoryUsage?: number | null | undefined; }[]; }, ",
+ ", { latencyChartPreview: { x: number; y: number | null; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\": ",
+ ">; \"GET /internal/apm/alerts/chart_preview/transaction_error_count\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\", ",
- "TypeC",
- "<{ path: ",
+ "<\"GET /internal/apm/alerts/chart_preview/transaction_error_count\", ",
"TypeC",
- "<{ serviceName: ",
- "StringC",
- "; }>; query: ",
+ "<{ query: ",
"IntersectionC",
"<[",
- "TypeC",
- "<{ latencyAggregationType: ",
+ "PartialC",
+ "<{ aggregationType: ",
"UnionC",
"<[",
"LiteralC",
- "<",
- "LatencyAggregationType",
- ".avg>, ",
+ "<\"avg\">, ",
"LiteralC",
- "<",
- "LatencyAggregationType",
- ".p95>, ",
+ "<\"95th\">, ",
"LiteralC",
- "<",
- "LatencyAggregationType",
- ".p99>]>; transactionType: ",
+ "<\"99th\">]>; serviceName: ",
"StringC",
- "; serviceNodeIds: ",
- "Type",
- "; numBuckets: ",
- "Type",
- "; }>, ",
+ "; transactionType: ",
+ "StringC",
+ "; }>, ",
"TypeC",
"<{ environment: ",
"UnionC",
@@ -2298,21 +2333,15 @@
"NonEmptyStringBrand",
">]>; }>, ",
"TypeC",
- "<{ kuery: ",
- "StringC",
- "; }>, ",
- "TypeC",
"<{ start: ",
"Type",
"; end: ",
"Type",
"; }>, ",
- "PartialC",
- "<{ comparisonStart: ",
- "Type",
- "; comparisonEnd: ",
- "Type",
- "; }>]>; }>, ",
+ "TypeC",
+ "<{ interval: ",
+ "StringC",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2320,43 +2349,29 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { currentPeriod: _.Dictionary<{ serviceNodeName: string; errorRate?: ",
- "Coordinate",
- "[] | undefined; latency?: ",
- "Coordinate",
- "[] | undefined; throughput?: ",
- "Coordinate",
- "[] | undefined; cpuUsage?: ",
- "Coordinate",
- "[] | undefined; memoryUsage?: ",
- "Coordinate",
- "[] | undefined; }>; previousPeriod: _.Dictionary<{ cpuUsage: { x: number; y: ",
- "Maybe",
- "; }[]; errorRate: { x: number; y: ",
- "Maybe",
- "; }[]; latency: { x: number; y: ",
- "Maybe",
- "; }[]; memoryUsage: { x: number; y: ",
- "Maybe",
- "; }[]; throughput: { x: number; y: ",
- "Maybe",
- "; }[]; serviceNodeName: string; }>; }, ",
+ ", { errorCountChartPreview: { x: number; y: number; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/dependencies\": ",
+ ">; \"GET /internal/apm/alerts/chart_preview/transaction_error_rate\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/dependencies\", ",
- "TypeC",
- "<{ path: ",
+ "<\"GET /internal/apm/alerts/chart_preview/transaction_error_rate\", ",
"TypeC",
- "<{ serviceName: ",
- "StringC",
- "; }>; query: ",
+ "<{ query: ",
"IntersectionC",
"<[",
- "TypeC",
- "<{ numBuckets: ",
- "Type",
- "; }>, ",
+ "PartialC",
+ "<{ aggregationType: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"avg\">, ",
+ "LiteralC",
+ "<\"95th\">, ",
+ "LiteralC",
+ "<\"99th\">]>; serviceName: ",
+ "StringC",
+ "; transactionType: ",
+ "StringC",
+ "; }>, ",
"TypeC",
"<{ environment: ",
"UnionC",
@@ -2377,8 +2392,8 @@
"; end: ",
"Type",
"; }>, ",
- "PartialC",
- "<{ offset: ",
+ "TypeC",
+ "<{ interval: ",
"StringC",
"; }>]>; }>, ",
{
@@ -2388,29 +2403,11 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { serviceDependencies: { currentStats: { latency: { value: number | null; timeseries: ",
- "Coordinate",
- "[]; }; throughput: { value: number | null; timeseries: ",
- "Coordinate",
- "[]; }; errorRate: { value: number | null; timeseries: ",
- "Coordinate",
- "[]; }; totalTime: { value: number | null; timeseries: ",
- "Coordinate",
- "[]; }; } & { impact: number; }; previousStats: ({ latency: { value: number | null; timeseries: ",
- "Coordinate",
- "[]; }; throughput: { value: number | null; timeseries: ",
- "Coordinate",
- "[]; }; errorRate: { value: number | null; timeseries: ",
- "Coordinate",
- "[]; }; totalTime: { value: number | null; timeseries: ",
- "Coordinate",
- "[]; }; } & { impact: number; }) | null; location: ",
- "Node",
- "; }[]; }, ",
+ ", { errorRateChartPreview: { x: number; y: number; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/dependencies/breakdown\", ",
+ "<\"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\", ",
"TypeC",
"<{ path: ",
"TypeC",
@@ -2420,6 +2417,16 @@
"IntersectionC",
"<[",
"TypeC",
+ "<{ transactionType: ",
+ "StringC",
+ "; }>, ",
+ "PartialC",
+ "<{ transactionName: ",
+ "StringC",
+ "; }>, ",
+ "IntersectionC",
+ "<[",
+ "TypeC",
"<{ environment: ",
"UnionC",
"<[",
@@ -2434,15 +2441,21 @@
"NonEmptyStringBrand",
">]>; }>, ",
"TypeC",
+ "<{ kuery: ",
+ "StringC",
+ "; }>, ",
+ "TypeC",
"<{ start: ",
"Type",
"; end: ",
"Type",
"; }>, ",
- "TypeC",
- "<{ kuery: ",
- "StringC",
- "; }>]>; }>, ",
+ "PartialC",
+ "<{ comparisonStart: ",
+ "Type",
+ "; comparisonEnd: ",
+ "Type",
+ "; }>]>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2450,11 +2463,17 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { breakdown: { title: string; data: { x: number; y: number; }[]; }[]; }, ",
+ ", { currentPeriod: { timeseries: ",
+ "Coordinate",
+ "[]; average: number | null; }; previousPeriod: { timeseries: { x: number; y: ",
+ "Maybe",
+ "; }[]; average: number | null; } | { timeseries: { x: number; y: ",
+ "Maybe",
+ "; }[]; average: null; }; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/profiling/timeline\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/profiling/timeline\", ",
+ "<\"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\", ",
"TypeC",
"<{ path: ",
"TypeC",
@@ -2464,6 +2483,14 @@
"IntersectionC",
"<[",
"TypeC",
+ "<{ transactionType: ",
+ "StringC",
+ "; }>, ",
+ "PartialC",
+ "<{ transactionName: ",
+ "StringC",
+ "; }>, ",
+ "TypeC",
"<{ environment: ",
"UnionC",
"<[",
@@ -2494,11 +2521,11 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { profilingTimeline: { x: number; valueTypes: { wall_time: number; cpu_time: number; samples: number; alloc_objects: number; alloc_space: number; inuse_objects: number; inuse_space: number; unknown: number; }; }[]; }, ",
+ ", { timeseries: { title: string; color: string; type: string; data: { x: number; y: number | null; }[]; hideLegend: boolean; legendValue: string; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/profiling/statistics\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/profiling/statistics\", ",
+ "<\"GET /internal/apm/services/{serviceName}/transactions/traces/samples\", ",
"TypeC",
"<{ path: ",
"TypeC",
@@ -2508,6 +2535,22 @@
"IntersectionC",
"<[",
"TypeC",
+ "<{ transactionType: ",
+ "StringC",
+ "; transactionName: ",
+ "StringC",
+ "; }>, ",
+ "PartialC",
+ "<{ transactionId: ",
+ "StringC",
+ "; traceId: ",
+ "StringC",
+ "; sampleRangeFrom: ",
+ "Type",
+ "; sampleRangeTo: ",
+ "Type",
+ "; }>, ",
+ "TypeC",
"<{ environment: ",
"UnionC",
"<[",
@@ -2530,39 +2573,7 @@
"Type",
"; end: ",
"Type",
- "; }>, ",
- "TypeC",
- "<{ valueType: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<",
- "ProfilingValueType",
- ".wallTime>, ",
- "LiteralC",
- "<",
- "ProfilingValueType",
- ".cpuTime>, ",
- "LiteralC",
- "<",
- "ProfilingValueType",
- ".samples>, ",
- "LiteralC",
- "<",
- "ProfilingValueType",
- ".allocObjects>, ",
- "LiteralC",
- "<",
- "ProfilingValueType",
- ".allocSpace>, ",
- "LiteralC",
- "<",
- "ProfilingValueType",
- ".inuseObjects>, ",
- "LiteralC",
- "<",
- "ProfilingValueType",
- ".inuseSpace>]>; }>]>; }>, ",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2570,13 +2581,11 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { nodes: Record; rootNodes: string[]; }, ",
+ ", { traceSamples: { transactionId: string; traceId: string; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/alerts\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/alerts\", ",
+ "<\"GET /internal/apm/services/{serviceName}/transactions/charts/latency\", ",
"TypeC",
"<{ path: ",
"TypeC",
@@ -2586,11 +2595,29 @@
"IntersectionC",
"<[",
"TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>, ",
+ "<{ transactionType: ",
+ "StringC",
+ "; latencyAggregationType: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<",
+ "LatencyAggregationType",
+ ".avg>, ",
+ "LiteralC",
+ "<",
+ "LatencyAggregationType",
+ ".p95>, ",
+ "LiteralC",
+ "<",
+ "LatencyAggregationType",
+ ".p99>]>; }>, ",
+ "PartialC",
+ "<{ transactionName: ",
+ "StringC",
+ "; }>, ",
+ "IntersectionC",
+ "<[",
"TypeC",
"<{ environment: ",
"UnionC",
@@ -2606,9 +2633,21 @@
"NonEmptyStringBrand",
">]>; }>, ",
"TypeC",
- "<{ transactionType: ",
+ "<{ kuery: ",
"StringC",
- "; }>]>; }>, ",
+ "; }>, ",
+ "TypeC",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>, ",
+ "PartialC",
+ "<{ comparisonStart: ",
+ "Type",
+ "; comparisonEnd: ",
+ "Type",
+ "; }>]>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2616,11 +2655,15 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { alerts: Partial>[]; }, ",
+ ", { currentPeriod: { overallAvgDuration: number | null; latencyTimeseries: { x: number; y: number | null; }[]; }; previousPeriod: { latencyTimeseries: { x: number; y: ",
+ "Maybe",
+ "; }[]; overallAvgDuration: number | null; } | { latencyTimeseries: { x: number; y: ",
+ "Maybe",
+ "; }[]; overallAvgDuration: null; }; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/infrastructure\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/infrastructure\", ",
+ "<\"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\", ",
"TypeC",
"<{ path: ",
"TypeC",
@@ -2630,16 +2673,6 @@
"IntersectionC",
"<[",
"TypeC",
- "<{ kuery: ",
- "StringC",
- "; }>, ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>, ",
- "TypeC",
"<{ environment: ",
"UnionC",
"<[",
@@ -2652,37 +2685,45 @@
"StringC",
", ",
"NonEmptyStringBrand",
- ">]>; }>]>; }>, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { serviceInfrastructure: { containerIds: string[]; hostNames: string[]; }; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/anomaly_charts\": ",
- "ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/anomaly_charts\", ",
- "TypeC",
- "<{ path: ",
+ ">]>; }>, ",
"TypeC",
- "<{ serviceName: ",
+ "<{ kuery: ",
"StringC",
- "; }>; query: ",
- "IntersectionC",
- "<[",
+ "; }>, ",
"TypeC",
"<{ start: ",
"Type",
"; end: ",
"Type",
"; }>, ",
+ "PartialC",
+ "<{ comparisonStart: ",
+ "Type",
+ "; comparisonEnd: ",
+ "Type",
+ "; }>, ",
"TypeC",
- "<{ transactionType: ",
- "StringC",
- "; }>]>; }>, ",
+ "<{ transactionNames: ",
+ "Type",
+ "; numBuckets: ",
+ "Type",
+ "; transactionType: ",
+ "StringC",
+ "; latencyAggregationType: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<",
+ "LatencyAggregationType",
+ ".avg>, ",
+ "LiteralC",
+ "<",
+ "LatencyAggregationType",
+ ".p95>, ",
+ "LiteralC",
+ "<",
+ "LatencyAggregationType",
+ ".p99>]>; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2690,19 +2731,89 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { allAnomalyTimeseries: ",
- "ServiceAnomalyTimeseries",
- "[]; }, ",
+ ", { currentPeriod: _.Dictionary<{ transactionName: string; latency: ",
+ "Coordinate",
+ "[]; throughput: ",
+ "Coordinate",
+ "[]; errorRate: ",
+ "Coordinate",
+ "[]; impact: number; }>; previousPeriod: _.Dictionary<{ errorRate: { x: number; y: ",
+ "Maybe",
+ "; }[]; throughput: { x: number; y: ",
+ "Maybe",
+ "; }[]; latency: { x: number; y: ",
+ "Maybe",
+ "; }[]; transactionName: string; impact: number; }>; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/suggestions\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\": ",
"ServerRoute",
- "<\"GET /internal/apm/suggestions\", ",
- "PartialC",
- "<{ query: ",
+ "<\"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\", ",
"TypeC",
- "<{ field: ",
+ "<{ path: ",
+ "TypeC",
+ "<{ serviceName: ",
"StringC",
- "; string: ",
+ "; }>; query: ",
+ "IntersectionC",
+ "<[",
+ "TypeC",
+ "<{ environment: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"ENVIRONMENT_NOT_DEFINED\">, ",
+ "LiteralC",
+ "<\"ENVIRONMENT_ALL\">, ",
+ "BrandC",
+ "<",
+ "StringC",
+ ", ",
+ "NonEmptyStringBrand",
+ ">]>; }>, ",
+ "TypeC",
+ "<{ kuery: ",
+ "StringC",
+ "; }>, ",
+ "TypeC",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>, ",
+ "TypeC",
+ "<{ transactionType: ",
+ "StringC",
+ "; latencyAggregationType: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<",
+ "LatencyAggregationType",
+ ".avg>, ",
+ "LiteralC",
+ "<",
+ "LatencyAggregationType",
+ ".p95>, ",
+ "LiteralC",
+ "<",
+ "LatencyAggregationType",
+ ".p99>]>; }>]>; }>, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", { transactionGroups: { transactionType: string; name: string; latency: number | null; throughput: number; errorRate: number; impact: number; }[]; isAggregationAccurate: boolean; bucketSize: number; }, ",
+ "APMRouteCreateOptions",
+ ">; \"GET /internal/apm/transactions/{transactionId}\": ",
+ "ServerRoute",
+ "<\"GET /internal/apm/transactions/{transactionId}\", ",
+ "TypeC",
+ "<{ path: ",
+ "TypeC",
+ "<{ transactionId: ",
"StringC",
"; }>; }>, ",
{
@@ -2712,23 +2823,19 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { terms: string[]; }, ",
+ ", { transaction: ",
+ "Transaction",
+ "; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/traces/{traceId}\": ",
+ ">; \"GET /internal/apm/traces/{traceId}/root_transaction\": ",
"ServerRoute",
- "<\"GET /internal/apm/traces/{traceId}\", ",
+ "<\"GET /internal/apm/traces/{traceId}/root_transaction\", ",
"TypeC",
"<{ path: ",
"TypeC",
"<{ traceId: ",
"StringC",
- "; }>; query: ",
- "TypeC",
- "<{ start: ",
- "Type",
- "; end: ",
- "Type",
- "; }>; }>, ",
+ "; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2736,15 +2843,11 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { exceedsMax: boolean; traceDocs: (",
+ ", { transaction: ",
"Transaction",
- " | ",
- "Span",
- ")[]; errorDocs: ",
- "APMError",
- "[]; }, ",
+ "; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/traces\": ",
+ ">; \"GET /internal/apm/traces\": ",
"ServerRoute",
"<\"GET /internal/apm/traces\", ",
"TypeC",
@@ -2788,15 +2891,21 @@
"AgentName",
"; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/traces/{traceId}/root_transaction\": ",
+ ">; \"GET /internal/apm/traces/{traceId}\": ",
"ServerRoute",
- "<\"GET /internal/apm/traces/{traceId}/root_transaction\", ",
+ "<\"GET /internal/apm/traces/{traceId}\", ",
"TypeC",
"<{ path: ",
"TypeC",
"<{ traceId: ",
"StringC",
- "; }>; }>, ",
+ "; }>; query: ",
+ "TypeC",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2804,19 +2913,55 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { transaction: ",
+ ", { exceedsMax: boolean; traceDocs: (",
"Transaction",
- "; }, ",
+ " | ",
+ "Span",
+ ")[]; errorDocs: ",
+ "APMError",
+ "[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/transactions/{transactionId}\": ",
+ ">; \"GET /internal/apm/suggestions\": ",
"ServerRoute",
- "<\"GET /internal/apm/transactions/{transactionId}\", ",
+ "<\"GET /internal/apm/suggestions\", ",
+ "PartialC",
+ "<{ query: ",
+ "TypeC",
+ "<{ field: ",
+ "StringC",
+ "; string: ",
+ "StringC",
+ "; }>; }>, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", { terms: string[]; }, ",
+ "APMRouteCreateOptions",
+ ">; \"GET /internal/apm/services/{serviceName}/anomaly_charts\": ",
+ "ServerRoute",
+ "<\"GET /internal/apm/services/{serviceName}/anomaly_charts\", ",
"TypeC",
"<{ path: ",
"TypeC",
- "<{ transactionId: ",
+ "<{ serviceName: ",
"StringC",
- "; }>; }>, ",
+ "; }>; query: ",
+ "IntersectionC",
+ "<[",
+ "TypeC",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>, ",
+ "TypeC",
+ "<{ transactionType: ",
+ "StringC",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2824,13 +2969,13 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { transaction: ",
- "Transaction",
- "; }, ",
+ ", { allAnomalyTimeseries: ",
+ "ServiceAnomalyTimeseries",
+ "[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/infrastructure\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\", ",
+ "<\"GET /internal/apm/services/{serviceName}/infrastructure\", ",
"TypeC",
"<{ path: ",
"TypeC",
@@ -2840,6 +2985,16 @@
"IntersectionC",
"<[",
"TypeC",
+ "<{ kuery: ",
+ "StringC",
+ "; }>, ",
+ "TypeC",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>, ",
+ "TypeC",
"<{ environment: ",
"UnionC",
"<[",
@@ -2852,11 +3007,27 @@
"StringC",
", ",
"NonEmptyStringBrand",
- ">]>; }>, ",
+ ">]>; }>]>; }>, ",
+ {
+ "pluginId": "apm",
+ "scope": "server",
+ "docId": "kibApmPluginApi",
+ "section": "def-server.APMRouteHandlerResources",
+ "text": "APMRouteHandlerResources"
+ },
+ ", { serviceInfrastructure: { containerIds: string[]; hostNames: string[]; }; }, ",
+ "APMRouteCreateOptions",
+ ">; \"GET /internal/apm/services/{serviceName}/alerts\": ",
+ "ServerRoute",
+ "<\"GET /internal/apm/services/{serviceName}/alerts\", ",
"TypeC",
- "<{ kuery: ",
+ "<{ path: ",
+ "TypeC",
+ "<{ serviceName: ",
"StringC",
- "; }>, ",
+ "; }>; query: ",
+ "IntersectionC",
+ "<[",
"TypeC",
"<{ start: ",
"Type",
@@ -2864,23 +3035,23 @@
"Type",
"; }>, ",
"TypeC",
- "<{ transactionType: ",
- "StringC",
- "; latencyAggregationType: ",
+ "<{ environment: ",
"UnionC",
"<[",
"LiteralC",
- "<",
- "LatencyAggregationType",
- ".avg>, ",
- "LiteralC",
- "<",
- "LatencyAggregationType",
- ".p95>, ",
+ "<\"ENVIRONMENT_NOT_DEFINED\">, ",
"LiteralC",
+ "<\"ENVIRONMENT_ALL\">, ",
+ "BrandC",
"<",
- "LatencyAggregationType",
- ".p99>]>; }>]>; }>, ",
+ "StringC",
+ ", ",
+ "NonEmptyStringBrand",
+ ">]>; }>, ",
+ "TypeC",
+ "<{ transactionType: ",
+ "StringC",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2888,11 +3059,11 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { transactionGroups: { transactionType: string; name: string; latency: number | null; throughput: number; errorRate: number; impact: number; }[]; isAggregationAccurate: boolean; bucketSize: number; }, ",
+ ", { alerts: Partial>[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/profiling/statistics\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\", ",
+ "<\"GET /internal/apm/services/{serviceName}/profiling/statistics\", ",
"TypeC",
"<{ path: ",
"TypeC",
@@ -2925,34 +3096,38 @@
"; end: ",
"Type",
"; }>, ",
- "PartialC",
- "<{ comparisonStart: ",
- "Type",
- "; comparisonEnd: ",
- "Type",
- "; }>, ",
"TypeC",
- "<{ transactionNames: ",
- "Type",
- "; numBuckets: ",
- "Type",
- "; transactionType: ",
- "StringC",
- "; latencyAggregationType: ",
+ "<{ valueType: ",
"UnionC",
"<[",
"LiteralC",
"<",
- "LatencyAggregationType",
- ".avg>, ",
+ "ProfilingValueType",
+ ".wallTime>, ",
"LiteralC",
"<",
- "LatencyAggregationType",
- ".p95>, ",
+ "ProfilingValueType",
+ ".cpuTime>, ",
"LiteralC",
"<",
- "LatencyAggregationType",
- ".p99>]>; }>]>; }>, ",
+ "ProfilingValueType",
+ ".samples>, ",
+ "LiteralC",
+ "<",
+ "ProfilingValueType",
+ ".allocObjects>, ",
+ "LiteralC",
+ "<",
+ "ProfilingValueType",
+ ".allocSpace>, ",
+ "LiteralC",
+ "<",
+ "ProfilingValueType",
+ ".inuseObjects>, ",
+ "LiteralC",
+ "<",
+ "ProfilingValueType",
+ ".inuseSpace>]>; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -2960,23 +3135,13 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { currentPeriod: _.Dictionary<{ transactionName: string; latency: ",
- "Coordinate",
- "[]; throughput: ",
- "Coordinate",
- "[]; errorRate: ",
- "Coordinate",
- "[]; impact: number; }>; previousPeriod: _.Dictionary<{ errorRate: { x: number; y: ",
- "Maybe",
- "; }[]; throughput: { x: number; y: ",
- "Maybe",
- "; }[]; latency: { x: number; y: ",
- "Maybe",
- "; }[]; transactionName: string; impact: number; }>; }, ",
+ ", { nodes: Record; rootNodes: string[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/profiling/timeline\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/transactions/charts/latency\", ",
+ "<\"GET /internal/apm/services/{serviceName}/profiling/timeline\", ",
"TypeC",
"<{ path: ",
"TypeC",
@@ -2986,30 +3151,6 @@
"IntersectionC",
"<[",
"TypeC",
- "<{ transactionType: ",
- "StringC",
- "; latencyAggregationType: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<",
- "LatencyAggregationType",
- ".avg>, ",
- "LiteralC",
- "<",
- "LatencyAggregationType",
- ".p95>, ",
- "LiteralC",
- "<",
- "LatencyAggregationType",
- ".p99>]>; }>, ",
- "PartialC",
- "<{ transactionName: ",
- "StringC",
- "; }>, ",
- "IntersectionC",
- "<[",
- "TypeC",
"<{ environment: ",
"UnionC",
"<[",
@@ -3032,13 +3173,7 @@
"Type",
"; end: ",
"Type",
- "; }>, ",
- "PartialC",
- "<{ comparisonStart: ",
- "Type",
- "; comparisonEnd: ",
- "Type",
- "; }>]>]>; }>, ",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3046,13 +3181,11 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { currentPeriod: { overallAvgDuration: number | null; latencyTimeseries: { x: number; y: number | null; }[]; }; previousPeriod: { latencyTimeseries: { x: number; y: ",
- "Maybe",
- "; }[]; overallAvgDuration: number | null; }; }, ",
+ ", { profilingTimeline: { x: number; valueTypes: { wall_time: number; cpu_time: number; samples: number; alloc_objects: number; alloc_space: number; inuse_objects: number; inuse_space: number; unknown: number; }; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/transactions/traces/samples\", ",
+ "<\"GET /internal/apm/services/{serviceName}/dependencies/breakdown\", ",
"TypeC",
"<{ path: ",
"TypeC",
@@ -3062,22 +3195,6 @@
"IntersectionC",
"<[",
"TypeC",
- "<{ transactionType: ",
- "StringC",
- "; transactionName: ",
- "StringC",
- "; }>, ",
- "PartialC",
- "<{ transactionId: ",
- "StringC",
- "; traceId: ",
- "StringC",
- "; sampleRangeFrom: ",
- "Type",
- "; sampleRangeTo: ",
- "Type",
- "; }>, ",
- "TypeC",
"<{ environment: ",
"UnionC",
"<[",
@@ -3092,15 +3209,15 @@
"NonEmptyStringBrand",
">]>; }>, ",
"TypeC",
- "<{ kuery: ",
- "StringC",
- "; }>, ",
- "TypeC",
"<{ start: ",
"Type",
"; end: ",
"Type",
- "; }>]>; }>, ",
+ "; }>, ",
+ "TypeC",
+ "<{ kuery: ",
+ "StringC",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3108,11 +3225,11 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { traceSamples: { transactionId: string; traceId: string; }[]; }, ",
+ ", { breakdown: { title: string; data: { x: number; y: number; }[]; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/dependencies\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\", ",
+ "<\"GET /internal/apm/services/{serviceName}/dependencies\", ",
"TypeC",
"<{ path: ",
"TypeC",
@@ -3122,13 +3239,9 @@
"IntersectionC",
"<[",
"TypeC",
- "<{ transactionType: ",
- "StringC",
- "; }>, ",
- "PartialC",
- "<{ transactionName: ",
- "StringC",
- "; }>, ",
+ "<{ numBuckets: ",
+ "Type",
+ "; }>, ",
"TypeC",
"<{ environment: ",
"UnionC",
@@ -3144,15 +3257,15 @@
"NonEmptyStringBrand",
">]>; }>, ",
"TypeC",
- "<{ kuery: ",
- "StringC",
- "; }>, ",
- "TypeC",
"<{ start: ",
"Type",
"; end: ",
"Type",
- "; }>]>; }>, ",
+ "; }>, ",
+ "PartialC",
+ "<{ offset: ",
+ "StringC",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3160,11 +3273,29 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { timeseries: { title: string; color: string; type: string; data: { x: number; y: number | null; }[]; hideLegend: boolean; legendValue: string; }[]; }, ",
+ ", { serviceDependencies: { currentStats: { latency: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; throughput: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; errorRate: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; totalTime: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; } & { impact: number; }; previousStats: ({ latency: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; throughput: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; errorRate: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; totalTime: { value: number | null; timeseries: ",
+ "Coordinate",
+ "[]; }; } & { impact: number; }) | null; location: ",
+ "Node",
+ "; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\": ",
"ServerRoute",
- "<\"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\", ",
+ "<\"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\", ",
"TypeC",
"<{ path: ",
"TypeC",
@@ -3174,15 +3305,27 @@
"IntersectionC",
"<[",
"TypeC",
- "<{ transactionType: ",
- "StringC",
- "; }>, ",
- "PartialC",
- "<{ transactionName: ",
- "StringC",
- "; }>, ",
- "IntersectionC",
+ "<{ latencyAggregationType: ",
+ "UnionC",
"<[",
+ "LiteralC",
+ "<",
+ "LatencyAggregationType",
+ ".avg>, ",
+ "LiteralC",
+ "<",
+ "LatencyAggregationType",
+ ".p95>, ",
+ "LiteralC",
+ "<",
+ "LatencyAggregationType",
+ ".p99>]>; transactionType: ",
+ "StringC",
+ "; serviceNodeIds: ",
+ "Type",
+ "; numBuckets: ",
+ "Type",
+ "; }>, ",
"TypeC",
"<{ environment: ",
"UnionC",
@@ -3212,7 +3355,7 @@
"Type",
"; comparisonEnd: ",
"Type",
- "; }>]>]>; }>, ",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3220,33 +3363,63 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { currentPeriod: { timeseries: ",
+ ", { currentPeriod: _.Dictionary<{ serviceNodeName: string; errorRate?: ",
"Coordinate",
- "[]; average: number | null; }; previousPeriod: { timeseries: { x: number; y: ",
+ "[] | undefined; latency?: ",
+ "Coordinate",
+ "[] | undefined; throughput?: ",
+ "Coordinate",
+ "[] | undefined; cpuUsage?: ",
+ "Coordinate",
+ "[] | undefined; memoryUsage?: ",
+ "Coordinate",
+ "[] | undefined; }>; previousPeriod: _.Dictionary<{ cpuUsage: { x: number; y: ",
+ "Maybe",
+ "; }[]; errorRate: { x: number; y: ",
+ "Maybe",
+ "; }[]; latency: { x: number; y: ",
+ "Maybe",
+ "; }[]; memoryUsage: { x: number; y: ",
+ "Maybe",
+ "; }[]; throughput: { x: number; y: ",
"Maybe",
- "; }[]; average: number | null; }; }, ",
+ "; }[]; serviceNodeName: string; }>; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/alerts/chart_preview/transaction_error_rate\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\": ",
"ServerRoute",
- "<\"GET /internal/apm/alerts/chart_preview/transaction_error_rate\", ",
+ "<\"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\", ",
"TypeC",
- "<{ query: ",
+ "<{ path: ",
+ "TypeC",
+ "<{ serviceName: ",
+ "StringC",
+ "; }>; query: ",
"IntersectionC",
"<[",
- "PartialC",
- "<{ aggregationType: ",
+ "TypeC",
+ "<{ latencyAggregationType: ",
"UnionC",
"<[",
"LiteralC",
- "<\"avg\">, ",
+ "<",
+ "LatencyAggregationType",
+ ".avg>, ",
"LiteralC",
- "<\"95th\">, ",
+ "<",
+ "LatencyAggregationType",
+ ".p95>, ",
"LiteralC",
- "<\"99th\">]>; serviceName: ",
- "StringC",
- "; transactionType: ",
+ "<",
+ "LatencyAggregationType",
+ ".p99>]>; transactionType: ",
"StringC",
"; }>, ",
+ "PartialC",
+ "<{ comparisonStart: ",
+ "Type",
+ "; comparisonEnd: ",
+ "Type",
+ "; }>, ",
"TypeC",
"<{ environment: ",
"UnionC",
@@ -3262,15 +3435,15 @@
"NonEmptyStringBrand",
">]>; }>, ",
"TypeC",
+ "<{ kuery: ",
+ "StringC",
+ "; }>, ",
+ "TypeC",
"<{ start: ",
"Type",
"; end: ",
"Type",
- "; }>, ",
- "TypeC",
- "<{ interval: ",
- "StringC",
- "; }>]>; }>, ",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3278,29 +3451,29 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { errorRateChartPreview: { x: number; y: number; }[]; }, ",
+ ", { currentPeriod: { serviceNodeName: string; errorRate?: number | undefined; latency?: number | undefined; throughput?: number | undefined; cpuUsage?: number | null | undefined; memoryUsage?: number | null | undefined; }[]; previousPeriod: { serviceNodeName: string; errorRate?: number | undefined; latency?: number | undefined; throughput?: number | undefined; cpuUsage?: number | null | undefined; memoryUsage?: number | null | undefined; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/alerts/chart_preview/transaction_duration\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/throughput\": ",
"ServerRoute",
- "<\"GET /internal/apm/alerts/chart_preview/transaction_duration\", ",
+ "<\"GET /internal/apm/services/{serviceName}/throughput\", ",
"TypeC",
- "<{ query: ",
+ "<{ path: ",
+ "TypeC",
+ "<{ serviceName: ",
+ "StringC",
+ "; }>; query: ",
"IntersectionC",
"<[",
- "PartialC",
- "<{ aggregationType: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<\"avg\">, ",
- "LiteralC",
- "<\"95th\">, ",
- "LiteralC",
- "<\"99th\">]>; serviceName: ",
+ "TypeC",
+ "<{ transactionType: ",
"StringC",
- "; transactionType: ",
+ "; }>, ",
+ "PartialC",
+ "<{ transactionName: ",
"StringC",
"; }>, ",
+ "IntersectionC",
+ "<[",
"TypeC",
"<{ environment: ",
"UnionC",
@@ -3316,15 +3489,21 @@
"NonEmptyStringBrand",
">]>; }>, ",
"TypeC",
+ "<{ kuery: ",
+ "StringC",
+ "; }>, ",
+ "TypeC",
"<{ start: ",
"Type",
"; end: ",
"Type",
"; }>, ",
- "TypeC",
- "<{ interval: ",
- "StringC",
- "; }>]>; }>, ",
+ "PartialC",
+ "<{ comparisonStart: ",
+ "Type",
+ "; comparisonEnd: ",
+ "Type",
+ "; }>]>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3332,87 +3511,27 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { latencyChartPreview: { x: number; y: number | null; }[]; }, ",
+ ", { currentPeriod: { x: number; y: number | null; }[]; previousPeriod: { x: number; y: ",
+ "Maybe",
+ "; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/alerts/chart_preview/transaction_error_count\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\": ",
"ServerRoute",
- "<\"GET /internal/apm/alerts/chart_preview/transaction_error_count\", ",
+ "<\"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\", ",
"TypeC",
- "<{ query: ",
- "IntersectionC",
- "<[",
- "PartialC",
- "<{ aggregationType: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<\"avg\">, ",
- "LiteralC",
- "<\"95th\">, ",
- "LiteralC",
- "<\"99th\">]>; serviceName: ",
- "StringC",
- "; transactionType: ",
- "StringC",
- "; }>, ",
+ "<{ path: ",
"TypeC",
- "<{ environment: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<\"ENVIRONMENT_NOT_DEFINED\">, ",
- "LiteralC",
- "<\"ENVIRONMENT_ALL\">, ",
- "BrandC",
- "<",
+ "<{ serviceName: ",
"StringC",
- ", ",
- "NonEmptyStringBrand",
- ">]>; }>, ",
+ "; serviceNodeName: ",
+ "StringC",
+ "; }>; query: ",
"TypeC",
"<{ start: ",
"Type",
"; end: ",
"Type",
- "; }>, ",
- "TypeC",
- "<{ interval: ",
- "StringC",
- "; }>]>; }>, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { errorCountChartPreview: { x: number; y: number; }[]; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"GET /api/apm/settings/agent-configuration\": ",
- "ServerRoute",
- "<\"GET /api/apm/settings/agent-configuration\", undefined, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { configurations: ",
- "AgentConfiguration",
- "[]; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"GET /api/apm/settings/agent-configuration/view\": ",
- "ServerRoute",
- "<\"GET /api/apm/settings/agent-configuration/view\", ",
- "PartialC",
- "<{ query: ",
- "PartialC",
- "<{ name: ",
- "StringC",
- "; environment: ",
- "StringC",
- "; }>; }>, ",
+ "; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3420,135 +3539,63 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", ",
- "AgentConfiguration",
- ", ",
+ ", { '@timestamp': string; agent: (",
+ "Agent",
+ " & { name: string; version: string; }) | ({ name: string; version: string; } & ",
+ "Agent",
+ "); service: ",
+ "Service",
+ " | (",
+ "Service",
+ " & { name: string; node?: { name: string; } | undefined; environment?: string | undefined; version?: string | undefined; }) | (",
+ "Service",
+ " & { node?: { name: string; } | undefined; }) | (",
+ "Service",
+ " & { name: string; node?: { name: string; } | undefined; environment?: string | undefined; version?: string | undefined; } & { node?: { name: string; } | undefined; }) | (",
+ "Service",
+ " & { node?: { name: string; } | undefined; } & { name: string; node?: { name: string; } | undefined; environment?: string | undefined; version?: string | undefined; }); container: ",
+ "Container",
+ " | undefined; kubernetes: ",
+ "Kubernetes",
+ " | undefined; host: ",
+ "Host",
+ " | undefined; cloud: ",
+ "Cloud",
+ " | undefined; }, ",
"APMRouteCreateOptions",
- ">; } & { \"DELETE /api/apm/settings/agent-configuration\": ",
+ ">; \"POST /api/apm/services/{serviceName}/annotation\": ",
"ServerRoute",
- "<\"DELETE /api/apm/settings/agent-configuration\", ",
+ "<\"POST /api/apm/services/{serviceName}/annotation\", ",
"TypeC",
- "<{ body: ",
+ "<{ path: ",
"TypeC",
- "<{ service: ",
- "PartialC",
- "<{ name: ",
- "StringC",
- "; environment: ",
+ "<{ serviceName: ",
"StringC",
- "; }>; }>; }>, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { result: string; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"PUT /api/apm/settings/agent-configuration\": ",
- "ServerRoute",
- "<\"PUT /api/apm/settings/agent-configuration\", ",
+ "; }>; body: ",
"IntersectionC",
"<[",
- "PartialC",
- "<{ query: ",
- "PartialC",
- "<{ overwrite: ",
- "Type",
- "; }>; }>, ",
"TypeC",
- "<{ body: ",
+ "<{ '@timestamp': ",
+ "Type",
+ "; service: ",
"IntersectionC",
"<[",
- "PartialC",
- "<{ agent_name: ",
- "StringC",
- "; }>, ",
"TypeC",
- "<{ service: ",
- "PartialC",
- "<{ name: ",
- "StringC",
- "; environment: ",
- "StringC",
- "; }>; settings: ",
- "IntersectionC",
- "<[",
- "RecordC",
- "<",
- "StringC",
- ", ",
+ "<{ version: ",
"StringC",
- ">, ",
- "PartialC",
- ">]>; }>]>; }>]>, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", void, ",
- "APMRouteCreateOptions",
- ">; } & { \"POST /api/apm/settings/agent-configuration/search\": ",
- "ServerRoute",
- "<\"POST /api/apm/settings/agent-configuration/search\", ",
- "TypeC",
- "<{ body: ",
- "IntersectionC",
- "<[",
- "TypeC",
- "<{ service: ",
+ "; }>, ",
"PartialC",
- "<{ name: ",
- "StringC",
- "; environment: ",
+ "<{ environment: ",
"StringC",
- "; }>; }>, ",
+ "; }>]>; }>, ",
"PartialC",
- "<{ etag: ",
+ "<{ message: ",
"StringC",
- "; mark_as_applied_by_agent: ",
- "BooleanC",
- "; }>]>; }>, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", ",
- "SearchHit",
+ "; tags: ",
+ "ArrayC",
"<",
- "AgentConfiguration",
- ", undefined, undefined> | null, ",
- "APMRouteCreateOptions",
- ">; } & { \"GET /api/apm/settings/agent-configuration/services\": ",
- "ServerRoute",
- "<\"GET /api/apm/settings/agent-configuration/services\", undefined, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { serviceNames: string[]; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"GET /api/apm/settings/agent-configuration/environments\": ",
- "ServerRoute",
- "<\"GET /api/apm/settings/agent-configuration/environments\", ",
- "PartialC",
- "<{ query: ",
- "PartialC",
- "<{ serviceName: ",
"StringC",
- "; }>; }>, ",
+ ">; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3556,49 +3603,23 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { environments: { name: string; alreadyConfigured: boolean; }[]; }, ",
+ ", { _id: string; _index: string; _source: ",
+ "Annotation",
+ "; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /api/apm/settings/agent-configuration/agent_name\": ",
+ ">; \"GET /api/apm/services/{serviceName}/annotation/search\": ",
"ServerRoute",
- "<\"GET /api/apm/settings/agent-configuration/agent_name\", ",
+ "<\"GET /api/apm/services/{serviceName}/annotation/search\", ",
"TypeC",
- "<{ query: ",
+ "<{ path: ",
"TypeC",
"<{ serviceName: ",
"StringC",
- "; }>; }>, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { agentName: string | undefined; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/settings/anomaly-detection/jobs\": ",
- "ServerRoute",
- "<\"GET /internal/apm/settings/anomaly-detection/jobs\", undefined, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { jobs: ",
- "ApmMlJob",
- "[]; hasLegacyJobs: boolean; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"POST /internal/apm/settings/anomaly-detection/jobs\": ",
- "ServerRoute",
- "<\"POST /internal/apm/settings/anomaly-detection/jobs\", ",
- "TypeC",
- "<{ body: ",
+ "; }>; query: ",
+ "IntersectionC",
+ "<[",
"TypeC",
- "<{ environments: ",
- "ArrayC",
- "<",
+ "<{ environment: ",
"UnionC",
"<[",
"LiteralC",
@@ -3610,73 +3631,13 @@
"StringC",
", ",
"NonEmptyStringBrand",
- ">]>>; }>; }>, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { jobCreated: boolean; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/settings/anomaly-detection/environments\": ",
- "ServerRoute",
- "<\"GET /internal/apm/settings/anomaly-detection/environments\", undefined, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { environments: string[]; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"POST /internal/apm/settings/anomaly-detection/update_to_v3\": ",
- "ServerRoute",
- "<\"POST /internal/apm/settings/anomaly-detection/update_to_v3\", undefined, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { update: boolean; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/settings/apm-index-settings\": ",
- "ServerRoute",
- "<\"GET /internal/apm/settings/apm-index-settings\", undefined, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", { apmIndexSettings: { configurationName: \"error\" | \"span\" | \"metric\" | \"transaction\" | \"sourcemap\" | \"onboarding\"; defaultValue: string; savedValue: any; }[]; }, ",
- "APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/settings/apm-indices\": ",
- "ServerRoute",
- "<\"GET /internal/apm/settings/apm-indices\", undefined, ",
- {
- "pluginId": "apm",
- "scope": "server",
- "docId": "kibApmPluginApi",
- "section": "def-server.APMRouteHandlerResources",
- "text": "APMRouteHandlerResources"
- },
- ", ",
- "ApmIndicesConfig",
- ", ",
- "APMRouteCreateOptions",
- ">; } & { \"POST /internal/apm/settings/apm-indices/save\": ",
- "ServerRoute",
- "<\"POST /internal/apm/settings/apm-indices/save\", ",
+ ">]>; }>, ",
"TypeC",
- "<{ body: ",
- "PartialC",
- "; }>, ",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3684,25 +3645,33 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", ",
- "SavedObject",
- "<{}>, ",
+ ", { annotations: ",
+ "Annotation",
+ "[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/settings/custom_links/transaction\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\": ",
"ServerRoute",
- "<\"GET /internal/apm/settings/custom_links/transaction\", ",
- "PartialC",
- "<{ query: ",
- "PartialC",
- "<{ 'service.name': ",
- "StringC",
- "; 'service.environment': ",
+ "<\"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\", ",
+ "TypeC",
+ "<{ path: ",
+ "TypeC",
+ "<{ serviceName: ",
"StringC",
- "; 'transaction.name': ",
+ "; serviceNodeName: ",
"StringC",
- "; 'transaction.type': ",
+ "; }>; query: ",
+ "IntersectionC",
+ "<[",
+ "TypeC",
+ "<{ kuery: ",
"StringC",
- "; }>; }>, ",
+ "; }>, ",
+ "TypeC",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3710,25 +3679,23 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", ",
- "Transaction",
- ", ",
+ ", { host: string | number; containerId: string | number; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/settings/custom_links\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/transaction_types\": ",
"ServerRoute",
- "<\"GET /internal/apm/settings/custom_links\", ",
- "PartialC",
- "<{ query: ",
- "PartialC",
- "<{ 'service.name': ",
- "StringC",
- "; 'service.environment': ",
- "StringC",
- "; 'transaction.name': ",
- "StringC",
- "; 'transaction.type': ",
+ "<\"GET /internal/apm/services/{serviceName}/transaction_types\", ",
+ "TypeC",
+ "<{ path: ",
+ "TypeC",
+ "<{ serviceName: ",
"StringC",
- "; }>; }>, ",
+ "; }>; query: ",
+ "TypeC",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3736,47 +3703,23 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { customLinks: ",
- "CustomLink",
- "[]; }, ",
+ ", { transactionTypes: string[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"POST /internal/apm/settings/custom_links\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/agent\": ",
"ServerRoute",
- "<\"POST /internal/apm/settings/custom_links\", ",
+ "<\"GET /internal/apm/services/{serviceName}/agent\", ",
"TypeC",
- "<{ body: ",
- "IntersectionC",
- "<[",
+ "<{ path: ",
"TypeC",
- "<{ label: ",
- "StringC",
- "; url: ",
- "StringC",
- "; }>, ",
- "PartialC",
- "<{ id: ",
+ "<{ serviceName: ",
"StringC",
- "; filters: ",
- "ArrayC",
- "<",
+ "; }>; query: ",
"TypeC",
- "<{ key: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<\"\">, ",
- "KeyofC",
- "<{ 'service.name': ",
- "StringC",
- "; 'service.environment': ",
- "StringC",
- "; 'transaction.name': ",
- "StringC",
- "; 'transaction.type': ",
- "StringC",
- "; }>]>; value: ",
- "StringC",
- "; }>>; }>]>; }>, ",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3784,49 +3727,23 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", void, ",
+ ", { agentName?: undefined; runtimeName?: undefined; } | { agentName: string | undefined; runtimeName: string | undefined; }, ",
"APMRouteCreateOptions",
- ">; } & { \"PUT /internal/apm/settings/custom_links/{id}\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/metadata/icons\": ",
"ServerRoute",
- "<\"PUT /internal/apm/settings/custom_links/{id}\", ",
+ "<\"GET /internal/apm/services/{serviceName}/metadata/icons\", ",
"TypeC",
"<{ path: ",
"TypeC",
- "<{ id: ",
- "StringC",
- "; }>; body: ",
- "IntersectionC",
- "<[",
- "TypeC",
- "<{ label: ",
- "StringC",
- "; url: ",
- "StringC",
- "; }>, ",
- "PartialC",
- "<{ id: ",
+ "<{ serviceName: ",
"StringC",
- "; filters: ",
- "ArrayC",
- "<",
+ "; }>; query: ",
"TypeC",
- "<{ key: ",
- "UnionC",
- "<[",
- "LiteralC",
- "<\"\">, ",
- "KeyofC",
- "<{ 'service.name': ",
- "StringC",
- "; 'service.environment': ",
- "StringC",
- "; 'transaction.name': ",
- "StringC",
- "; 'transaction.type': ",
- "StringC",
- "; }>]>; value: ",
- "StringC",
- "; }>>; }>]>; }>, ",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3834,17 +3751,25 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", void, ",
+ ", ",
+ "ServiceMetadataIcons",
+ ", ",
"APMRouteCreateOptions",
- ">; } & { \"DELETE /internal/apm/settings/custom_links/{id}\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/metadata/details\": ",
"ServerRoute",
- "<\"DELETE /internal/apm/settings/custom_links/{id}\", ",
+ "<\"GET /internal/apm/services/{serviceName}/metadata/details\", ",
"TypeC",
"<{ path: ",
"TypeC",
- "<{ id: ",
+ "<{ serviceName: ",
"StringC",
- "; }>; }>, ",
+ "; }>; query: ",
+ "TypeC",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3852,11 +3777,49 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { result: string; }, ",
+ ", ",
+ "ServiceMetadataDetails",
+ ", ",
"APMRouteCreateOptions",
- ">; } & { \"GET /api/apm/sourcemaps\": ",
+ ">; \"GET /internal/apm/services/detailed_statistics\": ",
"ServerRoute",
- "<\"GET /api/apm/sourcemaps\", undefined, ",
+ "<\"GET /internal/apm/services/detailed_statistics\", ",
+ "TypeC",
+ "<{ query: ",
+ "IntersectionC",
+ "<[",
+ "TypeC",
+ "<{ environment: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"ENVIRONMENT_NOT_DEFINED\">, ",
+ "LiteralC",
+ "<\"ENVIRONMENT_ALL\">, ",
+ "BrandC",
+ "<",
+ "StringC",
+ ", ",
+ "NonEmptyStringBrand",
+ ">]>; }>, ",
+ "TypeC",
+ "<{ kuery: ",
+ "StringC",
+ "; }>, ",
+ "TypeC",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>, ",
+ "PartialC",
+ "<{ offset: ",
+ "StringC",
+ "; }>, ",
+ "TypeC",
+ "<{ serviceNames: ",
+ "Type",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3864,25 +3827,39 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { artifacts: ",
- "ArtifactSourceMap",
- "[]; } | undefined, ",
+ ", { currentPeriod: _.Dictionary<{ serviceName: string; latency: { x: number; y: number | null; }[]; transactionErrorRate: { x: number; y: number; }[]; throughput: { x: number; y: number; }[]; }>; previousPeriod: _.Dictionary<{ serviceName: string; latency: { x: number; y: number | null; }[]; transactionErrorRate: { x: number; y: number; }[]; throughput: { x: number; y: number; }[]; }>; }, ",
"APMRouteCreateOptions",
- ">; } & { \"POST /api/apm/sourcemaps\": ",
+ ">; \"GET /internal/apm/services\": ",
"ServerRoute",
- "<\"POST /api/apm/sourcemaps\", ",
+ "<\"GET /internal/apm/services\", ",
"TypeC",
- "<{ body: ",
+ "<{ query: ",
+ "IntersectionC",
+ "<[",
"TypeC",
- "<{ service_name: ",
- "StringC",
- "; service_version: ",
+ "<{ environment: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"ENVIRONMENT_NOT_DEFINED\">, ",
+ "LiteralC",
+ "<\"ENVIRONMENT_ALL\">, ",
+ "BrandC",
+ "<",
"StringC",
- "; bundle_filepath: ",
+ ", ",
+ "NonEmptyStringBrand",
+ ">]>; }>, ",
+ "TypeC",
+ "<{ kuery: ",
"StringC",
- "; sourcemap: ",
+ "; }>, ",
+ "TypeC",
+ "<{ start: ",
"Type",
- "<{ version: number; sources: string[]; mappings: string; } & { names?: string[] | undefined; file?: string | undefined; sourceRoot?: string | undefined; sourcesContent?: string[] | undefined; }, string | Buffer, unknown>; }>; }>, ",
+ "; end: ",
+ "Type",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3890,25 +3867,57 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", ",
- {
- "pluginId": "fleet",
- "scope": "server",
- "docId": "kibFleetPluginApi",
- "section": "def-server.Artifact",
- "text": "Artifact"
- },
- " | undefined, ",
+ ", { items: ",
+ "JoinedReturnType",
+ "<{ serviceName: string; transactionType: string; environments: string[]; agentName: ",
+ "AgentName",
+ "; latency: number | null; transactionErrorRate: number; throughput: number; } | { serviceName: string; environments: string[]; agentName: ",
+ "AgentName",
+ "; } | { serviceName: string; healthStatus: ",
+ "ServiceHealthStatus",
+ "; }, { serviceName: string; transactionType: string; environments: string[]; agentName: ",
+ "AgentName",
+ "; latency: number | null; transactionErrorRate: number; throughput: number; } & { serviceName: string; environments: string[]; agentName: ",
+ "AgentName",
+ "; } & { serviceName: string; healthStatus: ",
+ "ServiceHealthStatus",
+ "; }>; hasLegacyData: boolean; }, ",
"APMRouteCreateOptions",
- ">; } & { \"DELETE /api/apm/sourcemaps/{id}\": ",
+ ">; \"GET /internal/apm/services/{serviceName}/serviceNodes\": ",
"ServerRoute",
- "<\"DELETE /api/apm/sourcemaps/{id}\", ",
+ "<\"GET /internal/apm/services/{serviceName}/serviceNodes\", ",
"TypeC",
"<{ path: ",
"TypeC",
- "<{ id: ",
+ "<{ serviceName: ",
"StringC",
- "; }>; }>, ",
+ "; }>; query: ",
+ "IntersectionC",
+ "<[",
+ "TypeC",
+ "<{ kuery: ",
+ "StringC",
+ "; }>, ",
+ "TypeC",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>, ",
+ "TypeC",
+ "<{ environment: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"ENVIRONMENT_NOT_DEFINED\">, ",
+ "LiteralC",
+ "<\"ENVIRONMENT_ALL\">, ",
+ "BrandC",
+ "<",
+ "StringC",
+ ", ",
+ "NonEmptyStringBrand",
+ ">]>; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3916,11 +3925,43 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", void, ",
+ ", { serviceNodes: { name: string; cpu: number | null; heapMemory: number | null; hostName: string | null | undefined; nonHeapMemory: number | null; threadCount: number | null; }[]; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/fleet/has_data\": ",
+ ">; \"GET /internal/apm/service-map/backend\": ",
"ServerRoute",
- "<\"GET /internal/apm/fleet/has_data\", undefined, ",
+ "<\"GET /internal/apm/service-map/backend\", ",
+ "TypeC",
+ "<{ query: ",
+ "IntersectionC",
+ "<[",
+ "TypeC",
+ "<{ backendName: ",
+ "StringC",
+ "; }>, ",
+ "TypeC",
+ "<{ environment: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"ENVIRONMENT_NOT_DEFINED\">, ",
+ "LiteralC",
+ "<\"ENVIRONMENT_ALL\">, ",
+ "BrandC",
+ "<",
+ "StringC",
+ ", ",
+ "NonEmptyStringBrand",
+ ">]>; }>, ",
+ "TypeC",
+ "<{ start: ",
+ "Type",
+ "; end: ",
+ "Type",
+ "; }>, ",
+ "PartialC",
+ "<{ offset: ",
+ "StringC",
+ "; }>]>; }>, ",
{
"pluginId": "apm",
"scope": "server",
@@ -3928,11 +3969,47 @@
"section": "def-server.APMRouteHandlerResources",
"text": "APMRouteHandlerResources"
},
- ", { hasData: boolean; }, ",
+ ", { currentPeriod: ",
+ "NodeStats",
+ "; previousPeriod: ",
+ "NodeStats",
+ " | undefined; }, ",
"APMRouteCreateOptions",
- ">; } & { \"GET /internal/apm/fleet/agents\": ",
+ ">; \"GET /internal/apm/service-map/service/{serviceName}\": ",
"ServerRoute",
- "<\"GET /internal/apm/fleet/agents\", undefined, ",
+ "<\"GET /internal/apm/service-map/service/{serviceName}\", ",
+ "TypeC",
+ "<{ path: ",
+ "TypeC",
+ "<{ serviceName: ",
+ "StringC",
+ "; }>; query: ",
+ "IntersectionC",
+ "<[",
+ "TypeC",
+ "<{ environment: ",
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"ENVIRONMENT_NOT_DEFINED\">, ",
+ "LiteralC",
+ "<\"ENVIRONMENT_ALL\">, ",
+ "BrandC",
+ "<",
+ "StringC",
+ ", ",
+ "NonEmptyStringBrand",
+ ">]>; }>, ",
+ "TypeC",
+ "<{ start: ",
+ "Type",
+ "