notification_edit.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. <div class="gf-form">
  19. <a class="gf-form-label width-12" ng-click="ctrl.model.notifyOnce = !ctrl.model.notifyOnce;">{{ ctrl.model.notifyOnce ? 'Notify on state change' : 'Notify at most every' }}</a>
  20. <input class="gf-form-input max-width-10" type="number" required ng-model="ctrl.model.frequency" required ng-hide="ctrl.model.notifyOnce"></input>
  21. <span class="gf-form-label max-width-5" ng-hide="ctrl.model.notifyOnce">seconds</span>
  22. </div>
  23. <gf-form-switch
  24. class="gf-form"
  25. label="Send on all alerts"
  26. label-class="width-12"
  27. checked="ctrl.model.isDefault"
  28. tooltip="Use this notification for all alerts">
  29. </gf-form-switch>
  30. <gf-form-switch
  31. class="gf-form"
  32. label="Include image"
  33. label-class="width-12"
  34. checked="ctrl.model.settings.uploadImage"
  35. tooltip="Captures an image and include it in the notification">
  36. </gf-form-switch>
  37. </div>
  38. <div class="gf-form-group" ng-include src="ctrl.notifierTemplateId">
  39. </div>
  40. <div class="gf-form-group gf-form-button-row">
  41. <button type="submit" ng-click="ctrl.save()" class="btn btn-success width-7">Save</button>
  42. <button type="submit" ng-click="ctrl.testNotification()" class="btn btn-secondary width-7">Send Test</button>
  43. <a href="alerting/notifications" class="btn btn-inverse">Back</a>
  44. </div>
  45. </form>
  46. </div>