Explore: Fix query cancellation when opening an url with split panes (#36847)

* Add exploreId to requestId

* Fix tests
This commit is contained in:
Andrej Ocenas
2021-07-19 17:29:51 +02:00
committed by GitHub
parent a11294ae9d
commit 001331e2ac
3 changed files with 8 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ import { v4 as uuidv4 } from 'uuid';
import { getNextRefIdChar } from './query';
// Types
import { RefreshPicker } from '@grafana/ui';
import { QueryOptions, QueryTransaction } from 'app/types/explore';
import { ExploreId, QueryOptions, QueryTransaction } from 'app/types/explore';
import { config } from '../config';
import { TimeSrv } from 'app/features/dashboard/services/TimeSrv';
import { DataSourceSrv } from '@grafana/runtime';
@@ -116,6 +116,7 @@ export async function getExploreUrl(args: GetExploreUrlArguments): Promise<strin
}
export function buildQueryTransaction(
exploreId: ExploreId,
queries: DataQuery[],
queryOptions: QueryOptions,
range: TimeRange,
@@ -148,7 +149,7 @@ export function buildQueryTransaction(
panelId: panelId as any,
targets: queries, // Datasources rely on DataQueries being passed under the targets key.
range,
requestId: 'explore',
requestId: 'explore_' + exploreId,
rangeRaw: range.raw,
scopedVars: {
__interval: { text: interval, value: interval },