You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/06/14 08:37:39 UTC

[GitHub] paritoshjchandran opened a new issue #5197: Height of an embedded Dashbaord

paritoshjchandran opened a new issue #5197: Height of an embedded Dashbaord
URL: https://github.com/apache/incubator-superset/issues/5197
 
 
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [Yes] I have checked the superset logs for python stacktraces and included it here as text if any
   - [Yes] I have reproduced the issue with at least the latest released version of superset
   - [Yes] I have checked the issue tracker for the same issue and I haven't found one similar
   
   When I am trying to embed a dashboard into a webpage using an iframe, I am not able to determine the height of the iframe so that it exactly matches the height of the dashboard to prevent a scrollbar from appearing inside the iframe without cropping it.
   The dashboard and web page that contains the iframe are NOT on the same domain.
   And, Chrome doesn't support the "x-frame-options=ALLOW FROM ..."
   
   Am I missing something ? Or, is this a feature request ?
   
   I have also found a workaround but that involves the dashboard sending a cross-domain message upon changing it's height. 
   
   I'm not sure if I'm the only one not able to figure this out or no one else is asking this.
   
   ### Superset version
   0.25.6
   
   ### Expected results
   Uncropped dashboard
   
   ### Actual results
   Cropped dashboard
   
   ### Steps to reproduce
   iframe code
   <iframe id="ss_dashboard" src='' width="100%" frameborder="0" scrolling="no" onload="resizeIFrameToFitContent(this)"></iframe>
   
   javascript code
   <script>
       var superset_iframe = document.getElementById('ss_dashboard');
       function resizeIFrameToFitContent( iFrame ) {
           iFrame.height = iFrame.contentWindow.document.body.scrollHeight;
       }
       superset_iframe.setAttribute('src', 'http://127.0.0.1:8088/superset/dashboard/5/?standalone=true');
   </script>
   
   The 2 errors I get in the console are
   1- Invalid 'X-Frame-Options' header encountered when loading 'http://127.0.0.1:8088/superset/dashboard/5/?standalone=true': 'ALLOW-FROM http://127.0.0.1' is not a recognized directive. The header will be ignored.
   
   2- Uncaught DOMException: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a cross-origin frame.
       at resizeIFrameToFitContent (http://127.0.0.1:8000/scenario/:23:46)
       at HTMLIFrameElement.onload (http://127.0.0.1:8000/scenario/:11:118)
   resizeIFrameToFitContent @ (index):23
   onload @ (index):11

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org