Closed DarkPsionix closed 8 months ago
you should be able to reference by using the variable ${__cell_name}
Try the options here: (https://github.com/grafana/grafana-polystat-panel?tab=readme-ov-file#using-polystat-variables)
I'll try to repro it to double check if there's a bug.
Hello, I am facing quite the same issue. I use a monitoring tool showing several applications with a prometheus datasource. The dashboard shows a lot of hexagons with some applications/service names under the variable "service". When i use this url : "https://grafana.XXXX.com/d/dashboardid/nameOf2ndDashboard?var-service=$service"
it redirects me well on the other dashboard but it takes all of the services in the parameter of the url instead of the one i clicked on. I have a global regex that shows what i need to see in the dashboard, and i would like that data to be used in the click through url but it doesn't work. I tried every possible way looking at the documentation but it doesn't work.
Could you see if there is any solutions that would work ? In addition, in a basic "stat" panel of grafana, the url, a bit different works in the "data links" section of the stat panel options. (I also tried to put that url in the beggining but still doesn't work)
Thank you for your response. Regards
Hello @briangann ,
Have you got any update on this issue ?
Thank you very much
working on a fix, expect to have it by end of week, along with a couple of other issues
quick update: looks like there is an easier fix for this, with no changes needed to your dashboard, there is a missing step in the global clickthrough processor.
(all of the below is useful for anyone debugging, and might be an interesting core api addition)
i have repro'd this, and it will take a little bit of work to make it function as intended. I'll take a look at the stat panel and datalinks too to see what other options there are.
Basically the plugin needs to detection if repeat on variable is set, and split the variable content according to the panel.
Looks like we can auto-detect the repeated variable value, and add a new syntax like this:
it would look like this:
/d/cockpit-business-service?var-businessfamily=${__repeat_by_value}
An additional syntax for the variable name can also be added that may be useful for drilldown url construction:
/d/dashboard-${__repeat_by_name}?var-businessfamily=${__repeat_by_value}
Does that sound ok?
NOTE: the api doesn't appear to expose this setting to a panel plugin (i'm looking into that), so it may need to be another field to make this work in the meantime.
Hello
I use a Polystat panel with the "repeat" fonctionnality activated based on a variable.
The variable name used is called "businessfamily" and contains the following values "Listing", "Trading".
I use the the variable ${businessfamily} in the panel title and each repeated panel has the correct name (one with "Listing" and one with "Trading"), but if i use the variable in the "Default Clickthrough" the variable returns "Listing,Trading"
Default Clickthrough /d/cockpit-business-service?var-datasource=${datasource}&var-businessfamily=${businessfamily} produces /d/cockpit-business-service?var-datasource=efe58ca4-5c8b-442f-9afe-e43d496f1c7c&var-businessfamily=Listing,Trading on all panels
In the first repeated panel it should be /d/cockpit-business-service?var-datasource=efe58ca4-5c8b-442f-9afe-e43d496f1c7c&var-businessfamily=Listing and in the second one /d/cockpit-business-service?var-datasource=efe58ca4-5c8b-442f-9afe-e43d496f1c7c&var-businessfamily=Trading as in the title of each panel
Do i missed something or is it a bug ?
Regards