浏览代码

Making sure we do not pass a long invalid queries and save to state

Hugo Häggmark 7 年之前
父节点
当前提交
08f5a3338a

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

@@ -538,6 +538,7 @@ export function runQueries(exploreId: ExploreId) {
 
     if (!hasNonEmptyQuery(modifiedQueries)) {
       dispatch({ type: ActionTypes.RunQueriesEmpty, payload: { exploreId } });
+      dispatch(stateSave()); // Remember to saves to state and update location
       return;
     }
 

+ 2 - 1
public/app/plugins/datasource/loki/language_provider.ts

@@ -173,8 +173,9 @@ export default class LokiLanguageProvider extends LanguageProvider {
         })
       );
     }
+    // Return a cleaned LokiQuery
     return queries.map(query => ({
-      ...query,
+      refId: query.refId,
       expr: '',
     }));
   }