TestData: multiple arrow requests should return multiple frames (#28417) (#28441)

(cherry picked from commit f32d47a535)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2020-10-21 18:16:06 +02:00
committed by GitHub
co-authored by Ryan McKinley
parent 2221c2bbad
commit 9d7eaedb2b
+4 -2
View File
@@ -192,7 +192,9 @@ function runArrowFile(target: TestDataQuery, req: DataQueryRequest<TestDataQuery
if (target.stringInput && target.stringInput.length > 10) {
try {
const table = base64StringToArrowTable(target.stringInput);
data = [arrowTableToDataFrame(table)];
const frame = arrowTableToDataFrame(table);
frame.refId = target.refId;
data = [frame];
} catch (e) {
console.warn('Error reading saved arrow', e);
const error = toDataQueryError(e);
@@ -200,7 +202,7 @@ function runArrowFile(target: TestDataQuery, req: DataQueryRequest<TestDataQuery
return of({ state: LoadingState.Error, error, data });
}
}
return of({ state: LoadingState.Done, data });
return of({ state: LoadingState.Done, data, key: req.requestId + target.refId });
}
function runGrafanaAPI(target: TestDataQuery, req: DataQueryRequest<TestDataQuery>): Observable<DataQueryResponse> {