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

Added access check + Druid in endpoint #1224

Merged
merged 4 commits into from
Oct 4, 2016

Conversation

vera-liu
Copy link
Contributor

Done:

  • Datasource access check
  • Added support for druid in the endpoint
  • Pass in datasource class (SqlaTable/Druid) to javascript components

Todo:

  • Tests/Specs for everything

needs-review @ascott

# TODO: move this logic to the model (maybe)
grains_choices = [str(grain.name) for grain in datasource.database.grains()]
# Check if datasource exists
if not datasource:
Copy link
Contributor

Choose a reason for hiding this comment

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

we may need to check datasource permissions in other places, can we pull this out into a shareable method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

grains = datasource.database.grains()
grains_choices = [grain.name for grain in grains]
elif datasource_class_name == 'DruidDatasource':
time_columns = ['all', '5 seconds', '30 seconds', '1 minute',
Copy link
Contributor

Choose a reason for hiding this comment

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

do these time constants get used anywhere else? can we pull them to the top of the file as constants?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done:)

@vera-liu vera-liu changed the base branch from alanna-explore-v2-main to master October 4, 2016 18:20
…pache#1205)

* create structure for new forked explore view (apache#1099)

* create structure for new forked explore view

* update component name

* add bootstrap data pattern

* remove console.log

* Associate version to entry files (apache#1060)

* Associate version to entry files

* Modified path joins for configs

* Made changes based on comments

* Created store and reducers (apache#1108)

* Created store and reducers

* Added spec

* Modifications based on comments

* Explore control panel components: Chart control, Time filter, SQL,
GroupBy and Filters

* Modifications based on comments
@vera-liu vera-liu force-pushed the vliu_explore_control_2 branch 9 times, most recently from 905ffd0 to c7d4385 Compare October 4, 2016 19:07
@ascott
Copy link
Contributor

ascott commented Oct 4, 2016

LGTM, tests can be added in subsequent PRs.

@vera-liu vera-liu merged commit 8ab5e50 into apache:master Oct 4, 2016
time_columns = []
grains_choices = []
datasource_class_name = datasource_class.__name__
if datasource_class_name == 'SqlaTable':
Copy link
Member

Choose a reason for hiding this comment

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

please use datasource_type

time_columns = datasource.dttm_cols
grains = datasource.database.grains()
grains_choices = [grain.name for grain in grains]
elif datasource_class_name == 'DruidDatasource':
Copy link
Member

Choose a reason for hiding this comment

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

please implement @property on the datasources in the models.py that will provide you the data you need in the uniform way for both druid and table

@@ -42,6 +42,10 @@
log_this = models.Log.log_this
can_access = utils.can_access
QueryStatus = models.QueryStatus
DRUID_TIME_GRAINS = [
Copy link
Member

Choose a reason for hiding this comment

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

it belongs to models, DruidDatasource class

"metrics": datasource.metrics_combo,
"filter_cols": datasource.filterable_column_names,
}
"datasource_class": datasource_class_name,
Copy link
Member

Choose a reason for hiding this comment

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

use datasource_type instead of datasource_class here

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.11.0 labels Feb 19, 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.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants