notification_edit.html 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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-14"
  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-14"
  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="Disable Resolve Message"
  35. label-class="width-14"
  36. checked="ctrl.model.disableResolveMessage"
  37. tooltip="Disable the resolve message [OK] that is sent when alerting state returns to false">
  38. </gf-form-switch>
  39. <gf-form-switch
  40. class="gf-form"
  41. label="Send reminders"
  42. label-class="width-14"
  43. checked="ctrl.model.sendReminder"
  44. tooltip="Send additional notifications for triggered alerts">
  45. </gf-form-switch>
  46. <div class="gf-form-inline">
  47. <div class="gf-form" ng-if="ctrl.model.sendReminder">
  48. <span class="gf-form-label width-12">Send reminder every
  49. <info-popover mode="right-normal" position="top center">
  50. Specify how often reminders should be sent, e.g. every 30s, 1m, 10m, 30m or 1h etc.
  51. </info-popover>
  52. </span>
  53. <input type="text" placeholder="Select or specify custom" class="gf-form-input width-15" ng-model="ctrl.model.frequency"
  54. bs-typeahead="ctrl.getFrequencySuggestion" data-min-length=0 ng-required="ctrl.model.sendReminder">
  55. </div>
  56. </div>
  57. <div class="gf-form">
  58. <span class="alert alert-info width-30" ng-if="ctrl.model.sendReminder">
  59. Alert reminders are sent after rules are evaluated. Therefore a reminder can never be sent more frequently than a configured alert rule evaluation interval.
  60. </span>
  61. </div>
  62. </div>
  63. <div class="gf-form-group" ng-include src="ctrl.notifierTemplateId">
  64. </div>
  65. <div class="gf-form-group gf-form-button-row">
  66. <button type="submit" ng-click="ctrl.save()" class="btn btn-success width-7">Save</button>
  67. <button type="submit" ng-click="ctrl.testNotification()" class="btn btn-secondary width-7">Send Test</button>
  68. <a href="alerting/notifications" class="btn btn-inverse">Back</a>
  69. </div>
  70. </form>
  71. </div>