Chore: Remove docs and kinds report generators (#83277)

* Chore: Remove codegen for docs

* Remove kindsysreport
This commit is contained in:
Tania 2024-02-23 20:06:43 +01:00 committed by GitHub
parent 23963a1f34
commit 8895b43c85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
60 changed files with 0 additions and 9624 deletions

1
.github/CODEOWNERS vendored
View File

@ -271,7 +271,6 @@
/pkg/services/store/ @grafana/grafana-app-platform-squad
/pkg/infra/filestorage/ @grafana/grafana-app-platform-squad
/pkg/modules/ @grafana/grafana-app-platform-squad
/pkg/kindsysreport/ @grafana/grafana-app-platform-squad
/pkg/services/grpcserver/ @grafana/grafana-app-platform-squad
/pkg/generated @grafana/grafana-app-platform-squad

View File

@ -32,11 +32,5 @@ public/api-merged.json
public/api-enterprise-spec.json
public/openapi3.json
# Generated Kinds report
kinds/report.json
# Generated schema docs
docs/sources/developers/kinds/
# Crowdin files
public/locales/**/*.json

View File

@ -106,7 +106,6 @@ gen-cue: ## Do all CUE/Thema code generation
go generate ./pkg/plugins/plugindef
go generate ./kinds/gen.go
go generate ./public/app/plugins/gen.go
go generate ./pkg/kindsysreport/codegen/report.go
gen-go: $(WIRE)
@echo "generate go files"

View File

@ -1,36 +0,0 @@
---
_build:
list: false
labels:
products:
- enterprise
- oss
title: Grafana schema
weight: 200
---
# Grafana schema
> Grafanas schemas, kind system and related code generation are in active development.
Grafana is moving to a schema-centric model of development, where schemas are the single source of truth that specify
the shape of objects - for example, dashboards, datasources, users - in the frontend, backend, and plugin code.
Eventually, all of Grafanas object types will be schematized within the “Kind System.” Kinds, their schemas, the Kind
system rules, and associated code generators will collectively provide a clear, consistent foundation for Grafanas
APIs, documentation, persistent storage, clients, as-code tooling, and so forth.
Its exciting to imagine the possibilities that a crisp, consistent development workflow will enable - this is why
companies build [developer platforms](https://internaldeveloperplatform.org/)! At the same time, its also
overwhelming - any schema system that can meet Grafanas complex requirements will necessarily have a lot of moving
parts. Additionally, we must account for having Grafana continue to work as we make the transition - a prerequisite
for every large-scale refactoring.
In the Grafana ecosystem, there are three basic Kind categories and associated schema categories:
- [Core Kinds]({{< relref "core/" >}})
- Custom Kinds
- [Composable Kinds]({{< relref "composable/" >}})
The schema authoring workflow for each varies, as does the path to maturity.
[Grafana Kinds - From Zero to Maturity]({{< relref "maturity/" >}}) contains general reference material applicable to
all Kind-writing, and links to the guides for each category of Kind.

View File

@ -1,12 +0,0 @@
---
labels:
products:
- enterprise
- oss
title: Composable kinds
weight: 200
---
# Grafana composable kinds
{{< section >}}

View File

@ -1,33 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: AlertGroupsPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## AlertGroupsPanelCfg
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------|--------------------|----------|---------|-------------|
| `Options` | [object](#options) | **Yes** | | |
### Options
| Property | Type | Required | Default | Description |
|----------------|---------|----------|---------|-------------------------------------------------------------|
| `alertmanager` | string | **Yes** | | Name of the alertmanager used as a source for alerts |
| `expandAll` | boolean | **Yes** | | Expand all alert groups by default |
| `labels` | string | **Yes** | | Comma-separated list of values used to filter alert results |

View File

@ -1,40 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: AnnotationsListPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## AnnotationsListPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------|--------------------|----------|---------|-------------|
| `Options` | [object](#options) | **Yes** | | |
### Options
| Property | Type | Required | Default | Description |
|-------------------------|----------|----------|---------|-------------|
| `limit` | uint32 | **Yes** | `10` | |
| `navigateAfter` | string | **Yes** | `10m` | |
| `navigateBefore` | string | **Yes** | `10m` | |
| `navigateToPanel` | boolean | **Yes** | `true` | |
| `onlyFromThisDashboard` | boolean | **Yes** | `false` | |
| `onlyInTimeRange` | boolean | **Yes** | `false` | |
| `showTags` | boolean | **Yes** | `true` | |
| `showTime` | boolean | **Yes** | `true` | |
| `showUser` | boolean | **Yes** | `true` | |
| `tags` | string[] | **Yes** | | |

View File

@ -1,24 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: AzureMonitorDataQuery kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## AzureMonitorDataQuery
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|

View File

@ -1,183 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: BarChartPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## BarChartPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|---------------|------------------------|----------|---------|-------------|
| `FieldConfig` | [object](#fieldconfig) | **Yes** | | |
| `Options` | [object](#options) | **Yes** | | |
### FieldConfig
It extends [AxisConfig](#axisconfig) and [HideableFieldConfig](#hideablefieldconfig).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisCenteredZero` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisColorMode` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisLabel` | string | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisPlacement` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisSoftMin` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisWidth` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `fillOpacity` | integer | No | `80` | Controls the fill opacity of the bars.<br/>Constraint: `>=0 & <=100`. |
| `gradientMode` | string | No | | Set the mode of the gradient fill. Fill gradient is based on the line color. To change the color, use the standard color scheme field option.<br/>Gradient appearance is influenced by the Fill opacity setting. |
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [HideableFieldConfig](#hideablefieldconfig))*<br/>TODO docs |
| `lineWidth` | integer | No | `1` | Controls line width of the bars.<br/>Constraint: `>=0 & <=10`. |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs |
| `thresholdsStyle` | [GraphThresholdsStyleConfig](#graphthresholdsstyleconfig) | No | | TODO docs |
### AxisConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | |
| `axisCenteredZero` | boolean | No | | |
| `axisColorMode` | string | No | | TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | |
| `axisLabel` | string | No | | |
| `axisPlacement` | string | No | | TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | |
| `axisSoftMin` | number | No | | |
| `axisWidth` | number | No | | |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | TODO docs |
### ScaleDistributionConfig
TODO docs
| Property | Type | Required | Default | Description |
|-------------------|--------|----------|---------|--------------------------------------------------------------------------|
| `type` | string | **Yes** | | TODO docs<br/>Possible values are: `linear`, `log`, `ordinal`, `symlog`. |
| `linearThreshold` | number | No | | |
| `log` | number | No | | |
### GraphThresholdsStyleConfig
TODO docs
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-----------------------------------------------------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `off`, `line`, `dashed`, `area`, `line+area`, `dashed+area`, `series`. |
### HideSeriesConfig
TODO docs
| Property | Type | Required | Default | Description |
|-----------|---------|----------|---------|-------------|
| `legend` | boolean | **Yes** | | |
| `tooltip` | boolean | **Yes** | | |
| `viz` | boolean | **Yes** | | |
### HideableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|---------------------------------------|----------|---------|-------------|
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | TODO docs |
### Options
It extends [OptionsWithLegend](#optionswithlegend) and [OptionsWithTooltip](#optionswithtooltip) and [OptionsWithTextFormatting](#optionswithtextformatting).
| Property | Type | Required | Default | Description |
|-----------------------|-------------------------------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------|
| `barWidth` | number | **Yes** | `0.97` | Controls the width of bars. 1 = Max width, 0 = Min width.<br/>Constraint: `>=0 & <=1`. |
| `fullHighlight` | boolean | **Yes** | `false` | Enables mode which highlights the entire bar area and shows tooltip when cursor<br/>hovers over highlighted area |
| `groupWidth` | number | **Yes** | `0.7` | Controls the width of groups. 1 = max with, 0 = min width.<br/>Constraint: `>=0 & <=1`. |
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | *(Inherited from [OptionsWithLegend](#optionswithlegend))*<br/>TODO docs |
| `orientation` | string | **Yes** | | Controls the orientation of the bar chart, either vertical or horizontal. |
| `showValue` | string | **Yes** | | This controls whether values are shown on top or to the left of bars. |
| `stacking` | string | **Yes** | | Controls whether bars are stacked or not, either normally or in percent mode. |
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | *(Inherited from [OptionsWithTooltip](#optionswithtooltip))*<br/>TODO docs |
| `xTickLabelMaxLength` | integer | **Yes** | | Sets the max length that a label can have before it is truncated.<br/>Constraint: `>=0 & <=2147483647`. |
| `xTickLabelRotation` | integer | **Yes** | `0` | Controls the rotation of the x axis labels.<br/>Constraint: `>=-90 & <=90`. |
| `barRadius` | number | No | `0` | Controls the radius of each bar.<br/>Constraint: `>=0 & <=0.5`. |
| `colorByField` | string | No | | Use the color value for a sibling field to color each bar value. |
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | *(Inherited from [OptionsWithTextFormatting](#optionswithtextformatting))*<br/>TODO docs |
| `xField` | string | No | | Manually select which field from the dataset to represent the x field. |
| `xTickLabelSpacing` | int32 | No | `0` | Controls the spacing between x axis labels.<br/>negative values indicate backwards skipping behavior |
### OptionsWithLegend
TODO docs
| Property | Type | Required | Default | Description |
|----------|---------------------------------------|----------|---------|-------------|
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | TODO docs |
### VizLegendOptions
TODO docs
| Property | Type | Required | Default | Description |
|---------------|----------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | |
| `displayMode` | string | **Yes** | | TODO docs<br/>Note: "hidden" needs to remain as an option for plugins compatibility<br/>Possible values are: `list`, `table`, `hidden`. |
| `placement` | string | **Yes** | | TODO docs<br/>Possible values are: `bottom`, `right`. |
| `showLegend` | boolean | **Yes** | | |
| `asTable` | boolean | No | | |
| `isVisible` | boolean | No | | |
| `sortBy` | string | No | | |
| `sortDesc` | boolean | No | | |
| `width` | number | No | | |
### OptionsWithTextFormatting
TODO docs
| Property | Type | Required | Default | Description |
|----------|-------------------------------------------------|----------|---------|-------------|
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | TODO docs |
### VizTextDisplayOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|--------------------------|
| `titleSize` | number | No | | Explicit title text size |
| `valueSize` | number | No | | Explicit value text size |
### OptionsWithTooltip
TODO docs
| Property | Type | Required | Default | Description |
|-----------|-----------------------------------------|----------|---------|-------------|
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | TODO docs |
### VizTooltipOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|---------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `single`, `multi`, `none`. |
| `sort` | string | **Yes** | | TODO docs<br/>Possible values are: `asc`, `desc`, `none`. |
| `maxHeight` | number | No | | |
| `maxWidth` | number | No | | |

View File

@ -1,83 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: BarGaugePanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## BarGaugePanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------|--------------------|----------|---------|-------------|
| `Options` | [object](#options) | **Yes** | | |
### Options
It extends [SingleStatBaseOptions](#singlestatbaseoptions).
| Property | Type | Required | Default | Description |
|-----------------|-------------------------------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| `displayMode` | string | **Yes** | | Enum expressing the possible display modes<br/>for the bar gauge component of Grafana UI<br/>Possible values are: `basic`, `lcd`, `gradient`. |
| `maxVizHeight` | uint32 | **Yes** | `300` | |
| `minVizHeight` | uint32 | **Yes** | `16` | |
| `minVizWidth` | uint32 | **Yes** | `8` | |
| `namePlacement` | string | **Yes** | | Allows for the bar gauge name to be placed explicitly<br/>Possible values are: `auto`, `top`, `left`. |
| `showUnfilled` | boolean | **Yes** | `true` | |
| `sizing` | string | **Yes** | | Allows for the bar gauge size to be set explicitly<br/>Possible values are: `auto`, `manual`. |
| `valueMode` | string | **Yes** | | Allows for the table cell gauge display type to set the gauge mode.<br/>Possible values are: `color`, `text`, `hidden`. |
| `orientation` | string | No | | *(Inherited from [SingleStatBaseOptions](#singlestatbaseoptions))*<br/>TODO docs<br/>Possible values are: `auto`, `vertical`, `horizontal`. |
| `reduceOptions` | [ReduceDataOptions](#reducedataoptions) | No | | *(Inherited from [SingleStatBaseOptions](#singlestatbaseoptions))*<br/>TODO docs |
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | *(Inherited from [SingleStatBaseOptions](#singlestatbaseoptions))*<br/>TODO docs |
### ReduceDataOptions
TODO docs
| Property | Type | Required | Default | Description |
|----------|----------|----------|---------|---------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | When !values, pick one value for the whole field |
| `fields` | string | No | | Which fields to show. By default this is only numeric fields |
| `limit` | number | No | | if showing all values limit |
| `values` | boolean | No | | If true show each row value |
### SingleStatBaseOptions
TODO docs
It extends [OptionsWithTextFormatting](#optionswithtextformatting).
| Property | Type | Required | Default | Description |
|-----------------|-------------------------------------------------|----------|---------|------------------------------------------------------------------------------------------|
| `orientation` | string | **Yes** | | TODO docs<br/>Possible values are: `auto`, `vertical`, `horizontal`. |
| `reduceOptions` | [ReduceDataOptions](#reducedataoptions) | **Yes** | | TODO docs |
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | *(Inherited from [OptionsWithTextFormatting](#optionswithtextformatting))*<br/>TODO docs |
### OptionsWithTextFormatting
TODO docs
| Property | Type | Required | Default | Description |
|----------|-------------------------------------------------|----------|---------|-------------|
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | TODO docs |
### VizTextDisplayOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|--------------------------|
| `titleSize` | number | No | | Explicit title text size |
| `valueSize` | number | No | | Explicit value text size |

View File

@ -1,277 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: CandlestickPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## CandlestickPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------------------|---------------------------------------|----------|---------|-------------------------------------------------------------|
| `CandleStyle` | string | **Yes** | | Possible values are: `candles`, `ohlcbars`. |
| `CandlestickColors` | [object](#candlestickcolors) | **Yes** | | |
| `CandlestickFieldMap` | [object](#candlestickfieldmap) | **Yes** | | |
| `ColorStrategy` | string | **Yes** | | Possible values are: `open-close`, `close-close`. |
| `FieldConfig` | [GraphFieldConfig](#graphfieldconfig) | **Yes** | | TODO docs |
| `Options` | [object](#options) | **Yes** | | |
| `VizDisplayMode` | string | **Yes** | | Possible values are: `candles+volume`, `candles`, `volume`. |
### CandlestickColors
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------|
| `down` | string | **Yes** | `red` | |
| `flat` | string | **Yes** | `gray` | |
| `up` | string | **Yes** | `green` | |
### CandlestickFieldMap
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|------------------------------------------------------------------------------|
| `close` | string | No | | Corresponds to the final (end) value of the given period |
| `high` | string | No | | Corresponds to the highest value of the given period |
| `low` | string | No | | Corresponds to the lowest value of the given period |
| `open` | string | No | | Corresponds to the starting value of the given period |
| `volume` | string | No | | Corresponds to the sample count in the given period. (e.g. number of trades) |
### GraphFieldConfig
TODO docs
It extends [LineConfig](#lineconfig) and [FillConfig](#fillconfig) and [PointsConfig](#pointsconfig) and [AxisConfig](#axisconfig) and [BarConfig](#barconfig) and [StackableFieldConfig](#stackablefieldconfig) and [HideableFieldConfig](#hideablefieldconfig).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisCenteredZero` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisColorMode` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisLabel` | string | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisPlacement` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisSoftMin` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisWidth` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `barAlignment` | integer | No | | *(Inherited from [BarConfig](#barconfig))*<br/>TODO docs<br/>Possible values are: `-1`, `0`, `1`. |
| `barMaxWidth` | number | No | | *(Inherited from [BarConfig](#barconfig))* |
| `barWidthFactor` | number | No | | *(Inherited from [BarConfig](#barconfig))* |
| `drawStyle` | string | No | | TODO docs<br/>Possible values are: `line`, `bars`, `points`. |
| `fillBelowTo` | string | No | | *(Inherited from [FillConfig](#fillconfig))* |
| `fillColor` | string | No | | *(Inherited from [FillConfig](#fillconfig))* |
| `fillOpacity` | number | No | | *(Inherited from [FillConfig](#fillconfig))* |
| `gradientMode` | string | No | | TODO docs<br/>Possible values are: `none`, `opacity`, `hue`, `scheme`. |
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [HideableFieldConfig](#hideablefieldconfig))*<br/>TODO docs |
| `lineColor` | string | No | | *(Inherited from [LineConfig](#lineconfig))* |
| `lineInterpolation` | string | No | | *(Inherited from [LineConfig](#lineconfig))*<br/>TODO docs<br/>Possible values are: `linear`, `smooth`, `stepBefore`, `stepAfter`. |
| `lineStyle` | [LineStyle](#linestyle) | No | | *(Inherited from [LineConfig](#lineconfig))*<br/>TODO docs |
| `lineWidth` | number | No | | *(Inherited from [LineConfig](#lineconfig))* |
| `pointColor` | string | No | | *(Inherited from [PointsConfig](#pointsconfig))* |
| `pointSize` | number | No | | *(Inherited from [PointsConfig](#pointsconfig))* |
| `pointSymbol` | string | No | | *(Inherited from [PointsConfig](#pointsconfig))* |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs |
| `showPoints` | string | No | | *(Inherited from [PointsConfig](#pointsconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `never`, `always`. |
| `spanNulls` | | No | | *(Inherited from [LineConfig](#lineconfig))*<br/>Indicate if null values should be treated as gaps or connected.<br/>When the value is a number, it represents the maximum delta in the<br/>X axis that should be considered connected. For timeseries, this is milliseconds |
| `stacking` | [StackingConfig](#stackingconfig) | No | | *(Inherited from [StackableFieldConfig](#stackablefieldconfig))*<br/>TODO docs |
| `thresholdsStyle` | [GraphThresholdsStyleConfig](#graphthresholdsstyleconfig) | No | | TODO docs |
| `transform` | string | No | | TODO docs<br/>Possible values are: `constant`, `negative-Y`. |
### AxisConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | |
| `axisCenteredZero` | boolean | No | | |
| `axisColorMode` | string | No | | TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | |
| `axisLabel` | string | No | | |
| `axisPlacement` | string | No | | TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | |
| `axisSoftMin` | number | No | | |
| `axisWidth` | number | No | | |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | TODO docs |
### ScaleDistributionConfig
TODO docs
| Property | Type | Required | Default | Description |
|-------------------|--------|----------|---------|--------------------------------------------------------------------------|
| `type` | string | **Yes** | | TODO docs<br/>Possible values are: `linear`, `log`, `ordinal`, `symlog`. |
| `linearThreshold` | number | No | | |
| `log` | number | No | | |
### BarConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------------|---------|----------|---------|----------------------------------------------------|
| `barAlignment` | integer | No | | TODO docs<br/>Possible values are: `-1`, `0`, `1`. |
| `barMaxWidth` | number | No | | |
| `barWidthFactor` | number | No | | |
### FillConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------|--------|----------|---------|-------------|
| `fillBelowTo` | string | No | | |
| `fillColor` | string | No | | |
| `fillOpacity` | number | No | | |
### GraphThresholdsStyleConfig
TODO docs
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-----------------------------------------------------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `off`, `line`, `dashed`, `area`, `line+area`, `dashed+area`, `series`. |
### HideSeriesConfig
TODO docs
| Property | Type | Required | Default | Description |
|-----------|---------|----------|---------|-------------|
| `legend` | boolean | **Yes** | | |
| `tooltip` | boolean | **Yes** | | |
| `viz` | boolean | **Yes** | | |
### HideableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|---------------------------------------|----------|---------|-------------|
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | TODO docs |
### LineConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------------|-------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `lineColor` | string | No | | |
| `lineInterpolation` | string | No | | TODO docs<br/>Possible values are: `linear`, `smooth`, `stepBefore`, `stepAfter`. |
| `lineStyle` | [LineStyle](#linestyle) | No | | TODO docs |
| `lineWidth` | number | No | | |
| `spanNulls` | | No | | Indicate if null values should be treated as gaps or connected.<br/>When the value is a number, it represents the maximum delta in the<br/>X axis that should be considered connected. For timeseries, this is milliseconds |
### LineStyle
TODO docs
| Property | Type | Required | Default | Description |
|----------|----------|----------|---------|--------------------------------------------------------|
| `dash` | number[] | No | | |
| `fill` | string | No | | Possible values are: `solid`, `dash`, `dot`, `square`. |
### PointsConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------|--------|----------|---------|---------------------------------------------------------------|
| `pointColor` | string | No | | |
| `pointSize` | number | No | | |
| `pointSymbol` | string | No | | |
| `showPoints` | string | No | | TODO docs<br/>Possible values are: `auto`, `never`, `always`. |
### StackableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|-----------------------------------|----------|---------|-------------|
| `stacking` | [StackingConfig](#stackingconfig) | No | | TODO docs |
### StackingConfig
TODO docs
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-----------------------------------------------------------------|
| `group` | string | No | | |
| `mode` | string | No | | TODO docs<br/>Possible values are: `none`, `normal`, `percent`. |
### Options
It extends [OptionsWithLegend](#optionswithlegend) and [OptionsWithTooltip](#optionswithtooltip).
| Property | Type | Required | Default | Description |
|--------------------|-----------------------------------------|----------|---------|----------------------------------------------------------------------------|
| `candleStyle` | string | **Yes** | | Sets the style of the candlesticks |
| `colorStrategy` | string | **Yes** | | Sets the color strategy for the candlesticks |
| `colors` | [CandlestickColors](#candlestickcolors) | **Yes** | | |
| `fields` | [object](#fields) | **Yes** | `map[]` | Map fields to appropriate dimension |
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | *(Inherited from [OptionsWithLegend](#optionswithlegend))*<br/>TODO docs |
| `mode` | string | **Yes** | | Sets which dimensions are used for the visualization |
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | *(Inherited from [OptionsWithTooltip](#optionswithtooltip))*<br/>TODO docs |
| `includeAllFields` | boolean | No | `false` | When enabled, all fields will be sent to the graph |
### OptionsWithLegend
TODO docs
| Property | Type | Required | Default | Description |
|----------|---------------------------------------|----------|---------|-------------|
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | TODO docs |
### VizLegendOptions
TODO docs
| Property | Type | Required | Default | Description |
|---------------|----------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | |
| `displayMode` | string | **Yes** | | TODO docs<br/>Note: "hidden" needs to remain as an option for plugins compatibility<br/>Possible values are: `list`, `table`, `hidden`. |
| `placement` | string | **Yes** | | TODO docs<br/>Possible values are: `bottom`, `right`. |
| `showLegend` | boolean | **Yes** | | |
| `asTable` | boolean | No | | |
| `isVisible` | boolean | No | | |
| `sortBy` | string | No | | |
| `sortDesc` | boolean | No | | |
| `width` | number | No | | |
### OptionsWithTooltip
TODO docs
| Property | Type | Required | Default | Description |
|-----------|-----------------------------------------|----------|---------|-------------|
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | TODO docs |
### VizTooltipOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|---------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `single`, `multi`, `none`. |
| `sort` | string | **Yes** | | TODO docs<br/>Possible values are: `asc`, `desc`, `none`. |
| `maxHeight` | number | No | | |
| `maxWidth` | number | No | | |
### Fields
Map fields to appropriate dimension
| Property | Type | Required | Default | Description |
|----------|-----------------------------------|----------|---------|-------------|
| `object` | Possible types are: [](#), [](#). | | |

View File

@ -1,160 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: CanvasPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## CanvasPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-------------------------|----------------------------------|----------|---------|-----------------------------------------------------------------------|
| `BackgroundConfig` | [object](#backgroundconfig) | **Yes** | | |
| `BackgroundImageSize` | string | **Yes** | | Possible values are: `original`, `contain`, `cover`, `fill`, `tile`. |
| `CanvasConnection` | [object](#canvasconnection) | **Yes** | | |
| `CanvasElementOptions` | [object](#canvaselementoptions) | **Yes** | | |
| `ConnectionCoordinates` | [object](#connectioncoordinates) | **Yes** | | |
| `ConnectionPath` | string | **Yes** | | Possible values are: `straight`. |
| `Constraint` | [object](#constraint) | **Yes** | | |
| `HorizontalConstraint` | string | **Yes** | | Possible values are: `left`, `right`, `leftright`, `center`, `scale`. |
| `HttpRequestMethod` | string | **Yes** | | Possible values are: `GET`, `POST`, `PUT`. |
| `LineConfig` | [object](#lineconfig) | **Yes** | | |
| `Options` | [object](#options) | **Yes** | | |
| `Placement` | [object](#placement) | **Yes** | | |
| `VerticalConstraint` | string | **Yes** | | Possible values are: `top`, `bottom`, `topbottom`, `center`, `scale`. |
### BackgroundConfig
| Property | Type | Required | Default | Description |
|----------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------|
| `color` | [ColorDimensionConfig](#colordimensionconfig) | No | | |
| `image` | [ResourceDimensionConfig](#resourcedimensionconfig) | No | | Links to a resource (image/svg path) |
| `size` | string | No | | Possible values are: `original`, `contain`, `cover`, `fill`, `tile`. |
### ColorDimensionConfig
It extends [BaseDimensionConfig](#basedimensionconfig).
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|--------------------------------------------------------------------------------------------------------------|
| `field` | string | No | | *(Inherited from [BaseDimensionConfig](#basedimensionconfig))*<br/>fixed: T -- will be added by each element |
| `fixed` | string | No | | |
### BaseDimensionConfig
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------------------------------------|
| `field` | string | No | | fixed: T -- will be added by each element |
### ResourceDimensionConfig
Links to a resource (image/svg path)
It extends [BaseDimensionConfig](#basedimensionconfig).
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|--------------------------------------------------------------------------------------------------------------|
| `mode` | string | **Yes** | | Possible values are: `fixed`, `field`, `mapping`. |
| `field` | string | No | | *(Inherited from [BaseDimensionConfig](#basedimensionconfig))*<br/>fixed: T -- will be added by each element |
| `fixed` | string | No | | |
### CanvasConnection
| Property | Type | Required | Default | Description |
|--------------|-------------------------------------------------|----------|---------|----------------------------------|
| `path` | string | **Yes** | | Possible values are: `straight`. |
| `source` | [ConnectionCoordinates](#connectioncoordinates) | **Yes** | | |
| `target` | [ConnectionCoordinates](#connectioncoordinates) | **Yes** | | |
| `color` | [ColorDimensionConfig](#colordimensionconfig) | No | | |
| `size` | [ScaleDimensionConfig](#scaledimensionconfig) | No | | |
| `targetName` | string | No | | |
### ConnectionCoordinates
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------|
| `x` | number | **Yes** | | |
| `y` | number | **Yes** | | |
### ScaleDimensionConfig
It extends [BaseDimensionConfig](#basedimensionconfig).
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|--------------------------------------------------------------------------------------------------------------|
| `max` | number | **Yes** | | |
| `min` | number | **Yes** | | |
| `field` | string | No | | *(Inherited from [BaseDimensionConfig](#basedimensionconfig))*<br/>fixed: T -- will be added by each element |
| `fixed` | number | No | | |
| `mode` | string | No | | Possible values are: `linear`, `quad`. |
### CanvasElementOptions
| Property | Type | Required | Default | Description |
|---------------|-----------------------------------------|----------|---------|---------------------------------------------------------|
| `name` | string | **Yes** | | |
| `type` | string | **Yes** | | |
| `background` | [BackgroundConfig](#backgroundconfig) | No | | |
| `border` | [LineConfig](#lineconfig) | No | | |
| `config` | | No | | TODO: figure out how to define this (element config(s)) |
| `connections` | [CanvasConnection](#canvasconnection)[] | No | | |
| `constraint` | [Constraint](#constraint) | No | | |
| `placement` | [Placement](#placement) | No | | |
### Constraint
| Property | Type | Required | Default | Description |
|--------------|--------|----------|---------|-----------------------------------------------------------------------|
| `horizontal` | string | No | | Possible values are: `left`, `right`, `leftright`, `center`, `scale`. |
| `vertical` | string | No | | Possible values are: `top`, `bottom`, `topbottom`, `center`, `scale`. |
### LineConfig
| Property | Type | Required | Default | Description |
|----------|-----------------------------------------------|----------|---------|-------------|
| `color` | [ColorDimensionConfig](#colordimensionconfig) | No | | |
| `width` | number | No | | |
### Placement
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------|
| `bottom` | number | No | | |
| `height` | number | No | | |
| `left` | number | No | | |
| `right` | number | No | | |
| `top` | number | No | | |
| `width` | number | No | | |
### Options
| Property | Type | Required | Default | Description |
|---------------------|-----------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------|
| `inlineEditing` | boolean | **Yes** | `true` | Enable inline editing |
| `panZoom` | boolean | **Yes** | `true` | Enable pan and zoom |
| `root` | [object](#root) | **Yes** | | The root element of canvas (frame), where all canvas elements are nested<br/>TODO: Figure out how to define a default value for this |
| `showAdvancedTypes` | boolean | **Yes** | `true` | Show all available element types |
### Root
The root element of canvas (frame), where all canvas elements are nested
TODO: Figure out how to define a default value for this
| Property | Type | Required | Default | Description |
|------------|-------------------------------------------------|----------|---------|----------------------------------------------------------------|
| `elements` | [CanvasElementOptions](#canvaselementoptions)[] | **Yes** | | The list of canvas elements attached to the root element |
| `name` | string | **Yes** | | Name of the root element |
| `type` | string | **Yes** | | Type of root element (frame)<br/>Possible values are: `frame`. |

View File

@ -1,24 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: CloudWatchDataQuery kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## CloudWatchDataQuery
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|

View File

@ -1,41 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: DashboardListPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## DashboardListPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------|--------------------|----------|---------|-------------|
| `Options` | [object](#options) | **Yes** | | |
### Options
| Property | Type | Required | Default | Description |
|----------------------|----------|----------|---------|-----------------------------------------------------------------|
| `includeVars` | boolean | **Yes** | `false` | |
| `keepTime` | boolean | **Yes** | `false` | |
| `maxItems` | integer | **Yes** | `10` | |
| `query` | string | **Yes** | `` | |
| `showHeadings` | boolean | **Yes** | `true` | |
| `showRecentlyViewed` | boolean | **Yes** | `false` | |
| `showSearch` | boolean | **Yes** | `false` | |
| `showStarred` | boolean | **Yes** | `true` | |
| `tags` | string[] | **Yes** | | |
| `folderId` | integer | No | | folderId is deprecated, and migrated to folderUid on panel init |
| `folderUID` | string | No | | |

View File

@ -1,31 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: DatagridPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## DatagridPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------|--------------------|----------|---------|-------------|
| `Options` | [object](#options) | **Yes** | | |
### Options
| Property | Type | Required | Default | Description |
|------------------|---------|----------|---------|-----------------------------------|
| `selectedSeries` | integer | **Yes** | `0` | Constraint: `>=0 & <=2147483647`. |

View File

@ -1,42 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: DebugPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## DebugPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|----------------|-------------------------|----------|---------|---------------------------------------------------------------------------|
| `DebugMode` | string | **Yes** | | Possible values are: `render`, `events`, `cursor`, `State`, `ThrowError`. |
| `Options` | [object](#options) | **Yes** | | |
| `UpdateConfig` | [object](#updateconfig) | **Yes** | | |
### Options
| Property | Type | Required | Default | Description |
|------------|-------------------------------|----------|---------|---------------------------------------------------------------------------|
| `mode` | string | **Yes** | | Possible values are: `render`, `events`, `cursor`, `State`, `ThrowError`. |
| `counters` | [UpdateConfig](#updateconfig) | No | | |
### UpdateConfig
| Property | Type | Required | Default | Description |
|-----------------|---------|----------|---------|-------------|
| `dataChanged` | boolean | **Yes** | | |
| `render` | boolean | **Yes** | | |
| `schemaChanged` | boolean | **Yes** | | |

View File

@ -1,283 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: ElasticsearchDataQuery kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## ElasticsearchDataQuery
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|--------------|-------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `refId` | string | **Yes** | | A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `alias` | string | No | | Alias pattern |
| `bucketAggs` | [BucketAggregation](#bucketaggregation)[] | No | | List of bucket aggregations |
| `datasource` | | No | | For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `hide` | boolean | No | | true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `metrics` | [MetricAggregation](#metricaggregation)[] | No | | List of metric aggregations |
| `queryType` | string | No | | Specify the query flavor<br/>TODO make this required and give it a default |
| `query` | string | No | | Lucene query |
| `timeField` | string | No | | Name of time field |
### BucketAggregation
| Property | Type | Required | Default | Description |
|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|-------------|
| `object` | Possible types are: [DateHistogram](#datehistogram), [Histogram](#histogram), [Terms](#terms), [Filters](#filters), [GeoHashGrid](#geohashgrid), [Nested](#nested). | | |
### DateHistogram
It extends [BucketAggregationWithField](#bucketaggregationwithfield).
| Property | Type | Required | Default | Description |
|------------|--------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))*<br/>Possible values are: `terms`, `filters`, `geohash_grid`, `date_histogram`, `histogram`, `nested`. |
| `field` | string | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
| `id` | string | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
| `settings` | | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
### BucketAggregationWithField
It extends [BaseBucketAggregation](#basebucketaggregation).
| Property | Type | Required | Default | Description |
|------------|--------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `id` | string | **Yes** | | *(Inherited from [BaseBucketAggregation](#basebucketaggregation))* |
| `type` | string | **Yes** | | *(Inherited from [BaseBucketAggregation](#basebucketaggregation))*<br/>Possible values are: `terms`, `filters`, `geohash_grid`, `date_histogram`, `histogram`, `nested`. |
| `field` | string | No | | |
| `settings` | | No | | *(Inherited from [BaseBucketAggregation](#basebucketaggregation))* |
### BaseBucketAggregation
| Property | Type | Required | Default | Description |
|------------|--------|----------|---------|---------------------------------------------------------------------------------------------------|
| `id` | string | **Yes** | | |
| `type` | string | **Yes** | | Possible values are: `terms`, `filters`, `geohash_grid`, `date_histogram`, `histogram`, `nested`. |
| `settings` | | No | | |
### Filters
It extends [BaseBucketAggregation](#basebucketaggregation).
| Property | Type | Required | Default | Description |
|------------|--------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `id` | string | **Yes** | | *(Inherited from [BaseBucketAggregation](#basebucketaggregation))* |
| `type` | string | **Yes** | | *(Inherited from [BaseBucketAggregation](#basebucketaggregation))*<br/>Possible values are: `terms`, `filters`, `geohash_grid`, `date_histogram`, `histogram`, `nested`. |
| `settings` | | No | | *(Inherited from [BaseBucketAggregation](#basebucketaggregation))* |
### GeoHashGrid
It extends [BucketAggregationWithField](#bucketaggregationwithfield).
| Property | Type | Required | Default | Description |
|------------|--------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))*<br/>Possible values are: `terms`, `filters`, `geohash_grid`, `date_histogram`, `histogram`, `nested`. |
| `field` | string | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
| `id` | string | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
| `settings` | | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
### Histogram
It extends [BucketAggregationWithField](#bucketaggregationwithfield).
| Property | Type | Required | Default | Description |
|------------|--------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))*<br/>Possible values are: `terms`, `filters`, `geohash_grid`, `date_histogram`, `histogram`, `nested`. |
| `field` | string | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
| `id` | string | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
| `settings` | | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
### Nested
It extends [BucketAggregationWithField](#bucketaggregationwithfield).
| Property | Type | Required | Default | Description |
|------------|--------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))*<br/>Possible values are: `terms`, `filters`, `geohash_grid`, `date_histogram`, `histogram`, `nested`. |
| `field` | string | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
| `id` | string | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
| `settings` | | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
### Terms
It extends [BucketAggregationWithField](#bucketaggregationwithfield).
| Property | Type | Required | Default | Description |
|------------|--------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))*<br/>Possible values are: `terms`, `filters`, `geohash_grid`, `date_histogram`, `histogram`, `nested`. |
| `field` | string | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
| `id` | string | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
| `settings` | | No | | *(Inherited from [BucketAggregationWithField](#bucketaggregationwithfield))* |
### MetricAggregation
| Property | Type | Required | Default | Description |
|----------|------------------------------------------------------------------------------------------------------|----------|---------|-------------|
| `object` | Possible types are: [Count](#count), [PipelineMetricAggregation](#pipelinemetricaggregation), [](#). | | |
### Count
It extends [BaseMetricAggregation](#basemetricaggregation).
| Property | Type | Required | Default | Description |
|----------|---------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `id` | string | **Yes** | | *(Inherited from [BaseMetricAggregation](#basemetricaggregation))* |
| `type` | string | **Yes** | | *(Inherited from [BaseMetricAggregation](#basemetricaggregation))*<br/>Possible values are: `count`, `avg`, `sum`, `min`, `max`, `extended_stats`, `percentiles`, `cardinality`, `raw_document`, `raw_data`, `logs`, `rate`, `top_metrics`, `moving_avg`, `moving_fn`, `derivative`, `serial_diff`, `cumulative_sum`, `bucket_script`. |
| `hide` | boolean | No | | *(Inherited from [BaseMetricAggregation](#basemetricaggregation))* |
### BaseMetricAggregation
| Property | Type | Required | Default | Description |
|----------|---------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `id` | string | **Yes** | | |
| `type` | string | **Yes** | | Possible values are: `count`, `avg`, `sum`, `min`, `max`, `extended_stats`, `percentiles`, `cardinality`, `raw_document`, `raw_data`, `logs`, `rate`, `top_metrics`, `moving_avg`, `moving_fn`, `derivative`, `serial_diff`, `cumulative_sum`, `bucket_script`. |
| `hide` | boolean | No | | |
### PipelineMetricAggregation
| Property | Type | Required | Default | Description |
|----------|-------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|-------------|
| `object` | Possible types are: [MovingAverage](#movingaverage), [Derivative](#derivative), [CumulativeSum](#cumulativesum), [BucketScript](#bucketscript). | | |
### BucketScript
It extends [PipelineMetricAggregationWithMultipleBucketPaths](#pipelinemetricaggregationwithmultiplebucketpaths).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | *(Inherited from [PipelineMetricAggregationWithMultipleBucketPaths](#pipelinemetricaggregationwithmultiplebucketpaths))*<br/>Possible values are: `count`, `avg`, `sum`, `min`, `max`, `extended_stats`, `percentiles`, `cardinality`, `raw_document`, `raw_data`, `logs`, `rate`, `top_metrics`, `moving_avg`, `moving_fn`, `derivative`, `serial_diff`, `cumulative_sum`, `bucket_script`. |
| `hide` | boolean | No | | *(Inherited from [PipelineMetricAggregationWithMultipleBucketPaths](#pipelinemetricaggregationwithmultiplebucketpaths))* |
| `id` | string | No | | *(Inherited from [PipelineMetricAggregationWithMultipleBucketPaths](#pipelinemetricaggregationwithmultiplebucketpaths))* |
| `pipelineVariables` | [PipelineVariable](#pipelinevariable)[] | No | | *(Inherited from [PipelineMetricAggregationWithMultipleBucketPaths](#pipelinemetricaggregationwithmultiplebucketpaths))* |
| `settings` | [object](#settings) | No | | |
### PipelineMetricAggregationWithMultipleBucketPaths
It extends [BaseMetricAggregation](#basemetricaggregation).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `id` | string | **Yes** | | *(Inherited from [BaseMetricAggregation](#basemetricaggregation))* |
| `type` | string | **Yes** | | *(Inherited from [BaseMetricAggregation](#basemetricaggregation))*<br/>Possible values are: `count`, `avg`, `sum`, `min`, `max`, `extended_stats`, `percentiles`, `cardinality`, `raw_document`, `raw_data`, `logs`, `rate`, `top_metrics`, `moving_avg`, `moving_fn`, `derivative`, `serial_diff`, `cumulative_sum`, `bucket_script`. |
| `hide` | boolean | No | | *(Inherited from [BaseMetricAggregation](#basemetricaggregation))* |
| `pipelineVariables` | [PipelineVariable](#pipelinevariable)[] | No | | |
### PipelineVariable
| Property | Type | Required | Default | Description |
|---------------|--------|----------|---------|-------------|
| `name` | string | **Yes** | | |
| `pipelineAgg` | string | **Yes** | | |
### Settings
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
| `script` | | No | | |
### CumulativeSum
It extends [BasePipelineMetricAggregation](#basepipelinemetricaggregation).
| Property | Type | Required | Default | Description |
|---------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))*<br/>Possible values are: `count`, `avg`, `sum`, `min`, `max`, `extended_stats`, `percentiles`, `cardinality`, `raw_document`, `raw_data`, `logs`, `rate`, `top_metrics`, `moving_avg`, `moving_fn`, `derivative`, `serial_diff`, `cumulative_sum`, `bucket_script`. |
| `field` | string | No | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))* |
| `hide` | boolean | No | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))* |
| `id` | string | No | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))* |
| `pipelineAgg` | string | No | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))* |
| `settings` | [object](#settings) | No | | |
### BasePipelineMetricAggregation
It extends [MetricAggregationWithField](#metricaggregationwithfield).
| Property | Type | Required | Default | Description |
|---------------|---------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | *(Inherited from [MetricAggregationWithField](#metricaggregationwithfield))*<br/>Possible values are: `count`, `avg`, `sum`, `min`, `max`, `extended_stats`, `percentiles`, `cardinality`, `raw_document`, `raw_data`, `logs`, `rate`, `top_metrics`, `moving_avg`, `moving_fn`, `derivative`, `serial_diff`, `cumulative_sum`, `bucket_script`. |
| `field` | string | No | | *(Inherited from [MetricAggregationWithField](#metricaggregationwithfield))* |
| `hide` | boolean | No | | *(Inherited from [MetricAggregationWithField](#metricaggregationwithfield))* |
| `id` | string | No | | *(Inherited from [MetricAggregationWithField](#metricaggregationwithfield))* |
| `pipelineAgg` | string | No | | |
### MetricAggregationWithField
It extends [BaseMetricAggregation](#basemetricaggregation).
| Property | Type | Required | Default | Description |
|----------|---------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `id` | string | **Yes** | | *(Inherited from [BaseMetricAggregation](#basemetricaggregation))* |
| `type` | string | **Yes** | | *(Inherited from [BaseMetricAggregation](#basemetricaggregation))*<br/>Possible values are: `count`, `avg`, `sum`, `min`, `max`, `extended_stats`, `percentiles`, `cardinality`, `raw_document`, `raw_data`, `logs`, `rate`, `top_metrics`, `moving_avg`, `moving_fn`, `derivative`, `serial_diff`, `cumulative_sum`, `bucket_script`. |
| `field` | string | No | | |
| `hide` | boolean | No | | *(Inherited from [BaseMetricAggregation](#basemetricaggregation))* |
### Settings
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------|
| `format` | string | No | | |
### Derivative
It extends [BasePipelineMetricAggregation](#basepipelinemetricaggregation).
| Property | Type | Required | Default | Description |
|---------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))*<br/>Possible values are: `count`, `avg`, `sum`, `min`, `max`, `extended_stats`, `percentiles`, `cardinality`, `raw_document`, `raw_data`, `logs`, `rate`, `top_metrics`, `moving_avg`, `moving_fn`, `derivative`, `serial_diff`, `cumulative_sum`, `bucket_script`. |
| `field` | string | No | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))* |
| `hide` | boolean | No | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))* |
| `id` | string | No | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))* |
| `pipelineAgg` | string | No | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))* |
| `settings` | [object](#settings) | No | | |
### Settings
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------|
| `unit` | string | No | | |
### MovingAverage
#MovingAverage's settings are overridden in types.ts
It extends [BasePipelineMetricAggregation](#basepipelinemetricaggregation).
| Property | Type | Required | Default | Description |
|---------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))*<br/>Possible values are: `count`, `avg`, `sum`, `min`, `max`, `extended_stats`, `percentiles`, `cardinality`, `raw_document`, `raw_data`, `logs`, `rate`, `top_metrics`, `moving_avg`, `moving_fn`, `derivative`, `serial_diff`, `cumulative_sum`, `bucket_script`. |
| `field` | string | No | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))* |
| `hide` | boolean | No | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))* |
| `id` | string | No | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))* |
| `pipelineAgg` | string | No | | *(Inherited from [BasePipelineMetricAggregation](#basepipelinemetricaggregation))* |
| `settings` | [object](#settings) | No | | |
### Settings
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Meta
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Settings
| Property | Type | Required | Default | Description |
|-----------|----------|----------|---------|-------------|
| `metrics` | string[] | No | | |
| `orderBy` | string | No | | |
| `order` | string | No | | |

View File

@ -1,80 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: GaugePanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## GaugePanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------|--------------------|----------|---------|-------------|
| `Options` | [object](#options) | **Yes** | | |
### Options
It extends [SingleStatBaseOptions](#singlestatbaseoptions).
| Property | Type | Required | Default | Description |
|------------------------|-------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `minVizHeight` | uint32 | **Yes** | `75` | |
| `minVizWidth` | uint32 | **Yes** | `75` | |
| `showThresholdLabels` | boolean | **Yes** | `false` | |
| `showThresholdMarkers` | boolean | **Yes** | `true` | |
| `sizing` | string | **Yes** | | Allows for the bar gauge size to be set explicitly<br/>Possible values are: `auto`, `manual`. |
| `orientation` | string | No | | *(Inherited from [SingleStatBaseOptions](#singlestatbaseoptions))*<br/>TODO docs<br/>Possible values are: `auto`, `vertical`, `horizontal`. |
| `reduceOptions` | [ReduceDataOptions](#reducedataoptions) | No | | *(Inherited from [SingleStatBaseOptions](#singlestatbaseoptions))*<br/>TODO docs |
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | *(Inherited from [SingleStatBaseOptions](#singlestatbaseoptions))*<br/>TODO docs |
### ReduceDataOptions
TODO docs
| Property | Type | Required | Default | Description |
|----------|----------|----------|---------|---------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | When !values, pick one value for the whole field |
| `fields` | string | No | | Which fields to show. By default this is only numeric fields |
| `limit` | number | No | | if showing all values limit |
| `values` | boolean | No | | If true show each row value |
### SingleStatBaseOptions
TODO docs
It extends [OptionsWithTextFormatting](#optionswithtextformatting).
| Property | Type | Required | Default | Description |
|-----------------|-------------------------------------------------|----------|---------|------------------------------------------------------------------------------------------|
| `orientation` | string | **Yes** | | TODO docs<br/>Possible values are: `auto`, `vertical`, `horizontal`. |
| `reduceOptions` | [ReduceDataOptions](#reducedataoptions) | **Yes** | | TODO docs |
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | *(Inherited from [OptionsWithTextFormatting](#optionswithtextformatting))*<br/>TODO docs |
### OptionsWithTextFormatting
TODO docs
| Property | Type | Required | Default | Description |
|----------|-------------------------------------------------|----------|---------|-------------|
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | TODO docs |
### VizTextDisplayOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|--------------------------|
| `titleSize` | number | No | | Explicit title text size |
| `valueSize` | number | No | | Explicit value text size |

View File

@ -1,97 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: GeomapPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## GeomapPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-------------------|----------------------------|----------|---------|-----------------------------------------------|
| `ControlsOptions` | [object](#controlsoptions) | **Yes** | | |
| `MapCenterID` | string | **Yes** | | Possible values are: `zero`, `coords`, `fit`. |
| `MapViewConfig` | [object](#mapviewconfig) | **Yes** | | |
| `Options` | [object](#options) | **Yes** | | |
| `TooltipMode` | string | **Yes** | | Possible values are: `none`, `details`. |
| `TooltipOptions` | [object](#tooltipoptions) | **Yes** | | |
### ControlsOptions
| Property | Type | Required | Default | Description |
|-------------------|---------|----------|---------|--------------------------|
| `mouseWheelZoom` | boolean | No | | let the mouse wheel zoom |
| `showAttribution` | boolean | No | | Lower right |
| `showDebug` | boolean | No | | Show debug |
| `showMeasure` | boolean | No | | Show measure |
| `showScale` | boolean | No | | Scale options |
| `showZoom` | boolean | No | | Zoom (upper left) |
### MapViewConfig
| Property | Type | Required | Default | Description |
|-------------|---------|----------|---------|-------------|
| `id` | string | **Yes** | `zero` | |
| `allLayers` | boolean | No | `true` | |
| `lastOnly` | boolean | No | | |
| `lat` | int64 | No | `0` | |
| `layer` | string | No | | |
| `lon` | int64 | No | `0` | |
| `maxZoom` | integer | No | | |
| `minZoom` | integer | No | | |
| `padding` | integer | No | | |
| `shared` | boolean | No | | |
| `zoom` | int64 | No | `1` | |
### Options
| Property | Type | Required | Default | Description |
|------------|---------------------------------------|----------|---------|-------------|
| `basemap` | [MapLayerOptions](#maplayeroptions) | **Yes** | | |
| `controls` | [ControlsOptions](#controlsoptions) | **Yes** | | |
| `layers` | [MapLayerOptions](#maplayeroptions)[] | **Yes** | | |
| `tooltip` | [TooltipOptions](#tooltipoptions) | **Yes** | | |
| `view` | [MapViewConfig](#mapviewconfig) | **Yes** | | |
### MapLayerOptions
| Property | Type | Required | Default | Description |
|--------------|---------------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------|
| `name` | string | **Yes** | | configured unique display name |
| `type` | string | **Yes** | | |
| `config` | | No | | Custom options depending on the type |
| `filterData` | | No | | Defines a frame MatcherConfig that may filter data for the given layer |
| `location` | [FrameGeometrySource](#framegeometrysource) | No | | |
| `opacity` | integer | No | | Common properties:<br/>https://openlayers.org/en/latest/apidoc/module-ol_layer_Base-BaseLayer.html<br/>Layer opacity (0-1) |
| `tooltip` | boolean | No | | Check tooltip (defaults to true) |
### FrameGeometrySource
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|-------------------------------------------------------------|
| `mode` | string | **Yes** | | Possible values are: `auto`, `geohash`, `coords`, `lookup`. |
| `gazetteer` | string | No | | Path to Gazetteer |
| `geohash` | string | No | | Field mappings |
| `latitude` | string | No | | |
| `longitude` | string | No | | |
| `lookup` | string | No | | |
| `wkt` | string | No | | |
### TooltipOptions
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-----------------------------------------|
| `mode` | string | **Yes** | | Possible values are: `none`, `details`. |

View File

@ -1,24 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: GoogleCloudMonitoringDataQuery kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## GoogleCloudMonitoringDataQuery
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|

View File

@ -1,33 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: GrafanaPyroscopeDataQuery kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## GrafanaPyroscopeDataQuery
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------------|----------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `groupBy` | string[] | **Yes** | | Allows to group the results. |
| `labelSelector` | string | **Yes** | `{}` | Specifies the query label selectors. |
| `profileTypeId` | string | **Yes** | | Specifies the type of profile to query. |
| `refId` | string | **Yes** | | A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `datasource` | | No | | For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `hide` | boolean | No | | true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `maxNodes` | integer | No | | Sets the maximum number of nodes in the flamegraph. |
| `queryType` | string | No | | Specify the query flavor<br/>TODO make this required and give it a default |
| `spanSelector` | string[] | No | | Specifies the query span selectors. |

View File

@ -1,250 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: HeatmapPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## HeatmapPanelCfg
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------------------|--------------------------------|----------|---------|-------------------------------------------------------------------------------------------|
| `CellValues` | [object](#cellvalues) | **Yes** | | Controls cell value options |
| `ExemplarConfig` | [object](#exemplarconfig) | **Yes** | | Controls exemplar options |
| `FieldConfig` | [object](#fieldconfig) | **Yes** | | |
| `FilterValueRange` | [object](#filtervaluerange) | **Yes** | | Controls the value filter range |
| `HeatmapColorMode` | string | **Yes** | | Controls the color mode of the heatmap<br/>Possible values are: `opacity`, `scheme`. |
| `HeatmapColorOptions` | [object](#heatmapcoloroptions) | **Yes** | | Controls various color options |
| `HeatmapColorScale` | string | **Yes** | | Controls the color scale of the heatmap<br/>Possible values are: `linear`, `exponential`. |
| `HeatmapLegend` | [object](#heatmaplegend) | **Yes** | | Controls legend options |
| `HeatmapTooltip` | [object](#heatmaptooltip) | **Yes** | | Controls tooltip options |
| `Options` | [object](#options) | **Yes** | | |
| `RowsHeatmapOptions` | [object](#rowsheatmapoptions) | **Yes** | | Controls frame rows options |
| `YAxisConfig` | [object](#yaxisconfig) | **Yes** | | Configuration options for the yAxis |
### CellValues
Controls cell value options
| Property | Type | Required | Default | Description |
|------------|--------|----------|---------|-------------------------------------------------|
| `decimals` | number | No | | Controls the number of decimals for cell values |
| `unit` | string | No | | Controls the cell value unit |
### ExemplarConfig
Controls exemplar options
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|----------------------------------------|
| `color` | string | **Yes** | | Sets the color of the exemplar markers |
### FieldConfig
It extends [HideableFieldConfig](#hideablefieldconfig).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|------------------------------------------------------------------------------|
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [HideableFieldConfig](#hideablefieldconfig))*<br/>TODO docs |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | TODO docs |
### HideSeriesConfig
TODO docs
| Property | Type | Required | Default | Description |
|-----------|---------|----------|---------|-------------|
| `legend` | boolean | **Yes** | | |
| `tooltip` | boolean | **Yes** | | |
| `viz` | boolean | **Yes** | | |
### HideableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|---------------------------------------|----------|---------|-------------|
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | TODO docs |
### ScaleDistributionConfig
TODO docs
| Property | Type | Required | Default | Description |
|-------------------|--------|----------|---------|--------------------------------------------------------------------------|
| `type` | string | **Yes** | | TODO docs<br/>Possible values are: `linear`, `log`, `ordinal`, `symlog`. |
| `linearThreshold` | number | No | | |
| `log` | number | No | | |
### FilterValueRange
Controls the value filter range
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|--------------------------------------------------------------------------|
| `ge` | number | No | | Sets the filter range to values greater than or equal to the given value |
| `le` | number | No | | Sets the filter range to values less than or equal to the given value |
### HeatmapColorOptions
Controls various color options
| Property | Type | Required | Default | Description |
|------------|---------|----------|---------|-------------------------------------------------------------------------------------------|
| `exponent` | number | **Yes** | | Controls the exponent when scale is set to exponential |
| `fill` | string | **Yes** | | Controls the color fill when in opacity mode |
| `reverse` | boolean | **Yes** | | Reverses the color scheme |
| `scheme` | string | **Yes** | | Controls the color scheme used |
| `steps` | integer | **Yes** | | Controls the number of color steps<br/>Constraint: `>=2 & <=128`. |
| `max` | number | No | | Sets the maximum value for the color scale |
| `min` | number | No | | Sets the minimum value for the color scale |
| `mode` | string | No | | Controls the color mode of the heatmap<br/>Possible values are: `opacity`, `scheme`. |
| `scale` | string | No | | Controls the color scale of the heatmap<br/>Possible values are: `linear`, `exponential`. |
### HeatmapLegend
Controls legend options
| Property | Type | Required | Default | Description |
|----------|---------|----------|---------|---------------------------------|
| `show` | boolean | **Yes** | | Controls if the legend is shown |
### HeatmapTooltip
Controls tooltip options
| Property | Type | Required | Default | Description |
|------------------|---------|----------|---------|----------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `single`, `multi`, `none`. |
| `maxHeight` | number | No | | |
| `maxWidth` | number | No | | |
| `showColorScale` | boolean | No | | Controls if the tooltip shows a color scale in header |
| `yHistogram` | boolean | No | | Controls if the tooltip shows a histogram of the y-axis values |
### Options
| Property | Type | Required | Default | Description |
|----------------|---------------------------------------------------------|----------|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `color` | [object](#color) | **Yes** | `map[exponent:0.5 fill:dark-orange reverse:false scheme:Oranges steps:64]` | Controls the color options |
| `exemplars` | [ExemplarConfig](#exemplarconfig) | **Yes** | | Controls exemplar options |
| `legend` | [HeatmapLegend](#heatmaplegend) | **Yes** | | Controls legend options |
| `showValue` | string | **Yes** | | &#124; *{<br/> layout: ui.HeatmapCellLayout & "auto" // TODO: fix after remove when https://github.com/grafana/cuetsy/issues/74 is fixed<br/>}<br/>Controls the display of the value in the cell |
| `tooltip` | [object](#tooltip) | **Yes** | `map[mode:single showColorScale:false yHistogram:false]` | Controls tooltip options |
| `yAxis` | [YAxisConfig](#yaxisconfig) | **Yes** | | Configuration options for the yAxis |
| `calculate` | boolean | No | `false` | Controls if the heatmap should be calculated from data |
| `calculation` | [HeatmapCalculationOptions](#heatmapcalculationoptions) | No | | |
| `cellGap` | integer | No | `1` | Controls gap between cells<br/>Constraint: `>=0 & <=25`. |
| `cellRadius` | number | No | | Controls cell radius |
| `cellValues` | [object](#cellvalues) | No | `map[]` | Controls cell value unit |
| `filterValues` | [object](#filtervalues) | No | `map[le:1e-09]` | Filters values between a given range |
| `rowsFrame` | [RowsHeatmapOptions](#rowsheatmapoptions) | No | | Controls frame rows options |
### HeatmapCalculationOptions
| Property | Type | Required | Default | Description |
|------------|-------------------------------------------------------------------|----------|---------|-------------|
| `xBuckets` | [HeatmapCalculationBucketConfig](#heatmapcalculationbucketconfig) | No | | |
| `yBuckets` | [HeatmapCalculationBucketConfig](#heatmapcalculationbucketconfig) | No | | |
### HeatmapCalculationBucketConfig
| Property | Type | Required | Default | Description |
|----------|-----------------------------------------------------|----------|---------|----------------------------------------------------------|
| `mode` | string | No | | Possible values are: `size`, `count`. |
| `scale` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | TODO docs |
| `value` | string | No | | The number of buckets to use for the axis in the heatmap |
### RowsHeatmapOptions
Controls frame rows options
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|----------------------------------------------------------|
| `layout` | string | No | | Possible values are: `le`, `ge`, `unknown`, `auto`. |
| `value` | string | No | | Sets the name of the cell when not calculating from data |
### YAxisConfig
Configuration options for the yAxis
It extends [AxisConfig](#axisconfig).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisCenteredZero` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisColorMode` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisLabel` | string | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisPlacement` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisSoftMin` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisWidth` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `decimals` | number | No | | Controls the number of decimals for yAxis values |
| `max` | number | No | | Sets the maximum value for the yAxis |
| `min` | number | No | | Sets the minimum value for the yAxis |
| `reverse` | boolean | No | | Reverses the yAxis |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs |
| `unit` | string | No | | Sets the yAxis unit |
### AxisConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | |
| `axisCenteredZero` | boolean | No | | |
| `axisColorMode` | string | No | | TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | |
| `axisLabel` | string | No | | |
| `axisPlacement` | string | No | | TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | |
| `axisSoftMin` | number | No | | |
| `axisWidth` | number | No | | |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | TODO docs |
### CellValues
Controls cell value unit
| Property | Type | Required | Default | Description |
|----------|-----------------------------------|----------|---------|-------------|
| `object` | Possible types are: [](#), [](#). | | |
### Color
Controls the color options
| Property | Type | Required | Default | Description |
|----------|-----------------------------------|----------|---------|-------------|
| `object` | Possible types are: [](#), [](#). | | |
### FilterValues
Filters values between a given range
| Property | Type | Required | Default | Description |
|----------|-----------------------------------|----------|---------|-------------|
| `object` | Possible types are: [](#), [](#). | | |
### Tooltip
Controls tooltip options
| Property | Type | Required | Default | Description |
|----------|-----------------------------------|----------|---------|-------------|
| `object` | Possible types are: [](#), [](#). | | |

View File

@ -1,148 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: HistogramPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## HistogramPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|---------------|------------------------|----------|---------|-------------|
| `FieldConfig` | [object](#fieldconfig) | **Yes** | | |
| `Options` | [object](#options) | **Yes** | | |
### FieldConfig
It extends [AxisConfig](#axisconfig) and [HideableFieldConfig](#hideablefieldconfig).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisCenteredZero` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisColorMode` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisLabel` | string | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisPlacement` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisSoftMin` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisWidth` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `fillOpacity` | integer | No | `80` | Controls the fill opacity of the bars.<br/>Constraint: `>=0 & <=100`. |
| `gradientMode` | string | No | | Set the mode of the gradient fill. Fill gradient is based on the line color. To change the color, use the standard color scheme field option.<br/>Gradient appearance is influenced by the Fill opacity setting. |
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [HideableFieldConfig](#hideablefieldconfig))*<br/>TODO docs |
| `lineWidth` | integer | No | `1` | Controls line width of the bars.<br/>Constraint: `>=0 & <=10`. |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs |
### AxisConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | |
| `axisCenteredZero` | boolean | No | | |
| `axisColorMode` | string | No | | TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | |
| `axisLabel` | string | No | | |
| `axisPlacement` | string | No | | TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | |
| `axisSoftMin` | number | No | | |
| `axisWidth` | number | No | | |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | TODO docs |
### ScaleDistributionConfig
TODO docs
| Property | Type | Required | Default | Description |
|-------------------|--------|----------|---------|--------------------------------------------------------------------------|
| `type` | string | **Yes** | | TODO docs<br/>Possible values are: `linear`, `log`, `ordinal`, `symlog`. |
| `linearThreshold` | number | No | | |
| `log` | number | No | | |
### HideSeriesConfig
TODO docs
| Property | Type | Required | Default | Description |
|-----------|---------|----------|---------|-------------|
| `legend` | boolean | **Yes** | | |
| `tooltip` | boolean | **Yes** | | |
| `viz` | boolean | **Yes** | | |
### HideableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|---------------------------------------|----------|---------|-------------|
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | TODO docs |
### Options
It extends [OptionsWithLegend](#optionswithlegend) and [OptionsWithTooltip](#optionswithtooltip).
| Property | Type | Required | Default | Description |
|----------------|-----------------------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | *(Inherited from [OptionsWithLegend](#optionswithlegend))*<br/>TODO docs |
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | *(Inherited from [OptionsWithTooltip](#optionswithtooltip))*<br/>TODO docs |
| `bucketCount` | integer | No | `30` | Bucket count (approx)<br/>Constraint: `>0 & <=2147483647`. |
| `bucketOffset` | number | No | `0` | Offset buckets by this amount<br/>Constraint: `>=-340282346638528859811704183484516925440 & <=340282346638528859811704183484516925440`. |
| `bucketSize` | integer | No | | Size of each bucket |
| `combine` | boolean | No | | Combines multiple series into a single histogram |
### OptionsWithLegend
TODO docs
| Property | Type | Required | Default | Description |
|----------|---------------------------------------|----------|---------|-------------|
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | TODO docs |
### VizLegendOptions
TODO docs
| Property | Type | Required | Default | Description |
|---------------|----------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | |
| `displayMode` | string | **Yes** | | TODO docs<br/>Note: "hidden" needs to remain as an option for plugins compatibility<br/>Possible values are: `list`, `table`, `hidden`. |
| `placement` | string | **Yes** | | TODO docs<br/>Possible values are: `bottom`, `right`. |
| `showLegend` | boolean | **Yes** | | |
| `asTable` | boolean | No | | |
| `isVisible` | boolean | No | | |
| `sortBy` | string | No | | |
| `sortDesc` | boolean | No | | |
| `width` | number | No | | |
### OptionsWithTooltip
TODO docs
| Property | Type | Required | Default | Description |
|-----------|-----------------------------------------|----------|---------|-------------|
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | TODO docs |
### VizTooltipOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|---------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `single`, `multi`, `none`. |
| `sort` | string | **Yes** | | TODO docs<br/>Possible values are: `asc`, `desc`, `none`. |
| `maxHeight` | number | No | | |
| `maxWidth` | number | No | | |

View File

@ -1,39 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: LogsPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## LogsPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------|--------------------|----------|---------|-------------|
| `Options` | [object](#options) | **Yes** | | |
### Options
| Property | Type | Required | Default | Description |
|------------------------|---------|----------|---------|---------------------------------------------------------------|
| `dedupStrategy` | string | **Yes** | | Possible values are: `none`, `exact`, `numbers`, `signature`. |
| `enableLogDetails` | boolean | **Yes** | | |
| `prettifyLogMessage` | boolean | **Yes** | | |
| `showCommonLabels` | boolean | **Yes** | | |
| `showLabels` | boolean | **Yes** | | |
| `showLogContextToggle` | boolean | **Yes** | | |
| `showTime` | boolean | **Yes** | | |
| `sortOrder` | string | **Yes** | | Possible values are: `Descending`, `Ascending`. |
| `wrapLogMessage` | boolean | **Yes** | | |

View File

@ -1,36 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: LokiDataQuery kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## LokiDataQuery
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|----------------|---------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `expr` | string | **Yes** | | The LogQL query. |
| `refId` | string | **Yes** | | A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `datasource` | | No | | For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `editorMode` | string | No | | Possible values are: `code`, `builder`. |
| `hide` | boolean | No | | true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `instant` | boolean | No | | @deprecated, now use queryType. |
| `legendFormat` | string | No | | Used to override the name of the series. |
| `maxLines` | integer | No | | Used to limit the number of log rows returned. |
| `queryType` | string | No | | Specify the query flavor<br/>TODO make this required and give it a default |
| `range` | boolean | No | | @deprecated, now use queryType. |
| `resolution` | integer | No | | @deprecated, now use step. |
| `step` | string | No | | Used to set step value for range queries. |

View File

@ -1,32 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: NewsPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## NewsPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------|--------------------|----------|---------|-------------|
| `Options` | [object](#options) | **Yes** | | |
### Options
| Property | Type | Required | Default | Description |
|-------------|---------|----------|---------|--------------------------------------------|
| `feedUrl` | string | No | | empty/missing will default to grafana blog |
| `showImage` | boolean | No | `true` | |

View File

@ -1,57 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: NodeGraphPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## NodeGraphPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|---------------|------------------------|----------|---------|-------------|
| `ArcOption` | [object](#arcoption) | **Yes** | | |
| `EdgeOptions` | [object](#edgeoptions) | **Yes** | | |
| `NodeOptions` | [object](#nodeoptions) | **Yes** | | |
| `Options` | [object](#options) | **Yes** | | |
### ArcOption
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-----------------------------------------------------------------------------------------------------|
| `color` | string | No | | The color of the arc. |
| `field` | string | No | | Field from which to get the value. Values should be less than 1, representing fraction of a circle. |
### EdgeOptions
| Property | Type | Required | Default | Description |
|---------------------|--------|----------|---------|-----------------------------------------------------------------------------|
| `mainStatUnit` | string | No | | Unit for the main stat to override what ever is set in the data frame. |
| `secondaryStatUnit` | string | No | | Unit for the secondary stat to override what ever is set in the data frame. |
### NodeOptions
| Property | Type | Required | Default | Description |
|---------------------|---------------------------|----------|---------|-----------------------------------------------------------------------------------------|
| `arcs` | [ArcOption](#arcoption)[] | No | | Define which fields are shown as part of the node arc (colored circle around the node). |
| `mainStatUnit` | string | No | | Unit for the main stat to override what ever is set in the data frame. |
| `secondaryStatUnit` | string | No | | Unit for the secondary stat to override what ever is set in the data frame. |
### Options
| Property | Type | Required | Default | Description |
|----------|-----------------------------|----------|---------|-------------|
| `edges` | [EdgeOptions](#edgeoptions) | No | | |
| `nodes` | [NodeOptions](#nodeoptions) | No | | |

View File

@ -1,30 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: ParcaDataQuery kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## ParcaDataQuery
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------------|---------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `labelSelector` | string | **Yes** | `{}` | Specifies the query label selectors. |
| `profileTypeId` | string | **Yes** | | Specifies the type of profile to query. |
| `refId` | string | **Yes** | | A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `datasource` | | No | | For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `hide` | boolean | No | | true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `queryType` | string | No | | Specify the query flavor<br/>TODO make this required and give it a default |

View File

@ -1,154 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: PieChartPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## PieChartPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-------------------------|---------------------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `FieldConfig` | [HideableFieldConfig](#hideablefieldconfig) | **Yes** | | TODO docs |
| `Options` | [object](#options) | **Yes** | | |
| `PieChartLabels` | string | **Yes** | | Select labels to display on the pie chart.<br/> - Name - The series or field name.<br/> - Percent - The percentage of the whole.<br/> - Value - The raw numerical value.<br/>Possible values are: `name`, `value`, `percent`. |
| `PieChartLegendOptions` | [object](#piechartlegendoptions) | **Yes** | | |
| `PieChartLegendValues` | string | **Yes** | | Select values to display in the legend.<br/> - Percent: The percentage of the whole.<br/> - Value: The raw numerical value.<br/>Possible values are: `value`, `percent`. |
| `PieChartType` | string | **Yes** | | Select the pie chart display style.<br/>Possible values are: `pie`, `donut`. |
### HideableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|---------------------------------------|----------|---------|-------------|
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | TODO docs |
### HideSeriesConfig
TODO docs
| Property | Type | Required | Default | Description |
|-----------|---------|----------|---------|-------------|
| `legend` | boolean | **Yes** | | |
| `tooltip` | boolean | **Yes** | | |
| `viz` | boolean | **Yes** | | |
### Options
It extends [OptionsWithTooltip](#optionswithtooltip) and [SingleStatBaseOptions](#singlestatbaseoptions).
| Property | Type | Required | Default | Description |
|-----------------|-------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `displayLabels` | string[] | **Yes** | | |
| `legend` | [PieChartLegendOptions](#piechartlegendoptions) | **Yes** | | |
| `pieType` | string | **Yes** | | Select the pie chart display style.<br/>Possible values are: `pie`, `donut`. |
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | *(Inherited from [OptionsWithTooltip](#optionswithtooltip))*<br/>TODO docs |
| `orientation` | string | No | | *(Inherited from [SingleStatBaseOptions](#singlestatbaseoptions))*<br/>TODO docs<br/>Possible values are: `auto`, `vertical`, `horizontal`. |
| `reduceOptions` | [ReduceDataOptions](#reducedataoptions) | No | | *(Inherited from [SingleStatBaseOptions](#singlestatbaseoptions))*<br/>TODO docs |
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | *(Inherited from [SingleStatBaseOptions](#singlestatbaseoptions))*<br/>TODO docs |
### OptionsWithTooltip
TODO docs
| Property | Type | Required | Default | Description |
|-----------|-----------------------------------------|----------|---------|-------------|
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | TODO docs |
### VizTooltipOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|---------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `single`, `multi`, `none`. |
| `sort` | string | **Yes** | | TODO docs<br/>Possible values are: `asc`, `desc`, `none`. |
| `maxHeight` | number | No | | |
| `maxWidth` | number | No | | |
### PieChartLegendOptions
It extends [VizLegendOptions](#vizlegendoptions).
| Property | Type | Required | Default | Description |
|---------------|----------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | *(Inherited from [VizLegendOptions](#vizlegendoptions))* |
| `displayMode` | string | **Yes** | | *(Inherited from [VizLegendOptions](#vizlegendoptions))*<br/>TODO docs<br/>Note: "hidden" needs to remain as an option for plugins compatibility<br/>Possible values are: `list`, `table`, `hidden`. |
| `placement` | string | **Yes** | | *(Inherited from [VizLegendOptions](#vizlegendoptions))*<br/>TODO docs<br/>Possible values are: `bottom`, `right`. |
| `showLegend` | boolean | **Yes** | | *(Inherited from [VizLegendOptions](#vizlegendoptions))* |
| `values` | string[] | **Yes** | | |
| `asTable` | boolean | No | | *(Inherited from [VizLegendOptions](#vizlegendoptions))* |
| `isVisible` | boolean | No | | *(Inherited from [VizLegendOptions](#vizlegendoptions))* |
| `sortBy` | string | No | | *(Inherited from [VizLegendOptions](#vizlegendoptions))* |
| `sortDesc` | boolean | No | | *(Inherited from [VizLegendOptions](#vizlegendoptions))* |
| `width` | number | No | | *(Inherited from [VizLegendOptions](#vizlegendoptions))* |
### VizLegendOptions
TODO docs
| Property | Type | Required | Default | Description |
|---------------|----------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | |
| `displayMode` | string | **Yes** | | TODO docs<br/>Note: "hidden" needs to remain as an option for plugins compatibility<br/>Possible values are: `list`, `table`, `hidden`. |
| `placement` | string | **Yes** | | TODO docs<br/>Possible values are: `bottom`, `right`. |
| `showLegend` | boolean | **Yes** | | |
| `asTable` | boolean | No | | |
| `isVisible` | boolean | No | | |
| `sortBy` | string | No | | |
| `sortDesc` | boolean | No | | |
| `width` | number | No | | |
### ReduceDataOptions
TODO docs
| Property | Type | Required | Default | Description |
|----------|----------|----------|---------|---------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | When !values, pick one value for the whole field |
| `fields` | string | No | | Which fields to show. By default this is only numeric fields |
| `limit` | number | No | | if showing all values limit |
| `values` | boolean | No | | If true show each row value |
### SingleStatBaseOptions
TODO docs
It extends [OptionsWithTextFormatting](#optionswithtextformatting).
| Property | Type | Required | Default | Description |
|-----------------|-------------------------------------------------|----------|---------|------------------------------------------------------------------------------------------|
| `orientation` | string | **Yes** | | TODO docs<br/>Possible values are: `auto`, `vertical`, `horizontal`. |
| `reduceOptions` | [ReduceDataOptions](#reducedataoptions) | **Yes** | | TODO docs |
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | *(Inherited from [OptionsWithTextFormatting](#optionswithtextformatting))*<br/>TODO docs |
### OptionsWithTextFormatting
TODO docs
| Property | Type | Required | Default | Description |
|----------|-------------------------------------------------|----------|---------|-------------|
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | TODO docs |
### VizTextDisplayOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|--------------------------|
| `titleSize` | number | No | | Explicit title text size |
| `valueSize` | number | No | | Explicit value text size |

View File

@ -1,43 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: PrometheusDataQuery kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## PrometheusDataQuery
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|------------------|------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `expr` | string | **Yes** | | The actual expression/query that will be evaluated by Prometheus |
| `refId` | string | **Yes** | | A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `datasource` | | No | | For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `editorMode` | string | No | | Possible values are: `code`, `builder`. |
| `exemplar` | boolean | No | | Execute an additional query to identify interesting raw samples relevant for the given expr |
| `format` | string | No | | Possible values are: `time_series`, `table`, `heatmap`. |
| `hide` | boolean | No | | true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `instant` | boolean | No | | Returns only the latest value that Prometheus has scraped for the requested time series |
| `intervalFactor` | number | No | | @deprecated Used to specify how many times to divide max data points by. We use max data points under query options<br/>See https://github.com/grafana/grafana/issues/48081 |
| `legendFormat` | string | No | | Series name override or template. Ex. {{hostname}} will be replaced with label value for hostname |
| `queryType` | string | No | | Specify the query flavor<br/>TODO make this required and give it a default |
| `range` | boolean | No | | Returns a Range vector, comprised of a set of time series containing a range of data points over time for each time series |
| `scope` | [object](#scope) | No | | |
### Scope
| Property | Type | Required | Default | Description |
|------------|--------|----------|---------|-------------|
| `matchers` | string | **Yes** | | |

View File

@ -1,81 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: StatPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## StatPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------|--------------------|----------|---------|-------------|
| `Options` | [object](#options) | **Yes** | | |
### Options
It extends [SingleStatBaseOptions](#singlestatbaseoptions).
| Property | Type | Required | Default | Description |
|---------------------|-------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `colorMode` | string | **Yes** | | TODO docs<br/>Possible values are: `value`, `background`, `background_solid`, `none`. |
| `graphMode` | string | **Yes** | | TODO docs<br/>Possible values are: `none`, `line`, `area`. |
| `justifyMode` | string | **Yes** | | TODO docs<br/>Possible values are: `auto`, `center`. |
| `showPercentChange` | boolean | **Yes** | `false` | |
| `textMode` | string | **Yes** | | TODO docs<br/>Possible values are: `auto`, `value`, `value_and_name`, `name`, `none`. |
| `wideLayout` | boolean | **Yes** | `true` | |
| `orientation` | string | No | | *(Inherited from [SingleStatBaseOptions](#singlestatbaseoptions))*<br/>TODO docs<br/>Possible values are: `auto`, `vertical`, `horizontal`. |
| `reduceOptions` | [ReduceDataOptions](#reducedataoptions) | No | | *(Inherited from [SingleStatBaseOptions](#singlestatbaseoptions))*<br/>TODO docs |
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | *(Inherited from [SingleStatBaseOptions](#singlestatbaseoptions))*<br/>TODO docs |
### ReduceDataOptions
TODO docs
| Property | Type | Required | Default | Description |
|----------|----------|----------|---------|---------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | When !values, pick one value for the whole field |
| `fields` | string | No | | Which fields to show. By default this is only numeric fields |
| `limit` | number | No | | if showing all values limit |
| `values` | boolean | No | | If true show each row value |
### SingleStatBaseOptions
TODO docs
It extends [OptionsWithTextFormatting](#optionswithtextformatting).
| Property | Type | Required | Default | Description |
|-----------------|-------------------------------------------------|----------|---------|------------------------------------------------------------------------------------------|
| `orientation` | string | **Yes** | | TODO docs<br/>Possible values are: `auto`, `vertical`, `horizontal`. |
| `reduceOptions` | [ReduceDataOptions](#reducedataoptions) | **Yes** | | TODO docs |
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | *(Inherited from [OptionsWithTextFormatting](#optionswithtextformatting))*<br/>TODO docs |
### OptionsWithTextFormatting
TODO docs
| Property | Type | Required | Default | Description |
|----------|-------------------------------------------------|----------|---------|-------------|
| `text` | [VizTextDisplayOptions](#viztextdisplayoptions) | No | | TODO docs |
### VizTextDisplayOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|--------------------------|
| `titleSize` | number | No | | Explicit title text size |
| `valueSize` | number | No | | Explicit value text size |

View File

@ -1,119 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: StateTimelinePanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## StateTimelinePanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|---------------|------------------------|----------|---------|-------------|
| `FieldConfig` | [object](#fieldconfig) | **Yes** | | |
| `Options` | [object](#options) | **Yes** | | |
### FieldConfig
It extends [HideableFieldConfig](#hideablefieldconfig).
| Property | Type | Required | Default | Description |
|---------------|---------------------------------------|----------|---------|------------------------------------------------------------------------------|
| `fillOpacity` | integer | No | `70` | Constraint: `>=0 & <=100`. |
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [HideableFieldConfig](#hideablefieldconfig))*<br/>TODO docs |
| `lineWidth` | integer | No | `0` | Constraint: `>=0 & <=10`. |
### HideSeriesConfig
TODO docs
| Property | Type | Required | Default | Description |
|-----------|---------|----------|---------|-------------|
| `legend` | boolean | **Yes** | | |
| `tooltip` | boolean | **Yes** | | |
| `viz` | boolean | **Yes** | | |
### HideableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|---------------------------------------|----------|---------|-------------|
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | TODO docs |
### Options
It extends [OptionsWithLegend](#optionswithlegend) and [OptionsWithTooltip](#optionswithtooltip) and [OptionsWithTimezones](#optionswithtimezones).
| Property | Type | Required | Default | Description |
|---------------|-----------------------------------------|----------|---------|----------------------------------------------------------------------------|
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | *(Inherited from [OptionsWithLegend](#optionswithlegend))*<br/>TODO docs |
| `rowHeight` | number | **Yes** | `0.9` | Controls the row height |
| `showValue` | string | **Yes** | | Show timeline values on chart |
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | *(Inherited from [OptionsWithTooltip](#optionswithtooltip))*<br/>TODO docs |
| `alignValue` | string | No | | Controls value alignment on the timelines |
| `mergeValues` | boolean | No | `true` | Merge equal consecutive values |
| `timezone` | string[] | No | | *(Inherited from [OptionsWithTimezones](#optionswithtimezones))* |
### OptionsWithLegend
TODO docs
| Property | Type | Required | Default | Description |
|----------|---------------------------------------|----------|---------|-------------|
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | TODO docs |
### VizLegendOptions
TODO docs
| Property | Type | Required | Default | Description |
|---------------|----------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | |
| `displayMode` | string | **Yes** | | TODO docs<br/>Note: "hidden" needs to remain as an option for plugins compatibility<br/>Possible values are: `list`, `table`, `hidden`. |
| `placement` | string | **Yes** | | TODO docs<br/>Possible values are: `bottom`, `right`. |
| `showLegend` | boolean | **Yes** | | |
| `asTable` | boolean | No | | |
| `isVisible` | boolean | No | | |
| `sortBy` | string | No | | |
| `sortDesc` | boolean | No | | |
| `width` | number | No | | |
### OptionsWithTimezones
TODO docs
| Property | Type | Required | Default | Description |
|------------|----------|----------|---------|-------------|
| `timezone` | string[] | No | | |
### OptionsWithTooltip
TODO docs
| Property | Type | Required | Default | Description |
|-----------|-----------------------------------------|----------|---------|-------------|
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | TODO docs |
### VizTooltipOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|---------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `single`, `multi`, `none`. |
| `sort` | string | **Yes** | | TODO docs<br/>Possible values are: `asc`, `desc`, `none`. |
| `maxHeight` | number | No | | |
| `maxWidth` | number | No | | |

View File

@ -1,118 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: StatusHistoryPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## StatusHistoryPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|---------------|------------------------|----------|---------|-------------|
| `FieldConfig` | [object](#fieldconfig) | **Yes** | | |
| `Options` | [object](#options) | **Yes** | | |
### FieldConfig
It extends [HideableFieldConfig](#hideablefieldconfig).
| Property | Type | Required | Default | Description |
|---------------|---------------------------------------|----------|---------|------------------------------------------------------------------------------|
| `fillOpacity` | integer | No | `70` | Constraint: `>=0 & <=100`. |
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [HideableFieldConfig](#hideablefieldconfig))*<br/>TODO docs |
| `lineWidth` | integer | No | `1` | Constraint: `>=0 & <=10`. |
### HideSeriesConfig
TODO docs
| Property | Type | Required | Default | Description |
|-----------|---------|----------|---------|-------------|
| `legend` | boolean | **Yes** | | |
| `tooltip` | boolean | **Yes** | | |
| `viz` | boolean | **Yes** | | |
### HideableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|---------------------------------------|----------|---------|-------------|
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | TODO docs |
### Options
It extends [OptionsWithLegend](#optionswithlegend) and [OptionsWithTooltip](#optionswithtooltip) and [OptionsWithTimezones](#optionswithtimezones).
| Property | Type | Required | Default | Description |
|-------------|-----------------------------------------|----------|---------|----------------------------------------------------------------------------|
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | *(Inherited from [OptionsWithLegend](#optionswithlegend))*<br/>TODO docs |
| `rowHeight` | number | **Yes** | `0.9` | Set the height of the rows<br/>Constraint: `>=0 & <=1`. |
| `showValue` | string | **Yes** | | Show values on the columns |
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | *(Inherited from [OptionsWithTooltip](#optionswithtooltip))*<br/>TODO docs |
| `colWidth` | number | No | `0.9` | Controls the column width |
| `timezone` | string[] | No | | *(Inherited from [OptionsWithTimezones](#optionswithtimezones))* |
### OptionsWithLegend
TODO docs
| Property | Type | Required | Default | Description |
|----------|---------------------------------------|----------|---------|-------------|
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | TODO docs |
### VizLegendOptions
TODO docs
| Property | Type | Required | Default | Description |
|---------------|----------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | |
| `displayMode` | string | **Yes** | | TODO docs<br/>Note: "hidden" needs to remain as an option for plugins compatibility<br/>Possible values are: `list`, `table`, `hidden`. |
| `placement` | string | **Yes** | | TODO docs<br/>Possible values are: `bottom`, `right`. |
| `showLegend` | boolean | **Yes** | | |
| `asTable` | boolean | No | | |
| `isVisible` | boolean | No | | |
| `sortBy` | string | No | | |
| `sortDesc` | boolean | No | | |
| `width` | number | No | | |
### OptionsWithTimezones
TODO docs
| Property | Type | Required | Default | Description |
|------------|----------|----------|---------|-------------|
| `timezone` | string[] | No | | |
### OptionsWithTooltip
TODO docs
| Property | Type | Required | Default | Description |
|-----------|-----------------------------------------|----------|---------|-------------|
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | TODO docs |
### VizTooltipOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|---------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `single`, `multi`, `none`. |
| `sort` | string | **Yes** | | TODO docs<br/>Possible values are: `asc`, `desc`, `none`. |
| `maxHeight` | number | No | | |
| `maxWidth` | number | No | | |

View File

@ -1,340 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: TablePanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## TablePanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|---------------|------------------------|----------|---------|-------------|
| `FieldConfig` | [object](#fieldconfig) | **Yes** | | |
| `Options` | [object](#options) | **Yes** | | |
### FieldConfig
| Property | Type | Required | Default | Description |
|---------------|---------------------------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `align` | string | **Yes** | | TODO -- should not be table specific!<br/>TODO docs<br/>Possible values are: `auto`, `left`, `right`, `center`. |
| `cellOptions` | [TableCellOptions](#tablecelloptions) | **Yes** | | Table cell options. Each cell has a display mode<br/>and other potential options for that display. |
| `inspect` | boolean | **Yes** | `false` | |
| `displayMode` | string | No | | Internally, this is the "type" of cell that's being displayed<br/>in the table such as colored text, JSON, gauge, etc.<br/>The color-background-solid, gradient-gauge, and lcd-gauge<br/>modes are deprecated in favor of new cell subOptions<br/>Possible values are: `auto`, `color-text`, `color-background`, `color-background-solid`, `gradient-gauge`, `lcd-gauge`, `json-view`, `basic`, `image`, `gauge`, `sparkline`, `data-links`, `custom`. |
| `filterable` | boolean | No | | |
| `hidden` | boolean | No | | |
| `hideHeader` | boolean | No | | Hides any header for a column, useful for columns that show some static content or buttons. |
| `minWidth` | number | No | | |
| `width` | number | No | | |
### TableCellOptions
Table cell options. Each cell has a display mode
and other potential options for that display.
| Property | Type | Required | Default | Description |
|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|-------------|
| `object` | Possible types are: [TableAutoCellOptions](#tableautocelloptions), [TableSparklineCellOptions](#tablesparklinecelloptions), [TableBarGaugeCellOptions](#tablebargaugecelloptions), [TableColoredBackgroundCellOptions](#tablecoloredbackgroundcelloptions), [TableColorTextCellOptions](#tablecolortextcelloptions), [TableImageCellOptions](#tableimagecelloptions), [TableDataLinksCellOptions](#tabledatalinkscelloptions), [TableJsonViewCellOptions](#tablejsonviewcelloptions). | | |
### GraphThresholdsStyleConfig
TODO docs
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-----------------------------------------------------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `off`, `line`, `dashed`, `area`, `line+area`, `dashed+area`, `series`. |
### HideSeriesConfig
TODO docs
| Property | Type | Required | Default | Description |
|-----------|---------|----------|---------|-------------|
| `legend` | boolean | **Yes** | | |
| `tooltip` | boolean | **Yes** | | |
| `viz` | boolean | **Yes** | | |
### LineStyle
TODO docs
| Property | Type | Required | Default | Description |
|----------|----------|----------|---------|--------------------------------------------------------|
| `dash` | number[] | No | | |
| `fill` | string | No | | Possible values are: `solid`, `dash`, `dot`, `square`. |
### ScaleDistributionConfig
TODO docs
| Property | Type | Required | Default | Description |
|-------------------|--------|----------|---------|--------------------------------------------------------------------------|
| `type` | string | **Yes** | | TODO docs<br/>Possible values are: `linear`, `log`, `ordinal`, `symlog`. |
| `linearThreshold` | number | No | | |
| `log` | number | No | | |
### StackingConfig
TODO docs
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-----------------------------------------------------------------|
| `group` | string | No | | |
| `mode` | string | No | | TODO docs<br/>Possible values are: `none`, `normal`, `percent`. |
### TableAutoCellOptions
Auto mode table cell options
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------|
| `type` | string | **Yes** | | |
### TableBarGaugeCellOptions
Gauge cell options
| Property | Type | Required | Default | Description |
|--------------------|--------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | |
| `mode` | string | No | | Enum expressing the possible display modes<br/>for the bar gauge component of Grafana UI<br/>Possible values are: `basic`, `lcd`, `gradient`. |
| `valueDisplayMode` | string | No | | Allows for the table cell gauge display type to set the gauge mode.<br/>Possible values are: `color`, `text`, `hidden`. |
### TableColorTextCellOptions
Colored text cell options
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------|
| `type` | string | **Yes** | | |
### TableColoredBackgroundCellOptions
Colored background cell options
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | |
| `mode` | string | No | | Display mode to the "Colored Background" display<br/>mode for table cells. Either displays a solid color (basic mode)<br/>or a gradient.<br/>Possible values are: `basic`, `gradient`. |
### TableDataLinksCellOptions
Show data links in the cell
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------|
| `type` | string | **Yes** | | |
### TableImageCellOptions
Json view cell options
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------|
| `type` | string | **Yes** | | |
### TableJsonViewCellOptions
Json view cell options
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------|
| `type` | string | **Yes** | | |
### TableSparklineCellOptions
Sparkline cell options
It extends [GraphFieldConfig](#graphfieldconfig).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | |
| `axisBorderShow` | boolean | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `axisCenteredZero` | boolean | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `axisColorMode` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `axisLabel` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `axisPlacement` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `axisSoftMin` | number | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `axisWidth` | number | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `barAlignment` | integer | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>TODO docs<br/>Possible values are: `-1`, `0`, `1`. |
| `barMaxWidth` | number | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `barWidthFactor` | number | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `drawStyle` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>TODO docs<br/>Possible values are: `line`, `bars`, `points`. |
| `fillBelowTo` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `fillColor` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `fillOpacity` | number | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `gradientMode` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>TODO docs<br/>Possible values are: `none`, `opacity`, `hue`, `scheme`. |
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>TODO docs |
| `hideValue` | boolean | No | | |
| `lineColor` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `lineInterpolation` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>TODO docs<br/>Possible values are: `linear`, `smooth`, `stepBefore`, `stepAfter`. |
| `lineStyle` | [LineStyle](#linestyle) | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>TODO docs |
| `lineWidth` | number | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `pointColor` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `pointSize` | number | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `pointSymbol` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>TODO docs |
| `showPoints` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `never`, `always`. |
| `spanNulls` | | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>Indicate if null values should be treated as gaps or connected.<br/>When the value is a number, it represents the maximum delta in the<br/>X axis that should be considered connected. For timeseries, this is milliseconds |
| `stacking` | [StackingConfig](#stackingconfig) | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>TODO docs |
| `thresholdsStyle` | [GraphThresholdsStyleConfig](#graphthresholdsstyleconfig) | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>TODO docs |
| `transform` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*<br/>TODO docs<br/>Possible values are: `constant`, `negative-Y`. |
### GraphFieldConfig
TODO docs
It extends [LineConfig](#lineconfig) and [FillConfig](#fillconfig) and [PointsConfig](#pointsconfig) and [AxisConfig](#axisconfig) and [BarConfig](#barconfig) and [StackableFieldConfig](#stackablefieldconfig) and [HideableFieldConfig](#hideablefieldconfig).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisCenteredZero` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisColorMode` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisLabel` | string | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisPlacement` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisSoftMin` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisWidth` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `barAlignment` | integer | No | | *(Inherited from [BarConfig](#barconfig))*<br/>TODO docs<br/>Possible values are: `-1`, `0`, `1`. |
| `barMaxWidth` | number | No | | *(Inherited from [BarConfig](#barconfig))* |
| `barWidthFactor` | number | No | | *(Inherited from [BarConfig](#barconfig))* |
| `drawStyle` | string | No | | TODO docs<br/>Possible values are: `line`, `bars`, `points`. |
| `fillBelowTo` | string | No | | *(Inherited from [FillConfig](#fillconfig))* |
| `fillColor` | string | No | | *(Inherited from [FillConfig](#fillconfig))* |
| `fillOpacity` | number | No | | *(Inherited from [FillConfig](#fillconfig))* |
| `gradientMode` | string | No | | TODO docs<br/>Possible values are: `none`, `opacity`, `hue`, `scheme`. |
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [HideableFieldConfig](#hideablefieldconfig))*<br/>TODO docs |
| `lineColor` | string | No | | *(Inherited from [LineConfig](#lineconfig))* |
| `lineInterpolation` | string | No | | *(Inherited from [LineConfig](#lineconfig))*<br/>TODO docs<br/>Possible values are: `linear`, `smooth`, `stepBefore`, `stepAfter`. |
| `lineStyle` | [LineStyle](#linestyle) | No | | *(Inherited from [LineConfig](#lineconfig))*<br/>TODO docs |
| `lineWidth` | number | No | | *(Inherited from [LineConfig](#lineconfig))* |
| `pointColor` | string | No | | *(Inherited from [PointsConfig](#pointsconfig))* |
| `pointSize` | number | No | | *(Inherited from [PointsConfig](#pointsconfig))* |
| `pointSymbol` | string | No | | *(Inherited from [PointsConfig](#pointsconfig))* |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs |
| `showPoints` | string | No | | *(Inherited from [PointsConfig](#pointsconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `never`, `always`. |
| `spanNulls` | | No | | *(Inherited from [LineConfig](#lineconfig))*<br/>Indicate if null values should be treated as gaps or connected.<br/>When the value is a number, it represents the maximum delta in the<br/>X axis that should be considered connected. For timeseries, this is milliseconds |
| `stacking` | [StackingConfig](#stackingconfig) | No | | *(Inherited from [StackableFieldConfig](#stackablefieldconfig))*<br/>TODO docs |
| `thresholdsStyle` | [GraphThresholdsStyleConfig](#graphthresholdsstyleconfig) | No | | TODO docs |
| `transform` | string | No | | TODO docs<br/>Possible values are: `constant`, `negative-Y`. |
### AxisConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | |
| `axisCenteredZero` | boolean | No | | |
| `axisColorMode` | string | No | | TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | |
| `axisLabel` | string | No | | |
| `axisPlacement` | string | No | | TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | |
| `axisSoftMin` | number | No | | |
| `axisWidth` | number | No | | |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | TODO docs |
### BarConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------------|---------|----------|---------|----------------------------------------------------|
| `barAlignment` | integer | No | | TODO docs<br/>Possible values are: `-1`, `0`, `1`. |
| `barMaxWidth` | number | No | | |
| `barWidthFactor` | number | No | | |
### FillConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------|--------|----------|---------|-------------|
| `fillBelowTo` | string | No | | |
| `fillColor` | string | No | | |
| `fillOpacity` | number | No | | |
### HideableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|---------------------------------------|----------|---------|-------------|
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | TODO docs |
### LineConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------------|-------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `lineColor` | string | No | | |
| `lineInterpolation` | string | No | | TODO docs<br/>Possible values are: `linear`, `smooth`, `stepBefore`, `stepAfter`. |
| `lineStyle` | [LineStyle](#linestyle) | No | | TODO docs |
| `lineWidth` | number | No | | |
| `spanNulls` | | No | | Indicate if null values should be treated as gaps or connected.<br/>When the value is a number, it represents the maximum delta in the<br/>X axis that should be considered connected. For timeseries, this is milliseconds |
### PointsConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------|--------|----------|---------|---------------------------------------------------------------|
| `pointColor` | string | No | | |
| `pointSize` | number | No | | |
| `pointSymbol` | string | No | | |
| `showPoints` | string | No | | TODO docs<br/>Possible values are: `auto`, `never`, `always`. |
### StackableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|-----------------------------------|----------|---------|-------------|
| `stacking` | [StackingConfig](#stackingconfig) | No | | TODO docs |
### Options
| Property | Type | Required | Default | Description |
|-----------------|---------------------------------------------------|----------|----------------------------------------------|--------------------------------------------------------------------|
| `frameIndex` | number | **Yes** | `0` | Represents the index of the selected frame |
| `showHeader` | boolean | **Yes** | `true` | Controls whether the panel should show the header |
| `cellHeight` | string | No | | Controls the height of the rows |
| `footer` | [object](#footer) | No | `map[countRows:false reducer:[] show:false]` | Controls footer options |
| `showTypeIcons` | boolean | No | `false` | Controls whether the header should show icons for the column types |
| `sortBy` | [TableSortByFieldState](#tablesortbyfieldstate)[] | No | | Used to control row sorting |
### TableSortByFieldState
Sort by field state
| Property | Type | Required | Default | Description |
|---------------|---------|----------|---------|-----------------------------------------------|
| `displayName` | string | **Yes** | | Sets the display name of the field to sort by |
| `desc` | boolean | No | | Flag used to indicate descending sort order |
### Footer
Controls footer options
| Property | Type | Required | Default | Description |
|----------|-----------------------------------|----------|---------|-------------|
| `object` | Possible types are: [](#), [](#). | | |

View File

@ -1,24 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: TempoDataQuery kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## TempoDataQuery
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|

View File

@ -1,119 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: TestDataDataQuery kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## TestDataDataQuery
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-------------------|-------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `refId` | string | **Yes** | | A unique identifier for the query within the list of targets.<br/>In server side expressions, the refId is used as a variable name to identify results.<br/>By default, the UI will assign A->Z; however setting meaningful names may be useful. |
| `alias` | string | No | | |
| `channel` | string | No | | |
| `csvContent` | string | No | | |
| `csvFileName` | string | No | | |
| `csvWave` | [CSVWave](#csvwave)[] | No | | |
| `datasource` | | No | | For mixed data sources the selected datasource is on the query level.<br/>For non mixed scenarios this is undefined.<br/>TODO find a better way to do this ^ that's friendly to schema<br/>TODO this shouldn't be unknown but DataSourceRef &#124; null |
| `dropPercent` | number | No | | Drop percentage (the chance we will lose a point 0-100) |
| `errorType` | string | No | | Possible values are: `server_panic`, `frontend_exception`, `frontend_observable`. |
| `flamegraphDiff` | boolean | No | | |
| `hide` | boolean | No | | true if query is disabled (ie should not be returned to the dashboard)<br/>Note this does not always imply that the query should not be executed since<br/>the results from a hidden query may be used as the input to other queries (SSE etc) |
| `labels` | string | No | | |
| `levelColumn` | boolean | No | | |
| `lines` | integer | No | | |
| `nodes` | [NodesQuery](#nodesquery) | No | | |
| `points` | array[] | No | | |
| `pulseWave` | [PulseWaveQuery](#pulsewavequery) | No | | |
| `queryType` | string | No | | Specify the query flavor<br/>TODO make this required and give it a default |
| `rawFrameContent` | string | No | | |
| `scenarioId` | string | No | | Possible values are: `random_walk`, `slow_query`, `random_walk_with_error`, `random_walk_table`, `exponential_heatmap_bucket_data`, `linear_heatmap_bucket_data`, `no_data_points`, `datapoints_outside_range`, `csv_metric_values`, `predictable_pulse`, `predictable_csv_wave`, `streaming_client`, `simulation`, `usa`, `live`, `grafana_api`, `arrow`, `annotations`, `table_static`, `server_error_500`, `logs`, `node_graph`, `flame_graph`, `raw_frame`, `csv_file`, `csv_content`, `trace`, `manual_entry`, `variables-query`. |
| `seriesCount` | integer | No | | |
| `sim` | [SimulationQuery](#simulationquery) | No | | |
| `spanCount` | integer | No | | |
| `stream` | [StreamingQuery](#streamingquery) | No | | |
| `stringInput` | string | No | | |
| `usa` | [USAQuery](#usaquery) | No | | |
### CSVWave
| Property | Type | Required | Default | Description |
|-------------|---------|----------|---------|-------------|
| `labels` | string | No | | |
| `name` | string | No | | |
| `timeStep` | integer | No | | |
| `valuesCSV` | string | No | | |
### NodesQuery
| Property | Type | Required | Default | Description |
|----------|---------|----------|---------|-------------------------------------------------------------------------------------|
| `count` | integer | No | | |
| `seed` | integer | No | | |
| `type` | string | No | | Possible values are: `random`, `response_small`, `response_medium`, `random edges`. |
### PulseWaveQuery
| Property | Type | Required | Default | Description |
|------------|---------|----------|---------|-------------|
| `offCount` | integer | No | | |
| `offValue` | number | No | | |
| `onCount` | integer | No | | |
| `onValue` | number | No | | |
| `timeStep` | integer | No | | |
### SimulationQuery
| Property | Type | Required | Default | Description |
|----------|-------------------|----------|---------|-------------|
| `key` | [object](#key) | **Yes** | | |
| `config` | [object](#config) | No | | |
| `last` | boolean | No | | |
| `stream` | boolean | No | | |
### Config
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Key
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------|
| `tick` | number | **Yes** | | |
| `type` | string | **Yes** | | |
| `uid` | string | No | | |
### StreamingQuery
| Property | Type | Required | Default | Description |
|----------|---------|----------|---------|-----------------------------------------------------------|
| `noise` | integer | **Yes** | | |
| `speed` | integer | **Yes** | | |
| `spread` | integer | **Yes** | | |
| `type` | string | **Yes** | | Possible values are: `signal`, `logs`, `fetch`, `traces`. |
| `bands` | integer | No | | |
| `url` | string | No | | |
### USAQuery
| Property | Type | Required | Default | Description |
|----------|----------|----------|---------|-------------|
| `fields` | string[] | No | | |
| `mode` | string | No | | |
| `period` | string | No | | |
| `states` | string[] | No | | |

View File

@ -1,46 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: TextPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## TextPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|----------------|------------------------|----------|-------------|---------------------------------------------------------------------------------------------------------|
| `CodeLanguage` | string | **Yes** | `plaintext` | Possible values are: `plaintext`, `yaml`, `xml`, `typescript`, `sql`, `go`, `markdown`, `html`, `json`. |
| `CodeOptions` | [object](#codeoptions) | **Yes** | | |
| `Options` | [object](#options) | **Yes** | | |
| `TextMode` | string | **Yes** | | Possible values are: `html`, `markdown`, `code`. |
### CodeOptions
| Property | Type | Required | Default | Description |
|-------------------|---------|----------|-------------|---------------------------------------------------------------------------------------------------------|
| `language` | string | **Yes** | `plaintext` | Possible values are: `plaintext`, `yaml`, `xml`, `typescript`, `sql`, `go`, `markdown`, `html`, `json`. |
| `showLineNumbers` | boolean | **Yes** | `false` | |
| `showMiniMap` | boolean | **Yes** | `false` | |
### Options
| Property | Type | Required | Default | Description |
|-----------|-----------------------------|----------|--------------------------------------------------------------------------------|--------------------------------------------------|
| `content` | string | **Yes** | `# Title | |
| | | | | |
| | | | For markdown syntax help: [commonmark.org/help](https://commonmark.org/help/)` | |
| `mode` | string | **Yes** | | Possible values are: `html`, `markdown`, `code`. |
| `code` | [CodeOptions](#codeoptions) | No | | |

View File

@ -1,233 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: TimeSeriesPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## TimeSeriesPanelCfg
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|---------------|---------------------------------------|----------|---------|-------------|
| `FieldConfig` | [GraphFieldConfig](#graphfieldconfig) | **Yes** | | TODO docs |
| `Options` | [object](#options) | **Yes** | | |
### GraphFieldConfig
TODO docs
It extends [LineConfig](#lineconfig) and [FillConfig](#fillconfig) and [PointsConfig](#pointsconfig) and [AxisConfig](#axisconfig) and [BarConfig](#barconfig) and [StackableFieldConfig](#stackablefieldconfig) and [HideableFieldConfig](#hideablefieldconfig).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisCenteredZero` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisColorMode` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisLabel` | string | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisPlacement` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisSoftMin` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisWidth` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `barAlignment` | integer | No | | *(Inherited from [BarConfig](#barconfig))*<br/>TODO docs<br/>Possible values are: `-1`, `0`, `1`. |
| `barMaxWidth` | number | No | | *(Inherited from [BarConfig](#barconfig))* |
| `barWidthFactor` | number | No | | *(Inherited from [BarConfig](#barconfig))* |
| `drawStyle` | string | No | | TODO docs<br/>Possible values are: `line`, `bars`, `points`. |
| `fillBelowTo` | string | No | | *(Inherited from [FillConfig](#fillconfig))* |
| `fillColor` | string | No | | *(Inherited from [FillConfig](#fillconfig))* |
| `fillOpacity` | number | No | | *(Inherited from [FillConfig](#fillconfig))* |
| `gradientMode` | string | No | | TODO docs<br/>Possible values are: `none`, `opacity`, `hue`, `scheme`. |
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [HideableFieldConfig](#hideablefieldconfig))*<br/>TODO docs |
| `lineColor` | string | No | | *(Inherited from [LineConfig](#lineconfig))* |
| `lineInterpolation` | string | No | | *(Inherited from [LineConfig](#lineconfig))*<br/>TODO docs<br/>Possible values are: `linear`, `smooth`, `stepBefore`, `stepAfter`. |
| `lineStyle` | [LineStyle](#linestyle) | No | | *(Inherited from [LineConfig](#lineconfig))*<br/>TODO docs |
| `lineWidth` | number | No | | *(Inherited from [LineConfig](#lineconfig))* |
| `pointColor` | string | No | | *(Inherited from [PointsConfig](#pointsconfig))* |
| `pointSize` | number | No | | *(Inherited from [PointsConfig](#pointsconfig))* |
| `pointSymbol` | string | No | | *(Inherited from [PointsConfig](#pointsconfig))* |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs |
| `showPoints` | string | No | | *(Inherited from [PointsConfig](#pointsconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `never`, `always`. |
| `spanNulls` | | No | | *(Inherited from [LineConfig](#lineconfig))*<br/>Indicate if null values should be treated as gaps or connected.<br/>When the value is a number, it represents the maximum delta in the<br/>X axis that should be considered connected. For timeseries, this is milliseconds |
| `stacking` | [StackingConfig](#stackingconfig) | No | | *(Inherited from [StackableFieldConfig](#stackablefieldconfig))*<br/>TODO docs |
| `thresholdsStyle` | [GraphThresholdsStyleConfig](#graphthresholdsstyleconfig) | No | | TODO docs |
| `transform` | string | No | | TODO docs<br/>Possible values are: `constant`, `negative-Y`. |
### AxisConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | |
| `axisCenteredZero` | boolean | No | | |
| `axisColorMode` | string | No | | TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | |
| `axisLabel` | string | No | | |
| `axisPlacement` | string | No | | TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | |
| `axisSoftMin` | number | No | | |
| `axisWidth` | number | No | | |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | TODO docs |
### ScaleDistributionConfig
TODO docs
| Property | Type | Required | Default | Description |
|-------------------|--------|----------|---------|--------------------------------------------------------------------------|
| `type` | string | **Yes** | | TODO docs<br/>Possible values are: `linear`, `log`, `ordinal`, `symlog`. |
| `linearThreshold` | number | No | | |
| `log` | number | No | | |
### BarConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------------|---------|----------|---------|----------------------------------------------------|
| `barAlignment` | integer | No | | TODO docs<br/>Possible values are: `-1`, `0`, `1`. |
| `barMaxWidth` | number | No | | |
| `barWidthFactor` | number | No | | |
### FillConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------|--------|----------|---------|-------------|
| `fillBelowTo` | string | No | | |
| `fillColor` | string | No | | |
| `fillOpacity` | number | No | | |
### GraphThresholdsStyleConfig
TODO docs
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-----------------------------------------------------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `off`, `line`, `dashed`, `area`, `line+area`, `dashed+area`, `series`. |
### HideSeriesConfig
TODO docs
| Property | Type | Required | Default | Description |
|-----------|---------|----------|---------|-------------|
| `legend` | boolean | **Yes** | | |
| `tooltip` | boolean | **Yes** | | |
| `viz` | boolean | **Yes** | | |
### HideableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|---------------------------------------|----------|---------|-------------|
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | TODO docs |
### LineConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------------|-------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `lineColor` | string | No | | |
| `lineInterpolation` | string | No | | TODO docs<br/>Possible values are: `linear`, `smooth`, `stepBefore`, `stepAfter`. |
| `lineStyle` | [LineStyle](#linestyle) | No | | TODO docs |
| `lineWidth` | number | No | | |
| `spanNulls` | | No | | Indicate if null values should be treated as gaps or connected.<br/>When the value is a number, it represents the maximum delta in the<br/>X axis that should be considered connected. For timeseries, this is milliseconds |
### LineStyle
TODO docs
| Property | Type | Required | Default | Description |
|----------|----------|----------|---------|--------------------------------------------------------|
| `dash` | number[] | No | | |
| `fill` | string | No | | Possible values are: `solid`, `dash`, `dot`, `square`. |
### PointsConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------|--------|----------|---------|---------------------------------------------------------------|
| `pointColor` | string | No | | |
| `pointSize` | number | No | | |
| `pointSymbol` | string | No | | |
| `showPoints` | string | No | | TODO docs<br/>Possible values are: `auto`, `never`, `always`. |
### StackableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|-----------------------------------|----------|---------|-------------|
| `stacking` | [StackingConfig](#stackingconfig) | No | | TODO docs |
### StackingConfig
TODO docs
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-----------------------------------------------------------------|
| `group` | string | No | | |
| `mode` | string | No | | TODO docs<br/>Possible values are: `none`, `normal`, `percent`. |
### Options
It extends [OptionsWithTimezones](#optionswithtimezones).
| Property | Type | Required | Default | Description |
|------------|-----------------------------------------|----------|---------|------------------------------------------------------------------|
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | TODO docs |
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | TODO docs |
| `timezone` | string[] | No | | *(Inherited from [OptionsWithTimezones](#optionswithtimezones))* |
### OptionsWithTimezones
TODO docs
| Property | Type | Required | Default | Description |
|------------|----------|----------|---------|-------------|
| `timezone` | string[] | No | | |
### VizLegendOptions
TODO docs
| Property | Type | Required | Default | Description |
|---------------|----------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | |
| `displayMode` | string | **Yes** | | TODO docs<br/>Note: "hidden" needs to remain as an option for plugins compatibility<br/>Possible values are: `list`, `table`, `hidden`. |
| `placement` | string | **Yes** | | TODO docs<br/>Possible values are: `bottom`, `right`. |
| `showLegend` | boolean | **Yes** | | |
| `asTable` | boolean | No | | |
| `isVisible` | boolean | No | | |
| `sortBy` | string | No | | |
| `sortDesc` | boolean | No | | |
| `width` | number | No | | |
### VizTooltipOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|---------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `single`, `multi`, `none`. |
| `sort` | string | **Yes** | | TODO docs<br/>Possible values are: `asc`, `desc`, `none`. |
| `maxHeight` | number | No | | |
| `maxWidth` | number | No | | |

View File

@ -1,225 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: TrendPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## TrendPanelCfg
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|---------------|---------------------------------------|----------|---------|----------------------------------------------------------------------|
| `FieldConfig` | [GraphFieldConfig](#graphfieldconfig) | **Yes** | | TODO docs |
| `Options` | [object](#options) | **Yes** | | Identical to timeseries... except it does not have timezone settings |
### GraphFieldConfig
TODO docs
It extends [LineConfig](#lineconfig) and [FillConfig](#fillconfig) and [PointsConfig](#pointsconfig) and [AxisConfig](#axisconfig) and [BarConfig](#barconfig) and [StackableFieldConfig](#stackablefieldconfig) and [HideableFieldConfig](#hideablefieldconfig).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisCenteredZero` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisColorMode` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisLabel` | string | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisPlacement` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisSoftMin` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisWidth` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `barAlignment` | integer | No | | *(Inherited from [BarConfig](#barconfig))*<br/>TODO docs<br/>Possible values are: `-1`, `0`, `1`. |
| `barMaxWidth` | number | No | | *(Inherited from [BarConfig](#barconfig))* |
| `barWidthFactor` | number | No | | *(Inherited from [BarConfig](#barconfig))* |
| `drawStyle` | string | No | | TODO docs<br/>Possible values are: `line`, `bars`, `points`. |
| `fillBelowTo` | string | No | | *(Inherited from [FillConfig](#fillconfig))* |
| `fillColor` | string | No | | *(Inherited from [FillConfig](#fillconfig))* |
| `fillOpacity` | number | No | | *(Inherited from [FillConfig](#fillconfig))* |
| `gradientMode` | string | No | | TODO docs<br/>Possible values are: `none`, `opacity`, `hue`, `scheme`. |
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [HideableFieldConfig](#hideablefieldconfig))*<br/>TODO docs |
| `lineColor` | string | No | | *(Inherited from [LineConfig](#lineconfig))* |
| `lineInterpolation` | string | No | | *(Inherited from [LineConfig](#lineconfig))*<br/>TODO docs<br/>Possible values are: `linear`, `smooth`, `stepBefore`, `stepAfter`. |
| `lineStyle` | [LineStyle](#linestyle) | No | | *(Inherited from [LineConfig](#lineconfig))*<br/>TODO docs |
| `lineWidth` | number | No | | *(Inherited from [LineConfig](#lineconfig))* |
| `pointColor` | string | No | | *(Inherited from [PointsConfig](#pointsconfig))* |
| `pointSize` | number | No | | *(Inherited from [PointsConfig](#pointsconfig))* |
| `pointSymbol` | string | No | | *(Inherited from [PointsConfig](#pointsconfig))* |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs |
| `showPoints` | string | No | | *(Inherited from [PointsConfig](#pointsconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `never`, `always`. |
| `spanNulls` | | No | | *(Inherited from [LineConfig](#lineconfig))*<br/>Indicate if null values should be treated as gaps or connected.<br/>When the value is a number, it represents the maximum delta in the<br/>X axis that should be considered connected. For timeseries, this is milliseconds |
| `stacking` | [StackingConfig](#stackingconfig) | No | | *(Inherited from [StackableFieldConfig](#stackablefieldconfig))*<br/>TODO docs |
| `thresholdsStyle` | [GraphThresholdsStyleConfig](#graphthresholdsstyleconfig) | No | | TODO docs |
| `transform` | string | No | | TODO docs<br/>Possible values are: `constant`, `negative-Y`. |
### AxisConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | |
| `axisCenteredZero` | boolean | No | | |
| `axisColorMode` | string | No | | TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | |
| `axisLabel` | string | No | | |
| `axisPlacement` | string | No | | TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | |
| `axisSoftMin` | number | No | | |
| `axisWidth` | number | No | | |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | TODO docs |
### ScaleDistributionConfig
TODO docs
| Property | Type | Required | Default | Description |
|-------------------|--------|----------|---------|--------------------------------------------------------------------------|
| `type` | string | **Yes** | | TODO docs<br/>Possible values are: `linear`, `log`, `ordinal`, `symlog`. |
| `linearThreshold` | number | No | | |
| `log` | number | No | | |
### BarConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------------|---------|----------|---------|----------------------------------------------------|
| `barAlignment` | integer | No | | TODO docs<br/>Possible values are: `-1`, `0`, `1`. |
| `barMaxWidth` | number | No | | |
| `barWidthFactor` | number | No | | |
### FillConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------|--------|----------|---------|-------------|
| `fillBelowTo` | string | No | | |
| `fillColor` | string | No | | |
| `fillOpacity` | number | No | | |
### GraphThresholdsStyleConfig
TODO docs
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-----------------------------------------------------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `off`, `line`, `dashed`, `area`, `line+area`, `dashed+area`, `series`. |
### HideSeriesConfig
TODO docs
| Property | Type | Required | Default | Description |
|-----------|---------|----------|---------|-------------|
| `legend` | boolean | **Yes** | | |
| `tooltip` | boolean | **Yes** | | |
| `viz` | boolean | **Yes** | | |
### HideableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|---------------------------------------|----------|---------|-------------|
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | TODO docs |
### LineConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------------|-------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `lineColor` | string | No | | |
| `lineInterpolation` | string | No | | TODO docs<br/>Possible values are: `linear`, `smooth`, `stepBefore`, `stepAfter`. |
| `lineStyle` | [LineStyle](#linestyle) | No | | TODO docs |
| `lineWidth` | number | No | | |
| `spanNulls` | | No | | Indicate if null values should be treated as gaps or connected.<br/>When the value is a number, it represents the maximum delta in the<br/>X axis that should be considered connected. For timeseries, this is milliseconds |
### LineStyle
TODO docs
| Property | Type | Required | Default | Description |
|----------|----------|----------|---------|--------------------------------------------------------|
| `dash` | number[] | No | | |
| `fill` | string | No | | Possible values are: `solid`, `dash`, `dot`, `square`. |
### PointsConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------|--------|----------|---------|---------------------------------------------------------------|
| `pointColor` | string | No | | |
| `pointSize` | number | No | | |
| `pointSymbol` | string | No | | |
| `showPoints` | string | No | | TODO docs<br/>Possible values are: `auto`, `never`, `always`. |
### StackableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|-----------------------------------|----------|---------|-------------|
| `stacking` | [StackingConfig](#stackingconfig) | No | | TODO docs |
### StackingConfig
TODO docs
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-----------------------------------------------------------------|
| `group` | string | No | | |
| `mode` | string | No | | TODO docs<br/>Possible values are: `none`, `normal`, `percent`. |
### Options
Identical to timeseries... except it does not have timezone settings
| Property | Type | Required | Default | Description |
|-----------|-----------------------------------------|----------|---------|-------------------------------------------------------|
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | TODO docs |
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | TODO docs |
| `xField` | string | No | | Name of the x field to use (defaults to first number) |
### VizLegendOptions
TODO docs
| Property | Type | Required | Default | Description |
|---------------|----------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | |
| `displayMode` | string | **Yes** | | TODO docs<br/>Note: "hidden" needs to remain as an option for plugins compatibility<br/>Possible values are: `list`, `table`, `hidden`. |
| `placement` | string | **Yes** | | TODO docs<br/>Possible values are: `bottom`, `right`. |
| `showLegend` | boolean | **Yes** | | |
| `asTable` | boolean | No | | |
| `isVisible` | boolean | No | | |
| `sortBy` | string | No | | |
| `sortDesc` | boolean | No | | |
| `width` | number | No | | |
### VizTooltipOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|---------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `single`, `multi`, `none`. |
| `sort` | string | **Yes** | | TODO docs<br/>Possible values are: `asc`, `desc`, `none`. |
| `maxHeight` | number | No | | |
| `maxWidth` | number | No | | |

View File

@ -1,242 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: XYChartPanelCfg kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## XYChartPanelCfg
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
| Property | Type | Required | Default | Description |
|-----------------------|--------------------------------|----------|---------|----------------------------------------------------------------------|
| `FieldConfig` | [object](#fieldconfig) | **Yes** | | |
| `Options` | [object](#options) | **Yes** | | |
| `ScatterSeriesConfig` | [object](#scatterseriesconfig) | **Yes** | | |
| `ScatterShow` | string | **Yes** | | Possible values are: `points`, `lines`, `points+lines`. |
| `SeriesMapping` | string | **Yes** | | Auto is "table" in the UI<br/>Possible values are: `auto`, `manual`. |
| `XYDimensionConfig` | [object](#xydimensionconfig) | **Yes** | | Configuration for the Table/Auto mode |
### FieldConfig
It extends [HideableFieldConfig](#hideablefieldconfig) and [AxisConfig](#axisconfig).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisCenteredZero` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisColorMode` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisLabel` | string | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisPlacement` | string | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisSoftMin` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `axisWidth` | number | No | | *(Inherited from [AxisConfig](#axisconfig))* |
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [HideableFieldConfig](#hideablefieldconfig))*<br/>TODO docs |
| `labelValue` | [TextDimensionConfig](#textdimensionconfig) | No | | |
| `label` | string | No | | TODO docs<br/>Possible values are: `auto`, `never`, `always`. |
| `lineColor` | [ColorDimensionConfig](#colordimensionconfig) | No | | |
| `lineStyle` | [LineStyle](#linestyle) | No | | TODO docs |
| `lineWidth` | integer | No | | Constraint: `>=0 & <=2147483647`. |
| `pointColor` | [ColorDimensionConfig](#colordimensionconfig) | No | | |
| `pointSize` | [ScaleDimensionConfig](#scaledimensionconfig) | No | | |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | *(Inherited from [AxisConfig](#axisconfig))*<br/>TODO docs |
| `show` | string | No | | Possible values are: `points`, `lines`, `points+lines`. |
### AxisConfig
TODO docs
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | |
| `axisCenteredZero` | boolean | No | | |
| `axisColorMode` | string | No | | TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | |
| `axisLabel` | string | No | | |
| `axisPlacement` | string | No | | TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | |
| `axisSoftMin` | number | No | | |
| `axisWidth` | number | No | | |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | TODO docs |
### ScaleDistributionConfig
TODO docs
| Property | Type | Required | Default | Description |
|-------------------|--------|----------|---------|--------------------------------------------------------------------------|
| `type` | string | **Yes** | | TODO docs<br/>Possible values are: `linear`, `log`, `ordinal`, `symlog`. |
| `linearThreshold` | number | No | | |
| `log` | number | No | | |
### ColorDimensionConfig
It extends [BaseDimensionConfig](#basedimensionconfig).
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|--------------------------------------------------------------------------------------------------------------|
| `field` | string | No | | *(Inherited from [BaseDimensionConfig](#basedimensionconfig))*<br/>fixed: T -- will be added by each element |
| `fixed` | string | No | | |
### BaseDimensionConfig
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------------------------------------|
| `field` | string | No | | fixed: T -- will be added by each element |
### HideSeriesConfig
TODO docs
| Property | Type | Required | Default | Description |
|-----------|---------|----------|---------|-------------|
| `legend` | boolean | **Yes** | | |
| `tooltip` | boolean | **Yes** | | |
| `viz` | boolean | **Yes** | | |
### HideableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|---------------------------------------|----------|---------|-------------|
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | TODO docs |
### LineStyle
TODO docs
| Property | Type | Required | Default | Description |
|----------|----------|----------|---------|--------------------------------------------------------|
| `dash` | number[] | No | | |
| `fill` | string | No | | Possible values are: `solid`, `dash`, `dot`, `square`. |
### ScaleDimensionConfig
It extends [BaseDimensionConfig](#basedimensionconfig).
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|--------------------------------------------------------------------------------------------------------------|
| `max` | number | **Yes** | | |
| `min` | number | **Yes** | | |
| `field` | string | No | | *(Inherited from [BaseDimensionConfig](#basedimensionconfig))*<br/>fixed: T -- will be added by each element |
| `fixed` | number | No | | |
| `mode` | string | No | | Possible values are: `linear`, `quad`. |
### TextDimensionConfig
It extends [BaseDimensionConfig](#basedimensionconfig).
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|--------------------------------------------------------------------------------------------------------------|
| `mode` | string | **Yes** | | Possible values are: `fixed`, `field`, `template`. |
| `field` | string | No | | *(Inherited from [BaseDimensionConfig](#basedimensionconfig))*<br/>fixed: T -- will be added by each element |
| `fixed` | string | No | | |
### Options
It extends [OptionsWithLegend](#optionswithlegend) and [OptionsWithTooltip](#optionswithtooltip).
| Property | Type | Required | Default | Description |
|-----------------|-----------------------------------------------|----------|---------|----------------------------------------------------------------------------|
| `dims` | [XYDimensionConfig](#xydimensionconfig) | **Yes** | | Configuration for the Table/Auto mode |
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | *(Inherited from [OptionsWithLegend](#optionswithlegend))*<br/>TODO docs |
| `series` | [ScatterSeriesConfig](#scatterseriesconfig)[] | **Yes** | | Manual Mode |
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | *(Inherited from [OptionsWithTooltip](#optionswithtooltip))*<br/>TODO docs |
| `seriesMapping` | string | No | | Auto is "table" in the UI<br/>Possible values are: `auto`, `manual`. |
### OptionsWithLegend
TODO docs
| Property | Type | Required | Default | Description |
|----------|---------------------------------------|----------|---------|-------------|
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | TODO docs |
### VizLegendOptions
TODO docs
| Property | Type | Required | Default | Description |
|---------------|----------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `calcs` | string[] | **Yes** | | |
| `displayMode` | string | **Yes** | | TODO docs<br/>Note: "hidden" needs to remain as an option for plugins compatibility<br/>Possible values are: `list`, `table`, `hidden`. |
| `placement` | string | **Yes** | | TODO docs<br/>Possible values are: `bottom`, `right`. |
| `showLegend` | boolean | **Yes** | | |
| `asTable` | boolean | No | | |
| `isVisible` | boolean | No | | |
| `sortBy` | string | No | | |
| `sortDesc` | boolean | No | | |
| `width` | number | No | | |
### OptionsWithTooltip
TODO docs
| Property | Type | Required | Default | Description |
|-----------|-----------------------------------------|----------|---------|-------------|
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | TODO docs |
### VizTooltipOptions
TODO docs
| Property | Type | Required | Default | Description |
|-------------|--------|----------|---------|---------------------------------------------------------------|
| `mode` | string | **Yes** | | TODO docs<br/>Possible values are: `single`, `multi`, `none`. |
| `sort` | string | **Yes** | | TODO docs<br/>Possible values are: `asc`, `desc`, `none`. |
| `maxHeight` | number | No | | |
| `maxWidth` | number | No | | |
### ScatterSeriesConfig
It extends [FieldConfig](#fieldconfig).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------|
| `axisBorderShow` | boolean | No | | *(Inherited from [FieldConfig](#fieldconfig))* |
| `axisCenteredZero` | boolean | No | | *(Inherited from [FieldConfig](#fieldconfig))* |
| `axisColorMode` | string | No | | *(Inherited from [FieldConfig](#fieldconfig))*<br/>TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | *(Inherited from [FieldConfig](#fieldconfig))* |
| `axisLabel` | string | No | | *(Inherited from [FieldConfig](#fieldconfig))* |
| `axisPlacement` | string | No | | *(Inherited from [FieldConfig](#fieldconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | *(Inherited from [FieldConfig](#fieldconfig))* |
| `axisSoftMin` | number | No | | *(Inherited from [FieldConfig](#fieldconfig))* |
| `axisWidth` | number | No | | *(Inherited from [FieldConfig](#fieldconfig))* |
| `frame` | number | No | | |
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [FieldConfig](#fieldconfig))*<br/>TODO docs |
| `labelValue` | [TextDimensionConfig](#textdimensionconfig) | No | | *(Inherited from [FieldConfig](#fieldconfig))* |
| `label` | string | No | | *(Inherited from [FieldConfig](#fieldconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `never`, `always`. |
| `lineColor` | [ColorDimensionConfig](#colordimensionconfig) | No | | *(Inherited from [FieldConfig](#fieldconfig))* |
| `lineStyle` | [LineStyle](#linestyle) | No | | *(Inherited from [FieldConfig](#fieldconfig))*<br/>TODO docs |
| `lineWidth` | integer | No | | *(Inherited from [FieldConfig](#fieldconfig))*<br/>Constraint: `>=0 & <=2147483647`. |
| `name` | string | No | | |
| `pointColor` | [ColorDimensionConfig](#colordimensionconfig) | No | | *(Inherited from [FieldConfig](#fieldconfig))* |
| `pointSize` | [ScaleDimensionConfig](#scaledimensionconfig) | No | | *(Inherited from [FieldConfig](#fieldconfig))* |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | *(Inherited from [FieldConfig](#fieldconfig))*<br/>TODO docs |
| `show` | string | No | | *(Inherited from [FieldConfig](#fieldconfig))*<br/>Possible values are: `points`, `lines`, `points+lines`. |
| `x` | string | No | | |
| `y` | string | No | | |
### XYDimensionConfig
Configuration for the Table/Auto mode
| Property | Type | Required | Default | Description |
|-----------|----------|----------|---------|-----------------------------------|
| `frame` | integer | **Yes** | | Constraint: `>=0 & <=2147483647`. |
| `exclude` | string[] | No | | |
| `x` | string | No | | |

View File

@ -1,14 +0,0 @@
---
labels:
products:
- enterprise
- oss
title: Core kinds
weight: 200
---
# Grafana core kinds
Kinds that define Grafanas core schematized object types - dashboards, datasources, users, etc.
{{< section >}}

View File

@ -1,131 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: AccessPolicy kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## AccessPolicy
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
Access rules for a scope+role. NOTE there is a unique constraint on role+scope
| Property | Type | Required | Default | Description |
|------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `metadata` | [object](#metadata) | **Yes** | | metadata contains embedded CommonMetadata and can be extended with custom string fields<br/>TODO: use CommonMetadata instead of redefining here; currently needs to be defined here<br/>without external reference as using the CommonMetadata reference breaks thema codegen. |
| `spec` | [object](#spec) | **Yes** | | |
| `status` | [object](#status) | **Yes** | | |
### Metadata
metadata contains embedded CommonMetadata and can be extended with custom string fields
TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
without external reference as using the CommonMetadata reference breaks thema codegen.
It extends [_kubeObjectMetadata](#_kubeobjectmetadata).
| Property | Type | Required | Default | Description |
|---------------------|------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `createdBy` | string | **Yes** | | |
| `creationTimestamp` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `extraFields` | [object](#extrafields) | **Yes** | | extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata |
| `finalizers` | string[] | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `labels` | map[string]string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `resourceVersion` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `uid` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `updateTimestamp` | string | **Yes** | | |
| `updatedBy` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
### _kubeObjectMetadata
_kubeObjectMetadata is metadata found in a kubernetes object's metadata field.
It is not exhaustive and only includes fields which may be relevant to a kind's implementation,
As it is also intended to be generic enough to function with any API Server.
| Property | Type | Required | Default | Description |
|---------------------|-------------------|----------|---------|-------------|
| `creationTimestamp` | string | **Yes** | | |
| `finalizers` | string[] | **Yes** | | |
| `labels` | map[string]string | **Yes** | | |
| `resourceVersion` | string | **Yes** | | |
| `uid` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | |
### ExtraFields
extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Spec
| Property | Type | Required | Default | Description |
|----------|-----------------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------|
| `role` | [RoleRef](#roleref) | **Yes** | | |
| `rules` | [AccessRule](#accessrule)[] | **Yes** | | The set of rules to apply. Note that * is required to modify<br/>access policy rules, and that "none" will reject all actions |
| `scope` | [ResourceRef](#resourceref) | **Yes** | | |
### AccessRule
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `kind` | string | **Yes** | | The kind this rule applies to (dashboards, alert, etc) |
| `verb` | string | **Yes** | | READ, WRITE, CREATE, DELETE, ...<br/>should move to k8s style verbs like: "get", "list", "watch", "create", "update", "patch", "delete" |
| `target` | string | No | | Specific sub-elements like "alert.rules" or "dashboard.permissions"???? |
### ResourceRef
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------|
| `kind` | string | **Yes** | | |
| `name` | string | **Yes** | | |
### RoleRef
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `kind` | string | **Yes** | | Policies can apply to roles, teams, or users<br/>Applying policies to individual users is supported, but discouraged<br/>Possible values are: `Role`, `BuiltinRole`, `Team`, `User`. |
| `name` | string | **Yes** | | |
| `xname` | string | **Yes** | | |
### Status
| Property | Type | Required | Default | Description |
|--------------------|------------------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `additionalFields` | [object](#additionalfields) | No | | additionalFields is reserved for future use |
| `operatorStates` | map[string][status.#OperatorState](#status.#operatorstate) | No | | operatorStates is a map of operator ID to operator state evaluations.<br/>Any operator which consumes this kind SHOULD add its state evaluation information to this field. |
### AdditionalFields
additionalFields is reserved for future use
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Status.#OperatorState
| Property | Type | Required | Default | Description |
|--------------------|--------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `lastEvaluation` | string | **Yes** | | lastEvaluation is the ResourceVersion last evaluated |
| `state` | string | **Yes** | | state describes the state of the lastEvaluation.<br/>It is limited to three possible states for machine evaluation.<br/>Possible values are: `success`, `in_progress`, `failed`. |
| `descriptiveState` | string | No | | descriptiveState is an optional more descriptive state field which has no requirements on format |
| `details` | [object](#details) | No | | details contains any extra information that is operator-specific |
### Details
details contains any extra information that is operator-specific
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|

View File

@ -1,677 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: Dashboard kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## Dashboard
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
A Grafana dashboard.
| Property | Type | Required | Default | Description |
|------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `metadata` | [object](#metadata) | **Yes** | | metadata contains embedded CommonMetadata and can be extended with custom string fields<br/>TODO: use CommonMetadata instead of redefining here; currently needs to be defined here<br/>without external reference as using the CommonMetadata reference breaks thema codegen. |
| `spec` | [object](#spec) | **Yes** | | |
| `status` | [object](#status) | **Yes** | | |
### Metadata
metadata contains embedded CommonMetadata and can be extended with custom string fields
TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
without external reference as using the CommonMetadata reference breaks thema codegen.
It extends [_kubeObjectMetadata](#_kubeobjectmetadata).
| Property | Type | Required | Default | Description |
|---------------------|------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `createdBy` | string | **Yes** | | |
| `creationTimestamp` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `extraFields` | [object](#extrafields) | **Yes** | | extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata |
| `finalizers` | string[] | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `labels` | map[string]string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `resourceVersion` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `uid` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `updateTimestamp` | string | **Yes** | | |
| `updatedBy` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
### _kubeObjectMetadata
_kubeObjectMetadata is metadata found in a kubernetes object's metadata field.
It is not exhaustive and only includes fields which may be relevant to a kind's implementation,
As it is also intended to be generic enough to function with any API Server.
| Property | Type | Required | Default | Description |
|---------------------|-------------------|----------|---------|-------------|
| `creationTimestamp` | string | **Yes** | | |
| `finalizers` | string[] | **Yes** | | |
| `labels` | map[string]string | **Yes** | | |
| `resourceVersion` | string | **Yes** | | |
| `uid` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | |
### ExtraFields
extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Spec
| Property | Type | Required | Default | Description |
|------------------------|---------------------------------------------|----------|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `schemaVersion` | uint16 | **Yes** | `36` | Version of the JSON schema, incremented each time a Grafana update brings<br/>changes to said schema. |
| `annotations` | [AnnotationContainer](#annotationcontainer) | No | | Contains the list of annotations that are associated with the dashboard.<br/>Annotations are used to overlay event markers and overlay event tags on graphs.<br/>Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the HTTP API.<br/>See https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/annotate-visualizations/ |
| `description` | string | No | | Description of dashboard. |
| `editable` | boolean | No | `true` | Whether a dashboard is editable or not. |
| `fiscalYearStartMonth` | integer | No | `0` | The month that the fiscal year starts on. 0 = January, 11 = December<br/>Constraint: `>=0 & <12`. |
| `gnetId` | string | No | | ID of a dashboard imported from the https://grafana.com/grafana/dashboards/ portal |
| `graphTooltip` | integer | No | `0` | 0 for no shared crosshair or tooltip (default).<br/>1 for shared crosshair.<br/>2 for shared crosshair AND shared tooltip.<br/>Possible values are: `0`, `1`, `2`. |
| `id` | integer or null | No | | Unique numeric identifier for the dashboard.<br/>`id` is internal to a specific Grafana instance. `uid` should be used to identify a dashboard across Grafana instances. |
| `links` | [DashboardLink](#dashboardlink)[] | No | | Links with references to other dashboards or external websites. |
| `liveNow` | boolean | No | | When set to true, the dashboard will redraw panels at an interval matching the pixel width.<br/>This will keep data "moving left" regardless of the query refresh rate. This setting helps<br/>avoid dashboards presenting stale live data |
| `panels` | [object](#panels)[] | No | | List of dashboard panels |
| `refresh` | string | No | | Refresh rate of dashboard. Represented via interval string, e.g. "5s", "1m", "1h", "1d". |
| `revision` | integer | No | | This property should only be used in dashboards defined by plugins. It is a quick check<br/>to see if the version has changed since the last time. |
| `snapshot` | [Snapshot](#snapshot) | No | | A dashboard snapshot shares an interactive dashboard publicly.<br/>It is a read-only version of a dashboard, and is not editable.<br/>It is possible to create a snapshot of a snapshot.<br/>Grafana strips away all sensitive information from the dashboard.<br/>Sensitive information stripped: queries (metric, template,annotation) and panel links. |
| `tags` | string[] | No | | Tags associated with dashboard. |
| `templating` | [object](#templating) | No | | Configured template variables |
| `time` | [object](#time) | No | | Time range for dashboard.<br/>Accepted values are relative time strings like {from: 'now-6h', to: 'now'} or absolute time strings like {from: '2020-07-10T08:00:00.000Z', to: '2020-07-10T14:00:00.000Z'}. |
| `timepicker` | [TimePickerConfig](#timepickerconfig) | No | | Time picker configuration<br/>It defines the default config for the time picker and the refresh picker for the specific dashboard. |
| `timezone` | string | No | `browser` | Timezone of dashboard. Accepted values are IANA TZDB zone ID or "browser" or "utc". |
| `title` | string | No | | Title of dashboard. |
| `uid` | string | No | | Unique dashboard identifier that can be generated by anyone. string (8-40) |
| `version` | uint32 | No | | Version of the dashboard, incremented each time the dashboard is updated. |
| `weekStart` | string | No | | Day when the week starts. Expressed by the name of the day in lowercase, e.g. "monday". |
### AnnotationContainer
Contains the list of annotations that are associated with the dashboard.
Annotations are used to overlay event markers and overlay event tags on graphs.
Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the HTTP API.
See https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/annotate-visualizations/
| Property | Type | Required | Default | Description |
|----------|---------------------------------------|----------|---------|---------------------|
| `list` | [AnnotationQuery](#annotationquery)[] | No | | List of annotations |
### AnnotationQuery
TODO docs
FROM: AnnotationQuery in grafana-data/src/types/annotations.ts
| Property | Type | Required | Default | Description |
|--------------|-------------------------------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `datasource` | [DataSourceRef](#datasourceref) | **Yes** | | Ref to a DataSource instance |
| `enable` | boolean | **Yes** | `true` | When enabled the annotation query is issued with every dashboard refresh |
| `iconColor` | string | **Yes** | | Color to use for the annotation event markers |
| `name` | string | **Yes** | | Name of annotation. |
| `builtIn` | number | No | `0` | Set to 1 for the standard annotation query all dashboards have by default. |
| `filter` | [AnnotationPanelFilter](#annotationpanelfilter) | No | | |
| `hide` | boolean | No | `false` | Annotation queries can be toggled on or off at the top of the dashboard.<br/>When hide is true, the toggle is not shown in the dashboard. |
| `target` | [AnnotationTarget](#annotationtarget) | No | | TODO: this should be a regular DataQuery that depends on the selected dashboard<br/>these match the properties of the "grafana" datasouce that is default in most dashboards |
| `type` | string | No | | TODO -- this should not exist here, it is based on the --grafana-- datasource |
### AnnotationPanelFilter
| Property | Type | Required | Default | Description |
|-----------|-----------|----------|---------|-----------------------------------------------------|
| `ids` | integer[] | **Yes** | | Panel IDs that should be included or excluded |
| `exclude` | boolean | No | `false` | Should the specified panels be included or excluded |
### AnnotationTarget
TODO: this should be a regular DataQuery that depends on the selected dashboard
these match the properties of the "grafana" datasouce that is default in most dashboards
| Property | Type | Required | Default | Description |
|------------|----------|----------|---------|-------------------------------------------------------------------------------------------------------------------|
| `limit` | integer | **Yes** | | Only required/valid for the grafana datasource...<br/>but code+tests is already depending on it so hard to change |
| `matchAny` | boolean | **Yes** | | Only required/valid for the grafana datasource...<br/>but code+tests is already depending on it so hard to change |
| `tags` | string[] | **Yes** | | Only required/valid for the grafana datasource...<br/>but code+tests is already depending on it so hard to change |
| `type` | string | **Yes** | | Only required/valid for the grafana datasource...<br/>but code+tests is already depending on it so hard to change |
### DataSourceRef
Ref to a DataSource instance
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|------------------------------|
| `type` | string | No | | The plugin type-id |
| `uid` | string | No | | Specific datasource instance |
### DashboardLink
Links with references to other dashboards or external resources
| Property | Type | Required | Default | Description |
|---------------|----------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `asDropdown` | boolean | **Yes** | `false` | If true, all dashboards links will be displayed in a dropdown. If false, all dashboards links will be displayed side by side. Only valid if the type is dashboards |
| `icon` | string | **Yes** | | Icon name to be displayed with the link |
| `includeVars` | boolean | **Yes** | `false` | If true, includes current template variables values in the link as query params |
| `keepTime` | boolean | **Yes** | `false` | If true, includes current time range in the link as query params |
| `tags` | string[] | **Yes** | | List of tags to limit the linked dashboards. If empty, all dashboards will be displayed. Only valid if the type is dashboards |
| `targetBlank` | boolean | **Yes** | `false` | If true, the link will be opened in a new tab |
| `title` | string | **Yes** | | Title to display with the link |
| `tooltip` | string | **Yes** | | Tooltip to display when the user hovers their mouse over it |
| `type` | string | **Yes** | | Dashboard Link type. Accepted values are dashboards (to refer to another dashboard) and link (to refer to an external resource)<br/>Possible values are: `link`, `dashboards`. |
| `url` | string | No | | Link URL. Only required/valid if the type is link |
### Snapshot
A dashboard snapshot shares an interactive dashboard publicly.
It is a read-only version of a dashboard, and is not editable.
It is possible to create a snapshot of a snapshot.
Grafana strips away all sensitive information from the dashboard.
Sensitive information stripped: queries (metric, template,annotation) and panel links.
| Property | Type | Required | Default | Description |
|---------------|---------|----------|---------|--------------------------------------------------------------------------------|
| `created` | string | **Yes** | | Time when the snapshot was created |
| `expires` | string | **Yes** | | Time when the snapshot expires, default is never to expire |
| `externalUrl` | string | **Yes** | | external url, if snapshot was shared in external grafana instance |
| `external` | boolean | **Yes** | | Is the snapshot saved in an external grafana instance |
| `id` | uint32 | **Yes** | | Unique identifier of the snapshot |
| `key` | string | **Yes** | | Optional, defined the unique key of the snapshot, required if external is true |
| `name` | string | **Yes** | | Optional, name of the snapshot |
| `orgId` | uint32 | **Yes** | | org id of the snapshot |
| `originalUrl` | string | **Yes** | | original url, url of the dashboard that was snapshotted |
| `updated` | string | **Yes** | | last time when the snapshot was updated |
| `userId` | uint32 | **Yes** | | user id of the snapshot creator |
| `url` | string | No | | url of the snapshot, if snapshot was shared internally |
### TimePickerConfig
Time picker configuration
It defines the default config for the time picker and the refresh picker for the specific dashboard.
| Property | Type | Required | Default | Description |
|---------------------|----------|----------|---------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| `hidden` | boolean | No | `false` | Whether timepicker is visible or not. |
| `nowDelay` | string | No | | Override the now time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values. |
| `refresh_intervals` | string[] | No | `[5s 10s 30s 1m 5m 15m 30m 1h 2h 1d]` | Interval options available in the refresh picker dropdown. |
| `time_options` | string[] | No | `[5m 15m 1h 6h 12h 24h 2d 7d 30d]` | Selectable options available in the time picker dropdown. Has no effect on provisioned dashboard. |
### Panels
| Property | Type | Required | Default | Description |
|----------|---------------------------------------------------|----------|---------|-------------|
| `object` | Possible types are: [](#), [RowPanel](#rowpanel). | | |
### DataTransformerConfig
Transformations allow to manipulate data returned by a query before the system applies a visualization.
Using transformations you can: rename fields, join time series data, perform mathematical operations across queries,
use the output of one transformation as the input to another transformation, etc.
| Property | Type | Required | Default | Description |
|------------|---------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `id` | string | **Yes** | | Unique identifier of transformer |
| `options` | | **Yes** | | Options to be passed to the transformer<br/>Valid options depend on the transformer id |
| `disabled` | boolean | No | | Disabled transformations are skipped |
| `filter` | [MatcherConfig](#matcherconfig) | No | | Matcher is a predicate configuration. Based on the config a set of field(s) or values is filtered in order to apply override / transformation.<br/>It comes with in id ( to resolve implementation from registry) and a configuration thats specific to a particular matcher type. |
| `topic` | string | No | | Where to pull DataFrames from as input to transformation<br/>Possible values are: `series`, `annotations`, `alertStates`. |
### MatcherConfig
Matcher is a predicate configuration. Based on the config a set of field(s) or values is filtered in order to apply override / transformation.
It comes with in id ( to resolve implementation from registry) and a configuration thats specific to a particular matcher type.
| Property | Type | Required | Default | Description |
|-----------|--------|----------|---------|--------------------------------------------------------------------------------|
| `id` | string | **Yes** | `` | The matcher id. This is used to find the matcher implementation from registry. |
| `options` | | No | | The matcher options. This is specific to the matcher implementation. |
### FieldConfigSource
The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results.
Each column within this structure is called a field. A field can represent a single time series or table column.
Field options allow you to change how the data is displayed in your visualizations.
| Property | Type | Required | Default | Description |
|-------------|-----------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `defaults` | [FieldConfig](#fieldconfig) | **Yes** | | The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results.<br/>Each column within this structure is called a field. A field can represent a single time series or table column.<br/>Field options allow you to change how the data is displayed in your visualizations. |
| `overrides` | [object](#overrides)[] | **Yes** | | Overrides are the options applied to specific fields overriding the defaults. |
### FieldConfig
The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results.
Each column within this structure is called a field. A field can represent a single time series or table column.
Field options allow you to change how the data is displayed in your visualizations.
| Property | Type | Required | Default | Description |
|---------------------|---------------------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `color` | [FieldColor](#fieldcolor) | No | | Map a field to a color. |
| `custom` | [object](#custom) | No | | custom is specified by the FieldConfig field<br/>in panel plugin schemas. |
| `decimals` | number | No | | Specify the number of decimals Grafana includes in the rendered value.<br/>If you leave this field blank, Grafana automatically truncates the number of decimals based on the value.<br/>For example 1.1234 will display as 1.12 and 100.456 will display as 100.<br/>To display all decimals, set the unit to `String`. |
| `description` | string | No | | Human readable field metadata |
| `displayNameFromDS` | string | No | | This can be used by data sources that return and explicit naming structure for values and labels<br/>When this property is configured, this value is used rather than the default naming strategy. |
| `displayName` | string | No | | The display value for this field. This supports template variables blank is auto |
| `filterable` | boolean | No | | True if data source field supports ad-hoc filters |
| `links` | | No | | The behavior when clicking on a result |
| `mappings` | [ValueMapping](#valuemapping)[] | No | | Convert input values into a display string |
| `max` | number | No | | The maximum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields. |
| `min` | number | No | | The minimum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields. |
| `noValue` | string | No | | Alternative to empty string |
| `path` | string | No | | An explicit path to the field in the datasource. When the frame meta includes a path,<br/>This will default to `${frame.meta.path}/${field.name}<br/><br/>When defined, this value can be used as an identifier within the datasource scope, and<br/>may be used to update the results |
| `thresholds` | [ThresholdsConfig](#thresholdsconfig) | No | | Thresholds configuration for the panel |
| `unit` | string | No | | Unit a field should use. The unit you select is applied to all fields except time.<br/>You can use the units ID availables in Grafana or a custom unit.<br/>Available units in Grafana: https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/valueFormats/categories.ts<br/>As custom unit, you can use the following formats:<br/>`suffix:<suffix>` for custom unit that should go after value.<br/>`prefix:<prefix>` for custom unit that should go before value.<br/>`time:<format>` For custom date time formats type for example `time:YYYY-MM-DD`.<br/>`si:<base scale><unit characters>` for custom SI units. For example: `si: mF`. This one is a bit more advanced as you can specify both a unit and the source data scale. So if your source data is represented as milli (thousands of) something prefix the unit with that SI scale character.<br/>`count:<unit>` for a custom count unit.<br/>`currency:<unit>` for custom a currency unit. |
| `writeable` | boolean | No | | True if data source can write a value to the path. Auth/authz are supported separately |
### FieldColor
Map a field to a color.
| Property | Type | Required | Default | Description |
|--------------|--------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `mode` | string | **Yes** | | Color mode for a field. You can specify a single color, or select a continuous (gradient) color schemes, based on a value.<br/>Continuous color interpolates a color using the percentage of a value relative to min and max.<br/>Accepted values are:<br/>`thresholds`: From thresholds. Informs Grafana to take the color from the matching threshold<br/>`palette-classic`: Classic palette. Grafana will assign color by looking up a color in a palette by series index. Useful for Graphs and pie charts and other categorical data visualizations<br/>`palette-classic-by-name`: Classic palette (by name). Grafana will assign color by looking up a color in a palette by series name. Useful for Graphs and pie charts and other categorical data visualizations<br/>`continuous-GrYlRd`: ontinuous Green-Yellow-Red palette mode<br/>`continuous-RdYlGr`: Continuous Red-Yellow-Green palette mode<br/>`continuous-BlYlRd`: Continuous Blue-Yellow-Red palette mode<br/>`continuous-YlRd`: Continuous Yellow-Red palette mode<br/>`continuous-BlPu`: Continuous Blue-Purple palette mode<br/>`continuous-YlBl`: Continuous Yellow-Blue palette mode<br/>`continuous-blues`: Continuous Blue palette mode<br/>`continuous-reds`: Continuous Red palette mode<br/>`continuous-greens`: Continuous Green palette mode<br/>`continuous-purples`: Continuous Purple palette mode<br/>`shades`: Shades of a single color. Specify a single color, useful in an override rule.<br/>`fixed`: Fixed color mode. Specify a single color, useful in an override rule.<br/>Possible values are: `thresholds`, `palette-classic`, `palette-classic-by-name`, `continuous-GrYlRd`, `continuous-RdYlGr`, `continuous-BlYlRd`, `continuous-YlRd`, `continuous-BlPu`, `continuous-YlBl`, `continuous-blues`, `continuous-reds`, `continuous-greens`, `continuous-purples`, `fixed`, `shades`. |
| `fixedColor` | string | No | | The fixed color value for fixed or shades color modes. |
| `seriesBy` | string | No | | Defines how to assign a series color from "by value" color schemes. For example for an aggregated data points like a timeseries, the color can be assigned by the min, max or last value.<br/>Possible values are: `min`, `max`, `last`. |
### ThresholdsConfig
Thresholds configuration for the panel
| Property | Type | Required | Default | Description |
|----------|---------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `mode` | string | **Yes** | | Thresholds can either be `absolute` (specific number) or `percentage` (relative to min or max, it will be values between 0 and 1).<br/>Possible values are: `absolute`, `percentage`. |
| `steps` | [Threshold](#threshold)[] | **Yes** | | Must be sorted by 'value', first value is always -Infinity |
### Threshold
User-defined value for a metric that triggers visual changes in a panel when this value is met or exceeded
They are used to conditionally style and color visualizations based on query results , and can be applied to most visualizations.
| Property | Type | Required | Default | Description |
|----------|----------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `color` | string | **Yes** | | Color represents the color of the visual change that will occur in the dashboard when the threshold value is met or exceeded. |
| `value` | number or null | **Yes** | | Value represents a specified metric for the threshold, which triggers a visual change in the dashboard when this value is met or exceeded.<br/>Nulls currently appear here when serializing -Infinity to JSON. |
### ValueMapping
Allow to transform the visual representation of specific data values in a visualization, irrespective of their original units
| Property | Type | Required | Default | Description |
|----------|-------------------------------------------------------------------------------------------------------------------------------|----------|---------|-------------|
| `object` | Possible types are: [ValueMap](#valuemap), [RangeMap](#rangemap), [RegexMap](#regexmap), [SpecialValueMap](#specialvaluemap). | | |
### RangeMap
Maps numerical ranges to a display text and color.
For example, if a value is within a certain range, you can configure a range value mapping to display Low or High rather than the number.
| Property | Type | Required | Default | Description |
|-----------|--------------------|----------|---------|-----------------------------------------------------------------------------------|
| `options` | [object](#options) | **Yes** | | Range to match against and the result to apply when the value is within the range |
| `type` | string | **Yes** | | |
### Options
Range to match against and the result to apply when the value is within the range
| Property | Type | Required | Default | Description |
|----------|-------------------------------------------|----------|---------|-----------------------------------------------------------------------|
| `from` | number or null | **Yes** | | Min value of the range. It can be null which means -Infinity |
| `result` | [ValueMappingResult](#valuemappingresult) | **Yes** | | Result used as replacement with text and color when the value matches |
| `to` | number or null | **Yes** | | Max value of the range. It can be null which means +Infinity |
### ValueMappingResult
Result used as replacement with text and color when the value matches
| Property | Type | Required | Default | Description |
|----------|---------|----------|---------|-----------------------------------------------------------------------|
| `color` | string | No | | Text to use when the value matches |
| `icon` | string | No | | Icon to display when the value matches. Only specific visualizations. |
| `index` | integer | No | | Position in the mapping array. Only used internally. |
| `text` | string | No | | Text to display when the value matches |
### RegexMap
Maps regular expressions to replacement text and a color.
For example, if a value is www.example.com, you can configure a regex value mapping so that Grafana displays www and truncates the domain.
| Property | Type | Required | Default | Description |
|-----------|--------------------|----------|---------|----------------------------------------------------------------------------------------------|
| `options` | [object](#options) | **Yes** | | Regular expression to match against and the result to apply when the value matches the regex |
| `type` | string | **Yes** | | |
### Options
Regular expression to match against and the result to apply when the value matches the regex
| Property | Type | Required | Default | Description |
|-----------|-------------------------------------------|----------|---------|-----------------------------------------------------------------------|
| `pattern` | string | **Yes** | | Regular expression to match against |
| `result` | [ValueMappingResult](#valuemappingresult) | **Yes** | | Result used as replacement with text and color when the value matches |
### SpecialValueMap
Maps special values like Null, NaN (not a number), and boolean values like true and false to a display text and color.
See SpecialValueMatch to see the list of special values.
For example, you can configure a special value mapping so that null values appear as N/A.
| Property | Type | Required | Default | Description |
|-----------|--------------------|----------|---------|-------------|
| `options` | [object](#options) | **Yes** | | |
| `type` | string | **Yes** | | |
### Options
| Property | Type | Required | Default | Description |
|----------|-------------------------------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------|
| `match` | string | **Yes** | | Special value types supported by the `SpecialValueMap`<br/>Possible values are: `true`, `false`, `null`, `nan`, `null+nan`, `empty`. |
| `result` | [ValueMappingResult](#valuemappingresult) | **Yes** | | Result used as replacement with text and color when the value matches |
### ValueMap
Maps text values to a color or different display text and color.
For example, you can configure a value mapping so that all instances of the value 10 appear as Perfection! rather than the number.
| Property | Type | Required | Default | Description |
|-----------|------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------|
| `options` | map[string][ValueMappingResult](#valuemappingresult) | **Yes** | | Map with <value_to_match>: ValueMappingResult. For example: { "10": { text: "Perfection!", color: "green" } } |
| `type` | string | **Yes** | | |
### Custom
custom is specified by the FieldConfig field
in panel plugin schemas.
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Overrides
| Property | Type | Required | Default | Description |
|--------------|---------------------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `matcher` | [MatcherConfig](#matcherconfig) | **Yes** | | Matcher is a predicate configuration. Based on the config a set of field(s) or values is filtered in order to apply override / transformation.<br/>It comes with in id ( to resolve implementation from registry) and a configuration thats specific to a particular matcher type. |
| `properties` | [DynamicConfigValue](#dynamicconfigvalue)[] | **Yes** | | |
### DynamicConfigValue
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|-------------|
| `id` | string | **Yes** | `` | |
| `value` | | No | | |
### GridPos
Position and dimensions of a panel in the grid
| Property | Type | Required | Default | Description |
|----------|---------|----------|---------|-------------------------------------------------------------------------------------------------------------------|
| `h` | uint32 | **Yes** | `9` | Panel height. The height is the number of rows from the top edge of the panel. |
| `w` | integer | **Yes** | `12` | Panel width. The width is the number of columns from the left edge of the panel.<br/>Constraint: `>0 & <=24`. |
| `x` | integer | **Yes** | `0` | Panel x. The x coordinate is the number of columns from the left edge of the grid<br/>Constraint: `>=0 & <24`. |
| `y` | uint32 | **Yes** | `0` | Panel y. The y coordinate is the number of rows from the top edge of the grid |
| `static` | boolean | No | | Whether the panel is fixed within the grid. If true, the panel will not be affected by other panels' interactions |
### LibraryPanelRef
A library panel is a reusable panel that you can use in any dashboard.
When you make a change to a library panel, that change propagates to all instances of where the panel is used.
Library panels streamline reuse of panels across multiple dashboards.
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|--------------------|
| `name` | string | **Yes** | | Library panel name |
| `uid` | string | **Yes** | | Library panel uid |
### Panel
Dashboard panels are the basic visualization building blocks.
| Property | Type | Required | Default | Description |
|--------------------|---------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | The panel plugin type id. This is used to find the plugin to display the panel.<br/>Constraint: `length >=1`. |
| `cacheTimeout` | string | No | | Sets panel queries cache timeout. |
| `datasource` | [DataSourceRef](#datasourceref) | No | | Ref to a DataSource instance |
| `description` | string | No | | Panel description. |
| `fieldConfig` | [FieldConfigSource](#fieldconfigsource) | No | | The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results.<br/>Each column within this structure is called a field. A field can represent a single time series or table column.<br/>Field options allow you to change how the data is displayed in your visualizations. |
| `gridPos` | [GridPos](#gridpos) | No | | Position and dimensions of a panel in the grid |
| `hideTimeOverride` | boolean | No | | Controls if the timeFrom or timeShift overrides are shown in the panel header |
| `id` | uint32 | No | | Unique identifier of the panel. Generated by Grafana when creating a new panel. It must be unique within a dashboard, but not globally. |
| `interval` | string | No | | The min time interval setting defines a lower limit for the $__interval and $__interval_ms variables.<br/>This value must be formatted as a number followed by a valid time<br/>identifier like: "40s", "3d", etc.<br/>See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options |
| `libraryPanel` | [LibraryPanelRef](#librarypanelref) | No | | A library panel is a reusable panel that you can use in any dashboard.<br/>When you make a change to a library panel, that change propagates to all instances of where the panel is used.<br/>Library panels streamline reuse of panels across multiple dashboards. |
| `links` | [DashboardLink](#dashboardlink)[] | No | | Panel links. |
| `maxDataPoints` | number | No | | The maximum number of data points that the panel queries are retrieving. |
| `maxPerRow` | number | No | | Option for repeated panels that controls max items per row<br/>Only relevant for horizontally repeated panels |
| `options` | [object](#options) | No | | It depends on the panel plugin. They are specified by the Options field in panel plugin schemas. |
| `pluginVersion` | string | No | | The version of the plugin that is used for this panel. This is used to find the plugin to display the panel and to migrate old panel configs. |
| `queryCachingTTL` | number | No | | Overrides the data source configured time-to-live for a query cache item in milliseconds |
| `repeatDirection` | string | No | `h` | Direction to repeat in if 'repeat' is set.<br/>`h` for horizontal, `v` for vertical.<br/>Possible values are: `h`, `v`. |
| `repeat` | string | No | | Name of template variable to repeat for. |
| `targets` | [Target](#target)[] | No | | Depends on the panel plugin. See the plugin documentation for details. |
| `timeFrom` | string | No | | Overrides the relative time range for individual panels,<br/>which causes them to be different than what is selected in<br/>the dashboard time picker in the top-right corner of the dashboard. You can use this to show metrics from different<br/>time periods or days on the same dashboard.<br/>The value is formatted as time operation like: `now-5m` (Last 5 minutes), `now/d` (the day so far),<br/>`now-5d/d`(Last 5 days), `now/w` (This week so far), `now-2y/y` (Last 2 years).<br/>Note: Panel time overrides have no effect when the dashboards time range is absolute.<br/>See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options |
| `timeShift` | string | No | | Overrides the time range for individual panels by shifting its start and end relative to the time picker.<br/>For example, you can shift the time range for the panel to be two hours earlier than the dashboard time picker setting `2h`.<br/>Note: Panel time overrides have no effect when the dashboards time range is absolute.<br/>See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options |
| `title` | string | No | | Panel title. |
| `transformations` | [DataTransformerConfig](#datatransformerconfig)[] | No | | List of transformations that are applied to the panel data before rendering.<br/>When there are multiple transformations, Grafana applies them in the order they are listed.<br/>Each transformation creates a result set that then passes on to the next transformation in the processing pipeline. |
| `transparent` | boolean | No | `false` | Whether to display the panel without a background. |
### Target
Schema for panel targets is specified by datasource
plugins. We use a placeholder definition, which the Go
schema loader either left open/as-is with the Base
variant of the Dashboard and Panel families, or filled
with types derived from plugins in the Instance variant.
When working directly from CUE, importers can extend this
type directly to achieve the same effect.
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Options
It depends on the panel plugin. They are specified by the Options field in panel plugin schemas.
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### RowPanel
Row panel
| Property | Type | Required | Default | Description |
|--------------|---------------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `collapsed` | boolean | **Yes** | `false` | Whether this row should be collapsed or not. |
| `id` | uint32 | **Yes** | | Unique identifier of the panel. Generated by Grafana when creating a new panel. It must be unique within a dashboard, but not globally. |
| `panels` | [Panel](#panel)[] | **Yes** | | List of panels in the row |
| `type` | string | **Yes** | | The panel type<br/>Possible values are: `row`. |
| `datasource` | [DataSourceRef](#datasourceref) | No | | Ref to a DataSource instance |
| `gridPos` | [GridPos](#gridpos) | No | | Position and dimensions of a panel in the grid |
| `repeat` | string | No | | Name of template variable to repeat for. |
| `title` | string | No | | Row title |
### Panel
Dashboard panels are the basic visualization building blocks.
| Property | Type | Required | Default | Description |
|--------------------|---------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `type` | string | **Yes** | | The panel plugin type id. This is used to find the plugin to display the panel.<br/>Constraint: `length >=1`. |
| `cacheTimeout` | string | No | | Sets panel queries cache timeout. |
| `datasource` | [DataSourceRef](#datasourceref) | No | | Ref to a DataSource instance |
| `description` | string | No | | Panel description. |
| `fieldConfig` | [FieldConfigSource](#fieldconfigsource) | No | | The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results.<br/>Each column within this structure is called a field. A field can represent a single time series or table column.<br/>Field options allow you to change how the data is displayed in your visualizations. |
| `gridPos` | [GridPos](#gridpos) | No | | Position and dimensions of a panel in the grid |
| `hideTimeOverride` | boolean | No | | Controls if the timeFrom or timeShift overrides are shown in the panel header |
| `id` | uint32 | No | | Unique identifier of the panel. Generated by Grafana when creating a new panel. It must be unique within a dashboard, but not globally. |
| `interval` | string | No | | The min time interval setting defines a lower limit for the $__interval and $__interval_ms variables.<br/>This value must be formatted as a number followed by a valid time<br/>identifier like: "40s", "3d", etc.<br/>See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options |
| `libraryPanel` | [LibraryPanelRef](#librarypanelref) | No | | A library panel is a reusable panel that you can use in any dashboard.<br/>When you make a change to a library panel, that change propagates to all instances of where the panel is used.<br/>Library panels streamline reuse of panels across multiple dashboards. |
| `links` | [DashboardLink](#dashboardlink)[] | No | | Panel links. |
| `maxDataPoints` | number | No | | The maximum number of data points that the panel queries are retrieving. |
| `maxPerRow` | number | No | | Option for repeated panels that controls max items per row<br/>Only relevant for horizontally repeated panels |
| `options` | [options](#options) | No | | It depends on the panel plugin. They are specified by the Options field in panel plugin schemas. |
| `pluginVersion` | string | No | | The version of the plugin that is used for this panel. This is used to find the plugin to display the panel and to migrate old panel configs. |
| `queryCachingTTL` | number | No | | Overrides the data source configured time-to-live for a query cache item in milliseconds |
| `repeatDirection` | string | No | `h` | Direction to repeat in if 'repeat' is set.<br/>`h` for horizontal, `v` for vertical.<br/>Possible values are: `h`, `v`. |
| `repeat` | string | No | | Name of template variable to repeat for. |
| `targets` | [Target](#target)[] | No | | Depends on the panel plugin. See the plugin documentation for details. |
| `timeFrom` | string | No | | Overrides the relative time range for individual panels,<br/>which causes them to be different than what is selected in<br/>the dashboard time picker in the top-right corner of the dashboard. You can use this to show metrics from different<br/>time periods or days on the same dashboard.<br/>The value is formatted as time operation like: `now-5m` (Last 5 minutes), `now/d` (the day so far),<br/>`now-5d/d`(Last 5 days), `now/w` (This week so far), `now-2y/y` (Last 2 years).<br/>Note: Panel time overrides have no effect when the dashboards time range is absolute.<br/>See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options |
| `timeShift` | string | No | | Overrides the time range for individual panels by shifting its start and end relative to the time picker.<br/>For example, you can shift the time range for the panel to be two hours earlier than the dashboard time picker setting `2h`.<br/>Note: Panel time overrides have no effect when the dashboards time range is absolute.<br/>See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options |
| `title` | string | No | | Panel title. |
| `transformations` | [DataTransformerConfig](#datatransformerconfig)[] | No | | List of transformations that are applied to the panel data before rendering.<br/>When there are multiple transformations, Grafana applies them in the order they are listed.<br/>Each transformation creates a result set that then passes on to the next transformation in the processing pipeline. |
| `transparent` | boolean | No | `false` | Whether to display the panel without a background. |
### FieldConfigSource
The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results.
Each column within this structure is called a field. A field can represent a single time series or table column.
Field options allow you to change how the data is displayed in your visualizations.
| Property | Type | Required | Default | Description |
|-------------|-----------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `defaults` | [FieldConfig](#fieldconfig) | **Yes** | | The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results.<br/>Each column within this structure is called a field. A field can represent a single time series or table column.<br/>Field options allow you to change how the data is displayed in your visualizations. |
| `overrides` | [overrides](#overrides)[] | **Yes** | | Overrides are the options applied to specific fields overriding the defaults. |
### FieldConfig
The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results.
Each column within this structure is called a field. A field can represent a single time series or table column.
Field options allow you to change how the data is displayed in your visualizations.
| Property | Type | Required | Default | Description |
|---------------------|---------------------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `color` | [FieldColor](#fieldcolor) | No | | Map a field to a color. |
| `custom` | [custom](#custom) | No | | custom is specified by the FieldConfig field<br/>in panel plugin schemas. |
| `decimals` | number | No | | Specify the number of decimals Grafana includes in the rendered value.<br/>If you leave this field blank, Grafana automatically truncates the number of decimals based on the value.<br/>For example 1.1234 will display as 1.12 and 100.456 will display as 100.<br/>To display all decimals, set the unit to `String`. |
| `description` | string | No | | Human readable field metadata |
| `displayNameFromDS` | string | No | | This can be used by data sources that return and explicit naming structure for values and labels<br/>When this property is configured, this value is used rather than the default naming strategy. |
| `displayName` | string | No | | The display value for this field. This supports template variables blank is auto |
| `filterable` | boolean | No | | True if data source field supports ad-hoc filters |
| `links` | | No | | The behavior when clicking on a result |
| `mappings` | [ValueMapping](#valuemapping)[] | No | | Convert input values into a display string |
| `max` | number | No | | The maximum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields. |
| `min` | number | No | | The minimum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields. |
| `noValue` | string | No | | Alternative to empty string |
| `path` | string | No | | An explicit path to the field in the datasource. When the frame meta includes a path,<br/>This will default to `${frame.meta.path}/${field.name}<br/><br/>When defined, this value can be used as an identifier within the datasource scope, and<br/>may be used to update the results |
| `thresholds` | [ThresholdsConfig](#thresholdsconfig) | No | | Thresholds configuration for the panel |
| `unit` | string | No | | Unit a field should use. The unit you select is applied to all fields except time.<br/>You can use the units ID availables in Grafana or a custom unit.<br/>Available units in Grafana: https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/valueFormats/categories.ts<br/>As custom unit, you can use the following formats:<br/>`suffix:<suffix>` for custom unit that should go after value.<br/>`prefix:<prefix>` for custom unit that should go before value.<br/>`time:<format>` For custom date time formats type for example `time:YYYY-MM-DD`.<br/>`si:<base scale><unit characters>` for custom SI units. For example: `si: mF`. This one is a bit more advanced as you can specify both a unit and the source data scale. So if your source data is represented as milli (thousands of) something prefix the unit with that SI scale character.<br/>`count:<unit>` for a custom count unit.<br/>`currency:<unit>` for custom a currency unit. |
| `writeable` | boolean | No | | True if data source can write a value to the path. Auth/authz are supported separately |
### RangeMap
Maps numerical ranges to a display text and color.
For example, if a value is within a certain range, you can configure a range value mapping to display Low or High rather than the number.
| Property | Type | Required | Default | Description |
|-----------|---------------------|----------|---------|-----------------------------------------------------------------------------------|
| `options` | [options](#options) | **Yes** | | Range to match against and the result to apply when the value is within the range |
| `type` | string | **Yes** | | |
### RegexMap
Maps regular expressions to replacement text and a color.
For example, if a value is www.example.com, you can configure a regex value mapping so that Grafana displays www and truncates the domain.
| Property | Type | Required | Default | Description |
|-----------|---------------------|----------|---------|----------------------------------------------------------------------------------------------|
| `options` | [options](#options) | **Yes** | | Regular expression to match against and the result to apply when the value matches the regex |
| `type` | string | **Yes** | | |
### SpecialValueMap
Maps special values like Null, NaN (not a number), and boolean values like true and false to a display text and color.
See SpecialValueMatch to see the list of special values.
For example, you can configure a special value mapping so that null values appear as N/A.
| Property | Type | Required | Default | Description |
|-----------|---------------------|----------|---------|-------------|
| `options` | [options](#options) | **Yes** | | |
| `type` | string | **Yes** | | |
### Templating
Configured template variables
| Property | Type | Required | Default | Description |
|----------|-----------------------------------|----------|---------|----------------------------------------------------------------------------------------------|
| `list` | [VariableModel](#variablemodel)[] | No | | List of configured template variables with their saved values along with some other metadata |
### VariableModel
A variable is a placeholder for a value. You can use variables in metric queries and in panel titles.
| Property | Type | Required | Default | Description |
|---------------|-------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | string | **Yes** | | Name of variable |
| `type` | string | **Yes** | | Dashboard variable type<br/>`query`: Query-generated list of values such as metric names, server names, sensor IDs, data centers, and so on.<br/>`adhoc`: Key/value filters that are automatically added to all metric queries for a data source (Prometheus, Loki, InfluxDB, and Elasticsearch only).<br/>`constant`: Define a hidden constant.<br/>`datasource`: Quickly change the data source for an entire dashboard.<br/>`interval`: Interval variables represent time spans.<br/>`textbox`: Display a free text input field with an optional default value.<br/>`custom`: Define the variable options manually using a comma-separated list.<br/>`system`: Variables defined by Grafana. See: https://grafana.com/docs/grafana/latest/dashboards/variables/add-template-variables/#global-variables<br/>Possible values are: `query`, `adhoc`, `groupby`, `constant`, `datasource`, `interval`, `textbox`, `custom`, `system`. |
| `allValue` | string | No | | Custom all value |
| `current` | [VariableOption](#variableoption) | No | | Option to be selected in a variable. |
| `datasource` | [DataSourceRef](#datasourceref) | No | | Ref to a DataSource instance |
| `description` | string | No | | Description of variable. It can be defined but `null`. |
| `hide` | integer | No | | Determine if the variable shows on dashboard<br/>Accepted values are 0 (show label and value), 1 (show value only), 2 (show nothing).<br/>Possible values are: `0`, `1`, `2`. |
| `includeAll` | boolean | No | `false` | Whether all value option is available or not |
| `label` | string | No | | Optional display name |
| `multi` | boolean | No | `false` | Whether multiple values can be selected or not from variable value list |
| `options` | [VariableOption](#variableoption)[] | No | | Options that can be selected for a variable. |
| `query` | | No | | Query used to fetch values for a variable |
| `refresh` | integer | No | | Options to config when to refresh a variable<br/>`0`: Never refresh the variable<br/>`1`: Queries the data source every time the dashboard loads.<br/>`2`: Queries the data source when the dashboard time range changes.<br/>Possible values are: `0`, `1`, `2`. |
| `regex` | string | No | | Optional field, if you want to extract part of a series name or metric node segment.<br/>Named capture groups can be used to separate the display text and value. |
| `skipUrlSync` | boolean | No | `false` | Whether the variable value should be managed by URL query params or not |
| `sort` | integer | No | | Sort variable options<br/>Accepted values are:<br/>`0`: No sorting<br/>`1`: Alphabetical ASC<br/>`2`: Alphabetical DESC<br/>`3`: Numerical ASC<br/>`4`: Numerical DESC<br/>`5`: Alphabetical Case Insensitive ASC<br/>`6`: Alphabetical Case Insensitive DESC<br/>`7`: Natural ASC<br/>`8`: Natural DESC<br/>Possible values are: `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`. |
### VariableOption
Option to be selected in a variable.
| Property | Type | Required | Default | Description |
|------------|---------|----------|---------|---------------------------------------|
| `text` | | **Yes** | | Text to be displayed for the option |
| `value` | | **Yes** | | Value of the option |
| `selected` | boolean | No | | Whether the option is selected or not |
### Time
Time range for dashboard.
Accepted values are relative time strings like {from: 'now-6h', to: 'now'} or absolute time strings like {from: '2020-07-10T08:00:00.000Z', to: '2020-07-10T14:00:00.000Z'}.
| Property | Type | Required | Default | Description |
|----------|--------|----------|----------|-------------|
| `from` | string | **Yes** | `now-6h` | |
| `to` | string | **Yes** | `now` | |
### Status
| Property | Type | Required | Default | Description |
|--------------------|------------------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `additionalFields` | [object](#additionalfields) | No | | additionalFields is reserved for future use |
| `operatorStates` | map[string][status.#OperatorState](#status.#operatorstate) | No | | operatorStates is a map of operator ID to operator state evaluations.<br/>Any operator which consumes this kind SHOULD add its state evaluation information to this field. |
### AdditionalFields
additionalFields is reserved for future use
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Status.#OperatorState
| Property | Type | Required | Default | Description |
|--------------------|--------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `lastEvaluation` | string | **Yes** | | lastEvaluation is the ResourceVersion last evaluated |
| `state` | string | **Yes** | | state describes the state of the lastEvaluation.<br/>It is limited to three possible states for machine evaluation.<br/>Possible values are: `success`, `in_progress`, `failed`. |
| `descriptiveState` | string | No | | descriptiveState is an optional more descriptive state field which has no requirements on format |
| `details` | [object](#details) | No | | details contains any extra information that is operator-specific |
### Details
details contains any extra information that is operator-specific
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|

View File

@ -1,111 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: Folder kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## Folder
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
A folder is a collection of resources that are grouped together and can share permissions.
| Property | Type | Required | Default | Description |
|------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `metadata` | [object](#metadata) | **Yes** | | metadata contains embedded CommonMetadata and can be extended with custom string fields<br/>TODO: use CommonMetadata instead of redefining here; currently needs to be defined here<br/>without external reference as using the CommonMetadata reference breaks thema codegen. |
| `spec` | [object](#spec) | **Yes** | | TODO:<br/>common metadata will soon support setting the parent folder in the metadata |
| `status` | [object](#status) | **Yes** | | |
### Metadata
metadata contains embedded CommonMetadata and can be extended with custom string fields
TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
without external reference as using the CommonMetadata reference breaks thema codegen.
It extends [_kubeObjectMetadata](#_kubeobjectmetadata).
| Property | Type | Required | Default | Description |
|---------------------|------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `createdBy` | string | **Yes** | | |
| `creationTimestamp` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `extraFields` | [object](#extrafields) | **Yes** | | extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata |
| `finalizers` | string[] | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `labels` | map[string]string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `resourceVersion` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `uid` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `updateTimestamp` | string | **Yes** | | |
| `updatedBy` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
### _kubeObjectMetadata
_kubeObjectMetadata is metadata found in a kubernetes object's metadata field.
It is not exhaustive and only includes fields which may be relevant to a kind's implementation,
As it is also intended to be generic enough to function with any API Server.
| Property | Type | Required | Default | Description |
|---------------------|-------------------|----------|---------|-------------|
| `creationTimestamp` | string | **Yes** | | |
| `finalizers` | string[] | **Yes** | | |
| `labels` | map[string]string | **Yes** | | |
| `resourceVersion` | string | **Yes** | | |
| `uid` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | |
### ExtraFields
extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Spec
TODO:
common metadata will soon support setting the parent folder in the metadata
| Property | Type | Required | Default | Description |
|---------------|--------|----------|---------|--------------------------------------|
| `title` | string | **Yes** | | Folder title |
| `uid` | string | **Yes** | | Unique folder id. (will be k8s name) |
| `description` | string | No | | Description of the folder. |
### Status
| Property | Type | Required | Default | Description |
|--------------------|------------------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `additionalFields` | [object](#additionalfields) | No | | additionalFields is reserved for future use |
| `operatorStates` | map[string][status.#OperatorState](#status.#operatorstate) | No | | operatorStates is a map of operator ID to operator state evaluations.<br/>Any operator which consumes this kind SHOULD add its state evaluation information to this field. |
### AdditionalFields
additionalFields is reserved for future use
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Status.#OperatorState
| Property | Type | Required | Default | Description |
|--------------------|--------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `lastEvaluation` | string | **Yes** | | lastEvaluation is the ResourceVersion last evaluated |
| `state` | string | **Yes** | | state describes the state of the lastEvaluation.<br/>It is limited to three possible states for machine evaluation.<br/>Possible values are: `success`, `in_progress`, `failed`. |
| `descriptiveState` | string | No | | descriptiveState is an optional more descriptive state field which has no requirements on format |
| `details` | [object](#details) | No | | details contains any extra information that is operator-specific |
### Details
details contains any extra information that is operator-specific
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|

View File

@ -1,142 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: LibraryPanel kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## LibraryPanel
#### Maturity: [experimental](../../../maturity/#experimental)
#### Version: 0.0
A standalone panel
| Property | Type | Required | Default | Description |
|------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `metadata` | [object](#metadata) | **Yes** | | metadata contains embedded CommonMetadata and can be extended with custom string fields<br/>TODO: use CommonMetadata instead of redefining here; currently needs to be defined here<br/>without external reference as using the CommonMetadata reference breaks thema codegen. |
| `spec` | [object](#spec) | **Yes** | | |
| `status` | [object](#status) | **Yes** | | |
### Metadata
metadata contains embedded CommonMetadata and can be extended with custom string fields
TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
without external reference as using the CommonMetadata reference breaks thema codegen.
It extends [_kubeObjectMetadata](#_kubeobjectmetadata).
| Property | Type | Required | Default | Description |
|---------------------|------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `createdBy` | string | **Yes** | | |
| `creationTimestamp` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `extraFields` | [object](#extrafields) | **Yes** | | extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata |
| `finalizers` | string[] | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `labels` | map[string]string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `resourceVersion` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `uid` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `updateTimestamp` | string | **Yes** | | |
| `updatedBy` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
### _kubeObjectMetadata
_kubeObjectMetadata is metadata found in a kubernetes object's metadata field.
It is not exhaustive and only includes fields which may be relevant to a kind's implementation,
As it is also intended to be generic enough to function with any API Server.
| Property | Type | Required | Default | Description |
|---------------------|-------------------|----------|---------|-------------|
| `creationTimestamp` | string | **Yes** | | |
| `finalizers` | string[] | **Yes** | | |
| `labels` | map[string]string | **Yes** | | |
| `resourceVersion` | string | **Yes** | | |
| `uid` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | |
### ExtraFields
extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Spec
| Property | Type | Required | Default | Description |
|-----------------|-------------------------------------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------|
| `model` | [object](#model) | **Yes** | | TODO: should be the same panel schema defined in dashboard<br/>Typescript: Omit<Panel, 'gridPos' &#124; 'id' &#124; 'libraryPanel'>; |
| `name` | string | **Yes** | | Panel name (also saved in the model)<br/>Constraint: `length >=1`. |
| `type` | string | **Yes** | | The panel type (from inside the model)<br/>Constraint: `length >=1`. |
| `uid` | string | **Yes** | | Library element UID |
| `version` | integer | **Yes** | | panel version, incremented each time the dashboard is updated. |
| `description` | string | No | | Panel description |
| `folderUid` | string | No | | Folder UID |
| `meta` | [LibraryElementDTOMeta](#libraryelementdtometa) | No | | |
| `schemaVersion` | uint16 | No | | Dashboard version when this was saved (zero if unknown) |
### LibraryElementDTOMeta
| Property | Type | Required | Default | Description |
|-----------------------|---------------------------------------------------------|----------|---------|-------------|
| `connectedDashboards` | integer | **Yes** | | |
| `createdBy` | [LibraryElementDTOMetaUser](#libraryelementdtometauser) | **Yes** | | |
| `created` | string | **Yes** | | |
| `folderName` | string | **Yes** | | |
| `folderUid` | string | **Yes** | | |
| `updatedBy` | [LibraryElementDTOMetaUser](#libraryelementdtometauser) | **Yes** | | |
| `updated` | string | **Yes** | | |
### LibraryElementDTOMetaUser
| Property | Type | Required | Default | Description |
|-------------|---------|----------|---------|-------------|
| `avatarUrl` | string | **Yes** | | |
| `id` | integer | **Yes** | | |
| `name` | string | **Yes** | | |
### Model
TODO: should be the same panel schema defined in dashboard
Typescript: Omit<Panel, 'gridPos' | 'id' | 'libraryPanel'>;
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Status
| Property | Type | Required | Default | Description |
|--------------------|------------------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `additionalFields` | [object](#additionalfields) | No | | additionalFields is reserved for future use |
| `operatorStates` | map[string][status.#OperatorState](#status.#operatorstate) | No | | operatorStates is a map of operator ID to operator state evaluations.<br/>Any operator which consumes this kind SHOULD add its state evaluation information to this field. |
### AdditionalFields
additionalFields is reserved for future use
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Status.#OperatorState
| Property | Type | Required | Default | Description |
|--------------------|--------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `lastEvaluation` | string | **Yes** | | lastEvaluation is the ResourceVersion last evaluated |
| `state` | string | **Yes** | | state describes the state of the lastEvaluation.<br/>It is limited to three possible states for machine evaluation.<br/>Possible values are: `success`, `in_progress`, `failed`. |
| `descriptiveState` | string | No | | descriptiveState is an optional more descriptive state field which has no requirements on format |
| `details` | [object](#details) | No | | details contains any extra information that is operator-specific |
### Details
details contains any extra information that is operator-specific
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|

View File

@ -1,144 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: Preferences kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## Preferences
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
The user or team frontend preferences
| Property | Type | Required | Default | Description |
|------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `metadata` | [object](#metadata) | **Yes** | | metadata contains embedded CommonMetadata and can be extended with custom string fields<br/>TODO: use CommonMetadata instead of redefining here; currently needs to be defined here<br/>without external reference as using the CommonMetadata reference breaks thema codegen. |
| `spec` | [object](#spec) | **Yes** | | Spec defines user, team or org Grafana preferences<br/>swagger:model Preferences |
| `status` | [object](#status) | **Yes** | | |
### Metadata
metadata contains embedded CommonMetadata and can be extended with custom string fields
TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
without external reference as using the CommonMetadata reference breaks thema codegen.
It extends [_kubeObjectMetadata](#_kubeobjectmetadata).
| Property | Type | Required | Default | Description |
|---------------------|------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `createdBy` | string | **Yes** | | |
| `creationTimestamp` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `extraFields` | [object](#extrafields) | **Yes** | | extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata |
| `finalizers` | string[] | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `labels` | map[string]string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `resourceVersion` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `uid` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `updateTimestamp` | string | **Yes** | | |
| `updatedBy` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
### _kubeObjectMetadata
_kubeObjectMetadata is metadata found in a kubernetes object's metadata field.
It is not exhaustive and only includes fields which may be relevant to a kind's implementation,
As it is also intended to be generic enough to function with any API Server.
| Property | Type | Required | Default | Description |
|---------------------|-------------------|----------|---------|-------------|
| `creationTimestamp` | string | **Yes** | | |
| `finalizers` | string[] | **Yes** | | |
| `labels` | map[string]string | **Yes** | | |
| `resourceVersion` | string | **Yes** | | |
| `uid` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | |
### ExtraFields
extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Spec
Spec defines user, team or org Grafana preferences
swagger:model Preferences
| Property | Type | Required | Default | Description |
|---------------------|---------------------------------------------------|----------|---------|---------------------------------------------------------------------------------|
| `cookiePreferences` | [CookiePreferences](#cookiepreferences) | No | | |
| `homeDashboardUID` | string | No | | UID for the home dashboard |
| `language` | string | No | | Selected language (beta) |
| `queryHistory` | [QueryHistoryPreference](#queryhistorypreference) | No | | |
| `theme` | string | No | | light, dark, empty is default |
| `timezone` | string | No | | The timezone selection<br/>TODO: this should use the timezone defined in common |
| `weekStart` | string | No | | day of the week (sunday, monday, etc) |
### CookiePreferences
| Property | Type | Required | Default | Description |
|---------------|------------------------|----------|---------|-------------|
| `analytics` | [object](#analytics) | No | | |
| `functional` | [object](#functional) | No | | |
| `performance` | [object](#performance) | No | | |
### Analytics
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Functional
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Performance
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### QueryHistoryPreference
| Property | Type | Required | Default | Description |
|-----------|--------|----------|---------|---------------------------------------------|
| `homeTab` | string | No | | one of: '' &#124; 'query' &#124; 'starred'; |
### Status
| Property | Type | Required | Default | Description |
|--------------------|------------------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `additionalFields` | [object](#additionalfields) | No | | additionalFields is reserved for future use |
| `operatorStates` | map[string][status.#OperatorState](#status.#operatorstate) | No | | operatorStates is a map of operator ID to operator state evaluations.<br/>Any operator which consumes this kind SHOULD add its state evaluation information to this field. |
### AdditionalFields
additionalFields is reserved for future use
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Status.#OperatorState
| Property | Type | Required | Default | Description |
|--------------------|--------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `lastEvaluation` | string | **Yes** | | lastEvaluation is the ResourceVersion last evaluated |
| `state` | string | **Yes** | | state describes the state of the lastEvaluation.<br/>It is limited to three possible states for machine evaluation.<br/>Possible values are: `success`, `in_progress`, `failed`. |
| `descriptiveState` | string | No | | descriptiveState is an optional more descriptive state field which has no requirements on format |
| `details` | [object](#details) | No | | details contains any extra information that is operator-specific |
### Details
details contains any extra information that is operator-specific
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|

View File

@ -1,111 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: PublicDashboard kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## PublicDashboard
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
Public dashboard configuration
| Property | Type | Required | Default | Description |
|------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `metadata` | [object](#metadata) | **Yes** | | metadata contains embedded CommonMetadata and can be extended with custom string fields<br/>TODO: use CommonMetadata instead of redefining here; currently needs to be defined here<br/>without external reference as using the CommonMetadata reference breaks thema codegen. |
| `spec` | [object](#spec) | **Yes** | | |
| `status` | [object](#status) | **Yes** | | |
### Metadata
metadata contains embedded CommonMetadata and can be extended with custom string fields
TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
without external reference as using the CommonMetadata reference breaks thema codegen.
It extends [_kubeObjectMetadata](#_kubeobjectmetadata).
| Property | Type | Required | Default | Description |
|---------------------|------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `createdBy` | string | **Yes** | | |
| `creationTimestamp` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `extraFields` | [object](#extrafields) | **Yes** | | extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata |
| `finalizers` | string[] | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `labels` | map[string]string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `resourceVersion` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `uid` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `updateTimestamp` | string | **Yes** | | |
| `updatedBy` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
### _kubeObjectMetadata
_kubeObjectMetadata is metadata found in a kubernetes object's metadata field.
It is not exhaustive and only includes fields which may be relevant to a kind's implementation,
As it is also intended to be generic enough to function with any API Server.
| Property | Type | Required | Default | Description |
|---------------------|-------------------|----------|---------|-------------|
| `creationTimestamp` | string | **Yes** | | |
| `finalizers` | string[] | **Yes** | | |
| `labels` | map[string]string | **Yes** | | |
| `resourceVersion` | string | **Yes** | | |
| `uid` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | |
### ExtraFields
extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Spec
| Property | Type | Required | Default | Description |
|------------------------|---------|----------|---------|-----------------------------------------------------------------|
| `annotationsEnabled` | boolean | **Yes** | | Flag that indicates if annotations are enabled |
| `dashboardUid` | string | **Yes** | | Dashboard unique identifier referenced by this public dashboard |
| `isEnabled` | boolean | **Yes** | | Flag that indicates if the public dashboard is enabled |
| `timeSelectionEnabled` | boolean | **Yes** | | Flag that indicates if the time range picker is enabled |
| `uid` | string | **Yes** | | Unique public dashboard identifier |
| `accessToken` | string | No | | Unique public access token |
### Status
| Property | Type | Required | Default | Description |
|--------------------|------------------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `additionalFields` | [object](#additionalfields) | No | | additionalFields is reserved for future use |
| `operatorStates` | map[string][status.#OperatorState](#status.#operatorstate) | No | | operatorStates is a map of operator ID to operator state evaluations.<br/>Any operator which consumes this kind SHOULD add its state evaluation information to this field. |
### AdditionalFields
additionalFields is reserved for future use
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Status.#OperatorState
| Property | Type | Required | Default | Description |
|--------------------|--------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `lastEvaluation` | string | **Yes** | | lastEvaluation is the ResourceVersion last evaluated |
| `state` | string | **Yes** | | state describes the state of the lastEvaluation.<br/>It is limited to three possible states for machine evaluation.<br/>Possible values are: `success`, `in_progress`, `failed`. |
| `descriptiveState` | string | No | | descriptiveState is an optional more descriptive state field which has no requirements on format |
| `details` | [object](#details) | No | | details contains any extra information that is operator-specific |
### Details
details contains any extra information that is operator-specific
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|

View File

@ -1,110 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: Role kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## Role
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
Roles represent a set of users+teams that should share similar access
| Property | Type | Required | Default | Description |
|------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `metadata` | [object](#metadata) | **Yes** | | metadata contains embedded CommonMetadata and can be extended with custom string fields<br/>TODO: use CommonMetadata instead of redefining here; currently needs to be defined here<br/>without external reference as using the CommonMetadata reference breaks thema codegen. |
| `spec` | [object](#spec) | **Yes** | | |
| `status` | [object](#status) | **Yes** | | |
### Metadata
metadata contains embedded CommonMetadata and can be extended with custom string fields
TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
without external reference as using the CommonMetadata reference breaks thema codegen.
It extends [_kubeObjectMetadata](#_kubeobjectmetadata).
| Property | Type | Required | Default | Description |
|---------------------|------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `createdBy` | string | **Yes** | | |
| `creationTimestamp` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `extraFields` | [object](#extrafields) | **Yes** | | extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata |
| `finalizers` | string[] | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `labels` | map[string]string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `resourceVersion` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `uid` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `updateTimestamp` | string | **Yes** | | |
| `updatedBy` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
### _kubeObjectMetadata
_kubeObjectMetadata is metadata found in a kubernetes object's metadata field.
It is not exhaustive and only includes fields which may be relevant to a kind's implementation,
As it is also intended to be generic enough to function with any API Server.
| Property | Type | Required | Default | Description |
|---------------------|-------------------|----------|---------|-------------|
| `creationTimestamp` | string | **Yes** | | |
| `finalizers` | string[] | **Yes** | | |
| `labels` | map[string]string | **Yes** | | |
| `resourceVersion` | string | **Yes** | | |
| `uid` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | |
### ExtraFields
extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Spec
| Property | Type | Required | Default | Description |
|---------------|---------|----------|---------|-----------------------------------------------------------|
| `hidden` | boolean | **Yes** | | Do not show this role |
| `name` | string | **Yes** | | The role identifier `managed:builtins:editor:permissions` |
| `description` | string | No | | Role description |
| `displayName` | string | No | | Optional display |
| `groupName` | string | No | | Name of the team. |
### Status
| Property | Type | Required | Default | Description |
|--------------------|------------------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `additionalFields` | [object](#additionalfields) | No | | additionalFields is reserved for future use |
| `operatorStates` | map[string][status.#OperatorState](#status.#operatorstate) | No | | operatorStates is a map of operator ID to operator state evaluations.<br/>Any operator which consumes this kind SHOULD add its state evaluation information to this field. |
### AdditionalFields
additionalFields is reserved for future use
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Status.#OperatorState
| Property | Type | Required | Default | Description |
|--------------------|--------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `lastEvaluation` | string | **Yes** | | lastEvaluation is the ResourceVersion last evaluated |
| `state` | string | **Yes** | | state describes the state of the lastEvaluation.<br/>It is limited to three possible states for machine evaluation.<br/>Possible values are: `success`, `in_progress`, `failed`. |
| `descriptiveState` | string | No | | descriptiveState is an optional more descriptive state field which has no requirements on format |
| `details` | [object](#details) | No | | details contains any extra information that is operator-specific |
### Details
details contains any extra information that is operator-specific
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|

View File

@ -1,136 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: RoleBinding kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## RoleBinding
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
Role bindings links a user|team to a configured role
| Property | Type | Required | Default | Description |
|------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `metadata` | [object](#metadata) | **Yes** | | metadata contains embedded CommonMetadata and can be extended with custom string fields<br/>TODO: use CommonMetadata instead of redefining here; currently needs to be defined here<br/>without external reference as using the CommonMetadata reference breaks thema codegen. |
| `spec` | [object](#spec) | **Yes** | | |
| `status` | [object](#status) | **Yes** | | |
### Metadata
metadata contains embedded CommonMetadata and can be extended with custom string fields
TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
without external reference as using the CommonMetadata reference breaks thema codegen.
It extends [_kubeObjectMetadata](#_kubeobjectmetadata).
| Property | Type | Required | Default | Description |
|---------------------|------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `createdBy` | string | **Yes** | | |
| `creationTimestamp` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `extraFields` | [object](#extrafields) | **Yes** | | extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata |
| `finalizers` | string[] | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `labels` | map[string]string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `resourceVersion` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `uid` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `updateTimestamp` | string | **Yes** | | |
| `updatedBy` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
### _kubeObjectMetadata
_kubeObjectMetadata is metadata found in a kubernetes object's metadata field.
It is not exhaustive and only includes fields which may be relevant to a kind's implementation,
As it is also intended to be generic enough to function with any API Server.
| Property | Type | Required | Default | Description |
|---------------------|-------------------|----------|---------|-------------|
| `creationTimestamp` | string | **Yes** | | |
| `finalizers` | string[] | **Yes** | | |
| `labels` | map[string]string | **Yes** | | |
| `resourceVersion` | string | **Yes** | | |
| `uid` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | |
### ExtraFields
extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Spec
| Property | Type | Required | Default | Description |
|-----------|-------------------------------------------|----------|---------|----------------------------|
| `role` | [object](#role) | **Yes** | | The role we are discussing |
| `subject` | [RoleBindingSubject](#rolebindingsubject) | **Yes** | | |
### RoleBindingSubject
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|--------------------------------------|
| `kind` | string | **Yes** | | Possible values are: `Team`, `User`. |
| `name` | string | **Yes** | | The team/user identifier name |
### Role
The role we are discussing
| Property | Type | Required | Default | Description |
|----------|-----------------------------------------------------------------------------------------|----------|---------|-------------|
| `object` | Possible types are: [BuiltinRoleRef](#builtinroleref), [CustomRoleRef](#customroleref). | | |
### BuiltinRoleRef
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|---------------------------------------------------|
| `kind` | string | **Yes** | | Possible values are: `BuiltinRole`. |
| `name` | string | **Yes** | | Possible values are: `viewer`, `editor`, `admin`. |
### CustomRoleRef
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|------------------------------|
| `kind` | string | **Yes** | | Possible values are: `Role`. |
| `name` | string | **Yes** | | |
### Status
| Property | Type | Required | Default | Description |
|--------------------|------------------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `additionalFields` | [object](#additionalfields) | No | | additionalFields is reserved for future use |
| `operatorStates` | map[string][status.#OperatorState](#status.#operatorstate) | No | | operatorStates is a map of operator ID to operator state evaluations.<br/>Any operator which consumes this kind SHOULD add its state evaluation information to this field. |
### AdditionalFields
additionalFields is reserved for future use
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Status.#OperatorState
| Property | Type | Required | Default | Description |
|--------------------|--------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `lastEvaluation` | string | **Yes** | | lastEvaluation is the ResourceVersion last evaluated |
| `state` | string | **Yes** | | state describes the state of the lastEvaluation.<br/>It is limited to three possible states for machine evaluation.<br/>Possible values are: `success`, `in_progress`, `failed`. |
| `descriptiveState` | string | No | | descriptiveState is an optional more descriptive state field which has no requirements on format |
| `details` | [object](#details) | No | | details contains any extra information that is operator-specific |
### Details
details contains any extra information that is operator-specific
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|

View File

@ -1,114 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- enterprise
- oss
title: ServiceAccount kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## ServiceAccount
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
system account
| Property | Type | Required | Default | Description |
| ---------- | ------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `metadata` | [object](#metadata) | **Yes** | | metadata contains embedded CommonMetadata and can be extended with custom string fields<br/>TODO: use CommonMetadata instead of redefining here; currently needs to be defined here<br/>without external reference as using the CommonMetadata reference breaks thema codegen. |
| `spec` | [object](#spec) | **Yes** | | |
| `status` | [object](#status) | **Yes** | | |
### Metadata
metadata contains embedded CommonMetadata and can be extended with custom string fields
TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
without external reference as using the CommonMetadata reference breaks thema codegen.
It extends [\_kubeObjectMetadata](#_kubeobjectmetadata).
| Property | Type | Required | Default | Description |
| ------------------- | ---------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `createdBy` | string | **Yes** | | |
| `creationTimestamp` | string | **Yes** | | _(Inherited from [\_kubeObjectMetadata](#_kubeobjectmetadata))_ |
| `extraFields` | [object](#extrafields) | **Yes** | | extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata |
| `finalizers` | string[] | **Yes** | | _(Inherited from [\_kubeObjectMetadata](#_kubeobjectmetadata))_ |
| `labels` | map[string]string | **Yes** | | _(Inherited from [\_kubeObjectMetadata](#_kubeobjectmetadata))_ |
| `resourceVersion` | string | **Yes** | | _(Inherited from [\_kubeObjectMetadata](#_kubeobjectmetadata))_ |
| `uid` | string | **Yes** | | _(Inherited from [\_kubeObjectMetadata](#_kubeobjectmetadata))_ |
| `updateTimestamp` | string | **Yes** | | |
| `updatedBy` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | _(Inherited from [\_kubeObjectMetadata](#_kubeobjectmetadata))_ |
### \_kubeObjectMetadata
\_kubeObjectMetadata is metadata found in a kubernetes object's metadata field.
It is not exhaustive and only includes fields which may be relevant to a kind's implementation,
As it is also intended to be generic enough to function with any API Server.
| Property | Type | Required | Default | Description |
| ------------------- | ----------------- | -------- | ------- | ----------- |
| `creationTimestamp` | string | **Yes** | | |
| `finalizers` | string[] | **Yes** | | |
| `labels` | map[string]string | **Yes** | | |
| `resourceVersion` | string | **Yes** | | |
| `uid` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | |
### ExtraFields
extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata
| Property | Type | Required | Default | Description |
| -------- | ---- | -------- | ------- | ----------- |
### Spec
| Property | Type | Required | Default | Description |
| --------------- | ------------------ | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `avatarUrl` | string | **Yes** | | AvatarUrl is the service account's avatar URL. It allows the frontend to display a picture in front<br/>of the service account. |
| `id` | integer | **Yes** | | ID is the unique identifier of the service account in the database. |
| `isDisabled` | boolean | **Yes** | | IsDisabled indicates if the service account is disabled. |
| `login` | string | **Yes** | | Login of the service account. |
| `name` | string | **Yes** | | Name of the service account. |
| `orgId` | integer | **Yes** | | OrgId is the ID of an organisation the service account belongs to. |
| `role` | string | **Yes** | | OrgRole is a Grafana Organization Role which can be 'Viewer', 'Editor', 'Admin'.<br/>Possible values are: `Admin`, `Editor`, `Viewer`. |
| `tokens` | integer | **Yes** | | Tokens is the number of active tokens for the service account.<br/>Tokens are used to authenticate the service account against Grafana. |
| `accessControl` | map[string]boolean | No | | AccessControl metadata associated with a given resource. |
| `teams` | string[] | No | | Teams is a list of teams the service account belongs to. |
### Status
| Property | Type | Required | Default | Description |
| ------------------ | ---------------------------------------------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `additionalFields` | [object](#additionalfields) | No | | additionalFields is reserved for future use |
| `operatorStates` | map[string][status.#OperatorState](#status.#operatorstate) | No | | operatorStates is a map of operator ID to operator state evaluations.<br/>Any operator which consumes this kind SHOULD add its state evaluation information to this field. |
### AdditionalFields
additionalFields is reserved for future use
| Property | Type | Required | Default | Description |
| -------- | ---- | -------- | ------- | ----------- |
### Status.#OperatorState
| Property | Type | Required | Default | Description |
| ------------------ | ------------------ | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `lastEvaluation` | string | **Yes** | | lastEvaluation is the ResourceVersion last evaluated |
| `state` | string | **Yes** | | state describes the state of the lastEvaluation.<br/>It is limited to three possible states for machine evaluation.<br/>Possible values are: `success`, `in_progress`, `failed`. |
| `descriptiveState` | string | No | | descriptiveState is an optional more descriptive state field which has no requirements on format |
| `details` | [object](#details) | No | | details contains any extra information that is operator-specific |
### Details
details contains any extra information that is operator-specific
| Property | Type | Required | Default | Description |
| -------- | ---- | -------- | ------- | ----------- |

View File

@ -1,107 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: Team kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## Team
#### Maturity: [merged](../../../maturity/#merged)
#### Version: 0.0
A team is a named grouping of Grafana users to which access control rules may be assigned.
| Property | Type | Required | Default | Description |
|------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `metadata` | [object](#metadata) | **Yes** | | metadata contains embedded CommonMetadata and can be extended with custom string fields<br/>TODO: use CommonMetadata instead of redefining here; currently needs to be defined here<br/>without external reference as using the CommonMetadata reference breaks thema codegen. |
| `spec` | [object](#spec) | **Yes** | | |
| `status` | [object](#status) | **Yes** | | |
### Metadata
metadata contains embedded CommonMetadata and can be extended with custom string fields
TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
without external reference as using the CommonMetadata reference breaks thema codegen.
It extends [_kubeObjectMetadata](#_kubeobjectmetadata).
| Property | Type | Required | Default | Description |
|---------------------|------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `createdBy` | string | **Yes** | | |
| `creationTimestamp` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `extraFields` | [object](#extrafields) | **Yes** | | extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata |
| `finalizers` | string[] | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `labels` | map[string]string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `resourceVersion` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `uid` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
| `updateTimestamp` | string | **Yes** | | |
| `updatedBy` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* |
### _kubeObjectMetadata
_kubeObjectMetadata is metadata found in a kubernetes object's metadata field.
It is not exhaustive and only includes fields which may be relevant to a kind's implementation,
As it is also intended to be generic enough to function with any API Server.
| Property | Type | Required | Default | Description |
|---------------------|-------------------|----------|---------|-------------|
| `creationTimestamp` | string | **Yes** | | |
| `finalizers` | string[] | **Yes** | | |
| `labels` | map[string]string | **Yes** | | |
| `resourceVersion` | string | **Yes** | | |
| `uid` | string | **Yes** | | |
| `deletionTimestamp` | string | No | | |
### ExtraFields
extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Spec
| Property | Type | Required | Default | Description |
|----------|--------|----------|---------|--------------------|
| `name` | string | **Yes** | | Name of the team. |
| `email` | string | No | | Email of the team. |
### Status
| Property | Type | Required | Default | Description |
|--------------------|------------------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `additionalFields` | [object](#additionalfields) | No | | additionalFields is reserved for future use |
| `operatorStates` | map[string][status.#OperatorState](#status.#operatorstate) | No | | operatorStates is a map of operator ID to operator state evaluations.<br/>Any operator which consumes this kind SHOULD add its state evaluation information to this field. |
### AdditionalFields
additionalFields is reserved for future use
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
### Status.#OperatorState
| Property | Type | Required | Default | Description |
|--------------------|--------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `lastEvaluation` | string | **Yes** | | lastEvaluation is the ResourceVersion last evaluated |
| `state` | string | **Yes** | | state describes the state of the lastEvaluation.<br/>It is limited to three possible states for machine evaluation.<br/>Possible values are: `success`, `in_progress`, `failed`. |
| `descriptiveState` | string | No | | descriptiveState is an optional more descriptive state field which has no requirements on format |
| `details` | [object](#details) | No | | details contains any extra information that is operator-specific |
### Details
details contains any extra information that is operator-specific
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|

View File

@ -1,298 +0,0 @@
---
keywords:
- grafana
- schema
- maturity
labels:
products:
- enterprise
- oss
title: Grafana Kinds - From Zero to Maturity
weight: 300
---
# Grafana Kinds - From Zero to Maturity
> Grafanas schema, Kind, and related codegen systems are under intense development.
Fear of unknown impacts leads to defensive coding, slow PRs, circular arguments, and an overall hesitance to engage.
That friction alone is sufficient to sink a large-scale project. This guide seeks to counteract this friction by
defining an end goal for all schemas: “mature.” This is the word were using to refer to the commonsense notion of “this
software reached 1.0.”
In general, 1.0/mature suggests: “weve thought about this thing, done the necessary experimenting, know what it is, and
feel confident about presenting it to the world.” In the context of schemas intended to act as a single source of truth
driving many use cases, we can intuitively phrase maturity as:
- The schema follows general best practices (e.g. good comments, follows field type rules), and the team owning the
schema believes that the fields described in the schema are accurate.
- Automation propagates the schema as source of truth to every relevant
[domain](https://docs.google.com/document/d/13Rv395_T8WTLBgdL-2rbXKu0fx_TW-Q9yz9x6oBjm6g/edit#heading=h.67pop2k2f8fq)
(for example: types in frontend, backend, as-code; plugins SDK; docs; APIs and storage; search indexing)
This intuitive definition gets us pointed in the right direction. But we cant just jump straight there - we have to
approach it methodically. To that end, this doc outlines four (ok five, but really, four) basic maturity milestones that
we expect Kinds and their schemas to progress through:
- _(Planned - Put a Kind name on the official TODO list)_
- **Merged** - Get an initial schema written down. Not final. Not perfect.
- **Experimental** - Kind schemas are the source of truth for basic working code.
- **Stable** - Kind schemas are the source of truth for all target domains.
- **Mature** - The operational transition path for the Kind is battle-tested and reliable.
These milestones have functional definitions, tied to code and enforced in CI. A Kind having reached a particular
milestone corresponds to properties of the code that are enforced in CI; advancing to the next milestone likely has a
direct impact on code generation and runtime behavior.
Finally, the above definitions imply that maturity for _individual Kinds/schemas_ depends on _the Kind system_ being
mature, as well. This is by design: **Grafana Labs does not intend to publicize any single schema as mature until
[certain schema system milestones are met](https://github.com/orgs/grafana/projects/133/views/8).**
## Schema Maturity Milestones
Maturity milestones are a linear progression. Each milestone implies that the conditions of its predecessors continue to
be met.
Reaching a particular milestone implies that the properties of all prior milestones are still met.
### (Milestone 0 - Planned) {#planned}
| **Goal** | Put a Kind name on the official TODO list: [Kind Schematization Progress Tracker](https://docs.google.com/spreadsheets/d/1DL6nZHyX42X013QraWYbKsMmHozLrtXDj8teLKvwYMY/edit#gid=0) |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Reached when** | The planned Kind is listed in the relevant sheet of the progress tracker with a link to track / be able to see when exactly it is planned and who is responsible for doing it |
| **Common hurdles** | Existing definitions may not correspond clearly to an object boundary - e.g. playlists are currently in denormalized SQL tables playlist and playlist_item |
| **Public-facing guarantees** | None |
| **customer-facing stage** | None |
### Milestone 1 - Merged {#merged}
| **Goal** | Get an initial schema written down. Not final. Not perfect. |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Reached when** | A PR introducing the initial version of a schema has been merged. |
| **Common hurdles** | Getting comfortable with Thema and CUE<br/>Figuring out where all the existing definitions of the Kind are<br/>Knowing whether its safe to omit possibly-crufty fields from the existing definitions when writing the schema |
| **Public-facing guarantees** | None |
| **User-facing stage** | None |
### Milestone 2 - Experimental {#experimental}
| **Goal** | Schemas are the source of truth for basic working code. |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Reached when** | Go and TypeScript types generated from schema are used in all relevant production code, having replaced handwritten type definitions (if any). |
| **Common hurdles** | Compromises on field definitions that seemed fine to reach “committed” start to feel unacceptable<br/>Ergonomics of generated code may start to bite<br/>Aligning with the look and feel of related schemas |
| **Public-facing guarantees** | Kinds are available for as-code usage in [grok](https://github.com/grafana/grok), and in tools downstream of grok, following all of groks standard patterns. |
| **Stage comms** | Internal users:- Start using the schema and give feedback internally to help move to the next stage.External users:- Align with the [experimental](https://docs.google.com/document/d/1lqp0hALax2PT7jSObsX52EbQmIDFnLFMqIbBrJ4EYCE/edit#heading=h.ehl5iy7pcjvq) stage in the release definition document.  - Experimental schemas will be discoverable, and from a customer PoV should never be used in production, but they can be explored and we are more than happy to receive feedback |
## Schema-writing guidelines
### Avoid anonymous nested structs
**_Always name your sub-objects._**
In CUE, nesting structs is like nesting objects in JSON, and just as easy:
```json
one: {
two: {
three: {
}
}
```
While these can be accurately represented in other languages, they arent especially friendly to work with:
```typescript
// TypeScript
export interface One {
two: {
three: string;
};
}
```
```go
// Go
type One struct {
Two struct {
Three string `json:"three"`
} `json:"two"`
}
```
Instead, within your schema, prefer to make root-level definitions with the appropriate attributes:
```cue
// Cue
one: {
two: #Two
#Two: {
three: string
} @cuetsy(kind="interface")
}
```
```Typescript
// TypeScript
export interface Two {
three: string;
}
export interface One {
two: Two;
}
```
```Go
// Go
type One struct {
Two Two `json:"two"`
}
type Two struct {
Three string `json:"three"`
}
```
### Use precise numeric types
**_Use precise numeric types like `float64` or `uint32`. Never use `number`._**
Never use `number` for a numeric type in a schema.
Instead, use a specific, sized type like `int64` or `float32`. This makes your intent precisely clear.
TypeScript will still represent these fields with `number`, but other languages (e.g. Go, Protobuf) can be more precise.
Unlike in Go, int and uint are not your friends. These correspond to `math/big` types. Use a sized type,
like `uint32` or `int32`, unless the use case specifically requires a huge numeric space.
### No explicit `null`
**_Do not use `null` as a type in any schema._**
This one is tricky to think about, and requires some background.
Historically, Grafanas dashboard JSON has often contained fields with the explicit value `null`.
This was problematic, because explicit `null` introduces an ambiguity: is a JSON field being present
with value null meaningfully different from the field being absent? That is, should a program behave differently
if it encounters a null vs. an absent field?
In almost all cases, the answer is “no.” Thus, the ambiguity: if both explicit null and absence are _accepted_
by a system, it pushes responsibility onto anyone writing code in that system to decide, case-by-case,
whether the two are _intended to be meaningfully different_, and therefore whether behavior should be different.
CUE does have a `null` type, and only accepts data containing `nulls` as valid if the schema explicitly allows a `null`.
That means, by default, using CUE for schemas removes the possibility of ambiguity in code that receives data validated
by those schemas, even if the language theyre writing in still allows for ambiguity. (Javascript does, Go doesnt.)
As a schema author, this means youre being unambiguous by default - no `nulls`. Thats good! The only question is
whether its worth explicitly allowing a `null` for some particular case:
```Cue
someField: int32 | null
```
The _only_ time this _may_ be a good idea is if your field needs to be able to represent a value
that is not otherwise acceptable within the value space - for example, if `someField` needs to be able to contain
[Infinity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY).
When such values are serialized to null by default, it can be convenient to accept null in the schema - but even then,
explicit null is unlikely to be the best way to represent such values, because it is so subtle and falsey.
**Above all, DO NOT accept `null` in a schema simply because current behavior sometimes unintentionally produces a `null`.**
Schematization is an opportunity to get rid of this ambiguity. Fix the accidental null-producing behavior, instead.
### Issues
- If a schema has a "kind" field and its set as enum, it generates a Kind alias that conflicts with the generated
Kind struct.
- Byte fields are existing in Go but not in TS, so the generator fails.
- **omitempty** is useful when we return things like json.RawMessage (alias of []byte) because Postgres saves this
information as `nil`, when MySQL and SQLite save it as `{}`. If we found it in the rest of the cases, it isn't necessary
to set `?` in the field in the schema.
## Schema Attributes
Grafanas schema system relies on [CUE attributes](https://cuelang.org/docs/references/spec/#attributes)declared on
properties within schemas to control some aspects of code generation behavior.
In a schema, an attribute is the whole of `@cuetsy(kind=”type”)`:
```Cue
field: string @cuetsy(kind="type")
```
CUE attributes are purely informational - they cannot influence CUE evaluation behavior, including the types being
expressed in a Thema schema.
CUE attributes have three parts. In `@cuetsy(kind=”type”)`, those are:
- name - `@cuetsy`
- arg - `kind`
- argval - `“type”`
Any given attribute may consist of `{name}`, `{name,arg}`, or `{name,arg,argval}`. These three levels form a tree
(meaning of any argval is specific to its arg, which is specific to its name). The following documentation represents
this tree using a header hierarchy.
### @cuetsy
These attributes control the behavior of the [cuetsy code generator](https://github.com/grafana/cuetsy), which converts
CUE to TypeScript. We include only the kind arg here for brevity; cuetsys README has the canonical documentation on all
supported args and argvals, and their intended usage.
Notes:
- Only top-level fields in a Thema schema are scanned for `@cuetsy` attributes.
- Grafanas code generators hardcode that an interface (`@cuetsy(kind=”interface”)`) is generated to represent the root
schema object, unless it is known to be a [grouped lineage](https://docs.google.com/document/d/13Rv395_T8WTLBgdL-2rbXKu0fx_TW-Q9yz9x6oBjm6g/edit#heading=h.vx7stzpxtw4t).
#### kind
Indicates the kind of TypeScript symbol that should be generated for that schema field.
#### interface
Generate the schema field as a TS interface. Field must be struct-kinded.
#### enum
Generate the schema field as a TS enum. Field must be either int-kinded (numeric enums) or string-kinded (string enums).
#### type
Generate the schema field as a TS type alias.
### @grafana
These attributes control code generation behaviors that are specific to Grafana core. Some may also be supported
in plugin code generators.
#### TSVeneer
Applying a TSVeneer arg to a field in a schema indicates that the schema author wants to enrich the generated type
(for example by adding generic type parameters), so code generation should expect a handwritten
[veneer](https://docs.google.com/document/d/13Rv395_T8WTLBgdL-2rbXKu0fx_TW-Q9yz9x6oBjm6g/edit#heading=h.bmtjq0bb1yxp).
TSVeneer requires at least one argval, each of which impacts TypeScript code generation in its own way.
Multiple argvals may be given, separated by `|`.
A TSVeneer arg has no effect if it is applied to a field that is not exported as a standalone TypeScript type
(which usually means a CUE field that also has an `@cuetsy(kind=)` attribute).
#### type
A handwritten veneer is needed to refine the raw generated TypeScript type, for example by adding generics.
See [the dashboard types veneer](https://github.com/grafana/grafana/blob/5f93e67419e9587363d1fc1e6f1f4a8044eb54d0/packages/grafana-schema/src/veneer/dashboard.types.ts)
for an example, and [some](https://github.com/grafana/grafana/blob/5f93e67419e9587363d1fc1e6f1f4a8044eb54d0/kinds/dashboard/dashboard_kind.cue#L12)
[corresponding](https://github.com/grafana/grafana/blob/5f93e67419e9587363d1fc1e6f1f4a8044eb54d0/kinds/dashboard/dashboard_kind.cue#L143)
CUE attributes.
### @grafanamaturity
These attributes are used to support iterative development of a schema towards maturity.
Grafana code generators and CI enforce that schemas marked as mature MUST NOT have any `@grafanamaturity` attributes.
#### NeedsExpertReview
Indicates that a non-expert on that schema wrote the field, and was not fully confident in its type and/or docs.
Primarily useful on very large schemas, like the dashboard schema, for getting _something_ written down for a given
field that at least makes validation tests pass, but making clear that the field isnt necessarily properly correct.
No argval is accepted. (Use a `//` comment to say more about the attention thats needed.)

View File

@ -47,7 +47,6 @@ func main() {
true, // forcing group so that we ignore the top level resource (for now)
codegen.TSResourceJenny{}),
codegen.TSVeneerIndexJenny(filepath.Join("packages", "grafana-schema", "src")),
codegen.DocsJenny(filepath.Join("docs", "sources", "developers", "kinds", "core")),
)
header := codegen.SlashHeaderMapper("kinds/gen.go")

View File

@ -1,793 +0,0 @@
package codegen
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"path"
"path/filepath"
"reflect"
"sort"
"strings"
"text/template"
"cuelang.org/go/cue/cuecontext"
"github.com/grafana/codejen"
"github.com/grafana/kindsys"
"github.com/grafana/thema/encoding/jsonschema"
"github.com/olekukonko/tablewriter"
"github.com/xeipuuv/gojsonpointer"
"github.com/grafana/grafana/pkg/components/simplejson"
)
func DocsJenny(docsPath string) OneToOne {
return docsJenny{
docsPath: docsPath,
}
}
type docsJenny struct {
docsPath string
}
func (j docsJenny) JennyName() string {
return "DocsJenny"
}
func (j docsJenny) Generate(kind kindsys.Kind) (*codejen.File, error) {
// TODO remove this once codejen catches nils https://github.com/grafana/codejen/issues/5
if kind == nil {
return nil, nil
}
f, err := jsonschema.GenerateSchema(kind.Lineage().Latest())
if err != nil {
return nil, fmt.Errorf("failed to generate json representation for the schema: %v", err)
}
b, err := cuecontext.New().BuildFile(f).MarshalJSON()
if err != nil {
return nil, fmt.Errorf("failed to marshal schema value to json: %v", err)
}
// We don't need entire json obj, only the value of components.schemas path
var obj struct {
Info struct {
Title string
}
Components struct {
Schemas json.RawMessage
}
}
dec := json.NewDecoder(bytes.NewReader(b))
dec.UseNumber()
err = dec.Decode(&obj)
if err != nil {
return nil, fmt.Errorf("failed to unmarshal schema json: %v", err)
}
// fixes the references between the types within a json after making components.schema.<types> the root of the json
kindJsonStr := strings.Replace(string(obj.Components.Schemas), "#/components/schemas/", "#/", -1)
kindProps := kind.Props().Common()
data := templateData{
KindName: kindProps.Name,
KindVersion: kind.Lineage().Latest().Version().String(),
KindMaturity: fmt.Sprintf("[%s](../../../maturity/#%[1]s)", kindProps.Maturity),
KindDescription: kindProps.Description,
Markdown: "{{ .Markdown }}",
}
tmpl, err := makeTemplate(data, "docs.tmpl")
if err != nil {
return nil, err
}
doc, err := jsonToMarkdown([]byte(kindJsonStr), string(tmpl), obj.Info.Title)
if err != nil {
return nil, fmt.Errorf("failed to build markdown for kind %s: %v", kindProps.Name, err)
}
return codejen.NewFile(filepath.Join(j.docsPath, strings.ToLower(kindProps.Name), "schema-reference.md"), doc, j), nil
}
// makeTemplate pre-populates the template with the kind metadata
func makeTemplate(data templateData, tmpl string) ([]byte, error) {
buf := new(bytes.Buffer)
if err := tmpls.Lookup(tmpl).Execute(buf, data); err != nil {
return []byte{}, fmt.Errorf("failed to populate docs template with the kind metadata")
}
return buf.Bytes(), nil
}
type templateData struct {
KindName string
KindVersion string
KindMaturity string
KindDescription string
Markdown string
}
// -------------------- JSON to Markdown conversion --------------------
// Copied from https://github.com/marcusolsson/json-schema-docs and slightly changed to fit the DocsJenny
type constraints struct {
Pattern string `json:"pattern"`
Maximum json.Number `json:"maximum"`
ExclusiveMinimum bool `json:"exclusiveMinimum"`
Minimum json.Number `json:"minimum"`
ExclusiveMaximum bool `json:"exclusiveMaximum"`
MinLength uint `json:"minLength"`
MaxLength uint `json:"maxLength"`
}
type schema struct {
constraints
ID string `json:"$id,omitempty"`
Ref string `json:"$ref,omitempty"`
Schema string `json:"$schema,omitempty"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Required []string `json:"required,omitempty"`
Type PropertyTypes `json:"type,omitempty"`
Properties map[string]*schema `json:"properties,omitempty"`
Items *schema `json:"items,omitempty"`
Definitions map[string]*schema `json:"definitions,omitempty"`
Enum []Any `json:"enum"`
Default any `json:"default"`
AllOf []*schema `json:"allOf"`
OneOf []*schema `json:"oneOf"`
AdditionalProperties *schema `json:"additionalProperties"`
extends []string `json:"-"`
inheritedFrom string `json:"-"`
}
func renderMapType(props *schema) string {
if props == nil {
return ""
}
if props.Type.HasType(PropertyTypeObject) {
name, anchor := propNameAndAnchor(props.Title, props.Title)
return fmt.Sprintf("[%s](#%s)", name, anchor)
}
if props.AdditionalProperties != nil {
return "map[string]" + renderMapType(props.AdditionalProperties)
}
if props.Items != nil {
return "[]" + renderMapType(props.Items)
}
var types []string
for _, t := range props.Type {
types = append(types, string(t))
}
return strings.Join(types, ", ")
}
func jsonToMarkdown(jsonData []byte, tpl string, kindName string) ([]byte, error) {
sch, err := newSchema(jsonData, kindName)
if err != nil {
return []byte{}, err
}
t, err := template.New("markdown").Parse(tpl)
if err != nil {
return []byte{}, err
}
buf := new(bytes.Buffer)
err = t.Execute(buf, sch)
if err != nil {
return []byte{}, err
}
return buf.Bytes(), nil
}
func newSchema(b []byte, kindName string) (*schema, error) {
var data map[string]*schema
if err := json.Unmarshal(b, &data); err != nil {
return nil, err
}
// Needed for resolving in-schema references.
root, err := simplejson.NewJson(b)
if err != nil {
return nil, err
}
return resolveSchema(data[kindName], root)
}
// resolveSchema recursively resolves schemas.
func resolveSchema(schem *schema, root *simplejson.Json) (*schema, error) {
for _, prop := range schem.Properties {
if prop.Ref != "" {
tmp, err := resolveReference(prop.Ref, root)
if err != nil {
return nil, err
}
*prop = *tmp
}
foo, err := resolveSchema(prop, root)
if err != nil {
return nil, err
}
*prop = *foo
}
if schem.Items != nil {
if schem.Items.Ref != "" {
tmp, err := resolveReference(schem.Items.Ref, root)
if err != nil {
return nil, err
}
*schem.Items = *tmp
}
foo, err := resolveSchema(schem.Items, root)
if err != nil {
return nil, err
}
*schem.Items = *foo
}
if len(schem.AllOf) > 0 {
for idx, child := range schem.AllOf {
tmp, err := resolveSubSchema(schem, child, root)
if err != nil {
return nil, err
}
schem.AllOf[idx] = tmp
if len(tmp.Title) > 0 {
schem.extends = append(schem.extends, tmp.Title)
}
}
}
if len(schem.OneOf) > 0 {
for idx, child := range schem.OneOf {
tmp, err := resolveSubSchema(schem, child, root)
if err != nil {
return nil, err
}
schem.OneOf[idx] = tmp
}
}
if schem.AdditionalProperties != nil {
if schem.AdditionalProperties.Ref != "" {
tmp, err := resolveReference(schem.AdditionalProperties.Ref, root)
if err != nil {
return nil, err
}
*schem.AdditionalProperties = *tmp
}
foo, err := resolveSchema(schem.AdditionalProperties, root)
if err != nil {
return nil, err
}
*schem.AdditionalProperties = *foo
}
return schem, nil
}
func resolveSubSchema(parent, child *schema, root *simplejson.Json) (*schema, error) {
if child.Ref != "" {
tmp, err := resolveReference(child.Ref, root)
if err != nil {
return nil, err
}
*child = *tmp
}
if len(child.Required) > 0 {
parent.Required = append(parent.Required, child.Required...)
}
child, err := resolveSchema(child, root)
if err != nil {
return nil, err
}
if parent.Properties == nil {
parent.Properties = make(map[string]*schema)
}
for k, v := range child.Properties {
prop := *v
prop.inheritedFrom = child.Title
parent.Properties[k] = &prop
}
return child, err
}
// resolveReference loads a schema from a $ref.
// If ref contains a hashtag (#), the part after represents a in-schema reference.
func resolveReference(ref string, root *simplejson.Json) (*schema, error) {
i := strings.Index(ref, "#")
if i != 0 {
return nil, fmt.Errorf("not in-schema reference: %s", ref)
}
return resolveInSchemaReference(ref[i+1:], root)
}
func resolveInSchemaReference(ref string, root *simplejson.Json) (*schema, error) {
// in-schema reference
pointer, err := gojsonpointer.NewJsonPointer(ref)
if err != nil {
return nil, err
}
v, _, err := pointer.Get(root.MustMap())
if err != nil {
return nil, err
}
var sch schema
b, err := json.Marshal(v)
if err != nil {
return nil, err
}
if err := json.Unmarshal(b, &sch); err != nil {
return nil, err
}
// Set the ref name as title
sch.Title = path.Base(ref)
return &sch, nil
}
type mdSection struct {
title string
extends string
description string
rows [][]string
}
func (md mdSection) write(w io.Writer) {
if md.title != "" {
fmt.Fprintf(w, "### %s\n", strings.Title(md.title))
fmt.Fprintln(w)
}
if md.description != "" {
fmt.Fprintln(w, md.description)
fmt.Fprintln(w)
}
if md.extends != "" {
fmt.Fprintln(w, md.extends)
fmt.Fprintln(w)
}
table := tablewriter.NewWriter(w)
table.SetHeader([]string{"Property", "Type", "Required", "Default", "Description"})
table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
table.SetCenterSeparator("|")
table.SetAutoFormatHeaders(false)
table.SetHeaderAlignment(tablewriter.ALIGN_LEFT)
table.SetAutoWrapText(false)
table.AppendBulk(md.rows)
table.Render()
fmt.Fprintln(w)
}
// Markdown returns the Markdown representation of the schema.
//
// The level argument can be used to offset the heading levels. This can be
// useful if you want to add the schema under a subheading.
func (s *schema) Markdown() string {
buf := new(bytes.Buffer)
for _, v := range s.sections() {
v.write(buf)
}
return buf.String()
}
func (s *schema) sections() []mdSection {
md := mdSection{}
if s.AdditionalProperties == nil {
md.title = s.Title
}
md.description = s.Description
if len(s.extends) > 0 {
md.extends = makeExtends(s.extends)
}
md.rows = makeRows(s)
sections := []mdSection{md}
for _, sch := range findDefinitions(s) {
for _, ss := range sch.sections() {
if !contains(sections, ss) {
sections = append(sections, ss)
}
}
}
return sections
}
func contains(sl []mdSection, elem mdSection) bool {
for _, s := range sl {
if reflect.DeepEqual(s, elem) {
return true
}
}
return false
}
func makeExtends(from []string) string {
fromLinks := make([]string, 0, len(from))
for _, f := range from {
fromLinks = append(fromLinks, fmt.Sprintf("[%s](#%s)", f, strings.ToLower(f)))
}
return fmt.Sprintf("It extends %s.", strings.Join(fromLinks, " and "))
}
func findDefinitions(s *schema) []*schema {
// Gather all properties of object type so that we can generate the
// properties for them recursively.
var objs []*schema
definition := func(k string, p *schema) {
if p.Type.HasType(PropertyTypeObject) && p.AdditionalProperties == nil {
// Use the identifier as the title.
if len(p.Title) == 0 {
p.Title = k
}
objs = append(objs, p)
}
// If the property is an array of objects, use the name of the array
// property as the title.
if p.Type.HasType(PropertyTypeArray) {
if p.Items != nil {
if p.Items.Type.HasType(PropertyTypeObject) {
if len(p.Items.Title) == 0 {
p.Items.Title = k
}
objs = append(objs, p.Items)
}
}
}
}
for k, p := range s.Properties {
// If a property has AdditionalProperties, then it's a map
if p.AdditionalProperties != nil {
definition(k, p.AdditionalProperties)
}
definition(k, p)
}
// This code could probably be unified with the one above
for _, child := range s.AllOf {
if child.Type.HasType(PropertyTypeObject) {
objs = append(objs, child)
}
if child.Type.HasType(PropertyTypeArray) {
if child.Items != nil {
if child.Items.Type.HasType(PropertyTypeObject) {
objs = append(objs, child.Items)
}
}
}
}
for _, child := range s.OneOf {
if child.Type.HasType(PropertyTypeObject) {
objs = append(objs, child)
}
if child.Type.HasType(PropertyTypeArray) {
if child.Items != nil {
if child.Items.Type.HasType(PropertyTypeObject) {
objs = append(objs, child.Items)
}
}
}
}
// Sort the object schemas.
sort.Slice(objs, func(i, j int) bool {
return objs[i].Title < objs[j].Title
})
return objs
}
func makeRows(s *schema) [][]string {
// Buffer all property rows so that we can sort them before printing them.
rows := make([][]string, 0, len(s.Properties))
var typeStr string
if len(s.OneOf) > 0 {
typeStr = enumStr(s)
rows = append(rows, []string{"`object`", typeStr, "", ""})
return rows
}
for key, p := range s.Properties {
alias := propTypeAlias(p)
if alias != "" {
typeStr = alias
} else {
typeStr = propTypeStr(key, p)
}
// Emphasize required properties.
var required string
if in(s.Required, key) {
required = "**Yes**"
} else {
required = "No"
}
var desc string
if p.inheritedFrom != "" {
desc = fmt.Sprintf("*(Inherited from [%s](#%s))*", p.inheritedFrom, strings.ToLower(p.inheritedFrom))
}
if p.Description != "" {
desc += "\n" + p.Description
}
if len(p.Enum) > 0 {
vals := make([]string, 0, len(p.Enum))
for _, e := range p.Enum {
vals = append(vals, e.String())
}
desc += "\nPossible values are: `" + strings.Join(vals, "`, `") + "`."
}
var defaultValue string
if p.Default != nil {
defaultValue = fmt.Sprintf("`%v`", p.Default)
}
// Render a constraint only if it's not a type alias https://cuelang.org/docs/references/spec/#predeclared-identifiers
if alias == "" {
desc += constraintDescr(p)
}
rows = append(rows, []string{fmt.Sprintf("`%s`", key), typeStr, required, defaultValue, formatForTable(desc)})
}
// Sort by the required column, then by the name column.
sort.Slice(rows, func(i, j int) bool {
if rows[i][2] < rows[j][2] {
return true
}
if rows[i][2] > rows[j][2] {
return false
}
return rows[i][0] < rows[j][0]
})
return rows
}
func propTypeAlias(prop *schema) string {
if prop.Minimum == "" || prop.Maximum == "" {
return ""
}
min := prop.Minimum
max := prop.Maximum
switch {
case min == "0" && max == "255":
return "uint8"
case min == "0" && max == "65535":
return "uint16"
case min == "0" && max == "4294967295":
return "uint32"
case min == "0" && max == "18446744073709551615":
return "uint64"
case min == "-128" && max == "127":
return "int8"
case min == "-32768" && max == "32767":
return "int16"
case min == "-2147483648" && max == "2147483647":
return "int32"
case min == "-9223372036854775808" && max == "9223372036854775807":
return "int64"
default:
return ""
}
}
func constraintDescr(prop *schema) string {
if prop.Minimum != "" && prop.Maximum != "" {
var left, right string
if prop.ExclusiveMinimum {
left = ">" + prop.Minimum.String()
} else {
left = ">=" + prop.Minimum.String()
}
if prop.ExclusiveMaximum {
right = "<" + prop.Maximum.String()
} else {
right = "<=" + prop.Maximum.String()
}
return fmt.Sprintf("\nConstraint: `%s & %s`.", left, right)
}
if prop.MinLength > 0 {
left := fmt.Sprintf(">=%v", prop.MinLength)
right := ""
if prop.MaxLength > 0 {
right = fmt.Sprintf(" && <=%v", prop.MaxLength)
}
return fmt.Sprintf("\nConstraint: `length %s`.", left+right)
}
if prop.Pattern != "" {
return fmt.Sprintf("\nConstraint: must match `%s`.", prop.Pattern)
}
return ""
}
func enumStr(propValue *schema) string {
var vals []string
for _, v := range propValue.OneOf {
vals = append(vals, fmt.Sprintf("[%s](#%s)", v.Title, strings.ToLower(v.Title)))
}
return "Possible types are: " + strings.Join(vals, ", ") + "."
}
func propTypeStr(propName string, propValue *schema) string {
// If the property has AdditionalProperties, it is most likely a map type
if propValue.AdditionalProperties != nil {
mapValue := renderMapType(propValue.AdditionalProperties)
return "map[string]" + mapValue
}
propType := make([]string, 0, len(propValue.Type))
// Generate relative links for objects and arrays of objects.
for _, pt := range propValue.Type {
switch pt {
case PropertyTypeObject:
name, anchor := propNameAndAnchor(propName, propValue.Title)
propType = append(propType, fmt.Sprintf("[%s](#%s)", name, anchor))
case PropertyTypeArray:
if propValue.Items != nil {
for _, pi := range propValue.Items.Type {
if pi == PropertyTypeObject {
name, anchor := propNameAndAnchor(propName, propValue.Items.Title)
propType = append(propType, fmt.Sprintf("[%s](#%s)[]", name, anchor))
} else {
propType = append(propType, fmt.Sprintf("%s[]", pi))
}
}
} else {
propType = append(propType, string(pt))
}
default:
propType = append(propType, string(pt))
}
}
if len(propType) == 0 {
return ""
}
if len(propType) == 1 {
return propType[0]
}
if len(propType) == 2 {
return strings.Join(propType, " or ")
}
return fmt.Sprintf("%s, or %s", strings.Join(propType[:len(propType)-1], ", "), propType[len(propType)-1])
}
func propNameAndAnchor(prop, title string) (string, string) {
if len(title) > 0 {
return title, strings.ToLower(title)
}
return string(PropertyTypeObject), strings.ToLower(prop)
}
// in returns true if a string slice contains a specific string.
func in(strs []string, str string) bool {
for _, s := range strs {
if s == str {
return true
}
}
return false
}
// formatForTable returns string usable in a Markdown table.
// It trims white spaces, replaces new lines and pipe characters.
func formatForTable(in string) string {
s := strings.TrimSpace(in)
s = strings.ReplaceAll(s, "\n", "<br/>")
s = strings.ReplaceAll(s, "|", "&#124;")
return s
}
type PropertyTypes []PropertyType
func (pts *PropertyTypes) HasType(pt PropertyType) bool {
for _, t := range *pts {
if t == pt {
return true
}
}
return false
}
func (pts *PropertyTypes) UnmarshalJSON(data []byte) error {
var value any
if err := json.Unmarshal(data, &value); err != nil {
return err
}
switch val := value.(type) {
case string:
*pts = []PropertyType{PropertyType(val)}
return nil
case []any:
var pt []PropertyType
for _, t := range val {
s, ok := t.(string)
if !ok {
return errors.New("unsupported property type")
}
pt = append(pt, PropertyType(s))
}
*pts = pt
default:
return errors.New("unsupported property type")
}
return nil
}
type PropertyType string
const (
PropertyTypeString PropertyType = "string"
PropertyTypeNumber PropertyType = "number"
PropertyTypeBoolean PropertyType = "boolean"
PropertyTypeObject PropertyType = "object"
PropertyTypeArray PropertyType = "array"
PropertyTypeNull PropertyType = "null"
)
type Any struct {
value any
}
func (u *Any) UnmarshalJSON(data []byte) error {
if err := json.Unmarshal(data, &u.value); err != nil {
return err
}
return nil
}
func (u *Any) String() string {
return fmt.Sprintf("%v", u.value)
}

View File

@ -1,21 +0,0 @@
---
keywords:
- grafana
- schema
labels:
products:
- cloud
- enterprise
- oss
title: {{ .KindName }} kind
---
> Both documentation generation and kinds schemas are in active development and subject to change without prior notice.
## {{ .KindName }}
#### Maturity: {{ .KindMaturity }}
#### Version: {{ .KindVersion }}
{{ .KindDescription }}
{{ .Markdown }}

View File

@ -1,74 +0,0 @@
package kindsysreport
import (
"cuelang.org/go/cue"
)
type AttributeWalker struct {
seen map[cue.Value]bool
count map[string]int
}
func (w *AttributeWalker) Count(sch cue.Value, attrs ...string) map[string]int {
w.seen = make(map[cue.Value]bool)
w.count = make(map[string]int)
for _, attr := range attrs {
w.count[attr] = 0
}
w.walk(cue.MakePath(), sch)
return w.count
}
func (w *AttributeWalker) walk(p cue.Path, v cue.Value) {
if w.seen[v] {
return
}
w.seen[v] = true
for attr := range w.count {
if found := v.Attribute(attr); found.Err() == nil {
w.count[attr]++
}
}
// nolint: exhaustive
switch v.Kind() {
case cue.StructKind:
// If current cue.Value is a reference to another
// definition, we don't want to traverse its fields
// individually, because we'll do so for the actual def.
if v != cue.Dereference(v) {
return
}
iter, err := v.Fields(cue.All())
if err != nil {
panic(err)
}
for iter.Next() {
w.walk(appendPath(p, iter.Selector()), iter.Value())
}
if lv := v.LookupPath(cue.MakePath(cue.AnyString)); lv.Exists() {
w.walk(appendPath(p, cue.AnyString), lv)
}
case cue.ListKind:
list, err := v.List()
if err != nil {
panic(err)
}
for i := 0; list.Next(); i++ {
w.walk(appendPath(p, cue.Index(i)), list.Value())
}
if lv := v.LookupPath(cue.MakePath(cue.AnyIndex)); lv.Exists() {
w.walk(appendPath(p, cue.AnyString), lv)
}
}
}
func appendPath(p cue.Path, sel cue.Selector) cue.Path {
return cue.MakePath(append(p.Selectors(), sel)...)
}

View File

@ -1,391 +0,0 @@
//go:build ignore
// +build ignore
//go:generate go run report.go
package main
import (
"context"
"encoding/json"
"fmt"
"net/url"
"os"
"path/filepath"
"reflect"
"sort"
"strings"
"cuelang.org/go/cue"
"github.com/grafana/codejen"
"github.com/grafana/kindsys"
"github.com/grafana/thema"
"github.com/grafana/grafana/pkg/kindsysreport"
"github.com/grafana/grafana/pkg/plugins/pfs/corelist"
"github.com/grafana/grafana/pkg/plugins/plugindef"
"github.com/grafana/grafana/pkg/registry/corekind"
)
const (
// Program's output
reportFileName = "report.json"
// External references
repoBaseURL = "https://github.com/grafana/grafana/tree/main"
docsBaseURL = "https://grafana.com/docs/grafana/next/developers/kinds"
// Local references
coreTSPath = "packages/grafana-schema/src/raw/%s/%s/%s_types.gen.ts"
coreGoPath = "pkg/kinds/%s"
coreCUEPath = "kinds/%s/%s_kind.cue"
composableTSPath = "public/app/plugins/%s/%s/%s.gen.ts"
composableGoPath = "pkg/tsdb/%s/kinds/%s/types_%s_gen.go"
composableCUEPath = "public/app/plugins/%s/%s/%s.cue"
)
func main() {
report := buildKindStateReport()
reportJSON := elsedie(json.MarshalIndent(report, "", " "))("error generating json output")
file := codejen.NewFile(reportFileName, reportJSON, reportJenny{})
filesystem := elsedie(file.ToFS())("error building in-memory file system")
if _, set := os.LookupEnv("CODEGEN_VERIFY"); set {
if err := filesystem.Verify(context.Background(), ""); err != nil {
die(fmt.Errorf("generated code is out of sync with inputs:\n%s\nrun `make gen-cue` to regenerate", err))
}
} else if err := filesystem.Write(context.Background(), ""); err != nil {
die(fmt.Errorf("error while writing generated code to disk:\n%s", err))
}
}
// static list of planned core kinds so that we can inject ones that
// haven't been started on yet as "planned"
var plannedCoreKinds = []string{
"Dashboard",
"Playlist",
"Team",
"User",
"Folder",
"DataSource",
"APIKey",
"ServiceAccount",
"Thumb",
"Query",
"QueryHistory",
}
type KindLinks struct {
Schema string
Go string
Ts string
Docs string
}
type Kind struct {
kindsys.SomeKindProperties
Category string
Links KindLinks
GrafanaMaturityCount int
CodeOwners []string
}
// MarshalJSON is overwritten to marshal
// kindsys.SomeKindProperties at root level.
func (k Kind) MarshalJSON() ([]byte, error) {
b, err := json.Marshal(k.SomeKindProperties)
if err != nil {
return nil, err
}
var m map[string]any
if err = json.Unmarshal(b, &m); err != nil {
return nil, err
}
m["category"] = k.Category
m["grafanaMaturityCount"] = k.GrafanaMaturityCount
if len(k.CodeOwners) == 0 {
m["codeowners"] = []string{}
} else {
m["codeowners"] = k.CodeOwners
}
m["links"] = map[string]string{}
for _, ref := range []string{"Schema", "Go", "Ts", "Docs"} {
refVal := reflect.ValueOf(k.Links).FieldByName(ref).String()
if len(refVal) > 0 {
m["links"].(map[string]string)[toCamelCase(ref)] = refVal
} else {
m["links"].(map[string]string)[toCamelCase(ref)] = "n/a"
}
}
return json.Marshal(m)
}
type KindStateReport struct {
Kinds map[string]Kind `json:"kinds"`
Dimensions map[string]Dimension `json:"dimensions"`
}
func (r *KindStateReport) add(k Kind) {
kName := k.Common().MachineName
r.Kinds[kName] = k
r.Dimensions["maturity"][k.Common().Maturity.String()].add(kName)
r.Dimensions["category"][k.Category].add(kName)
}
type Dimension map[string]*DimensionValue
type DimensionValue struct {
Name string `json:"name"`
Items []string `json:"items"`
Count int `json:"count"`
}
func (dv *DimensionValue) add(s string) {
dv.Count++
dv.Items = append(dv.Items, s)
}
// emptyKindStateReport is used to ensure certain
// dimension values are present (even if empty) in
// the final report.
func emptyKindStateReport() *KindStateReport {
return &KindStateReport{
Kinds: make(map[string]Kind),
Dimensions: map[string]Dimension{
"maturity": {
"planned": emptyDimensionValue("planned"),
"merged": emptyDimensionValue("merged"),
"experimental": emptyDimensionValue("experimental"),
"stable": emptyDimensionValue("stable"),
"mature": emptyDimensionValue("mature"),
},
"category": {
"core": emptyDimensionValue("core"),
"composable": emptyDimensionValue("composable"),
},
},
}
}
func emptyDimensionValue(name string) *DimensionValue {
return &DimensionValue{
Name: name,
Items: make([]string, 0),
Count: 0,
}
}
func buildKindStateReport() *KindStateReport {
r := emptyKindStateReport()
b := corekind.NewBase(nil)
groot := filepath.Join(elsedie(os.Getwd())("cannot get cwd"), "..", "..", "..")
of := elsedie(kindsysreport.NewCodeOwnersFinder(groot))("cannot parse .github/codeowners")
seen := make(map[string]bool)
for _, k := range b.All() {
seen[k.Props().Common().Name] = true
lin := k.Lineage()
links := buildCoreLinks(lin, k.Def().Properties)
r.add(Kind{
SomeKindProperties: k.Props(),
Category: "core",
Links: links,
GrafanaMaturityCount: grafanaMaturityAttrCount(lin.Latest().Underlying()),
CodeOwners: findCodeOwners(of, links),
})
}
for _, kn := range plannedCoreKinds {
if seen[kn] {
continue
}
r.add(Kind{
SomeKindProperties: kindsys.CoreProperties{
CommonProperties: kindsys.CommonProperties{
Name: kn,
PluralName: kn + "s",
MachineName: machinize(kn),
PluralMachineName: machinize(kn) + "s",
Maturity: "planned",
},
},
Category: "core",
})
}
all := kindsys.SchemaInterfaces(nil)
for _, pp := range corelist.New(nil) {
for _, si := range all {
if ck, has := pp.ComposableKinds[si.Name()]; has {
links := buildComposableLinks(pp.Properties, ck.Def().Properties)
r.add(Kind{
SomeKindProperties: ck.Props(),
Category: "composable",
Links: links,
GrafanaMaturityCount: grafanaMaturityAttrCount(ck.Lineage().Latest().Underlying()),
CodeOwners: findCodeOwners(of, links),
})
} else if may := si.Should(string(pp.Properties.Type)); may {
n := plugindef.DerivePascalName(pp.Properties) + si.Name()
ck := kindsys.ComposableProperties{
SchemaInterface: si.Name(),
CommonProperties: kindsys.CommonProperties{
Name: n,
PluralName: n + "s",
MachineName: machinize(n),
PluralMachineName: machinize(n) + "s",
LineageIsGroup: si.IsGroup(),
Maturity: "planned",
},
}
r.add(Kind{
SomeKindProperties: ck,
Category: "composable",
})
}
}
}
for _, d := range r.Dimensions {
for _, dv := range d {
sort.Strings(dv.Items)
}
}
return r
}
func buildCoreLinks(lin thema.Lineage, cp kindsys.CoreProperties) KindLinks {
const category = "core"
vpath := fmt.Sprintf("v%v", lin.Latest().Version()[0])
if cp.Maturity.Less(kindsys.MaturityStable) {
vpath = "x"
}
return KindLinks{
Schema: elsedie(url.JoinPath(repoBaseURL, fmt.Sprintf(coreCUEPath, cp.MachineName, cp.MachineName)))("cannot build schema link"),
Go: elsedie(url.JoinPath(repoBaseURL, fmt.Sprintf(coreGoPath, cp.MachineName)))("cannot build go link"),
Ts: elsedie(url.JoinPath(repoBaseURL, fmt.Sprintf(coreTSPath, cp.MachineName, vpath, cp.MachineName)))("cannot build ts link"),
Docs: elsedie(url.JoinPath(docsBaseURL, category, cp.MachineName, "schema-reference"))("cannot build docs link"),
}
}
// used to map names for those plugins that aren't following
// naming conventions, like 'annonlist' which comes from "Annotations list".
var irregularPluginNames = map[string]string{
// Panel
"alertgroups": "alertGroups",
"annotationslist": "annolist",
"dashboardlist": "dashlist",
"nodegraph": "nodeGraph",
"statetimeline": "state-timeline",
"statushistory": "status-history",
"tableold": "table-old",
// Datasource
"googlecloudmonitoring": "cloud-monitoring",
"azuremonitor": "grafana-azure-monitor-datasource",
"microsoftsqlserver": "mssql",
"postgresql": "postgres",
"testdata": "grafana-testdata-datasource",
}
func buildComposableLinks(pp plugindef.PluginDef, cp kindsys.ComposableProperties) KindLinks {
const category = "composable"
schemaInterface := strings.ToLower(cp.SchemaInterface)
pName := strings.Replace(cp.MachineName, schemaInterface, "", 1)
if irr, ok := irregularPluginNames[pName]; ok {
pName = irr
}
var goLink string
if pp.Backend != nil && *pp.Backend {
goLink = elsedie(url.JoinPath(repoBaseURL, fmt.Sprintf(composableGoPath, pName, schemaInterface, schemaInterface)))("cannot build go link")
}
return KindLinks{
Schema: elsedie(url.JoinPath(repoBaseURL, fmt.Sprintf(composableCUEPath, string(pp.Type), pName, schemaInterface)))("cannot build schema link"),
Go: goLink,
Ts: elsedie(url.JoinPath(repoBaseURL, fmt.Sprintf(composableTSPath, string(pp.Type), pName, schemaInterface)))("cannot build ts link"),
Docs: elsedie(url.JoinPath(docsBaseURL, category, cp.MachineName, "schema-reference"))("cannot build docs link"),
}
}
func grafanaMaturityAttrCount(sch cue.Value) int {
const attr = "grafanamaturity"
aw := new(kindsysreport.AttributeWalker)
return aw.Count(sch, attr)[attr]
}
func findCodeOwners(of kindsysreport.CodeOwnersFinder, links KindLinks) []string {
owners := elsedie(of.FindFor([]string{
toLocalPath(links.Schema),
toLocalPath(links.Go),
toLocalPath(links.Ts),
}...))("cannot find code owners")
sort.Strings(owners)
return owners
}
func machinize(s string) string {
return strings.Map(func(r rune) rune {
switch {
case r >= 'a' && r <= 'z':
fallthrough
case r >= '0' && r <= '9':
fallthrough
case r == '_':
return r
case r >= 'A' && r <= 'Z':
return r + 32
case r == '-':
return '_'
default:
return -1
}
}, s)
}
func toCamelCase(s string) string {
return strings.ToLower(string(s[0])) + s[1:]
}
func toLocalPath(s string) string {
return strings.Replace(s, repoBaseURL+"/", "", 1)
}
type reportJenny struct{}
func (reportJenny) JennyName() string {
return "ReportJenny"
}
func elsedie[T any](t T, err error) func(msg string) T {
if err != nil {
return func(msg string) T {
fmt.Fprintf(os.Stderr, "%s: %s\n", msg, err)
os.Exit(1)
return t
}
}
return func(msg string) T {
return t
}
}
func die(err error) {
fmt.Fprint(os.Stderr, err, "\n")
os.Exit(1)
}

File diff suppressed because it is too large Load Diff

View File

@ -1,61 +0,0 @@
package kindsysreport
import (
"os"
"path/filepath"
"github.com/hmarr/codeowners"
)
type CodeOwnersFinder struct {
ruleset codeowners.Ruleset
}
func NewCodeOwnersFinder(groot string) (CodeOwnersFinder, error) {
//nolint:gosec
file, err := os.Open(filepath.Join(groot, ".github", "CODEOWNERS"))
if err != nil {
return CodeOwnersFinder{}, err
}
ruleset, err := codeowners.ParseFile(file)
if err != nil {
return CodeOwnersFinder{}, err
}
return CodeOwnersFinder{
ruleset: ruleset,
}, nil
}
func (f CodeOwnersFinder) FindFor(pp ...string) ([]string, error) {
if len(f.ruleset) == 0 {
return nil, nil
}
// Set, to avoid duplicates
m := make(map[string]struct{})
for _, p := range pp {
r, err := f.ruleset.Match(p)
if err != nil {
return nil, err
}
// No rule found for path p
if r == nil {
continue
}
for _, o := range r.Owners {
m[o.Value] = struct{}{}
}
}
result := make([]string, 0, len(m))
for k := range m {
result = append(result, k)
}
return result, nil
}

View File

@ -51,9 +51,6 @@ func main() {
codegen.PluginTreeListJenny(),
codegen.PluginGoTypesJenny("pkg/tsdb"),
codegen.PluginTSTypesJenny("public/app/plugins", adaptToPipeline(corecodegen.TSTypesJenny{})),
kind2pd(rt, corecodegen.DocsJenny(
filepath.Join("docs", "sources", "developers", "kinds", "composable"),
)),
codegen.PluginTSEachMajor(rt),
)