Analyzer Module API Reference
The AnalyzerModule
contains the following Contructor and Methods.
Constructor
Name
Description
new AnalyzerModule()
Static
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
.
dispose()
Removes the iframe and releases all of its resources.
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.
getOptions()
Returns the options used to render.
getParentElement()
Returns the parent element of the iframe.
getUrl()
Returns the URL generated for the iframe.
hide()
Hides the Analyzer module when it is visible.
reset()
Resets the state of the report back to the most recently saved state.
show()
Shows the Analyzer module when it has been hidden via the hide()
method.
validateParams(options) : boolean
Validates the required parameters for the Analyzer module.
Constructor Details
new AnalyzerModule()
Static
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
- Source
javascript/web/util/AnalyzerModule.js, line 197
.
## Methods Details
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 the API.
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.
Source
javascript/web/util/AnalyzerModule.js, line 205
Parameters
Name
Default Value
Summary
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 Hitachi Vantara web application http://localhost:8080/pentaho
`parentElement : string
Object`
catalog : string
The catalog to use when creating a new Analyzer report.
cube : string
The cube to use when creating a new Analyzer report.
dataSource : string
(Optional) The name of a data service that supplies data for the report. Use this in conjunction with a url value for that "catalog" parameter that supplies the mondrian model.
reportPath : string
The path which points to an existing Analyzer report to open.
mode : string
Mode in which to open Analyzer. Valid options are: viewer, editor. Defaults to viewer.
onAnalyzerReady : function
Callback function to execute once Analyzer has finished initializing
useLegacyPath : string
Indicates the decision to use the legacy url path structure when creating a new analyzer report: when "true" --> 'content/analyzer/' when "false" --> 'api/repos/xanalyzer/' This has no impact on the url path for opening existing reports, those will all be /api/repos/...
Name
Default Value
Summary
url : string
The URL which points to the root of the Hitachi Vantara web application http://localhost:8080/pentaho
`parentElement : string
Object`
catalog : string
The catalog to use when creating a new Analyzer report.
cube : string
The cube to use when creating a new Analyzer report.
dataSource : string
(Optional) The name of a data service that supplies data for the report. Use this in conjunction with a url value for that "catalog" parameter that supplies the mondrian model.
reportPath : string
The path which points to an existing Analyzer report to open.
mode : string
Mode in which to open Analyzer. Valid options are: viewer, editor. Defaults to viewer.
onAnalyzerReady : function
Callback function to execute once Analyzer has finished initializing
useLegacyPath : string
Indicates the decision to use the legacy url path structure when creating a new analyzer report: when "true" --> 'content/analyzer/' when "false" --> 'api/repos/xanalyzer/' This has no impact on the url path for opening existing reports, those will all be /api/repos/...
- **Example**
```javascript
var options = { "url" : "http://localhost:8080/pentaho", "parentElement" : "parentElementId", "catalog" : "http://localhost:1234/path/to/model", "cube" : "ExampleCube", "dataSource" : "DataServiceName" "mode" : "editor", "disableFilterPanel" : "true", "removeFieldLayout" : "true", "removeFieldList" : "true", "removeHeaderBar" : "true", "removeMainToolbar" : "true", "removeRedoButton" : "true" }
```
Name
Default Value
Summary
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 Hitachi Vantara web application http://localhost:8080/pentaho
`parentElement : string
Object`
catalog : string
The catalog to use when creating a new Analyzer report.
cube : string
The cube to use when creating a new Analyzer report.
dataSource : string
(Optional) The name of a data service that supplies data for the report. Use this in conjunction with a url value for that "catalog" parameter that supplies the mondrian model.
reportPath : string
The path which points to an existing Analyzer report to open.
mode : string
Mode in which to open Analyzer. Valid options are: viewer, editor. Defaults to viewer.
onAnalyzerReady : function
Callback function to execute once Analyzer has finished initializing
useLegacyPath : string
Indicates the decision to use the legacy url path structure when creating a new analyzer report: when "true" --> 'content/analyzer/' when "false" --> 'api/repos/xanalyzer/' This has no impact on the url path for opening existing reports, those will all be /api/repos/...
Name
Default Value
Summary
url : string
The URL which points to the root of the Hitachi Vantara web application http://localhost:8080/pentaho
`parentElement : string
Object`
catalog : string
The catalog to use when creating a new Analyzer report.
cube : string
The cube to use when creating a new Analyzer report.
dataSource : string
(Optional) The name of a data service that supplies data for the report. Use this in conjunction with a url value for that "catalog" parameter that supplies the mondrian model.
reportPath : string
The path which points to an existing Analyzer report to open.
mode : string
Mode in which to open Analyzer. Valid options are: viewer, editor. Defaults to viewer.
onAnalyzerReady : function
Callback function to execute once Analyzer has finished initializing
useLegacyPath : string
Indicates the decision to use the legacy url path structure when creating a new analyzer report: when "true" --> 'content/analyzer/' when "false" --> 'api/repos/xanalyzer/' This has no impact on the url path for opening existing reports, those will all be /api/repos/...
dispose()
Removes the iframe and releases all of its resources.
Source
javascript/web/util/AnalyzerModule.js, line 391
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.
Source
javascript/web/util/AnalyzerModule.js, line 469
Example
analyzerModule.getApi()
```
getOptions()
Returns the options used to render.
Source
javascript/web/util/AnalyzerModule.js, line 439
Example
analyzerModule.getOptions()
```
getParentElement()
Returns the parent element of the iframe.
Source
javascript/web/util/AnalyzerModule.js, line 454
Example
analyzerModule.getParentElement()
```
getUrl()
Returns the URL generated for the iframe.
Source
javascript/web/util/AnalyzerModule.js, line 424
Example
hide()
Hides the Analyzer module when it is visible.
Source
javascript/web/util/AnalyzerModule.js, line 376
Example
analyzerModule.hide()
```
reset()
Resets the state of the report back to the most recently saved state.
Source
javascript/web/util/AnalyzerModule.js, line 409
Example
analyzerModule.reset()
```
show()
Shows the Analyzer module when it has been hidden via the hide() method.
Source
javascript/web/util/AnalyzerModule.js, line 361
Example
analyzerModule.show()
```
validateParams(options) : boolean
Validates the required parameters for the Analyzer module.
Source
javascript/web/util/AnalyzerModule.js, line 302
Parameters
NameDefault ValueSummaryoptions :
Returns
NameDescriptionboolean
Example
validateParams(options);
```
Name
Default Value
Summary
options :
Name
Description
boolean
Last updated
Was this helpful?