mirror of
https://github.com/apache/superset.git
synced 2026-04-16 14:45:21 +00:00
[dashboard] notify instead of modal onSave (#2941)
* [dashboard] notify instead of modal onSave * Addressing comments
This commit is contained in:
committed by
GitHub
parent
987cb9978d
commit
24e3c7f89a
@@ -1,7 +1,8 @@
|
||||
/* global notify */
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Button, FormControl, FormGroup, Radio } from 'react-bootstrap';
|
||||
import { getAjaxErrorMsg, showModal } from '../../modules/utils';
|
||||
import { getAjaxErrorMsg } from '../../modules/utils';
|
||||
import ModalTrigger from '../../components/ModalTrigger';
|
||||
|
||||
const $ = window.$ = require('jquery');
|
||||
@@ -53,19 +54,13 @@ class SaveModal extends React.PureComponent {
|
||||
if (saveType === 'newDashboard') {
|
||||
window.location = '/superset/dashboard/' + resp.id + '/';
|
||||
} else {
|
||||
showModal({
|
||||
title: 'Success',
|
||||
body: 'This dashboard was saved successfully.',
|
||||
});
|
||||
notify.success('This dashboard was saved successfully.');
|
||||
}
|
||||
},
|
||||
error(error) {
|
||||
saveModal.close();
|
||||
const errorMsg = getAjaxErrorMsg(error);
|
||||
showModal({
|
||||
title: 'Error',
|
||||
body: 'Sorry, there was an error saving this dashboard: </ br>' + errorMsg,
|
||||
});
|
||||
notify.error('Sorry, there was an error saving this dashboard: </ br>' + errorMsg);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user