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: [hotfix] fixing issues around new time_table viz (#3599)
Date Wed, 04 Oct 2017 23:22:13 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 1fb8716  [hotfix] fixing issues around new time_table viz (#3599)
1fb8716 is described below

commit 1fb8716231a83474ea9a0ee74041e4b0e6b6ec3a
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Wed Oct 4 16:22:11 2017 -0700

    [hotfix] fixing issues around new time_table viz (#3599)
---
 superset/assets/javascripts/explore/components/ControlHeader.jsx    | 5 ++++-
 .../javascripts/explore/components/controls/CollectionControl.jsx   | 6 +++---
 superset/assets/javascripts/explore/stores/controls.jsx             | 2 +-
 superset/assets/package.json                                        | 2 +-
 superset/assets/visualizations/time_table.jsx                       | 4 ++--
 5 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/superset/assets/javascripts/explore/components/ControlHeader.jsx b/superset/assets/javascripts/explore/components/ControlHeader.jsx
index 842df1e..dd611f9 100644
--- a/superset/assets/javascripts/explore/components/ControlHeader.jsx
+++ b/superset/assets/javascripts/explore/components/ControlHeader.jsx
@@ -5,7 +5,7 @@ import InfoTooltipWithTrigger from '../../components/InfoTooltipWithTrigger';
 import { t } from '../../locales';
 
 const propTypes = {
-  label: PropTypes.string.isRequired,
+  label: PropTypes.string,
   description: PropTypes.string,
   validationErrors: PropTypes.array,
   renderTrigger: PropTypes.bool,
@@ -52,6 +52,9 @@ export default class ControlHeader extends React.Component {
     return null;
   }
   render() {
+    if (!this.props.label) {
+      return null;
+    }
     const labelClass = (this.props.validationErrors.length > 0) ? 'text-danger' : '';
     return (
       <div
diff --git a/superset/assets/javascripts/explore/components/controls/CollectionControl.jsx
b/superset/assets/javascripts/explore/components/controls/CollectionControl.jsx
index 8fcecaa..b545072 100644
--- a/superset/assets/javascripts/explore/components/controls/CollectionControl.jsx
+++ b/superset/assets/javascripts/explore/components/controls/CollectionControl.jsx
@@ -24,7 +24,7 @@ const propTypes = {
   ]),
   isFloat: PropTypes.bool,
   isInt: PropTypes.bool,
-  control: PropTypes.func,
+  controlName: PropTypes.string.isRequired,
 };
 
 const defaultProps = {
@@ -64,7 +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];
+    const Control = controlMap[this.props.controlName];
     return (
       <SortableListGroup
         useDragHandle
@@ -81,7 +81,7 @@ export default class CollectionControl extends React.Component {
               <SortableDragger />
             </div>
             <div className="pull-left">
-              <control
+              <Control
                 {...o}
                 onChange={this.onChange.bind(this, i)}
               />
diff --git a/superset/assets/javascripts/explore/stores/controls.jsx b/superset/assets/javascripts/explore/stores/controls.jsx
index ff6c833..8d470f0 100644
--- a/superset/assets/javascripts/explore/stores/controls.jsx
+++ b/superset/assets/javascripts/explore/stores/controls.jsx
@@ -1443,7 +1443,7 @@ export const controls = {
     type: 'CollectionControl',
     label: t('Time Series Columns'),
     validators: [v.nonEmpty],
-    control: 'TimeSeriesColumnControl',
+    controlName: 'TimeSeriesColumnControl',
   },
 
 };
diff --git a/superset/assets/package.json b/superset/assets/package.json
index d87474b..d2148a9 100644
--- a/superset/assets/package.json
+++ b/superset/assets/package.json
@@ -85,7 +85,7 @@
     "react-syntax-highlighter": "^5.7.0",
     "react-virtualized": "^9.3.0",
     "react-virtualized-select": "^2.4.0",
-    "reactable": "^0.14.0",
+    "reactable": "^0.14.1",
     "redux": "^3.5.2",
     "redux-localstorage": "^0.4.1",
     "redux-thunk": "^2.1.0",
diff --git a/superset/assets/visualizations/time_table.jsx b/superset/assets/visualizations/time_table.jsx
index a570874..89e9676 100644
--- a/superset/assets/visualizations/time_table.jsx
+++ b/superset/assets/visualizations/time_table.jsx
@@ -23,8 +23,8 @@ function FormattedNumber({ num, format }) {
   return <span>{num}</span>;
 }
 FormattedNumber.propTypes = {
-  num: propTypes.number.isRequired,
-  format: propTypes.string.isRequired,
+  num: propTypes.number,
+  format: propTypes.string,
 };
 
 function viz(slice, payload) {

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

Mime
View raw message