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.

108 lines
3.3 KiB

4 years ago
  1. {% load hc_extras humanize %}
  2. <p>
  3. "{{ check.name_then_code }}" is {{ check.status|upper }}.
  4. <a href="{{ check.details_url }}">View on {% site_name %}&hellip;</a>
  5. </p>
  6. {% if check.desc %}
  7. <p>
  8. <b>Description</b><br>
  9. {{ check.desc|linebreaksbr }}
  10. </p>
  11. {% endif %}
  12. {% cycle '' '</tr><tr>' as trtr silent %}
  13. <table>
  14. <tr>
  15. {% if check.project.name %}
  16. <td style="padding-right: 32px; padding-bottom: 8px; vertical-align: top;">
  17. <b>Project</b><br>
  18. {{ check.project.name }}
  19. </td>
  20. {{ trtr|safe }} {% cycle trtr %}
  21. {% endif %}
  22. {% if check.tags_list %}
  23. <td style="padding-right: 32px; padding-bottom: 8px; vertical-align: top;">
  24. <b>Tags</b><br>
  25. {% for tag in check.tags_list %}
  26. <code style="background-color: #eeeeee; padding: 2px 4px; border-radius: 2px;">{{ tag }}</code>
  27. {% endfor %}
  28. </td>
  29. {{ trtr|safe }} {% cycle trtr %}
  30. {% endif %}
  31. {% if check.kind == "simple" %}
  32. <td style="padding-right: 32px; padding-bottom: 8px; vertical-align: top;">
  33. <b>Period</b><br>
  34. {{ check.timeout|hc_duration }}
  35. </td>
  36. {{ trtr|safe }} {% cycle trtr %}
  37. {% endif %}
  38. {% if check.kind == "cron" %}
  39. <td style="padding-right: 32px; padding-bottom: 8px; vertical-align: top;">
  40. <b>Schedule</b><br>
  41. <code>{{ check.schedule }}</code>
  42. </td>
  43. {% if trttr %}Yo!{% endif %}
  44. {{ trtr|safe }} {% cycle trtr %}
  45. {% endif %}
  46. {% if ping %}
  47. <td style="padding-right: 32px; padding-bottom: 8px; vertical-align: top;">
  48. <b>Last Ping</b><br>
  49. {{ ping.created|naturaltime }}{% if ping.remote_addr %}, from {{ ping.remote_addr }}{% endif %}
  50. </td>
  51. {% if trttr %}Yo!{% endif %}
  52. {{ trtr|safe }} {% cycle trtr %}
  53. {% endif %}
  54. <td style="padding-right: 32px; padding-bottom: 8px; vertical-align: top;">
  55. <b>Total Pings</b><br>
  56. {{ check.n_pings }}
  57. {% if check.created %}(since {{ check.created|date:'M j, Y' }}){% endif %}
  58. </td>
  59. </tr>
  60. </table>
  61. {% if ping.body %}
  62. <p><b>Last Ping Body</b></p>
  63. <pre>{{ ping.body|slice:":10000"|linebreaksbr }}{% if ping.body|length > 10000 %} [truncated]{% endif %}</pre>
  64. {% endif %}
  65. {% if projects %}
  66. <p><b>Projects Overview</b></p>
  67. <table>
  68. {% for project in projects %}
  69. <tr>
  70. <td style="padding-right: 32px; padding-bottom: 4px;">
  71. <a href="{{ project.checks_url }}">{{ project }}</a>
  72. </td>
  73. <td style="padding-right: 32px; padding-bottom: 4px;">
  74. {% with project.get_n_down as n_down %}
  75. {% if n_down %}
  76. <b>{{ n_down }} check{{ n_down|pluralize }} down</b>
  77. {% else %}
  78. OK, all checks up
  79. {% endif %}
  80. {% endwith %}
  81. </td>
  82. </tr>
  83. {% endfor %}
  84. </table>
  85. {% endif %}
  86. <p style="color: #666666">
  87. &mdash;<br>
  88. {% site_name %}<br>
  89. <a href="{{ unsub_link }}" target="_blank" style="color: #666666; text-decoration: underline;">
  90. {% if check.project.name %}
  91. Unsubscribe from "{{ check.project.name }}" notifications
  92. {% else %}
  93. Unsubscribe
  94. {% endif %}
  95. </a>
  96. </p>