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.

141 lines
5.3 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 {% if rw %}rw{% endif%}"
  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="ic-asc"></span>
  13. </a>
  14. {% elif sort == "-name" %}
  15. <a href="?sort=created" data-toggle="tooltip" class="sort-name">
  16. Name<span class="ic-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="ic-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="ic-asc"></span>
  41. </a>
  42. {% else %}
  43. <a href="?sort=-last_ping" data-toggle="tooltip" class="default sort-last-ping">
  44. Last Ping
  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 id="{{ check.code }}" class="checks-row" {% if check in hidden_checks %}style="display: none"{% endif %}>
  56. <td class="indicator-cell">
  57. <span class="status ic-{{ check.get_status }}" data-toggle="tooltip"></span>
  58. <div class="spinner {% if check.last_start %}started{% endif %}">
  59. <div class="d1"></div>
  60. <div class="d2"></div>
  61. <div class="d3"></div>
  62. </div>
  63. </td>
  64. <td>
  65. <div data-name="{{ check.name }}"
  66. data-tags="{{ check.tags }}"
  67. data-desc="{{ check.desc }}"
  68. class="my-checks-name {% if not check.name %}unnamed{% endif %}">
  69. <div>{{ check.name|default:"unnamed"|break_underscore }}</div>
  70. {% for tag in check.tags_list %}
  71. <span class="label label-tag">{{ tag }}</span>
  72. {% endfor %}
  73. </div>
  74. </td>
  75. <td class="hidden-xs hidden-sm">
  76. <span class="my-checks-url">
  77. <span class="base hidden-md">{{ ping_endpoint }}</span>{{ check.code }}
  78. </span>
  79. <button class="copy-link" data-clipboard-text="{{ check.url }}">
  80. copy
  81. </button>
  82. </td>
  83. <td class="hidden-xs">
  84. {% if channels|length <= 10 %}
  85. <div class="integrations">
  86. {% spaceless %}
  87. {% for channel in channels %}
  88. <span class="ic-{{ channel.kind }}{% if channel in check.channel_set.all %}{% else %} off{% endif %}"></span>
  89. {% endfor %}
  90. {% endspaceless %}
  91. </div>
  92. {% else %}
  93. {{ check.channel_set.all|length }} of {{ channels|length }}
  94. {% endif %}
  95. </td>
  96. <td class="hidden-xs">
  97. <div
  98. data-kind="{{ check.kind }}"
  99. data-timeout="{{ check.timeout.total_seconds }}"
  100. data-grace="{{ check.grace.total_seconds }}"
  101. data-schedule="{{ check.schedule }}"
  102. data-tz="{{ check.tz }}"
  103. class="timeout-grace">
  104. {% if check.kind == "simple" %}
  105. {{ check.timeout|hc_duration }}
  106. <br />
  107. {% elif check.kind == "cron" %}
  108. <div class="cron-expression">{{ check.schedule }}</div>
  109. {% endif %}
  110. <span class="checks-subline">
  111. {{ check.grace|hc_duration }}
  112. </span>
  113. </div>
  114. </td>
  115. <td class="hidden-xs">
  116. <div id="lpd-{{ check.code }}" class="last-ping">
  117. {% include "front/last_ping_cell.html" with check=check %}
  118. </div>
  119. </td>
  120. <td class="actions">
  121. {% if rw %}
  122. <button class="btn btn-default pause" type="button">
  123. <span class="ic-paused"></span>
  124. </button>
  125. {% endif %}
  126. <button title="Show Details" class="btn btn-default show-log" type="button">
  127. <span class="ic-dots"></span>
  128. </button>
  129. </td>
  130. </tr>
  131. {% endfor %}
  132. </table>
  133. {% for channel in channels %}
  134. <div
  135. id="ch-{{ forloop.counter0}}"
  136. data-code="{{ channel.code }}"
  137. data-title="{{ channel }}">
  138. </div>
  139. {% endfor %}