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.

102 lines
3.3 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. {% load hc_extras humanize %}
  2. <ul id="checks-list" class="visible-xs visible-sm">
  3. {% for check in checks %}
  4. <li>
  5. <h2>
  6. <span class="{% if not check.name %}unnamed{% endif %}">
  7. {{ check.name|default:"unnamed" }}
  8. </span>
  9. <code>
  10. <span class="base hidden-xs">{{ ping_endpoint }}</span>{{ check.code }}
  11. </code>
  12. </h2>
  13. <a
  14. href="#"
  15. class="btn remove-link check-menu-remove"
  16. data-name="{{ check.name_then_code }}"
  17. data-url="{% url 'hc-remove-check' check.code %}">
  18. <span class="icon-close"></span>
  19. </a>
  20. <table class="table">
  21. <tr>
  22. <th>Status</th>
  23. <td>
  24. {% if check.in_grace_period %}
  25. <span id="sl-{{ check.code }}" class="label label-grace">grace</span>
  26. {% else %}
  27. {% with status=check.get_status %}
  28. <span id="sl-{{ check.code }}" class="label label-{{ status }}">{{ status }}</span>
  29. {% endwith %}
  30. {% endif %}
  31. </td>
  32. </tr>
  33. {% if check.tags %}
  34. <tr>
  35. <th>Tags</th>
  36. <td>
  37. {% for tag in check.tags_list %}
  38. <span class="label label-tag">{{ tag }}</span>
  39. {% endfor %}
  40. </td>
  41. </tr>
  42. {% endif %}
  43. {% if check.kind == "simple" %}
  44. <tr>
  45. <th>Period</th>
  46. <td>{{ check.timeout|hc_duration }}</td>
  47. </tr>
  48. {% elif check.kind == "cron" %}
  49. <tr>
  50. <th>Schedule</th>
  51. <td>{{ check.schedule }}</td>
  52. </tr>
  53. {% endif %}
  54. <tr>
  55. <th>Grace Time</th>
  56. <td>{{ check.grace|hc_duration }}</td>
  57. </tr>
  58. <tr>
  59. <th>Last Ping</th>
  60. <td id="lpm-{{ check.code}}">
  61. {% include "front/last_ping_cell.html" with check=check %}
  62. </td>
  63. </tr>
  64. </table>
  65. <div>
  66. <a
  67. href="#"
  68. data-name="{{ check.name }}"
  69. data-tags="{{ check.tags }}"
  70. data-url="{% url 'hc-update-name' check.code %}"
  71. class="btn btn-default my-checks-name">
  72. Rename
  73. </a>
  74. <a
  75. href="#"
  76. data-kind="{{ check.kind }}"
  77. data-url="{% url 'hc-update-timeout' check.code %}"
  78. data-timeout="{{ check.timeout.total_seconds }}"
  79. data-grace="{{ check.grace.total_seconds }}"
  80. data-schedule="{{ check.schedule }}"
  81. data-tz="{{ check.tz }}"
  82. class="btn btn-default timeout-grace">
  83. {% if check.kind == "simple" %}
  84. Change Period
  85. {% elif check.kind == "cron" %}
  86. Change Schedule
  87. {% endif %}
  88. </a>
  89. <a href="{% url 'hc-log' check.code %}" class="btn btn-default">Log</a>
  90. </div>
  91. </li>
  92. {% endfor %}
  93. </ul>