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.

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