I have an iframe tag that is linked with a Grafana graph, which supports interaction (zoom in/zoom out on x axis by clicking/double clicking on the iframe).
When I open the url of the iframe's src on a new tab I can interact with the graph and see that my browser's url params keeps refreshing with new from/to values (which indicates the range of the graph's x axis). Unfortunately when it is on an iframe I don't see any changes on the 'src' attribute, on any situation. I need the url parameters changes to apply on other graphs being displayed (sync them all).
How can I solve this situation?
My iframe on Angular's component.html:
<iframe [src]="url_grafana_primary" width="100%" height="300" frameborder="0"></iframe>
Iframe after being rendered:
<iframe _ngcontent-c8="" frameborder="0" height="300" width="100%" src="http://146.250.180.213/grafana/dashboard-solo/script/script_graph.js?scenario_id=rrc_succ_rate&cell_id=ESICAS23B_ESICAS23&refresh=5s&orgId=1&panelId=4&from=1555045266010&to=1555168469864&var-cell_id=ESICAS23B_ESICAS23&var-scenario_id=ESICAS23B_ESICAS23"></iframe>
Some screenshots:
- Before changes: https://imgur.com/undefined
- After changes: https://imgur.com/MN0KIha
You can see that src keep the same value on both situations.
- On a new tab, before: https://imgur.com/yeykrUI
- After: https://imgur.com/yeykrUI
from How to get iframe's refreshed src after interacting
No comments:
Post a Comment