superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: [hofix] work around circular deps (#3598)
Date Wed, 04 Oct 2017 21:48:34 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new ed21244  [hofix] work around circular deps (#3598)
ed21244 is described below

commit ed212440b5d305d5d1b7178829b9b52bdbaa5049
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Wed Oct 4 14:48:32 2017 -0700

    [hofix] work around circular deps (#3598)
    
    * [hofix] work around circular deps
    
    * lint
---
 .../javascripts/explore/components/controls/CollectionControl.jsx   | 4 +++-
 .../javascripts/explore/components/controls/{index.jsx => index.js} | 1 -
 superset/assets/javascripts/explore/stores/controls.jsx             | 3 +--
 superset/assets/visualizations/time_table.jsx                       | 6 +-----
 4 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/superset/assets/javascripts/explore/components/controls/CollectionControl.jsx
b/superset/assets/javascripts/explore/components/controls/CollectionControl.jsx
index 74f0d9b..8fcecaa 100644
--- a/superset/assets/javascripts/explore/components/controls/CollectionControl.jsx
+++ b/superset/assets/javascripts/explore/components/controls/CollectionControl.jsx
@@ -8,6 +8,7 @@ import {
 
 import InfoTooltipWithTrigger from '../../../components/InfoTooltipWithTrigger';
 import ControlHeader from '../ControlHeader';
+import controlMap from './';
 
 const propTypes = {
   name: PropTypes.string.isRequired,
@@ -63,6 +64,7 @@ export default class CollectionControl extends React.Component {
     if (this.props.value.length === 0) {
       return <div className="text-muted">{this.props.placeholder}</div>;
     }
+    const control = controlMap[this.props.control];
     return (
       <SortableListGroup
         useDragHandle
@@ -79,7 +81,7 @@ export default class CollectionControl extends React.Component {
               <SortableDragger />
             </div>
             <div className="pull-left">
-              <this.props.control
+              <control
                 {...o}
                 onChange={this.onChange.bind(this, i)}
               />
diff --git a/superset/assets/javascripts/explore/components/controls/index.jsx b/superset/assets/javascripts/explore/components/controls/index.js
similarity index 99%
rename from superset/assets/javascripts/explore/components/controls/index.jsx
rename to superset/assets/javascripts/explore/components/controls/index.js
index 499e605..e2840fb 100644
--- a/superset/assets/javascripts/explore/components/controls/index.jsx
+++ b/superset/assets/javascripts/explore/components/controls/index.js
@@ -29,5 +29,4 @@ const controlMap = {
   TimeSeriesColumnControl,
   VizTypeControl,
 };
-
 export default controlMap;
diff --git a/superset/assets/javascripts/explore/stores/controls.jsx b/superset/assets/javascripts/explore/stores/controls.jsx
index cd5d38a..ff6c833 100644
--- a/superset/assets/javascripts/explore/stores/controls.jsx
+++ b/superset/assets/javascripts/explore/stores/controls.jsx
@@ -5,7 +5,6 @@ import { ALL_COLOR_SCHEMES, spectrums } from '../../modules/colors';
 import MetricOption from '../../components/MetricOption';
 import ColumnOption from '../../components/ColumnOption';
 import { t } from '../../locales';
-import controlMap from '../components/controls';
 
 const D3_FORMAT_DOCS = 'D3 format syntax: https://github.com/d3/d3-format';
 
@@ -1444,7 +1443,7 @@ export const controls = {
     type: 'CollectionControl',
     label: t('Time Series Columns'),
     validators: [v.nonEmpty],
-    control: controlMap.TimeSeriesColumnControl,
+    control: 'TimeSeriesColumnControl',
   },
 
 };
diff --git a/superset/assets/visualizations/time_table.jsx b/superset/assets/visualizations/time_table.jsx
index 525a114..a570874 100644
--- a/superset/assets/visualizations/time_table.jsx
+++ b/superset/assets/visualizations/time_table.jsx
@@ -3,7 +3,7 @@ import React from 'react';
 import propTypes from 'prop-types';
 import { Table, Thead, Th } from 'reactable';
 import d3 from 'd3';
-import { Sparkline, LineSeries, PointSeries } from '@data-ui/sparkline';
+import { Sparkline, LineSeries } from '@data-ui/sparkline';
 
 import MetricOption from '../javascripts/components/MetricOption';
 import TooltipWrapper from '../javascripts/components/TooltipWrapper';
@@ -94,10 +94,6 @@ function viz(slice, payload) {
                   showArea={false}
                   stroke={brandColor}
                 />
-                <PointSeries
-                  points={['min', 'max', 'last']}
-                  fill={brandColor}
-                />
               </Sparkline>
             </div>
           </TooltipWrapper>);

-- 
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <commits@superset.apache.org>'].

Mime
View raw message