notification_edit.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <navbar model="ctrl.navModel"></navbar>
  2. <div class="page-container">
  3. <div class="page-header">
  4. <h1 ng-show="ctrl.model.id">Edit Channel</h1>
  5. <h1 ng-show="!ctrl.model.id">New Channel</h1>
  6. </div>
  7. <form name="ctrl.theForm" ng-if="ctrl.notifiers">
  8. <div class="gf-form-group">
  9. <div class="gf-form">
  10. <span class="gf-form-label width-12">Name</span>
  11. <input type="text" required class="gf-form-input max-width-15" ng-model="ctrl.model.name" required></input>
  12. </div>
  13. <div class="gf-form">
  14. <span class="gf-form-label width-12">Type</span>
  15. <div class="gf-form-select-wrapper width-15">
  16. <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)">
  17. </select>
  18. </div>
  19. </div>
  20. <gf-form-switch
  21. class="gf-form"
  22. label="Send on all alerts"
  23. label-class="width-12"
  24. checked="ctrl.model.isDefault"
  25. tooltip="Use this notification for all alerts">
  26. </gf-form-switch>
  27. <gf-form-switch
  28. class="gf-form"
  29. label="Include image"
  30. label-class="width-12"
  31. checked="ctrl.model.settings.uploadImage"
  32. tooltip="Captures an image and include it in the notification">
  33. </gf-form-switch>
  34. </div>
  35. <div class="gf-form-group" ng-include src="ctrl.notifierTemplateId">
  36. </div>
  37. <div class="gf-form-group">
  38. <div class="gf-form-inline">
  39. <div class="gf-form width-6">
  40. <button type="submit" ng-click="ctrl.save()" class="btn btn-success">Save</button>
  41. </div>
  42. <div class="gf-form width-20">
  43. <div class="gf-form">
  44. <button type="submit" ng-click="ctrl.testNotification()" class="btn btn-secondary">Send Test</button>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. </form>
  50. </div>