case.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {% extends "portal/layout.html" %}
  2. {% block content %}
  3. <div class="panel panel-danger">
  4. <div class="panel-heading">
  5. <h4 class="panel-title">{{_('alerting cases')}}
  6. <a class="pull-right small" href="/portal/alarm-dash/case?status=PROBLEM">{{_('not recovered cases')}}</a>
  7. </h4>
  8. </div>
  9. <div class="panel-body">
  10. <div class="alarms">
  11. {%for case in cases%}
  12. <div class="alarm">
  13. <input type="checkbox" alarm="{{case.id}}">
  14. {{case.status}} P{{case.priority}}
  15. [第<span class="orange">#{{case.current_step}}</span>次/最大{{case.max_step}}次]
  16. <span class="orange">{{case.timestamp|time_duration}}</span>
  17. <span class="gray">[</span>
  18. <a href="/portal/template/view/{{case.template_id}}" target="_blank">template</a>
  19. {%if case.strategy_id>0%}
  20. <span class="cut-line">¦</span>
  21. <a href="/portal/strategy/{{case.strategy_id}}" target="_blank">strategy</a>
  22. {%endif%}
  23. {%if case.expression_id>0%}
  24. <span class="cut-line">¦</span>
  25. <a href="/portal/expression/view/{{case.expression_id}}" target="_blank">expression</a>
  26. {%endif%}
  27. <span class="cut-line">¦</span>
  28. <a href="javascript:alarm_case_rm('{{case.id}}');">delete</a>
  29. <span class="cut-line">¦</span>
  30. <a href="/portal/alarm-dash/case/event?case_id={{case.id}}">{{_('event list')}}</a>
  31. <span class="gray">]</span>
  32. </br>
  33. <span style="padding-left:17px;"> {{case.endpoint}}
  34. <span class="cut-line">¦</span>
  35. {{case.metric}}
  36. <span class="cut-line">¦</span>
  37. {{case.func}}
  38. <span class="cut-line">¦</span>
  39. {{case.cond}}</span>
  40. <span class="cut-line">¦</span>
  41. <span class="gray">note: {{case.note}}</span>
  42. </div>
  43. <hr>
  44. {%endfor%}
  45. <a href="javascript:alarm_case_all_select();">{{_('select all')}}</a>/
  46. <a href="javascript:alarm_case_reverse_select();">{{_('reverse select')}}</a>
  47. <button class="btn btn-warning btn-sm" onclick="alarm_case_batch_rm();">{{_('batch delete')}}</button>
  48. </div>
  49. </div>
  50. {% import "portal/blocks.html" as blocks %}
  51. <div class="pull-left">
  52. {{ blocks.pager('/portal/alarm-dash/case?status='+status, total, limit, page) }}
  53. </div>
  54. </div>
  55. {%endblock%}