Dashboard Controls: Add annotations to the dashboard controls menu (#112816)
* feat: add a placement property to annotations model v2 * chore: update scenes to `v6.42.1` * chore: run `make gen-apps` * fix: cater for cases when there is no data layer * chore: swagger clean * chore: update api clients * fix: correct type guard * fix: display control labels in the default renderer as well for DashboardDataLayerSet
This commit is contained in:
@@ -968,6 +968,8 @@ type AnnotationQuery struct {
|
||||
Type *string `json:"type,omitempty"`
|
||||
// Set to 1 for the standard annotation query all dashboards have by default.
|
||||
BuiltIn *float64 `json:"builtIn,omitempty"`
|
||||
// Placement can be used to display the annotation query somewhere else on the dashboard other than the default location.
|
||||
Placement *string `json:"placement,omitempty"`
|
||||
}
|
||||
|
||||
// NewAnnotationQuery creates a new AnnotationQuery object.
|
||||
@@ -977,6 +979,7 @@ func NewAnnotationQuery() *AnnotationQuery {
|
||||
Enable: true,
|
||||
Hide: (func(input bool) *bool { return &input })(false),
|
||||
BuiltIn: (func(input float64) *float64 { return &input })(0),
|
||||
Placement: (func(input string) *string { return &input })(AnnotationQueryPlacement),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1019,6 +1022,10 @@ func NewAnnotationTarget() *AnnotationTarget {
|
||||
}
|
||||
}
|
||||
|
||||
// Annotation Query placement. Defines where the annotation query should be displayed.
|
||||
// - "inControlsMenu" renders the annotation query in the dashboard controls dropdown menu
|
||||
const AnnotationQueryPlacement = "inControlsMenu"
|
||||
|
||||
// A dashboard snapshot shares an interactive dashboard publicly.
|
||||
// It is a read-only version of a dashboard, and is not editable.
|
||||
// It is possible to create a snapshot of a snapshot.
|
||||
|
||||
Reference in New Issue
Block a user