Browse Source

TestDataDatasource: add the query refId to each result

Ryan McKinley 6 years ago
parent
commit
544abfd3c5
1 changed files with 5 additions and 3 deletions
  1. 5 3
      public/app/plugins/datasource/testdata/datasource.ts

+ 5 - 3
public/app/plugins/datasource/testdata/datasource.ts

@@ -61,12 +61,14 @@ export class TestDataDatasource implements DataSourceApi<TestDataQuery> {
             continue;
             continue;
           }
           }
 
 
-          for (const table of results.tables || []) {
-            data.push(table as TableData);
+          for (const t of results.tables || []) {
+            const table = t as TableData;
+            table.refId = query.refId;
+            data.push(table);
           }
           }
 
 
           for (const series of results.series || []) {
           for (const series of results.series || []) {
-            data.push({ target: series.name, datapoints: series.points });
+            data.push({ target: series.name, datapoints: series.points, refId: query.refId });
           }
           }
         }
         }