You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2021/09/23 18:28:24 UTC

[superset] branch hugh/fix-explore created (now e8179f1)

This is an automated email from the ASF dual-hosted git repository.

hugh pushed a change to branch hugh/fix-explore
in repository https://gitbox.apache.org/repos/asf/superset.git.


      at e8179f1  remove unneeded checks for explore button

This branch includes the following new commits:

     new e8179f1  remove unneeded checks for explore button

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[superset] 01/01: remove unneeded checks for explore button

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hugh pushed a commit to branch hugh/fix-explore
in repository https://gitbox.apache.org/repos/asf/superset.git

commit e8179f19b89aa438f83ae03398c0b0301b46d8ac
Author: hughhhh <hu...@gmail.com>
AuthorDate: Thu Sep 23 14:26:24 2021 -0400

    remove unneeded checks for explore button
---
 .../src/SqlLab/components/ExploreResultsButton.jsx   |  3 ---
 .../src/SqlLab/components/ResultSet.tsx              | 20 +++++++++-----------
 2 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/superset-frontend/src/SqlLab/components/ExploreResultsButton.jsx b/superset-frontend/src/SqlLab/components/ExploreResultsButton.jsx
index 1c94c8b..11a150d 100644
--- a/superset-frontend/src/SqlLab/components/ExploreResultsButton.jsx
+++ b/superset-frontend/src/SqlLab/components/ExploreResultsButton.jsx
@@ -152,14 +152,11 @@ class ExploreResultsButton extends React.PureComponent {
   }
 
   render() {
-    const allowsSubquery =
-      this.props.database && this.props.database.allows_subquery;
     return (
       <>
         <Button
           buttonSize="small"
           onClick={this.props.onClick}
-          disabled={!allowsSubquery}
           tooltip={t('Explore the result set in the data exploration view')}
         >
           <InfoTooltipWithTrigger
diff --git a/superset-frontend/src/SqlLab/components/ResultSet.tsx b/superset-frontend/src/SqlLab/components/ResultSet.tsx
index 4f1c788..56eb9e0 100644
--- a/superset-frontend/src/SqlLab/components/ResultSet.tsx
+++ b/superset-frontend/src/SqlLab/components/ResultSet.tsx
@@ -487,17 +487,15 @@ export default class ResultSet extends React.PureComponent<
             onChangeAutoComplete={this.handleOnChangeAutoComplete}
           />
           <ResultSetButtons>
-            {this.props.visualize &&
-              this.props.database &&
-              this.props.database.allows_virtual_table_explore && (
-                <ExploreResultsButton
-                  // @ts-ignore Redux types are difficult to work with, ignoring for now
-                  query={this.props.query}
-                  database={this.props.database}
-                  actions={this.props.actions}
-                  onClick={this.handleExploreBtnClick}
-                />
-              )}
+            {this.props.visualize && this.props.database && (
+              <ExploreResultsButton
+                // @ts-ignore Redux types are difficult to work with, ignoring for now
+                query={this.props.query}
+                database={this.props.database}
+                actions={this.props.actions}
+                onClick={this.handleExploreBtnClick}
+              />
+            )}
             {this.props.csv && (
               <Button
                 buttonSize="small"