EmbedManager methods can be used to manage embedded Self-Service Analytics components. Sample code showing the use of these methods in an application are provided. See Embedded JavaScript Examples for a complete example of how these methods might be coded in JavaScript.
| Method | Description |
|---|---|
createComponent() | Creates a Self-Service Analytics component in your application. This method is asynchronous and returns a promise that resolves the created component. The parameters input to this method include:
Use a standard render method (for example, dashboard.render or visualBuilder.render) to render the component in your application after it has been created. Examples are provided in Embedded JavaScript Examples.The following example embeds a dashboard: |
getComponentById() | Returns an instance of a Self-Service Analytics component, based on its component instance ID. The parameter input to this method is a string representing the component instance ID. |
refresh() | Refreshes all embedded components. This is useful when the token is expired. No parameters are passed to this method. |
refreshComponent() | Refreshes a particular component. The parameter used with this method is a string representing the component instance ID. The following example refreshes a specific dashboard: |
refreshWithToken() | Combines an update token and refresh request for all components. The parameter input to this method is a string representing the new token. |
removeComponent() | Removes an embedded component from your application. This method returns the value true when the removal is successful and false when it fails. When a component is removed, its watchers are also removed.The parameter input to this method is a string representing the component instance ID. |
updateToken() | Refreshes the authorization token for an embedded component. This method is asynchronous and should be called prior to a refresh. The parameter input to this method is either a string representing the new token or a function requesting a new token. |
Embedded Dashboard Properties and Objects
Properties can be passed as parameters to thecreateComponent method when embedding dashboards.
Here is a sample embedding "componentInstanceId":"<id>":
dashboardId, componentInstanceId.
Here is a sample embedding "type":
type.
Here is a sample embedding
"application":
application.banner, application.logo.
| Property/Object | Default | Description |
|---|---|---|
"application.banner": true | false | Indicates whether the top-level navigation banner should be shown with the embedded dashboard. Valid values are true or false.Type: boolean This property is deprecated and will be removed in a future release. |
"application.logo": true | false | Indicates whether the logo should be shown with the embedded dashboard. Valid values are true or false.Type: boolean This property is deprecated and will be removed in a future release. |
"interactivityProfileName":
interactivityProfileName.
Here is a sample embedding "interactivityOverrides":
interactivityOverrides.
Here is a sample embedding "mode":
mode.
Here is a sample embedding "theme":
theme.
| Property/Object | Default | Description |
|---|---|---|
"theme":"dark" | composer | The theme for the embedded visual. Valid values are d+a_light, __platform__, composer, modern, dark. The initial default theme, composer, is the same as the modern theme. However, if you add your own themes to the application, more options are available in this list and you may have introduced a different default.Type: string |
"editor":
editor.placement.
| Property/Object | Default | Description |
|---|---|---|
"editor.placement":"docRight" | modals | Indicates where the dashboard editor appears. Valid editor placements are dockRight and modals.Type: string |
"header":
header.title, header.showActions, header.showTitle, header.visible.
Here is a sample embedding "intialFilters":
initialFilters, applyFiltersStrategy.
You can also refresh your data in the dashboard as needed.
Embedded Library Properties and Objects
The library embed feature also includes pre-defined actions for adding a dashboard and opening a dashboard. Here’s what you can do with pre-defined actions:- Specify an action for embed action
- Specify an action for navigate to link
- Change a cursor if a column has onClick action specified
- Pass an item id to the link (“https://dashboards.company.com/edit/\${inventoryitemId}”)
- Filter dashboards by dashboard tags (See Embed Components Using JavaScript and Trusted Access)
Below is a code sample for using the onClick property:
| Type | Example |
|---|---|
| FunctionClickHandler | |
| EmbedClickHandler | |
| LinkClickHandler |
Embedded Source Inventory Properties and Objects
The source inventory embed feature allows you to define the look and feel of the Sources page for your embedded users. When you embed a list of sources, you can define which columns to include, order them in your preferred layout, and define what controls are available by enabling and disabling interactivity settings. Your users can filter sources, search for sources, and add sources to favorites. Use theInteractivityValue property to specify interactivity parameters for the sources inventory.
| Parameter | Description |
|---|---|
"ADD_NEW": true | When set to true, users can create a new data source configuration. When set to false, the button to create a new data source is hidden.Type: boolean |
"FILTER": true | When set to true, users can filter sources using the quick filter icons to the left of the Search field on the sources page. When set to false, they cannot filter sources.Type: boolean |
"DELETE": true | When set to true, users can delete data source configurations not currently in use by a visual.When set to false, they cannot delete data source configurations, and the delete icon is not visible in the UI.Type: boolean |
"DESCRIPTION": true | When set to true, users can view and search for items (sources, visual gallery visuals, dashboard or self-service report in the library) by the contents of an item’s description.When set to false, description options are not available to users.Type: boolean |
"EXPORT": true | When set to true, users can export data source configurations.When set to false, users cannot export data source configurations, and the option is not visible in the UI.Type: boolean |
"PERMISSIONS": false | When set to true, users can manage user and group permissions for data sources. When set to false, they cannot manage permissions for data sources, and the related icons are not visible in the UI.Type: boolean |
"FAVORITES": true | When set to true, users can mark the data source as a favorite. When set to false, they cannot mark data source favorites and the favorites icons are not visible in the UI.Type: boolean |
"ROW_SECURITY": false | When set to true, users can define row security for data sources. When set to false, they cannot define row security for data sources, and the related icons are not visible in the UI.Type: boolean |
"COLUMN_SECURITY": false | When set to true, users can define column security for data sources. When set to false, they cannot define column security for data sources, and the related icons are not visible in the UI.Type: boolean |
"CLEAR_CACHE": true | When set to true, users can clear the cache for a data source. When set to false, users cannot clear the cache for a data source and the related icons are not visible in the UI.Type: boolean |
"AVAILABLE_VISUAL_TYPES": true | When set to true, users invoke the Available Visual Types work area to enable and disable available visual types for a source. When set to false, they cannot affect available visual types, or see related icons are not visible in the UI.Type: boolean |
Embedded Visual Authoring Properties and Objects
The following properties can be passed as parameters to thecreateComponent method when embedding visual authoring components.
Here is a sample.
This example assumes that the EmbedManager has already been initialized, and the ID of a visual template is passed.
componentConfig.
See: theme.
| Property/Object | Default | Description |
|---|---|---|
"theme":"dark" | composer | The theme for the embedded visual. Valid values are d+a_light, __platform__, composer, modern, dark. The initial default theme, composer, is the same as the modern theme. However, if you add your own themes to the application, more options are available in this list and you may have introduced a different default.Type: string |
header properties.
See: showTitle, visible, showActions, title.
The following table describes the available breadcrumb properties.
See: breadcrumbs.onClick, breadcrumbs.target, breadcrumbs.title.
| Property/Object | Default | Description |
|---|---|---|
<optional breadcrumb properties> | Optional breadcrumb properties are described in Optional Embedded Visual Authoring Breadcrumb Properties. | |
"breadcrumbs.onClick" | none | The click action handler for the breadcrumb title. Type: function |
"breadcrumbs.target":"_blank" | none | The link target parameter. Use "_blank" to open in a new tab. A valid link target should be specified in quotes ("<target>").Type: string |
"breadcrumbs.title":"<title>" | none | The first item breadcrumbs title. A valid title should be specified in quotes ("<title>").Type: string |
source.visualId, interactivityOverrides, visualId.
| Property/Object | Default | Description |
|---|---|---|
"source.visualId":"<id>" | null | The source ID of a visual template, used for creating a new visual in visual authoring. This represents a predefined visual template. A valid source ID should be specified in quotes ("<source-visual-ID>"). If neither visualId or source.visualId is specified, an empty visual authoring instance will be opened. If both are provided, visualId is used.Type: string |
"interactivityOverrides" | none | Specifies interactivity override settings for visual authoring. The interactivity settings specified in this object will override any interactivity settings specified for the individual visuals. For a list of visual interactivity settings you can specify, see Control How Users Interact With a Visual. Type: object |
"visualId":"<id>" | null | The visual ID for an existing visual for visual authoring. A valid visual ID should be specified in quotes ("<visual-ID>"). If neither visualId or source.visualId is specified, an empty visual authoring instance will be opened. If both are provided, visualId is used.Type: string |
| Property/Object | Default | Description |
|---|---|---|
<optional breadcrumb properties> | Optional breadcrumb properties are described in Optional Embedded Visual Authoring Breadcrumb Properties. | |
"breadcrumbs.onClick" | none | The click action handler for the breadcrumb title. Type: function |
"breadcrumbs.target":"_blank" | none | The link target parameter. Use "_blank" to open in a new tab. A valid link target should be specified in quotes ("<target>").Type: string |
"breadcrumbs.title":"<title>" | none | The first item breadcrumbs title. A valid title should be specified in quotes ("<title>").Type: string |
"header.showActions": false | true | Indicates whether the visual header actions should be shown for the embedded visual. Valid values are true or false.Type: boolean |
"header.showTitle": false | true | Indicates whether the visual header title should be shown for the embedded visual. Valid values are true or false.Type: boolean |
"header.title": <text> | none | Specifies a static title for the visual. Type: string |
"header.visible": false | true | Indicates whether the visual header should be visible for the embedded visual. Valid values are true or false.Type: boolean |
"interactivityOverrides" | none | Specifies interactivity override settings for visual authoring. The interactivity settings specified in this object will override any interactivity settings specified for the individual visuals. For a list of visual interactivity settings you can specify, see Control How Users Interact With a Visual. Type: object |
"source.visualId":"<id>" | null | The source ID of a visual template, used for creating a new visual in visual authoring. This represents a predefined visual template. A valid source ID should be specified in quotes ("<source-visual-ID>").If neither visualId or source.visualId is specified, an empty visual authoring instance will be opened.If both are provided, visualId is used.Type: string |
"theme":"dark" | composer | The theme for the embedded visual. Valid values are d+a_light, __platform__, composer, modern, dark. The initial default theme, composer, is the same as the modern theme. However, if you add your own themes to the application, more options are available in this list and you may have introduced a different default.Type: string |
"visualId":"<id>" | null | The visual ID for an existing visual for visual authoring. A valid visual ID should be specified in quotes ("<visual-ID>").If neither visualId or source.visualId is specified, an empty visual authoring instance will be opened.If both are provided, visualId is used.Type: string |
You can include several controls for embedded visuals, allowing users to select and deselect favorite visuals, as well as filter the list of visuals in the embedded Visual Gallery by favorite status. See Use the Visual Gallery.
Optional Embedded Visual Authoring Breadcrumb Properties
Optionally, you can pass breadcrumb properties as parameters to thecreateComponent method when embedding Self-Service Analytics visual authoring components.
Here is a sample:
title, onClick, href, target.
Token-Related Configuration Properties
TheinitComposerEmbedManager window function supports the following token-related configuration properties.
See: getToken.
| Property | Description |
|---|---|
getToken | This method returns a token using Trusted Access. This is the same as the window.composerGetToken method. There is no default. |