ryantxu / ajax-panel

Ajax Panel Plugin for Grafana
MIT License
153 stars 154 forks source link

From and To parameters not working in Grafana 8 #96

Open robinsonjj opened 2 years ago

robinsonjj commented 2 years ago

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?

mkp-bartsch commented 2 years ago

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

shehrozeee commented 2 years ago

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

vignesh321 commented 1 year ago

Thank you for giving solution

Still having issue in creating variables in dashboard ...