ajax-panel icon indicating copy to clipboard operation
ajax-panel copied to clipboard

From and To parameters not working in Grafana 8

Open robinsonjj opened this issue 3 years ago • 3 comments

After updating to grafana 8 I have found that my iframes are no longer loading if they have ctrl.range.from.format("x") or ctrl.range.to.format("x") in them.

The template parameters are still working ok. Any ideas on what I could replace these with?

robinsonjj avatar Oct 19 '21 13:10 robinsonjj

I have the same problem. Is it possible to output the selected time period via another variable in the current version 8.x?

mkp-bartsch avatar Jan 04 '22 20:01 mkp-bartsch

Thank you for identifying what causes the issue. I am able to use a work around for this I created dashboard variables for the to and from times image

and then using them instead of

from:ctrl.range.from.format('x'), // x is unix ms timestamp to:ctrl.range.to.format('x'),

to this

from:ctrl.template('$__from_date'), // x is unix ms timestamp to:ctrl.template('$__to_date'),

Cheers

shehrozeee avatar Jan 11 '22 06:01 shehrozeee

Thank you for giving solution

Still having issue in creating variables in dashboard ...

vignesh321 avatar Nov 30 '22 08:11 vignesh321