Skip to content

Commit

Permalink
add force cahce bypass option to alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Feb 18, 2022
1 parent 5537e2e commit 9ee0013
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ const StyledRadioGroup = styled(Radio.Group)`
`;

const StyledCheckbox = styled(Checkbox)`
margin-top: ${({ theme }) => theme.gridUnit * 2}px;
margin-left: ${({ theme }) => theme.gridUnit * 5.5}px;
`;

Expand Down Expand Up @@ -940,7 +941,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
(!currentAlert || currentAlert.id || (isHidden && show))
) {
setCurrentAlert({ ...DEFAULT_ALERT });
setForceScreenshot(!isReport);
// setForceScreenshot(!isReport);
setNotificationSettings([]);
setNotificationAddState('active');
}
Expand Down Expand Up @@ -1371,17 +1372,13 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
</div>
</>
)}
{isReport && (
<div className="inline-container">
<StyledCheckbox
className="checkbox"
checked={forceScreenshot}
onChange={onForceScreenshotChange}
>
Ignore cache when generating screenshot
</StyledCheckbox>
</div>
)}
<StyledCheckbox
className="checkbox"
checked={forceScreenshot}
onChange={onForceScreenshotChange}
>
Ignore cache when generating screenshot
</StyledCheckbox>
<StyledSectionTitle>
<h4>{t('Notification method')}</h4>
<span className="required">*</span>
Expand Down

0 comments on commit 9ee0013

Please sign in to comment.