mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
* Schematize prometheus * revert changes * close response body * Update report.json * Update pkg/tsdb/prometheus/models/query.go Co-authored-by: sam boyer <sdboyer@grafana.com> * Use without pointers * remove unused * Specify query format * Rename * Clean up schema * Update public/app/plugins/datasource/prometheus/dataquery.cue Co-authored-by: Ryan McKinley <ryantxu@gmail.com> * Update pkg/tsdb/prometheus/models/query.go Co-authored-by: Ryan McKinley <ryantxu@gmail.com> * Clean up tests * Update public/app/plugins/datasource/prometheus/dataquery.cue Co-authored-by: sam boyer <sdboyer@grafana.com> * make gen-cue * Add comments * Make linter happy * Remove editormode override * Update --------- Co-authored-by: sam boyer <sdboyer@grafana.com> Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
|
|
//
|
|
// Generated by:
|
|
// public/app/plugins/gen.go
|
|
// Using jennies:
|
|
// TSTypesJenny
|
|
// PluginTSTypesJenny
|
|
//
|
|
// Run 'make gen-cue' from repository root to regenerate.
|
|
|
|
import * as common from '@grafana/schema';
|
|
|
|
export const DataQueryModelVersion = Object.freeze([0, 0]);
|
|
|
|
export enum QueryEditorMode {
|
|
Builder = 'builder',
|
|
Code = 'code',
|
|
}
|
|
|
|
export type PromQueryFormat = ('time_series' | 'table' | 'heatmap');
|
|
|
|
export interface Prometheus extends common.DataQuery {
|
|
/**
|
|
* Specifies which editor is being used to prepare the query. It can be "code" or "builder"
|
|
*/
|
|
editorMode?: QueryEditorMode;
|
|
/**
|
|
* Execute an additional query to identify interesting raw samples relevant for the given expr
|
|
*/
|
|
exemplar?: boolean;
|
|
/**
|
|
* The actual expression/query that will be evaluated by Prometheus
|
|
*/
|
|
expr: string;
|
|
/**
|
|
* Query format to determine how to display data points in panel. It can be "time_series", "table", "heatmap"
|
|
*/
|
|
format?: PromQueryFormat;
|
|
/**
|
|
* Returns only the latest value that Prometheus has scraped for the requested time series
|
|
*/
|
|
instant?: boolean;
|
|
/**
|
|
* Returns a Range vector, comprised of a set of time series containing a range of data points over time for each time series
|
|
*/
|
|
range?: boolean;
|
|
}
|