Articles in this section
Category / Section

Consequences of Improper Environment Value in JavaScript Embedding

Published:

This article provides a comprehensive overview of the process and implications when a Cloud user attempts to embed Bold BI with enterprise and on-premise users in a cloud environment. Additionally, it offers a detailed explanation of the solution to address this scenario.

Issue 1: Dashboard Loading Forever in Cloud Version

When a cloud user tries to embed the Bold BI application in an Enterprise environment, the loading indicator may show indefinitely instead of rendering the dashboard. This can occur when using the following code:

var dashboard = BoldBI.create({
    serverUrl: "https://dev-cloud.com/bi",
    dashboardId: dashboardId,
    embedContainerId: "dashboard",
    embedType: BoldBI.EmbedType.Component,
    environment: BoldBI.Environment.Enterprise,
    width: "100%",
    height: "100%",
    expirationTime: 100000,
    authorizationServer: {
        url: authorizationServerUrl
    }
});
dashboard.loadDashboard();

Issue 2: Server Not Found in On-Premise Version

On the other hand, if an on-premise user tries to render the Bold BI application in a Cloud environment, they may encounter a “Server not found” error message. This can occur when using the following code:

var dashboard = BoldBI.create({
    serverUrl: "https://on-premise.com/bi/site/site1",
    dashboardId: dashboardId,
    embedContainerId: "dashboard",
    embedType: BoldBI.EmbedType.Component,
    environment: BoldBI.Environment.Cloud,
    width: "100%",
    height: "100%",
    expirationTime: 100000,
    authorizationServer: {
        url: authorizationServerUrl
    }
});
dashboard.loadDashboard();

Solution: Matching Environment to Server

To resolve these issues, ensure that the environment matches the server being used. Here are the correct configurations for both On-Premise and Cloud users:

  • On-Premise users should use BoldBI.Environment.Enterprise:
var dashboard = BoldBI.create({
    serverUrl: "https://on-premise.com/bi/site/site1",
    environment: BoldBI.Environment.Enterprise
});
dashboard.loadDashboard();
  • Cloud users should use BoldBI.Environment.Cloud:
var dashboard = BoldBI.create({
    serverUrl: "https://dev-cloud.com/bi",
    environment: BoldBI.Environment.Cloud
});
dashboard.loadDashboard();

By ensuring that the environment matches the server, you should be able to successfully load your Bold BI dashboard.

References

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
SM
Written by Soundarya Mani Meharan
Updated:
Comments (0)
Please  to leave a comment
Access denied
Access denied