feat(alert/report): chart as csv format attachment for email and slack (#13828)

* add ui for setting report format

* refactor default notification format

* init csv data alert report

* add report format to report_schedule model

* add ALERTS_ATTACH_REPORTS feature flag

* fix lint

* update check image tag

* fix migrations

Co-authored-by: samtfm <sam@preset.io>
This commit is contained in:
Lily Kuang
2021-04-15 14:07:49 -07:00
committed by GitHub
parent 21c6efea67
commit df7e2b6a8e
15 changed files with 670 additions and 246 deletions

View File

@@ -24,10 +24,11 @@ from superset.models.reports import ReportRecipients, ReportRecipientType
@dataclass
class NotificationContent:
name: str
url: Optional[str] = None # url to chart/dashboard for this screenshot
csv: Optional[bytes] = None # bytes for csv file
screenshot: Optional[bytes] = None # bytes for the screenshot
text: Optional[str] = None
description: Optional[str] = ""
url: Optional[str] = None # url to chart/dashboard for this screenshot
class BaseNotification: # pylint: disable=too-few-public-methods