Tempo: Return new version of dataframe schema directly from the backend (#32116)

* Return dataframe directly from the backend

* Streamline some transforms

* Fix lint issues

* Remove unused lib

* Fix datasource test

* Fix imports and add some typings

* Fix the typings and some tests

* Add private doc comment

* Remove private tag

* Add comments

* Fix some API docs issues
This commit is contained in:
Andrej Ocenas
2021-03-22 19:09:15 +01:00
committed by GitHub
parent f8ec947700
commit 3ef9cac640
15 changed files with 616 additions and 109 deletions
@@ -10,7 +10,7 @@ import {
import { Observable, of } from 'rxjs';
import { map, catchError } from 'rxjs/operators';
import { getBackendSrv, getDataSourceSrv } from '../services';
import { toDataQueryResponse } from './queryResponse';
import { BackendDataSourceResponse, toDataQueryResponse } from './queryResponse';
const ExpressionDatasourceID = '__expr__';
@@ -104,14 +104,14 @@ export class DataSourceWithBackend<
}
return getBackendSrv()
.fetch({
.fetch<BackendDataSourceResponse>({
url: '/api/ds/query',
method: 'POST',
data: body,
requestId,
})
.pipe(
map((rsp: any) => {
map((rsp) => {
return toDataQueryResponse(rsp, queries as DataQuery[]);
}),
catchError((err) => {