mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 10:23:14 -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;
|
fields: NormalizedFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DEFAULT_COUNT_FILTER_TITLE = i18n.translate(
|
||||||
|
'xpack.observability.customThreshold.rule.alertFlyout.customEquationEditor.defaultCountFilterTitle',
|
||||||
|
{ defaultMessage: 'all documents' }
|
||||||
|
);
|
||||||
|
|
||||||
export function MetricRowWithAgg({
|
export function MetricRowWithAgg({
|
||||||
name,
|
name,
|
||||||
aggType = Aggregators.COUNT,
|
aggType = Aggregators.COUNT,
|
||||||
|
@ -126,7 +131,9 @@ export function MetricRowWithAgg({
|
||||||
<EuiExpression
|
<EuiExpression
|
||||||
data-test-subj="aggregationName"
|
data-test-subj="aggregationName"
|
||||||
description={aggregationTypes[aggType].text}
|
description={aggregationTypes[aggType].text}
|
||||||
value={aggType === Aggregators.COUNT ? filter : field}
|
value={
|
||||||
|
aggType === Aggregators.COUNT ? filter || DEFAULT_COUNT_FILTER_TITLE : field
|
||||||
|
}
|
||||||
isActive={aggTypePopoverOpen}
|
isActive={aggTypePopoverOpen}
|
||||||
display="columns"
|
display="columns"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
@ -292,7 +292,7 @@ export const aggregationType: { [key: string]: AggregationType } = {
|
||||||
text: i18n.translate(
|
text: i18n.translate(
|
||||||
'xpack.observability.customThreshold.rule.alertFlyout.aggregationText.count',
|
'xpack.observability.customThreshold.rule.alertFlyout.aggregationText.count',
|
||||||
{
|
{
|
||||||
defaultMessage: 'Document count',
|
defaultMessage: 'Count',
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
fieldRequired: false,
|
fieldRequired: false,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue