Browse Source

Disable alerts for webhook images rendering (#354)

master
rozetko 6 years ago committed by GitHub
parent
commit
5338149415
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/panel/graph_panel/graph_ctrl.ts

5
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 {

Loading…
Cancel
Save