Refactor: improvements to PanelQueryRunner (#16678)

merged DataQueryOptions + DataRequestInfo info: DataQueryRequest
This commit is contained in:
Ryan McKinley
2019-04-18 21:56:27 -07:00
committed by GitHub
parent 5f474c6328
commit 4e54509dde
14 changed files with 87 additions and 45 deletions

View File

@@ -15,7 +15,7 @@ import { expandRecordingRules } from './language_utils';
// Types
import { PromQuery } from './types';
import { DataQueryOptions, DataSourceApi, AnnotationEvent } from '@grafana/ui/src/types';
import { DataQueryRequest, DataSourceApi, AnnotationEvent } from '@grafana/ui/src/types';
import { ExploreUrlState } from 'app/types/explore';
export class PrometheusDatasource implements DataSourceApi<PromQuery> {
@@ -120,7 +120,7 @@ export class PrometheusDatasource implements DataSourceApi<PromQuery> {
return this.templateSrv.variableExists(target.expr);
}
query(options: DataQueryOptions<PromQuery>) {
query(options: DataQueryRequest<PromQuery>) {
const start = this.getPrometheusTime(options.range.from, false);
const end = this.getPrometheusTime(options.range.to, true);