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.

96 lines
3.6 KiB

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