This is an automated email from the ASF dual-hosted git repository.
pkdotson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 44e3103fc9 feat: add success toast to alerts and reports (#19482)
44e3103fc9 is described below
commit 44e3103fc9029edd4c7fd1c8402607eecebeb1b3
Author: Phillip Kelley-Dotson <[email protected]>
AuthorDate: Thu Apr 7 18:45:35 2022 -0700
feat: add success toast to alerts and reports (#19482)
* feat: add success toast to alerts and reports
* remove console
* add suggestions
---
superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
index 6323edf3a0..7a68b2663f 100644
--- a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
+++ b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
@@ -73,6 +73,7 @@ type SelectValue = {
};
interface AlertReportModalProps {
+ addSuccessToast: (msg: string) => void;
addDangerToast: (msg: string) => void;
alert?: AlertObject | null;
isReport?: boolean;
@@ -402,6 +403,7 @@ const AlertReportModal:
FunctionComponent<AlertReportModalProps> = ({
show,
alert = null,
isReport = false,
+ addSuccessToast,
}) => {
const conf = useCommonConf();
const allowedNotificationMethods: NotificationMethodOption[] =
@@ -555,6 +557,8 @@ const AlertReportModal:
FunctionComponent<AlertReportModalProps> = ({
return;
}
+ addSuccessToast(t(`${data.type} updated`));
+
if (onAdd) {
onAdd();
}
@@ -569,6 +573,8 @@ const AlertReportModal:
FunctionComponent<AlertReportModalProps> = ({
return;
}
+ addSuccessToast(t(`${data.type} updated`));
+
if (onAdd) {
onAdd(response);
}