[Transform] Support for the top_metrics aggregation (#101152)

* [ML] init top_metrics agg

* [ML] support sort

* [ML] support _score sorting

* [ML] support sort mode

* [ML] support numeric type sorting

* [ML] update field label, hide additional sorting controls

* [ML] preserve advanced config

* [ML] update agg fields after runtime fields edit

* [ML] fix TS issue with EuiButtonGroup

* [ML] fix Field label

* [ML] refactor setUiConfig

* [ML] update unit tests

* [ML] wrap advanced sorting settings with accordion

* [ML] config validation with tests

* [ML] fix preserving of the unsupported config

* [ML] update translation message

* [ML] fix level of the custom config

* [ML] preserve unsupported config for sorting
This commit is contained in:
Dima Arnautov 2021-06-04 16:04:53 +02:00 committed by GitHub
parent 93df9a32a4
commit 9810a72720
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 693 additions and 29 deletions

View file

@ -17,6 +17,7 @@ export const PIVOT_SUPPORTED_AGGS = {
SUM: 'sum',
VALUE_COUNT: 'value_count',
FILTER: 'filter',
TOP_METRICS: 'top_metrics',
} as const;
export type PivotSupportedAggs = typeof PIVOT_SUPPORTED_AGGS[keyof typeof PIVOT_SUPPORTED_AGGS];