AnsweredAssumed Answered

Embed pentaho CDE Dashboard in external Web application

Question asked by Raj Karan on Jan 10, 2018
Latest reply on Jan 18, 2018 by Raj Karan

I am following this tutorial CDE Advanced Solutions - Pentaho Documentation and have create a simple HTML page (main.html) with code given below.

 

<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript" src="http://172.29.11.246:8080/pentaho/plugin/pentaho-cdf-dd/api/renderer/cde-embed.js"></script>
</head>
<body>
<script type="text/javascript">
require(['dash!/public/demo/Hbase.wcdf'],
function(SampleDash) {
var sampleDash = new SampleDash("content1");
sampleDash.render();
}
);
</script>
<div id="content1"></div>
</body>
</html>

 

I am running this page with python server as instructed in tutorial.

Launching main.html file in browser throws below error.

Failed to load http://172.29.11.246:8080/pentaho/plugin/pentaho-cdf/api/resources/js/compressed/lib/underscore/underscore.js: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:2777' is therefore not allowed access.

 

I have set allow-cross-domain-resources to true in both pentaho-cdf/settings.xml and pentaho-cdf-dd/settings.xml files.

How can I resolve this problem?

Outcomes