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.

99 lines
2.8 KiB

9 years ago
9 years ago
  1. {% extends "base.html" %}
  2. {% load compress humanize staticfiles hc_extras %}
  3. {% block title %}My Checks - healthchecks.io{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <ol class="breadcrumb">
  8. <li><a href="{% url 'hc-checks' %}">Checks</a></li>
  9. <li>{{ check.name_then_code }}</li>
  10. <li class="active">Log</li>
  11. </ol>
  12. {% if pings %}
  13. <p class="log-notes">
  14. Note: Dates and times are displayed in <strong>UTC</strong>.
  15. </p>
  16. <div class="table-responsive">
  17. <table class="table" id="log">
  18. <tr>
  19. <th></th>
  20. <th class="datetime">
  21. <span class="date">Date</span>
  22. <span class="time">Time</span>
  23. </th>
  24. <th class="ip">IP</th>
  25. <th class="protocol">Protocol</th>
  26. <th class="ua">User Agent</th>
  27. </tr>
  28. {% for record in pings %}
  29. {% if record.ping %}
  30. <tr>
  31. <td class="tl-cell">
  32. <div class="tl top"></div>
  33. <div class="tl bottom {{ record.status }}"></div>
  34. <div class="bullet"></div>
  35. </td>
  36. <td class="datetime">
  37. <div>
  38. <span class="date">
  39. {{ record.ping.created|date:"N j" }}
  40. </span>
  41. <span class="time">
  42. {{ record.ping.created|date:"H:i" }}
  43. </span>
  44. </div>
  45. </td>
  46. <td class="ip">
  47. {{ record.ping.remote_addr|default:"" }}
  48. </td>
  49. <td class="protocol">
  50. {{ record.ping.scheme }}
  51. </td>
  52. <td class="ua">
  53. {{ record.ping.ua }}
  54. </td>
  55. </tr>
  56. {% else %}
  57. {% if record.down %}
  58. <tr>
  59. <td class="tl-cell">
  60. <div class="tl full-down"></div>
  61. </td>
  62. <td class="downtime-cell" colspan="4">
  63. <p>No ping received for {{ record.date|timesince:record.prev_date }}</p>
  64. </td>
  65. </tr>
  66. {% endif %}
  67. <tr>
  68. <td class="tl-cell">
  69. <div class="tl top late"></div>
  70. <div class="tl bottom"></div>
  71. </td>
  72. </tr>
  73. {% endif %}
  74. {% endfor %}
  75. </table>
  76. </div>
  77. {% else %}
  78. <div class="alert alert-info">Log is empty. This check has not received any pings yet.</div>
  79. {% endif %}
  80. </div>
  81. </div>
  82. {% endblock %}
  83. {% block scripts %}
  84. {% compress js %}
  85. <script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
  86. <script src="{% static 'js/bootstrap.min.js' %}"></script>
  87. <script src="{% static 'js/log.js' %}"></script>
  88. {% endcompress %}
  89. {% endblock %}