diff --git a/public/app/features/alerting/NotificationsEditCtrl.ts b/public/app/features/alerting/NotificationsEditCtrl.ts index 7ea0137ae29..f967e7924c1 100644 --- a/public/app/features/alerting/NotificationsEditCtrl.ts +++ b/public/app/features/alerting/NotificationsEditCtrl.ts @@ -4,6 +4,7 @@ import { getBackendSrv } from '@grafana/runtime'; import { AppEvents } from '@grafana/data'; import { IScope } from 'angular'; import { promiseToDigest } from '../../core/utils/promiseToDigest'; +import config from 'app/core/config'; export class AlertNotificationEditCtrl { theForm: any; @@ -27,6 +28,7 @@ export class AlertNotificationEditCtrl { isDefault: false, }; getFrequencySuggestion: any; + rendererAvailable: boolean; /** @ngInject */ constructor( @@ -43,6 +45,9 @@ export class AlertNotificationEditCtrl { return ['1m', '5m', '10m', '15m', '30m', '1h']; }; + this.defaults.settings.uploadImage = config.rendererAvailable; + this.rendererAvailable = config.rendererAvailable; + promiseToDigest(this.$scope)( getBackendSrv() .get(`/api/alert-notifiers`) diff --git a/public/app/features/alerting/partials/notification_edit.html b/public/app/features/alerting/partials/notification_edit.html index 81d52cb2681..77bf2a1e465 100644 --- a/public/app/features/alerting/partials/notification_edit.html +++ b/public/app/features/alerting/partials/notification_edit.html @@ -32,6 +32,16 @@ checked="ctrl.model.settings.uploadImage" tooltip="Captures an image and include it in the notification"> +
+ Grafana cannot find an image renderer to capture an image for the notification. + Please make sure the Grafana Image Renderer plugin is installed. +
++ Please contact your Grafana administrator to install the plugin. +
+