You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.3 KiB

6 years ago
  1. {% load hc_extras %}
  2. {% if events %}
  3. <table class="table" id="log">
  4. {% for event in events %}
  5. {% if event.n %}
  6. <tr class="ok" data-dt="{{ event.created.isoformat }}" data-url="{% url 'hc-ping-details' check.code event.n %}">
  7. <td class="n-cell">
  8. <span class="hash">#</span>{{ event.n }}
  9. </td>
  10. <td class="date"></td>
  11. <td class="time"></td>
  12. <td class="event">
  13. {% if event.kind == "fail" %}
  14. <span class="label label-danger">Failure</span>
  15. {% elif event.kind == "start" %}
  16. <span class="label label-start">Started</span>
  17. {% elif event.kind == "ign" %}
  18. <span class="label label-ign">Ignored</span>
  19. {% else %}
  20. <span class="label label-success">OK</span>
  21. {% endif %}
  22. </td>
  23. <td class="details">
  24. {% if event.delta %}
  25. <div class="delta">
  26. <span class="icon-timer"></span>
  27. {{ event.delta|hms }}
  28. </div>
  29. {% endif %}
  30. {% if event.scheme == "email" %}
  31. {{ event.ua }}
  32. {% else %}
  33. {{ event.scheme|upper }}
  34. {{ event.method }}
  35. {% if event.remote_addr %}
  36. from {{ event.remote_addr }}
  37. {% endif %}
  38. <span class="ua-body">
  39. {% if event.ua %}
  40. - {{ event.ua|truncatechars:80 }}
  41. {% endif %}
  42. </span>
  43. {% endif %}
  44. </td>
  45. </tr>
  46. {% endif %}
  47. {% if event.check_status %}
  48. <tr class="missing" data-dt="{{ event.created.isoformat }}">
  49. <td class="n-cell">
  50. <span class="icon-missing"></span>
  51. </td>
  52. <td class="date"></td>
  53. <td class="time"></td>
  54. <td class="alert-info" colspan="2">
  55. {% include "front/event_summary.html" %}
  56. </td>
  57. </tr>
  58. {% endif %}
  59. {% endfor %}
  60. </table>
  61. <p class="text-center">
  62. <a href="{% url 'hc-log' check.code %}">Show More&hellip;</a>
  63. </p>
  64. {% else %}
  65. <div class="alert no-events">
  66. You will see a <span class="hidden-xs">live-updating</span> log of received pings here. <br />
  67. This check has not received any pings yet.
  68. </div>
  69. {% endif %}