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.

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