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.

94 lines
3.5 KiB

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. {% endif %}
  29. </td>
  30. <td class="name-cell">
  31. <span
  32. data-name="{{ check.name }}"
  33. data-url="{% url 'hc-update-name' check.code %}"
  34. class="my-checks-name {% if not check.name %}unnamed{% endif %}">
  35. {{ check.name|default:"unnamed" }}
  36. </span>
  37. </td>
  38. <td class="url-cell">
  39. <code class="my-checks-url">{{ check.url }}</code>
  40. <code class="my-checks-email">{{ check.email }}</code>
  41. </td>
  42. <td class="timeout-cell">
  43. <span
  44. data-url="{% url 'hc-update-timeout' check.code %}"
  45. data-timeout="{{ check.timeout.total_seconds }}"
  46. data-grace="{{ check.grace.total_seconds }}"
  47. class="timeout-grace">
  48. {{ check.timeout|hc_duration }}
  49. <br />
  50. <span class="checks-subline">
  51. {{ check.grace|hc_duration }}
  52. </span>
  53. </span>
  54. </td>
  55. <td>
  56. {% if check.last_ping %}
  57. <span
  58. data-toggle="tooltip"
  59. title="{{ check.last_ping }} GMT">
  60. {{ check.last_ping|naturaltime }}
  61. </span>
  62. {% else %}
  63. Never
  64. {% endif %}
  65. </td>
  66. <td>
  67. <div class="check-menu dropdown">
  68. <button class="btn btn-sm btn-default dropdown-toggle" type="button" data-toggle="dropdown">
  69. <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
  70. </button>
  71. <ul class="dropdown-menu">
  72. <li>
  73. <a href="{% url 'hc-log' check.code %}">
  74. <span class="glyphicon glyphicon-time"></span>
  75. Log
  76. </a>
  77. </li>
  78. <li role="separator" class="divider"></li>
  79. <li>
  80. <a href="#" class="check-menu-remove"
  81. data-name="{{ check.name|default:check.code }}"
  82. data-url="{% url 'hc-remove-check' check.code %}">
  83. <span class="glyphicon glyphicon-trash"></span>
  84. Remove
  85. </a>
  86. </li>
  87. </ul>
  88. </div>
  89. </td>
  90. </tr>
  91. {% endfor %}
  92. </table>