TestDataDatasource: add the query refId to each result

This commit is contained in:
Ryan McKinley 2019-04-19 11:06:34 -07:00 committed by GitHub
parent 80cca9c12e
commit 544abfd3c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,12 +61,14 @@ export class TestDataDatasource implements DataSourceApi<TestDataQuery> {
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 || []) {
data.push({ target: series.name, datapoints: series.points });
data.push({ target: series.name, datapoints: series.points, refId: query.refId });
}
}