Queries: Move explore state out of query targets (#26203)

* Datasource/CloudWatch: Interal vars no longer sent with query requests

Closes #26202
This commit is contained in:
kay delaney
2020-07-16 14:00:28 +01:00
committed by GitHub
parent d4e4cb4c71
commit 1124da56d6
7 changed files with 41 additions and 27 deletions

View File

@@ -124,7 +124,6 @@ export function buildQueryTransaction(
scanning: boolean,
timeZone?: TimeZone
): QueryTransaction {
const configuredQueries = queries.map(query => ({ ...query, ...queryOptions }));
const key = queries.reduce((combinedKey, query) => {
combinedKey += query.key;
return combinedKey;
@@ -149,7 +148,7 @@ export function buildQueryTransaction(
// TODO: the query request expects number and we are using string here. Seems like it works so far but can create
// issues down the road.
panelId: panelId as any,
targets: configuredQueries, // Datasources rely on DataQueries being passed under the targets key.
targets: queries, // Datasources rely on DataQueries being passed under the targets key.
range,
requestId: 'explore',
rangeRaw: range.raw,
@@ -159,6 +158,9 @@ export function buildQueryTransaction(
},
maxDataPoints: queryOptions.maxDataPoints,
exploreMode: queryOptions.mode,
liveStreaming: queryOptions.liveStreaming,
showingGraph: queryOptions.showingGraph,
showingTable: queryOptions.showingTable,
};
return {