[dashboard] open in edit mode when adding a chart (#4772)

* [dashboard] open in edit mode when adding a chart

* Move dashboard unit tests to their own file

* fix tests

* Better URL management
This commit is contained in:
Maxime Beauchemin
2018-04-07 12:55:05 -07:00
committed by GitHub
parent bd2cb9aada
commit 627bdb2eb3
8 changed files with 316 additions and 258 deletions

View File

@@ -6,6 +6,7 @@ import { connect } from 'react-redux';
import { Modal, Alert, Button, Radio } from 'react-bootstrap';
import Select from 'react-select';
import { t } from '../../locales';
import { supersetURL } from '../../../utils/common';
const propTypes = {
can_overwrite: PropTypes.bool,
@@ -107,7 +108,7 @@ class SaveModal extends React.Component {
.then((data) => {
// Go to new slice url or dashboard url
if (gotodash) {
window.location = data.dashboard;
window.location = supersetURL(data.dashboard, { edit: 'true' });
} else {
window.location = data.slice.slice_url;
}