Commit 19123444 by Ryan McKinley Committed by GitHub

Chore: move specific DataQuery props to loki/tsdb (#23086)

parent 27913289
...@@ -391,13 +391,6 @@ export interface DataQuery { ...@@ -391,13 +391,6 @@ export interface DataQuery {
* For non mixed scenarios this is undefined. * For non mixed scenarios this is undefined.
*/ */
datasource?: string | null; datasource?: string | null;
metric?: any;
/**
* For limiting result lines.
*/
maxLines?: number;
} }
export interface DataQueryError { export interface DataQueryError {
......
...@@ -42,6 +42,7 @@ export interface LokiQuery extends DataQuery { ...@@ -42,6 +42,7 @@ export interface LokiQuery extends DataQuery {
reverse?: boolean; reverse?: boolean;
legendFormat?: string; legendFormat?: string;
valueWithRefId?: boolean; valueWithRefId?: boolean;
maxLines?: number;
} }
export interface LokiOptions extends DataSourceJsonData { export interface LokiOptions extends DataSourceJsonData {
......
...@@ -38,7 +38,7 @@ export default class OpenTsDatasource extends DataSourceApi<OpenTsdbQuery, OpenT ...@@ -38,7 +38,7 @@ export default class OpenTsDatasource extends DataSourceApi<OpenTsdbQuery, OpenT
} }
// Called once per panel (graph) // Called once per panel (graph)
query(options: DataQueryRequest) { query(options: DataQueryRequest<OpenTsdbQuery>) {
const start = this.convertToTSDBTime(options.rangeRaw.from, false, options.timezone); const start = this.convertToTSDBTime(options.rangeRaw.from, false, options.timezone);
const end = this.convertToTSDBTime(options.rangeRaw.to, true, options.timezone); const end = this.convertToTSDBTime(options.rangeRaw.to, true, options.timezone);
const qs: any[] = []; const qs: any[] = [];
......
import { DataQuery, DataSourceJsonData } from '@grafana/data'; import { DataQuery, DataSourceJsonData } from '@grafana/data';
export interface OpenTsdbQuery extends DataQuery {} export interface OpenTsdbQuery extends DataQuery {
metric?: any;
}
export interface OpenTsdbOptions extends DataSourceJsonData { export interface OpenTsdbOptions extends DataSourceJsonData {
tsdbVersion: number; tsdbVersion: number;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment