diff --git a/public/app/features/annotations/annotations_srv.ts b/public/app/features/annotations/annotations_srv.ts index c2422a63c27..e5660e294d9 100644 --- a/public/app/features/annotations/annotations_srv.ts +++ b/public/app/features/annotations/annotations_srv.ts @@ -144,6 +144,13 @@ export class AnnotationsSrv { } translateQueryResult(annotation, results) { + // if annotation has snapshotData + // make clone and remove it + if (annotation.snapshotData) { + annotation = angular.copy(annotation); + delete annotation.snapshotData; + } + for (var item of results) { item.source = annotation; item.min = item.time; diff --git a/public/app/features/annotations/event_manager.ts b/public/app/features/annotations/event_manager.ts index 85c41354c0d..6b8a58f0b57 100644 --- a/public/app/features/annotations/event_manager.ts +++ b/public/app/features/annotations/event_manager.ts @@ -58,7 +58,7 @@ export class EventManager { } addFlotEvents(annotations, flotOptions) { - if (!this.event || annotations.length === 0) { + if (!this.event && annotations.length === 0) { return; } diff --git a/public/app/features/annotations/partials/editor.html b/public/app/features/annotations/partials/editor.html index 5acc2bc60b4..8b71e23f467 100644 --- a/public/app/features/annotations/partials/editor.html +++ b/public/app/features/annotations/partials/editor.html @@ -65,7 +65,7 @@