Uploaded image for project: 'Community Dashboard Framework'
  1. Community Dashboard Framework
  2. CDF-972

Filter component doesn't support embedding with CORS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: High
    • Resolution: Fixed
    • Affects Version/s: 6.1.0 GA
    • Fix Version/s: 8.1.0 GA
    • Component/s: None
    • Labels:
      None
    • Story Points:
      0
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Steps to Reproduce:
      Hide

      1) enable CORS in CDF and CDE and restart the server
      2) upload dashboard.zip to the Public folder in PUC
      3) download embedded.html to a local folder and start a python HTTP server (python -m SimpleHTTPServer 8070)
      4) in a browser open http://localhost:8070/embedded.html and see that it fails to load the HTML template files

      Show
      1) enable CORS in CDF and CDE and restart the server 2) upload dashboard.zip to the Public folder in PUC 3) download embedded.html to a local folder and start a python HTTP server (python -m SimpleHTTPServer 8070) 4) in a browser open http://localhost:8070/embedded.html and see that it fails to load the HTML template files

      Description

      The filter component has HTML templates that it loads using the text! RequireJS loader plugin. In an embedded scenario with CORS the plugin requires these resources using RequireJS which ends up adding the ".js" extension, e.g.:
      GET http://localhost:8080/pentaho/plugin/pentaho-cdf/api/resources/js/compressed/components/filter/templates/Root-overlay.html.js 404 (not found)
      See CDF-972.png for the browser console log.

      For production, the component resources should all be included in the minified file (via cdf-js/src/main/config/javascript/build.js), same as what is done with the CDE custom components (cde-pentaho5/config/cde.build.compile.js). That should fix this bug.

        Attachments

        1. CDF-972.png
          CDF-972.png
          286 kB
        2. dashboard.zip
          6 kB
        3. embedded.html
          0.5 kB

          Issue Links

            Activity

              People

              • Assignee:
                kcruzada Kurtis Cruzada
                Reporter:
                ajorge Andre Jorge (Inactive)
              • Votes:
                5 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: