mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
parent
40f95a95c0
commit
fcd2fb8b04
@ -122,6 +122,7 @@ export function changeDatasource(exploreId: ExploreId, datasource: string): Thun
|
|||||||
*/
|
*/
|
||||||
export function changeMode(exploreId: ExploreId, mode: ExploreMode): ThunkResult<void> {
|
export function changeMode(exploreId: ExploreId, mode: ExploreMode): ThunkResult<void> {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
|
dispatch(clearQueries(exploreId));
|
||||||
dispatch(changeModeAction({ exploreId, mode }));
|
dispatch(changeModeAction({ exploreId, mode }));
|
||||||
dispatch(runQueries(exploreId));
|
dispatch(runQueries(exploreId));
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user