Skip to content

Commit 6168413

Browse files
committed
Merged PR 20488: Live sample sdkV2 initial version
Live sample sdkV2 initial version TODO: - dahsboard url to get token. - Link to Old azure embed sample.
1 parent 58d74d2 commit 6168413

37 files changed

+7178
-4
lines changed

demo/v2-demo/anyReport.html

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<div id="userReport" class="line">
2+
<div class="pageTitle">
3+
<h3>Embed your own report</h3>
4+
<h8>You can also embed your own report by following the instructions below.</h8>
5+
</div>
6+
<div class="settings">
7+
<div id="EmbedWithSpecificReportDiv">
8+
<div class="line">
9+
<h5>Prerequisites:</h5>
10+
<ul>
11+
<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>
12+
<li>Power BI report imported to your workspace.</li>
13+
</ul>
14+
</div>
15+
16+
<div class="line">
17+
<h5>Instructions to generate an Embed Token</h5>
18+
Once you have imported a report into Power BI workspace, you are ready to embed it.
19+
20+
To embed a report, you need to get an Embed Token. You can create this token in multiple ways.
21+
<ul>
22+
<li>Using <a href="https://github.com/Microsoft/PowerBI-cli">PowerBI-Cli</a> tool.</li>
23+
<li>From .Net Code using <a href="http://www.nuget.org/packages/Microsoft.PowerBI.Core/">Microsoft.PowerBI.Core</a> package.</li>
24+
<li>From NodeJS code using <a href="https://github.com/Microsoft/PowerBI-Node">powerbi-api</a> package.</li>
25+
</ul>
26+
</div>
27+
28+
<div id="authorizeParameterDiv" class="line">
29+
<h5>Enter embed details:</h5>
30+
31+
<table id="user-embed-details">
32+
<tr>
33+
<td class="td-field-name">Embed Token</td>
34+
<td><input type="text" id="auth_txtAccessToken" onchange="UpdateSession(this, SessionKeys.AccessToken);" /></td>
35+
</tr>
36+
<tr>
37+
<td class="td-field-name">Embed URL</td>
38+
<td>
39+
<input type="text" id="auth_txtReportEmbed" onchange="UpdateSession(this, SessionKeys.EmbedUrl);" />
40+
</td>
41+
</tr>
42+
<tr>
43+
<td class="td-field-name">Report Id</td>
44+
<td><input type="text" id="auth_txtEmbedReportId" onchange="UpdateSession(this, SessionKeys.EmbedId);"/></td>
45+
</tr>
46+
</table>
47+
<button id="nextStep" class="blueButton" onclick="OpenEmbedStepFromUserSettings()">Next step - Embed</button>
48+
</div>
49+
50+
</div>
51+
</div>
52+
</div>

demo/v2-demo/code_area.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<div class="editorTitle">Code</div>
3+
<div class="textAreaControls">
4+
<button id="btnRunCode" class="textAreaControl">
5+
<img src="images\run.png" /> Run
6+
</button>
7+
<button id="btnCopyCode" class="textAreaControl" onclick="CopyCode();">
8+
<img src="images\copy.png" /> Copy
9+
</button>
10+
</div>
11+
12+
<div id="highlighter">
13+
</div>

demo/v2-demo/docs.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<div>
2+
<div class="title">
3+
<h2>Getting Started</h2>
4+
</div>
5+
<div>
6+
Please visit our
7+
<a href="https://docs.microsoft.com/en-us/azure/power-bi-embedded/power-bi-embedded-what-is-power-bi-embedded">documentation</a>
8+
to start using Power BI Embedded.
9+
</div>
10+
</div>
11+
12+
<h2>Videos</h2>
13+
14+
<div>
15+
<div class="title">
16+
1. Learn how to Embed and Interact with Power BI Reports.
17+
</div>
18+
<iframe class="video" src="https://www.youtube.com/embed/nfkVljh_9O4" frameborder="0" allowfullscreen></iframe>
19+
</div>
20+
21+
<div>
22+
<div class="title">
23+
2. Learn how to Create, Edit and Save Power BI reports in Embedded view.
24+
</div>
25+
<iframe class="video" src="https://www.youtube.com/embed/ibuN4DzCl5c?showinfo=0" frameborder="0" allowfullscreen></iframe>
26+
</div>

demo/v2-demo/images/arrow.png

602 Bytes
Loading
665 Bytes
Loading

demo/v2-demo/images/clear.png

1.27 KB
Loading

demo/v2-demo/images/copy.png

1.5 KB
Loading

demo/v2-demo/images/run.png

1.81 KB
Loading

demo/v2-demo/index.html

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
8+
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css" />
9+
<link type="text/css" rel="stylesheet" href="syntaxHighlighter/theme.css">
10+
<link rel="stylesheet" type="text/css" href="style/style.css">
11+
<link rel="stylesheet" type="text/css" href="style/layout.css">
12+
<link rel="stylesheet" type="text/css" href="style/syntaxHighlighterOverride.css">
13+
14+
</head>
15+
16+
<body>
17+
<header>
18+
<div id="navbar">
19+
<div class="logo-text">
20+
<div class="logo-text-span">Microsoft Power BI – Report Embed Sample</div>
21+
</div>
22+
<div id="top-nav-bar">
23+
<div id="top-ul-dev">
24+
<ul id="top-ul" class="top-ul">
25+
<li id="top-sample" class="top-li-active" onclick="OpenSampleSection();">
26+
<div><a href="#">Sample</a></div>
27+
</li>
28+
<li id="top-docs" onclick="OpenDocumentationSection();">
29+
<div><a href="#">Documentation</a></div>
30+
</li>
31+
</ul>
32+
</div>
33+
</div>
34+
</div>
35+
</header>
36+
37+
<div id="contentWrapper">
38+
<div id ="sampleContent" class="content">
39+
</div>
40+
41+
<div id ="documentationContent" class="content">
42+
</div>
43+
44+
<div id ="anyReportContent" class="content">
45+
</div>
46+
</div>
47+
48+
<script src="../node_modules/jquery/dist/jquery.js"></script>
49+
<script src="../node_modules/es6-promise/dist/es6-promise.js"></script>
50+
<script src="../node_modules/powerbi-client/dist/powerbi.js"></script>
51+
52+
<script src="scripts/codesamples.js"></script>
53+
54+
<script src="scripts/index.js"></script>
55+
<script src="scripts/utils.js"></script>
56+
<script src="scripts/logger.js"></script>
57+
<script src="scripts/session_utils.js"></script>
58+
<script src="scripts/function_mapping.js"></script>
59+
60+
<script src="scripts/report.js"></script>
61+
62+
<script src="scripts/step_authorize.js"></script>
63+
<script src="scripts/step_embed.js"></script>
64+
<script src="scripts/step_interact.js"></script>
65+
66+
</body>
67+
</html>

demo/v2-demo/log_window.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<div id="response" class="responseDiv">
2+
<div class="editorTitle">Log Viewer</div>
3+
<div class="textAreaControls">
4+
<button id="btnCopyResponse" class="textAreaControl" onclick="CopyResponseWindow();">
5+
<img src="images\copy.png"/> Copy
6+
</button>
7+
<button id="btnClearResponse" class="textAreaControl" onclick="ClearTextArea('#txtResponse');">
8+
<img src="images\clear.png"/> Clear
9+
</button>
10+
</div>
11+
<textarea id="txtResponse" class="responseTextArea" />
12+
</div>

0 commit comments

Comments
 (0)