Commit d746df48 by Dominik Prokop

Add missing code

parent ca0d2996
...@@ -324,7 +324,13 @@ export function importQueries( ...@@ -324,7 +324,13 @@ export function importQueries(
// Default is blank queries // Default is blank queries
importedQueries = ensureQueries(); 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 ...@@ -360,8 +366,6 @@ export function loadDatasource(exploreId: ExploreId, instance: DataSourceApi): T
instance.init(); instance.init();
} }
// Check if queries can be imported from previously selected datasource
if (datasourceName !== getState().explore[exploreId].requestedDatasourceName) { if (datasourceName !== getState().explore[exploreId].requestedDatasourceName) {
// User already changed datasource again, discard results // User already changed datasource again, discard results
return; return;
......
...@@ -177,7 +177,6 @@ export default class LokiLanguageProvider extends LanguageProvider { ...@@ -177,7 +177,6 @@ export default class LokiLanguageProvider extends LanguageProvider {
return queries.map(query => ({ return queries.map(query => ({
refId: query.refId, refId: query.refId,
expr: '', 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