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.

116 lines
3.7 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. <div class="pull-right">
  12. <div id="format-switcher" class="btn-group" data-toggle="buttons">
  13. <label class="btn btn-default btn-xs" data-format="utc">
  14. <input type="radio" name="date-format" autocomplete="off" checked>
  15. UTC
  16. </label>
  17. <label class="btn btn-default btn-xs active" data-format="local">
  18. <input type="radio" name="date-format" autocomplete="off">
  19. Local Time
  20. </label>
  21. </div>
  22. </div>
  23. </ol>
  24. {% if pings %}
  25. <div class="table-responsive">
  26. <table class="table" id="log">
  27. <tr>
  28. <th></th>
  29. <th class="datetime">
  30. <span class="date">Date</span>
  31. <span class="time">Time</span>
  32. </th>
  33. <th class="ip">IP</th>
  34. <th class="protocol">Protocol</th>
  35. <th class="ua">User Agent</th>
  36. </tr>
  37. {% for record in pings %}
  38. {% if record.ping %}
  39. <tr class="ok {% if record.early %} early {% endif %}">
  40. <td class="n-cell">
  41. {% if record.ping.n %}
  42. <span class="hash">#</span>{{ record.ping.n }}
  43. {% endif %}
  44. </td>
  45. <td class="datetime" data-raw="{{ record.ping.created.isoformat }}">
  46. <div>
  47. <span class="date"></span>
  48. <span class="time"></span>
  49. {% if record.early %}
  50. <span class="label label-tag">early</span>
  51. {% endif %}
  52. </div>
  53. </td>
  54. <td class="ip">
  55. {{ record.ping.remote_addr|default:"" }}
  56. </td>
  57. <td class="protocol">
  58. {{ record.ping.scheme }}
  59. </td>
  60. <td class="ua">
  61. {{ record.ping.ua }}
  62. </td>
  63. </tr>
  64. {% endif %}
  65. {% if record.placeholder_date %}
  66. <tr class="missing">
  67. <td class="n-cell">
  68. <span class="glyphicon glyphicon-remove"></span>
  69. </td>
  70. <td class="datetime" data-raw="{{ record.placeholder_date.isoformat }}">
  71. <div>
  72. <span class="date"></span>
  73. <span class="time"></span>
  74. </div>
  75. </td>
  76. <td colspan="4">
  77. <small>Ping expected but not received</small>
  78. </td>
  79. </tr>
  80. {% endif %}
  81. {% endfor %}
  82. </table>
  83. {% if show_limit_notice and limit < 10000 %}
  84. <p class="alert alert-info">
  85. <strong>Showing last {{ limit }} pings.</strong>
  86. Want to see more?
  87. <a href="{% url 'hc-pricing' %}">
  88. Upgrade your account!
  89. </a>
  90. </p>
  91. {% endif %}
  92. </div>
  93. {% else %}
  94. <div class="alert alert-info">Log is empty. This check has not received any pings yet.</div>
  95. {% endif %}
  96. </div>
  97. </div>
  98. {% endblock %}
  99. {% block scripts %}
  100. {% compress js %}
  101. <script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
  102. <script src="{% static 'js/bootstrap.min.js' %}"></script>
  103. <script src="{% static 'js/moment.min.js' %}"></script>
  104. <script src="{% static 'js/log.js' %}"></script>
  105. {% endcompress %}
  106. {% endblock %}