Skip to content

Commit

Permalink
feat: make cta configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
cemremengu committed Apr 19, 2022
1 parent 34008f7 commit e68b86b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,9 @@ def SQL_QUERY_MUTATOR( # pylint: disable=invalid-name,unused-argument
# A custom prefix to use on all Alerts & Reports emails
EMAIL_REPORTS_SUBJECT_PREFIX = "[Report] "

# The text for call-to-action link in Alerts & Reports emails
EMAIL_REPORTS_CTA = "Explore in Superset"

# Slack API token for the superset reports, either string or callable
SLACK_API_TOKEN: Optional[Union[Callable[[], str], str]] = None
SLACK_PROXY = None
Expand Down
2 changes: 1 addition & 1 deletion superset/reports/notifications/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def _get_content(self) -> EmailContent:
else:
html_table = ""

call_to_action = __("Explore in Superset")
call_to_action = __(app.config["EMAIL_REPORTS_CTA"])
url = (
modify_url_query(self._content.url, standalone="0")
if self._content.url is not None
Expand Down

0 comments on commit e68b86b

Please sign in to comment.