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.

127 lines
4.6 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. <td class="indicator-cell">
  50. <span class="status icon-{{ check.get_status }}" data-toggle="tooltip"></span>
  51. </td>
  52. <td>
  53. <div data-name="{{ check.name }}"
  54. data-tags="{{ check.tags }}"
  55. data-desc="{{ check.desc }}"
  56. class="my-checks-name {% if not check.name %}unnamed{% endif %}">
  57. <div>{{ check.name|default:"unnamed"|break_underscore }}</div>
  58. {% for tag in check.tags_list %}
  59. <span class="label label-tag">{{ tag }}</span>
  60. {% endfor %}
  61. </div>
  62. </td>
  63. <td class="url-cell hidden-xs hidden-sm">
  64. <span class="my-checks-url">
  65. <span class="base">{{ ping_endpoint }}</span>{{ check.code }}
  66. </span>
  67. <button
  68. class="copy-link hidden-sm"
  69. data-clipboard-text="{{ check.url }}">
  70. copy
  71. </button>
  72. </td>
  73. <td class="integrations-cell hidden-xs">
  74. {% if channels|length <= 10 %}
  75. <div class="integrations">
  76. {% spaceless %}
  77. {% for channel in channels %}
  78. <span class="icon-{{ channel.kind }}{% if channel in check.channel_set.all %}{% else %} off{% endif %}"></span>
  79. {% endfor %}
  80. {% endspaceless %}
  81. </div>
  82. {% else %}
  83. {{ check.channel_set.all|length }} of {{ channels|length }}
  84. {% endif %}
  85. </td>
  86. <td class="timeout-cell hidden-xs">
  87. <div
  88. data-kind="{{ check.kind }}"
  89. data-timeout="{{ check.timeout.total_seconds }}"
  90. data-grace="{{ check.grace.total_seconds }}"
  91. data-schedule="{{ check.schedule }}"
  92. data-tz="{{ check.tz }}"
  93. class="timeout-grace">
  94. {% if check.kind == "simple" %}
  95. {{ check.timeout|hc_duration }}
  96. {% elif check.kind == "cron" %}
  97. <span class="cron-expression">{{ check.schedule }}</span>
  98. {% endif %}
  99. <br />
  100. <span class="checks-subline">
  101. {{ check.grace|hc_duration }}
  102. </span>
  103. </div>
  104. </td>
  105. <td>
  106. <div id="lpd-{{ check.code}}" class="last-ping">
  107. {% include "front/last_ping_cell.html" with check=check %}
  108. </div>
  109. </td>
  110. <td class="hidden-xs">
  111. <button class="btn btn-sm btn-default show-log" type="button">
  112. <span class="icon-settings" aria-hidden="true"></span>
  113. </button>
  114. </td>
  115. </tr>
  116. {% endfor %}
  117. </table>
  118. {% for channel in channels %}
  119. <div
  120. id="ch-{{ forloop.counter0}}"
  121. data-code="{{ channel.code }}"
  122. data-title="{{ channel }}">
  123. </div>
  124. {% endfor %}