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.

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