From 53381494153983e09f88d7da1ea4afd8eade998e Mon Sep 17 00:00:00 2001 From: rozetko Date: Thu, 4 Jul 2019 11:23:40 +0300 Subject: [PATCH] Disable alerts for webhook images rendering (#354) --- src/panel/graph_panel/graph_ctrl.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/panel/graph_panel/graph_ctrl.ts b/src/panel/graph_panel/graph_ctrl.ts index 60b8c57..abf2910 100644 --- a/src/panel/graph_panel/graph_ctrl.ts +++ b/src/panel/graph_panel/graph_ctrl.ts @@ -168,6 +168,11 @@ class GraphCtrl extends MetricsPanelCtrl { const grafanaUrlRegex = /^(.+)\/d/; const parsedUrl = window.location.href.match(grafanaUrlRegex); + // api-rendering parameter is added for webhook images rendering + // We disable alerts in this case + if(window.location.search.includes('api-rendering')) { + appEvents.emit = function() { }; + } if(parsedUrl !== null) { this._grafanaUrl = parsedUrl[1]; } else {