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.

148 lines
5.4 KiB

9 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
9 years ago
9 years ago
9 years ago
9 years ago
  1. {% load hc_extras static %}
  2. <table
  3. id="checks-table"
  4. class="table"
  5. data-list-url="{% url 'hc-checks' project.code %}"
  6. data-status-url="{% url 'hc-status' project.code %}">
  7. <tr>
  8. <th></th>
  9. <th class="th-name">
  10. {% if sort == "name" %}
  11. <a href="?sort=-name" data-toggle="tooltip" class="sort-name">
  12. Name<span class="icon-asc"></span>
  13. </a>
  14. {% elif sort == "-name" %}
  15. <a href="?sort=created" data-toggle="tooltip" class="sort-name">
  16. Name<span class="icon-desc"></span>
  17. </a>
  18. {% else %}
  19. <a href="?sort=name" data-toggle="tooltip" class="default sort-name">
  20. Name
  21. </a>
  22. {% endif %}
  23. </th>
  24. <th class="hidden-xs hidden-sm">
  25. <span class="visible-lg">Ping URL</span>
  26. <span class="visible-md">Code</span>
  27. </th>
  28. <th class="th-integrations hidden-xs">Integrations</th>
  29. <th class="th-period hidden-xs">
  30. Period <br />
  31. <span class="checks-subline">Grace</span>
  32. </th>
  33. <th class="th-last-ping hidden-xs">
  34. {% if sort == "last_ping" %}
  35. <a href="?sort=created" data-toggle="tooltip" class="sort-last-ping">
  36. Last Ping<span class="icon-desc"></span>
  37. </a>
  38. {% elif sort == "-last_ping" %}
  39. <a href="?sort=last_ping" data-toggle="tooltip" class="sort-last-ping">
  40. Last Ping<span class="icon-asc"></span>
  41. </a>
  42. {% else %}
  43. <a href="?sort=-last_ping" data-toggle="tooltip" class="default sort-last-ping">
  44. Last Ping</span>
  45. </a>
  46. {% endif %}
  47. {% if show_last_duration %}
  48. <br />
  49. <span class="checks-subline">Last Duration</span>
  50. {% endif %}
  51. </th>
  52. <th></th>
  53. </tr>
  54. {% for check in checks %}
  55. <tr
  56. id="{{ check.code }}"
  57. class="checks-row"
  58. data-url="{{ check.url }}"
  59. data-email="{{ check.email }}"
  60. {% if check in hidden_checks %}style="display: none"{% endif %}>
  61. <td class="indicator-cell">
  62. <span class="status icon-{{ check.get_status }}" data-toggle="tooltip"></span>
  63. <div class="spinner {% if check.last_start %}started{% endif %}">
  64. <div class="d1"></div>
  65. <div class="d2"></div>
  66. <div class="d3"></div>
  67. </div>
  68. </td>
  69. <td>
  70. <div data-name="{{ check.name }}"
  71. data-tags="{{ check.tags }}"
  72. data-desc="{{ check.desc }}"
  73. class="my-checks-name {% if not check.name %}unnamed{% endif %}">
  74. <div>{{ check.name|default:"unnamed"|break_underscore }}</div>
  75. {% for tag in check.tags_list %}
  76. <span class="label label-tag">{{ tag }}</span>
  77. {% endfor %}
  78. </div>
  79. </td>
  80. <td class="url-cell hidden-xs hidden-sm">
  81. <span class="my-checks-url">
  82. <span class="base hidden-md">{{ ping_endpoint }}</span>{{ check.code }}
  83. </span>
  84. <button
  85. class="copy-link hidden-sm"
  86. data-clipboard-text="{{ check.url }}">
  87. copy
  88. </button>
  89. </td>
  90. <td class="integrations-cell hidden-xs">
  91. {% if channels|length <= 10 %}
  92. <div class="integrations">
  93. {% spaceless %}
  94. {% for channel in channels %}
  95. <span class="icon-{{ channel.kind }}{% if channel in check.channel_set.all %}{% else %} off{% endif %}"></span>
  96. {% endfor %}
  97. {% endspaceless %}
  98. </div>
  99. {% else %}
  100. {{ check.channel_set.all|length }} of {{ channels|length }}
  101. {% endif %}
  102. </td>
  103. <td class="timeout-cell hidden-xs">
  104. <div
  105. data-kind="{{ check.kind }}"
  106. data-timeout="{{ check.timeout.total_seconds }}"
  107. data-grace="{{ check.grace.total_seconds }}"
  108. data-schedule="{{ check.schedule }}"
  109. data-tz="{{ check.tz }}"
  110. class="timeout-grace">
  111. {% if check.kind == "simple" %}
  112. {{ check.timeout|hc_duration }}
  113. <br />
  114. {% elif check.kind == "cron" %}
  115. <div class="cron-expression">{{ check.schedule }}</div>
  116. {% endif %}
  117. <span class="checks-subline">
  118. {{ check.grace|hc_duration }}
  119. </span>
  120. </div>
  121. </td>
  122. <td class="hidden-xs">
  123. <div id="lpd-{{ check.code }}" class="last-ping">
  124. {% include "front/last_ping_cell.html" with check=check %}
  125. </div>
  126. </td>
  127. <td class="actions">
  128. <button class="btn btn-default pause" type="button">
  129. <span class="icon-paused" />
  130. </button>
  131. <button title="Show Details" class="btn btn-default show-log" type="button">
  132. <span class="icon-dots" />
  133. </button>
  134. </td>
  135. </tr>
  136. {% endfor %}
  137. </table>
  138. {% for channel in channels %}
  139. <div
  140. id="ch-{{ forloop.counter0}}"
  141. data-code="{{ channel.code }}"
  142. data-title="{{ channel }}">
  143. </div>
  144. {% endfor %}