[v8.1.x] Annotations: Fix Datasource as template variable not available for annotations (#37507)

(cherry picked from commit d48e65bf74)

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2021-08-03 20:28:54 +02:00
committed by GitHub
co-authored by Maria Alexandra
parent f8b8b4f578
commit e3a270a041
@@ -79,7 +79,13 @@ export const AnnotationSettingsEdit: React.FC<Props> = ({ editIdx, dashboard })
/>
</Field>
<Field label="Data source">
<DataSourcePicker width={50} annotations current={annotation.datasource} onChange={onDataSourceChange} />
<DataSourcePicker
width={50}
annotations
variables
current={annotation.datasource}
onChange={onDataSourceChange}
/>
</Field>
<Field label="Enabled" description="When enabled the annotation query is issued every dashboard refresh">
<Checkbox name="enable" id="enable" value={annotation.enable} onChange={onChange} />