-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Pass url parameters from dashboard to charts #8536
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8536 +/- ##
==========================================
+ Coverage 65.77% 65.78% +<.01%
==========================================
Files 482 482
Lines 23794 23801 +7
Branches 2587 2587
==========================================
+ Hits 15651 15657 +6
- Misses 7974 7975 +1
Partials 169 169
Continue to review full report at Codecov.
|
This is ready for review |
cy.server(); | ||
cy.login(); | ||
|
||
cy.visit(WORLD_HEALTH_DASHBOARD + '?param1=123¶m2=abc'); |
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.
Here I would have used qs
introduced in cypress 3.5.0
(https://docs.cypress.io/guides/references/changelog.html#3-5-0), but since we're still on 3.4.1
, I had to put it in the URL by hand. If there are no objections, I can bump to 3.6.1
which would make this test slightly cleaner (being able to assert against the same object that's being passed to visit).
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.
👍
Nudging testers/reviewers, would be great to get 👀 on this to kill this long standing bug. |
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.
Minor note, otherwise LGTM
superset/views/core.py
Outdated
url_params = { | ||
key: value | ||
for key, value in request.args.items() | ||
if key not in ("edit", "standalone") |
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.
The blacklisting here seems brittle. Wondering if it's necessary.
Hi, i am trying this and have followed the solution but it will not filter for me. i have done they query in sql lab, made the chart and changed the metadata that makes a table with name_1, name_2, but changing the URL does not seem to filter my dashboard. Any idea why this is not working? Did you test this on a server rather than locally just? thanks! |
@ForzaDesignStudio unfortunately this had to be dropped from |
thank you for the quick reply. i will try it in the next release. |
CATEGORY
Choose one
SUMMARY
Currently URL parameters are correctly handled in explore mode. However, current functionality is limited/broken in the following ways:
url_params
specified in charts are erased if the chart is opened via the Charts page.This PR does the following:
url_params
.SCREENSHOTS
Datasource query:

Chart metadata with default values for

url_params
:Dashboard with url parameter (note

name2
falling back to default value):TEST PLAN
ADDITIONAL INFORMATION
REVIEWERS
@senturkayhan @rsdpyenugula @mistercrunch @graceguo-supercat @etr2460