tab_alerting.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <div class="gf-form-group" >
  2. <h5 class="section-heading">Alert Rule</h5>
  3. <div class="gf-form-inline">
  4. <div class="gf-form">
  5. <query-part-editor
  6. class="gf-form-label query-part"
  7. part="ctrl.valueQuery"
  8. part-updated="ctrl.valueQueryUpdated()">
  9. </query-part-editor>
  10. </div>
  11. <div class="gf-form">
  12. <span class="gf-form-label">Evaluate Against</span>
  13. <div class="gf-form-select-wrapper">
  14. <select class="gf-form-input"
  15. ng-model="ctrl.rule.evalFunc"
  16. ng-options="f.value as f.text for f in ctrl.evalFuncs"
  17. ng-change="ctrl.evalFuncChanged()"
  18. >
  19. </select>
  20. </div>
  21. </div>
  22. <div class="gf-form" ng-if="ctrl.secondParam === 'query'">
  23. <query-part-editor
  24. class="gf-form-label query-part"
  25. part="ctrl.evalQuery"
  26. part-updated="ctrl.evalQueryUpdated()">
  27. </query-part-editor>
  28. </div>
  29. <div class="gf-form" ng-if="ctrl.secondParam === 'duration'">
  30. <span class="gf-form-label">Duration</span>
  31. <input class="gf-form-input max-width-7" type="text" ng-model="ctrl.rule.evalStringParam1" ng-change="ctrl.ruleUpdated()"></input>
  32. </div>
  33. </div>
  34. </div>
  35. <div class="gf-form-group" >
  36. <h5 class="section-heading">Levels</h5>
  37. <div class="gf-form-inline">
  38. <div class="gf-form">
  39. <span class="gf-form-label">
  40. <i class="icon-gf icon-gf-warn alert-icon-warn"></i>
  41. Warn if value
  42. </span>
  43. <span class="gf-form-label">
  44. &gt;
  45. </span>
  46. <input class="gf-form-input max-width-7" type="number" ng-model="ctrl.rule.warnLevel" ng-change="alertTab.thresholdsUpdated()"></input>
  47. </div>
  48. <div class="gf-form">
  49. <span class="gf-form-label">
  50. <i class="icon-gf icon-gf-warn alert-icon-critical"></i>
  51. Critcal if value
  52. </span>
  53. <span class="gf-form-label">
  54. &gt;
  55. </span>
  56. <input class="gf-form-input max-width-7" type="number" ng-model="ctrl.rule.critLevel" ng-change="alertTab.thresholdsUpdated()"></input>
  57. </div>
  58. </div>
  59. </div>
  60. <!-- <div class="gf&#45;form"> -->
  61. <!-- <span class="gf&#45;form&#45;label width&#45;12">Aggregation method</span> -->
  62. <!-- <div class="gf&#45;form&#45;select&#45;wrapper max&#45;width&#45;10"> -->
  63. <!-- <select class="gf&#45;form&#45;input" -->
  64. <!-- ng&#45;model="ctrl.panel.alerting.aggregator" -->
  65. <!-- ng&#45;options="oper as oper for oper in alertTab.aggregators"></select> -->
  66. <!-- </div> -->
  67. <!-- </div> -->
  68. <!-- -->
  69. <!-- <div class="gf&#45;form"> -->
  70. <!-- <span class="gf&#45;form&#45;label width&#45;12">Query range (seconds)</span> -->
  71. <!-- <input class="gf&#45;form&#45;input max&#45;width&#45;10" type="number" -->
  72. <!-- ng&#45;model="ctrl.panel.alerting.queryRange" placeholder="3600"></input> -->
  73. <!-- </div> -->
  74. <!-- -->
  75. <!-- <div class="gf&#45;form"> -->
  76. <!-- <span class="gf&#45;form&#45;label width&#45;12">Frequency (seconds)</span> -->
  77. <!-- <input class="gf&#45;form&#45;input max&#45;width&#45;10" type="number" -->
  78. <!-- ng&#45;model="ctrl.panel.alerting.frequency" placeholder="60"></input> -->
  79. <!-- </div> -->
  80. <!-- </div> -->
  81. <div>
  82. <div class="gf-form-group section">
  83. <h5 class="section-heading">Alert info</h5>
  84. <div class="gf-form">
  85. <span class="gf-form-label width-10">Alert name</span>
  86. <input type="text" class="gf-form-input width-22" ng-model="ctrl.panel.alerting.name">
  87. </div>
  88. <div class="gf-form-inline">
  89. <div class="gf-form">
  90. <span class="gf-form-label width-10" style="margin-top: -73px;">Alert description</span>
  91. </div>
  92. <div class="gf-form">
  93. <textarea rows="5" ng-model="ctrl.panel.alerting.description" class="gf-form-input width-22"></textarea>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. <div class="editor-row">
  99. <div class="gf-form-button-row">
  100. <button class="btn btn-warning" ng-click="alertTab.markAsDeleted()">Delete Alert</button>
  101. </div>
  102. </div>