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
52 changes: 52 additions & 0 deletions demo/code-demo/anyReport.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<div id="userReport" class="line">
<div class="pageTitle">
<h3>Embed your own report</h3>
<h8>You can also embed your own report by following the instructions below.</h8>
</div>
<div class="settings">
<div id="EmbedWithSpecificReportDiv">
<div class="line">
<h5>Prerequisites</h5>
<ul>
<li>A workspace in the <a href="https://azure.microsoft.com/en-us/documentation/articles/power-bi-embedded-get-started/">Power BI embedded service.</a></li>
<li>Power BI report imported to your workspace.</li>
</ul>
</div>

<div class="line">
<h5>Instructions to generate an embed App Token</h5>
Once you have improted a report into Power BI workspace, you are ready to embed it.

To embed a report, you need to get an embed App Token. You can create this token in multiple ways.
<ul>
<li>Using <a href="https://github.com/Microsoft/PowerBI-cli">PowerBI-Cli</a> tool.</li>
<li>From .Net Code using <a href="http://www.nuget.org/packages/Microsoft.PowerBI.Core/">Microsoft.PowerBI.Core</a> package.</li>
<li>From NodeJS code using <a href="https://github.com/Microsoft/PowerBI-Node">powerbi-api</a> package.</li>
</ul>
</div>

<div id="authorizeParameterDiv" class="line">
<h5>Enter embed details</h5>

<table id="user-embed-details">
<tr>
<td class="td-field-name">Embed App Token</td>
<td><input type="text" id="auth_txtAccessToken" onchange="UpdateSession(this, SessionKeys.AccessToken);" /></td>
</tr>
<tr>
<td class="td-field-name">Embed URL</td>
<td>
<input type="text" id="auth_txtReportEmbed" onchange="UpdateSession(this, SessionKeys.EmbedUrl);" />
</td>
</tr>
<tr>
<td class="td-field-name">Report Id</td>
<td><input type="text" id="auth_txtEmbedReportId" onchange="UpdateSession(this, SessionKeys.EmbedId);"/></td>
</tr>
</table>
<button id="nextStep" class="blueButton" onclick="OpenEmbedStepFromUserSettings()">Next step - Embed</button>
</div>

</div>
</div>
</div>
22 changes: 21 additions & 1 deletion demo/code-demo/docs.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
<div>
<div class="title">
<h2>Getting Started</h2>
</div>
<div>
Please visit our
<a href="https://docs.microsoft.com/en-us/azure/power-bi-embedded/power-bi-embedded-what-is-power-bi-embedded">documentation</a>
to start using Power BI Embedded.
</div>
</div>

<h2>Videos</h2>

<div>
<div class="title">
1. Learn how to Embed and Interact with Power BI Reports.
</div>
<iframe class="video" src="https://www.youtube.com/embed/nfkVljh_9O4" frameborder="0" allowfullscreen></iframe>
</div>
</div>

<div>
<div class="title">
2. Learn how to Create, Edit and Save Power BI reports in Embedded view.
</div>
<iframe class="video" src="https://www.youtube.com/embed/ibuN4DzCl5c?showinfo=0" frameborder="0" allowfullscreen></iframe>
</div>
11 changes: 6 additions & 5 deletions demo/code-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
<li id="top-sample" class="top-li-active" onclick="OpenSampleSection();">
<div><a href="#">Sample</a></div>
</li>
<li id="top-anyReport" class="top-li-active" onclick="OpenAnyReportSection();">
<div><a href="#">Any Report</a></div>
</li>
<li id="top-docs" onclick="OpenDocumentationSection();">
<div><a href="#">Documentation</a></div>
</li>
Expand All @@ -33,15 +36,13 @@

<div id="contentWrapper">
<div id ="sampleContent" class="content">

</div>
<div id ="documentationContent" class="content">

<div id ="documentationContent" class="content">
</div>
</div>

<div id="oldSample">
<a href="../static.html">Old Sample</a>
<div id ="anyReportContent" class="content">
</div>
</div>

