PyRunner / templates /notifications /email /run_completed.html
Akoda35's picture
Upload 3 files
cb973a9 verified
Raw
History Blame Contribute Delete
5.39 kB
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body style="margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background-color: #0d1117; color: #e6edf3;">
<table width="100%" cellpadding="0" cellspacing="0" style="max-width: 600px; margin: 0 auto; padding: 20px;">
<tr>
<td style="padding: 20px; background-color: #161b22; border-radius: 8px; border: 1px solid #30363d;">
<!-- Header -->
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td style="padding-bottom: 20px; border-bottom: 1px solid #30363d;">
<h1 style="margin: 0; font-size: 24px; color: #58a6ff;">PyRunner</h1>
</td>
</tr>
</table>
<!-- Status Badge -->
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td style="padding: 20px 0;">
<h2 style="margin: 0 0 10px 0; font-size: 20px; color: #e6edf3;">
Script: {{ script.name }}
</h2>
{% if status == 'success' %}
<span style="display: inline-block; padding: 4px 12px; background-color: rgba(63, 185, 80, 0.2); color: #3fb950; border-radius: 4px; font-size: 14px; font-weight: 600;">
SUCCESS
</span>
{% elif status == 'failed' %}
<span style="display: inline-block; padding: 4px 12px; background-color: rgba(248, 81, 73, 0.2); color: #f85149; border-radius: 4px; font-size: 14px; font-weight: 600;">
FAILED
</span>
{% elif status == 'timeout' %}
<span style="display: inline-block; padding: 4px 12px; background-color: rgba(210, 153, 34, 0.2); color: #d29922; border-radius: 4px; font-size: 14px; font-weight: 600;">
TIMEOUT
</span>
{% else %}
<span style="display: inline-block; padding: 4px 12px; background-color: rgba(139, 148, 158, 0.2); color: #8b949e; border-radius: 4px; font-size: 14px; font-weight: 600;">
{{ status|upper }}
</span>
{% endif %}
</td>
</tr>
</table>
<!-- Details -->
<table width="100%" cellpadding="0" cellspacing="0" style="margin-bottom: 20px;">
<tr>
<td style="padding: 10px 0; color: #8b949e; width: 120px;">Duration:</td>
<td style="padding: 10px 0; color: #e6edf3;">{{ duration }}</td>
</tr>
<tr>
<td style="padding: 10px 0; color: #8b949e;">Run ID:</td>
<td style="padding: 10px 0; color: #e6edf3; font-family: monospace; font-size: 12px;">{{ run.id }}</td>
</tr>
<tr>
<td style="padding: 10px 0; color: #8b949e;">Trigger:</td>
<td style="padding: 10px 0; color: #e6edf3;">{{ run.trigger_type|title }}</td>
</tr>
{% if run.exit_code is not None %}
<tr>
<td style="padding: 10px 0; color: #8b949e;">Exit Code:</td>
<td style="padding: 10px 0; color: #e6edf3;">{{ run.exit_code }}</td>
</tr>
{% endif %}
</table>
{% if error_excerpt %}
<!-- Error Excerpt -->
<table width="100%" cellpadding="0" cellspacing="0" style="margin-bottom: 20px;">
<tr>
<td style="padding: 15px; background-color: rgba(248, 81, 73, 0.1); border: 1px solid rgba(248, 81, 73, 0.3); border-radius: 6px;">
<p style="margin: 0 0 10px 0; color: #f85149; font-weight: 600; font-size: 14px;">Error Output:</p>
<pre style="margin: 0; padding: 10px; background-color: #0d1117; border-radius: 4px; font-family: monospace; font-size: 12px; color: #f85149; white-space: pre-wrap; word-wrap: break-word; overflow-x: auto;">{{ error_excerpt }}</pre>
</td>
</tr>
</table>
{% endif %}
<!-- Footer -->
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td style="padding-top: 20px; border-top: 1px solid #30363d; text-align: center;">
<p style="margin: 0; color: #8b949e; font-size: 12px;">
This notification was sent by PyRunner
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>