notification_edit.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 reminder"
  35. label-class="width-12"
  36. checked="ctrl.model.sendReminder"
  37. tooltip="Choose to either notify on state change or at every interval">
  38. </gf-form-switch>
  39. <div class="gf-form">
  40. <span class="alert alert-info width-30" ng-if="ctrl.model.sendReminder">
  41. Alert reminders are sent after rules are evaluated. Therefore the alert rule interval has to be lower than the reminder frequency
  42. </span>
  43. </div>
  44. <div class="gf-form-inline">
  45. <div class="gf-form">
  46. <span class="gf-form-label width-12" ng-if="ctrl.model.sendReminder">Send reminder every</span>
  47. <input
  48. class="gf-form-input max-width-15"
  49. type="text"
  50. ng-model="ctrl.model.frequency"
  51. ng-required="ctrl.model.sendReminder"
  52. ng-if="ctrl.model.sendReminder"
  53. spellcheck='false'
  54. placeholder='15m'></input>
  55. <info-popover mode="right-absolute" ng-if="ctrl.model.sendReminder">
  56. Specify at what interval you want reminder's about this alerting being triggered.
  57. Ex. 60s, 10m, 30m, 1h
  58. </info-popover>
  59. </div>
  60. </div>
  61. </div>
  62. <div class="gf-form-group" ng-include src="ctrl.notifierTemplateId">
  63. </div>
  64. <div class="gf-form-group gf-form-button-row">
  65. <button type="submit" ng-click="ctrl.save()" class="btn btn-success width-7">Save</button>
  66. <button type="submit" ng-click="ctrl.testNotification()" class="btn btn-secondary width-7">Send Test</button>
  67. <a href="alerting/notifications" class="btn btn-inverse">Back</a>
  68. </div>
  69. </form>
  70. </div>