Transformations: Add frame source picker to allow transforming annotations (#77842)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
Leon Sorokin
2024-01-02 23:33:31 -06:00
committed by GitHub
co-authored by Ryan McKinley
parent a5957ba555
commit fb79be4a43
16 changed files with 165 additions and 56 deletions
+13
View File
@@ -26,6 +26,13 @@ const (
LinkTypeLink LinkType = "link"
)
// Defines values for DataTransformerConfigTopic.
const (
DataTransformerConfigTopicAlertStates DataTransformerConfigTopic = "alertStates"
DataTransformerConfigTopicAnnotations DataTransformerConfigTopic = "annotations"
DataTransformerConfigTopicSeries DataTransformerConfigTopic = "series"
)
// Defines values for FieldColorModeId.
const (
FieldColorModeIdContinuousBlPu FieldColorModeId = "continuous-BlPu"
@@ -294,8 +301,14 @@ type DataTransformerConfig struct {
// Options to be passed to the transformer
// Valid options depend on the transformer id
Options any `json:"options"`
// Where to pull DataFrames from as input to transformation
Topic *DataTransformerConfigTopic `json:"topic,omitempty"`
}
// Where to pull DataFrames from as input to transformation
type DataTransformerConfigTopic string
// DynamicConfigValue defines model for DynamicConfigValue.
type DynamicConfigValue struct {
Id string `json:"id"`