Embedding dashboards built with RequireJS
Embedding within Pentaho Server
<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Embedding CDE Dashboards with RequireJS</title> <link rel="stylesheet" type="text/css" href="../../repo/files/:public:Embed:styles.css"/> <script type="text/javascript" src="../../../plugin/pentaho-cdf-dd/api/renderer/cde-embed.js"></script> </head> <body> <div class="headerContainer"> <header class="header"> <a class="logo" href="http://www.pentaho.com/"> <img src="http://www.pentaho.com/sites/all/themes/pentaho_resp/_media/logo-pentaho-new.svg" alt="Pentaho Logo"> </a> <div class="titleHTML"> <strong>Embedding CDE Dashboards with RequireJS</strong> </div> </header> </div> <div class="dashboardContainer"> <div id="content1"></div> <div id="content2"></div> <script src="../../repo/files/:public:Embed:includeDashboards.js"></script> </div> </body> </html>require([ "dash!/public/demoDashboard/demoDashboard.wcdf" ], function(SampleDash) { // Create two instances of the same dashboard that use distinct DOM elements (new SampleDash("content1")).render(); (new SampleDash("content2")).render(); });require([ "/pentaho/plugin/pentaho-cdf-dd/api/renderer/getDashboard?path=/public/demoDashboard/demoDashboard.wcdf" ], function(SampleDash) { /* code */ });require([ "dash!/public/demoDashboard/demoDashboard.wcdf" ], function(SampleDash) { /* code */ });
body { padding: 10px; } img { width: 300px; padding-bottom: 10px; }
Embedded dashboard example
Embedding in a server other than Pentaho
Step 1: Save the embed folder
Step 2: Edit the settings XML files
Step 3: Edit the Pentaho XML file
Step 4: Edit the main HTML file
Step 5: Access the embedded dashboard

Embedded CDE dashboards with RequireJS example
Last updated
Was this helpful?

