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

allow selection of dbs where csv can be uploaded to #5393

Merged
merged 1 commit into from
Jul 17, 2018

Conversation

timifasubaa
Copy link
Contributor

@timifasubaa timifasubaa commented Jul 14, 2018

Right now, all databases are listed when the user tries to upload to CSV.
This PR allows the administrator select which databases people can upload CSV to. I set it to True by default so there is no breakage upon deploy.

@john-bodley @mistercrunch

@timifasubaa timifasubaa force-pushed the add_can_csv_upload_to_dbs branch 2 times, most recently from c4bcdb6 to bac9bdd Compare July 15, 2018 04:44
@codecov-io
Copy link

codecov-io commented Jul 16, 2018

Codecov Report

Merging #5393 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5393      +/-   ##
==========================================
+ Coverage   61.21%   61.21%   +<.01%     
==========================================
  Files         373      373              
  Lines       23709    23710       +1     
  Branches     2750     2750              
==========================================
+ Hits        14513    14514       +1     
  Misses       9181     9181              
  Partials       15       15
Impacted Files Coverage Δ
superset/views/core.py 73.11% <ø> (ø) ⬆️
superset/forms.py 98.11% <100%> (ø) ⬆️
superset/models/core.py 85.83% <100%> (+0.02%) ⬆️

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 7b4e6c7...62cff2f. Read the comment docs.

@@ -50,7 +50,9 @@ def filter_not_empty_values(value):
class CsvToDatabaseForm(DynamicForm):
# pylint: disable=E0211
def all_db_items():
return db.session.query(models.Database)
Copy link
Member

@john-bodley john-bodley Jul 16, 2018

Choose a reason for hiding this comment

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

It might be a good idea to rename this method as it's no longer all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree. Fixed

@timifasubaa timifasubaa force-pushed the add_can_csv_upload_to_dbs branch 5 times, most recently from 1e52d59 to 62cff2f Compare July 17, 2018 01:07
@timifasubaa
Copy link
Contributor Author

@john-bodley Done



def upgrade():
op.add_column('dbs', sa.Column('allow_csv_upload', sa.Boolean(), nullable=True))
Copy link
Member

Choose a reason for hiding this comment

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

What does a NULL value imply here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

@timifasubaa timifasubaa force-pushed the add_can_csv_upload_to_dbs branch from 62cff2f to e258898 Compare July 17, 2018 17:26
@timifasubaa timifasubaa force-pushed the add_can_csv_upload_to_dbs branch from e258898 to 239f752 Compare July 17, 2018 21:54
@timifasubaa timifasubaa merged commit 7f8eaee into apache:master Jul 17, 2018
timifasubaa added a commit to airbnb/superset-fork that referenced this pull request Jul 25, 2018
graceguo-supercat pushed a commit to graceguo-supercat/superset that referenced this pull request Jul 26, 2018
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.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.28.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants