Skip to content

Commit

Permalink
feat: make CTA text in Alerts & Reports mails configurable (#19779)
Browse files Browse the repository at this point in the history
  • Loading branch information
cemremengu committed Jan 10, 2023
1 parent 08f45ef commit 0b22287
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 @@ -1259,6 +1259,9 @@ def EMAIL_HEADER_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 @@ -128,7 +128,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 0b22287

Please sign in to comment.