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.

88 lines
2.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
  1. {% load humanize hc_extras %}
  2. <style>
  3. th {
  4. text-align: left;
  5. padding: 8px;
  6. }
  7. td {
  8. border-top: 1px solid #ddd;
  9. padding: 8px;
  10. }
  11. .badge {
  12. font-size: 10px;
  13. color: white;
  14. padding: 4px;
  15. font-family: sans;
  16. }
  17. .new { background: #AAA; }
  18. .up { background: #5cb85c; }
  19. .grace { background: #f0ad4e; }
  20. .down { background: #d9534f; }
  21. .unnamed {
  22. color: #888;
  23. font-style: italic;
  24. }
  25. </style>
  26. <p>Hello,</p>
  27. <p>This is a notification sent by <a href="https://healthchecks.io">healthchecks.io</a>.</p>
  28. <p>The check "{{ check.name_then_code }}" has gone {{ check.status }}.</p>
  29. <p>Here is a summary of all your checks:</p>
  30. <table>
  31. <tr>
  32. <th></th>
  33. <th>Name</th>
  34. <th>URL</th>
  35. <th>Period</th>
  36. <th>Last Ping</th>
  37. </tr>
  38. {% for check in checks %}
  39. <tr>
  40. <td>
  41. {% if check.get_status == "new" %}
  42. <span class="badge new">NEW</span>
  43. {% elif check.get_status == "up" %}
  44. <span class="badge up">UP</span>
  45. {% elif check.get_status == "grace" %}
  46. <span class="badge grace">LATE</span>
  47. {% elif check.get_status == "down" %}
  48. <span class="badge down">DOWN</span>
  49. {% endif %}
  50. </td>
  51. <td>
  52. {% if check.name %}
  53. {{ check.name }}
  54. {% else %}
  55. <span class="unnamed">unnamed</span>
  56. {% endif %}
  57. </td>
  58. <td class="url-cell">
  59. <code>{{ check.url }}</code>
  60. </td>
  61. <td>
  62. {{ check.timeout|hc_duration }}
  63. </td>
  64. <td>
  65. {% if check.last_ping %}
  66. {{ check.last_ping|naturaltime }}
  67. {% else %}
  68. Never
  69. {% endif %}
  70. </td>
  71. </tr>
  72. {% endfor %}
  73. </table>
  74. <p>
  75. --<br />
  76. Regards,<br />
  77. healthchecks.io
  78. </p>