mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Grafana datasource: support multiple targets (#31495)
This commit is contained in:
parent
e13333fa86
commit
f451695ea6
@ -11,7 +11,7 @@ import {
|
|||||||
|
|
||||||
import { GrafanaQuery, GrafanaAnnotationQuery, GrafanaAnnotationType, GrafanaQueryType } from './types';
|
import { GrafanaQuery, GrafanaAnnotationQuery, GrafanaAnnotationType, GrafanaQueryType } from './types';
|
||||||
import { getBackendSrv, getTemplateSrv, toDataQueryResponse, getLiveMeasurementsObserver } from '@grafana/runtime';
|
import { getBackendSrv, getTemplateSrv, toDataQueryResponse, getLiveMeasurementsObserver } from '@grafana/runtime';
|
||||||
import { Observable, of } from 'rxjs';
|
import { Observable, of, merge } from 'rxjs';
|
||||||
import { map, catchError } from 'rxjs/operators';
|
import { map, catchError } from 'rxjs/operators';
|
||||||
|
|
||||||
let counter = 100;
|
let counter = 100;
|
||||||
@ -51,8 +51,7 @@ export class GrafanaDatasource extends DataSourceApi<GrafanaQuery> {
|
|||||||
return queries[0];
|
return queries[0];
|
||||||
}
|
}
|
||||||
if (queries.length > 1) {
|
if (queries.length > 1) {
|
||||||
// HELP!!!
|
return merge(...queries);
|
||||||
return queries[0];
|
|
||||||
}
|
}
|
||||||
return of(); // nothing
|
return of(); // nothing
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user