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 2020/11/16 17:33:48 UTC
[incubator-superset] branch hugh/SO-1117-modal updated: fix onclick
reference
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch hugh/SO-1117-modal
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/hugh/SO-1117-modal by this push:
new 3170382 fix onclick reference
3170382 is described below
commit 3170382c5855b08b259e181f25636a8866a5a5d4
Author: hughhhh <hu...@gmail.com>
AuthorDate: Mon Nov 16 09:33:14 2020 -0800
fix onclick reference
---
.../src/SqlLab/components/ExploreResultsButton.jsx | 67 +++++++++++-----------
1 file changed, 34 insertions(+), 33 deletions(-)
diff --git a/superset-frontend/src/SqlLab/components/ExploreResultsButton.jsx b/superset-frontend/src/SqlLab/components/ExploreResultsButton.jsx
index ea52f09..30b99c7 100644
--- a/superset-frontend/src/SqlLab/components/ExploreResultsButton.jsx
+++ b/superset-frontend/src/SqlLab/components/ExploreResultsButton.jsx
@@ -46,7 +46,7 @@ class ExploreResultsButton extends React.PureComponent {
constructor(props) {
super(props);
this.visualize = this.visualize.bind(this);
- this.onClick = this.onClick.bind(this);
+ // this.onClick = this.onClick.bind(this);
this.getInvalidColumns = this.getInvalidColumns.bind(this);
this.renderInvalidColumnMessage = this.renderInvalidColumnMessage.bind(
this,
@@ -54,37 +54,38 @@ class ExploreResultsButton extends React.PureComponent {
}
onClick() {
- const { timeout } = this.props;
- const msg = this.renderInvalidColumnMessage();
- if (Math.round(this.getQueryDuration()) > timeout) {
- this.dialog.show({
- title: t('Explore'),
- body: this.renderTimeoutWarning(),
- actions: [
- Dialog.CancelAction(),
- Dialog.OKAction(() => {
- this.visualize();
- }),
- ],
- bsSize: 'large',
- onHide: dialog => {
- dialog.hide();
- },
- });
- } else if (msg) {
- this.dialog.show({
- title: t('Explore'),
- body: msg,
- actions: [Dialog.DefaultAction('Ok', () => {})],
- bsSize: 'large',
- bsStyle: 'warning',
- onHide: dialog => {
- dialog.hide();
- },
- });
- } else {
- this.visualize();
- }
+ console.log('in onclick')
+ // const { timeout } = this.props;
+ // const msg = this.renderInvalidColumnMessage();
+ // if (Math.round(this.getQueryDuration()) > timeout) {
+ // this.dialog.show({
+ // title: t('Explore'),
+ // body: this.renderTimeoutWarning(),
+ // actions: [
+ // Dialog.CancelAction(),
+ // Dialog.OKAction(() => {
+ // this.visualize();
+ // }),
+ // ],
+ // bsSize: 'large',
+ // onHide: dialog => {
+ // dialog.hide();
+ // },
+ // });
+ // } else if (msg) {
+ // this.dialog.show({
+ // title: t('Explore'),
+ // body: msg,
+ // actions: [Dialog.DefaultAction('Ok', () => {})],
+ // bsSize: 'large',
+ // bsStyle: 'warning',
+ // onHide: dialog => {
+ // dialog.hide();
+ // },
+ // });
+ // } else {
+ // this.visualize();
+ // }
}
getColumns() {
@@ -217,7 +218,7 @@ class ExploreResultsButton extends React.PureComponent {
<>
<Button
buttonSize="small"
- onClick={this.onClick}
+ onClick={this.props.onClick}
disabled={!allowsSubquery}
tooltip={t('Explore the result set in the data exploration view')}
>