You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/04/24 20:35:57 UTC

[GitHub] mistercrunch closed pull request #4841: Move a few JS files

mistercrunch closed pull request #4841: Move a few JS files
URL: https://github.com/apache/incubator-superset/pull/4841
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/assets/spec/javascripts/explore/components/ControlPanelsContainer_spec.jsx b/superset/assets/spec/javascripts/explore/components/ControlPanelsContainer_spec.jsx
index 54579906a6..fb1ea610fc 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 31d92510ad..a87a45d608 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 d97831c64a..4bb7a84248 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 6b1f5e7a86..68b5eee250 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 b69ee3ae3b..f223174efa 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 ad1356b48b..5c779651c2 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 074c44524a..01e6dc23ab 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 8fe18db77f..cb2cd7965c 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 1fec139c54..c8d7acd82e 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 fe52905c88..340389072a 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 bf9e7f13e2..df4eec0cb9 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 cc70226dae..74ba759c3f 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 2dc7cf205f..ae964ef03c 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 74f5a0bb68..5989b5f9cb 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 e6cb827a62..a2c531e710 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 4954cf0634..28dfdff646 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 fc8acb5d3d..e2c882af1d 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 a40410af1e..fe314d82c9 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 bf376571e5..ea9cbdc39a 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 68fe69f8c3..d78bf2f714 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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services