mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Scenes: Fix issue where annotations with same name wouldn't render properly (#85489)
Closes #85457
This commit is contained in:
parent
130d561924
commit
9537de26a5
@ -1,3 +1,5 @@
|
|||||||
|
import { uniqueId } from 'lodash';
|
||||||
|
|
||||||
import { DataFrameDTO, DataFrameJSON, TypedVariableModel } from '@grafana/data';
|
import { DataFrameDTO, DataFrameJSON, TypedVariableModel } from '@grafana/data';
|
||||||
import { config } from '@grafana/runtime';
|
import { config } from '@grafana/runtime';
|
||||||
import {
|
import {
|
||||||
@ -248,7 +250,7 @@ export function createDashboardSceneFromDashboardModel(oldModel: DashboardModel)
|
|||||||
annotationLayers = oldModel.annotations?.list.map((a) => {
|
annotationLayers = oldModel.annotations?.list.map((a) => {
|
||||||
// Each annotation query is an individual data layer
|
// Each annotation query is an individual data layer
|
||||||
return new DashboardAnnotationsDataLayer({
|
return new DashboardAnnotationsDataLayer({
|
||||||
key: `annotations-${a.name}`,
|
key: uniqueId('annotations-'),
|
||||||
query: a,
|
query: a,
|
||||||
name: a.name,
|
name: a.name,
|
||||||
isEnabled: Boolean(a.enable),
|
isEnabled: Boolean(a.enable),
|
||||||
|
Loading…
Reference in New Issue
Block a user