mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: move specific DataQuery props to loki/tsdb (#23086)
This commit is contained in:
parent
27913289d3
commit
19123444a1
@ -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 {
|
|||||||
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
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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[] = [];
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user