grafana-cal-heatmap-panel icon indicating copy to clipboard operation
grafana-cal-heatmap-panel copied to clipboard

FR: Interpret dashboard variables in link template

Open nathanpegram opened this issue 5 years ago • 1 comments

It looks like the link template only has the ability to use the time span variables, $ts_from and $ts_to. It would be really useful if the link could also interpret values of grafana dashboard variables.

nathanpegram avatar Oct 24 '19 04:10 nathanpegram

I actually just ran into the same problem. At the bare minimum, it seems, we need to get the result or current interpolation function: var url = template.replace('$ts_from', from).replace('$ts_to', to); and feed it to Grafana's own replaceWithText engine: url = this.templateSrv.replaceWithText(url, []); // note the empty array, it works like this, but ideally we'd get the time ranges passed in there

@NeoCat, @MacroPower if you are happy with my suggestion and would review a PR, I'm keen to put it together.

tkhadimullin avatar Feb 17 '20 01:02 tkhadimullin