mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
3d33de1751
Lead all top-level properties that we do not intend to export with an underscore. In 2.2.0, only definitions starting with a capital letter were exported. As well, properties with a leading underscore were not visible to an entire package - just within the same file. 3.0.0 still considers them hidden, however, they are now visible to an entire package.
31 lines
750 B
CUE
31 lines
750 B
CUE
package variables
|
|
|
|
// Query variables allow you to write a data source query that can return a
|
|
// list of metric names, tag values, or keys.
|
|
#Query: _variable & {
|
|
// Data source to use.
|
|
datasource: string
|
|
// Definition.
|
|
definition?: string
|
|
// Query.
|
|
query: string
|
|
// Refresh.
|
|
refresh: int | *1
|
|
// Regex.
|
|
regex?: string
|
|
// * 0 - Disabled.
|
|
// * 1 - Alphabetical (asc).
|
|
// * 2 - Alphabetical (desc).
|
|
// * 3 - Numerical (asc).
|
|
// * 4 - Numerical (desc).
|
|
// * 5 - Alphabetical (case-insensitive, asc).
|
|
// * 6 - Alphabetical (case-insensitive, desc).
|
|
sort: int & >=0 & <=6 | *0
|
|
tagValuesQuery?: string
|
|
tags: [...string] | *[]
|
|
tagsQuery?: string
|
|
// Variable type.
|
|
type: "query"
|
|
useTags: bool | *false
|
|
}
|