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.

99 lines
3.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
  1. {% load hc_extras humanize %}
  2. <table id="checks-table" class="table hidden-xs">
  3. <tr>
  4. <th></th>
  5. <th class="th-name">Name</th>
  6. <th>Ping URL</th>
  7. <th class="th-period">
  8. Period <br />
  9. <span class="checks-subline">Grace</span>
  10. </th>
  11. <th>Last Ping</th>
  12. <th></th>
  13. </tr>
  14. {% for check in checks %}
  15. <tr class="checks-row">
  16. <td class="indicator-cell">
  17. {% if check.get_status == "new" %}
  18. <span class="glyphicon glyphicon-question-sign new"></span>
  19. {% elif check.in_grace_period %}
  20. <span class="glyphicon glyphicon-exclamation-sign grace"></span>
  21. {% elif check.get_status == "up" %}
  22. <span class="glyphicon glyphicon-ok-sign up"></span>
  23. {% elif check.get_status == "down" %}
  24. <span class="glyphicon glyphicon-exclamation-sign down"></span>
  25. {% endif %}
  26. </td>
  27. <td class="name-cell">
  28. <div data-name="{{ check.name }}"
  29. data-tags="{{ check.tags }}"
  30. data-url="{% url 'hc-update-name' check.code %}"
  31. class="my-checks-name {% if not check.name %}unnamed{% endif %}">
  32. <div>{{ check.name|default:"unnamed" }}</div>
  33. {% for tag in check.tags_list %}
  34. <span class="label label-tag">{{ tag }}</span>
  35. {% endfor %}
  36. </div>
  37. </td>
  38. <td class="url-cell">
  39. <span class="my-checks-url">
  40. <span class="base">{{ ping_endpoint }}</span>{{ check.code }}
  41. </span>
  42. <button
  43. class="copy-link hidden-sm"
  44. data-clipboard-text="{{ check.url }}">
  45. copy
  46. </button>
  47. </td>
  48. <td class="timeout-cell">
  49. <span
  50. data-url="{% url 'hc-update-timeout' check.code %}"
  51. data-timeout="{{ check.timeout.total_seconds }}"
  52. data-grace="{{ check.grace.total_seconds }}"
  53. class="timeout-grace">
  54. {{ check.timeout|hc_duration }}
  55. <br />
  56. <span class="checks-subline">
  57. {{ check.grace|hc_duration }}
  58. </span>
  59. </span>
  60. </td>
  61. <td>
  62. {% if check.last_ping %}
  63. <span
  64. data-toggle="tooltip"
  65. title="{{ check.last_ping|date:'N j, Y, P e' }}">
  66. {{ check.last_ping|naturaltime }}
  67. </span>
  68. {% else %}
  69. Never
  70. {% endif %}
  71. </td>
  72. <td>
  73. <div class="check-menu dropdown">
  74. <button class="btn btn-sm btn-default dropdown-toggle" type="button" data-toggle="dropdown">
  75. <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
  76. </button>
  77. <ul class="dropdown-menu">
  78. <li>
  79. <a href="{% url 'hc-log' check.code %}">
  80. <span class="glyphicon glyphicon-time"></span>
  81. Log
  82. </a>
  83. </li>
  84. <li role="separator" class="divider"></li>
  85. <li>
  86. <a href="#" class="check-menu-remove"
  87. data-name="{{ check.name_then_code }}"
  88. data-url="{% url 'hc-remove-check' check.code %}">
  89. <span class="glyphicon glyphicon-trash"></span>
  90. Remove
  91. </a>
  92. </li>
  93. </ul>
  94. </div>
  95. </td>
  96. </tr>
  97. {% endfor %}
  98. </table>