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.

68 lines
3.8 KiB

  1. {% load humanize hc_extras %}
  2. <br />
  3. <table style="margin: 0; width: 100%; font-size: 16px;" cellpadding="0" cellspacing="0">
  4. <tr>
  5. <td style="padding: 8px; margin: 0; font-size: 12px; color: #9BA2AB; font-family: Helvetica, Arial, sans-serif;"></td>
  6. <td style="padding: 8px; margin: 0; font-size: 12px; color: #9BA2AB; font-family: Helvetica, Arial, sans-serif;">Name</td>
  7. <td class="mobile-hide" style="padding: 8px; margin: 0; font-size: 12px; color: #9BA2AB; font-family: Helvetica, Arial, sans-serif;">Last Ping</td>
  8. </tr>
  9. {% for check in checks %}
  10. <tr>
  11. <td style="border-top: 1px solid #EDEFF2; padding: 16px 8px;">
  12. <table cellpadding="0" cellspacing="0">
  13. <tr>
  14. {% if check.get_status == "new" %}
  15. <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>
  16. {% elif check.get_status == "paused" %}
  17. <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>
  18. {% elif check.in_grace_period %}
  19. <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>
  20. {% elif check.get_status == "up" %}
  21. <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>
  22. {% elif check.get_status == "down" %}
  23. <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>
  24. {% endif %}
  25. </tr>
  26. </table>
  27. </td>
  28. <td style="border-top: 1px solid #EDEFF2; padding: 16px 8px; font-family: Helvetica, Arial, sans-serif;">
  29. {% if check.name %}
  30. {% if check.name|length > 20 %}
  31. <small>{{ check.name }}</small>
  32. {% else %}
  33. {{ check.name }}
  34. {% endif %}
  35. {% else %}
  36. <span style="color: #74787E; font-style: italic;">unnamed</span>
  37. {% endif %}
  38. {% if check.tags %}
  39. <br />
  40. <table cellpadding="0" cellspacing="0">
  41. <tr>
  42. {% for tag in check.tags_list %}
  43. <td style="padding-right: 4px">
  44. <table cellpadding="0" cellspacing="0">
  45. <tr>
  46. <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;">
  47. {{ tag }}
  48. </td>
  49. </tr>
  50. </table>
  51. </td>
  52. {% endfor %}
  53. </tr>
  54. </table>
  55. {% endif %}
  56. </td>
  57. <td class="mobile-hide" style="border-top: 1px solid #EDEFF2; padding: 16px 8px; font-family: Helvetica, Arial, sans-serif;">
  58. {% if check.last_ping %}
  59. {{ check.last_ping|naturaltime }}
  60. <br />
  61. <a class="view-log" href="{{ check.log_url }}">Show Log…</a>
  62. {% else %}
  63. Never
  64. {% endif %}
  65. </td>
  66. </tr>
  67. {% endfor %}
  68. </table>
  69. <br />