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.

91 lines
2.1 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
  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. .paused { background: #AAA; }
  19. .up { background: #5cb85c; }
  20. .grace { background: #f0ad4e; }
  21. .down { background: #d9534f; }
  22. .unnamed {
  23. color: #888;
  24. font-style: italic;
  25. }
  26. </style>
  27. <p>Hello,</p>
  28. <p>This is a notification sent by <a href="https://healthchecks.io">healthchecks.io</a>.</p>
  29. <p>The check "{{ check.name_then_code }}" has gone {{ check.status }}.</p>
  30. <p>Here is a summary of all your checks:</p>
  31. <table>
  32. <tr>
  33. <th></th>
  34. <th>Name</th>
  35. <th>URL</th>
  36. <th>Period</th>
  37. <th>Last Ping</th>
  38. </tr>
  39. {% for check in checks %}
  40. <tr>
  41. <td>
  42. {% if check.get_status == "new" %}
  43. <span class="badge new">NEW</span>
  44. {% elif check.get_status == "up" %}
  45. <span class="badge up">UP</span>
  46. {% elif check.get_status == "grace" %}
  47. <span class="badge grace">LATE</span>
  48. {% elif check.get_status == "down" %}
  49. <span class="badge down">DOWN</span>
  50. {% elif check.get_status == "paused" %}
  51. <span class="badge paused">PAUSED</span>
  52. {% endif %}
  53. </td>
  54. <td>
  55. {% if check.name %}
  56. {{ check.name }}
  57. {% else %}
  58. <span class="unnamed">unnamed</span>
  59. {% endif %}
  60. </td>
  61. <td class="url-cell">
  62. <code>{{ check.url }}</code>
  63. </td>
  64. <td>
  65. {{ check.timeout|hc_duration }}
  66. </td>
  67. <td>
  68. {% if check.last_ping %}
  69. {{ check.last_ping|naturaltime }}
  70. {% else %}
  71. Never
  72. {% endif %}
  73. </td>
  74. </tr>
  75. {% endfor %}
  76. </table>
  77. <p>
  78. --<br />
  79. Regards,<br />
  80. healthchecks.io
  81. </p>