diff --git a/superset/assets/package.json b/superset/assets/package.json index da5405624f074..c81a902e610aa 100644 --- a/superset/assets/package.json +++ b/superset/assets/package.json @@ -102,7 +102,6 @@ "react-dnd-html5-backend": "^2.5.4", "react-dom": "^15.6.2", "react-gravatar": "^2.6.1", - "react-grid-layout": "0.16.6", "react-map-gl": "^3.0.4", "react-markdown": "^3.3.0", "react-redux": "^5.0.2", diff --git a/superset/assets/spec/javascripts/dashboard/fixtures/mockDashboardState.js b/superset/assets/spec/javascripts/dashboard/fixtures/mockDashboardState.js index fd640d1f8b2b8..d405ccf327218 100644 --- a/superset/assets/spec/javascripts/dashboard/fixtures/mockDashboardState.js +++ b/superset/assets/spec/javascripts/dashboard/fixtures/mockDashboardState.js @@ -11,5 +11,4 @@ export default { maxUndoHistoryExceeded: false, isStarred: true, css: '', - isV2Preview: false, // @TODO remove upon v1 deprecation }; diff --git a/superset/assets/spec/javascripts/dashboard/reducers/dashboardState_spec.js b/superset/assets/spec/javascripts/dashboard/reducers/dashboardState_spec.js index f8095cd875972..7772f71015515 100644 --- a/superset/assets/spec/javascripts/dashboard/reducers/dashboardState_spec.js +++ b/superset/assets/spec/javascripts/dashboard/reducers/dashboardState_spec.js @@ -135,7 +135,6 @@ describe('dashboardState reducer', () => { hasUnsavedChanges: false, maxUndoHistoryExceeded: false, editMode: false, - isV2Preview: false, // @TODO remove upon v1 deprecation }); }); diff --git a/superset/assets/src/dashboard/components/Dashboard.jsx b/superset/assets/src/dashboard/components/Dashboard.jsx index 80d4bdf1e1f06..2bb9b9ca20ed0 100644 --- a/superset/assets/src/dashboard/components/Dashboard.jsx +++ b/superset/assets/src/dashboard/components/Dashboard.jsx @@ -86,9 +86,6 @@ class Dashboard extends React.PureComponent { componentWillReceiveProps(nextProps) { if (!nextProps.dashboardState.editMode) { - const version = nextProps.dashboardState.isV2Preview - ? 'v2-preview' - : 'v2'; // log pane loads const loadedPaneIds = []; let minQueryStartTime = Infinity; @@ -107,7 +104,7 @@ class Dashboard extends React.PureComponent { Logger.append(LOG_ACTIONS_LOAD_DASHBOARD_PANE, { ...restStats, duration: new Date().getTime() - paneMinQueryStart, - version, + version: 'v2', }); if (!this.isFirstLoad) { @@ -128,7 +125,7 @@ class Dashboard extends React.PureComponent { Logger.append(LOG_ACTIONS_FIRST_DASHBOARD_LOAD, { pane_ids: loadedPaneIds, duration: new Date().getTime() - minQueryStartTime, - version, + version: 'v2', }); Logger.send(this.actionLog); this.isFirstLoad = false; diff --git a/superset/assets/src/dashboard/components/Header.jsx b/superset/assets/src/dashboard/components/Header.jsx index 3b1b6b1f3690c..0c1951b8d7838 100644 --- a/superset/assets/src/dashboard/components/Header.jsx +++ b/superset/assets/src/dashboard/components/Header.jsx @@ -7,7 +7,6 @@ import EditableTitle from '../../components/EditableTitle'; import Button from '../../components/Button'; import FaveStar from '../../components/FaveStar'; import UndoRedoKeylisteners from './UndoRedoKeylisteners'; -import V2PreviewModal from '../deprecated/V2PreviewModal'; import { chartPropShape } from '../util/propShapes'; import { t } from '../../locales'; @@ -32,7 +31,6 @@ const propTypes = { startPeriodicRender: PropTypes.func.isRequired, updateDashboardTitle: PropTypes.func.isRequired, editMode: PropTypes.bool.isRequired, - isV2Preview: PropTypes.bool.isRequired, setEditMode: PropTypes.func.isRequired, showBuilderPane: PropTypes.bool.isRequired, toggleBuilderPane: PropTypes.func.isRequired, @@ -60,7 +58,6 @@ class Header extends React.PureComponent { didNotifyMaxUndoHistoryToast: false, emphasizeUndo: false, hightlightRedo: false, - showV2PreviewModal: props.isV2Preview, }; this.handleChangeText = this.handleChangeText.bind(this); @@ -69,7 +66,6 @@ class Header extends React.PureComponent { this.toggleEditMode = this.toggleEditMode.bind(this); this.forceRefresh = this.forceRefresh.bind(this); this.overwriteDashboard = this.overwriteDashboard.bind(this); - this.toggleShowV2PreviewModal = this.toggleShowV2PreviewModal.bind(this); } componentWillReceiveProps(nextProps) { @@ -129,10 +125,6 @@ class Header extends React.PureComponent { this.props.setEditMode(!this.props.editMode); } - toggleShowV2PreviewModal() { - this.setState({ showV2PreviewModal: !this.state.showV2PreviewModal }); - } - overwriteDashboard() { const { dashboardTitle, @@ -161,7 +153,6 @@ class Header extends React.PureComponent { filters, expandedSlices, css, - isV2Preview, onUndo, onRedo, undoLength, @@ -177,7 +168,7 @@ class Header extends React.PureComponent { const userCanEdit = dashboardInfo.dash_edit_perm; const userCanSaveAs = dashboardInfo.dash_save_perm; - const popButton = hasUnsavedChanges || isV2Preview; + const popButton = hasUnsavedChanges; return (