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.

92 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
  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>Period</th>
  35. <th>Last Ping</th>
  36. <th>Actions</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.in_grace_period %}
  44. <span class="badge grace">LATE</span>
  45. {% elif check.get_status == "up" %}
  46. <span class="badge up">UP</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. {% if check.tags %}
  58. <br />
  59. <small>{{ check.tags }}</small>
  60. {% endif %}
  61. </td>
  62. <td>
  63. {{ check.timeout|hc_duration }}
  64. </td>
  65. <td>
  66. {% if check.last_ping %}
  67. {{ check.last_ping|naturaltime }}
  68. {% else %}
  69. Never
  70. {% endif %}
  71. </td>
  72. <td>
  73. <a href="{{ check.log_url }}">View Log</a>
  74. </td>
  75. </tr>
  76. {% endfor %}
  77. </table>
  78. <p>
  79. --<br />
  80. Regards,<br />
  81. healthchecks.io
  82. </p>