mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Prometheus: Update schema with legendFormat and intervalFactor (#68687)
add legendFormat and intervalFactor to the schema
This commit is contained in:
@@ -44,6 +44,11 @@ composableKinds: DataQuery: {
|
||||
editorMode?: #QueryEditorMode
|
||||
// Query format to determine how to display data points in panel. It can be "time_series", "table", "heatmap"
|
||||
format?: #PromQueryFormat
|
||||
// Series name override or template. Ex. {{hostname}} will be replaced with label value for hostname
|
||||
legendFormat?: string
|
||||
// @deprecated Used to specify how many times to divide max data points by. We use max data points under query options
|
||||
// See https://github.com/grafana/grafana/issues/48081
|
||||
intervalFactor?: number
|
||||
|
||||
#QueryEditorMode: "code" | "builder" @cuetsy(kind="enum")
|
||||
#PromQueryFormat: "time_series" | "table" | "heatmap" @cuetsy(kind="type")
|
||||
|
||||
@@ -40,6 +40,15 @@ export interface Prometheus extends common.DataQuery {
|
||||
* Returns only the latest value that Prometheus has scraped for the requested time series
|
||||
*/
|
||||
instant?: boolean;
|
||||
/**
|
||||
* @deprecated Used to specify how many times to divide max data points by. We use max data points under query options
|
||||
* See https://github.com/grafana/grafana/issues/48081
|
||||
*/
|
||||
intervalFactor?: number;
|
||||
/**
|
||||
* Series name override or template. Ex. {{hostname}} will be replaced with label value for hostname
|
||||
*/
|
||||
legendFormat?: string;
|
||||
/**
|
||||
* Returns a Range vector, comprised of a set of time series containing a range of data points over time for each time series
|
||||
*/
|
||||
|
||||
@@ -11,13 +11,11 @@ export interface PromQuery extends GenPromQuery, DataQuery {
|
||||
* Timezone offset to align start & end time on backend
|
||||
*/
|
||||
utcOffsetSec?: number;
|
||||
legendFormat?: string;
|
||||
valueWithRefId?: boolean;
|
||||
showingGraph?: boolean;
|
||||
showingTable?: boolean;
|
||||
hinting?: boolean;
|
||||
interval?: string;
|
||||
intervalFactor?: number;
|
||||
// store the metrics modal additional settings
|
||||
useBackend?: boolean;
|
||||
disableTextWrap?: boolean;
|
||||
@@ -31,6 +29,7 @@ export enum PrometheusCacheLevel {
|
||||
High = 'High',
|
||||
None = 'None',
|
||||
}
|
||||
|
||||
export interface PromOptions extends DataSourceJsonData {
|
||||
timeInterval?: string;
|
||||
queryTimeout?: string;
|
||||
|
||||
Reference in New Issue
Block a user