Using the Embedded Application
This applies to: Managed Dashboards, Managed Reports
After creating the embedded application object, you can access the following properties on it. See Embedded Methods for information on methods to use.
Application Properties
controllerType | Gets or sets the controller type to load, which matches the portion of a Symphony URL following the base URL. Type: dundas.embed.ControllerType or String (can be null). Predefined values include: dundas.embed.ControllerType.DASHBOARD dundas.embed.ControllerType.REPORT dundas.embed.ControllerType.SCORECARD dundas.embed.ControllerType.SHORTLINK dundas.embed.ControllerType.SLIDESHOW dundas.embed.ControllerType.SMALL_MULTIPLE dundas.embed.ControllerType.METRIC_SET dundas.embed.ControllerType.DATA_CUBE dundas.embed.ControllerType.CUBE_PERSPECTIVE dundas.embed.ControllerType.HIERARCHY dundas.embed.ControllerType.ADMIN dundas.embed.ControllerType.HOME
|
dundasBIUrl | Gets or sets the Symphony URL to connect to. For example, https://dbi.example.com:8000/
Type: String |
fileSystemId | Gets or sets the file system entry ID of an existing file such as a dashboard, metric set, etc., if controllerType is set to one of those file types. This can also be unset (null) to create a new file of that type.
Type: String (can be null) |
id | Gets the ID for the Symphony embedded application.
Type: String |
logonTokenId | Gets or sets the logon token ID.
Type: String (can be null) |
sessionToken | Gets or sets the session token.
Type: String (can be null) |
otherUrlParameterOptions | Gets or sets other URL parameter options. For example: [new dundas.embed.UrlParameterOption("cultureName", "fr-FR")] To provide an option for French
[new dundas.embed.UrlParameterOption("e", "true")] To open a dashboard in edit mode
Type: Array (can be null) ElementType: dundas.embed.UrlParameterOption - construction: new dundas.embed.UrlParameterOption(name, value) |
parameterValues | Gets or sets the parameter values to pass to a view such as a dashboard. The values are in a similar format as when passed via query string. For example: [new dundas.embed.ParameterValue("viewParameter2", "$Today$")
Type: Array (can be null) ElementType: dundas.embed.ParameterValue - construction: new dundas.embed.ParameterValue(name, value) |
shortLink | Gets or sets the short link value following the /Link/?shortLink= portion of the link (for example: ae6swdek5p5r3gm3m4oaguqujo ) if controllerType is SHORTLINK , for example when using a shared link.
Type: String (can be null) |
viewOptions | Gets or sets the view options when displaying a view such as a dashboard. If unset (null), the view options from a shortlink (if applicable) or the default will be used. Type: dundas.embed.ViewOptions or String (can be null). Possible values include: dundas.embed.ViewOptions.MENU_ONLY dundas.embed.ViewOptions.MENU_TOOLBAR dundas.embed.ViewOptions.MENU_TOOLBAR_TASKBAR dundas.embed.ViewOptions.NONE dundas.embed.ViewOptions.TOOLBAR_ONLY dundas.embed.ViewOptions.VIEW_ONLY
|
Embedded Application Example
This sample creates a Symphony embedded application, sets some properties, and loads it:
<head>
<script src="/Scripts/Embed/dundas.embed.min.js" type="text/javascript" ></script>
</head>
...
<body>
<div id="dundasBI2">
</div>
<script type="text/javascript">
var dundasBIUrl = 'https://placeholder.dundas-bi-url.com/';
document.addEventListener("DOMContentLoaded", function (event) {
// *****************************************************************************
// It is usually best practice to get the logon token at the server.
// Credentials should not be specified directly in script unless they should be
// freely available to users.
// *****************************************************************************
dundas.embed.logon.getLogonToken(
dundasBIUrl,
{
"accountName": "viewer",
"password": "1234",
"isWindowsLogOn": true
},
function(getLogOnTokenResultData)
{
var dundasApp = dundas.embed.create(
document.getElementById('dundasBI2'),
{ }
);
dundasApp.dundasBIUrl = dundasBIUrl;
dundasApp.controllerType = dundas.embed.ControllerType.DASHBOARD;
dundasApp.fileSystemId = 'f22ce55f-04cd-4207-9dd7-2cadeb44b96c';
dundasApp.viewOptions = dundas.embed.ViewOptions.TOOLBAR_ONLY;
dundasApp.logonTokenId = getLogOnTokenResultData.logOnToken;
dundasApp.parameterValues = [
new dundas.embed.ParameterValue(
"viewParameter2",
"!" + 25000 + "~" + dundas.embed.tokens.basic.OPEN_RANGE
)
];
dundasApp.otherUrlParameterOptions = [
new dundas.embed.UrlParameterOption(
"cultureName",
"fr-FR"
)
];
dundasApp.load();
}
)
});
</script>
</body>