AnnotationQuery🔗
TODO docs
FROM: AnnotationQuery in grafana-data/src/types/annotations.ts
Definition🔗
class AnnotationQuery:
"""
TODO docs
FROM: AnnotationQuery in grafana-data/src/types/annotations.ts
"""
# Name of annotation.
name: str
# Datasource where the annotations data is
datasource: typing.Optional[common.DataSourceRef]
# When enabled the annotation query is issued with every dashboard refresh
enable: bool
# Annotation queries can be toggled on or off at the top of the dashboard.
# When hide is true, the toggle is not shown in the dashboard.
hide: typing.Optional[bool]
# Color to use for the annotation event markers
icon_color: str
# Filters to apply when fetching annotations
filter_val: typing.Optional[dashboard.AnnotationPanelFilter]
# TODO.. this should just be a normal query target
target: typing.Optional[cogvariants.Dataquery]
# TODO -- this should not exist here, it is based on the --grafana-- datasource
type_val: typing.Optional[str]
# Set to 1 for the standard annotation query all dashboards have by default.
built_in: typing.Optional[float]
# Placement can be used to display the annotation query somewhere else on the dashboard other than the default location.
placement: str
expr: typing.Optional[str]
# Format for Prometheus annotation text. Label values can be interpolated with templates like {{instance}}.
text_format: typing.Optional[str]
# Format for Prometheus and Loki annotation titles. Label values can be interpolated with templates like {{instance}}.
title_format: typing.Optional[str]
# Comma-separated label keys used as annotation tags.
tag_keys: typing.Optional[str]
# Legacy Prometheus annotation query step interval.
step: typing.Optional[str]
# Use the Prometheus series value as the annotation timestamp.
use_value_for_time: typing.Optional[bool]
# Mappings define how to convert data frame fields to annotation event fields.
mappings: typing.Optional[dict[str, dashboard.AnnotationEventFieldMapping]]
Methods🔗
to_json🔗
Converts this object into a representation that can easily be encoded to JSON.
from_json🔗
Builds this object from a JSON-decoded dict.