mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Elasticsearch: Only show numbers in histogram field autocomplete (#38631)
This commit is contained in:
parent
5898824a48
commit
b5e4a0a39a
@ -60,6 +60,11 @@ describe('useFields hook', () => {
|
||||
result.current();
|
||||
expect(getFields).toHaveBeenLastCalledWith(['date'], timeRange);
|
||||
|
||||
// Histrogram only works on numbers
|
||||
rerender('histogram');
|
||||
result.current();
|
||||
expect(getFields).toHaveBeenLastCalledWith(['number'], timeRange);
|
||||
|
||||
// Geohash Grid only works on geo_point data
|
||||
rerender('geohash_grid');
|
||||
result.current();
|
||||
|
@ -34,6 +34,8 @@ const getFilter = (type: AggregationType) => {
|
||||
return ['date'];
|
||||
case 'geohash_grid':
|
||||
return ['geo_point'];
|
||||
case 'histogram':
|
||||
return ['number'];
|
||||
default:
|
||||
return [];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user