Chore: Hacky first pass on generating composable kinds within grafana/schema (#64723)

* Super hacky first pass on gen types

* First sketchy pass at generated compo kinds in TS, grok-style

* Merge fix

* Create jenny for MajorsOrX for plugins

* Re-generate files with imports

* Delete invalid generated file

* Fix cue

* Update go.mod

* Update schemas

* Fix go-imports

* Regenerate cue files

---------

Co-authored-by: spinillos <selenepinillos@gmail.com>
This commit is contained in:
sam boyer 2023-05-30 08:56:18 -04:00 committed by GitHub
parent 12dc56ad0c
commit 09895c26b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
77 changed files with 6052 additions and 33 deletions

View File

@ -0,0 +1,28 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,35 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,19 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,174 @@
---
keywords:
- grafana
- schema
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 |
|---------------------|-----------------------------------------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `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 |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `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`. |

View File

@ -0,0 +1,75 @@
---
keywords:
- grafana
- schema
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`. |
| `minVizHeight` | uint32 | **Yes** | `10` | |
| `minVizWidth` | uint32 | **Yes** | `0` | |
| `showUnfilled` | boolean | **Yes** | `true` | |
| `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

@ -0,0 +1,19 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,35 @@
---
keywords:
- grafana
- schema
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 | | |

View File

@ -0,0 +1,26 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,37 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,278 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,72 @@
---
keywords:
- grafana
- schema
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 |
|------------------------|-------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `showThresholdLabels` | boolean | **Yes** | `false` | |
| `showThresholdMarkers` | 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

@ -0,0 +1,92 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,19 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,27 @@
---
keywords:
- grafana
- schema
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 |

View File

@ -0,0 +1,232 @@
---
keywords:
- grafana
- schema
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 |
|--------------|---------|----------|---------|----------------------------------------------------------------|
| `show` | boolean | **Yes** | | Controls if the tooltip is shown |
| `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` | [HeatmapTooltip](#heatmaptooltip) | **Yes** | | 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 |
|---------------------|-----------------------------------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `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 |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `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: [](#), [](#). | | |

View File

@ -0,0 +1,138 @@
---
keywords:
- grafana
- schema
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 |
|---------------------|-----------------------------------------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `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 |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `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 |
| `bucketOffset` | int32 | No | `0` | Offset buckets by this amount |
| `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`. |

View File

@ -0,0 +1,33 @@
---
keywords:
- grafana
- schema
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** | | |
| `showTime` | boolean | **Yes** | | |
| `sortOrder` | string | **Yes** | | Possible values are: `Descending`, `Ascending`. |
| `wrapLogMessage` | boolean | **Yes** | | |

View File

@ -0,0 +1,30 @@
---
keywords:
- grafana
- schema
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 | | Used to scale the interval value. |

View File

@ -0,0 +1,27 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,52 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,25 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,147 @@
---
keywords:
- grafana
- schema
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`. |
### 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

@ -0,0 +1,31 @@
---
keywords:
- grafana
- schema
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 |

View File

@ -0,0 +1,74 @@
---
keywords:
- grafana
- schema
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`. |
| `textMode` | string | **Yes** | | TODO docs<br/>Possible values are: `auto`, `value`, `value_and_name`, `name`, `none`. |
| `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

@ -0,0 +1,112 @@
---
keywords:
- grafana
- schema
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`. |

View File

@ -0,0 +1,111 @@
---
keywords:
- grafana
- schema
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`. |

View File

@ -0,0 +1,48 @@
---
keywords:
- grafana
- schema
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 |
|-----------|--------------------|----------|---------|-------------|
| `Options` | [object](#options) | **Yes** | | |
### 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

@ -0,0 +1,19 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,111 @@
---
keywords:
- grafana
- schema
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 |
| `errorType` | string | No | | Possible values are: `server_panic`, `frontend_exception`, `frontend_observable`. |
| `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 | | |
| `type` | string | No | | Possible values are: `random`, `response`, `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`. |
| `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

@ -0,0 +1,41 @@
---
keywords:
- grafana
- schema
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

@ -0,0 +1,224 @@
---
keywords:
- grafana
- schema
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 |
|---------------------|-----------------------------------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `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 |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `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`. |

View File

@ -0,0 +1,216 @@
---
keywords:
- grafana
- schema
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 |
|---------------------|-----------------------------------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `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 |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `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`. |

View File

@ -0,0 +1,229 @@
---
keywords:
- grafana
- schema
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 |
|-----------------------|--------------------------------|----------|---------|---------------------------------------------------------|
| `Options` | [object](#options) | **Yes** | | |
| `ScatterFieldConfig` | [object](#scatterfieldconfig) | **Yes** | | |
| `ScatterSeriesConfig` | [object](#scatterseriesconfig) | **Yes** | | |
| `ScatterShow` | string | **Yes** | | Possible values are: `points`, `lines`, `points+lines`. |
| `SeriesMapping` | string | **Yes** | | Possible values are: `auto`, `manual`. |
| `XYDimensionConfig` | [object](#xydimensionconfig) | **Yes** | | |
### Options
It extends [OptionsWithLegend](#optionswithlegend) and [OptionsWithTooltip](#optionswithtooltip).
| Property | Type | Required | Default | Description |
|-----------------|-----------------------------------------------|----------|---------|----------------------------------------------------------------------------|
| `dims` | [XYDimensionConfig](#xydimensionconfig) | **Yes** | | |
| `legend` | [VizLegendOptions](#vizlegendoptions) | **Yes** | | *(Inherited from [OptionsWithLegend](#optionswithlegend))*<br/>TODO docs |
| `series` | [ScatterSeriesConfig](#scatterseriesconfig)[] | **Yes** | | |
| `tooltip` | [VizTooltipOptions](#viztooltipoptions) | **Yes** | | *(Inherited from [OptionsWithTooltip](#optionswithtooltip))*<br/>TODO docs |
| `seriesMapping` | string | No | | 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`. |
### ScatterSeriesConfig
It extends [ScatterFieldConfig](#scatterfieldconfig).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| `axisCenteredZero` | boolean | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))* |
| `axisColorMode` | string | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))*<br/>TODO docs<br/>Possible values are: `text`, `series`. |
| `axisGridShow` | boolean | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))* |
| `axisLabel` | string | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))* |
| `axisPlacement` | string | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `top`, `right`, `bottom`, `left`, `hidden`. |
| `axisSoftMax` | number | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))* |
| `axisSoftMin` | number | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))* |
| `axisWidth` | number | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))* |
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))*<br/>TODO docs |
| `labelValue` | [TextDimensionConfig](#textdimensionconfig) | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))* |
| `label` | string | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))*<br/>TODO docs<br/>Possible values are: `auto`, `never`, `always`. |
| `lineColor` | [ColorDimensionConfig](#colordimensionconfig) | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))* |
| `lineStyle` | [LineStyle](#linestyle) | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))*<br/>TODO docs |
| `lineWidth` | integer | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))*<br/>Constraint: `>=0 & <=2147483647`. |
| `name` | string | No | | |
| `pointColor` | [ColorDimensionConfig](#colordimensionconfig) | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))* |
| `pointSize` | [ScaleDimensionConfig](#scaledimensionconfig) | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))* |
| `scaleDistribution` | [ScaleDistributionConfig](#scaledistributionconfig) | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))*<br/>TODO docs |
| `show` | string | No | | *(Inherited from [ScatterFieldConfig](#scatterfieldconfig))*<br/>Possible values are: `points`, `lines`, `points+lines`. |
| `x` | string | No | | |
| `y` | string | 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** | | |
### 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`. |
### 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 | | |
### ScatterFieldConfig
It extends [HideableFieldConfig](#hideablefieldconfig) and [AxisConfig](#axisconfig).
| Property | Type | Required | Default | Description |
|---------------------|-----------------------------------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `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 |
|---------------------|-----------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------|
| `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 |
### HideableFieldConfig
TODO docs
| Property | Type | Required | Default | Description |
|------------|---------------------------------------|----------|---------|-------------|
| `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | TODO docs |
### 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 | | |
### XYDimensionConfig
| Property | Type | Required | Default | Description |
|-----------|----------|----------|---------|-----------------------------------|
| `frame` | integer | **Yes** | | Constraint: `>=0 & <=2147483647`. |
| `exclude` | string[] | No | | |
| `x` | string | No | | |

4
go.mod
View File

@ -59,6 +59,7 @@ require (
github.com/google/wire v0.5.0
github.com/gorilla/websocket v1.5.0
github.com/grafana/alerting v0.0.0-20230428095912-33c5aa68a5ba
github.com/grafana/cuetsy v0.1.9
github.com/grafana/grafana-aws-sdk v0.15.0
github.com/grafana/grafana-azure-sdk-go v1.7.0
github.com/grafana/grafana-plugin-sdk-go v0.162.0
@ -94,7 +95,7 @@ require (
github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf
github.com/ua-parser/uap-go v0.0.0-20211112212520-00c877edfe0f
github.com/uber/jaeger-client-go v2.29.1+incompatible // indirect
github.com/urfave/cli/v2 v2.24.4
github.com/urfave/cli/v2 v2.25.0
github.com/vectordotdev/go-datemath v0.1.1-0.20220323213446-f3954d0b18ae
github.com/yalue/merged_fs v1.2.2
github.com/yudai/gojsondiff v1.0.0
@ -260,7 +261,6 @@ require (
github.com/alicebob/miniredis/v2 v2.30.1
github.com/dave/dst v0.27.2
github.com/go-jose/go-jose/v3 v3.0.0
github.com/grafana/cuetsy v0.1.8
github.com/grafana/dataplane/examples v0.0.0-20230404174214-4d6fd58a18ad
github.com/grafana/dataplane/sdata v0.0.6
github.com/grafana/go-mssqldb v0.9.1

11
go.sum
View File

@ -1299,7 +1299,6 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
@ -1361,8 +1360,8 @@ github.com/grafana/alerting v0.0.0-20230428095912-33c5aa68a5ba h1:aNTu22ojw4XY24
github.com/grafana/alerting v0.0.0-20230428095912-33c5aa68a5ba/go.mod h1:5edgy6tQY4+W2wuJdi8g2GjbVmpJufguy7QGIRl2q4o=
github.com/grafana/codejen v0.0.3 h1:tAWxoTUuhgmEqxJPOLtJoxlPBbMULFwKFOcRsPRPXDw=
github.com/grafana/codejen v0.0.3/go.mod h1:zmwwM/DRyQB7pfuBjTWII3CWtxcXh8LTwAYGfDfpR6s=
github.com/grafana/cuetsy v0.1.8 h1:l0AKXfHr0clu6qPirirDzNC/W5mqq5gG7iruOVolG34=
github.com/grafana/cuetsy v0.1.8/go.mod h1:KCOoGIutYLt/5EY9M7jXdbfjSbZ/CNhRkl+yVeG6BFc=
github.com/grafana/cuetsy v0.1.9 h1:EwT8BqHoC0B3B4Y6Lg/D1aeYUKnQC1+2jjOHNsOuUfU=
github.com/grafana/cuetsy v0.1.9/go.mod h1:Ix97+CPD8ws9oSSxR3/Lf4ahU1I4Np83kjJmDVnLZvc=
github.com/grafana/dataplane/examples v0.0.0-20230404174214-4d6fd58a18ad h1:bROIOQEkRlxAt+Epn9Pos8ytkVqoIAvnaUZOAb7EgEU=
github.com/grafana/dataplane/examples v0.0.0-20230404174214-4d6fd58a18ad/go.mod h1:h5YwY8s407/17XF5/dS8XrUtsTVV2RnuW8+m1Mp46mg=
github.com/grafana/dataplane/sdata v0.0.6 h1:Ejlj8d1Hvy/uDLeI4sOvL34Y8WLlVDd9iN270F+8aTw=
@ -2440,8 +2439,8 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijb
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8=
github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8=
github.com/urfave/cli/v2 v2.24.4 h1:0gyJJEBYtCV87zI/x2nZCPyDxD51K6xM8SkwjHFCNEU=
github.com/urfave/cli/v2 v2.24.4/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
github.com/urfave/cli/v2 v2.25.0 h1:ykdZKuQey2zq0yin/l7JOm9Mh+pg72ngYMeB0ABn6q8=
github.com/urfave/cli/v2 v2.25.0/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
@ -2776,7 +2775,6 @@ golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.6.0-dev.0.20220818022119-ed83ed61efb9/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
@ -3134,7 +3132,6 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=

View File

@ -0,0 +1,25 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
export interface Options {
/**
* Name of the alertmanager used as a source for alerts
*/
alertmanager: string;
/**
* Expand all alert groups by default
*/
expandAll: boolean;
/**
* Comma-separated list of values used to filter alert results
*/
labels: string;
}

View File

@ -0,0 +1,36 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
export interface Options {
limit: number;
navigateAfter: string;
navigateBefore: string;
navigateToPanel: boolean;
onlyFromThisDashboard: boolean;
onlyInTimeRange: boolean;
showTags: boolean;
showTime: boolean;
showUser: boolean;
tags: Array<string>;
}
export const defaultOptions: Partial<Options> = {
limit: 10,
navigateAfter: '10m',
navigateBefore: '10m',
navigateToPanel: true,
onlyFromThisDashboard: false,
onlyInTimeRange: false,
showTags: true,
showTime: true,
showUser: true,
tags: [],
};

View File

@ -0,0 +1,363 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export interface AzureMonitorQuery extends common.DataQuery {
/**
* Azure Monitor Logs sub-query properties.
*/
azureLogAnalytics?: AzureLogsQuery;
/**
* Azure Monitor Metrics sub-query properties.
*/
azureMonitor?: AzureMetricQuery;
/**
* Azure Resource Graph sub-query properties.
*/
azureResourceGraph?: AzureResourceGraphQuery;
/**
* Application Insights Traces sub-query properties.
*/
azureTraces?: AzureTracesQuery;
/**
* @deprecated Legacy template variable support.
*/
grafanaTemplateVariableFn?: GrafanaTemplateVariableQuery;
namespace?: string;
/**
* Azure Monitor query type.
* queryType: #AzureQueryType
*/
region?: string;
resource?: string;
/**
* Template variables params. These exist for backwards compatiblity with legacy template variables.
*/
resourceGroup?: string;
/**
* Azure subscription containing the resource(s) to be queried.
*/
subscription?: string;
/**
* Subscriptions to be queried via Azure Resource Graph.
*/
subscriptions?: Array<string>;
}
export const defaultAzureMonitorQuery: Partial<AzureMonitorQuery> = {
subscriptions: [],
};
/**
* Defines the supported queryTypes. GrafanaTemplateVariableFn is deprecated
*/
export enum AzureQueryType {
AzureMonitor = 'Azure Monitor',
AzureResourceGraph = 'Azure Resource Graph',
AzureTraces = 'Azure Traces',
GrafanaTemplateVariableFn = 'Grafana Template Variable Function',
LocationsQuery = 'Azure Regions',
LogAnalytics = 'Azure Log Analytics',
MetricNamesQuery = 'Azure Metric Names',
NamespacesQuery = 'Azure Namespaces',
ResourceGroupsQuery = 'Azure Resource Groups',
ResourceNamesQuery = 'Azure Resource Names',
SubscriptionsQuery = 'Azure Subscriptions',
WorkspacesQuery = 'Azure Workspaces',
}
export interface AzureMetricQuery {
/**
* The aggregation to be used within the query. Defaults to the primaryAggregationType defined by the metric.
*/
aggregation?: string;
/**
* Aliases can be set to modify the legend labels. e.g. {{ resourceGroup }}. See docs for more detail.
*/
alias?: string;
/**
* Time grains that are supported by the metric.
*/
allowedTimeGrainsMs?: Array<number>;
/**
* Used as the value for the metricNamespace property when it's different from the resource namespace.
*/
customNamespace?: string;
/**
* @deprecated This property was migrated to dimensionFilters and should only be accessed in the migration
*/
dimension?: string;
/**
* @deprecated This property was migrated to dimensionFilters and should only be accessed in the migration
*/
dimensionFilter?: string;
/**
* Filters to reduce the set of data returned. Dimensions that can be filtered on are defined by the metric.
*/
dimensionFilters?: Array<AzureMetricDimension>;
/**
* @deprecated Use metricNamespace instead
*/
metricDefinition?: string;
/**
* The metric to query data for within the specified metricNamespace. e.g. UsedCapacity
*/
metricName?: string;
/**
* metricNamespace is used as the resource type (or resource namespace).
* It's usually equal to the target metric namespace. e.g. microsoft.storage/storageaccounts
* Kept the name of the variable as metricNamespace to avoid backward incompatibility issues.
*/
metricNamespace?: string;
/**
* The Azure region containing the resource(s).
*/
region?: string;
/**
* @deprecated Use resources instead
*/
resourceGroup?: string;
/**
* @deprecated Use resources instead
*/
resourceName?: string;
/**
* @deprecated Use resourceGroup, resourceName and metricNamespace instead
*/
resourceUri?: string;
/**
* Array of resource URIs to be queried.
*/
resources?: Array<AzureMonitorResource>;
/**
* The granularity of data points to be queried. Defaults to auto.
*/
timeGrain?: string;
/**
* @deprecated
*/
timeGrainUnit?: string;
/**
* Maximum number of records to return. Defaults to 10.
*/
top?: string;
}
export const defaultAzureMetricQuery: Partial<AzureMetricQuery> = {
allowedTimeGrainsMs: [],
dimensionFilters: [],
resources: [],
};
/**
* Azure Monitor Logs sub-query properties
*/
export interface AzureLogsQuery {
/**
* KQL query to be executed.
*/
query?: string;
/**
* @deprecated Use resources instead
*/
resource?: string;
/**
* Array of resource URIs to be queried.
*/
resources?: Array<string>;
/**
* Specifies the format results should be returned as.
*/
resultFormat?: ResultFormat;
/**
* Workspace ID. This was removed in Grafana 8, but remains for backwards compat
*/
workspace?: string;
}
export const defaultAzureLogsQuery: Partial<AzureLogsQuery> = {
resources: [],
};
/**
* Application Insights Traces sub-query properties
*/
export interface AzureTracesQuery {
/**
* Filters for property values.
*/
filters?: Array<AzureTracesFilter>;
/**
* Operation ID. Used only for Traces queries.
*/
operationId?: string;
/**
* KQL query to be executed.
*/
query?: string;
/**
* Array of resource URIs to be queried.
*/
resources?: Array<string>;
/**
* Specifies the format results should be returned as.
*/
resultFormat?: ResultFormat;
/**
* Types of events to filter by.
*/
traceTypes?: Array<string>;
}
export const defaultAzureTracesQuery: Partial<AzureTracesQuery> = {
filters: [],
resources: [],
traceTypes: [],
};
export interface AzureTracesFilter {
/**
* Values to filter by.
*/
filters: Array<string>;
/**
* Comparison operator to use. Either equals or not equals.
*/
operation: string;
/**
* Property name, auto-populated based on available traces.
*/
property: string;
}
export const defaultAzureTracesFilter: Partial<AzureTracesFilter> = {
filters: [],
};
export enum ResultFormat {
Table = 'table',
TimeSeries = 'time_series',
Trace = 'trace',
}
export interface AzureResourceGraphQuery {
/**
* Azure Resource Graph KQL query to be executed.
*/
query?: string;
/**
* Specifies the format results should be returned as. Defaults to table.
*/
resultFormat?: string;
}
export interface AzureMonitorResource {
metricNamespace?: string;
region?: string;
resourceGroup?: string;
resourceName?: string;
subscription?: string;
}
export interface AzureMetricDimension {
/**
* Name of Dimension to be filtered on.
*/
dimension?: string;
/**
* @deprecated filter is deprecated in favour of filters to support multiselect.
*/
filter?: string;
/**
* Values to match with the filter.
*/
filters?: Array<string>;
/**
* String denoting the filter operation. Supports 'eq' - equals,'ne' - not equals, 'sw' - starts with. Note that some dimensions may not support all operators.
*/
operator?: string;
}
export const defaultAzureMetricDimension: Partial<AzureMetricDimension> = {
filters: [],
};
export type GrafanaTemplateVariableQueryType = ('AppInsightsMetricNameQuery' | 'AppInsightsGroupByQuery' | 'SubscriptionsQuery' | 'ResourceGroupsQuery' | 'ResourceNamesQuery' | 'MetricNamespaceQuery' | 'MetricNamesQuery' | 'WorkspacesQuery' | 'UnknownQuery');
export interface BaseGrafanaTemplateVariableQuery {
rawQuery?: string;
}
export interface UnknownQuery extends BaseGrafanaTemplateVariableQuery {
kind: 'UnknownQuery';
}
export interface AppInsightsMetricNameQuery extends BaseGrafanaTemplateVariableQuery {
kind: 'AppInsightsMetricNameQuery';
}
export interface AppInsightsGroupByQuery extends BaseGrafanaTemplateVariableQuery {
kind: 'AppInsightsGroupByQuery';
metricName: string;
}
export interface SubscriptionsQuery extends BaseGrafanaTemplateVariableQuery {
kind: 'SubscriptionsQuery';
}
export interface ResourceGroupsQuery extends BaseGrafanaTemplateVariableQuery {
kind: 'ResourceGroupsQuery';
subscription: string;
}
export interface ResourceNamesQuery extends BaseGrafanaTemplateVariableQuery {
kind: 'ResourceNamesQuery';
metricNamespace: string;
resourceGroup: string;
subscription: string;
}
export interface MetricNamespaceQuery extends BaseGrafanaTemplateVariableQuery {
kind: 'MetricNamespaceQuery';
metricNamespace?: string;
resourceGroup: string;
resourceName?: string;
subscription: string;
}
/**
* @deprecated Use MetricNamespaceQuery instead
*/
export interface MetricDefinitionsQuery extends BaseGrafanaTemplateVariableQuery {
kind: 'MetricDefinitionsQuery';
metricNamespace?: string;
resourceGroup: string;
resourceName?: string;
subscription: string;
}
export interface MetricNamesQuery extends BaseGrafanaTemplateVariableQuery {
kind: 'MetricNamesQuery';
metricNamespace: string;
resourceGroup: string;
resourceName: string;
subscription: string;
}
export interface WorkspacesQuery extends BaseGrafanaTemplateVariableQuery {
kind: 'WorkspacesQuery';
subscription: string;
}
export type GrafanaTemplateVariableQuery = (AppInsightsMetricNameQuery | AppInsightsGroupByQuery | SubscriptionsQuery | ResourceGroupsQuery | ResourceNamesQuery | MetricNamespaceQuery | MetricDefinitionsQuery | MetricNamesQuery | WorkspacesQuery | UnknownQuery);
export interface AzureMonitorDataQuery {}

View File

@ -0,0 +1,103 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export interface Options extends common.OptionsWithLegend, common.OptionsWithTooltip, common.OptionsWithTextFormatting {
/**
* Controls the radius of each bar.
*/
barRadius?: number;
/**
* Controls the width of bars. 1 = Max width, 0 = Min width.
*/
barWidth: number;
/**
* Use the color value for a sibling field to color each bar value.
*/
colorByField?: string;
/**
* Enables mode which highlights the entire bar area and shows tooltip when cursor
* hovers over highlighted area
*/
fullHighlight: boolean;
/**
* Controls the width of groups. 1 = max with, 0 = min width.
*/
groupWidth: number;
/**
* Controls the orientation of the bar chart, either vertical or horizontal.
*/
orientation: common.VizOrientation;
/**
* This controls whether values are shown on top or to the left of bars.
*/
showValue: common.VisibilityMode;
/**
* Controls whether bars are stacked or not, either normally or in percent mode.
*/
stacking: common.StackingMode;
/**
* Manually select which field from the dataset to represent the x field.
*/
xField?: string;
/**
* Sets the max length that a label can have before it is truncated.
*/
xTickLabelMaxLength: number;
/**
* Controls the rotation of the x axis labels.
*/
xTickLabelRotation: number;
/**
* Controls the spacing between x axis labels.
* negative values indicate backwards skipping behavior
*/
xTickLabelSpacing?: number;
}
export const defaultOptions: Partial<Options> = {
barRadius: 0,
barWidth: 0.97,
fullHighlight: false,
groupWidth: 0.7,
orientation: common.VizOrientation.Auto,
showValue: common.VisibilityMode.Auto,
stacking: common.StackingMode.None,
xTickLabelRotation: 0,
xTickLabelSpacing: 0,
};
export interface FieldConfig extends common.AxisConfig, common.HideableFieldConfig {
/**
* Controls the fill opacity of the bars.
*/
fillOpacity?: number;
/**
* 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.
* Gradient appearance is influenced by the Fill opacity setting.
*/
gradientMode?: common.GraphGradientMode;
/**
* Controls line width of the bars.
*/
lineWidth?: number;
/**
* Threshold rendering
*/
thresholdsStyle?: common.GraphThresholdsStyleConfig;
}
export const defaultFieldConfig: Partial<FieldConfig> = {
fillOpacity: 80,
gradientMode: common.GraphGradientMode.None,
lineWidth: 1,
};

View File

@ -0,0 +1,28 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export interface Options extends common.SingleStatBaseOptions {
displayMode: common.BarGaugeDisplayMode;
minVizHeight: number;
minVizWidth: number;
showUnfilled: boolean;
valueMode: common.BarGaugeValueMode;
}
export const defaultOptions: Partial<Options> = {
displayMode: common.BarGaugeDisplayMode.Gradient,
minVizHeight: 10,
minVizWidth: 0,
showUnfilled: true,
valueMode: common.BarGaugeValueMode.Color,
};

View File

@ -0,0 +1,308 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export interface MetricStat {
/**
* The ID of the AWS account to query for the metric, specifying `all` will query all accounts that the monitoring account is permitted to query.
*/
accountId?: string;
/**
* The dimensions of the metric
*/
dimensions?: Dimensions;
/**
* Only show metrics that exactly match all defined dimension names.
*/
matchExact?: boolean;
/**
* Name of the metric
*/
metricName?: string;
/**
* A namespace is a container for CloudWatch metrics. Metrics in different namespaces are isolated from each other, so that metrics from different applications are not mistakenly aggregated into the same statistics. For example, Amazon EC2 uses the AWS/EC2 namespace.
*/
namespace: string;
/**
* The length of time associated with a specific Amazon CloudWatch statistic. Can be specified by a number of seconds, 'auto', or as a duration string e.g. '15m' being 15 minutes
*/
period?: string;
/**
* AWS region to query for the metric
*/
region: string;
/**
* Metric data aggregations over specified periods of time. For detailed definitions of the statistics supported by CloudWatch, see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.
*/
statistic?: string;
/**
* @deprecated use statistic
*/
statistics?: Array<string>;
}
export const defaultMetricStat: Partial<MetricStat> = {
statistics: [],
};
/**
* A name/value pair that is part of the identity of a metric. For example, you can get statistics for a specific EC2 instance by specifying the InstanceId dimension when you search for metrics.
*/
export type Dimensions = Record<string, (string | Array<string>)>;
/**
* Shape of a CloudWatch Metrics query
*/
export interface CloudWatchMetricsQuery extends common.DataQuery, MetricStat {
/**
* Deprecated: use label
* @deprecated use label
*/
alias?: string;
/**
* Math expression query
*/
expression?: string;
/**
* ID can be used to reference other queries in math expressions. The ID can include numbers, letters, and underscore, and must start with a lowercase letter.
*/
id: string;
/**
* Change the time series legend names using dynamic labels. See https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html for more details.
*/
label?: string;
/**
* Whether to use the query builder or code editor to create the query
*/
metricEditorMode?: MetricEditorMode;
/**
* Whether to use a metric search or metric query. Metric query is referred to as "Metrics Insights" in the AWS console.
*/
metricQueryType?: MetricQueryType;
/**
* Whether a query is a Metrics, Logs, or Annotations query
*/
queryMode?: CloudWatchQueryMode;
/**
* When the metric query type is `metricQueryType` is set to `Query` and the `metricEditorMode` is set to `Builder`, this field is used to build up an object representation of a SQL query.
*/
sql?: SQLExpression;
/**
* When the metric query type is `metricQueryType` is set to `Query`, this field is used to specify the query string.
*/
sqlExpression?: string;
}
export type CloudWatchQueryMode = ('Metrics' | 'Logs' | 'Annotations');
export enum MetricQueryType {
Query = 1,
Search = 0,
}
export enum MetricEditorMode {
Builder = 0,
Code = 1,
}
export interface SQLExpression {
/**
* FROM part of the SQL expression
*/
from?: (QueryEditorPropertyExpression | QueryEditorFunctionExpression);
/**
* GROUP BY part of the SQL expression
*/
groupBy?: QueryEditorArrayExpression;
/**
* LIMIT part of the SQL expression
*/
limit?: number;
/**
* ORDER BY part of the SQL expression
*/
orderBy?: QueryEditorFunctionExpression;
/**
* The sort order of the SQL expression, `ASC` or `DESC`
*/
orderByDirection?: string;
/**
* SELECT part of the SQL expression
*/
select?: QueryEditorFunctionExpression;
/**
* WHERE part of the SQL expression
*/
where?: QueryEditorArrayExpression;
}
export interface QueryEditorFunctionExpression {
name?: string;
parameters?: Array<QueryEditorFunctionParameterExpression>;
type: QueryEditorExpressionType.Function;
}
export const defaultQueryEditorFunctionExpression: Partial<QueryEditorFunctionExpression> = {
parameters: [],
};
export enum QueryEditorExpressionType {
And = 'and',
Function = 'function',
FunctionParameter = 'functionParameter',
GroupBy = 'groupBy',
Operator = 'operator',
Or = 'or',
Property = 'property',
}
export interface QueryEditorFunctionParameterExpression {
name?: string;
type: QueryEditorExpressionType.FunctionParameter;
}
export interface QueryEditorPropertyExpression {
property: QueryEditorProperty;
type: QueryEditorExpressionType.Property;
}
export interface QueryEditorGroupByExpression {
property: QueryEditorProperty;
type: QueryEditorExpressionType.GroupBy;
}
export interface QueryEditorOperatorExpression {
/**
* TS type is operator: QueryEditorOperator<QueryEditorOperatorValueType>, extended in veneer
*/
operator: QueryEditorOperator;
property: QueryEditorProperty;
type: QueryEditorExpressionType.Operator;
}
/**
* TS type is QueryEditorOperator<T extends QueryEditorOperatorValueType>, extended in veneer
*/
export interface QueryEditorOperator {
name?: string;
value?: (QueryEditorOperatorType | Array<QueryEditorOperatorType>);
}
export type QueryEditorOperatorValueType = (QueryEditorOperatorType | Array<QueryEditorOperatorType>);
export type QueryEditorOperatorType = (string | boolean | number);
export interface QueryEditorProperty {
name?: string;
type: QueryEditorPropertyType;
}
export enum QueryEditorPropertyType {
String = 'string',
}
export interface QueryEditorArrayExpression {
expressions: (Array<QueryEditorExpression> | Array<QueryEditorArrayExpression>);
type: (QueryEditorExpressionType.And | QueryEditorExpressionType.Or);
}
export type QueryEditorExpression = (QueryEditorArrayExpression | QueryEditorPropertyExpression | QueryEditorGroupByExpression | QueryEditorFunctionExpression | QueryEditorFunctionParameterExpression | QueryEditorOperatorExpression);
/**
* Shape of a CloudWatch Logs query
*/
export interface CloudWatchLogsQuery extends common.DataQuery {
/**
* The CloudWatch Logs Insights query to execute
*/
expression?: string;
id: string;
/**
* @deprecated use logGroups
*/
logGroupNames?: Array<string>;
/**
* Log groups to query
*/
logGroups?: Array<LogGroup>;
/**
* Whether a query is a Metrics, Logs, or Annotations query
*/
queryMode: CloudWatchQueryMode;
/**
* AWS region to query for the logs
*/
region: string;
/**
* Fields to group the results by, this field is automatically populated whenever the query is updated
*/
statsGroups?: Array<string>;
}
export const defaultCloudWatchLogsQuery: Partial<CloudWatchLogsQuery> = {
logGroupNames: [],
logGroups: [],
statsGroups: [],
};
export interface LogGroup {
/**
* AccountId of the log group
*/
accountId?: string;
/**
* Label of the log group
*/
accountLabel?: string;
/**
* ARN of the log group
*/
arn: string;
/**
* Name of the log group
*/
name: string;
}
/**
* Shape of a CloudWatch Annotation query
*/
/**
* TS type is CloudWatchDefaultQuery = Omit<CloudWatchLogsQuery, 'queryMode'> & CloudWatchMetricsQuery, declared in veneer
* #CloudWatchDefaultQuery: #CloudWatchLogsQuery & #CloudWatchMetricsQuery @cuetsy(kind="type")
*/
export interface CloudWatchAnnotationQuery extends common.DataQuery, MetricStat {
/**
* Use this parameter to filter the results of the operation to only those alarms
* that use a certain alarm action. For example, you could specify the ARN of
* an SNS topic to find all alarms that send notifications to that topic.
* e.g. `arn:aws:sns:us-east-1:123456789012:my-app-` would match `arn:aws:sns:us-east-1:123456789012:my-app-action`
* but not match `arn:aws:sns:us-east-1:123456789012:your-app-action`
*/
actionPrefix?: string;
/**
* An alarm name prefix. If you specify this parameter, you receive information
* about all alarms that have names that start with this prefix.
* e.g. `my-team-service-` would match `my-team-service-high-cpu` but not match `your-team-service-high-cpu`
*/
alarmNamePrefix?: string;
/**
* Enable matching on the prefix of the action name or alarm name, specify the prefixes with actionPrefix and/or alarmNamePrefix
*/
prefixMatching?: boolean;
/**
* Whether a query is a Metrics, Logs, or Annotations query
*/
queryMode: CloudWatchQueryMode;
}
export interface CloudWatchDataQuery {}

View File

@ -0,0 +1,35 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
export interface Options {
folderId?: number;
includeVars: boolean;
keepTime: boolean;
maxItems: number;
query: string;
showHeadings: boolean;
showRecentlyViewed: boolean;
showSearch: boolean;
showStarred: boolean;
tags: Array<string>;
}
export const defaultOptions: Partial<Options> = {
includeVars: false,
keepTime: false,
maxItems: 10,
query: '',
showHeadings: true,
showRecentlyViewed: false,
showSearch: false,
showStarred: true,
tags: [],
};

View File

@ -0,0 +1,18 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
export interface Options {
selectedSeries: number;
}
export const defaultOptions: Partial<Options> = {
selectedSeries: 0,
};

View File

@ -0,0 +1,29 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
export type UpdateConfig = {
render: boolean,
dataChanged: boolean,
schemaChanged: boolean,
};
export enum DebugMode {
Cursor = 'cursor',
Events = 'events',
Render = 'render',
State = 'State',
ThrowError = 'ThrowError',
}
export interface Options {
counters?: UpdateConfig;
mode: DebugMode;
}

View File

@ -0,0 +1,406 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export type BucketAggregation = (DateHistogram | Histogram | Terms | Filters | GeoHashGrid | Nested);
export type MetricAggregation = (Count | PipelineMetricAggregation | MetricAggregationWithSettings);
export type BucketAggregationType = ('terms' | 'filters' | 'geohash_grid' | 'date_histogram' | 'histogram' | 'nested');
export interface BaseBucketAggregation {
id: string;
settings?: unknown;
type: BucketAggregationType;
}
export interface BucketAggregationWithField extends BaseBucketAggregation {
field?: string;
}
export interface DateHistogram extends BucketAggregationWithField {
settings?: {
interval?: string;
min_doc_count?: string;
trimEdges?: string;
offset?: string;
timeZone?: string;
};
type: 'date_histogram';
}
export interface DateHistogramSettings {
interval?: string;
min_doc_count?: string;
offset?: string;
timeZone?: string;
trimEdges?: string;
}
export interface Histogram extends BucketAggregationWithField {
settings?: {
interval?: string;
min_doc_count?: string;
};
type: 'histogram';
}
export interface HistogramSettings {
interval?: string;
min_doc_count?: string;
}
export type TermsOrder = ('desc' | 'asc');
export interface Nested extends BucketAggregationWithField {
settings?: Record<string, unknown>;
type: 'nested';
}
export interface Terms extends BucketAggregationWithField {
settings?: {
order?: TermsOrder;
size?: string;
min_doc_count?: string;
orderBy?: string;
missing?: string;
};
type: 'terms';
}
export interface TermsSettings {
min_doc_count?: string;
missing?: string;
order?: TermsOrder;
orderBy?: string;
size?: string;
}
export interface Filters extends BaseBucketAggregation {
settings?: {
filters?: Array<Filter>;
};
type: 'filters';
}
export type Filter = {
query: string,
label: string,
};
export interface FiltersSettings {
filters?: Array<Filter>;
}
export const defaultFiltersSettings: Partial<FiltersSettings> = {
filters: [],
};
export interface GeoHashGrid extends BucketAggregationWithField {
settings?: {
precision?: string;
};
type: 'geohash_grid';
}
export interface GeoHashGridSettings {
precision?: string;
}
export type PipelineMetricAggregationType = ('moving_avg' | 'moving_fn' | 'derivative' | 'serial_diff' | 'cumulative_sum' | 'bucket_script');
export type MetricAggregationType = ('count' | 'avg' | 'sum' | 'min' | 'max' | 'extended_stats' | 'percentiles' | 'cardinality' | 'raw_document' | 'raw_data' | 'logs' | 'rate' | 'top_metrics' | PipelineMetricAggregationType);
export interface BaseMetricAggregation {
hide?: boolean;
id: string;
type: MetricAggregationType;
}
export interface PipelineVariable {
name: string;
pipelineAgg: string;
}
export interface MetricAggregationWithField extends BaseMetricAggregation {
field?: string;
}
export interface MetricAggregationWithMissingSupport extends BaseMetricAggregation {
settings?: {
missing?: string;
};
}
export type InlineScript = (string | {
inline?: string
});
export interface MetricAggregationWithInlineScript extends BaseMetricAggregation {
settings?: {
script?: InlineScript;
};
}
export interface Count extends BaseMetricAggregation {
type: 'count';
}
export interface Average extends MetricAggregationWithField, MetricAggregationWithMissingSupport, MetricAggregationWithInlineScript {
field?: string;
settings?: {
script?: InlineScript;
missing?: string;
};
type: 'avg';
}
export interface Sum extends MetricAggregationWithField, MetricAggregationWithInlineScript {
field?: string;
settings?: {
script?: InlineScript;
missing?: string;
};
type: 'sum';
}
export interface Max extends MetricAggregationWithField, MetricAggregationWithInlineScript {
field?: string;
settings?: {
script?: InlineScript;
missing?: string;
};
type: 'max';
}
export interface Min extends MetricAggregationWithField, MetricAggregationWithInlineScript {
field?: string;
settings?: {
script?: InlineScript;
missing?: string;
};
type: 'min';
}
export type ExtendedStatMetaType = ('avg' | 'min' | 'max' | 'sum' | 'count' | 'std_deviation' | 'std_deviation_bounds_upper' | 'std_deviation_bounds_lower');
export interface ExtendedStat {
label: string;
value: ExtendedStatMetaType;
}
export interface ExtendedStats extends MetricAggregationWithField, MetricAggregationWithInlineScript {
field?: string;
meta?: Record<string, unknown>;
settings?: {
script?: InlineScript;
missing?: string;
sigma?: string;
};
type: 'extended_stats';
}
export interface Percentiles extends MetricAggregationWithField, MetricAggregationWithInlineScript {
field?: string;
settings?: {
script?: InlineScript;
missing?: string;
percents?: Array<string>;
};
type: 'percentiles';
}
export interface UniqueCount extends MetricAggregationWithField {
settings?: {
precision_threshold?: string;
missing?: string;
};
type: 'cardinality';
}
export interface RawDocument extends BaseMetricAggregation {
settings?: {
size?: string;
};
type: 'raw_document';
}
export interface RawData extends BaseMetricAggregation {
settings?: {
size?: string;
};
type: 'raw_data';
}
export interface Logs extends BaseMetricAggregation {
settings?: {
limit?: string;
};
type: 'logs';
}
export interface Rate extends MetricAggregationWithField {
settings?: {
unit?: string;
mode?: string;
};
type: 'rate';
}
export interface BasePipelineMetricAggregation extends MetricAggregationWithField {
pipelineAgg?: string;
type: PipelineMetricAggregationType;
}
export interface PipelineMetricAggregationWithMultipleBucketPaths extends BaseMetricAggregation {
pipelineVariables?: Array<PipelineVariable>;
}
export const defaultPipelineMetricAggregationWithMultipleBucketPaths: Partial<PipelineMetricAggregationWithMultipleBucketPaths> = {
pipelineVariables: [],
};
export type MovingAverageModel = ('simple' | 'linear' | 'ewma' | 'holt' | 'holt_winters');
export interface MovingAverageModelOption {
label: string;
value: MovingAverageModel;
}
export interface BaseMovingAverageModelSettings {
model: MovingAverageModel;
predict: string;
window: string;
}
export interface MovingAverageSimpleModelSettings extends BaseMovingAverageModelSettings {
model: 'simple';
}
export interface MovingAverageLinearModelSettings extends BaseMovingAverageModelSettings {
model: 'linear';
}
export interface MovingAverageEWMAModelSettings extends BaseMovingAverageModelSettings {
minimize: boolean;
model: 'ewma';
settings?: {
alpha?: string;
};
}
export interface MovingAverageHoltModelSettings extends BaseMovingAverageModelSettings {
minimize: boolean;
model: 'holt';
settings: {
alpha?: string;
beta?: string;
};
}
export interface MovingAverageHoltWintersModelSettings extends BaseMovingAverageModelSettings {
minimize: boolean;
model: 'holt_winters';
settings: {
alpha?: string;
beta?: string;
gamma?: string;
period?: string;
pad?: boolean;
};
}
/**
* #MovingAverage's settings are overridden in types.ts
*/
export interface MovingAverage extends BasePipelineMetricAggregation {
settings?: Record<string, unknown>;
type: 'moving_avg';
}
export interface MovingFunction extends BasePipelineMetricAggregation {
settings?: {
window?: string;
script?: InlineScript;
shift?: string;
};
type: 'moving_fn';
}
export interface Derivative extends BasePipelineMetricAggregation {
settings?: {
unit?: string;
};
type: 'derivative';
}
export interface SerialDiff extends BasePipelineMetricAggregation {
settings?: {
lag?: string;
};
type: 'serial_diff';
}
export interface CumulativeSum extends BasePipelineMetricAggregation {
settings?: {
format?: string;
};
type: 'cumulative_sum';
}
export interface BucketScript extends PipelineMetricAggregationWithMultipleBucketPaths {
settings?: {
script?: InlineScript;
};
type: 'bucket_script';
}
export interface TopMetrics extends BaseMetricAggregation {
settings?: {
order?: string;
orderBy?: string;
metrics?: Array<string>;
};
type: 'top_metrics';
}
export type PipelineMetricAggregation = (MovingAverage | Derivative | CumulativeSum | BucketScript);
export type MetricAggregationWithSettings = (BucketScript | CumulativeSum | Derivative | SerialDiff | RawData | RawDocument | UniqueCount | Percentiles | ExtendedStats | Min | Max | Sum | Average | MovingAverage | MovingFunction | Logs | Rate | TopMetrics);
export interface ElasticsearchDataQuery extends common.DataQuery {
/**
* Alias pattern
*/
alias?: string;
/**
* List of bucket aggregations
*/
bucketAggs?: Array<BucketAggregation>;
/**
* List of metric aggregations
*/
metrics?: Array<MetricAggregation>;
/**
* Lucene query
*/
query?: string;
/**
* Name of time field
*/
timeField?: string;
}
export const defaultElasticsearchDataQuery: Partial<ElasticsearchDataQuery> = {
bucketAggs: [],
metrics: [],
};

View File

@ -0,0 +1,22 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export interface Options extends common.SingleStatBaseOptions {
showThresholdLabels: boolean;
showThresholdMarkers: boolean;
}
export const defaultOptions: Partial<Options> = {
showThresholdLabels: false,
showThresholdMarkers: true,
};

View File

@ -0,0 +1,88 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as ui from '@grafana/schema';
export interface Options {
basemap: ui.MapLayerOptions;
controls: ControlsOptions;
layers: Array<ui.MapLayerOptions>;
tooltip: TooltipOptions;
view: MapViewConfig;
}
export const defaultOptions: Partial<Options> = {
layers: [],
};
export interface MapViewConfig {
allLayers?: boolean;
id: string;
lastOnly?: boolean;
lat?: number;
layer?: string;
lon?: number;
maxZoom?: number;
minZoom?: number;
padding?: number;
shared?: boolean;
zoom?: number;
}
export const defaultMapViewConfig: Partial<MapViewConfig> = {
allLayers: true,
id: 'zero',
lat: 0,
lon: 0,
zoom: 1,
};
export interface ControlsOptions {
/**
* let the mouse wheel zoom
*/
mouseWheelZoom?: boolean;
/**
* Lower right
*/
showAttribution?: boolean;
/**
* Show debug
*/
showDebug?: boolean;
/**
* Show measure
*/
showMeasure?: boolean;
/**
* Scale options
*/
showScale?: boolean;
/**
* Zoom (upper left)
*/
showZoom?: boolean;
}
export interface TooltipOptions {
mode: TooltipMode;
}
export enum TooltipMode {
Details = 'details',
None = 'none',
}
export enum MapCenterID {
Coords = 'coords',
Fit = 'fit',
Zero = 'zero',
}

View File

@ -0,0 +1,362 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export interface CloudMonitoringQuery extends common.DataQuery {
/**
* Aliases can be set to modify the legend labels. e.g. {{metric.label.xxx}}. See docs for more detail.
*/
aliasBy?: string;
/**
* Time interval in milliseconds.
*/
intervalMs?: number;
/**
* SLO sub-query properties.
*/
sloQuery?: SLOQuery;
/**
* GCM query type.
* queryType: #QueryType
* Time Series List sub-query properties.
*/
timeSeriesList?: (TimeSeriesList | AnnotationQuery);
/**
* Time Series sub-query properties.
*/
timeSeriesQuery?: TimeSeriesQuery;
}
/**
* Defines the supported queryTypes.
*/
export enum QueryType {
ANNOTATION = 'annotation',
SLO = 'slo',
TIME_SERIES_LIST = 'timeSeriesList',
TIME_SERIES_QUERY = 'timeSeriesQuery',
}
/**
* Time Series List sub-query properties.
*/
export interface TimeSeriesList {
/**
* Alignment period to use when regularizing data. Defaults to cloud-monitoring-auto.
*/
alignmentPeriod?: string;
/**
* Reducer applied across a set of time-series values. Defaults to REDUCE_NONE.
*/
crossSeriesReducer: string;
/**
* Array of filters to query data by. Labels that can be filtered on are defined by the metric.
*/
filters?: Array<string>;
/**
* Array of labels to group data by.
*/
groupBys?: Array<string>;
/**
* Alignment function to be used. Defaults to ALIGN_MEAN.
*/
perSeriesAligner?: string;
/**
* Preprocessor is not part of the API, but is used to store the preprocessor and not affect the UI for the rest of parameters
*/
preprocessor?: PreprocessorType;
/**
* GCP project to execute the query against.
*/
projectName: string;
/**
* Only present if a preprocessor is selected. Alignment period to use when regularizing data. Defaults to cloud-monitoring-auto.
*/
secondaryAlignmentPeriod?: string;
/**
* Only present if a preprocessor is selected. Reducer applied across a set of time-series values. Defaults to REDUCE_NONE.
*/
secondaryCrossSeriesReducer?: string;
/**
* Only present if a preprocessor is selected. Array of labels to group data by.
*/
secondaryGroupBys?: Array<string>;
/**
* Only present if a preprocessor is selected. Alignment function to be used. Defaults to ALIGN_MEAN.
*/
secondaryPerSeriesAligner?: string;
/**
* Data view, defaults to FULL.
*/
view?: string;
}
export const defaultTimeSeriesList: Partial<TimeSeriesList> = {
filters: [],
groupBys: [],
secondaryGroupBys: [],
};
/**
* Types of pre-processor available. Defined by the metric.
*/
export enum PreprocessorType {
Delta = 'delta',
None = 'none',
Rate = 'rate',
}
/**
* Annotation sub-query properties.
*/
export interface AnnotationQuery extends TimeSeriesList {
/**
* Annotation text.
*/
text?: string;
/**
* Annotation title.
*/
title?: string;
}
/**
* Time Series sub-query properties.
*/
export interface TimeSeriesQuery {
/**
* To disable the graphPeriod, it should explictly be set to 'disabled'.
*/
graphPeriod?: ('disabled' | string);
/**
* GCP project to execute the query against.
*/
projectName: string;
/**
* MQL query to be executed.
*/
query: string;
}
/**
* SLO sub-query properties.
*/
export interface SLOQuery {
/**
* Alignment period to use when regularizing data. Defaults to cloud-monitoring-auto.
*/
alignmentPeriod?: string;
/**
* SLO goal value.
*/
goal?: number;
/**
* Specific lookback period for the SLO.
*/
lookbackPeriod?: string;
/**
* Alignment function to be used. Defaults to ALIGN_MEAN.
*/
perSeriesAligner?: string;
/**
* GCP project to execute the query against.
*/
projectName: string;
/**
* SLO selector.
*/
selectorName: string;
/**
* ID for the service the SLO is in.
*/
serviceId: string;
/**
* Name for the service the SLO is in.
*/
serviceName: string;
/**
* ID for the SLO.
*/
sloId: string;
/**
* Name of the SLO.
*/
sloName: string;
}
/**
* @deprecated This type is for migration purposes only. Replaced by TimeSeriesList Metric sub-query properties.
*/
export interface MetricQuery {
/**
* Aliases can be set to modify the legend labels. e.g. {{metric.label.xxx}}. See docs for more detail.
*/
aliasBy?: string;
/**
* Alignment period to use when regularizing data. Defaults to cloud-monitoring-auto.
*/
alignmentPeriod?: string;
/**
* Reducer applied across a set of time-series values. Defaults to REDUCE_NONE.
*/
crossSeriesReducer: string;
editorMode: string;
/**
* Array of filters to query data by. Labels that can be filtered on are defined by the metric.
*/
filters?: Array<string>;
/**
* To disable the graphPeriod, it should explictly be set to 'disabled'.
*/
graphPeriod?: ('disabled' | string);
/**
* Array of labels to group data by.
*/
groupBys?: Array<string>;
metricKind?: MetricKind;
metricType: string;
/**
* Alignment function to be used. Defaults to ALIGN_MEAN.
*/
perSeriesAligner?: string;
/**
* Preprocessor is not part of the API, but is used to store the preprocessor and not affect the UI for the rest of parameters
*/
preprocessor?: PreprocessorType;
/**
* GCP project to execute the query against.
*/
projectName: string;
/**
* MQL query to be executed.
*/
query: string;
valueType?: string;
view?: string;
}
export const defaultMetricQuery: Partial<MetricQuery> = {
filters: [],
groupBys: [],
};
export enum MetricKind {
CUMULATIVE = 'CUMULATIVE',
DELTA = 'DELTA',
GAUGE = 'GAUGE',
METRIC_KIND_UNSPECIFIED = 'METRIC_KIND_UNSPECIFIED',
}
export enum ValueTypes {
BOOL = 'BOOL',
DISTRIBUTION = 'DISTRIBUTION',
DOUBLE = 'DOUBLE',
INT64 = 'INT64',
MONEY = 'MONEY',
STRING = 'STRING',
VALUE_TYPE_UNSPECIFIED = 'VALUE_TYPE_UNSPECIFIED',
}
export enum AlignmentTypes {
ALIGN_COUNT = 'ALIGN_COUNT',
ALIGN_COUNT_FALSE = 'ALIGN_COUNT_FALSE',
ALIGN_COUNT_TRUE = 'ALIGN_COUNT_TRUE',
ALIGN_DELTA = 'ALIGN_DELTA',
ALIGN_FRACTION_TRUE = 'ALIGN_FRACTION_TRUE',
ALIGN_INTERPOLATE = 'ALIGN_INTERPOLATE',
ALIGN_MAX = 'ALIGN_MAX',
ALIGN_MEAN = 'ALIGN_MEAN',
ALIGN_MIN = 'ALIGN_MIN',
ALIGN_NEXT_OLDER = 'ALIGN_NEXT_OLDER',
ALIGN_NONE = 'ALIGN_NONE',
ALIGN_PERCENTILE_05 = 'ALIGN_PERCENTILE_05',
ALIGN_PERCENTILE_50 = 'ALIGN_PERCENTILE_50',
ALIGN_PERCENTILE_95 = 'ALIGN_PERCENTILE_95',
ALIGN_PERCENTILE_99 = 'ALIGN_PERCENTILE_99',
ALIGN_PERCENT_CHANGE = 'ALIGN_PERCENT_CHANGE',
ALIGN_RATE = 'ALIGN_RATE',
ALIGN_STDDEV = 'ALIGN_STDDEV',
ALIGN_SUM = 'ALIGN_SUM',
}
/**
* @deprecated Use AnnotationQuery instead. Legacy annotation query properties for migration purposes.
*/
export interface LegacyCloudMonitoringAnnotationQuery {
/**
* Array of filters to query data by. Labels that can be filtered on are defined by the metric.
*/
filters: Array<string>;
metricKind: MetricKind;
metricType: string;
/**
* GCP project to execute the query against.
*/
projectName: string;
/**
* Query refId.
*/
refId: string;
/**
* Annotation text.
*/
text: string;
/**
* Annotation title.
*/
title: string;
valueType: string;
}
export const defaultLegacyCloudMonitoringAnnotationQuery: Partial<LegacyCloudMonitoringAnnotationQuery> = {
filters: [],
};
/**
* Query filter representation.
*/
export interface Filter {
/**
* Filter condition.
*/
condition?: string;
/**
* Filter key.
*/
key: string;
/**
* Filter operator.
*/
operator: string;
/**
* Filter value.
*/
value: string;
}
export enum MetricFindQueryTypes {
Aggregations = 'aggregations',
Aligners = 'aligners',
AlignmentPeriods = 'alignmentPeriods',
DefaultProject = 'defaultProject',
LabelKeys = 'labelKeys',
LabelValues = 'labelValues',
MetricTypes = 'metricTypes',
Projects = 'projects',
ResourceTypes = 'resourceTypes',
SLO = 'slo',
SLOServices = 'sloServices',
Selectors = 'selectors',
Services = 'services',
}
export interface GoogleCloudMonitoringDataQuery {}

View File

@ -0,0 +1,40 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export type PhlareQueryType = ('metrics' | 'profile' | 'both');
export const defaultPhlareQueryType: PhlareQueryType = 'both';
export interface GrafanaPyroscopeDataQuery extends common.DataQuery {
/**
* Allows to group the results.
*/
groupBy: Array<string>;
/**
* Specifies the query label selectors.
*/
labelSelector: string;
/**
* Sets the maximum number of nodes in the flamegraph.
*/
maxNodes?: number;
/**
* Specifies the type of profile to query.
*/
profileTypeId: string;
}
export const defaultGrafanaPyroscopeDataQuery: Partial<GrafanaPyroscopeDataQuery> = {
groupBy: [],
labelSelector: '{}',
};

View File

@ -0,0 +1,270 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as ui from '@grafana/schema';
/**
* Controls the color mode of the heatmap
*/
export enum HeatmapColorMode {
Opacity = 'opacity',
Scheme = 'scheme',
}
/**
* Controls the color scale of the heatmap
*/
export enum HeatmapColorScale {
Exponential = 'exponential',
Linear = 'linear',
}
/**
* Controls various color options
*/
export interface HeatmapColorOptions {
/**
* Controls the exponent when scale is set to exponential
*/
exponent: number;
/**
* Controls the color fill when in opacity mode
*/
fill: string;
/**
* Sets the maximum value for the color scale
*/
max?: number;
/**
* Sets the minimum value for the color scale
*/
min?: number;
/**
* Sets the color mode
*/
mode?: HeatmapColorMode;
/**
* Reverses the color scheme
*/
reverse: boolean;
/**
* Controls the color scale
*/
scale?: HeatmapColorScale;
/**
* Controls the color scheme used
*/
scheme: string;
/**
* Controls the number of color steps
*/
steps: number;
}
/**
* Configuration options for the yAxis
*/
export interface YAxisConfig extends ui.AxisConfig {
/**
* Controls the number of decimals for yAxis values
*/
decimals?: number;
/**
* Sets the maximum value for the yAxis
*/
max?: number;
/**
* Sets the minimum value for the yAxis
*/
min?: number;
/**
* Reverses the yAxis
*/
reverse?: boolean;
/**
* Sets the yAxis unit
*/
unit?: string;
}
/**
* Controls cell value options
*/
export interface CellValues {
/**
* Controls the number of decimals for cell values
*/
decimals?: number;
/**
* Controls the cell value unit
*/
unit?: string;
}
/**
* Controls the value filter range
*/
export interface FilterValueRange {
/**
* Sets the filter range to values greater than or equal to the given value
*/
ge?: number;
/**
* Sets the filter range to values less than or equal to the given value
*/
le?: number;
}
/**
* Controls tooltip options
*/
export interface HeatmapTooltip {
/**
* Controls if the tooltip is shown
*/
show: boolean;
/**
* Controls if the tooltip shows a histogram of the y-axis values
*/
yHistogram?: boolean;
}
/**
* Controls legend options
*/
export interface HeatmapLegend {
/**
* Controls if the legend is shown
*/
show: boolean;
}
/**
* Controls exemplar options
*/
export interface ExemplarConfig {
/**
* Sets the color of the exemplar markers
*/
color: string;
}
/**
* Controls frame rows options
*/
export interface RowsHeatmapOptions {
/**
* Controls tick alignment when not calculating from data
*/
layout?: ui.HeatmapCellLayout;
/**
* Sets the name of the cell when not calculating from data
*/
value?: string;
}
export interface Options {
/**
* Controls if the heatmap should be calculated from data
*/
calculate?: boolean;
/**
* Calculation options for the heatmap
*/
calculation?: ui.HeatmapCalculationOptions;
/**
* Controls gap between cells
*/
cellGap?: number;
/**
* Controls cell radius
*/
cellRadius?: number;
/**
* Controls cell value unit
*/
cellValues?: CellValues;
/**
* Controls the color options
*/
color: HeatmapColorOptions;
/**
* Controls exemplar options
*/
exemplars: ExemplarConfig;
/**
* Filters values between a given range
*/
filterValues?: FilterValueRange;
/**
* | *{
* axisPlacement: ui.AxisPlacement & "left" // TODO: fix after remove when https://github.com/grafana/cuetsy/issues/74 is fixed
* }
* Controls legend options
*/
legend: HeatmapLegend;
/**
* Controls tick alignment and value name when not calculating from data
*/
rowsFrame?: RowsHeatmapOptions;
/**
* | *{
* layout: ui.HeatmapCellLayout & "auto" // TODO: fix after remove when https://github.com/grafana/cuetsy/issues/74 is fixed
* }
* Controls the display of the value in the cell
*/
showValue: ui.VisibilityMode;
/**
* Controls tooltip options
*/
tooltip: HeatmapTooltip;
/**
* Controls yAxis placement
*/
yAxis: YAxisConfig;
}
export const defaultOptions: Partial<Options> = {
calculate: false,
cellGap: 1,
cellValues: {},
color: {
/**
* mode: HeatmapColorMode // TODO: fix after remove when https://github.com/grafana/cuetsy/issues/74 is fixed
*/
scheme: 'Oranges',
fill: 'dark-orange',
/**
* scale: HeatmapColorScale // TODO: fix after remove when https://github.com/grafana/cuetsy/issues/74 is fixed
*/
reverse: false,
exponent: 0.5,
steps: 64,
},
exemplars: {
color: 'rgba(255,0,255,0.7)',
},
filterValues: {
le: 1e-09,
},
legend: {
show: true,
},
showValue: ui.VisibilityMode.Auto,
tooltip: {
show: true,
yHistogram: false,
},
};
export interface FieldConfig extends ui.HideableFieldConfig {
scaleDistribution?: ui.ScaleDistributionConfig;
}

View File

@ -0,0 +1,53 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export interface Options extends common.OptionsWithLegend, common.OptionsWithTooltip {
/**
* Offset buckets by this amount
*/
bucketOffset?: number;
/**
* Size of each bucket
*/
bucketSize?: number;
/**
* Combines multiple series into a single histogram
*/
combine?: boolean;
}
export const defaultOptions: Partial<Options> = {
bucketOffset: 0,
};
export interface FieldConfig extends common.AxisConfig, common.HideableFieldConfig {
/**
* Controls the fill opacity of the bars.
*/
fillOpacity?: number;
/**
* 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.
* Gradient appearance is influenced by the Fill opacity setting.
*/
gradientMode?: common.GraphGradientMode;
/**
* Controls line width of the bars.
*/
lineWidth?: number;
}
export const defaultFieldConfig: Partial<FieldConfig> = {
fillOpacity: 80,
gradientMode: common.GraphGradientMode.None,
lineWidth: 1,
};

View File

@ -0,0 +1,23 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export interface Options {
dedupStrategy: common.LogsDedupStrategy;
enableLogDetails: boolean;
prettifyLogMessage: boolean;
showCommonLabels: boolean;
showLabels: boolean;
showTime: boolean;
sortOrder: common.LogsSortOrder;
wrapLogMessage: boolean;
}

View File

@ -0,0 +1,62 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export enum QueryEditorMode {
Builder = 'builder',
Code = 'code',
}
export enum LokiQueryType {
Instant = 'instant',
Range = 'range',
Stream = 'stream',
}
export enum SupportingQueryType {
DataSample = 'dataSample',
LogsSample = 'logsSample',
LogsVolume = 'logsVolume',
}
export enum LokiQueryDirection {
Backward = 'backward',
Forward = 'forward',
}
export interface LokiDataQuery extends common.DataQuery {
editorMode?: QueryEditorMode;
/**
* The LogQL query.
*/
expr: string;
/**
* @deprecated, now use queryType.
*/
instant?: boolean;
/**
* Used to override the name of the series.
*/
legendFormat?: string;
/**
* Used to limit the number of log rows returned.
*/
maxLines?: number;
/**
* @deprecated, now use queryType.
*/
range?: boolean;
/**
* Used to scale the interval value.
*/
resolution?: number;
}

View File

@ -0,0 +1,22 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
export interface Options {
/**
* empty/missing will default to grafana blog
*/
feedUrl?: string;
showImage?: boolean;
}
export const defaultOptions: Partial<Options> = {
showImage: true,
};

View File

@ -0,0 +1,48 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
export interface ArcOption {
/**
* The color of the arc.
*/
color?: string;
/**
* Field from which to get the value. Values should be less than 1, representing fraction of a circle.
*/
field?: string;
}
export interface Options {
edges?: {
/**
* Unit for the main stat to override what ever is set in the data frame.
*/
mainStatUnit?: string;
/**
* Unit for the secondary stat to override what ever is set in the data frame.
*/
secondaryStatUnit?: string;
};
nodes?: {
/**
* Unit for the main stat to override what ever is set in the data frame.
*/
mainStatUnit?: string;
/**
* Unit for the secondary stat to override what ever is set in the data frame.
*/
secondaryStatUnit?: string;
/**
* Define which fields are shown as part of the node arc (colored circle around the node).
*/
arcs?: Array<ArcOption>;
};
}

View File

@ -0,0 +1,31 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export type ParcaQueryType = ('metrics' | 'profile' | 'both');
export const defaultParcaQueryType: ParcaQueryType = 'both';
export interface ParcaDataQuery extends common.DataQuery {
/**
* Specifies the query label selectors.
*/
labelSelector: string;
/**
* Specifies the type of profile to query.
*/
profileTypeId: string;
}
export const defaultParcaDataQuery: Partial<ParcaDataQuery> = {
labelSelector: '{}',
};

View File

@ -0,0 +1,62 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
/**
* Select the pie chart display style.
*/
export enum PieChartType {
Donut = 'donut',
Pie = 'pie',
}
/**
* Select labels to display on the pie chart.
* - Name - The series or field name.
* - Percent - The percentage of the whole.
* - Value - The raw numerical value.
*/
export enum PieChartLabels {
Name = 'name',
Percent = 'percent',
Value = 'value',
}
/**
* Select values to display in the legend.
* - Percent: The percentage of the whole.
* - Value: The raw numerical value.
*/
export enum PieChartLegendValues {
Percent = 'percent',
Value = 'value',
}
export interface PieChartLegendOptions extends common.VizLegendOptions {
values: Array<PieChartLegendValues>;
}
export const defaultPieChartLegendOptions: Partial<PieChartLegendOptions> = {
values: [],
};
export interface Options extends common.OptionsWithTooltip, common.SingleStatBaseOptions {
displayLabels: Array<PieChartLabels>;
legend: PieChartLegendOptions;
pieType: PieChartType;
}
export const defaultOptions: Partial<Options> = {
displayLabels: [],
};
export interface FieldConfig extends common.HideableFieldConfig {}

View File

@ -0,0 +1,55 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export enum QueryEditorMode {
Builder = 'builder',
Code = 'code',
}
export type PromQueryFormat = ('time_series' | 'table' | 'heatmap');
export interface PrometheusDataQuery extends common.DataQuery {
/**
* Specifies which editor is being used to prepare the query. It can be "code" or "builder"
*/
editorMode?: QueryEditorMode;
/**
* Execute an additional query to identify interesting raw samples relevant for the given expr
*/
exemplar?: boolean;
/**
* The actual expression/query that will be evaluated by Prometheus
*/
expr: string;
/**
* Query format to determine how to display data points in panel. It can be "time_series", "table", "heatmap"
*/
format?: PromQueryFormat;
/**
* Returns only the latest value that Prometheus has scraped for the requested time series
*/
instant?: boolean;
/**
* @deprecated Used to specify how many times to divide max data points by. We use max data points under query options
* See https://github.com/grafana/grafana/issues/48081
*/
intervalFactor?: number;
/**
* Series name override or template. Ex. {{hostname}} will be replaced with label value for hostname
*/
legendFormat?: string;
/**
* Returns a Range vector, comprised of a set of time series containing a range of data points over time for each time series
*/
range?: boolean;
}

View File

@ -0,0 +1,26 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export interface Options extends common.SingleStatBaseOptions {
colorMode: common.BigValueColorMode;
graphMode: common.BigValueGraphMode;
justifyMode: common.BigValueJustifyMode;
textMode: common.BigValueTextMode;
}
export const defaultOptions: Partial<Options> = {
colorMode: common.BigValueColorMode.Value,
graphMode: common.BigValueGraphMode.Area,
justifyMode: common.BigValueJustifyMode.Auto,
textMode: common.BigValueTextMode.Auto,
};

View File

@ -0,0 +1,48 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as ui from '@grafana/schema';
export interface Options extends ui.OptionsWithLegend, ui.OptionsWithTooltip, ui.OptionsWithTimezones {
/**
* Controls value alignment on the timelines
*/
alignValue?: ui.TimelineValueAlignment;
/**
* Merge equal consecutive values
*/
mergeValues?: boolean;
/**
* Controls the row height
*/
rowHeight: number;
/**
* Show timeline values on chart
*/
showValue: ui.VisibilityMode;
}
export const defaultOptions: Partial<Options> = {
alignValue: 'left',
mergeValues: true,
rowHeight: 0.9,
showValue: ui.VisibilityMode.Auto,
};
export interface FieldConfig extends ui.HideableFieldConfig {
fillOpacity?: number;
lineWidth?: number;
}
export const defaultFieldConfig: Partial<FieldConfig> = {
fillOpacity: 70,
lineWidth: 0,
};

View File

@ -0,0 +1,43 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as ui from '@grafana/schema';
export interface Options extends ui.OptionsWithLegend, ui.OptionsWithTooltip, ui.OptionsWithTimezones {
/**
* Controls the column width
*/
colWidth?: number;
/**
* Set the height of the rows
*/
rowHeight: number;
/**
* Show values on the columns
*/
showValue: ui.VisibilityMode;
}
export const defaultOptions: Partial<Options> = {
colWidth: 0.9,
rowHeight: 0.9,
showValue: ui.VisibilityMode.Auto,
};
export interface FieldConfig extends ui.HideableFieldConfig {
fillOpacity?: number;
lineWidth?: number;
}
export const defaultFieldConfig: Partial<FieldConfig> = {
fillOpacity: 70,
lineWidth: 1,
};

View File

@ -0,0 +1,61 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as ui from '@grafana/schema';
export interface Options {
/**
* Controls the height of the rows
*/
cellHeight?: ui.TableCellHeight;
/**
* Controls footer options
*/
footer?: ui.TableFooterOptions;
/**
* Represents the index of the selected frame
*/
frameIndex: number;
/**
* Controls whether the panel should show the header
*/
showHeader: boolean;
/**
* Controls whether the header should show icons for the column types
*/
showTypeIcons?: boolean;
/**
* Used to control row sorting
*/
sortBy?: Array<ui.TableSortByFieldState>;
}
export const defaultOptions: Partial<Options> = {
cellHeight: ui.TableCellHeight.Sm,
footer: {
/**
* Controls whether the footer should be shown
*/
show: false,
/**
* Controls whether the footer should show the total number of rows on Count calculation
*/
countRows: false,
/**
* Represents the selected calculations
*/
reducer: [],
},
frameIndex: 0,
showHeader: true,
showTypeIcons: false,
sortBy: [],
};

View File

@ -0,0 +1,95 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export interface TempoQuery extends common.DataQuery {
filters: Array<TraceqlFilter>;
/**
* Defines the maximum number of traces that are returned from Tempo
*/
limit?: number;
/**
* Define the maximum duration to select traces. Use duration format, for example: 1.2s, 100ms
*/
maxDuration?: string;
/**
* Define the minimum duration to select traces. Use duration format, for example: 1.2s, 100ms
*/
minDuration?: string;
/**
* TraceQL query or trace ID
*/
query: string;
/**
* Logfmt query to filter traces by their tags. Example: http.status_code=200 error=true
*/
search?: string;
/**
* Filters to be included in a PromQL query to select data for the service graph. Example: {client="app",service="app"}
*/
serviceMapQuery?: string;
/**
* Query traces by service name
*/
serviceName?: string;
/**
* Query traces by span name
*/
spanName?: string;
}
export const defaultTempoQuery: Partial<TempoQuery> = {
filters: [],
};
/**
* search = Loki search, nativeSearch = Tempo search for backwards compatibility
*/
export type TempoQueryType = ('traceql' | 'traceqlSearch' | 'search' | 'serviceMap' | 'upload' | 'nativeSearch' | 'clear');
/**
* static fields are pre-set in the UI, dynamic fields are added by the user
*/
export enum TraceqlSearchScope {
Resource = 'resource',
Span = 'span',
Unscoped = 'unscoped',
}
export interface TraceqlFilter {
/**
* Uniquely identify the filter, will not be used in the query generation
*/
id: string;
/**
* The operator that connects the tag to the value, for example: =, >, !=, =~
*/
operator?: string;
/**
* The scope of the filter, can either be unscoped/all scopes, resource or span
*/
scope?: TraceqlSearchScope;
/**
* The tag for the search filter, for example: .http.status_code, .service.name, status
*/
tag?: string;
/**
* The value for the search filter
*/
value?: (string | Array<string>);
/**
* The type of the value, used for example to check whether we need to wrap the value in quotes when generating the query
*/
valueType?: string;
}
export interface TempoDataQuery {}

View File

@ -0,0 +1,136 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export enum TestDataQueryType {
Annotations = 'annotations',
Arrow = 'arrow',
CSVContent = 'csv_content',
CSVFile = 'csv_file',
CSVMetricValues = 'csv_metric_values',
DataPointsOutsideRange = 'datapoints_outside_range',
ExponentialHeatmapBucketData = 'exponential_heatmap_bucket_data',
FlameGraph = 'flame_graph',
GrafanaAPI = 'grafana_api',
LinearHeatmapBucketData = 'linear_heatmap_bucket_data',
Live = 'live',
Logs = 'logs',
ManualEntry = 'manual_entry',
NoDataPoints = 'no_data_points',
NodeGraph = 'node_graph',
PredictableCSVWave = 'predictable_csv_wave',
PredictablePulse = 'predictable_pulse',
RandomWalk = 'random_walk',
RandomWalkTable = 'random_walk_table',
RandomWalkWithError = 'random_walk_with_error',
RawFrame = 'raw_frame',
ServerError500 = 'server_error_500',
Simulation = 'simulation',
SlowQuery = 'slow_query',
StreamingClient = 'streaming_client',
TableStatic = 'table_static',
Trace = 'trace',
USA = 'usa',
VariablesQuery = 'variables-query',
}
export interface StreamingQuery {
bands?: number;
noise: number;
speed: number;
spread: number;
type: ('signal' | 'logs' | 'fetch');
url?: string;
}
export interface PulseWaveQuery {
offCount?: number;
offValue?: number;
onCount?: number;
onValue?: number;
timeStep?: number;
}
export interface SimulationQuery {
config?: Record<string, unknown>;
key: {
type: string;
tick: number;
uid?: string;
};
last?: boolean;
stream?: boolean;
}
export interface NodesQuery {
count?: number;
type?: ('random' | 'response' | 'random edges');
}
export interface USAQuery {
fields?: Array<string>;
mode?: string;
period?: string;
states?: Array<string>;
}
export const defaultUSAQuery: Partial<USAQuery> = {
fields: [],
states: [],
};
export interface CSVWave {
labels?: string;
name?: string;
timeStep?: number;
valuesCSV?: string;
}
/**
* TODO: Should this live here given it's not used in the dataquery?
*/
export interface Scenario {
description?: string;
hideAliasField?: boolean;
id: string;
name: string;
stringInput: string;
}
export interface TestDataDataQuery extends common.DataQuery {
alias?: string;
channel?: string;
csvContent?: string;
csvFileName?: string;
csvWave?: Array<CSVWave>; // TODO can we prevent partial from being generated
errorType?: ('server_panic' | 'frontend_exception' | 'frontend_observable');
labels?: string;
levelColumn?: boolean;
lines?: number;
nodes?: NodesQuery;
points?: Array<Array<(string | number)>>;
pulseWave?: PulseWaveQuery;
rawFrameContent?: string;
scenarioId?: TestDataQueryType;
seriesCount?: number;
sim?: SimulationQuery;
spanCount?: number;
stream?: StreamingQuery;
stringInput?: string;
usa?: USAQuery;
}
export const defaultTestDataDataQuery: Partial<TestDataDataQuery> = {
csvWave: [],
points: [],
scenarioId: TestDataQueryType.RandomWalk,
};

View File

@ -0,0 +1,58 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
export enum TextMode {
Code = 'code',
HTML = 'html',
Markdown = 'markdown',
}
export enum CodeLanguage {
Go = 'go',
Html = 'html',
Json = 'json',
Markdown = 'markdown',
Plaintext = 'plaintext',
Sql = 'sql',
Typescript = 'typescript',
Xml = 'xml',
Yaml = 'yaml',
}
export const defaultCodeLanguage: CodeLanguage = CodeLanguage.Plaintext;
export interface CodeOptions {
/**
* The language passed to monaco code editor
*/
language: CodeLanguage;
showLineNumbers: boolean;
showMiniMap: boolean;
}
export const defaultCodeOptions: Partial<CodeOptions> = {
language: CodeLanguage.Plaintext,
showLineNumbers: false,
showMiniMap: false,
};
export interface Options {
code?: CodeOptions;
content: string;
mode: TextMode;
}
export const defaultOptions: Partial<Options> = {
content: `# Title
For markdown syntax help: [commonmark.org/help](https://commonmark.org/help/)`,
mode: TextMode.Markdown,
};

View File

@ -0,0 +1,19 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export interface Options extends common.OptionsWithTimezones {
legend: common.VizLegendOptions;
tooltip: common.VizTooltipOptions;
}
export interface FieldConfig extends common.GraphFieldConfig {}

View File

@ -0,0 +1,26 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
/**
* Identical to timeseries... except it does not have timezone settings
*/
export interface Options {
legend: common.VizLegendOptions;
tooltip: common.VizTooltipOptions;
/**
* Name of the x field to use (defaults to first number)
*/
xField?: string;
}
export interface FieldConfig extends common.GraphFieldConfig {}

View File

@ -0,0 +1,65 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
// PluginEachMajorJenny
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema';
export enum SeriesMapping {
Auto = 'auto',
Manual = 'manual',
}
export enum ScatterShow {
Lines = 'lines',
Points = 'points',
PointsAndLines = 'points+lines',
}
export interface XYDimensionConfig {
exclude?: Array<string>;
frame: number;
x?: string;
}
export const defaultXYDimensionConfig: Partial<XYDimensionConfig> = {
exclude: [],
};
export interface ScatterFieldConfig extends common.HideableFieldConfig, common.AxisConfig {
label?: common.VisibilityMode;
labelValue?: common.TextDimensionConfig;
lineColor?: common.ColorDimensionConfig;
lineStyle?: common.LineStyle;
lineWidth?: number;
pointColor?: common.ColorDimensionConfig;
pointSize?: common.ScaleDimensionConfig;
show?: ScatterShow;
}
export const defaultScatterFieldConfig: Partial<ScatterFieldConfig> = {
label: common.VisibilityMode.Auto,
show: ScatterShow.Points,
};
export interface ScatterSeriesConfig extends ScatterFieldConfig {
name?: string;
x?: string;
y?: string;
}
export interface Options extends common.OptionsWithLegend, common.OptionsWithTooltip {
dims: XYDimensionConfig;
series: Array<ScatterSeriesConfig>;
seriesMapping?: SeriesMapping;
}
export const defaultOptions: Partial<Options> = {
series: [],
};

View File

@ -34,6 +34,11 @@ func (j *lmox) JennyName() string {
}
func (j *lmox) Generate(kind kindsys.Kind) (codejen.Files, error) {
// TODO remove this once codejen catches nils https://github.com/grafana/codejen/issues/5
if kind == nil {
return nil, nil
}
comm := kind.Props().Common()
sfg := SchemaForGen{
Name: comm.Name,

View File

@ -2,8 +2,10 @@ package codegen
import (
"github.com/grafana/codejen"
"github.com/grafana/cuetsy"
"github.com/grafana/cuetsy/ts"
"github.com/grafana/cuetsy/ts/ast"
"github.com/grafana/grafana/pkg/cuectx"
"github.com/grafana/thema/encoding/typescript"
)
@ -25,6 +27,10 @@ func (j TSResourceJenny) Generate(sfg SchemaForGen) (*codejen.File, error) {
f, err := typescript.GenerateTypes(sfg.Schema, &typescript.TypeConfig{
RootName: sfg.Name,
Group: sfg.IsGroup,
CuetsyConfig: &cuetsy.Config{
Export: true,
ImportMapper: cuectx.MapCUEImportToTS,
},
})
if err != nil {
return nil, err

View File

@ -2,6 +2,8 @@ package codegen
import (
"github.com/grafana/codejen"
"github.com/grafana/cuetsy"
"github.com/grafana/grafana/pkg/cuectx"
"github.com/grafana/thema/encoding/typescript"
)
@ -21,6 +23,10 @@ func (j TSTypesJenny) JennyName() string {
func (j TSTypesJenny) Generate(sfg SchemaForGen) (*codejen.File, error) {
// TODO allow using name instead of machine name in thema generator
f, err := typescript.GenerateTypes(sfg.Schema, &typescript.TypeConfig{
CuetsyConfig: &cuetsy.Config{
Export: true,
ImportMapper: cuectx.MapCUEImportToTS,
},
RootName: sfg.Name,
Group: sfg.IsGroup,
})

View File

@ -9,8 +9,10 @@ import (
"cuelang.org/go/cue"
"cuelang.org/go/cue/errors"
"github.com/grafana/codejen"
"github.com/grafana/cuetsy"
"github.com/grafana/cuetsy/ts"
"github.com/grafana/cuetsy/ts/ast"
"github.com/grafana/grafana/pkg/cuectx"
"github.com/grafana/kindsys"
"github.com/grafana/thema"
"github.com/grafana/thema/encoding/typescript"
@ -44,6 +46,9 @@ func (gen *genTSVeneerIndex) Generate(kinds ...kindsys.Kind) (*codejen.File, err
for _, def := range kinds {
sch := def.Lineage().Latest()
f, err := typescript.GenerateTypes(sch, &typescript.TypeConfig{
CuetsyConfig: &cuetsy.Config{
ImportMapper: cuectx.MapCUEImportToTS,
},
RootName: def.Props().Common().Name,
Group: def.Props().Common().LineageIsGroup,
})

View File

@ -1,4 +1,4 @@
package codegen
package cuectx
import (
"fmt"
@ -7,23 +7,20 @@ import (
"cuelang.org/go/cue/ast"
tsast "github.com/grafana/cuetsy/ts/ast"
"github.com/grafana/grafana/pkg/plugins/pfs"
)
// CUE import paths, mapped to corresponding TS import paths. An empty value
// indicates the import path should be dropped in the conversion to TS. Imports
// not present in the list are not not allowed, and code generation will fail.
// not present in the list are not allowed, and code generation will fail.
var importMap = map[string]string{
"github.com/grafana/thema": "",
"github.com/grafana/thema": "",
"github.com/grafana/kindsys": "",
"github.com/grafana/grafana/pkg/plugins/pfs": "",
"github.com/grafana/grafana/packages/grafana-schema/src/common": "@grafana/schema",
}
func init() {
allow := pfs.PermittedCUEImports()
allow := PermittedCUEImports()
strsl := make([]string, 0, len(importMap))
for p := range importMap {
strsl = append(strsl, p)
@ -36,13 +33,24 @@ func init() {
}
}
// mapCUEImportToTS maps the provided CUE import path to the corresponding
// PermittedCUEImports returns the list of import paths that may be imported in
// Grafana kind definitions.
func PermittedCUEImports() []string {
return []string{
"github.com/grafana/thema",
"github.com/grafana/kindsys",
"github.com/grafana/grafana/pkg/plugins/pfs",
"github.com/grafana/grafana/packages/grafana-schema/src/common",
}
}
// MapCUEImportToTS maps the provided CUE import path to the corresponding
// TypeScript import path in generated code.
//
// Providing an import path that is not allowed results in an error. If a nil
// error and empty string are returned, the import path should be dropped in
// generated code.
func mapCUEImportToTS(path string) (string, error) {
func MapCUEImportToTS(path string) (string, error) {
i, has := importMap[path]
if !has {
return "", fmt.Errorf("import %q in models.cue is not allowed", path)
@ -50,10 +58,14 @@ func mapCUEImportToTS(path string) (string, error) {
return i, nil
}
// TODO convert this to use cuetsy ts types, once import * form is supported
func convertImport(im *ast.ImportSpec) (tsast.ImportSpec, error) {
// ConvertImport converts a CUE import statement, represented in its AST form,
// to the corresponding TS import, if the CUE import is allowed.
//
// Some CUE imports are allowed but have no corresponding TS import - the CUE
// types from that package are expected to be inlined.
func ConvertImport(im *ast.ImportSpec) (tsast.ImportSpec, error) {
tsim := tsast.ImportSpec{}
pkg, err := mapCUEImportToTS(strings.Trim(im.Path.Value, "\""))
pkg, err := MapCUEImportToTS(strings.Trim(im.Path.Value, "\""))
if err != nil || pkg == "" {
// err should be unreachable if paths has been verified already
// Empty string mapping means skip it

View File

@ -0,0 +1,72 @@
package codegen
import (
"path/filepath"
"github.com/grafana/codejen"
tsast "github.com/grafana/cuetsy/ts/ast"
corecodegen "github.com/grafana/grafana/pkg/codegen"
"github.com/grafana/grafana/pkg/cuectx"
"github.com/grafana/grafana/pkg/plugins/pfs"
"github.com/grafana/kindsys"
"github.com/grafana/thema"
)
func PluginTSEachMajor(rt *thema.Runtime) codejen.OneToMany[*pfs.PluginDecl] {
latestMajorsOrX := corecodegen.LatestMajorsOrXJenny(filepath.Join("packages", "grafana-schema", "src", "raw", "composable"), false, corecodegen.TSTypesJenny{})
return &pleJenny{
inner: kinds2pd(rt, latestMajorsOrX),
}
}
type pleJenny struct {
inner codejen.OneToMany[*pfs.PluginDecl]
}
func (*pleJenny) JennyName() string {
return "PluginEachMajorJenny"
}
func (j *pleJenny) Generate(decl *pfs.PluginDecl) (codejen.Files, error) {
if !decl.HasSchema() {
return nil, nil
}
jf, err := j.inner.Generate(decl)
if err != nil {
return nil, err
}
files := make(codejen.Files, len(jf))
for i, file := range jf {
tsf := &tsast.File{}
for _, im := range decl.Imports {
if tsim, err := cuectx.ConvertImport(im); err != nil {
return nil, err
} else if tsim.From.Value != "" {
tsf.Imports = append(tsf.Imports, tsim)
}
}
tsf.Nodes = append(tsf.Nodes, tsast.Raw{
Data: string(file.Data),
})
data := []byte(tsf.String())
data = data[:len(data)-1] // remove the additional line break added by the inner jenny
files[i] = *codejen.NewFile(file.RelativePath, data, append(file.From, j)...)
}
return files, nil
}
func kinds2pd(rt *thema.Runtime, j codejen.OneToMany[kindsys.Kind]) codejen.OneToMany[*pfs.PluginDecl] {
return codejen.AdaptOneToMany(j, func(pd *pfs.PluginDecl) kindsys.Kind {
kd, err := kindsys.BindComposable(rt, pd.KindDecl)
if err != nil {
return nil
}
return kd
})
}

View File

@ -7,6 +7,7 @@ import (
"github.com/grafana/codejen"
tsast "github.com/grafana/cuetsy/ts/ast"
"github.com/grafana/grafana/pkg/cuectx"
"github.com/grafana/grafana/pkg/plugins/pfs"
)
@ -34,7 +35,7 @@ func (j *ptsJenny) Generate(decl *pfs.PluginDecl) (*codejen.File, error) {
tsf := &tsast.File{}
for _, im := range decl.Imports {
if tsim, err := convertImport(im); err != nil {
if tsim, err := cuectx.ConvertImport(im); err != nil {
return nil, err
} else if tsim.From.Value != "" {
tsf.Imports = append(tsf.Imports, tsim)

View File

@ -53,16 +53,7 @@ func loadGP(ctx *cue.Context) cue.Value {
// PermittedCUEImports returns the list of import paths that may be used in a
// plugin's grafanaplugin cue package.
//
// TODO probably move this into kindsys
func PermittedCUEImports() []string {
return []string{
"github.com/grafana/thema",
"github.com/grafana/kindsys",
"github.com/grafana/grafana/pkg/plugins/pfs",
"github.com/grafana/grafana/packages/grafana-schema/src/common",
}
}
var PermittedCUEImports = cuectx.PermittedCUEImports
func importAllowed(path string) bool {
for _, p := range PermittedCUEImports() {

View File

@ -56,9 +56,15 @@ func main() {
kind2pd(rt, corecodegen.DocsJenny(
filepath.Join("docs", "sources", "developers", "kinds", "composable"),
)),
codegen.PluginTSEachMajor(rt),
)
pluginKindGen.AddPostprocessors(corecodegen.SlashHeaderMapper("public/app/plugins/gen.go"))
schifs := kindsys.SchemaInterfaces(rt.Context())
schifnames := make([]string, 0, len(schifs))
for _, schif := range schifs {
schifnames = append(schifnames, strings.ToLower(schif.Name()))
}
pluginKindGen.AddPostprocessors(corecodegen.SlashHeaderMapper("public/app/plugins/gen.go"), splitSchiffer(schifnames))
declParser := pfs.NewDeclParser(rt, skipPlugins)
decls, err := declParser.Parse(os.DirFS(cwd))
@ -99,3 +105,19 @@ func kind2pd(rt *thema.Runtime, j codejen.OneToOne[kindsys.Kind]) codejen.OneToO
return kd
})
}
func splitSchiffer(names []string) codejen.FileMapper {
for i := range names {
names[i] = names[i] + "/"
}
return func(f codejen.File) (codejen.File, error) {
// TODO it's terrible that this has to exist, CODEJEN NEEDS TO BE BETTER
for _, name := range names {
if idx := strings.Index(f.RelativePath, name); idx != -1 {
f.RelativePath = fmt.Sprintf("%s/%s", f.RelativePath[:idx], f.RelativePath[idx:])
break
}
}
return f, nil
}
}