From 6034bf37c6b11c93476d950ed6cc3cd3fd0da0bf Mon Sep 17 00:00:00 2001 From: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com> Date: Fri, 23 Apr 2021 09:48:35 +0200 Subject: [PATCH] Fix showing of Loki query editor in Annotations (#33279) --- .../app/plugins/datasource/loki/LokiAnnotationsQueryCtrl.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/datasource/loki/LokiAnnotationsQueryCtrl.tsx b/public/app/plugins/datasource/loki/LokiAnnotationsQueryCtrl.tsx index 6bd42b26066..7bc7146ca34 100644 --- a/public/app/plugins/datasource/loki/LokiAnnotationsQueryCtrl.tsx +++ b/public/app/plugins/datasource/loki/LokiAnnotationsQueryCtrl.tsx @@ -4,10 +4,11 @@ import { LokiQuery } from './types'; */ export class LokiAnnotationsQueryCtrl { static templateUrl = 'partials/annotations.editor.html'; - annotation: any; + declare annotation: any; /** @ngInject */ - constructor() { + constructor($scope: any) { + this.annotation = $scope.ctrl.annotation; this.annotation.target = this.annotation.target || {}; this.onQueryChange = this.onQueryChange.bind(this); }