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:
Chris Trott 2020-11-25 01:43:09 -05:00 committed by GitHub
parent 778476906b
commit 3d33de1751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 23 additions and 23 deletions

View File

@ -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: {

View File

@ -1,6 +1,6 @@
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.

View File

@ -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.

View File

@ -1,6 +1,6 @@
package panels
gridPos: {
_gridPos: {
// Panel height.
h: int & >0 | *9
// Panel width.

View File

@ -9,6 +9,6 @@ _link: {
url: string
}
panelLink: _link
_panelLink: _link
dataLink: _link
_dataLink: _link

View File

@ -1,6 +1,6 @@
package panels
mapping: {
_mapping: {
id: int
from: string
operator: string

View File

@ -1,6 +1,6 @@
package panels
override: {
_override: {
matcher: {
id: string
options: string

View File

@ -1,6 +1,6 @@
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.

View File

@ -1,6 +1,6 @@
package panels
thresholds: {
_thresholds: {
// Threshold mode.
mode: string | *"absolute"
// Threshold steps.

View File

@ -1,7 +1,7 @@
package variables
// Custom variables are for values that do not change.
#Custom: variable & {
#Custom: _variable & {
// Options as comma separated values.
query: string
// Variable type.

View File

@ -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.

View File

@ -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.

View File

@ -1,6 +1,6 @@
package variables
variable: {
_variable: {
// Currently selected value.
current: {
selected: bool | *false