Adding the new rewrite

This commit is contained in:
Ketan Patel committed 2026-04-04 13:53:57 -04:00
1 parent 4aca9f08d1
commit 9b48b01d1d
62 files changed
+4510 -1406

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"></head>
<body style="font-family: -apple-system, Segoe UI, Arial, sans-serif; margin: 0; padding: 0; background: #f4f4f4;">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background: #f4f4f4; padding: 24px 0;">
<tr>
<td align="center">
<table role="presentation" width="560" cellpadding="0" cellspacing="0" style="background: #ffffff; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.08);">
<tr>
<td style="background: {{ color }}; color: #ffffff; padding: 16px 20px; font-size: 18px; font-weight: 600;">
[{{ top_severity }}] {{ ups_name }}
</td>
</tr>
<tr>
<td style="padding: 20px;">
<p style="margin: 0 0 12px; color: #333;">The following alerts were triggered:</p>
<ul style="margin: 0 0 16px; padding-left: 20px; color: #333;">
{% for a in alerts %}
<li style="margin-bottom: 6px;"><strong>[{{ a.severity }}]</strong> {{ a.message }}</li>
{% endfor %}
</ul>
<p style="margin: 0 0 8px;"><a href="{{ dashboard_url }}" style="color: #2980b9;">Open dashboard</a></p>
<p style="margin: 0; color: #888; font-size: 12px;">Sent at {{ sent_at }}</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
+21
View File
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"></head>
<body style="font-family: -apple-system, Segoe UI, Arial, sans-serif;">
<h2>UPS Daily Summary</h2>
<p>Sent at: {{ sent_at }}</p>
<table cellpadding="6" cellspacing="0" border="1" style="border-collapse: collapse;">
<tr><th>UPS</th><th>Status</th><th>Load %</th><th>Battery %</th><th>kWh today</th><th>Alerts (24h)</th></tr>
{% for row in summary.ups_rows %}
<tr>
<td>{{ row.name }}</td>
<td>{{ row.status }}</td>
<td>{{ row.loadpct }}</td>
<td>{{ row.bcharge }}</td>
<td>{{ row.kwh }}</td>
<td>{{ row.alerts_count }}</td>
</tr>
{% endfor %}
</table>
</body>
</html>