# User Interface APIs

The user interface system definition for `cv.api` class (`cv.api.ui`). Contains all user interface related API calls.

## Constructor

| Name       | Description                                                                                  |
| ---------- | -------------------------------------------------------------------------------------------- |
| `new ui()` | User interface definition for `cv.api` class. Contains all user interface related API calls. |

## Methods

| Name                                 | Description                                                                                                                                                                                                                                                                               |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `disableFilterPanel(removeFlag)`     | Removes filter panel, filter panel toggle arrow, the filter count, and the filter toggle button on the main tool bar. This API function is additionally available via the URL parameter 'disableFilterPanel'.                                                                             |
| `getMode() : string`                 | Returns the mode of the current report's representation.                                                                                                                                                                                                                                  |
| `listGembarIds() : Array`            | Returns an array which contains the IDs of the fields.                                                                                                                                                                                                                                    |
| `listVizIds() : Array`               | Returns an array which contains the IDs of the visualization types.                                                                                                                                                                                                                       |
| `removeFieldLayout(removeFlag)`      | Removes the layout panel and the toolbar's button for opening and closing the panel. This API function is additionally available via the URL parameter 'removeFieldLayout'. This function only works in EDIT mode.                                                                        |
| `removeFieldList(removeFlag)`        | Removes field list panel and the toolbar's button for opening and closing the panel. This API function is additionally available via the URL parameter 'removeFieldList'. This function only works in EDIT mode.                                                                          |
| `removeHeaderBar(removeFlag)`        | Removes the header bar, including the filter panel, report title, and spinner loading bar with the **Cancel** button. In VIEW mode this function will also remove the **View Report Format** toggle. This API function is additionally available via the URL parameter 'removeHeaderBar'. |
| `removeMainToolbar(removeFlag)`      | Removes the main toolbar panel which contains buttons to control the report. This API function is additionally available via the URL parameter 'removeMainToolbar'. This function only works in EDIT mode.                                                                                |
| `removeRedoButton(removeFlag)`       | Removes the **Redo** button from the main toolbar. This API function is additionally available via the URL parameter 'removeRedoButton'. This function only works in EDIT mode.                                                                                                           |
| `removeReportActions(removeFlag)`    | Removes the action button while in view mode. This API function is additionally available via the URL parameter 'removeReportActions'. This function only works in VIEW mode.                                                                                                             |
| `removeUndoButton(removeFlag)`       | Removes the **Undo** button from the main toolbar. This API function is additionally available via the URL parameter 'removeUndoButton'. This function only works in EDIT mode.                                                                                                           |
| `setFieldListView(view)`             | Sorts the data source fields based on the view. This API function is additionally available via the URL parameter 'fieldListView'. This function only works in EDIT mode.                                                                                                                 |
| `showFieldLayout(makeVisible)`       | Enables the user to toggle whether the field layout panel is visible. This api function is additionally available via the URL parameter 'showFieldLayout'. This function only works in EDIT mode.                                                                                         |
| `showFieldList(makeVisible)`         | Enables the user to toggle whether the field list panel is visible. This API function is additionally available via the URL parameter 'showFieldList'. This function only works in EDIT mode.                                                                                             |
| `showFilterPanel(makeVisible)`       | Enables the user to toggle whether the filter panel is visible or hidden. This API function is additionally available via the URL parameter 'showFilterPanel'                                                                                                                             |
| `showRepositoryButtons(makeVisible)` | Enables the user to toggle whether the repository buttons in the main toolbar are visible. This API function is additionally available via the URL parameter 'showRepositoryButtons'. This function only works in EDIT mode.                                                              |

## Constructor Details

| `new ui()`                                                                                                                                                                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>UI definition for <code>cv.api</code> class.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L34">javascript/scripts/cv\_api\_ui.js, line 34</a></p> |

\## Methods Details

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>disableFilterPanel(removeFlag)</code></td><td></td><td></td></tr><tr><td><p>Removes filter panel, filter panel toggle arrow, the filter count, and the filter toggle button on the main tool bar. This API function is additionally available via the URL parameter 'disableFilterPanel'.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L302">javascript/scripts/cv_api_ui.js, line 302</a></p><ul><li><strong>Parameters</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.disableFilterPanel();</p><p>http://sample.url.com?disableFilterPanel=true</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td>`removeFlag : boolean</td><td>string`</td><td></td></tr></tbody></table>

