Files
bvandeusenandClaude Opus 5.5 ec55faf737
CI / lint (push) Successful in 4s
CI / integration (push) Successful in 1m22s
CI / unit (push) Successful in 1m49s
CI / publish (push) Successful in 1m13s
feat(email): alert and weekly-report emails read as designed messages (#5335)
#5335 "Emails Steward sends read as designed messages: an HTML alert email
and weekly report, with a plain-text twin".

- core/mail.py renders each email as multipart/alternative from
  templates/email/: a table-and-inline-style HTML part and a plain-text
  twin carrying the same facts. Colours are the design system's light
  theme, resolved from theme.css; nothing is fetched when a mail opens.
- Alert email: state badge, a headline sentence ("Disk used on web01 is
  94%."), rule, resource, reading, the condition in words, and the time in
  the zone Notifications was saved in with UTC beside it; "View in
  Steward" when Steward's address is set. Subject "[Steward] Firing: <rule>
  — <resource> 94%". Alerts now carry their operator.
- Weekly report: monitors down, active alerts, the week's alert events,
  uptime and busiest Traefik routers as small tables with links. Sent from
  the configured From address; the "Generated … UTC" line and the stale
  repo footer are gone.
- condition_text() states a condition from a rule's parts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 14:08:05 -04:00

21 lines
512 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{# An alert email's plain-text part; the same facts as alert.html. #}
{{ a.state }}: {{ a.headline }}
Rule: {{ a.rule }}
Resource: {{ a.resource }}
Reading: {{ a.reading }}
Fires when: {{ a.condition }}
When: {{ a.when }}{% if a.when_utc %} ({{ a.when_utc }}){% endif %}
{% if a.note %}
Note: {{ a.note }}
{% endif %}
{% if link %}
View in Steward: {{ link }}
{% endif %}
--
Steward sends this to everyone on its email list when an alert rule changes
state. Who gets it is set in Settings › Notifications.