Open nathanpegram opened 5 years ago
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.
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.