| `getMode() : string`                                                                                                                                                                                                                                                                                                                                                                                                              |                                                     |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| <p>Returns the mode of the current report's representation.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L107">javascript/scripts/cv\_api\_ui.js, line 107</a></p><ul><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript"> |                                                     |
| </code></pre></li></ul><p>cv.api.ui.getMode(); \`\`\`</p>                                                                                                                                                                                                                                                                                                                                                                         |                                                     |
| Name                                                                                                                                                                                                                                                                                                                                                                                                                              | Description                                         |
| `string`                                                                                                                                                                                                                                                                                                                                                                                                                          | current mode. Possible values are "EDIT" or "VIEW". |

<table data-header-hidden><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><code>listGembarIds() : Array</code></td><td></td></tr><tr><td><p>Returns an array which contains the IDs of the fields.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L219">javascript/scripts/cv_api_ui.js, line 219</a></p><ul><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.listGembarIds();</p><p>// Return Value: ["rows", "columns", "measures"]</p><pre><code>```
</code></pre></td><td></td></tr><tr><td>Name</td><td>Description</td></tr><tr><td><code>Array</code></td><td>The field's IDs.</td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><code>listVizIds() : Array</code></td><td></td></tr><tr><td><p>Returns an array which contains the IDs of the visualization types.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L188">javascript/scripts/cv_api_ui.js, line 188</a></p><ul><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.listVizIds();</p><p>// Return Value: [ // "pivot", "ccc_bar", "ccc_barstacked", "ccc_barnormalized", "ccc_horzbar", "ccc_horzbarstacked", // "ccc_horzbarnormalized", "ccc_pie", "ccc_line", "ccc_area", "ccc_scatter", "ccc_barline", "ccc_heatgrid", // "ccc_sunburst", "open_layers" // ]</p><pre><code>```
</code></pre></td><td></td></tr><tr><td>Name</td><td>Description</td></tr><tr><td><code>Array</code></td><td>The visualization types' IDs.</td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>removeFieldLayout(removeFlag)</code></td><td></td><td></td></tr><tr><td><p>Removes the layout panel and the toolbar's button for opening and closing the panel. This API function is additionally available via the URL parameter 'removeFieldLayout'. This function only works in EDIT mode.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L359">javascript/scripts/cv_api_ui.js, line 359</a></p><ul><li><strong>Parameters</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.removeFieldLayout();</p><p>http://sample.url.com?removeFieldLayout=true</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td>`removeFlag : boolean</td><td>string`</td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>removeFieldList(removeFlag)</code></td><td></td><td></td></tr><tr><td><p>Removes field list panel and the toolbar's button for opening and closing the panel. This API function is additionally available via the URL parameter 'removeFieldList'. This function only works in EDIT mode.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L243">javascript/scripts/cv_api_ui.js, line 243</a></p><ul><li><strong>Parameters</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.removeFieldList();</p><p>http://sample.url.com?removeFieldList=true</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td>`removeFlag : boolean</td><td>string`</td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>removeHeaderBar(removeFlag)</code></td><td></td><td></td></tr><tr><td><p>Removes the header bar, including the filter panel, report title, and spinner loading bar with the <strong>Cancel</strong> button. In VIEW mode this function will also remove the <strong>View Report Format</strong> toggle. This API function is additionally available via the URL parameter 'removeHeaderBar'.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L269">javascript/scripts/cv_api_ui.js, line 269</a></p><ul><li><strong>Parameters</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.removeHeaderBar();</p><p>http://sample.url.com?removeHeaderBar=true</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td>`removeFlag : boolean</td><td>string`</td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>removeMainToolbar(removeFlag)</code></td><td></td><td></td></tr><tr><td><p>Removes the main toolbar panel which contains buttons to control the report. This API function is additionally available via the URL parameter 'removeMainToolbar'. This function only works in EDIT mode.</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L418">javascript/scripts/cv_api_ui.js, line 418</a></p><ul><li><strong>Parameters</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.removeMainToolbar();</p><p>http://sample.url.com?removeMainToolbar=true</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td>`removeFlag : boolean</td><td>string`</td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>removeRedoButton(removeFlag)</code></td><td></td><td></td></tr><tr><td><p>Removes the <strong>Redo</strong> button from the main toolbar. This API function is additionally available via the URL parameter 'removeRedoButton'. This function only works in EDIT mode.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L392">javascript/scripts/cv_api_ui.js, line 392</a></p><ul><li><strong>Parameters</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.removeRedoButton();</p><p>http://sample.url.com?removeRedoButton=true</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td>`removeFlag : boolean</td><td>string`</td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>removeReportActions(removeFlag)</code></td><td></td><td></td></tr><tr><td><p>Removes the action button while in view mode. This API function is additionally available via the URL parameter 'removeReportActions'. This function only works in VIEW mode.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L514">javascript/scripts/cv_api_ui.js, line 514</a></p><ul><li><strong>Parameters</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.removeReportActions();</p><p>http://sample.url.com?removeReportActions=true</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td>`removeFlag : boolean</td><td>string`</td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>removeUndoButton(removeFlag)</code></td><td></td><td></td></tr><tr><td><p>Removes the <strong>Undo</strong> button from the main toolbar. This API function is additionally available via the URL parameter 'removeUndoButton'. This function only works in EDIT mode.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L333">javascript/scripts/cv_api_ui.js, line 333</a></p><ul><li><strong>Parameters</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.removeUndoButton();</p><p>http://sample.url.com?removeUndoButton=true</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td>`removeFlag : boolean</td><td>string`</td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>setFieldListView(view)</code></td><td></td><td></td></tr><tr><td><p>Sorts the data source fields based on the view. This API function is additionally available via the URL parameter 'fieldListView'. This function only works in EDIT mode.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L443">javascript/scripts/cv_api_ui.js, line 443</a></p><ul><li><strong>Parameters</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.setFieldListView("CATEGORY")</p><p>http://sample.url.com?fieldListView=CATEGORY</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td><code>view : string</code></td><td></td><td>The value upon which the field list will be sorted. Acceptable values include: CATEGORY,SCHEMA,TYPE,NAME</td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>showFieldLayout(makeVisible)</code></td><td></td><td></td></tr><tr><td><p>Enables the user to toggle whether the field layout panel is visible. This api function is additionally available via the URL parameter 'showFieldLayout'. This function only works in EDIT mode.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L127">javascript/scripts/cv_api_ui.js, line 127</a></p><ul><li><strong>Parameters</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.showFieldLayout("true");</p><p>http://sample.url.com?showFieldLayout=true</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td>`makeVisible : boolean</td><td>string`</td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>showFieldList(makeVisible)</code></td><td></td><td></td></tr><tr><td><p>Enables the user to toggle whether the field list panel is visible. This API function is additionally available via the URL parameter 'showFieldList'. This function only works in EDIT mode.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L545">javascript/scripts/cv_api_ui.js, line 545</a></p><ul><li><strong>Parameters</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.showFieldList("true");</p><p>http://sample.url.com?showFieldList=true</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td>`makeVisible : boolean</td><td>string`</td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>showFilterPanel(makeVisible)</code></td><td></td><td></td></tr><tr><td><p>Enables the user to toggle whether the filter panel is visible or hidden. This API function is additionally available via the URL parameter 'showFilterPanel'- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L158">javascript/scripts/cv_api_ui.js, line 158</a></p><ul><li><strong>Parameters</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.showFilterPanel("true");</p><p>http://sample.url.com?showFilterPanel=true</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td>`makeVisible : boolean</td><td>string`</td><td></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>showRepositoryButtons(makeVisible)</code></td><td></td><td></td></tr><tr><td><p>Enables the user to toggle whether the repository buttons in the main toolbar are visible. This API function is additionally available via the URL parameter 'showRepositoryButtons'. This function only works in EDIT mode.- <strong>Source</strong></p><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_ui.js#L481">javascript/scripts/cv_api_ui.js, line 481</a></p><ul><li><strong>Parameters</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.ui.showRepositoryButtons("true");</p><p>http://sample.url.com?showRepositoryButtons=true</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td>`makeVisible : boolean</td><td>string`</td><td></td></tr></tbody></table>
