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/12/17 23:54:22 UTC
[incubator-superset] branch hugh/ch229 updated (674cc8b -> e8991e0)
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a change to branch hugh/ch229
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.
from 674cc8b working run button
new 8f957dc git status
new e8991e0 clean up the code
The 2 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.
Summary of changes:
.../src/SqlLab/components/RunQueryActionButton.tsx | 68 ++++++++--------------
1 file changed, 23 insertions(+), 45 deletions(-)
[incubator-superset] 02/02: clean up the code
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch hugh/ch229
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
commit e8991e037f89dd464c3303f07583e1d086d53ae9
Author: hughhhh <hu...@gmail.com>
AuthorDate: Thu Dec 17 18:53:29 2020 -0500
clean up the code
---
.../src/SqlLab/components/RunQueryActionButton.tsx | 79 ++++++----------------
1 file changed, 22 insertions(+), 57 deletions(-)
diff --git a/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx b/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx
index d733465..c2caae0 100644
--- a/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx
+++ b/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx
@@ -58,77 +58,42 @@ const RunQueryActionButton = ({
const shouldShowStopBtn =
!!queryState && ['running', 'pending'].indexOf(queryState) > -1;
- const commonBtnProps: ButtonProps = {
- buttonSize: 'small',
- buttonStyle: btnStyle,
- disabled: !dbId,
- };
-
if (shouldShowStopBtn) {
return (
- <>
- {/* <Button {...commonBtnProps} cta onClick={stopQuery}>
- <i className="fa fa-stop" /> {t('Stop')}
- </Button> */}
<Dropdown.Button
- onClick={stopQuery}
- icon={<Icon color="#00000" name="caret-down" />}
- type="primary"
- overlay={overlayCreateAsMenu}
- disabled={!sql.trim()}
- >
- <i className="fa fa-stop" /> {t('Stop')}
- </Dropdown.Button>
- </>
+ onClick={stopQuery}
+ icon={<Icon color="#00000" name="caret-down" />}
+ type="primary"
+ overlay={overlayCreateAsMenu}
+ disabled={!sql.trim()}
+ >
+ <i className="fa fa-stop" /> {t('Stop')}
+ </Dropdown.Button>
);
}
if (allowAsync) {
return (
- <>
- {/* <Button
- {...commonBtnProps}
- cta
- onClick={() => runQuery(true)}
- key="run-async-btn"
- tooltip={t('Run query asynchronously (Ctrl + ↵)')}
- disabled={!sql.trim()}
- >
- <i className="fa fa-bolt" /> {runBtnText}
- </Button> */}
- <Dropdown.Button
- onClick={() => runQuery(true)}
- icon={<Icon color="#00000" name="caret-down" />}
- type="primary"
- overlay={overlayCreateAsMenu}
- disabled={!sql.trim()}
- >
- <i className="fa fa-bolt" /> {runBtnText}
- </Dropdown.Button>
- </>
- );
- }
- return (
- <>
- {/* <Button
- {...commonBtnProps}
- cta
- onClick={() => runQuery(false)}
- key="run-btn"
- tooltip={t('Run query synchronously (Ctrl + ↵)')}
- disabled={!sql.trim()}
- >
- <i className="fa fa-refresh" /> {runBtnText}
- </Button> */}
<Dropdown.Button
- onClick={() => runQuery(false)}
+ onClick={() => runQuery(true)}
icon={<Icon color="#00000" name="caret-down" />}
type="primary"
overlay={overlayCreateAsMenu}
disabled={!sql.trim()}
>
- <i className="fa fa-refresh" /> {runBtnText}
+ <i className="fa fa-bolt" /> {runBtnText}
</Dropdown.Button>
- </>
+ );
+ }
+ return (
+ <Dropdown.Button
+ onClick={() => runQuery(false)}
+ icon={<Icon color="#00000" name="caret-down" />}
+ type="primary"
+ overlay={overlayCreateAsMenu}
+ disabled={!sql.trim()}
+ >
+ <i className="fa fa-refresh" /> {runBtnText}
+ </Dropdown.Button>
);
};
[incubator-superset] 01/02: git status
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch hugh/ch229
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
commit 8f957dc1e3bb62fd1a8c7ad33b404829fcaeb183
Author: hughhhh <hu...@gmail.com>
AuthorDate: Thu Dec 17 18:45:46 2020 -0500
git status
---
.../src/SqlLab/components/RunQueryActionButton.tsx | 23 +++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx b/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx
index 8b2cad4..d733465 100644
--- a/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx
+++ b/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx
@@ -66,9 +66,20 @@ const RunQueryActionButton = ({
if (shouldShowStopBtn) {
return (
- <Button {...commonBtnProps} cta onClick={stopQuery}>
+ <>
+ {/* <Button {...commonBtnProps} cta onClick={stopQuery}>
<i className="fa fa-stop" /> {t('Stop')}
- </Button>
+ </Button> */}
+ <Dropdown.Button
+ onClick={stopQuery}
+ icon={<Icon color="#00000" name="caret-down" />}
+ type="primary"
+ overlay={overlayCreateAsMenu}
+ disabled={!sql.trim()}
+ >
+ <i className="fa fa-stop" /> {t('Stop')}
+ </Dropdown.Button>
+ </>
);
}
if (allowAsync) {
@@ -86,11 +97,12 @@ const RunQueryActionButton = ({
</Button> */}
<Dropdown.Button
onClick={() => runQuery(true)}
- icon={<Icon color="#00000a" name="caret-down" />}
+ icon={<Icon color="#00000" name="caret-down" />}
type="primary"
overlay={overlayCreateAsMenu}
+ disabled={!sql.trim()}
>
- Run
+ <i className="fa fa-bolt" /> {runBtnText}
</Dropdown.Button>
</>
);
@@ -112,8 +124,9 @@ const RunQueryActionButton = ({
icon={<Icon color="#00000" name="caret-down" />}
type="primary"
overlay={overlayCreateAsMenu}
+ disabled={!sql.trim()}
>
- Run
+ <i className="fa fa-refresh" /> {runBtnText}
</Dropdown.Button>
</>
);