Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Public dashboards ignore static value set in dashboard #4038
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
Possibly related to #3379, as it touches similar pieces.
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?