Skip to content

Commit

Permalink
Query: move correlations before update time
Browse files Browse the repository at this point in the history
  • Loading branch information
matyax committed Jan 8, 2024
1 parent 416e959 commit eadcb30
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions public/app/features/explore/state/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,13 @@ export const runQueries = createAsyncThunk<void, RunQueriesOptions>(
'explore/runQueries',
async ({ exploreId, preserveCache }, { dispatch, getState }) => {
dispatch(cancelQueries(exploreId));

const { defaultCorrelationEditorDatasource, scopedVars, showCorrelationEditorLinks } = await getCorrelationsData(
getState(),
exploreId
);
const correlations$ = getCorrelations(exploreId);

dispatch(updateTime({ exploreId }));

// We always want to clear cache unless we explicitly pass preserveCache parameter
Expand All @@ -531,12 +538,6 @@ export const runQueries = createAsyncThunk<void, RunQueriesOptions>(
supplementaryQueries,
} = exploreItemState;

const { defaultCorrelationEditorDatasource, scopedVars, showCorrelationEditorLinks } = await getCorrelationsData(
exploreState,
exploreId
);
const correlations$ = getCorrelations(exploreId);

let newQuerySource: Observable<ExplorePanelData>;
let newQuerySubscription: SubscriptionLike;

Expand Down

0 comments on commit eadcb30

Please sign in to comment.