You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/08/04 01:00:19 UTC

[GitHub] [incubator-superset] bkyryliuk commented on a change in pull request #10512: feat: updated email format for SQL-based email alerts

bkyryliuk commented on a change in pull request #10512:
URL: https://github.com/apache/incubator-superset/pull/10512#discussion_r464739123



##########
File path: superset/tasks/schedules.py
##########
@@ -602,10 +604,16 @@ def deliver_alert(alert: Alert, recipients: Optional[str] = None) -> None:
         textwrap.dedent(
             """\
             <h2>Alert: %(label)s</h2>
-            <img src="cid:screenshot" alt="%(label)s" />
+            <p><b>SQL Statement: </b>%(sql)s</p>
+            <p>Click <a href="%(image_url)s">here</a> or the image below 

Review comment:
       you can probably do even better here: 
   https://stackoverflow.com/questions/17245895/how-to-format-text-in-email-when-using-smtp
   
   e.g. 
   * highlight sql section & use separate font
   * show the result returned
   * use red color
   * have a link to the alert history

##########
File path: superset/tasks/schedules.py
##########
@@ -602,10 +604,16 @@ def deliver_alert(alert: Alert, recipients: Optional[str] = None) -> None:
         textwrap.dedent(
             """\
             <h2>Alert: %(label)s</h2>
-            <img src="cid:screenshot" alt="%(label)s" />
+            <p><b>SQL Statement: </b>%(sql)s</p>
+            <p>Click <a href="%(image_url)s">here</a> or the image below 
+            to view the Slice related to this alert.</p>

Review comment:
       s/Slice/ chart




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org