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.

101 lines
2.3 KiB

  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 monthly report sent by <a href="https://healthchecks.io">healthchecks.io</a>.</p>
  29. <table>
  30. <tr>
  31. <th></th>
  32. <th>Name</th>
  33. <th>Period</th>
  34. <th>Last Ping</th>
  35. </tr>
  36. {% for check in checks %}
  37. <tr>
  38. <td>
  39. {% if check.get_status == "new" %}
  40. <span class="badge new">NEW</span>
  41. {% elif check.get_status == "up" %}
  42. <span class="badge up">UP</span>
  43. {% elif check.get_status == "grace" %}
  44. <span class="badge grace">LATE</span>
  45. {% elif check.get_status == "down" %}
  46. <span class="badge down">DOWN</span>
  47. {% elif check.get_status == "paused" %}
  48. <span class="badge paused">PAUSED</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><strong>Just one more thing to check:</strong>
  79. Do you have more cron jobs,
  80. not yet on this list, that would benefit from monitoring?
  81. Get the ball rolling by adding one more!</p>
  82. <p>
  83. --<br />
  84. Regards,<br />
  85. healthchecks.io
  86. </p>
  87. <p>
  88. <a href="{{ unsub_link }}">Unsubscribe from future monthly reports</a>
  89. </p>