healthchecks_healthchecks/templates/integrations/ntfy_message.html

44 lines
1.5 KiB
HTML

{% load hc_extras humanize linemode %}{% linemode %}
{% autoescape off %}
{% if check.project.name %}
{% line %}Project: {{ check.project.name }}{% endline %}
{% endif %}
{% if check.tags_list %}
{% line %}Tags: {{ check.tags_list|join:", " }}{% endline %}
{% endif %}
{% if check.kind == "simple" %}
{% line %}Period: {{ check.timeout|hc_duration }}{% endline %}
{% endif %}
{% if check.kind == "cron" or check.kind == "oncalendar" %}
{% line %}Schedule: {{ check.schedule }}{% endline %}
{% line %}Time Zone: {{ check.tz }}{% endline %}
{% endif %}
{% line %}Total Pings: {% if ping %}{{ ping.n }}{% else %}0{% endif %}{% endline %}
{% if ping is None %}
{% line %}Last Ping: Never{% endline %}
{% else %}
{% line %}Last Ping: {{ 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 %}• {{ c.name_then_code }} (last ping: {{ c.last_ping|naturaltime|default:"never" }}){% endline %}
{% endfor %}
{% endif %}
{% else %}
{% line %}All the other checks are up.{% endline %}
{% endif %}
{% endif %}
{% endautoescape %}
{% endlinemode %}