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.

95 lines
2.2 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. {% if check.tags %}
  61. <br />
  62. <small>{{ check.tags }}</small>
  63. {% endif %}
  64. </td>
  65. <td class="url-cell">
  66. <code>{{ check.url }}</code>
  67. </td>
  68. <td>
  69. {{ check.timeout|hc_duration }}
  70. </td>
  71. <td>
  72. {% if check.last_ping %}
  73. {{ check.last_ping|naturaltime }}
  74. {% else %}
  75. Never
  76. {% endif %}
  77. </td>
  78. </tr>
  79. {% endfor %}
  80. </table>
  81. <p>
  82. --<br />
  83. Regards,<br />
  84. healthchecks.io
  85. </p>