notification_edit.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <navbar icon="icon-gf icon-gf-alert" 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-group">
  58. <div class="gf-form-inline">
  59. <div class="gf-form width-6">
  60. <button ng-click="ctrl.save()" class="btn btn-success">Save</button>
  61. </div>
  62. <div class="gf-form width-8">
  63. <button ng-click="ctrl.toggleTest()" class="btn btn-secondary">Test</button>
  64. </div>
  65. <div class="gf-form width-20" ng-show="ctrl.showTest">
  66. <span class="gf-form-label width-13">Severity for test notification</span>
  67. <div class="gf-form-select-wrapper width-7">
  68. <select class="gf-form-input"
  69. ng-model="ctrl.testSeverity"
  70. ng-options="t for t in ['critical', 'warning', 'ok']">
  71. </select>
  72. </div>
  73. </div>
  74. <div class="gf-form" ng-show="ctrl.showTest">
  75. <button ng-click="ctrl.testNotification()" class="btn btn-secondary">Send</button>
  76. </div>
  77. </div>
  78. </div>
  79. </div>