Akoda35 commited on
Commit
cb973a9
·
verified ·
1 Parent(s): fd154e0

Upload 3 files

Browse files
templates/notifications/email/run_completed.html ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ </head>
7
+ <body style="margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background-color: #0d1117; color: #e6edf3;">
8
+ <table width="100%" cellpadding="0" cellspacing="0" style="max-width: 600px; margin: 0 auto; padding: 20px;">
9
+ <tr>
10
+ <td style="padding: 20px; background-color: #161b22; border-radius: 8px; border: 1px solid #30363d;">
11
+ <!-- Header -->
12
+ <table width="100%" cellpadding="0" cellspacing="0">
13
+ <tr>
14
+ <td style="padding-bottom: 20px; border-bottom: 1px solid #30363d;">
15
+ <h1 style="margin: 0; font-size: 24px; color: #58a6ff;">PyRunner</h1>
16
+ </td>
17
+ </tr>
18
+ </table>
19
+
20
+ <!-- Status Badge -->
21
+ <table width="100%" cellpadding="0" cellspacing="0">
22
+ <tr>
23
+ <td style="padding: 20px 0;">
24
+ <h2 style="margin: 0 0 10px 0; font-size: 20px; color: #e6edf3;">
25
+ Script: {{ script.name }}
26
+ </h2>
27
+ {% if status == 'success' %}
28
+ <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;">
29
+ SUCCESS
30
+ </span>
31
+ {% elif status == 'failed' %}
32
+ <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;">
33
+ FAILED
34
+ </span>
35
+ {% elif status == 'timeout' %}
36
+ <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;">
37
+ TIMEOUT
38
+ </span>
39
+ {% else %}
40
+ <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;">
41
+ {{ status|upper }}
42
+ </span>
43
+ {% endif %}
44
+ </td>
45
+ </tr>
46
+ </table>
47
+
48
+ <!-- Details -->
49
+ <table width="100%" cellpadding="0" cellspacing="0" style="margin-bottom: 20px;">
50
+ <tr>
51
+ <td style="padding: 10px 0; color: #8b949e; width: 120px;">Duration:</td>
52
+ <td style="padding: 10px 0; color: #e6edf3;">{{ duration }}</td>
53
+ </tr>
54
+ <tr>
55
+ <td style="padding: 10px 0; color: #8b949e;">Run ID:</td>
56
+ <td style="padding: 10px 0; color: #e6edf3; font-family: monospace; font-size: 12px;">{{ run.id }}</td>
57
+ </tr>
58
+ <tr>
59
+ <td style="padding: 10px 0; color: #8b949e;">Trigger:</td>
60
+ <td style="padding: 10px 0; color: #e6edf3;">{{ run.trigger_type|title }}</td>
61
+ </tr>
62
+ {% if run.exit_code is not None %}
63
+ <tr>
64
+ <td style="padding: 10px 0; color: #8b949e;">Exit Code:</td>
65
+ <td style="padding: 10px 0; color: #e6edf3;">{{ run.exit_code }}</td>
66
+ </tr>
67
+ {% endif %}
68
+ </table>
69
+
70
+ {% if error_excerpt %}
71
+ <!-- Error Excerpt -->
72
+ <table width="100%" cellpadding="0" cellspacing="0" style="margin-bottom: 20px;">
73
+ <tr>
74
+ <td style="padding: 15px; background-color: rgba(248, 81, 73, 0.1); border: 1px solid rgba(248, 81, 73, 0.3); border-radius: 6px;">
75
+ <p style="margin: 0 0 10px 0; color: #f85149; font-weight: 600; font-size: 14px;">Error Output:</p>
76
+ <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>
77
+ </td>
78
+ </tr>
79
+ </table>
80
+ {% endif %}
81
+
82
+ <!-- Footer -->
83
+ <table width="100%" cellpadding="0" cellspacing="0">
84
+ <tr>
85
+ <td style="padding-top: 20px; border-top: 1px solid #30363d; text-align: center;">
86
+ <p style="margin: 0; color: #8b949e; font-size: 12px;">
87
+ This notification was sent by PyRunner
88
+ </p>
89
+ </td>
90
+ </tr>
91
+ </table>
92
+ </td>
93
+ </tr>
94
+ </table>
95
+ </body>
96
+ </html>
templates/notifications/email/run_completed.txt ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PyRunner Script Notification
2
+ ============================
3
+
4
+ Script: {{ script.name }}
5
+ Status: {{ status|upper }}
6
+ Duration: {{ duration }}
7
+ Run ID: {{ run.id }}
8
+ Trigger: {{ run.trigger_type|title }}
9
+ {% if run.exit_code is not None %}Exit Code: {{ run.exit_code }}{% endif %}
10
+
11
+ {% if error_excerpt %}
12
+ Error Output:
13
+ -------------
14
+ {{ error_excerpt }}
15
+ {% endif %}
16
+
17
+ ---
18
+ This notification was sent by PyRunner
templates/notifications/email/test_email.html ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ </head>
7
+ <body style="margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background-color: #0d1117; color: #e6edf3;">
8
+ <table width="100%" cellpadding="0" cellspacing="0" style="max-width: 600px; margin: 0 auto; padding: 20px;">
9
+ <tr>
10
+ <td style="padding: 30px; background-color: #161b22; border-radius: 8px; border: 1px solid #30363d; text-align: center;">
11
+ <h1 style="color: #58a6ff; margin: 0 0 20px 0; font-size: 28px;">PyRunner</h1>
12
+
13
+ <div style="padding: 20px; background-color: rgba(63, 185, 80, 0.1); border: 1px solid rgba(63, 185, 80, 0.3); border-radius: 8px; margin-bottom: 20px;">
14
+ <p style="color: #3fb950; font-size: 18px; margin: 0; font-weight: 600;">
15
+ Email Configuration Test Successful!
16
+ </p>
17
+ </div>
18
+
19
+ <p style="color: #e6edf3; font-size: 16px; margin: 0 0 10px 0;">
20
+ Your email settings are working correctly.
21
+ </p>
22
+
23
+ <p style="color: #8b949e; font-size: 14px; margin: 0;">
24
+ Sent at: {{ timestamp|date:"M d, Y H:i:s" }} UTC
25
+ </p>
26
+
27
+ <hr style="border: none; border-top: 1px solid #30363d; margin: 20px 0;">
28
+
29
+ <p style="color: #8b949e; font-size: 12px; margin: 0;">
30
+ This is a test email from PyRunner
31
+ </p>
32
+ </td>
33
+ </tr>
34
+ </table>
35
+ </body>
36
+ </html>