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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user