Explore: Clear queries when switching between metrics and logs (#17505)

This will clear the existing queries when switching between metrics and logs. 

Closes #17496
This commit is contained in:
Marcus Efraimsson 2019-06-11 16:18:33 +02:00 committed by GitHub
parent 40f95a95c0
commit fcd2fb8b04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,6 +122,7 @@ export function changeDatasource(exploreId: ExploreId, datasource: string): Thun
*/
export function changeMode(exploreId: ExploreId, mode: ExploreMode): ThunkResult<void> {
return dispatch => {
dispatch(clearQueries(exploreId));
dispatch(changeModeAction({ exploreId, mode }));
dispatch(runQueries(exploreId));
};