Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added success toasts for database, dataset, chart, dashboard, and query imports #18190

Merged
merged 5 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions superset-frontend/src/components/ImportModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ const ImportModelsModal: FunctionComponent<ImportModelsModalProps> = ({
passwordsNeededMessage,
confirmOverwriteMessage,
addDangerToast,
addSuccessToast,
onModelImport,
show,
onHide,
Expand Down Expand Up @@ -184,7 +183,6 @@ const ImportModelsModal: FunctionComponent<ImportModelsModalProps> = ({
confirmedOverwrite,
).then(result => {
if (result) {
addSuccessToast(t('The import was successful'));
clearModal();
onModelImport();
}
Expand Down
1 change: 1 addition & 0 deletions superset-frontend/src/views/CRUD/chart/ChartList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ function ChartList(props: ChartListProps) {
const handleChartImport = () => {
showImportModal(false);
refreshData();
addSuccessToast(t('Chart imported'));
};

const canCreate = hasPerm('can_write');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ function DashboardList(props: DashboardListProps) {
const handleDashboardImport = () => {
showImportModal(false);
refreshData();
addSuccessToast(t('Dashboard imported'));
};

const { userId } = props.user;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function DatabaseList({ addDangerToast, addSuccessToast }: DatabaseListProps) {
const handleDatabaseImport = () => {
showImportModal(false);
refreshData();
addSuccessToast(t('Database imported'));
};

const openDatabaseDeleteModal = (database: DatabaseObject) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
const handleDatasetImport = () => {
showImportModal(false);
refreshData();
addSuccessToast(t('Dataset imported'));
};

const canEdit = hasPerm('can_write');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ function SavedQueryList({
const handleSavedQueryImport = () => {
showImportModal(false);
refreshData();
addSuccessToast(t('Query imported'));
};

const canCreate = hasPerm('can_write');
Expand Down