notification_edit.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <page-header model="ctrl.navModel"></page-header>
  2. <div class="page-container page-body">
  3. <h3 class="page-sub-heading" ng-hide="ctrl.isNew">Edit Notification Channel</h3>
  4. <h3 class="page-sub-heading" ng-show="ctrl.isNew">New Notification Channel</h3>
  5. <form name="ctrl.theForm" ng-if="ctrl.notifiers">
  6. <div class="gf-form-group">
  7. <div class="gf-form">
  8. <span class="gf-form-label width-12">Name</span>
  9. <input type="text" required class="gf-form-input max-width-15" ng-model="ctrl.model.name" required></input>
  10. </div>
  11. <div class="gf-form">
  12. <span class="gf-form-label width-12">Type</span>
  13. <div class="gf-form-select-wrapper width-15">
  14. <select class="gf-form-input" ng-model="ctrl.model.type" ng-options="t.type as t.name for t in ctrl.notifiers" ng-change="ctrl.typeChanged(notification, $index)">
  15. </select>
  16. </div>
  17. </div>
  18. <gf-form-switch
  19. class="gf-form"
  20. label="Send on all alerts"
  21. label-class="width-12"
  22. checked="ctrl.model.isDefault"
  23. tooltip="Use this notification for all alerts">
  24. </gf-form-switch>
  25. <gf-form-switch
  26. class="gf-form"
  27. label="Include image"
  28. label-class="width-12"
  29. checked="ctrl.model.settings.uploadImage"
  30. tooltip="Captures an image and include it in the notification">
  31. </gf-form-switch>
  32. <gf-form-switch
  33. class="gf-form"
  34. label="Send reminders"
  35. label-class="width-12"
  36. checked="ctrl.model.sendReminder"
  37. tooltip="Send additional notifications for triggered alerts">
  38. </gf-form-switch>
  39. <div class="gf-form-inline">
  40. <div class="gf-form" ng-if="ctrl.model.sendReminder">
  41. <span class="gf-form-label width-12">Send reminder every
  42. <info-popover mode="right-normal" position="top center">
  43. Specify how often reminders should be sent, e.g. every 30s, 1m, 10m, 30m or 1h etc.
  44. </info-popover>
  45. </span>
  46. <input type="text" placeholder="Select or specify custom" class="gf-form-input width-15" ng-model="ctrl.model.frequency"
  47. bs-typeahead="ctrl.getFrequencySuggestion" data-min-length=0 ng-required="ctrl.model.sendReminder">
  48. </div>
  49. </div>
  50. <div class="gf-form">
  51. <span class="alert alert-info width-30" ng-if="ctrl.model.sendReminder">
  52. Alert reminders are sent after rules are evaluated. Therefore a reminder can never be sent earlier than a configured alert rule evaluation interval.
  53. </span>
  54. </div>
  55. </div>
  56. <div class="gf-form-group" ng-include src="ctrl.notifierTemplateId">
  57. </div>
  58. <div class="gf-form-group gf-form-button-row">
  59. <button type="submit" ng-click="ctrl.save()" class="btn btn-success width-7">Save</button>
  60. <button type="submit" ng-click="ctrl.testNotification()" class="btn btn-secondary width-7">Send Test</button>
  61. <a href="alerting/notifications" class="btn btn-inverse">Back</a>
  62. </div>
  63. </form>
  64. </div>