Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Views/EmbedData/DashboardListing.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<!DOCTYPE html>
<html>
<head>
<title>BoldBI Blazor Dashboard listing</title>
<script type="text/javascript" src="https://cdn.boldbi.com/embedded-sdk/latest/boldbi-embed.js"></script>
<script type="text/javascript" src="~/js/Index.js"></script>
<link rel="stylesheet" href="~/css/site.css" />
Expand Down
45 changes: 12 additions & 33 deletions Views/EmbedData/_Host.cshtml
Original file line number Diff line number Diff line change
@@ -1,49 +1,28 @@
@page "/"
@using BoldBIEmbedSample.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@using BoldBIEmbedSample.Models
@{
Layout = null;
}

<!DOCTYPE html>
<html lang="en">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BoldBI Blazor Embed</title>
<base href="~/" />
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
<link href="css/site.css" rel="stylesheet" />
</head>
<body>

<div id="dashboard"></div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.boldbi.com/embedded-sdk/latest/boldbi-embed.js"></script>
<script type="text/javascript" src="~/js/Index.js"></script>
<link rel="stylesheet" href="~/css/site.css" />
<script>
<script type="text/javascript">
var rootUrl = "@ViewBag.ServerUrl";
var dashboardId = "@ViewBag.DashboardId";
var siteIdentifier = "@ViewBag.SiteIdentifier";
var environment = "@ViewBag.Environment";
var embedType = "@ViewBag.EmbedType";
var authorizationServerUrl = "/AuthorizationServer";

$(document).ready(function () {
this.dashboard = BoldBI.create({
serverUrl: rootUrl + "/" + siteIdentifier,
dashboardId: dashboardId,
embedContainerId: "dashboard",
width: "100%",
height: "100%",
authorizationServer: {
url: authorizationServerUrl
}
});
this.dashboard.loadDashboard();
});
var authorizationServerUrl = "@Url.Action("AuthorizationServer", "EmbedData")";
</script>
</body>
</html>

</head>

<body onload="renderDashboard(dashboardId)">
<div id="viewer-section" style="width: 100%";>
<div id="dashboard"></div>
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion wwwroot/js/Index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ function renderDashboard(dashboardId) {

console.log(this.dashboard);
this.dashboard.loadDashboard();
};
};