Search code examples
pentahopentaho-cdepentaho-ctools

Custom HTML Page in Pentaho User Console 5


I need to know how to create a custom HTML page with the related static resource - css, js and images - into Pentaho User Console version 5 that use Jackrabbit as its repository.

I've checked the pentaho wiki and help pages but to no avail.


Solution

  • CSS and JavaScript files

    Upload CSS and JS files

    1. Browse files > home > New folder.. > Name: test
    2. home > test > Upload... > {choose files to upload from file system; e.g. test.css and test.js}

    Create dashboard, add resources

    1. Create new CDE dashboard [Home > Create New > CDE Dashbaord]
    2. Layout Panel (first, default) > Layout Structure menu (top left) > Add Resource > Resource type: {choose: CSS / JavaScript}; External File
    3. Choose Resource file by clicking on a ^ button. Navigate to home/test/test.css or home/test/test.js

    All resource files defined in Layout structure are attached to dashboard's HTML code.

    Images

    I prefer to store image files within Pentaho server folder.

    • pentaho-solutions/system/pentaho-cdf-dd/images
    • which can be later referred from HTML as <img src="images/test_logo.png"/>
    • or from CSS as background-image: url('test-logo.png');