Chore: move specific DataQuery props to loki/tsdb (#23086)
This commit is contained in:
@@ -391,13 +391,6 @@ export interface DataQuery {
|
||||
* For non mixed scenarios this is undefined.
|
||||
*/
|
||||
datasource?: string | null;
|
||||
|
||||
metric?: any;
|
||||
|
||||
/**
|
||||
* For limiting result lines.
|
||||
*/
|
||||
maxLines?: number;
|
||||
}
|
||||
|
||||
export interface DataQueryError {
|
||||
|
||||
@@ -42,6 +42,7 @@ export interface LokiQuery extends DataQuery {
|
||||
reverse?: boolean;
|
||||
legendFormat?: string;
|
||||
valueWithRefId?: boolean;
|
||||
maxLines?: number;
|
||||
}
|
||||
|
||||
export interface LokiOptions extends DataSourceJsonData {
|
||||
|
||||
@@ -38,7 +38,7 @@ export default class OpenTsDatasource extends DataSourceApi<OpenTsdbQuery, OpenT
|
||||
}
|
||||
|
||||
// Called once per panel (graph)
|
||||
query(options: DataQueryRequest) {
|
||||
query(options: DataQueryRequest<OpenTsdbQuery>) {
|
||||
const start = this.convertToTSDBTime(options.rangeRaw.from, false, options.timezone);
|
||||
const end = this.convertToTSDBTime(options.rangeRaw.to, true, options.timezone);
|
||||
const qs: any[] = [];
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { DataQuery, DataSourceJsonData } from '@grafana/data';
|
||||
|
||||
export interface OpenTsdbQuery extends DataQuery {}
|
||||
export interface OpenTsdbQuery extends DataQuery {
|
||||
metric?: any;
|
||||
}
|
||||
|
||||
export interface OpenTsdbOptions extends DataSourceJsonData {
|
||||
tsdbVersion: number;
|
||||
|
||||
Reference in New Issue
Block a user