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.

73 lines
4.0 KiB

  1. {% load humanize hc_extras %}
  2. {% regroup checks by project as groups %}
  3. {% spaceless %}
  4. <table style="margin: 0; width: 100%; font-size: 16px;" cellpadding="0" cellspacing="0">
  5. {% for group in groups %}
  6. <tr>
  7. <td colspan="2" style="font-weight: bold; padding: 32px 8px 8px 8px; color: #333;">
  8. {{ group.grouper|mangle_link }}
  9. </td>
  10. <td style="padding: 32px 8px 8px 8px; margin: 0; font-size: 12px; color: #9BA2AB; font-family: Helvetica, Arial, sans-serif;">Last Ping</td>
  11. </tr>
  12. {% for check in group.list|sortchecks:sort %}
  13. <tr>
  14. <td style="border-top: 1px solid #EDEFF2; padding: 16px 8px;">
  15. <table cellpadding="0" cellspacing="0">
  16. <tr>
  17. {% with check.get_status_with_started as status %}
  18. {% if status == "new" %}
  19. <td style="background: #AAA; font-family: Helvetica, Arial, sans-serif; font-weight: bold; font-size: 10px; line-height: 10px; color: white; padding: 6px; margin: 0; border-radius: 3px;">NEW</td>
  20. {% elif status == "paused" %}
  21. <td style="background: #AAA; font-family: Helvetica, Arial, sans-serif; font-weight: bold; font-size: 10px; line-height: 10px; color: white; padding: 6px; border-radius: 3px;">PAUSED</td>
  22. {% elif status == "grace" %}
  23. <td style="background: #f0ad4e; font-family: Helvetica, Arial, sans-serif; font-weight: bold; font-size: 10px; line-height: 10px; color: white; padding: 6px; border-radius: 3px;">LATE</td>
  24. {% elif status == "up" %}
  25. <td style="background: #5cb85c; font-family: Helvetica, Arial, sans-serif; font-weight: bold; font-size: 10px; line-height: 10px; color: white; padding: 6px; border-radius: 3px;">UP</td>
  26. {% elif status == "started" %}
  27. <td style="background: #5cb85c; font-family: Helvetica, Arial, sans-serif; font-weight: bold; font-size: 10px; line-height: 10px; color: white; padding: 6px; border-radius: 3px;">STARTED</td>
  28. {% elif status == "down" %}
  29. <td style="background: #d9534f; font-family: Helvetica, Arial, sans-serif; font-weight: bold; font-size: 10px; line-height: 10px; color: white; padding: 6px; border-radius: 3px;">DOWN</td>
  30. {% endif %}
  31. {% endwith %}
  32. </tr>
  33. </table>
  34. </td>
  35. <td style="border-top: 1px solid #EDEFF2; padding: 16px 8px; font-family: Helvetica, Arial, sans-serif;">
  36. {% if check.name %}
  37. {{ check.name|mangle_link }}
  38. {% else %}
  39. <span style="color: #74787E; font-style: italic;">unnamed</span>
  40. {% endif %}
  41. {% if check.tags %}
  42. <br />
  43. <table cellpadding="0" cellspacing="0">
  44. <tr>
  45. {% for tag in check.tags_list %}
  46. <td style="padding-right: 4px">
  47. <table cellpadding="0" cellspacing="0">
  48. <tr>
  49. <td style="background: #eee; font-family: Helvetica, Arial, sans-serif; font-size: 10px; line-height: 10px; color: #555; padding: 4px; margin: 0; border-radius: 2px;">
  50. {{ tag|mangle_link }}
  51. </td>
  52. </tr>
  53. </table>
  54. </td>
  55. {% endfor %}
  56. </tr>
  57. </table>
  58. {% endif %}
  59. </td>
  60. <td style="border-top: 1px solid #EDEFF2; padding: 16px 8px; font-family: Helvetica, Arial, sans-serif;">
  61. {% if check.last_ping %}
  62. {{ check.last_ping|naturaltime }}
  63. {% else %}
  64. Never
  65. {% endif %}
  66. <br />
  67. <a href="{{ check.cloaked_url }}" target="_blank">Details…</a>
  68. </td>
  69. </tr>
  70. {% endfor %}
  71. {% endfor %}
  72. </table>
  73. <br />
  74. {% endspaceless %}