case_events.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {% extends "portal/layout.html" %}
  2. {% block content %}
  3. <div class="panel panel-danger">
  4. <div class="panel-heading">
  5. <h4 class="panel-title">case:{{case.id}} {{_('event list')}}
  6. <a href="/portal/alarm-dash/case" class="pull-right small">{{_('back')}}</a></h4>
  7. </div>
  8. <div class="panel-body">
  9. <div class="alarms">
  10. {%for evt in case_events%}
  11. <div class="alarm">
  12. <input type="checkbox" alarm="{{evt.id}}">
  13. {%if evt.status==0%}PROBLEM{%else%}OK{%endif%} P{{case.priority}}
  14. [第<span class="orange">#{{evt.step}}</span>次/最大{{case.max_step}}次]
  15. <span class="orange">{{evt.timestamp|time_duration}}</span>
  16. <span class="gray">[</span>
  17. <a href="javascript:alarm_case_event_rm('{{evt.id}}');">delete</a>
  18. <span class="gray">]</span>
  19. <br/>
  20. <span style="padding-left:17px;"> {{case.endpoint}}
  21. <span class="cut-line">¦</span>
  22. {{case.metric}}
  23. <span class="cut-line">¦</span>
  24. {{case.func}}
  25. <span class="cut-line">¦</span>
  26. {{evt.cond}}</span>
  27. <span class="cut-line">¦</span>
  28. <span class="gray">note: {{case.note}}</span>
  29. </div>
  30. <hr>
  31. {%endfor%}
  32. <a href="javascript:alarm_case_event_all_select();">{{_('select all')}}</a>/
  33. <a href="javascript:alarm_case_event_reverse_select();">{{_('reverse select')}}</a>
  34. <button class="btn btn-warning btn-sm" onclick="alarm_case_event_batch_rm();">{{_('batch delete')}}</button>
  35. </div>
  36. </div>
  37. {% import "portal/blocks.html" as blocks %}
  38. <div class="pull-left">
  39. {{ blocks.pager('/portal/alarm-dash/case/event?case_id='+case.id, total, limit, page) }}
  40. </div>
  41. </div>
  42. {%endblock%}