You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2022/02/17 19:57:02 UTC
[superset] 01/01: wip
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch hugh-add-bypass-cache-dash
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 5537e2ed3e9eb3eb9f1deeec61776e6d393373e7
Author: hughhhh <hu...@gmail.com>
AuthorDate: Thu Feb 17 14:53:41 2022 -0500
wip
---
.../src/views/CRUD/alert/AlertReportModal.tsx | 24 +++++++++++-----------
superset/reports/commands/execute.py | 1 -
2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
index 2934c3c..fa26e21 100644
--- a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
+++ b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
@@ -940,7 +940,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
(!currentAlert || currentAlert.id || (isHidden && show))
) {
setCurrentAlert({ ...DEFAULT_ALERT });
- setForceScreenshot(contentType === 'chart' && !isReport);
+ setForceScreenshot(!isReport);
setNotificationSettings([]);
setNotificationAddState('active');
}
@@ -1369,19 +1369,19 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
)}
</StyledRadioGroup>
</div>
- {isReport && (
- <div className="inline-container">
- <StyledCheckbox
- className="checkbox"
- checked={forceScreenshot}
- onChange={onForceScreenshotChange}
- >
- Ignore cache when generating screenshot
- </StyledCheckbox>
- </div>
- )}
</>
)}
+ {isReport && (
+ <div className="inline-container">
+ <StyledCheckbox
+ className="checkbox"
+ checked={forceScreenshot}
+ onChange={onForceScreenshotChange}
+ >
+ Ignore cache when generating screenshot
+ </StyledCheckbox>
+ </div>
+ )}
<StyledSectionTitle>
<h4>{t('Notification method')}</h4>
<span className="required">*</span>
diff --git a/superset/reports/commands/execute.py b/superset/reports/commands/execute.py
index 7e7eeac..6e7afad 100644
--- a/superset/reports/commands/execute.py
+++ b/superset/reports/commands/execute.py
@@ -147,7 +147,6 @@ class BaseReportState:
Get the url for this report schedule: chart or dashboard
"""
force = "true" if self._report_schedule.force_screenshot else "false"
-
if self._report_schedule.chart:
if result_format in {
ChartDataResultFormat.CSV,