<script src="../node_modules/jquery/dist/jquery.js"></script>
Expand Down
16 changes: 14 additions & 2 deletions demo/code-demo/scripts/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
var sampleContentLoaded = false;
var documentationContentLoaded = false;

var anyReportSectionLoaded = false;

$(function() {
OpenSampleSection();
});

function OpenSampleSection() {
OpenEmbedWorkspace("#top-sample", "step_authorize.html");
}

function OpenAnyReportSection() {
OpenEmbedWorkspace("#top-anyReport", "anyReport.html");
}

function OpenEmbedWorkspace(activeTabSelector, authStepHtml)
{
// Any report, uses the same settings as sample report. ony changes the auth step.
if (!sampleContentLoaded)
{
// Open Report Sample.
Expand All @@ -16,10 +26,12 @@ function OpenSampleSection() {
});
}

SetActiveStyle("#top-sample");
$("#authorize-step-wrapper").load(authStepHtml);
SetActiveStyle(activeTabSelector);

$(".content").hide();
$("#sampleContent").show();
OpenAuthStep();
}

function OpenDocumentationSection() {
Expand Down
55 changes: 0 additions & 55 deletions demo/code-demo/step_authorize.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,61 +9,6 @@ <h3>Sample Report</h3>
<button id="GoToEmbedStepButton" class="blueButton" onclick="OpenEmbedStepWithSample()">Embed sample report</button>
</div>
</div>

<hr />

<div id="userReport" class="line">
<div class="pageTitle">
<h3>Embed your own report</h3>
<h8>You can also embed your own report by following the instructions below.</h8>
</div>
<div class="settings">
<div id="EmbedWithSpecificReportDiv">
<div class="line">
<h5>Prerequisites</h5>
<ul>
<li>A workspace in the <a href="https://azure.microsoft.com/en-us/documentation/articles/power-bi-embedded-get-started/">Power BI embedded service.</a></li>
<li>Power BI report imported to your workspace.</li>
</ul>
</div>

<div class="line">
<h5>Instructions to generate an embed App Token</h5>
Once you have improted a report into Power BI workspace, you are ready to embed it.

To embed a report, you need to get an embed App Token. You can create this token in multiple ways.
<ul>
<li>Using <a href="https://github.com/Microsoft/PowerBI-cli">PowerBI-Cli</a> tool.</li>
<li>From .Net Code using <a href="http://www.nuget.org/packages/Microsoft.PowerBI.Core/">Microsoft.PowerBI.Core</a> package.</li>
<li>From NodeJS code using <a href="https://github.com/Microsoft/PowerBI-Node">powerbi-api</a> package.</li>
</ul>
</div>

<div id="authorizeParameterDiv" class="line">
<h5>Enter embed details</h5>

<table id="user-embed-details">
<tr>
<td class="td-field-name">Embed App Token</td>
<td><input type="text" id="auth_txtAccessToken" onchange="UpdateSession(this, SessionKeys.AccessToken);" /></td>
</tr>
<tr>
<td class="td-field-name">Embed URL</td>
<td>
<input type="text" id="auth_txtReportEmbed" onchange="UpdateSession(this, SessionKeys.EmbedUrl);" />
</td>
</tr>
<tr>
<td class="td-field-name">Report Id</td>
<td><input type="text" id="auth_txtEmbedReportId" onchange="UpdateSession(this, SessionKeys.EmbedId);"/></td>
</tr>
</table>
<button id="nextStep" class="blueButton" onclick="OpenEmbedStepFromUserSettings()">Next step - Embed</button>
</div>

</div>
</div>
</div>
</div>

<script>
Expand Down
10 changes: 10 additions & 0 deletions demo/code-demo/style/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ header
}
}

@media screen and (max-width: 500px) {
.top-ul li {
float: left;
margin-right: 15px;
text-align: center;
line-height: 22px;
font-size: 13px;
}
}

@media screen and (min-width: 321px) {
header
{
Expand Down
2 changes: 1 addition & 1 deletion dist/powerbi.js.map

Large diffs are not rendered by default.