Skip to content

Commit fd84fd8

Browse files
author
Shahak Yosef
committed
Merged PR 99762: Revert "[JS SDK]: Static Analysis CredScan warning fix"
This will break the workspace collection bug bash tool. I will move the access tokens to a one not so the static analysis will still pass Moved to One Note "Test users and tenants"
1 parent 3664aa1 commit fd84fd8

30 files changed

+6808
-0
lines changed

demo/code-demo/anyReport.html

+52
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/code-demo/code_area.html

+13
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/code-demo/docs.html

+26
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/code-demo/images/arrow.png

602 Bytes
Loading
665 Bytes
Loading

demo/code-demo/images/clear.png

1.27 KB
Loading

demo/code-demo/images/copy.png

1.5 KB
Loading

demo/code-demo/images/run.png

1.81 KB
Loading

demo/code-demo/index.html

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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-anyReport" class="top-li-active" onclick="OpenAnyReportSection();">
29+
<div><a href="#">Any Report</a></div>
30+
</li>
31+
<li id="top-docs" onclick="OpenDocumentationSection();">
32+
<div><a href="#">Documentation</a></div>
33+
</li>
34+
</ul>
35+
</div>
36+
</div>
37+
</div>
38+
</header>
39+
40+
<div id="contentWrapper">
41+
<div id ="sampleContent" class="content">
42+
</div>
43+
44+
<div id ="documentationContent" class="content">
45+
</div>
46+
47+
<div id ="anyReportContent" class="content">
48+
</div>
49+
</div>
50+
51+
<script src="../node_modules/jquery/dist/jquery.js"></script>
52+
<script src="../node_modules/es6-promise/dist/es6-promise.js"></script>
53+
<script src="../node_modules/powerbi-client/dist/powerbi.js"></script>
54+
55+
<script src="scripts/codesamples.js"></script>
56+
57+
<script src="scripts/index.js"></script>
58+
<script src="scripts/utils.js"></script>
59+
<script src="scripts/logger.js"></script>
60+
<script src="scripts/session_utils.js"></script>
61+
<script src="scripts/function_mapping.js"></script>
62+
63+
<script src="scripts/report.js"></script>
64+
65+
<script src="scripts/step_authorize.js"></script>
66+
<script src="scripts/step_embed.js"></script>
67+
<script src="scripts/step_interact.js"></script>
68+
69+
</body>
70+
</html>

demo/code-demo/log_window.html

+12
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"></textarea>
12+
</div>

demo/code-demo/report.html

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!DOCTYPE html>
2+
<div id="authorize-step-wrapper">
3+
</div>
4+
<div id="embed-and-interact-steps-wrapper">
5+
<div class="topPanel">
6+
<div id="settings"></div>
7+
<div id="embedCodeDiv"></div>
8+
<div id="logWindow"></div>
9+
</div>
10+
11+
<div class="bottomPanel">
12+
<div id="embedArea">
13+
<div class="editorTitle">
14+
<div class="editorTitleText">Embedded report</div>
15+
</div>
16+
<div id="reportContainer"></div>
17+
</div>
18+
</div>
19+
</div>
20+
21+
<script>
22+
$(document).ready(function() {
23+
$("#authorize-step-wrapper").load("step_authorize.html");
24+
25+
LoadLogWindow("#logWindow");
26+
27+
var modeUrlParam = GetParameterByName("mode");
28+
var mode = modeUrlParam ? modeUrlParam : "view";
29+
30+
if (GetParameterByName("embedUrl") || GetParameterByName("embedId") || GetParameterByName("accessToken"))
31+
{
32+
OpenEmbedStep(mode);
33+
}
34+
else
35+
{
36+
// Open Authorization Step after this page loads.
37+
OpenAuthStep();
38+
}
39+
40+
Log = InitLogger("txtResponse");
41+
});
42+
</script>

demo/code-demo/sample.html

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<div id="steps-nav-bar">
2+
<div id="steps-ul-dev">
3+
<ul id="steps-ul" class="steps-ul">
4+
<li id="steps-auth" class="steps-li-active" onclick="OpenAuthStep();">
5+
<div class="stepsButton">
6+
<a href="#">1. Authorize</a>
7+
</div>
8+
</li>
9+
<li id="steps-embed" onclick="OpenEmbedStep('view');">
10+
<div class="stepsButton">
11+
<a href="#">2. Embed</a>
12+
</div>
13+
</li>
14+
<li id="steps-interact" onclick="OpenInteractStep();">
15+
<div class="stepsButton">
16+
<a href="#">3. Interact</a>
17+
</div>
18+
</li>
19+
</ul>
20+
</div>
21+
</div>
22+
23+
<div id="mainContent">
24+
</div>

0 commit comments

Comments
 (0)