Commit ec9167e9 by Cyril Tovena Committed by GitHub

Check if the datasource is of type loki using meta.id instead of name. (#22877)

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
parent 26626d90
...@@ -439,20 +439,21 @@ export const runQueries = (exploreId: ExploreId): ThunkResult<void> => { ...@@ -439,20 +439,21 @@ export const runQueries = (exploreId: ExploreId): ThunkResult<void> => {
stopQueryState(querySubscription); stopQueryState(querySubscription);
const datasourceId = datasourceInstance.meta.id;
const queryOptions: QueryOptions = { const queryOptions: QueryOptions = {
minInterval, minInterval,
// maxDataPoints is used in: // maxDataPoints is used in:
// Loki - used for logs streaming for buffer size, with undefined it falls back to datasource config if it supports that. // Loki - used for logs streaming for buffer size, with undefined it falls back to datasource config if it supports that.
// Elastic - limits the number of datapoints for the counts query and for logs it has hardcoded limit. // Elastic - limits the number of datapoints for the counts query and for logs it has hardcoded limit.
// Influx - used to correctly display logs in graph // Influx - used to correctly display logs in graph
maxDataPoints: mode === ExploreMode.Logs && datasourceInstance.name === 'Loki' ? undefined : containerWidth, maxDataPoints: mode === ExploreMode.Logs && datasourceId === 'loki' ? undefined : containerWidth,
liveStreaming: live, liveStreaming: live,
showingGraph, showingGraph,
showingTable, showingTable,
mode, mode,
}; };
const datasourceId = datasourceInstance.meta.id;
const datasourceName = exploreItemState.requestedDatasourceName; const datasourceName = exploreItemState.requestedDatasourceName;
const transaction = buildQueryTransaction(queries, queryOptions, range, scanning); const transaction = buildQueryTransaction(queries, queryOptions, range, scanning);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment