소스 검색

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 6 년 전
부모
커밋
fcd2fb8b04
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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));
   };