2016-08-16 16:50:36 +02:00
< navbar icon = "icon-gf icon-gf-alert" title = "Alerting" title-url = "alerting" >
2016-07-25 16:26:28 +02:00
< a href = "alerting/notifications" class = "navbar-page-btn" >
< i class = "fa fa-fw fa-envelope-o" > < / i >
Notifications
< / a >
2016-06-16 14:29:20 +02:00
< / navbar >
< div class = "page-container" >
2016-10-01 17:14:45 +02:00
< div class = "page-header" >
< h1 > Alert notification< / h1 >
2016-06-16 14:29:20 +02:00
< / div >
2016-10-01 17:14:45 +02:00
< form name = "ctrl.theForm" >
< div class = "gf-form-group" >
< div class = "gf-form" >
< span class = "gf-form-label width-12" > Name< / span >
< input type = "text" required class = "gf-form-input max-width-15" ng-model = "ctrl.model.name" required > < / input >
< / div >
< div class = "gf-form" >
< span class = "gf-form-label width-12" > Type< / span >
< div class = "gf-form-select-wrapper width-15" >
2016-10-28 22:19:51 -07:00
< select class = "gf-form-input" ng-model = "ctrl.model.type" ng-options = "t for t in ['webhook', 'email', 'slack', 'pagerduty']" ng-change = "ctrl.typeChanged(notification, $index)" >
2016-10-01 17:14:45 +02:00
< / select >
< / div >
< / div >
< div class = "gf-form" >
2016-10-19 17:04:17 +02:00
< gf-form-switch
class="gf-form"
label="Send on all alerts"
label-class="width-12"
checked="ctrl.model.isDefault"
tooltip="Use this notification for all alerts">
2016-10-01 17:14:45 +02:00
< / gf-form-switch >
< / div >
< / div >
2016-07-22 16:45:17 +02:00
2016-10-01 17:14:45 +02:00
< div class = "gf-form-group" ng-if = "ctrl.model.type === 'webhook'" >
< h3 class = "page-heading" > Webhook settings< / h3 >
< div class = "gf-form" >
2016-10-18 16:18:16 +02:00
< span class = "gf-form-label width-10" > Url< / span >
2016-10-01 17:14:45 +02:00
< input type = "text" required class = "gf-form-input max-width-26" ng-model = "ctrl.model.settings.url" > < / input >
< / div >
2016-10-18 16:18:16 +02:00
< div class = "gf-form" >
< span class = "gf-form-label width-10" > Http Method< / span >
< div class = "gf-form-select-wrapper width-14" >
< select class = "gf-form-input" ng-model = "ctrl.model.settings.httpMethod" ng-options = "t for t in ['POST', 'PUT']" >
< / select >
2016-10-01 17:14:45 +02:00
< / div >
< / div >
2016-10-18 16:18:16 +02:00
< div class = "gf-form" >
< span class = "gf-form-label width-10" > Username< / span >
< input type = "text" class = "gf-form-input max-width-14" ng-model = "ctrl.model.settings.username" > < / input >
< / div >
< div class = "gf-form" >
< span class = "gf-form-label width-10" > Password< / span >
< input type = "text" class = "gf-form-input max-width-14" ng-model = "ctrl.model.settings.password" > < / input >
< / div >
2016-10-01 17:14:45 +02:00
< / div >
2016-07-25 16:26:28 +02:00
2016-10-01 17:14:45 +02:00
< div class = "gf-form-group" ng-if = "ctrl.model.type === 'slack'" >
< h3 class = "page-heading" > Slack settings< / h3 >
2016-11-01 08:46:31 +01:00
< div class = "gf-form max-width-30" >
2016-10-01 17:14:45 +02:00
< span class = "gf-form-label width-6" > Url< / span >
< input type = "text" required class = "gf-form-input max-width-30" ng-model = "ctrl.model.settings.url" placeholder = "Slack incoming webhook url" > < / input >
< / div >
2016-11-01 08:46:31 +01:00
< div class = "gf-form max-width-30" >
2016-10-31 14:46:51 -07:00
< span class = "gf-form-label width-6" > Recipient< / span >
2016-11-01 08:46:31 +01:00
< input type = "text"
class="gf-form-input max-width-30"
2016-10-31 14:46:51 -07:00
ng-model="ctrl.model.settings.recipient"
2016-11-01 08:46:31 +01:00
data-placement="right">
2016-10-31 14:46:51 -07:00
< / input >
2016-11-01 08:46:31 +01:00
< info-popover mode = "right-absolute" >
2016-11-02 12:42:27 -07:00
Override default channel or user, use #channel-name or @username
2016-11-01 08:46:31 +01:00
< / info-popover >
2016-10-31 14:46:51 -07:00
< / div >
2016-11-04 05:18:43 -07:00
< div class = "gf-form max-width-30" >
< span class = "gf-form-label width-6" > Mention< / span >
< input type = "text"
class="gf-form-input max-width-30"
ng-model="ctrl.model.settings.mention"
data-placement="right">
< / input >
< info-popover mode = "right-absolute" >
Mention a user or a group using @ when notifying in a channel
< / info-popover >
< / div >
2016-10-01 17:14:45 +02:00
< / div >
2016-07-27 12:09:55 +02:00
2016-10-01 17:14:45 +02:00
< div class = "gf-form-group section" ng-if = "ctrl.model.type === 'email'" >
< h3 class = "page-heading" > Email addresses< / h3 >
< div class = "gf-form" >
< textarea rows = "7" class = "gf-form-input width-25" required ng-model = "ctrl.model.settings.addresses" > < / textarea >
< / div >
2016-10-19 17:04:17 +02:00
< div class = "gf-form" >
2016-10-20 02:22:37 -07:00
< span > You can enter multiple email addresses using a ";" separator< / span >
2016-10-19 17:04:17 +02:00
< / div >
2016-10-01 17:14:45 +02:00
< / div >
2016-06-16 14:29:20 +02:00
2016-10-28 22:19:51 -07:00
< div class = "gf-form-group" ng-if = "ctrl.model.type === 'pagerduty'" >
< h3 class = "page-heading" > Pagerduty settings< / h3 >
< div class = "gf-form" >
< span class = "gf-form-label width-12" > Integration Key< / span >
< input type = "text" required class = "gf-form-input max-width-30" ng-model = "ctrl.model.settings.integrationKey" placeholder = "Pagerduty integeration Key" > < / input >
< / div >
< / div >
2016-10-01 17:14:45 +02:00
< div class = "gf-form-group" >
< div class = "gf-form-inline" >
< div class = "gf-form width-6" >
< button type = "submit" ng-click = "ctrl.save()" class = "btn btn-success" > Save< / button >
< / div >
< div class = "gf-form width-20" >
< div class = "gf-form" >
< button type = "submit" ng-click = "ctrl.testNotification()" class = "btn btn-secondary" > Send Test< / button >
< / div >
< / div >
< / div >
< / div >
< / form >
2016-06-16 14:29:20 +02:00
< / div >