Ver Fonte

explore: make sure datasource is added to target (#17116)

Fixes a regression introduced in #16959 which removed datasource 
property from changed query for angular query editors having the 
result of loading explore URL's without datasource loaded the 
default query in query editor and Explore.

Ref #16808
Marcus Efraimsson há 6 anos atrás
pai
commit
32cdab4cbf
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      public/app/features/explore/QueryEditor.tsx

+ 1 - 1
public/app/features/explore/QueryEditor.tsx

@@ -35,7 +35,7 @@ export default class QueryEditor extends PureComponent<QueryEditorProps, any> {
 
 
     const loader = getAngularLoader();
     const loader = getAngularLoader();
     const template = '<plugin-component type="query-ctrl"> </plugin-component>';
     const template = '<plugin-component type="query-ctrl"> </plugin-component>';
-    const target = { ...initialQuery };
+    const target = { datasource: datasource.name, ...initialQuery };
     const scopeProps = {
     const scopeProps = {
       ctrl: {
       ctrl: {
         datasource,
         datasource,