mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
Rename document count aggregation and add default filter title (#170845)
Closes #166472
## Summary
Rename document count aggregation and add default filter title.
134b9253
-eb09-4613-85c4-b262af062338
This commit is contained in:
parent
55d8ea45ac
commit
552e87ba8f
2 changed files with 9 additions and 2 deletions
|
@ -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({
|
|||
<EuiExpression
|
||||
data-test-subj="aggregationName"
|
||||
description={aggregationTypes[aggType].text}
|
||||
value={aggType === Aggregators.COUNT ? filter : field}
|
||||
value={
|
||||
aggType === Aggregators.COUNT ? filter || DEFAULT_COUNT_FILTER_TITLE : field
|
||||
}
|
||||
isActive={aggTypePopoverOpen}
|
||||
display="columns"
|
||||
onClick={() => {
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue