Skip to content

Commit

Permalink
fix: modify the format of email alert (closes #477)
Browse files Browse the repository at this point in the history
- Change the subject of the email sent
- Remove the unsubscribe line from the end of the email alert
  • Loading branch information
kshitij123456 committed Dec 4, 2021
1 parent 34ac455 commit b2bf60c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chaos_genius/alerts/base_alerts.py
Expand Up @@ -278,7 +278,7 @@ def send_alert_email(self, anomaly):
recipient_emails = alert_channel_conf.get("email", [])

if recipient_emails:
subject = f"KPI Alert Notification: [Alert Name - {self.alert_info['alert_name']}] [Alert ID - {self.alert_info['id']}]"
subject = f"{self.alert_info['alert_name']} - KPI Alert Notification - Chaos Genius"
alert_message = self.alert_info["alert_message"]
time_of_anomaly = str(getattr(anomaly, 'data_datetime'))
highest_value = round(getattr(anomaly, 'y'), 1)
Expand Down
3 changes: 1 addition & 2 deletions chaos_genius/alerts/email_templates/layout.html
Expand Up @@ -150,8 +150,7 @@
style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; font-size: 12px; color: #999999; text-align: center;">
<span class="apple-link" style="color: #999999; font-size: 12px; text-align: center;">Chaos Genius,
3260 Hillview Ave, Palo Alto, California 94304, US</span>
<br> Don't like these emails? <a href="http://i.imgur.com/CScmqnj.gif"
style="text-decoration: underline; color: #999999; font-size: 12px; text-align: center;">Unsubscribe</a>.
<br>
</td>
</tr>
</table>
Expand Down

0 comments on commit b2bf60c

Please sign in to comment.