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.

98 lines
3.1 KiB

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