Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sql_lab]Disabled run query button if sql query editor is empty #4728

Merged
merged 4 commits into from
Apr 3, 2018

Conversation

lprashant-94
Copy link

Fix
#2102

Disabled run button if sql query is empty.

@lprashant-94 lprashant-94 changed the title Disabled run query button if sql query editor is empty [sql_lab]Disabled run query button if sql query editor is empty Apr 2, 2018
@codecov-io
Copy link

codecov-io commented Apr 2, 2018

Codecov Report

Merging #4728 into master will increase coverage by 0.15%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4728      +/-   ##
==========================================
+ Coverage   72.22%   72.38%   +0.15%     
==========================================
  Files         204      205       +1     
  Lines       15323    15374      +51     
  Branches     1180     1182       +2     
==========================================
+ Hits        11067    11128      +61     
+ Misses       4253     4243      -10     
  Partials        3        3
Impacted Files Coverage Δ
...scripts/SqlLab/components/RunQueryActionButton.jsx 88% <ø> (ø) ⬆️
...assets/javascripts/SqlLab/components/SqlEditor.jsx 77.88% <ø> (ø) ⬆️
superset/assets/javascripts/modules/sandbox.js 93.75% <0%> (-6.25%) ⬇️
...cripts/explore/components/ExploreViewContainer.jsx 0% <0%> (ø) ⬆️
...set/assets/javascripts/explore/stores/controls.jsx 39.25% <0%> (ø) ⬆️
...ts/javascripts/SqlLab/components/TabStatusIcon.jsx 94.44% <0%> (ø)
superset/viz.py 79.62% <0%> (ø) ⬆️
...javascripts/SqlLab/components/TabbedSqlEditors.jsx 91.74% <0%> (+0.07%) ⬆️
superset/assets/javascripts/reduxUtils.js 74.57% <0%> (+0.43%) ⬆️
...pts/explore/components/controls/MetricsControl.jsx 78.91% <0%> (+0.43%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 069d61c...b55b754. Read the comment docs.

@@ -43,6 +44,7 @@ export default function RunQueryActionButton(props) {
onClick={() => props.runQuery(true)}
key="run-async-btn"
tooltip={t('Run query asynchronously')}
disabled={!props.sql.trim()}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused as to why the linter isn't asking for sql to be in propTypes. I wanted to make sure it's entered as a string and can never be null through a defaultProps = ''

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made changes, please review 👍

@lprashant-94
Copy link
Author

lprashant-94 commented Apr 3, 2018 via email

@lprashant-94
Copy link
Author

I got it, I will add propsType for sql as well,

Thanks

@mistercrunch mistercrunch merged commit 7a497e2 into apache:master Apr 3, 2018
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
…he#4728)

* Disabled run query button if sql query editor is empty

* Removing unnecessary white space

* Fix failing test for sql props

* Adding sql variable into propTypes and defaultProps
timifasubaa pushed a commit to timifasubaa/incubator-superset that referenced this pull request May 31, 2018
…he#4728)

* Disabled run query button if sql query editor is empty

* Removing unnecessary white space

* Fix failing test for sql props

* Adding sql variable into propTypes and defaultProps
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
…he#4728)

* Disabled run query button if sql query editor is empty

* Removing unnecessary white space

* Fix failing test for sql props

* Adding sql variable into propTypes and defaultProps
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.25.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.25.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants