Elastic: Fix error "e.buckets[Symbol.iterator] is not a function" when using filter (#26217)
* Add bucket to array if it is not in array
* Fix issue one level above
* Rename variable
* Move array check to processAggregationDocs
(cherry picked from commit 6d8545da63)
This commit is contained in:
committed by
Dominik Prokop
parent
461fc94103
commit
56a0b90559
@@ -134,8 +134,8 @@ export class ElasticResponse {
|
||||
table.addColumn({ text: metricName });
|
||||
values.push(value);
|
||||
};
|
||||
|
||||
for (const bucket of esAgg.buckets) {
|
||||
const buckets = _.isArray(esAgg.buckets) ? esAgg.buckets : [esAgg.buckets];
|
||||
for (const bucket of buckets) {
|
||||
const values = [];
|
||||
|
||||
for (const propValues of _.values(props)) {
|
||||
|
||||
Reference in New Issue
Block a user