Commit f32d47a5 by Ryan McKinley Committed by GitHub

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

parent 29162a3a
......@@ -198,7 +198,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);
......@@ -206,7 +208,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> {
......
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