From 552e87ba8fe8cef176dd977d695d548a9a476e30 Mon Sep 17 00:00:00 2001 From: Maryam Saeidi Date: Wed, 8 Nov 2023 17:12:27 +0100 Subject: [PATCH] Rename document count aggregation and add default filter title (#170845) Closes #166472 ## Summary Rename document count aggregation and add default filter title. https://github.com/elastic/kibana/assets/12370520/134b9253-eb09-4613-85c4-b262af062338 --- .../components/custom_equation/metric_row_with_agg.tsx | 9 ++++++++- .../custom_threshold/components/expression_row.tsx | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/metric_row_with_agg.tsx b/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/metric_row_with_agg.tsx index 80a379134806c..834cffada60ce 100644 --- a/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/metric_row_with_agg.tsx +++ b/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/metric_row_with_agg.tsx @@ -38,6 +38,11 @@ interface MetricRowWithAggProps extends MetricRowBaseProps { fields: NormalizedFields; } +const DEFAULT_COUNT_FILTER_TITLE = i18n.translate( + 'xpack.observability.customThreshold.rule.alertFlyout.customEquationEditor.defaultCountFilterTitle', + { defaultMessage: 'all documents' } +); + export function MetricRowWithAgg({ name, aggType = Aggregators.COUNT, @@ -126,7 +131,9 @@ export function MetricRowWithAgg({ { diff --git a/x-pack/plugins/observability/public/components/custom_threshold/components/expression_row.tsx b/x-pack/plugins/observability/public/components/custom_threshold/components/expression_row.tsx index e508977658c0c..bfb2c2f4c33de 100644 --- a/x-pack/plugins/observability/public/components/custom_threshold/components/expression_row.tsx +++ b/x-pack/plugins/observability/public/components/custom_threshold/components/expression_row.tsx @@ -292,7 +292,7 @@ export const aggregationType: { [key: string]: AggregationType } = { text: i18n.translate( 'xpack.observability.customThreshold.rule.alertFlyout.aggregationText.count', { - defaultMessage: 'Document count', + defaultMessage: 'Count', } ), fieldRequired: false,