Rename SetInitialQueries action to QueriesImported
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -53,7 +53,7 @@ import {
|
||||
QueryTransactionStartAction,
|
||||
ScanStopAction,
|
||||
UpdateDatasourceInstanceAction,
|
||||
SetInitialQueriesAction,
|
||||
QueriesImported,
|
||||
} from './actionTypes';
|
||||
|
||||
type ThunkResult<R> = ThunkAction<R, StoreState, undefined, ThunkableAction>;
|
||||
@@ -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));
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user