-
Notifications
You must be signed in to change notification settings - Fork 4.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
Public dashboards ignore static value set in dashboard #4038
Comments
On additional note, you can overwrite static parameters via URL in public dashboards, in my case i have several ID's, setting any of those ID's will render their properties in the dashboard even if they are set as static parameters. |
This issue seems to be happening only with the preview-backend link (http://preview-backend.redashapp.com), which has an older version for the frontend code, when replacing the base url to https://redash-preview.netlify.com it works fine (I've added a Dropdown parameter to test that). You also can't overwrite the static parameters via URL for the redash-preview url. Public dashboard link Parameter name: "text", static value set to |
I am trying to set a static parameter via URL but it does not work at all unless I change parameter type to a not static one. Is this really possible, is there a different syntax I should use? Or is this different between hosted version vs self hosted? |
Hi @rotirahn, Static parameters should not be changed, they should remain with the value you defined as if the query didn't have the parameter. If at some point it was changeable through the URL, it was a bug. Why not use the Dashboard/Widget parameters? You didn't want them to appear in the dashboard? |
Hi @gabrieldutra, yes basically I do not want users to be able to alter the parameter. Here is my situation. I have a dashboard connected to a single data source with a single table which holds information about multiple projects. I want to share the dashboard with stakeholders from different projects but I want them to be able to see just their own data, which means I need to filter the main table by project_id for each project. But while doing that, I want to prevent users from being able to change the project_id parameter. I can achieve this by creating multiple dashboards and just assigning a static parameter but this means I need to maintain more than 50 identical dashboards and even altering small chart visual will be huge burden. So I am looking for a way to be able use same dashboard by filtering it per project_id while also not showing this parameter to the users themselves, hence my question. If I can set a static parameter through URL, I can share the same dashboard with a unique project_id which users will not be able to alter via the UI. Ofcourse they will be able to alter the URL but I can deal with it by using randomized short IDs. I can practically achieve the same effect by not using a static parameter but that means users will see a parameter box in dashboard with a randomized id and altering it will cause the queries to return no data. Is there any way to achieve what I need in an elegant way? Thanks! |
@rotirahn passing the parameter is not secure since network sniffers can see that same content |
Hi, @rotirahn did you maybe find a solution? |
Issue Summary
When a dashboard is made public, the source it uses for Static parameter values goes wrong.
Instead of picking the value of the Static parameter from the dashboard widget, instead it appears to use the default value for the parameter as defined in the underlying query/chart.
Steps to Reproduce
Note the "Site" parameter there has two potential values: 'foo', and 'bar'
Possibly related to #3379, as it touches similar pieces.
Technical details:
The text was updated successfully, but these errors were encountered: