mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dashboard-schemas cue 3.0.0 compatible (#29352)
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.
This commit is contained in:
parent
778476906b
commit
3d33de1751
@ -2,7 +2,7 @@ package panels
|
|||||||
|
|
||||||
// Gauge is a single value panel that can repeat a gauge for every series,
|
// Gauge is a single value panel that can repeat a gauge for every series,
|
||||||
// column or row.
|
// column or row.
|
||||||
#Gauge: panel & {
|
#Gauge: _panel & {
|
||||||
// Field config.
|
// Field config.
|
||||||
fieldConfig: {
|
fieldConfig: {
|
||||||
// Defaults.
|
// Defaults.
|
||||||
@ -22,14 +22,14 @@ package panels
|
|||||||
// What to show when there is no value.
|
// What to show when there is no value.
|
||||||
noValue: string
|
noValue: string
|
||||||
// Threshold config.
|
// Threshold config.
|
||||||
thresholds: thresholds
|
thresholds: _thresholds
|
||||||
// Mappings.
|
// Mappings.
|
||||||
mappings: [...mapping]
|
mappings: [..._mapping]
|
||||||
// Data Links.
|
// Data Links.
|
||||||
links: [...dataLink]
|
links: [..._dataLink]
|
||||||
}
|
}
|
||||||
// Overrides.
|
// Overrides.
|
||||||
overrides: [...override]
|
overrides: [..._override]
|
||||||
}
|
}
|
||||||
// Options.
|
// Options.
|
||||||
options: {
|
options: {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package panels
|
package panels
|
||||||
|
|
||||||
#Graph: panel & {
|
#Graph: _panel & {
|
||||||
// Display values as a bar chart.
|
// Display values as a bar chart.
|
||||||
bars: bool | *false
|
bars: bool | *false
|
||||||
// Dashed line length.
|
// Dashed line length.
|
||||||
@ -17,7 +17,7 @@ package panels
|
|||||||
// Defaults.
|
// Defaults.
|
||||||
defaults: custom: {}
|
defaults: custom: {}
|
||||||
// Overrides.
|
// Overrides.
|
||||||
overrides: [...override]
|
overrides: [..._override]
|
||||||
}
|
}
|
||||||
// Amount of color fill for a series. Expects a value between 0 and 1.
|
// Amount of color fill for a series. Expects a value between 0 and 1.
|
||||||
fill: number & >=0 & <=1 | *1
|
fill: number & >=0 & <=1 | *1
|
||||||
@ -66,7 +66,7 @@ package panels
|
|||||||
// Options.
|
// Options.
|
||||||
options: {
|
options: {
|
||||||
// Data links.
|
// Data links.
|
||||||
dataLinks: [...dataLink]
|
dataLinks: [..._dataLink]
|
||||||
}
|
}
|
||||||
// Available when `stack` is true. Each series is drawn as a percentage of the
|
// Available when `stack` is true. Each series is drawn as a percentage of the
|
||||||
// total of all series.
|
// total of all series.
|
||||||
@ -111,7 +111,7 @@ package panels
|
|||||||
// Draws adjacent points as staircase.
|
// Draws adjacent points as staircase.
|
||||||
steppedLine: bool | *false
|
steppedLine: bool | *false
|
||||||
// Threshold config.
|
// Threshold config.
|
||||||
thresholds: thresholds
|
thresholds: _thresholds
|
||||||
// Time from.
|
// Time from.
|
||||||
timeFrom: string
|
timeFrom: string
|
||||||
// Time regions.
|
// Time regions.
|
||||||
|
@ -8,7 +8,7 @@ package panels
|
|||||||
// Name of default data source.
|
// Name of default data source.
|
||||||
datasource?: string
|
datasource?: string
|
||||||
// Grid position.
|
// Grid position.
|
||||||
gridPos?: gridPos
|
gridPos?: _gridPos
|
||||||
// Dashboard panels.
|
// Dashboard panels.
|
||||||
panels?: [...{}]
|
panels?: [...{}]
|
||||||
// Name of template variable to repeat for.
|
// Name of template variable to repeat for.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package panels
|
package panels
|
||||||
|
|
||||||
gridPos: {
|
_gridPos: {
|
||||||
// Panel height.
|
// Panel height.
|
||||||
h: int & >0 | *9
|
h: int & >0 | *9
|
||||||
// Panel width.
|
// Panel width.
|
||||||
|
@ -9,6 +9,6 @@ _link: {
|
|||||||
url: string
|
url: string
|
||||||
}
|
}
|
||||||
|
|
||||||
panelLink: _link
|
_panelLink: _link
|
||||||
|
|
||||||
dataLink: _link
|
_dataLink: _link
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package panels
|
package panels
|
||||||
|
|
||||||
mapping: {
|
_mapping: {
|
||||||
id: int
|
id: int
|
||||||
from: string
|
from: string
|
||||||
operator: string
|
operator: string
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package panels
|
package panels
|
||||||
|
|
||||||
override: {
|
_override: {
|
||||||
matcher: {
|
matcher: {
|
||||||
id: string
|
id: string
|
||||||
options: string
|
options: string
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package panels
|
package panels
|
||||||
|
|
||||||
panel: {
|
_panel: {
|
||||||
// Panel title.
|
// Panel title.
|
||||||
title?: string
|
title?: string
|
||||||
// Description.
|
// Description.
|
||||||
@ -10,9 +10,9 @@ panel: {
|
|||||||
// Name of default datasource.
|
// Name of default datasource.
|
||||||
datasource?: string
|
datasource?: string
|
||||||
// Grid position.
|
// Grid position.
|
||||||
gridPos?: gridPos
|
gridPos?: _gridPos
|
||||||
// Panel links.
|
// Panel links.
|
||||||
links?: [...panelLink]
|
links?: [..._panelLink]
|
||||||
// Name of template variable to repeat for.
|
// Name of template variable to repeat for.
|
||||||
repeat?: string
|
repeat?: string
|
||||||
// Direction to repeat in if 'repeat' is set.
|
// Direction to repeat in if 'repeat' is set.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package panels
|
package panels
|
||||||
|
|
||||||
thresholds: {
|
_thresholds: {
|
||||||
// Threshold mode.
|
// Threshold mode.
|
||||||
mode: string | *"absolute"
|
mode: string | *"absolute"
|
||||||
// Threshold steps.
|
// Threshold steps.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package variables
|
package variables
|
||||||
|
|
||||||
// Custom variables are for values that do not change.
|
// Custom variables are for values that do not change.
|
||||||
#Custom: variable & {
|
#Custom: _variable & {
|
||||||
// Options as comma separated values.
|
// Options as comma separated values.
|
||||||
query: string
|
query: string
|
||||||
// Variable type.
|
// Variable type.
|
||||||
|
@ -2,7 +2,7 @@ package variables
|
|||||||
|
|
||||||
// Data source variables allow you to quickly change the data source for an
|
// Data source variables allow you to quickly change the data source for an
|
||||||
// entire dashboard.
|
// entire dashboard.
|
||||||
#Datasource: variable & {
|
#Datasource: _variable & {
|
||||||
// Data source type.
|
// Data source type.
|
||||||
query: string
|
query: string
|
||||||
// Query value.
|
// Query value.
|
||||||
|
@ -2,7 +2,7 @@ package variables
|
|||||||
|
|
||||||
// Query variables allow you to write a data source query that can return a
|
// Query variables allow you to write a data source query that can return a
|
||||||
// list of metric names, tag values, or keys.
|
// list of metric names, tag values, or keys.
|
||||||
#Query: variable & {
|
#Query: _variable & {
|
||||||
// Data source to use.
|
// Data source to use.
|
||||||
datasource: string
|
datasource: string
|
||||||
// Definition.
|
// Definition.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package variables
|
package variables
|
||||||
|
|
||||||
variable: {
|
_variable: {
|
||||||
// Currently selected value.
|
// Currently selected value.
|
||||||
current: {
|
current: {
|
||||||
selected: bool | *false
|
selected: bool | *false
|
||||||
|
Loading…
Reference in New Issue
Block a user