mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Change cuetsy annotation "targetType" to "kind" (#38564)
Mirrors change made upstream in cuetsy
This commit is contained in:
parent
3df001db93
commit
96557ecadc
@ -1,47 +1,47 @@
|
|||||||
package schema
|
package schema
|
||||||
|
|
||||||
AxisPlacement: "auto" | "top" | "right" | "bottom" | "left" | "hidden" @cuetsy(targetType="enum")
|
AxisPlacement: "auto" | "top" | "right" | "bottom" | "left" | "hidden" @cuetsy(kind="enum")
|
||||||
PointVisibility: "auto" | "never" | "always" @cuetsy(targetType="enum")
|
PointVisibility: "auto" | "never" | "always" @cuetsy(kind="enum")
|
||||||
DrawStyle: "line" | "bars" | "points" @cuetsy(targetType="enum")
|
DrawStyle: "line" | "bars" | "points" @cuetsy(kind="enum")
|
||||||
LineInterpolation: "linear" | "smooth" | "stepBefore" | "stepAfter" @cuetsy(targetType="enum")
|
LineInterpolation: "linear" | "smooth" | "stepBefore" | "stepAfter" @cuetsy(kind="enum")
|
||||||
ScaleDistribution: "linear" | "log" @cuetsy(targetType="enum")
|
ScaleDistribution: "linear" | "log" @cuetsy(kind="enum")
|
||||||
GraphGradientMode: "none" | "opacity" | "hue" | "scheme" @cuetsy(targetType="enum")
|
GraphGradientMode: "none" | "opacity" | "hue" | "scheme" @cuetsy(kind="enum")
|
||||||
StackingMode: "none" | "normal" | "percent" @cuetsy(targetType="enum")
|
StackingMode: "none" | "normal" | "percent" @cuetsy(kind="enum")
|
||||||
BarValueVisibility: "auto" | "never" | "always" @cuetsy(targetType="enum")
|
BarValueVisibility: "auto" | "never" | "always" @cuetsy(kind="enum")
|
||||||
BarAlignment: -1 | 0 | 1 @cuetsy(targetType="enum",memberNames="Before|Center|After")
|
BarAlignment: -1 | 0 | 1 @cuetsy(kind="enum",memberNames="Before|Center|After")
|
||||||
ScaleOrientation: 0 | 1 @cuetsy(targetType="enum",memberNames="Horizontal|Vertical")
|
ScaleOrientation: 0 | 1 @cuetsy(kind="enum",memberNames="Horizontal|Vertical")
|
||||||
ScaleDirection: 1 | 1 | -1 | -1 @cuetsy(targetType="enum",memberNames="Up|Right|Down|Left")
|
ScaleDirection: 1 | 1 | -1 | -1 @cuetsy(kind="enum",memberNames="Up|Right|Down|Left")
|
||||||
LineStyle: {
|
LineStyle: {
|
||||||
fill?: "solid" | "dash" | "dot" | "square"
|
fill?: "solid" | "dash" | "dot" | "square"
|
||||||
dash?: [...number]
|
dash?: [...number]
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
LineConfig: {
|
LineConfig: {
|
||||||
lineColor?: string
|
lineColor?: string
|
||||||
lineWidth?: number
|
lineWidth?: number
|
||||||
lineInterpolation?: LineInterpolation
|
lineInterpolation?: LineInterpolation
|
||||||
lineStyle?: LineStyle
|
lineStyle?: LineStyle
|
||||||
spanNulls?: bool | number
|
spanNulls?: bool | number
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
BarConfig: {
|
BarConfig: {
|
||||||
barAlignment?: BarAlignment
|
barAlignment?: BarAlignment
|
||||||
barWidthFactor?: number
|
barWidthFactor?: number
|
||||||
barMaxWidth?: number
|
barMaxWidth?: number
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
FillConfig: {
|
FillConfig: {
|
||||||
fillColor?: string
|
fillColor?: string
|
||||||
fillOpacity?: number
|
fillOpacity?: number
|
||||||
fillBelowTo?: string
|
fillBelowTo?: string
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
PointsConfig: {
|
PointsConfig: {
|
||||||
showPoints?: PointVisibility
|
showPoints?: PointVisibility
|
||||||
pointSize?: number
|
pointSize?: number
|
||||||
pointColor?: string
|
pointColor?: string
|
||||||
pointSymbol?: string
|
pointSymbol?: string
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
ScaleDistributionConfig: {
|
ScaleDistributionConfig: {
|
||||||
type: ScaleDistribution
|
type: ScaleDistribution
|
||||||
log?: number
|
log?: number
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
AxisConfig: {
|
AxisConfig: {
|
||||||
axisPlacement?: AxisPlacement
|
axisPlacement?: AxisPlacement
|
||||||
axisLabel?: string
|
axisLabel?: string
|
||||||
@ -49,26 +49,26 @@ AxisConfig: {
|
|||||||
axisSoftMin?: number
|
axisSoftMin?: number
|
||||||
axisSoftMax?: number
|
axisSoftMax?: number
|
||||||
scaleDistribution?: ScaleDistributionConfig
|
scaleDistribution?: ScaleDistributionConfig
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
HideSeriesConfig: {
|
HideSeriesConfig: {
|
||||||
tooltip: bool
|
tooltip: bool
|
||||||
legend: bool
|
legend: bool
|
||||||
viz: bool
|
viz: bool
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
StackingConfig: {
|
StackingConfig: {
|
||||||
mode?: StackingMode
|
mode?: StackingMode
|
||||||
group?: string
|
group?: string
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
StackableFieldConfig: {
|
StackableFieldConfig: {
|
||||||
stacking?: StackingConfig
|
stacking?: StackingConfig
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
HideableFieldConfig: {
|
HideableFieldConfig: {
|
||||||
hideFrom?: HideSeriesConfig
|
hideFrom?: HideSeriesConfig
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
GraphTresholdsStyleMode: "off" | "line" | "area" | "line+area" | "series" @cuetsy(targetType="enum",memberNames="Off|Line|Area|LineAndArea|Series")
|
GraphTresholdsStyleMode: "off" | "line" | "area" | "line+area" | "series" @cuetsy(kind="enum",memberNames="Off|Line|Area|LineAndArea|Series")
|
||||||
GraphThresholdsStyleConfig: {
|
GraphThresholdsStyleConfig: {
|
||||||
mode: GraphTresholdsStyleMode
|
mode: GraphTresholdsStyleMode
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
GraphFieldConfig: {
|
GraphFieldConfig: {
|
||||||
LineConfig
|
LineConfig
|
||||||
FillConfig
|
FillConfig
|
||||||
@ -80,4 +80,4 @@ GraphFieldConfig: {
|
|||||||
drawStyle?: DrawStyle
|
drawStyle?: DrawStyle
|
||||||
gradientMode?: GraphGradientMode
|
gradientMode?: GraphGradientMode
|
||||||
thresholdsStyle?: GraphThresholdsStyleConfig
|
thresholdsStyle?: GraphThresholdsStyleConfig
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package schema
|
package schema
|
||||||
|
|
||||||
LegendPlacement: "bottom" | "right" @cuetsy(targetType="type")
|
LegendPlacement: "bottom" | "right" @cuetsy(kind="type")
|
||||||
|
|
||||||
LegendDisplayMode: "list" | "table" | "hidden" @cuetsy(targetType="enum")
|
LegendDisplayMode: "list" | "table" | "hidden" @cuetsy(kind="enum")
|
||||||
|
|
||||||
VizLegendOptions: {
|
VizLegendOptions: {
|
||||||
displayMode: LegendDisplayMode
|
displayMode: LegendDisplayMode
|
||||||
@ -10,4 +10,4 @@ VizLegendOptions: {
|
|||||||
asTable: bool | *false
|
asTable: bool | *false
|
||||||
isVisible: bool | *false
|
isVisible: bool | *false
|
||||||
calcs: [...string]
|
calcs: [...string]
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
|
@ -6,13 +6,13 @@ package schema
|
|||||||
TableSortByFieldState: {
|
TableSortByFieldState: {
|
||||||
displayName: string
|
displayName: string
|
||||||
desc?: bool
|
desc?: bool
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
|
|
||||||
SingleStatBaseOptions: {
|
SingleStatBaseOptions: {
|
||||||
OptionsWithTextFormatting
|
OptionsWithTextFormatting
|
||||||
reduceOptions: ReduceDataOptions
|
reduceOptions: ReduceDataOptions
|
||||||
orientation: VizOrientation
|
orientation: VizOrientation
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
// TODO copy back to appropriate place
|
// TODO copy back to appropriate place
|
||||||
ReduceDataOptions: {
|
ReduceDataOptions: {
|
||||||
// If true show each row value
|
// If true show each row value
|
||||||
@ -23,31 +23,31 @@ ReduceDataOptions: {
|
|||||||
calcs: [...string]
|
calcs: [...string]
|
||||||
// Which fields to show. By default this is only numeric fields
|
// Which fields to show. By default this is only numeric fields
|
||||||
fields?: string
|
fields?: string
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
// TODO copy back to appropriate place
|
// TODO copy back to appropriate place
|
||||||
VizOrientation: "auto" | "vertical" | "horizontal" @cuetsy(targetType="enum")
|
VizOrientation: "auto" | "vertical" | "horizontal" @cuetsy(kind="enum")
|
||||||
// TODO copy back to appropriate place
|
// TODO copy back to appropriate place
|
||||||
OptionsWithTooltip: {
|
OptionsWithTooltip: {
|
||||||
// FIXME this field is non-optional in the corresponding TS type
|
// FIXME this field is non-optional in the corresponding TS type
|
||||||
tooltip?: VizTooltipOptions
|
tooltip?: VizTooltipOptions
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
// TODO copy back to appropriate place
|
// TODO copy back to appropriate place
|
||||||
OptionsWithLegend: {
|
OptionsWithLegend: {
|
||||||
// FIXME this field is non-optional in the corresponding TS type
|
// FIXME this field is non-optional in the corresponding TS type
|
||||||
legend?: VizLegendOptions
|
legend?: VizLegendOptions
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
// TODO copy back to appropriate place
|
// TODO copy back to appropriate place
|
||||||
OptionsWithTextFormatting: {
|
OptionsWithTextFormatting: {
|
||||||
text?: VizTextDisplayOptions
|
text?: VizTextDisplayOptions
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
// TODO copy back to appropriate place
|
// TODO copy back to appropriate place
|
||||||
BigValueColorMode: "value" | "background" | "none" @cuetsy(targetType="enum")
|
BigValueColorMode: "value" | "background" | "none" @cuetsy(kind="enum")
|
||||||
// TODO copy back to appropriate place
|
// TODO copy back to appropriate place
|
||||||
BigValueGraphMode: "none" | "line" | "area" @cuetsy(targetType="enum")
|
BigValueGraphMode: "none" | "line" | "area" @cuetsy(kind="enum")
|
||||||
// TODO copy back to appropriate place
|
// TODO copy back to appropriate place
|
||||||
BigValueJustifyMode: "auto" | "center" @cuetsy(targetType="enum")
|
BigValueJustifyMode: "auto" | "center" @cuetsy(kind="enum")
|
||||||
// TODO copy back to appropriate place
|
// TODO copy back to appropriate place
|
||||||
// TODO does cuetsy handle underscores the expected way?
|
// TODO does cuetsy handle underscores the expected way?
|
||||||
BigValueTextMode: "auto" | "value" | "value_and_name" | "name" | "none" @cuetsy(targetType="enum")
|
BigValueTextMode: "auto" | "value" | "value_and_name" | "name" | "none" @cuetsy(kind="enum")
|
||||||
// TODO copy back to appropriate place
|
// TODO copy back to appropriate place
|
||||||
BarGaugeDisplayMode: "basic" | "lcd" | "gradient" @cuetsy(targetType="enum")
|
BarGaugeDisplayMode: "basic" | "lcd" | "gradient" @cuetsy(kind="enum")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package schema
|
package schema
|
||||||
|
|
||||||
// TODO -- should not be table specific!
|
// TODO -- should not be table specific!
|
||||||
FieldTextAlignment: "auto" | "left" | "right" | "center" @cuetsy(targetType="type")
|
FieldTextAlignment: "auto" | "left" | "right" | "center" @cuetsy(kind="type")
|
||||||
|
|
||||||
// FIXME can't write enums as structs, must use disjunctions
|
// FIXME can't write enums as structs, must use disjunctions
|
||||||
TableCellDisplayMode: {
|
TableCellDisplayMode: {
|
||||||
@ -13,11 +13,11 @@ TableCellDisplayMode: {
|
|||||||
JSONView: "json-view"
|
JSONView: "json-view"
|
||||||
BasicGauge: "basic"
|
BasicGauge: "basic"
|
||||||
Image: "image"
|
Image: "image"
|
||||||
} @cuetsy(targetType="enum")
|
} @cuetsy(kind="enum")
|
||||||
|
|
||||||
TableFieldOptions: {
|
TableFieldOptions: {
|
||||||
width?: number
|
width?: number
|
||||||
align: FieldTextAlignment | *"auto"
|
align: FieldTextAlignment | *"auto"
|
||||||
displayMode: TableCellDisplayMode | *"auto"
|
displayMode: TableCellDisplayMode | *"auto"
|
||||||
hidden?: bool // ?? default is missing or false ??
|
hidden?: bool // ?? default is missing or false ??
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
|
@ -5,4 +5,4 @@ VizTextDisplayOptions: {
|
|||||||
titleSize?: number
|
titleSize?: number
|
||||||
// Explicit value text size
|
// Explicit value text size
|
||||||
valueSize?: number
|
valueSize?: number
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package schema
|
package schema
|
||||||
|
|
||||||
TooltipDisplayMode: "single" | "multi" | "none" @cuetsy(targetType="enum")
|
TooltipDisplayMode: "single" | "multi" | "none" @cuetsy(kind="enum")
|
||||||
|
|
||||||
VizTooltipOptions: {
|
VizTooltipOptions: {
|
||||||
mode: TooltipDisplayMode
|
mode: TooltipDisplayMode
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
|
@ -76,10 +76,10 @@ Family: scuemata.#Family & {
|
|||||||
panels?: [...(#Panel | #GraphPanel | #RowPanel)]
|
panels?: [...(#Panel | #GraphPanel | #RowPanel)]
|
||||||
|
|
||||||
// TODO docs
|
// TODO docs
|
||||||
#FieldColorModeId: "thresholds" | "palette-classic" | "palette-saturated" | "continuous-GrYlRd" | "fixed" @cuetsy(targetType="enum")
|
#FieldColorModeId: "thresholds" | "palette-classic" | "palette-saturated" | "continuous-GrYlRd" | "fixed" @cuetsy(kind="enum")
|
||||||
|
|
||||||
// TODO docs
|
// TODO docs
|
||||||
#FieldColorSeriesByMode: "min" | "max" | "last" @cuetsy(targetType="type")
|
#FieldColorSeriesByMode: "min" | "max" | "last" @cuetsy(kind="type")
|
||||||
|
|
||||||
// TODO docs
|
// TODO docs
|
||||||
#FieldColor: {
|
#FieldColor: {
|
||||||
@ -89,7 +89,7 @@ Family: scuemata.#Family & {
|
|||||||
fixedColor?: string
|
fixedColor?: string
|
||||||
// Some visualizations need to know how to assign a series color from by value color schemes
|
// Some visualizations need to know how to assign a series color from by value color schemes
|
||||||
seriesBy?: #FieldColorSeriesByMode
|
seriesBy?: #FieldColorSeriesByMode
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
|
|
||||||
// TODO docs
|
// TODO docs
|
||||||
#Threshold: {
|
#Threshold: {
|
||||||
@ -102,16 +102,16 @@ Family: scuemata.#Family & {
|
|||||||
// TODO are the values here enumerable into a disjunction?
|
// TODO are the values here enumerable into a disjunction?
|
||||||
// Some seem to be listed in typescript comment
|
// Some seem to be listed in typescript comment
|
||||||
state?: string
|
state?: string
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
|
|
||||||
#ThresholdsMode: "absolute" | "percentage" @cuetsy(targetType="enum")
|
#ThresholdsMode: "absolute" | "percentage" @cuetsy(kind="enum")
|
||||||
|
|
||||||
#ThresholdsConfig: {
|
#ThresholdsConfig: {
|
||||||
mode: #ThresholdsMode
|
mode: #ThresholdsMode
|
||||||
|
|
||||||
// Must be sorted by 'value', first value is always -Infinity
|
// Must be sorted by 'value', first value is always -Infinity
|
||||||
steps: [...#Threshold]
|
steps: [...#Threshold]
|
||||||
} @cuetsy(targetType="interface")
|
} @cuetsy(kind="interface")
|
||||||
|
|
||||||
// TODO docs
|
// TODO docs
|
||||||
// FIXME this is extremely underspecfied; wasn't obvious which typescript types corresponded to it
|
// FIXME this is extremely underspecfied; wasn't obvious which typescript types corresponded to it
|
||||||
|
@ -22,8 +22,8 @@ Family: {
|
|||||||
lineages: [
|
lineages: [
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
#TimelineMode: "changes" | "samples" @cuetsy(targetType="enum")
|
#TimelineMode: "changes" | "samples" @cuetsy(kind="enum")
|
||||||
#TimelineValueAlignment: "center" | "left" | "right" @cuetsy(targetType="type")
|
#TimelineValueAlignment: "center" | "left" | "right" @cuetsy(kind="type")
|
||||||
PanelOptions: {
|
PanelOptions: {
|
||||||
// FIXME ts comments indicate this shouldn't be in the saved model, but currently is emitted
|
// FIXME ts comments indicate this shouldn't be in the saved model, but currently is emitted
|
||||||
mode?: #TimelineMode
|
mode?: #TimelineMode
|
||||||
|
@ -18,7 +18,7 @@ Family: {
|
|||||||
lineages: [
|
lineages: [
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
TextMode: "html" | "markdown" @cuetsy(targetType="enum",withName="TextMode")
|
TextMode: "html" | "markdown" @cuetsy(kind="enum",withName="TextMode")
|
||||||
|
|
||||||
PanelOptions: {
|
PanelOptions: {
|
||||||
mode: TextMode | *"markdown"
|
mode: TextMode | *"markdown"
|
||||||
|
Loading…
Reference in New Issue
Block a user