Commit d746df48 by Dominik Prokop

Add missing code

parent ca0d2996
......@@ -324,7 +324,13 @@ export function importQueries(
// Default is blank queries
importedQueries = ensureQueries();
}
dispatch(setInitialQueries(exploreId, importedQueries));
const nextQueries = importedQueries.map((q, i) => ({
...importedQueries[i],
...generateEmptyQuery(i),
}));
dispatch(setInitialQueries(exploreId, nextQueries));
};
}
......@@ -360,8 +366,6 @@ export function loadDatasource(exploreId: ExploreId, instance: DataSourceApi): T
instance.init();
}
// Check if queries can be imported from previously selected datasource
if (datasourceName !== getState().explore[exploreId].requestedDatasourceName) {
// User already changed datasource again, discard results
return;
......
......@@ -177,7 +177,6 @@ export default class LokiLanguageProvider extends LanguageProvider {
return queries.map(query => ({
refId: query.refId,
expr: '',
key: query.key,
}));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment