Skip to content
This repository has been archived by the owner on Feb 9, 2020. It is now read-only.

Commit

Permalink
Merge branch 'refactor' into 'master'
Browse files Browse the repository at this point in the history
Minor cosmetic changes in the notification template

See merge request ix.ai/alertmanager-telegram-bot!29
  • Loading branch information
tlex committed Feb 2, 2020
2 parents 4a80f12 + 18d3940 commit 8785624
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions templates/notify.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
{%- for alert in a['alerts'] %}

{% if alert['status'] == 'firing' %}🔥{% else %}{% endif %}<b>{{ alert['status']|upper }}</b>{% if alert['status'] == 'firing' %}🔥{% else %}{% endif %}

{% for label in alert['labels'] -%}
<b>{{ label | e }}</b>: {{ alert['labels'][label]|e }}
{% endfor -%}

{% endfor %}
{% for annotation in alert['annotations'] -%}
<b>{{ annotation|e }}</b>: {{ alert['annotations'][annotation]|e }}
{% endfor -%}

{% endfor %}
<b>Since:</b> {{ alert['startsAt'] }}
{% if alert['status'] != 'firing' %}<b>Ended:</b> {{ alert['endsAt'] }}
{% endif %}<b>Generator:</b> {{ alert['generatorURL'] }}
Expand Down

0 comments on commit 8785624

Please sign in to comment.