Codegen: Render disjunctions in docs (#63590)

* Codegen: Render disjunctions in docs

* Fix references

* Regenerate docs
This commit is contained in:
Tania
2023-03-03 17:48:25 +01:00
committed by GitHub
parent ad4b053231
commit 40ba848bf5
5 changed files with 698 additions and 9 deletions
@@ -124,9 +124,415 @@ Datasource to use for annotation.
### Panels
| Property | Type | Required | Description |
|----------|-----------------------------------------------------------------------------------------------------------------------|----------|-------------|
| `object` | Possible types are: [Panel](#panel), [RowPanel](#rowpanel), [GraphPanel](#graphpanel), [HeatmapPanel](#heatmappanel). | | |
### DataTransformerConfig
TODO docs
| Property | Type | Required | Description |
|------------|---------------------------------|----------|----------------------------------------------------------------------------------------|
| `id` | string | **Yes** | Unique identifier of transformer |
| `options` | | **Yes** | Options to be passed to the transformer<br/>Valid options depend on the transformer id |
| `disabled` | boolean | No | Disabled transformations are skipped |
| `filter` | [MatcherConfig](#matcherconfig) | No | |
### MatcherConfig
| Property | Type | Required | Description |
|-----------|--------|----------|--------------|
| `id` | string | **Yes** | Default: ``. |
| `options` | | No | |
### FieldConfigSource
| Property | Type | Required | Description |
|-------------|-----------------------------|----------|-------------|
| `defaults` | [FieldConfig](#fieldconfig) | **Yes** | |
| `overrides` | [object](#overrides)[] | **Yes** | |
### FieldConfig
| Property | Type | Required | Description |
|---------------------|---------------------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `color` | [FieldColor](#fieldcolor) | No | TODO docs |
| `custom` | [object](#custom) | No | custom is specified by the PanelFieldConfig field<br/>in panel plugin schemas. |
| `decimals` | number | No | Significant digits (for display) |
| `description` | string | No | Human readable field metadata |
| `displayNameFromDS` | string | No | This can be used by data sources that return and explicit naming structure for values and labels<br/>When this property is configured, this value is used rather than the default naming strategy. |
| `displayName` | string | No | The display value for this field. This supports template variables blank is auto |
| `filterable` | boolean | No | True if data source field supports ad-hoc filters |
| `links` | | No | The behavior when clicking on a result |
| `mappings` | [ValueMapping](#valuemapping)[] | No | Convert input values into a display string |
| `max` | number | No | |
| `min` | number | No | |
| `noValue` | string | No | Alternative to empty string |
| `path` | string | No | An explicit path to the field in the datasource. When the frame meta includes a path,<br/>This will default to `${frame.meta.path}/${field.name}<br/><br/>When defined, this value can be used as an identifier within the datasource scope, and<br/>may be used to update the results |
| `thresholds` | [ThresholdsConfig](#thresholdsconfig) | No | |
| `unit` | string | No | Numeric Options |
| `writeable` | boolean | No | True if data source can write a value to the path. Auth/authz are supported separately |
### FieldColor
TODO docs
| Property | Type | Required | Description |
|--------------|--------|----------|----------------------------------------------------------|
| `mode` | string | **Yes** | The main color scheme mode |
| `fixedColor` | string | No | Stores the fixed color value if mode is fixed |
| `seriesBy` | string | No | TODO docs<br/>Possible values are: `min`, `max`, `last`. |
### ThresholdsConfig
| Property | Type | Required | Description |
|----------|---------------------------|----------|------------------------------------------------------------|
| `mode` | string | **Yes** | Possible values are: `absolute`, `percentage`. |
| `steps` | [Threshold](#threshold)[] | **Yes** | Must be sorted by 'value', first value is always -Infinity |
### Threshold
TODO docs
| Property | Type | Required | Description |
|----------|--------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| `color` | string | **Yes** | TODO docs |
| `state` | string | No | TODO docs<br/>TODO are the values here enumerable into a disjunction?<br/>Some seem to be listed in typescript comment |
| `value` | number | No | TODO docs<br/>FIXME the corresponding typescript field is required/non-optional, but nulls currently appear here when serializing -Infinity to JSON |
### ValueMapping
TODO docs
| Property | Type | Required | Description |
|----------|-------------------------------------------------------------------------------------------------------------------------------|----------|-------------|
| `object` | Possible types are: [ValueMap](#valuemap), [RangeMap](#rangemap), [RegexMap](#regexmap), [SpecialValueMap](#specialvaluemap). | | |
### RangeMap
TODO docs
| Property | Type | Required | Description |
|-----------|--------------------|----------|-------------|
| `options` | [object](#options) | **Yes** | |
| `type` | string | **Yes** | |
### Options
| Property | Type | Required | Description |
|----------|-------------------------------------------|----------|--------------------------------------------------------------------------------|
| `from` | number | **Yes** | to and from are `number &#124; null` in current ts, really not sure what to do |
| `result` | [ValueMappingResult](#valuemappingresult) | **Yes** | TODO docs |
| `to` | number | **Yes** | |
### ValueMappingResult
TODO docs
| Property | Type | Required | Description |
|----------|---------|----------|-------------|
| `color` | string | No | |
| `icon` | string | No | |
| `index` | integer | No | |
| `text` | string | No | |
### RegexMap
TODO docs
| Property | Type | Required | Description |
|-----------|--------------------|----------|-------------|
| `options` | [object](#options) | **Yes** | |
| `type` | string | **Yes** | |
### Options
| Property | Type | Required | Description |
|-----------|-------------------------------------------|----------|-------------|
| `pattern` | string | **Yes** | |
| `result` | [ValueMappingResult](#valuemappingresult) | **Yes** | TODO docs |
### SpecialValueMap
TODO docs
| Property | Type | Required | Description |
|-----------|--------------------|----------|-------------|
| `options` | [object](#options) | **Yes** | |
| `type` | string | **Yes** | |
### Options
| Property | Type | Required | Description |
|-----------|-------------------------------------------|----------|---------------------------------------|
| `match` | string | **Yes** | Possible values are: `true`, `false`. |
| `pattern` | string | **Yes** | |
| `result` | [ValueMappingResult](#valuemappingresult) | **Yes** | TODO docs |
### ValueMap
TODO docs
| Property | Type | Required | Description |
|-----------|------------------------------------------------------|----------|-------------|
| `options` | map[string][ValueMappingResult](#valuemappingresult) | **Yes** | |
| `type` | string | **Yes** | |
### Custom
custom is specified by the PanelFieldConfig field
in panel plugin schemas.
| Property | Type | Required | Description |
|----------|------|----------|-------------|
### Overrides
| Property | Type | Required | Description |
|--------------|---------------------------------------------|----------|-------------|
| `matcher` | [MatcherConfig](#matcherconfig) | **Yes** | |
| `properties` | [DynamicConfigValue](#dynamicconfigvalue)[] | **Yes** | |
### DynamicConfigValue
| Property | Type | Required | Description |
|----------|--------|----------|--------------|
| `id` | string | **Yes** | Default: ``. |
| `value` | | No | |
### GraphPanel
Support for legacy graph and heatmap panels.
| Property | Type | Required | Description |
|----------|-------------------|----------|----------------------------------------------------|
| `type` | string | **Yes** | Possible values are: `graph`. |
| `legend` | [object](#legend) | No | @deprecated this is part of deprecated graph panel |
### Legend
@deprecated this is part of deprecated graph panel
| Property | Type | Required | Description |
|------------|---------|----------|------------------|
| `show` | boolean | **Yes** | Default: `true`. |
| `sortDesc` | boolean | No | |
| `sort` | string | No | |
### GridPos
| Property | Type | Required | Description |
|----------|---------|----------|----------------------------------------------------|
| `h` | uint32 | **Yes** | Panel Default: `9`. |
| `w` | integer | **Yes** | Panel Default: `12`.<br/>Constraint: `>0 & <=24`. |
| `x` | integer | **Yes** | Panel x Default: `0`.<br/>Constraint: `>=0 & <24`. |
| `y` | uint32 | **Yes** | Panel y Default: `0`. |
| `static` | boolean | No | true if fixed |
### HeatmapPanel
| Property | Type | Required | Description |
|----------|--------|----------|---------------------------------|
| `type` | string | **Yes** | Possible values are: `heatmap`. |
### LibraryPanelRef
| Property | Type | Required | Description |
|----------|--------|----------|-------------|
| `name` | string | **Yes** | |
| `uid` | string | **Yes** | |
### Panel
Dashboard panels. Panels are canonically defined inline
because they share a version timeline with the dashboard
schema; they do not evolve independently.
| Property | Type | Required | Description |
|-------------------|---------------------------------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `fieldConfig` | [FieldConfigSource](#fieldconfigsource) | **Yes** | |
| `options` | [object](#options) | **Yes** | options is specified by the PanelOptions field in panel<br/>plugin schemas. |
| `repeatDirection` | string | **Yes** | Direction to repeat in if 'repeat' is set.<br/>"h" for horizontal, "v" for vertical.<br/>TODO this is probably optional<br/>Possible values are: `h`, `v`. Default: `h`. |
| `transformations` | [DataTransformerConfig](#datatransformerconfig)[] | **Yes** | |
| `transparent` | boolean | **Yes** | Whether to display the panel without a background. Default: `false`. |
| `type` | string | **Yes** | The panel plugin type id. May not be empty.<br/>Constraint: `length >=1`. |
| `datasource` | [object](#datasource) | No | The datasource used in all targets. |
| `description` | string | No | Description. |
| `gridPos` | [GridPos](#gridpos) | No | |
| `id` | uint32 | No | TODO docs |
| `interval` | string | No | TODO docs<br/>TODO tighter constraint |
| `libraryPanel` | [LibraryPanelRef](#librarypanelref) | No | |
| `links` | [DashboardLink](#dashboardlink)[] | No | Panel links.<br/>TODO fill this out - seems there are a couple variants? |
| `maxDataPoints` | number | No | TODO docs |
| `pluginVersion` | string | No | FIXME this almost certainly has to be changed in favor of scuemata versions |
| `repeatPanelId` | integer | No | Id of the repeating panel. |
| `repeat` | string | No | Name of template variable to repeat for. |
| `tags` | string[] | No | TODO docs |
| `targets` | [Target](#target)[] | No | TODO docs |
| `thresholds` | | No | TODO docs - seems to be an old field from old dashboard alerts? |
| `timeFrom` | string | No | TODO docs<br/>TODO tighter constraint |
| `timeRegions` | | No | TODO docs |
| `timeShift` | string | No | TODO docs<br/>TODO tighter constraint |
| `title` | string | No | Panel title. |
### FieldConfigSource
| Property | Type | Required | Description |
|-------------|-----------------------------|----------|-------------|
| `defaults` | [FieldConfig](#fieldconfig) | **Yes** | |
| `overrides` | [overrides](#overrides)[] | **Yes** | |
### FieldConfig
| Property | Type | Required | Description |
|---------------------|---------------------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `color` | [FieldColor](#fieldcolor) | No | TODO docs |
| `custom` | [custom](#custom) | No | custom is specified by the PanelFieldConfig field<br/>in panel plugin schemas. |
| `decimals` | number | No | Significant digits (for display) |
| `description` | string | No | Human readable field metadata |
| `displayNameFromDS` | string | No | This can be used by data sources that return and explicit naming structure for values and labels<br/>When this property is configured, this value is used rather than the default naming strategy. |
| `displayName` | string | No | The display value for this field. This supports template variables blank is auto |
| `filterable` | boolean | No | True if data source field supports ad-hoc filters |
| `links` | | No | The behavior when clicking on a result |
| `mappings` | [ValueMapping](#valuemapping)[] | No | Convert input values into a display string |
| `max` | number | No | |
| `min` | number | No | |
| `noValue` | string | No | Alternative to empty string |
| `path` | string | No | An explicit path to the field in the datasource. When the frame meta includes a path,<br/>This will default to `${frame.meta.path}/${field.name}<br/><br/>When defined, this value can be used as an identifier within the datasource scope, and<br/>may be used to update the results |
| `thresholds` | [ThresholdsConfig](#thresholdsconfig) | No | |
| `unit` | string | No | Numeric Options |
| `writeable` | boolean | No | True if data source can write a value to the path. Auth/authz are supported separately |
### RangeMap
TODO docs
| Property | Type | Required | Description |
|-----------|---------------------|----------|-------------|
| `options` | [options](#options) | **Yes** | |
| `type` | string | **Yes** | |
### RegexMap
TODO docs
| Property | Type | Required | Description |
|-----------|---------------------|----------|-------------|
| `options` | [options](#options) | **Yes** | |
| `type` | string | **Yes** | |
### SpecialValueMap
TODO docs
| Property | Type | Required | Description |
|-----------|---------------------|----------|-------------|
| `options` | [options](#options) | **Yes** | |
| `type` | string | **Yes** | |
### Target
Schema for panel targets is specified by datasource
plugins. We use a placeholder definition, which the Go
schema loader either left open/as-is with the Base
variant of the Dashboard and Panel families, or filled
with types derived from plugins in the Instance variant.
When working directly from CUE, importers can extend this
type directly to achieve the same effect.
| Property | Type | Required | Description |
|----------|------|----------|-------------|
### Datasource
The datasource used in all targets.
| Property | Type | Required | Description |
|----------|--------|----------|-------------|
| `type` | string | No | |
| `uid` | string | No | |
### Options
options is specified by the PanelOptions field in panel
plugin schemas.
| Property | Type | Required | Description |
|----------|------|----------|-------------|
### RowPanel
Row panel
| Property | Type | Required | Description |
|--------------|-----------------------|----------|------------------------------------------|
| `collapsed` | boolean | **Yes** | Default: `false`. |
| `id` | uint32 | **Yes** | |
| `panels` | [panels](#panels)[] | **Yes** | |
| `type` | string | **Yes** | Possible values are: `row`. |
| `datasource` | [object](#datasource) | No | Name of default datasource. |
| `gridPos` | [GridPos](#gridpos) | No | |
| `repeat` | string | No | Name of template variable to repeat for. |
| `title` | string | No | |
### Datasource
Name of default datasource.
| Property | Type | Required | Description |
|----------|--------|----------|-------------|
| `type` | string | No | |
| `uid` | string | No | |
### Panels
| Property | Type | Required | Description |
|----------|------------------------------------------------------------------------------------------------|----------|-------------|
| `object` | Possible types are: [Panel](#panel), [GraphPanel](#graphpanel), [HeatmapPanel](#heatmappanel). | | |
### GraphPanel
Support for legacy graph and heatmap panels.
| Property | Type | Required | Description |
|----------|-------------------|----------|----------------------------------------------------|
| `type` | string | **Yes** | Possible values are: `graph`. |
| `legend` | [legend](#legend) | No | @deprecated this is part of deprecated graph panel |
### Panel
Dashboard panels. Panels are canonically defined inline
because they share a version timeline with the dashboard
schema; they do not evolve independently.
| Property | Type | Required | Description |
|-------------------|---------------------------------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `fieldConfig` | [FieldConfigSource](#fieldconfigsource) | **Yes** | |
| `options` | [options](#options) | **Yes** | options is specified by the PanelOptions field in panel<br/>plugin schemas. |
| `repeatDirection` | string | **Yes** | Direction to repeat in if 'repeat' is set.<br/>"h" for horizontal, "v" for vertical.<br/>TODO this is probably optional<br/>Possible values are: `h`, `v`. Default: `h`. |
| `transformations` | [DataTransformerConfig](#datatransformerconfig)[] | **Yes** | |
| `transparent` | boolean | **Yes** | Whether to display the panel without a background. Default: `false`. |
| `type` | string | **Yes** | The panel plugin type id. May not be empty.<br/>Constraint: `length >=1`. |
| `datasource` | [datasource](#datasource) | No | The datasource used in all targets. |
| `description` | string | No | Description. |
| `gridPos` | [GridPos](#gridpos) | No | |
| `id` | uint32 | No | TODO docs |
| `interval` | string | No | TODO docs<br/>TODO tighter constraint |
| `libraryPanel` | [LibraryPanelRef](#librarypanelref) | No | |
| `links` | [DashboardLink](#dashboardlink)[] | No | Panel links.<br/>TODO fill this out - seems there are a couple variants? |
| `maxDataPoints` | number | No | TODO docs |
| `pluginVersion` | string | No | FIXME this almost certainly has to be changed in favor of scuemata versions |
| `repeatPanelId` | integer | No | Id of the repeating panel. |
| `repeat` | string | No | Name of template variable to repeat for. |
| `tags` | string[] | No | TODO docs |
| `targets` | [Target](#target)[] | No | TODO docs |
| `thresholds` | | No | TODO docs - seems to be an old field from old dashboard alerts? |
| `timeFrom` | string | No | TODO docs<br/>TODO tighter constraint |
| `timeRegions` | | No | TODO docs |
| `timeShift` | string | No | TODO docs<br/>TODO tighter constraint |
| `title` | string | No | Panel title. |
### Templating
TODO docs