New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
embed dashboard iframe auto-height #14716
Comments
@skerbis not sure what you mean? Can you describe this in more details? |
Hi,sure: i embed the dashboard to our system by using the code like this: <iframe src="https://domain.tld/piwik/index.php?module=Widgetize&action=iframe&moduleToWidgetize=Dashboard&actionToWidgetize=index&idSite=7&period=week&date=yesterday&token_auth=00000000000000
" frameborder="0" marginheight="0" marginwidth="0" width="100%" style="height: 100vh"></iframe> Is there a Way (a JS-Code) to auto resize the embedded iframe so that it fits to the body of it? Perhaps something like: https://github.com/davidjbradshaw/iframe-resizer Is a solution perhaps included in Matomo? |
We have the iframe-resizer embedded in Matomo and AFIAK load it on every request. You could try if it just works |
do you have an example code
does not work. |
Sorry I don't really have the time to investigate much here right now. I can see though that |
I will investigate it tomorrow. Thx |
I get the following Error:
Matomo-Version: 3.11.0 |
Just tested it. I didn't get an error but noticed it isn't working because the widget that you embed would also need to load https://raw.githubusercontent.com/davidjbradshaw/iframe-resizer/master/js/iframeResizer.contentWindow.min.js Then it works... Did you maybe want to create a PR? We could place the file in this directory where we already have the other iframeResize file: https://github.com/matomo-org/matomo/tree/3.x-dev/plugins/CoreHome/javascripts and we would load the file here: https://github.com/matomo-org/matomo/blob/3.12.0-b1/plugins/CoreHome/CoreHome.php#L305 |
Thanks ... PR will come :-) |
Thanks Thomas @tsteur ;-) |
is this possible?
Is there a way to do this?
The text was updated successfully, but these errors were encountered: