Elasticsearch: fix log row context erroring out (#31088) (#31094)

(cherry picked from commit c7e007d199)

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2021-02-10 13:57:00 +00:00
committed by GitHub
co-authored by Giordano Ricci
parent 02cd1faf88
commit 762c694092
@@ -494,7 +494,7 @@ export class ElasticDatasource extends DataSourceApi<ElasticsearchQuery, Elastic
});
const payload = [header, esQuery].join('\n') + '\n';
const url = this.getMultiSearchUrl();
const response = await this.post(url, payload);
const response = await this.post(url, payload).toPromise();
const targets: ElasticsearchQuery[] = [{ refId: `${row.dataFrame.refId}`, metrics: [], isLogsQuery: true }];
const elasticResponse = new ElasticResponse(targets, transformHitsBasedOnDirection(response, sort));
const logResponse = elasticResponse.getLogs(this.logMessageField, this.logLevelField);