Ver Fonte

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

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

Closes #17496
Marcus Efraimsson há 6 anos atrás
pai
commit
fcd2fb8b04
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      public/app/features/explore/state/actions.ts

+ 1 - 0
public/app/features/explore/state/actions.ts

@@ -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));
   };