-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
[add] Save filters to dashboard #3183
Conversation
2 similar comments
2 similar comments
superset/models/core.py
Outdated
filters = '' | ||
if isinstance(default_filters, str): | ||
filters = urllib.quote(default_filters) | ||
elif isinstance(default_filters, unicode): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this py3 compatible? can we add test coverage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I will check these later.
@@ -195,6 +199,13 @@ export function dashboardContainer(dashboard, datasources, userid) { | |||
return f; | |||
}, | |||
addFilter(sliceId, col, vals, merge = true, refresh = true) { | |||
// If slice doesn't exist, remove the related parameters in preselect_filters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function calls this.updateFilterParamsInUrl
3 times. Perhaps clearer logic would be an if statement that validates that there is a slice and column, put all the logic within that block, and call this.updateFilterParamsInUrl
once at the very end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
optimize the js code fix the compatibility issue
1 similar comment
@mistercrunch Thanks, code optimized. |
This is great work, thanks for this feature! |
apache#3183 disabled the ability of a filterbox to get filtered by another filterbox
* [dashboard] re-enabling cascading filters #3183 disabled the ability of a filterbox to get filtered by another filterbox * linting
Save the filters of filter box to current dashboard.
![2017-07-26 13 41 05](https://user-images.githubusercontent.com/7597155/28606296-d4a9ac12-7208-11e7-8455-db9bc93b90f9.gif)