Skip to main content
Hitachi Vantara Lumada and Pentaho Documentation

Analyzer Module APIs

Details the methods for analyzer.AnalyzerModule, which allows for the deployment and control of Analyzer in a DOM element.

analyzer.AnalyzerModule Class

This module allows for deploying and controlling Analyzer in a DOM element. A global collection is maintained for each AnalyzerModule which is initialized, available at window.analyzerModules.

Methods

constructor ( options )

Creates an iframe child of the provided parent element. Also, it generates a URL query string based on the provided module options, plus catalog  and cube, or reportPath. Other options include required parameters, as well as parameters which are provided by Analyzer's JavaScript API. Refer to the API documentation for a full list of supported options.

The Analyzer Module will fill the height and width to 100% of the parent container.

The reportPath option parameter is the repository path to the existing Analyzer report to be opened. If reportPath is not present, then catalog  and cube  must have values to create a new Analyzer report. If all three option parameters are present, then reportPath  takes precedence and the module will attempt to open an existing report located at the path indicated. If reportPath  is not present, and catalog  and cube  are also not present, an error will occur.

Parameters:

  • options  (Object)

    An object with properties which correspond to the available JavaScript API functions, as well as some required properties indicated below.

    • url  (String)

      The URL which points to the root of the Pentaho web application, http://localhost:8080/pentaho.

    • parentElement  (String | Object)

      The DOM element object or string ID of the DOM element in which to deploy Analyzer.

    • catalog  (String)

      The catalog to use when creating a new Analyzer report.

    • cube  (String)

      The cube to use when creating a new Analyzer report.

    • reportPath ( String )

      The path which points to an existing Analyzer report to open.

    • mode  (String)

      Mode in which to open Analyzer. Valid options include viewer  and editor. Defaults to viewer.

    • onAnalyzerReady (Function)

      Callback function to execute once Analyzer has finished initializing.

Example:

var options = { "url" : "http://localhost:8080/pentaho", "parentElement" : "parentElementId", "catalog" : "ExampleCatalog", "cube" : "ExampleCube", "mode" : "editor", "disableFilterPanel" : "true", "removeFieldLayout" : "true", "removeFieldList" : "true", "removeHeaderBar" : "true", "removeMainToolbar" : "true", "removeRedoButton" : "true" }

new analyzerModule(options);

dispose ()

Removes the iframe and releases all of its resources.

Example:

analyzerModule.dispose()

getApi ()

Returns the reference to the Analyzer API for the loaded object. This method is not safe to use until the onAnalyzerReady function has been called.

Example:

analyzerModule.getApi()

getOptions ()

Returns the options used to render.

Example:

analyzerModule.getOptions()

getParentElement ()

Returns the parent element of the iframe.

Example:

analyzerModule.getParentElement()

getUrl ()

Returns the URL generated for the iframe.

Example:

analyzerModule.getUrl()

hide ()

Hides the Analyzer module when it is visible.

Example:

analyzerModule.hide()

reset ()

Resets the state of the report back to the most recently saved state.

Example:

analyzerModule.reset()

show ()

Shows the Analyzer module when it has been hidden via the hide() method.

Example:

analyzerModule.show()

validateParams ( options ) Boolean

Validates the required parameters for the Analyzer module.

Parameters:

Returns:

Example:

validateParams(options);