mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Update all core kinds to flattened lineages * Regen Go types, without any * Regen Go types, s/interface{}/any/ * Update generated core typescript * Update generate docs * Fix defaults gen in veneer index jenny * Flatten plugindef lineage * Convert all plugin kinds to flattened form * Switch back to interface{} for now * Switch to fs.Sub in plugin DeclParser * Mostly undesirable codegen changes, to be fixed * Update mod and sum * Update pfs tests to flattened lineages * Update thema to latest, regen docs
59 lines
2.2 KiB
CUE
59 lines
2.2 KiB
CUE
// Copyright 2023 Grafana Labs
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
package grafanaplugin
|
|
|
|
import (
|
|
common "github.com/grafana/grafana/packages/grafana-schema/src/common"
|
|
"github.com/grafana/grafana/pkg/plugins/pfs"
|
|
)
|
|
|
|
// This file (with its sibling .cue files) implements pfs.GrafanaPlugin
|
|
pfs.GrafanaPlugin
|
|
|
|
composableKinds: DataQuery: {
|
|
maturity: "experimental"
|
|
|
|
lineage: {
|
|
schemas: [{
|
|
version: [0, 0]
|
|
schema: {
|
|
common.DataQuery
|
|
|
|
// The actual expression/query that will be evaluated by Prometheus
|
|
expr: string
|
|
// Returns only the latest value that Prometheus has scraped for the requested time series
|
|
instant?: bool
|
|
// Returns a Range vector, comprised of a set of time series containing a range of data points over time for each time series
|
|
range?: bool
|
|
// Execute an additional query to identify interesting raw samples relevant for the given expr
|
|
exemplar?: bool
|
|
// Specifies which editor is being used to prepare the query. It can be "code" or "builder"
|
|
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")
|
|
}
|
|
}]
|
|
lenses: []
|
|
}
|
|
}
|