diff --git a/public/app/features/annotations/event_manager.ts b/public/app/features/annotations/event_manager.ts index 7e1ca41ca6c..6613c17a67a 100644 --- a/public/app/features/annotations/event_manager.ts +++ b/public/app/features/annotations/event_manager.ts @@ -57,7 +57,7 @@ export class EventManager { this.panelCtrl.render(); } - addPlotEvents(annotations) { + addFlotEvents(annotations, flotOptions) { if (this.event || annotations.length === 0) { return; } @@ -108,7 +108,7 @@ export class EventManager { } } - options.events = { + flotOptions.events = { levels: _.keys(types).length + 1, data: annotations, types: types, diff --git a/public/app/plugins/panel/graph/graph.ts b/public/app/plugins/panel/graph/graph.ts index 9eebae31874..d6e054152ec 100755 --- a/public/app/plugins/panel/graph/graph.ts +++ b/public/app/plugins/panel/graph/graph.ts @@ -330,8 +330,8 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv, popoverSrv) { } } - thresholdManager.addPlotOptions(options, panel); - eventManager.addPlotEvents(annotations, options); + thresholdManager.addFlotOptions(options, panel); + eventManager.addFlotEvents(annotations, options); configureAxisOptions(data, options); sortedSeries = _.sortBy(data, function(series) { return series.zindex; }); diff --git a/public/app/plugins/panel/graph/specs/threshold_manager_specs.ts b/public/app/plugins/panel/graph/specs/threshold_manager_specs.ts index de598ea73ed..742ce69ec7c 100644 --- a/public/app/plugins/panel/graph/specs/threshold_manager_specs.ts +++ b/public/app/plugins/panel/graph/specs/threshold_manager_specs.ts @@ -21,7 +21,7 @@ describe('ThresholdManager', function() { ctx.setup = function(thresholds) { ctx.panel.thresholds = thresholds; var manager = new ThresholdManager(ctx.panelCtrl); - manager.addPlotOptions(ctx.options, ctx.panel); + manager.addFlotOptions(ctx.options, ctx.panel); }; func(ctx); diff --git a/public/app/plugins/panel/graph/threshold_manager.ts b/public/app/plugins/panel/graph/threshold_manager.ts index 645046690fd..03e3ae3c737 100644 --- a/public/app/plugins/panel/graph/threshold_manager.ts +++ b/public/app/plugins/panel/graph/threshold_manager.ts @@ -158,7 +158,7 @@ export class ThresholdManager { this.needsCleanup = true; } - addPlotOptions(options, panel) { + addFlotOptions(options, panel) { if (!panel.thresholds || panel.thresholds.length === 0) { return; }