Commit 3d33de17 by Chris Trott Committed by GitHub

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.
parent 77847690
......@@ -2,7 +2,7 @@ package panels
// Gauge is a single value panel that can repeat a gauge for every series,
// column or row.
#Gauge: panel & {
#Gauge: _panel & {
// Field config.
fieldConfig: {
// Defaults.
......@@ -22,14 +22,14 @@ package panels
// What to show when there is no value.
noValue: string
// Threshold config.
thresholds: thresholds
thresholds: _thresholds
// Mappings.
mappings: [...mapping]
mappings: [..._mapping]
// Data Links.
links: [...dataLink]
links: [..._dataLink]
}
// Overrides.
overrides: [...override]
overrides: [..._override]
}
// Options.
options: {
......
package panels
#Graph: panel & {
#Graph: _panel & {
// Display values as a bar chart.
bars: bool | *false
// Dashed line length.
......@@ -17,7 +17,7 @@ package panels
// Defaults.
defaults: custom: {}
// Overrides.
overrides: [...override]
overrides: [..._override]
}
// Amount of color fill for a series. Expects a value between 0 and 1.
fill: number & >=0 & <=1 | *1
......@@ -66,7 +66,7 @@ package panels
// Options.
options: {
// Data links.
dataLinks: [...dataLink]
dataLinks: [..._dataLink]
}
// Available when `stack` is true. Each series is drawn as a percentage of the
// total of all series.
......@@ -111,7 +111,7 @@ package panels
// Draws adjacent points as staircase.
steppedLine: bool | *false
// Threshold config.
thresholds: thresholds
thresholds: _thresholds
// Time from.
timeFrom: string
// Time regions.
......
......@@ -8,7 +8,7 @@ package panels
// Name of default data source.
datasource?: string
// Grid position.
gridPos?: gridPos
gridPos?: _gridPos
// Dashboard panels.
panels?: [...{}]
// Name of template variable to repeat for.
......
package panels
gridPos: {
_gridPos: {
// Panel height.
h: int & >0 | *9
// Panel width.
......
......@@ -9,6 +9,6 @@ _link: {
url: string
}
panelLink: _link
_panelLink: _link
dataLink: _link
_dataLink: _link
package panels
mapping: {
_mapping: {
id: int
from: string
operator: string
......
package panels
override: {
_override: {
matcher: {
id: string
options: string
......
package panels
panel: {
_panel: {
// Panel title.
title?: string
// Description.
......@@ -10,9 +10,9 @@ panel: {
// Name of default datasource.
datasource?: string
// Grid position.
gridPos?: gridPos
gridPos?: _gridPos
// Panel links.
links?: [...panelLink]
links?: [..._panelLink]
// Name of template variable to repeat for.
repeat?: string
// Direction to repeat in if 'repeat' is set.
......
package panels
thresholds: {
_thresholds: {
// Threshold mode.
mode: string | *"absolute"
// Threshold steps.
......
package variables
// Custom variables are for values that do not change.
#Custom: variable & {
#Custom: _variable & {
// Options as comma separated values.
query: string
// Variable type.
......
......@@ -2,7 +2,7 @@ package variables
// Data source variables allow you to quickly change the data source for an
// entire dashboard.
#Datasource: variable & {
#Datasource: _variable & {
// Data source type.
query: string
// Query value.
......
......@@ -2,7 +2,7 @@ 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 & {
#Query: _variable & {
// Data source to use.
datasource: string
// Definition.
......
package variables
variable: {
_variable: {
// Currently selected value.
current: {
selected: bool | *false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment