"swarm services short on swarm is 6." becomes "6 swarm services are short of their replicas.", with a Which line naming each service and how many of its tasks run. The swarm figures get labels, and the counting figures (swarm, mounts, drives, updates) read as sentences in the email, its subject and the Alerts page. A plugin names what its count counts through core.alerts.names_behind; the Docker plugin does for the three swarm figures, from the stored swarm. Webhooks get alert.which too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.9 KiB
HTML
33 lines
1.9 KiB
HTML
{# Several alerts that arrived together (core.outbox.alert_words, #5465), as one
|
||
email's HTML part: alerts = [mail.alert_facts()], oldest first; said = how
|
||
many of each ("3 firing, 1 resolved"); link = the alerts page or "". #}
|
||
{% extends "_layout.html" %}
|
||
{% from "_parts.html" import badge, button with context %}
|
||
{% block title %}{{ alerts|length }} alerts: {{ said }}{% endblock %}
|
||
{% block body %}
|
||
<tr><td style="padding:14px 24px 4px 24px;font:600 20px/1.35 {{ c.font }};color:{{ c.text }};">{{ alerts|length }} alerts changed together: {{ said }}.</td></tr>
|
||
<tr><td style="padding:2px 24px 6px 24px;font:14px/1.5 {{ c.font }};color:{{ c.muted }};">Gathered into one email because they arrived within moments of each other.</td></tr>
|
||
<tr><td style="padding:6px 24px 4px 24px;">
|
||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-top:1px solid {{ c.border }};">
|
||
{% for a in alerts %}
|
||
<tr><td style="padding:10px 0;border-bottom:1px solid {{ c.border }};">
|
||
<div>{{ badge(a.tone, a.state) }}</div>
|
||
<div style="padding-top:6px;font:600 15px/1.4 {{ c.font }};color:{{ c.text }};">{{ a.headline }}</div>
|
||
{% if a.which %}<div style="padding-top:2px;font:14px/1.5 {{ c.font }};color:{{ c.text }};">Which: {{ a.which }}</div>{% endif %}
|
||
<div style="padding-top:2px;font:13px/1.5 {{ c.font }};color:{{ c.muted }};">{{ a.rule }} · fires when {{ a.condition }} · {{ a.when }}</div>
|
||
{% if a.note %}<div style="padding-top:2px;font:13px/1.5 {{ c.font }};color:{{ c.muted }};">{{ a.note }}</div>{% endif %}
|
||
</td></tr>
|
||
{% endfor %}
|
||
</table>
|
||
</td></tr>
|
||
{% if link %}
|
||
<tr><td style="padding:16px 24px 24px 24px;">{{ button(link, "View in Steward") }}</td></tr>
|
||
{% else %}
|
||
<tr><td style="padding:0 0 12px 0;"></td></tr>
|
||
{% endif %}
|
||
{% endblock %}
|
||
{% block footer %}
|
||
Steward sends this to everyone on its email list when alert rules change state.
|
||
Who gets it is set in Settings › Notifications.
|
||
{% endblock %}
|