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.1 KiB

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