You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/09/05 20:44:49 UTC

[GitHub] jeffreythewang closed pull request #5388: Move VIZ_TYPES to separate module

jeffreythewang closed pull request #5388: Move VIZ_TYPES to separate module
URL: https://github.com/apache/incubator-superset/pull/5388
 
 
   

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/src/dashboard/components/gridComponents/Chart.jsx b/superset/assets/src/dashboard/components/gridComponents/Chart.jsx
index 7e2e6a65d5..425ed3a017 100644
--- a/superset/assets/src/dashboard/components/gridComponents/Chart.jsx
+++ b/superset/assets/src/dashboard/components/gridComponents/Chart.jsx
@@ -8,7 +8,7 @@ import ChartContainer from '../../../chart/ChartContainer';
 import MissingChart from '../MissingChart';
 import { chartPropType } from '../../../chart/chartReducer';
 import { slicePropShape } from '../../util/propShapes';
-import { VIZ_TYPES } from '../../../visualizations';
+import { VIZ_TYPES } from '../../../modules/vizTypes';
 
 const propTypes = {
   id: PropTypes.number.isRequired,
diff --git a/superset/assets/src/modules/AnnotationTypes.js b/superset/assets/src/modules/AnnotationTypes.js
index e2c882af1d..294232ab99 100644
--- a/superset/assets/src/modules/AnnotationTypes.js
+++ b/superset/assets/src/modules/AnnotationTypes.js
@@ -1,4 +1,4 @@
-import { VIZ_TYPES } from '../visualizations';
+import { VIZ_TYPES } from '../modules/vizTypes';
 import vizTypes from '../explore/visTypes';
 
 export const ANNOTATION_TYPES = {
diff --git a/superset/assets/src/modules/vizTypes.js b/superset/assets/src/modules/vizTypes.js
new file mode 100644
index 0000000000..02d33cde9f
--- /dev/null
+++ b/superset/assets/src/modules/vizTypes.js
@@ -0,0 +1,51 @@
+// You ***should*** use these to reference viz_types in code
+export const VIZ_TYPES = {
+  area: 'area',
+  bar: 'bar',
+  big_number: 'big_number',
+  big_number_total: 'big_number_total',
+  box_plot: 'box_plot',
+  bubble: 'bubble',
+  bullet: 'bullet',
+  cal_heatmap: 'cal_heatmap',
+  compare: 'compare',
+  directed_force: 'directed_force',
+  chord: 'chord',
+  dist_bar: 'dist_bar',
+  filter_box: 'filter_box',
+  heatmap: 'heatmap',
+  histogram: 'histogram',
+  horizon: 'horizon',
+  iframe: 'iframe',
+  line: 'line',
+  line_multi: 'line_multi',
+  mapbox: 'mapbox',
+  markup: 'markup',
+  para: 'para',
+  pie: 'pie',
+  pivot_table: 'pivot_table',
+  sankey: 'sankey',
+  separator: 'separator',
+  sunburst: 'sunburst',
+  table: 'table',
+  time_table: 'time_table',
+  time_pivot: 'time_pivot',
+  treemap: 'treemap',
+  country_map: 'country_map',
+  word_cloud: 'word_cloud',
+  world_map: 'world_map',
+  dual_line: 'dual_line',
+  event_flow: 'event_flow',
+  paired_ttest: 'paired_ttest',
+  partition: 'partition',
+  deck_scatter: 'deck_scatter',
+  deck_screengrid: 'deck_screengrid',
+  deck_grid: 'deck_grid',
+  deck_hex: 'deck_hex',
+  deck_path: 'deck_path',
+  deck_geojson: 'deck_geojson',
+  deck_multi: 'deck_multi',
+  deck_arc: 'deck_arc',
+  deck_polygon: 'deck_polygon',
+  rose: 'rose',
+};
diff --git a/superset/assets/src/visualizations/index.js b/superset/assets/src/visualizations/index.js
index 002db6386f..6d2d64a740 100644
--- a/superset/assets/src/visualizations/index.js
+++ b/superset/assets/src/visualizations/index.js
@@ -1,56 +1,5 @@
 /* eslint-disable global-require */
-
-// You ***should*** use these to reference viz_types in code
-export const VIZ_TYPES = {
-  area: 'area',
-  bar: 'bar',
-  big_number: 'big_number',
-  big_number_total: 'big_number_total',
-  box_plot: 'box_plot',
-  bubble: 'bubble',
-  bullet: 'bullet',
-  cal_heatmap: 'cal_heatmap',
-  compare: 'compare',
-  directed_force: 'directed_force',
-  chord: 'chord',
-  dist_bar: 'dist_bar',
-  filter_box: 'filter_box',
-  heatmap: 'heatmap',
-  histogram: 'histogram',
-  horizon: 'horizon',
-  iframe: 'iframe',
-  line: 'line',
-  line_multi: 'line_multi',
-  mapbox: 'mapbox',
-  markup: 'markup',
-  para: 'para',
-  pie: 'pie',
-  pivot_table: 'pivot_table',
-  sankey: 'sankey',
-  separator: 'separator',
-  sunburst: 'sunburst',
-  table: 'table',
-  time_table: 'time_table',
-  time_pivot: 'time_pivot',
-  treemap: 'treemap',
-  country_map: 'country_map',
-  word_cloud: 'word_cloud',
-  world_map: 'world_map',
-  dual_line: 'dual_line',
-  event_flow: 'event_flow',
-  paired_ttest: 'paired_ttest',
-  partition: 'partition',
-  deck_scatter: 'deck_scatter',
-  deck_screengrid: 'deck_screengrid',
-  deck_grid: 'deck_grid',
-  deck_hex: 'deck_hex',
-  deck_path: 'deck_path',
-  deck_geojson: 'deck_geojson',
-  deck_multi: 'deck_multi',
-  deck_arc: 'deck_arc',
-  deck_polygon: 'deck_polygon',
-  rose: 'rose',
-};
+import { VIZ_TYPES } from '../modules/vizTypes';
 
 const loadVis = promise =>
   promise.then((module) => {
diff --git a/superset/assets/src/visualizations/nvd3_vis.js b/superset/assets/src/visualizations/nvd3_vis.js
index 64a91689da..b9a0f459d3 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 './';
+import { VIZ_TYPES } from '../modules/vizTypes';
 
 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org