瀏覽代碼

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