healthchecks_healthchecks/templates/integrations/signal_message.html

51 lines
1.8 KiB
HTML

{% load hc_extras humanize linemode %}{% linemode %}
{% if status == "down" %}
{% line %}The check <b>{{ check.name_then_code }}</b> is <b>DOWN</b>.{% endline %}
{% else %}
{% line %}The check <b>{{ check.name_then_code }}</b> is now <b>UP</b>.{% endline %}
{% endif %}
{% line %}{% endline %}
{% if check.project.name %}
{% line %}<b>Project:</b> {{ check.project.name }}{% endline %}
{% endif %}
{% if check.tags_list %}
{% line %}<b>Tags:</b> {{ check.tags_list|join:", " }}{% endline %}
{% endif %}
{% if check.kind == "simple" %}
{% line %}<b>Period:</b> {{ check.timeout|hc_duration }}{% endline %}
{% endif %}
{% if check.kind == "cron" or check.kind == "oncalendar" %}
{% line %}<b>Schedule:</b> <code>{{ check.schedule }}</code>{% endline %}
{% line %}<b>Time Zone:</b> {{ check.tz }}{% endline %}
{% endif %}
{% line %}<b>Total Pings:</b> {% if ping %}{{ ping.n }}{% else %}0{% endif %}{% endline %}
{% if ping is None %}
{% line %}<b>Last Ping:</b> Never{% endline %}
{% else %}
{% line %}<b>Last Ping:</b> {{ ping.get_kind_display }}, {{ ping.created|naturaltime }}{% endline %}
{% endif %}
{% if down_checks is not None %}
{% line %}{% endline %}
{% if down_checks %}
{% if down_checks|length > 10 %}
{% line %}{{ down_checks|length }} other checks are {% if status == "down" %}also{% else %}still{% endif %} down.{% endline %}
{% else %}
{% line %}The following checks are {% if status == "down" %}also{% else %}still{% endif %} down:{% endline %}
{% for c in down_checks %}
{% line %}• <b>{{ c.name_then_code|safe }}</b> (last ping: {{ c.last_ping|naturaltime|default:"never" }}){% endline %}
{% endfor %}
{% endif %}
{% else %}
{% line %}All the other checks are up.{% endline %}
{% endif %}
{% endif %}
{% endlinemode %}