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: [bugfix] visualize flow error: 'Metric x is not valid' (#3181)
Date Wed, 26 Jul 2017 16:22:27 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 cf1d0f3  [bugfix] visualize flow error: 'Metric x is not valid' (#3181)
cf1d0f3 is described below

commit cf1d0f38ad094d7809b500e2eeae39560111e626
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Wed Jul 26 09:22:25 2017 -0700

    [bugfix] visualize flow error: 'Metric x is not valid' (#3181)
    
    The metric name in the frontend doesn't match the one generated on the
    backend. It turns out the explore view will default to the first
    metric so specifying one isn't needed.
---
 superset/assets/javascripts/SqlLab/components/VisualizeModal.jsx | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/superset/assets/javascripts/SqlLab/components/VisualizeModal.jsx b/superset/assets/javascripts/SqlLab/components/VisualizeModal.jsx
index 2ebfef9..dce820c 100644
--- a/superset/assets/javascripts/SqlLab/components/VisualizeModal.jsx
+++ b/superset/assets/javascripts/SqlLab/components/VisualizeModal.jsx
@@ -146,7 +146,6 @@ class VisualizeModal extends React.PureComponent {
     this.props.actions.createDatasource(this.buildVizOptions(), this)
       .done(() => {
         const columns = Object.keys(this.state.columns).map(k => this.state.columns[k]);
-        const mainMetric = columns.filter(d => d.agg)[0];
         const mainGroupBy = columns.filter(d => d.is_dim)[0];
         const formData = {
           datasource: this.props.datasource,
@@ -154,10 +153,6 @@ class VisualizeModal extends React.PureComponent {
           since: '100 years ago',
           limit: '0',
         };
-        if (mainMetric) {
-          formData.metrics = [mainMetric.name];
-          formData.metric = mainMetric.name;
-        }
         if (mainGroupBy) {
           formData.groupby = [mainGroupBy.name];
         }

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

Mime
View raw message