diff --git a/superset/assets/spec/javascripts/explore/components/ControlPanelsContainer_spec.jsx b/superset/assets/spec/javascripts/explore/components/ControlPanelsContainer_spec.jsx index 54579906a6cbc..fb1ea610fc989 100644 --- a/superset/assets/spec/javascripts/explore/components/ControlPanelsContainer_spec.jsx +++ b/superset/assets/spec/javascripts/explore/components/ControlPanelsContainer_spec.jsx @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { describe, it, beforeEach } from 'mocha'; import { shallow } from 'enzyme'; import { getFormDataFromControls, defaultControls } - from '../../../../src/explore/stores/store'; + from '../../../../src/explore/store'; import { ControlPanelsContainer, } from '../../../../src/explore/components/ControlPanelsContainer'; diff --git a/superset/assets/spec/javascripts/explore/exploreActions_spec.js b/superset/assets/spec/javascripts/explore/exploreActions_spec.js index 31d92510adcde..a87a45d60813d 100644 --- a/superset/assets/spec/javascripts/explore/exploreActions_spec.js +++ b/superset/assets/spec/javascripts/explore/exploreActions_spec.js @@ -5,7 +5,7 @@ import sinon from 'sinon'; import $ from 'jquery'; import * as chartActions from '../../../src/chart/chartAction'; import * as actions from '../../../src/explore/actions/exploreActions'; -import { defaultState } from '../../../src/explore/stores/store'; +import { defaultState } from '../../../src/explore/store'; import exploreReducer from '../../../src/explore/reducers/exploreReducer'; describe('reducers', () => { diff --git a/superset/assets/src/SqlLab/components/VisualizeModal.jsx b/superset/assets/src/SqlLab/components/VisualizeModal.jsx index d97831c64a93f..4bb7a8424865e 100644 --- a/superset/assets/src/SqlLab/components/VisualizeModal.jsx +++ b/superset/assets/src/SqlLab/components/VisualizeModal.jsx @@ -12,7 +12,7 @@ import shortid from 'shortid'; import { exportChart } from '../../explore/exploreUtils'; import * as actions from '../actions'; import { VISUALIZE_VALIDATION_ERRORS } from '../constants'; -import visTypes from '../../explore/stores/visTypes'; +import visTypes from '../../explore/visTypes'; import { t } from '../../locales'; const CHART_TYPES = Object.keys(visTypes) diff --git a/superset/assets/src/addSlice/AddSliceContainer.jsx b/superset/assets/src/addSlice/AddSliceContainer.jsx index 6b1f5e7a86098..68b5eee2502ce 100644 --- a/superset/assets/src/addSlice/AddSliceContainer.jsx +++ b/superset/assets/src/addSlice/AddSliceContainer.jsx @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Button, Panel } from 'react-bootstrap'; import Select from 'react-virtualized-select'; -import visTypes from '../explore/stores/visTypes'; +import visTypes from '../explore/visTypes'; import { t } from '../locales'; const propTypes = { diff --git a/superset/assets/src/chart/Chart.jsx b/superset/assets/src/chart/Chart.jsx index b69ee3ae3b52b..f223174efa526 100644 --- a/superset/assets/src/chart/Chart.jsx +++ b/superset/assets/src/chart/Chart.jsx @@ -10,7 +10,7 @@ import Loading from '../components/Loading'; import { Logger, LOG_ACTIONS_RENDER_EVENT } from '../logger'; import StackTraceMessage from '../components/StackTraceMessage'; import RefreshChartOverlay from '../components/RefreshChartOverlay'; -import visMap from '../visualizations/main'; +import visMap from '../visualizations'; import sandboxedEval from '../modules/sandbox'; import './chart.css'; diff --git a/superset/assets/src/components/AlteredSliceTag.jsx b/superset/assets/src/components/AlteredSliceTag.jsx index ad1356b48b0c5..5c779651c2961 100644 --- a/superset/assets/src/components/AlteredSliceTag.jsx +++ b/superset/assets/src/components/AlteredSliceTag.jsx @@ -4,7 +4,7 @@ import { Table, Tr, Td, Thead, Th } from 'reactable'; import { isEqual, isEmpty } from 'underscore'; import TooltipWrapper from './TooltipWrapper'; -import { controls } from '../explore/stores/controls'; +import { controls } from '../explore/controls'; import ModalTrigger from './ModalTrigger'; import { t } from '../locales'; diff --git a/superset/assets/src/dashboard/reducers.js b/superset/assets/src/dashboard/reducers.js index 074c44524add5..01e6dc23ab414 100644 --- a/superset/assets/src/dashboard/reducers.js +++ b/superset/assets/src/dashboard/reducers.js @@ -7,7 +7,7 @@ import charts, { chart } from '../chart/chartReducer'; import * as actions from './actions'; import { getParam } from '../modules/utils'; import { alterInArr, removeFromArr } from '../reduxUtils'; -import { applyDefaultFormData } from '../explore/stores/store'; +import { applyDefaultFormData } from '../explore/store'; import { getColorFromScheme } from '../modules/colors'; export function getInitialState(bootstrapData) { diff --git a/superset/assets/src/explore/components/ControlPanelsContainer.jsx b/superset/assets/src/explore/components/ControlPanelsContainer.jsx index 8fe18db77f902..cb2cd7965cb72 100644 --- a/superset/assets/src/explore/components/ControlPanelsContainer.jsx +++ b/superset/assets/src/explore/components/ControlPanelsContainer.jsx @@ -4,11 +4,11 @@ import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { Alert, Tab, Tabs } from 'react-bootstrap'; -import visTypes, { sectionsToRender } from '../stores/visTypes'; +import visTypes, { sectionsToRender } from '../visTypes'; import ControlPanelSection from './ControlPanelSection'; import ControlRow from './ControlRow'; import Control from './Control'; -import controls from '../stores/controls'; +import controls from '../controls'; import * as actions from '../actions/exploreActions'; const propTypes = { diff --git a/superset/assets/src/explore/components/ExploreViewContainer.jsx b/superset/assets/src/explore/components/ExploreViewContainer.jsx index 1fec139c54dd1..c8d7acd82ef50 100644 --- a/superset/assets/src/explore/components/ExploreViewContainer.jsx +++ b/superset/assets/src/explore/components/ExploreViewContainer.jsx @@ -10,7 +10,7 @@ import SaveModal from './SaveModal'; import QueryAndSaveBtns from './QueryAndSaveBtns'; import { getExploreUrlAndPayload, getExploreLongUrl } from '../exploreUtils'; import { areObjectsEqual } from '../../reduxUtils'; -import { getFormDataFromControls } from '../stores/store'; +import { getFormDataFromControls } from '../store'; import { chartPropType } from '../../chart/chartReducer'; import * as exploreActions from '../actions/exploreActions'; import * as saveModalActions from '../actions/saveModalActions'; diff --git a/superset/assets/src/explore/components/controls/AnnotationLayer.jsx b/superset/assets/src/explore/components/controls/AnnotationLayer.jsx index fe52905c88217..340389072aa2a 100644 --- a/superset/assets/src/explore/components/controls/AnnotationLayer.jsx +++ b/superset/assets/src/explore/components/controls/AnnotationLayer.jsx @@ -24,7 +24,7 @@ import { ALL_COLOR_SCHEMES } from '../../../modules/colors'; import PopoverSection from '../../../components/PopoverSection'; import ControlHeader from '../ControlHeader'; import { nonEmpty } from '../../validators'; -import vizTypes from '../../stores/visTypes'; +import vizTypes from '../../visTypes'; const AUTOMATIC_COLOR = ''; diff --git a/superset/assets/src/explore/components/controls/FixedOrMetricControl.jsx b/superset/assets/src/explore/components/controls/FixedOrMetricControl.jsx index bf9e7f13e243c..df4eec0cb9dcc 100644 --- a/superset/assets/src/explore/components/controls/FixedOrMetricControl.jsx +++ b/superset/assets/src/explore/components/controls/FixedOrMetricControl.jsx @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Label, Popover, OverlayTrigger } from 'react-bootstrap'; -import controls from '../../stores/controls'; +import controls from '../../controls'; import TextControl from './TextControl'; import SelectControl from './SelectControl'; import ControlHeader from '../ControlHeader'; diff --git a/superset/assets/src/explore/components/controls/VizTypeControl.jsx b/superset/assets/src/explore/components/controls/VizTypeControl.jsx index cc70226daee0f..74ba759c3fa67 100644 --- a/superset/assets/src/explore/components/controls/VizTypeControl.jsx +++ b/superset/assets/src/explore/components/controls/VizTypeControl.jsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { Label, Row, Col, FormControl, Modal, OverlayTrigger, Tooltip } from 'react-bootstrap'; -import visTypes from '../../stores/visTypes'; +import visTypes from '../../visTypes'; import ControlHeader from '../ControlHeader'; import { t } from '../../../locales'; diff --git a/superset/assets/src/explore/stores/controls.jsx b/superset/assets/src/explore/controls.jsx similarity index 99% rename from superset/assets/src/explore/stores/controls.jsx rename to superset/assets/src/explore/controls.jsx index 2dc7cf205f4cb..ae964ef03c695 100644 --- a/superset/assets/src/explore/stores/controls.jsx +++ b/superset/assets/src/explore/controls.jsx @@ -43,14 +43,14 @@ import { formatSelectOptionsForRange, formatSelectOptions, mainMetric, -} from '../../modules/utils'; -import * as v from '../validators'; -import { colorPrimary, ALL_COLOR_SCHEMES, spectrums } from '../../modules/colors'; -import { defaultViewport } from '../../modules/geo'; -import MetricOption from '../../components/MetricOption'; -import ColumnOption from '../../components/ColumnOption'; -import OptionDescription from '../../components/OptionDescription'; -import { t } from '../../locales'; +} from '../modules/utils'; +import * as v from './validators'; +import { colorPrimary, ALL_COLOR_SCHEMES, spectrums } from '../modules/colors'; +import { defaultViewport } from '../modules/geo'; +import MetricOption from '../components/MetricOption'; +import ColumnOption from '../components/ColumnOption'; +import OptionDescription from '../components/OptionDescription'; +import { t } from '../locales'; const D3_FORMAT_DOCS = 'D3 format syntax: https://github.com/d3/d3-format'; diff --git a/superset/assets/src/explore/index.jsx b/superset/assets/src/explore/index.jsx index 74f5a0bb68e45..5989b5f9cbe39 100644 --- a/superset/assets/src/explore/index.jsx +++ b/superset/assets/src/explore/index.jsx @@ -10,7 +10,7 @@ import { now } from '../modules/dates'; import { initEnhancer } from '../reduxUtils'; import { getChartKey } from './exploreUtils'; import AlertsWrapper from '../components/AlertsWrapper'; -import { getControlsState, getFormDataFromControls } from './stores/store'; +import { getControlsState, getFormDataFromControls } from './store'; import { initJQueryAjax } from '../modules/utils'; import ExploreViewContainer from './components/ExploreViewContainer'; import rootReducer from './reducers/index'; diff --git a/superset/assets/src/explore/reducers/exploreReducer.js b/superset/assets/src/explore/reducers/exploreReducer.js index e6cb827a62509..a2c531e710186 100644 --- a/superset/assets/src/explore/reducers/exploreReducer.js +++ b/superset/assets/src/explore/reducers/exploreReducer.js @@ -1,5 +1,5 @@ /* eslint camelcase: 0 */ -import { getControlsState, getFormDataFromControls } from '../stores/store'; +import { getControlsState, getFormDataFromControls } from '../store'; import * as actions from '../actions/exploreActions'; export default function exploreReducer(state = {}, action) { diff --git a/superset/assets/src/explore/stores/store.js b/superset/assets/src/explore/store.js similarity index 100% rename from superset/assets/src/explore/stores/store.js rename to superset/assets/src/explore/store.js diff --git a/superset/assets/src/explore/stores/visTypes.js b/superset/assets/src/explore/visTypes.js similarity index 99% rename from superset/assets/src/explore/stores/visTypes.js rename to superset/assets/src/explore/visTypes.js index 4954cf0634e16..28dfdff646873 100644 --- a/superset/assets/src/explore/stores/visTypes.js +++ b/superset/assets/src/explore/visTypes.js @@ -3,8 +3,8 @@ * and associated with each and every visualization type. */ import { D3_TIME_FORMAT_OPTIONS } from './controls'; -import * as v from '../validators'; -import { t } from '../../locales'; +import * as v from './validators'; +import { t } from '../locales'; export const sections = { druidTimeSeries: { diff --git a/superset/assets/src/modules/AnnotationTypes.js b/superset/assets/src/modules/AnnotationTypes.js index fc8acb5d3d394..e2c882af1db9d 100644 --- a/superset/assets/src/modules/AnnotationTypes.js +++ b/superset/assets/src/modules/AnnotationTypes.js @@ -1,5 +1,5 @@ -import { VIZ_TYPES } from '../visualizations/main'; -import vizTypes from '../explore/stores/visTypes'; +import { VIZ_TYPES } from '../visualizations'; +import vizTypes from '../explore/visTypes'; export const ANNOTATION_TYPES = { FORMULA: 'FORMULA', diff --git a/superset/assets/src/syncBackend.js b/superset/assets/src/syncBackend.js index a40410af1e41b..fe314d82c9c9e 100644 --- a/superset/assets/src/syncBackend.js +++ b/superset/assets/src/syncBackend.js @@ -1,7 +1,7 @@ /* eslint no-console: 0 */ import fs from 'fs'; import path from 'path'; -import { controls } from './explore/stores/controls'; +import { controls } from './explore/controls'; function exportFile(fileLocation, content) { fs.writeFile(fileLocation, content, function (err) { diff --git a/superset/assets/src/visualizations/filter_box.jsx b/superset/assets/src/visualizations/filter_box.jsx index bf376571e5b68..ea9cbdc39a9a4 100644 --- a/superset/assets/src/visualizations/filter_box.jsx +++ b/superset/assets/src/visualizations/filter_box.jsx @@ -10,7 +10,7 @@ import { Button } from 'react-bootstrap'; import DateFilterControl from '../explore/components/controls/DateFilterControl'; import ControlRow from '../explore/components/ControlRow'; import Control from '../explore/components/Control'; -import controls from '../explore/stores/controls'; +import controls from '../explore/controls'; import OnPasteSelect from '../components/OnPasteSelect'; import VirtualizedRendererWrap from '../components/VirtualizedRendererWrap'; import './filter_box.css'; diff --git a/superset/assets/src/visualizations/main.js b/superset/assets/src/visualizations/index.js similarity index 100% rename from superset/assets/src/visualizations/main.js rename to superset/assets/src/visualizations/index.js diff --git a/superset/assets/src/visualizations/nvd3_vis.js b/superset/assets/src/visualizations/nvd3_vis.js index 68fe69f8c30b2..d78bf2f71441e 100644 --- a/superset/assets/src/visualizations/nvd3_vis.js +++ b/superset/assets/src/visualizations/nvd3_vis.js @@ -20,7 +20,7 @@ import { t } from '../locales'; // CSS import './nvd3_vis.css'; -import { VIZ_TYPES } from './main'; +import { VIZ_TYPES } from './'; const minBarWidth = 15; // Limit on how large axes margins can grow as the chart window is resized