-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Description
What happened?
When a dashboard is created with an annotation toggled off (Saved via leaving 'Enabled' unselected in the annotation settings)
The annotation can be toggled on, but no annotation query is issued, so the annotations never render.
If you then edit the dashboard via the UI, even when the annotation is toggled on, the Enabled field is not selected.
What did you expect to happen?
It should be possible to save a dashboard with an annotation toggled off, and still have it function when the user opts to toggle it on after loading a dashboard
Did this work before?
Works as intened on 12.0.1
How do we reproduce it?
- Creat a dashboard with a random panel
- Add an annotation that should always display (i.e. a prometheus datasource with expression
vector(1) - Save the dashboard with the annotation
Enabledleft unticked. - Toggle the annotation in the dashboard on/off, annotation is never rendered
- Edit the annotation settings, selecting
Enabledand returning to the dashboard - Toggle the annotation in the dashboard on/off, annotation will now be renderec (and you can see the requests in network tools)
It seems the state of whether the annotation is enabled i.e. "When enabled the annotation query is issued every dashboard refresh", and whether it is default toggled are being conflated; so when you save the dashboard with the toggle off, you're also permanent disabling the query ever being issued.
The behaviour of this in previous versions was different
Is the bug inside a dashboard panel?
No response
Environment (with versions)?
Grafana: 12.1.0
OS: Ubuntu 22.04.5 LTS (Grafana published docker Ubuntu image)
Browser: Google Chrome 139.0.7258.139
Grafana platform?
Kubernetes
Datasource(s)?
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status