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.

114 lines
3.4 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 class="ok {% if record.early %} early {% endif %}">
  31. <td class="n-cell">
  32. {% if record.ping.n %}
  33. <span class="hash">#</span>{{ record.ping.n }}
  34. {% endif %}
  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. {% if record.early %}
  45. <span class="label label-tag">early</span>
  46. {% endif %}
  47. </div>
  48. </td>
  49. <td class="ip">
  50. {{ record.ping.remote_addr|default:"" }}
  51. </td>
  52. <td class="protocol">
  53. {{ record.ping.scheme }}
  54. </td>
  55. <td class="ua">
  56. {{ record.ping.ua }}
  57. </td>
  58. </tr>
  59. {% endif %}
  60. {% if record.placeholder_date %}
  61. <tr class="missing">
  62. <td class="n-cell">
  63. <span class="glyphicon glyphicon-remove"></span>
  64. </td>
  65. <td class="datetime">
  66. <div>
  67. <span class="date">
  68. {{ record.placeholder_date|date:"N j" }}
  69. </span>
  70. <span class="time">
  71. {{ record.placeholder_date|date:"H:i" }}
  72. </span>
  73. </div>
  74. </td>
  75. <td colspan="4">
  76. <small>Ping expected but not received</small>
  77. </td>
  78. </tr>
  79. {% endif %}
  80. {% endfor %}
  81. </table>
  82. {% if show_limit_notice and limit < 10000 %}
  83. <p class="alert alert-info">
  84. <strong>Showing last {{ limit }} pings.</strong>
  85. Want to see more?
  86. <a href="{% url 'hc-pricing' %}">
  87. Upgrade your account!
  88. </a>
  89. </p>
  90. {% endif %}
  91. </div>
  92. {% else %}
  93. <div class="alert alert-info">Log is empty. This check has not received any pings yet.</div>
  94. {% endif %}
  95. </div>
  96. </div>
  97. {% endblock %}
  98. {% block scripts %}
  99. {% compress js %}
  100. <script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
  101. <script src="{% static 'js/bootstrap.min.js' %}"></script>
  102. <script src="{% static 'js/log.js' %}"></script>
  103. {% endcompress %}
  104. {% endblock %}