notification_edit.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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-inline">
  40. <div class="gf-form">
  41. <span class="gf-form-label width-12" ng-if="ctrl.model.sendReminder">Send reminder every</span>
  42. <input
  43. class="gf-form-input max-width-15"
  44. type="text"
  45. ng-model="ctrl.model.frequency"
  46. ng-required="ctrl.model.sendReminder"
  47. ng-if="ctrl.model.sendReminder"
  48. spellcheck='false'
  49. placeholder='15m'></input>
  50. <info-popover mode="right-absolute">
  51. Specify at what interval you want reminder's about this alerting beeing triggered.
  52. Ex. 60s, 10m, 30m, 1h
  53. </info-popover>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="gf-form-group" ng-include src="ctrl.notifierTemplateId">
  58. </div>
  59. <div class="gf-form-group gf-form-button-row">
  60. <button type="submit" ng-click="ctrl.save()" class="btn btn-success width-7">Save</button>
  61. <button type="submit" ng-click="ctrl.testNotification()" class="btn btn-secondary width-7">Send Test</button>
  62. <a href="alerting/notifications" class="btn btn-inverse">Back</a>
  63. </div>
  64. </form>
  65. </div>