From e5c1cbabb115e626e19a9414a7dd3ec65591003b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=A4ggmark?= Date: Thu, 11 Apr 2019 13:57:04 +0200 Subject: [PATCH] Fix: Pass missing maxDataPoints to query in Explore (#16513) Fixes: #16490 --- public/app/core/utils/explore.ts | 1 + public/app/features/explore/state/actions.ts | 2 ++ public/app/types/explore.ts | 1 + 3 files changed, 4 insertions(+) diff --git a/public/app/core/utils/explore.ts b/public/app/core/utils/explore.ts index 10bb7997664..5a704422225 100644 --- a/public/app/core/utils/explore.ts +++ b/public/app/core/utils/explore.ts @@ -141,6 +141,7 @@ export function buildQueryTransaction( __interval: { text: interval, value: interval }, __interval_ms: { text: intervalMs, value: intervalMs }, }, + maxDataPoints: queryOptions.maxDataPoints, }; return { diff --git a/public/app/features/explore/state/actions.ts b/public/app/features/explore/state/actions.ts index dc5ba206099..9c724ed1fb1 100644 --- a/public/app/features/explore/state/actions.ts +++ b/public/app/features/explore/state/actions.ts @@ -536,6 +536,7 @@ export function runQueries(exploreId: ExploreId, ignoreUIState = false): ThunkRe supportsLogs, supportsTable, datasourceError, + containerWidth, } = getState().explore[exploreId]; if (datasourceError) { @@ -579,6 +580,7 @@ export function runQueries(exploreId: ExploreId, ignoreUIState = false): ThunkRe interval, format: 'time_series', instant: false, + maxDataPoints: containerWidth, }, makeTimeSeriesList ) diff --git a/public/app/types/explore.ts b/public/app/types/explore.ts index fa9f3d3cda1..5ec39262ed2 100644 --- a/public/app/types/explore.ts +++ b/public/app/types/explore.ts @@ -317,6 +317,7 @@ export interface QueryOptions { hinting?: boolean; instant?: boolean; valueWithRefId?: boolean; + maxDataPoints?: number; } export interface QueryTransaction {