Explore: Fix showing of results of queries in table (#24018)

* Fix: Show results of instant queries in Explore tables

* Add PreferredVisualisationType to meta

* Implement visualisation exception for Prometheus

* Implement visualisation exception for Elastic
This commit is contained in:
Ivana Huckova
2020-04-30 12:41:03 +02:00
committed by GitHub
parent f2254081c2
commit e2436b29c0
6 changed files with 41 additions and 8 deletions

View File

@@ -189,6 +189,10 @@ export class PrometheusDatasource extends DataSourceApi<PromQuery, PromOptions>
responseListLength,
refId: target.refId,
valueWithRefId: target.valueWithRefId,
meta: {
/** Fix for showing of Prometheus results in Explore table. We want to show result of instant query in table and the rest of time series in graph */
preferredVisualisationType: query.instant ? 'table' : 'graph',
},
};
const series = this.resultTransformer.transform(response, transformerOptions);