notification_edit.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <navbar icon="icon-gf icon-gf-monitoring" title="Alerting" title-url="alerting">
  2. <a href="alerting/notifications" class="navbar-page-btn">
  3. <i class="fa fa-fw fa-envelope-o"></i>
  4. Notifications
  5. </a>
  6. </navbar>
  7. <div class="page-container" >
  8. <div class="page-header">
  9. <h1>Alert notification</h1>
  10. </div>
  11. <div class="gf-form-group">
  12. <div class="gf-form">
  13. <span class="gf-form-label width-8">Name</span>
  14. <input type="text" class="gf-form-input max-width-15" ng-model="ctrl.model.name" required></input>
  15. </div>
  16. <div class="gf-form">
  17. <span class="gf-form-label width-8">Type</span>
  18. <div class="gf-form-select-wrapper width-15">
  19. <select class="gf-form-input"
  20. ng-model="ctrl.model.type"
  21. ng-options="t for t in ['webhook', 'email', 'slack']"
  22. ng-change="ctrl.typeChanged(notification, $index)">
  23. </select>
  24. </div>
  25. </div>
  26. </div>
  27. <div class="gf-form-group" ng-show="ctrl.model.type === 'webhook'">
  28. <h3 class="page-heading">Webhook settings</h3>
  29. <div class="gf-form">
  30. <span class="gf-form-label width-6">Url</span>
  31. <input type="text" class="gf-form-input max-width-26" ng-model="ctrl.model.settings.url"></input>
  32. </div>
  33. <div class="gf-form-inline">
  34. <div class="gf-form">
  35. <span class="gf-form-label width-6">Username</span>
  36. <input type="text" class="gf-form-input max-width-10" ng-model="ctrl.model.settings.username"></input>
  37. </div>
  38. <div class="gf-form">
  39. <span class="gf-form-label width-6">Password</span>
  40. <input type="text" class="gf-form-input max-width-10" ng-model="ctrl.model.settings.password"></input>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="gf-form-group" ng-show="ctrl.model.type === 'slack'">
  45. <h3 class="page-heading">Slack settings</h3>
  46. <div class="gf-form">
  47. <span class="gf-form-label width-6">Url</span>
  48. <input type="text" class="gf-form-input max-width-30" ng-model="ctrl.model.settings.url" placeholder="Slack incoming webhook url"></input>
  49. </div>
  50. </div>
  51. <div class="gf-form-group section" ng-show="ctrl.model.type === 'email'">
  52. <h3 class="page-heading">Email addresses</h3>
  53. <div class="gf-form">
  54. <textarea rows="7" class="gf-form-input width-25" ng-model="ctrl.model.settings.addresses"></textarea>
  55. </div>
  56. </div>
  57. <div class="gf-form-button-row">
  58. <button ng-click="ctrl.save()" class="btn btn-success">Save</button>
  59. </div>
  60. </div>