diff --git a/public/app/features/explore/state/actionTypes.ts b/public/app/features/explore/state/actionTypes.ts index 7c7ab40756f..be7d5754bbe 100644 --- a/public/app/features/explore/state/actionTypes.ts +++ b/public/app/features/explore/state/actionTypes.ts @@ -43,7 +43,7 @@ export enum ActionTypes { ToggleTable = 'explore/TOGGLE_TABLE', UpdateDatasourceInstance = 'explore/UPDATE_DATASOURCE_INSTANCE', ResetExplore = 'explore/RESET_EXPLORE', - SetInitialQueries = 'explore/SET_INITIAL_QUERIES', + QueriesImported = 'explore/QueriesImported', } export interface AddQueryRowAction { @@ -283,8 +283,8 @@ export interface ResetExploreAction { payload: {}; } -export interface SetInitialQueriesAction { - type: ActionTypes.SetInitialQueries; +export interface QueriesImported { + type: ActionTypes.QueriesImported; payload: { exploreId: ExploreId; queries: DataQuery[]; @@ -321,4 +321,4 @@ export type Action = | ToggleTableAction | UpdateDatasourceInstanceAction | ResetExploreAction - | SetInitialQueriesAction; + | QueriesImported; diff --git a/public/app/features/explore/state/actions.ts b/public/app/features/explore/state/actions.ts index 1b7461a41e1..1a11b7fcac9 100644 --- a/public/app/features/explore/state/actions.ts +++ b/public/app/features/explore/state/actions.ts @@ -53,7 +53,7 @@ import { QueryTransactionStartAction, ScanStopAction, UpdateDatasourceInstanceAction, - SetInitialQueriesAction, + QueriesImported, } from './actionTypes'; type ThunkResult = ThunkAction; @@ -243,9 +243,9 @@ export const loadDatasourcePending = ( }, }); -export const setInitialQueries = (exploreId: ExploreId, queries: DataQuery[]): SetInitialQueriesAction => { +export const queriesImported = (exploreId: ExploreId, queries: DataQuery[]): QueriesImported => { return { - type: ActionTypes.SetInitialQueries, + type: ActionTypes.QueriesImported, payload: { exploreId, queries, @@ -330,7 +330,7 @@ export function importQueries( ...generateEmptyQuery(i), })); - dispatch(setInitialQueries(exploreId, nextQueries)); + dispatch(queriesImported(exploreId, nextQueries)); }; } diff --git a/public/app/features/explore/state/reducers.ts b/public/app/features/explore/state/reducers.ts index c89307e4376..eb67beee3b3 100644 --- a/public/app/features/explore/state/reducers.ts +++ b/public/app/features/explore/state/reducers.ts @@ -414,7 +414,7 @@ export const itemReducer = (state, action: Action): ExploreItemState => { return { ...state, ...results, queryTransactions: nextQueryTransactions, showingTable }; } - case ActionTypes.SetInitialQueries: { + case ActionTypes.QueriesImported: { return { ...state, initialQueries: action.payload.queries,