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"
This commit is contained in:
Shahak Yosef 2020-07-14 13:10:41 +00:00
Родитель 3664aa137a
Коммит fd84fd80fd
30 изменённых файлов: 6808 добавлений и 0 удалений

Просмотреть файл

@ -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 Token</h5>
Once you have imported a report into Power BI workspace, you are ready to embed it.
To embed a report, you need to get an Embed 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 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>

Просмотреть файл

@ -0,0 +1,13 @@
<!DOCTYPE html>
<div class="editorTitle">Code</div>
<div class="textAreaControls">
<button id="btnRunCode" class="textAreaControl">
<img src="images\run.png" /> Run
</button>
<button id="btnCopyCode" class="textAreaControl" onclick="CopyCode();">
<img src="images\copy.png" /> Copy
</button>
</div>
<div id="highlighter">
</div>

26
demo/code-demo/docs.html Normal file
Просмотреть файл

@ -0,0 +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 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>

Двоичные данные
demo/code-demo/images/arrow.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 602 B

Двоичные данные
demo/code-demo/images/arrow_flipped.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 665 B

Двоичные данные
demo/code-demo/images/clear.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Двоичные данные
demo/code-demo/images/copy.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.5 KiB

Двоичные данные
demo/code-demo/images/run.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.8 KiB

70
demo/code-demo/index.html Normal file
Просмотреть файл

@ -0,0 +1,70 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="syntaxHighlighter/theme.css">
<link rel="stylesheet" type="text/css" href="style/style.css">
<link rel="stylesheet" type="text/css" href="style/layout.css">
<link rel="stylesheet" type="text/css" href="style/syntaxHighlighterOverride.css">
</head>
<body>
<header>
<div id="navbar">
<div class="logo-text">
<div class="logo-text-span">Microsoft Power BI – Report Embed Sample</div>
</div>
<div id="top-nav-bar">
<div id="top-ul-dev">
<ul id="top-ul" class="top-ul">
<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>
</ul>
</div>
</div>
</div>
</header>
<div id="contentWrapper">
<div id ="sampleContent" class="content">
</div>
<div id ="documentationContent" class="content">
</div>
<div id ="anyReportContent" class="content">
</div>
</div>
<script src="../node_modules/jquery/dist/jquery.js"></script>
<script src="../node_modules/es6-promise/dist/es6-promise.js"></script>
<script src="../node_modules/powerbi-client/dist/powerbi.js"></script>
<script src="scripts/codesamples.js"></script>
<script src="scripts/index.js"></script>
<script src="scripts/utils.js"></script>
<script src="scripts/logger.js"></script>
<script src="scripts/session_utils.js"></script>
<script src="scripts/function_mapping.js"></script>
<script src="scripts/report.js"></script>
<script src="scripts/step_authorize.js"></script>
<script src="scripts/step_embed.js"></script>
<script src="scripts/step_interact.js"></script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,12 @@
<div id="response" class="responseDiv">
<div class="editorTitle">Log Viewer</div>
<div class="textAreaControls">
<button id="btnCopyResponse" class="textAreaControl" onclick="CopyResponseWindow();">
<img src="images\copy.png"/> Copy
</button>
<button id="btnClearResponse" class="textAreaControl" onclick="ClearTextArea('#txtResponse');">
<img src="images\clear.png"/> Clear
</button>
</div>
<textarea id="txtResponse" class="responseTextArea"></textarea>
</div>

Просмотреть файл

@ -0,0 +1,42 @@
<!DOCTYPE html>
<div id="authorize-step-wrapper">
</div>
<div id="embed-and-interact-steps-wrapper">
<div class="topPanel">
<div id="settings"></div>
<div id="embedCodeDiv"></div>
<div id="logWindow"></div>
</div>
<div class="bottomPanel">
<div id="embedArea">
<div class="editorTitle">
<div class="editorTitleText">Embedded report</div>
</div>
<div id="reportContainer"></div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
$("#authorize-step-wrapper").load("step_authorize.html");
LoadLogWindow("#logWindow");
var modeUrlParam = GetParameterByName("mode");
var mode = modeUrlParam ? modeUrlParam : "view";
if (GetParameterByName("embedUrl") || GetParameterByName("embedId") || GetParameterByName("accessToken"))
{
OpenEmbedStep(mode);
}
else
{
// Open Authorization Step after this page loads.
OpenAuthStep();
}
Log = InitLogger("txtResponse");
});
</script>

Просмотреть файл

@ -0,0 +1,24 @@
<div id="steps-nav-bar">
<div id="steps-ul-dev">
<ul id="steps-ul" class="steps-ul">
<li id="steps-auth" class="steps-li-active" onclick="OpenAuthStep();">
<div class="stepsButton">
<a href="#">1. Authorize</a>
</div>
</li>
<li id="steps-embed" onclick="OpenEmbedStep('view');">
<div class="stepsButton">
<a href="#">2. Embed</a>
</div>
</li>
<li id="steps-interact" onclick="OpenInteractStep();">
<div class="stepsButton">
<a href="#">3. Interact</a>
</div>
</li>
</ul>
</div>
</div>
<div id="mainContent">
</div>

Просмотреть файл

@ -0,0 +1,765 @@
/*
This file contains the code samples which will appear live in the web-page.
Each sample method name starts with _Report_ or _Page or _Embed depends on which section it appears.
Please keep this.
*/
// ---- Embed Code ----------------------------------------------------
function _Embed_BasicEmbed() {
// Read embed application token from textbox
var txtAccessToken = $('#txtAccessToken').val();
// Read embed URL from textbox
var txtEmbedUrl = $('#txtReportEmbed').val();
// Read report Id from textbox
var txtEmbedReportId = $('#txtEmbedReportId').val();
// Get models. models contains enums that can be used.
var models = window['powerbi-client'].models;
// We give All permissions to demonstrate switching between View and Edit mode and saving report.
var permissions = models.Permissions.All;
// Embed configuration used to describe the what and how to embed.
// This object is used when calling powerbi.embed.
// This also includes settings and options such as filters.
// You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
var config= {
type: 'report',
accessToken: txtAccessToken,
embedUrl: txtEmbedUrl,
id: txtEmbedReportId,
permissions: permissions,
settings: {
filterPaneEnabled: true,
navContentPaneEnabled: true
}
};
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Embed the report and display it within the div container.
var report = powerbi.embed(reportContainer, config);
// Report.off removes a given event handler if it exists.
report.off("loaded");
// Report.on will add an event handler which prints to Log window.
report.on("loaded", function() {
Log.logText("Loaded");
});
report.on("error", function(event) {
Log.log(event.detail);
report.off("error");
});
report.off("saved");
report.on("saved", function(event) {
Log.log(event.detail);
if(event.detail.saveAs) {
Log.logText('In order to interact with the new report, create a new token and load the new report');
}
});
}
function _Mock_Embed_BasicEmbed(isEdit) {
// Read embed application token from textbox
var txtAccessToken = $('#txtAccessToken').val();
// Read embed URL from textbox
var txtEmbedUrl = $('#txtReportEmbed').val();
// Read report Id from textbox
var txtEmbedReportId = $('#txtEmbedReportId').val();
// Get models. models contains enums that can be used.
var models = window['powerbi-client'].models;
var permissions = models.Permissions.Copy | models.Permissions.Read;
var viewMode = isEdit ? models.ViewMode.Edit : models.ViewMode.View;
// Embed configuration used to describe the what and how to embed.
// This object is used when calling powerbi.embed.
// This also includes settings and options such as filters.
// You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
var config= {
type: 'report',
accessToken: txtAccessToken,
embedUrl: txtEmbedUrl,
id: txtEmbedReportId,
permissions: permissions,
viewMode: viewMode,
settings: {
filterPaneEnabled: true,
navContentPaneEnabled: true,
useCustomSaveAsDialog: true
}
};
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Embed the report and display it within the div container.
var report = powerbi.embed(reportContainer, config);
// Report.off removes a given event handler if it exists.
report.off("loaded");
// Report.on will add an event handler which prints to Log window.
report.on("loaded", function() {
Log.logText("Loaded");
});
report.on("saveAsTriggered", function() {
Log.logText("Cannot save sample report");
});
report.off("error");
report.on("error", function(event) {
Log.log(event.detail);
});
report.off("saved");
report.on("saved", function(event) {
Log.log(event.detail);
if(event.detail.saveAs) {
Log.logText('In order to interact with the new report, create a new token and load the new report');
}
});
}
function _Mock_Embed_BasicEmbed_EditMode() {
_Mock_Embed_BasicEmbed(true);
}
function _Mock_Embed_BasicEmbed_ViewMode() {
_Mock_Embed_BasicEmbed(false);
}
function _Embed_BasicEmbed_EditMode() {
// Read embed application token from textbox
var txtAccessToken = $('#txtAccessToken').val();
// Read embed URL from textbox
var txtEmbedUrl = $('#txtReportEmbed').val();
// Read report Id from textbox
var txtEmbedReportId = $('#txtEmbedReportId').val();
// Get models. models contains enums that can be used.
var models = window['powerbi-client'].models;
// Embed configuration used to describe the what and how to embed.
// This object is used when calling powerbi.embed.
// This also includes settings and options such as filters.
// You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
var config= {
type: 'report',
accessToken: txtAccessToken,
embedUrl: txtEmbedUrl,
id: txtEmbedReportId,
permissions: models.Permissions.All /*gives maximum permissions*/,
viewMode: models.ViewMode.Edit,
settings: {
filterPaneEnabled: true,
navContentPaneEnabled: true
}
};
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Embed the report and display it within the div container.
var report = powerbi.embed(reportContainer, config);
// Report.off removes a given event handler if it exists.
report.off("loaded");
// Report.on will add an event handler which prints to Log window.
report.on("loaded", function() {
Log.logText("Loaded");
});
report.off("error");
report.on("error", function(event) {
Log.log(event.detail);
});
report.off("saved");
report.on("saved", function(event) {
Log.log(event.detail);
if(event.detail.saveAs) {
Log.logText('In order to interact with the new report, create a new token and load the new report');
}
});
}
function _Embed_EmbedWithDefaultFilter() {
var txtAccessToken = $('#txtAccessToken').val();
var txtEmbedUrl = $('#txtReportEmbed').val();
var txtEmbedReportId = $('#txtEmbedReportId').val();
const filter = {
$schema: "http://powerbi.com/product/schema#basic",
target: {
table: "Store",
column: "Chain"
},
operator: "In",
values: ["Lindseys"]
};
var embedConfiguration = {
type: 'report',
accessToken: txtAccessToken,
embedUrl: txtEmbedUrl,
id: txtEmbedReportId,
settings: {
filterPaneEnabled: false,
navContentPaneEnabled: false
},
filters: [filter]
};
var reportContainer = document.getElementById('reportContainer');
powerbi.embed(reportContainer, embedConfiguration);
}
function _Embed_Create() {
// Read embed application token from textbox
var txtAccessToken = $('#txtCreateAccessToken').val();
// Read embed URL from textbox
var txtEmbedUrl = $('#txtCreateReportEmbed').val();
// Read dataset Id from textbox
var txtEmbedDatasetId = $('#txtEmbedDatasetId').val();
// Embed create configuration used to describe the what and how to create report.
// This object is used when calling powerbi.createReport.
var embedCreateConfiguration = {
accessToken: txtAccessToken,
embedUrl: txtEmbedUrl,
datasetId: txtEmbedDatasetId,
};
// Grab the reference to the div HTML element that will host the report
var reportContainer = $('#reportContainer')[0];
// Create report
var report = powerbi.createReport(reportContainer, embedCreateConfiguration);
// Report.off removes a given event handler if it exists.
report.off("loaded");
// Report.on will add an event handler which prints to Log window.
report.on("loaded", function() {
Log.logText("Loaded");
});
report.off("error");
report.on("error", function(event) {
Log.log(event.detail);
});
// report.off removes a given event handler if it exists.
report.off("saved");
report.on("saved", function(event) {
Log.log(event.detail);
Log.logText('In order to interact with the new report, create a new token and load the new report');
});
}
function _Mock_Embed_Create() {
// Read embed application token from textbox
var txtAccessToken = $('#txtCreateAccessToken').val();
// Read embed URL from textbox
var txtEmbedUrl = $('#txtCreateReportEmbed').val();
// Read dataset Id from textbox
var txtEmbedDatasetId = $('#txtEmbedDatasetId').val();
// Embed create configuration used to describe the what and how to create report.
// This object is used when calling powerbi.createReport.
var embedCreateConfiguration = {
accessToken: txtAccessToken,
embedUrl: txtEmbedUrl,
datasetId: txtEmbedDatasetId,
settings: {
useCustomSaveAsDialog: true
}
};
// Grab the reference to the div HTML element that will host the report
var reportContainer = $('#reportContainer')[0];
// Create report
var report = powerbi.createReport(reportContainer, embedCreateConfiguration);
// Report.off removes a given event handler if it exists.
report.off("loaded");
// Report.on will add an event handler which prints to Log window.
report.on("loaded", function() {
Log.logText("Loaded");
});
report.on("saveAsTriggered", function() {
Log.logText("Cannot save sample report");
});
report.off("error");
report.on("error", function(event) {
Log.log(event.detail);
});
}
// ---- Report Operations ----------------------------------------------------
function _Report_GetId() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Retrieve the report id.
var reportId = report.getId();
Log.logText(reportId);
}
function _Report_UpdateSettings() {
// The new settings that you want to apply to the report.
const newSettings = {
navContentPaneEnabled: true,
filterPaneEnabled: false
};
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Update the settings by passing in the new settings you have configured.
report.updateSettings(newSettings)
.then(function (result) {
$("#result").html(result);
})
.catch(function (error) {
$("#result").html(error);
});
}
function _Report_GetPages() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Retrieve the page collection and loop through to collect the
// page name and display name of each page and display the value.
report.getPages()
.then(function (pages) {
pages.forEach(function(page) {
var log = page.name + " - " + page.displayName;
Log.logText(log);
});
})
.catch(function (error) {
Log.log(error);
});
}
function _Report_SetPage() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// setPage will change the selected view to the page you indicate.
// This is the actual page name not the display name.
report.setPage("ReportSection2")
.then(function (result) {
Log.log(result);
})
.catch(function (errors) {
Log.log(errors);
});
// Report.off removes a given event handler if it exists.
report.off("pageChanged");
// Report.on will add an event handler which prints page
// name and display name to Log window.
report.on("pageChanged", function(event) {
var page = event.detail.newPage;
Log.logText(page.name + " - " + page.displayName);
});
}
function _Report_GetFilters() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Get the filters applied to the report.
report.getFilters()
.then(function (filters) {
Log.log(filters);
})
.catch(function (errors) {
Log.log(errors);
});
}
function _Report_SetFilters() {
// Build the filter you want to use. For more information, See Constructing
// Filters in https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters.
const filter = {
$schema: "http://powerbi.com/product/schema#basic",
target: {
table: "Store",
column: "Chain"
},
operator: "In",
values: ["Lindseys"]
};
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Set the filter for the report.
// Pay attention that setFilters receives an array.
report.setFilters([filter])
.then(function (result) {
Log.log(result);
})
.catch(function (errors) {
Log.log(errors);
});
}
function _Report_RemoveFilters() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Remove the filters currently applied to the report.
report.removeFilters()
.then(function (result) {
Log.log(result);
})
.catch(function (errors) {
Log.log(errors);
});
}
function _Report_PrintCurrentReport() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Trigger the print dialog for your browser.
report.print()
.then(function (result) {
Log.log(result);
})
.catch(function (errors) {
Log.log(errors);
});
}
function _Report_Reload() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Reload the displayed report
report.reload()
.then(function (result) {
Log.logText("Reloaded");
})
.catch(function (errors) {
Log.log(errors);
});
}
function _Report_Refresh() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Refresh the displayed report
report.refresh()
.then(function (result) {
Log.logText("Refreshed");
})
.catch(function (errors) {
Log.log(errors);
});
}
function _Report_FullScreen() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Displays the report in full screen mode.
report.fullscreen();
}
function _Report_ExitFullScreen() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Exits full screen mode.
report.exitFullscreen();
}
function _Report_switchModeEdit() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Switch to edit mode.
report.switchMode("edit");
}
function _Report_switchModeView() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Switch to view mode.
report.switchMode("view");
}
function _Report_save() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Save report
report.save();
}
function _Mock_Report_save() {
Log.logText('Cannot save sample report');
}
function _Report_saveAs() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
var saveAsParameters = {
name: "newReport"
};
// SaveAs report
report.saveAs(saveAsParameters);
}
// ---- Page Operations ----------------------------------------------------
function _Page_SetActive() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Retrieve the page collection, and then set the second page to be active.
report.getPages()
.then(function (pages) {
pages[1].setActive().then(function (result) {
Log.log(result);
});
})
.catch(function (errors) {
Log.log(errors);
});
}
function _Page_GetFilters() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Retrieve the page collection and get the filters for the first page.
report.getPages()
.then(function (pages) {
pages[0].getFilters()
.then(function (filters) {
Log.log(filters);
})
.catch(function (errors) {
Log.log(errors);
});
})
.catch(function (errors) {
Log.log(errors);
});
}
function _Page_SetFilters() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Build the filter you want to use. For more information, see Constructing
// Filters in https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters.
const filter = {
$schema: "http://powerbi.com/product/schema#basic",
target: {
table: "Store",
column: "Chain"
},
operator: "In",
values: ["Lindseys"]
};
// Retrieve the page collection and then set the filters for the first page.
// Pay attention that setFilters receives an array.
report.getPages()
.then(function (pages) {
pages[0].setFilters([filter])
.then(function (result) {
Log.log(result);
})
.catch(function (errors) {
Log.log(errors);
});
})
.catch(function (errors) {
Log.log(errors);
});
}
function _Page_RemoveFilters() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Retrieve the page collection and remove the filters for the first page.
report.getPages()
.then(function (pages) {
pages[0].removeFilters()
.then(function (result) {
Log.log(result);
})
.catch(function (errors) {
Log.log(errors);
});
})
.catch(function (errors) {
Log.log(errors);
});
}
// ---- Event Listener ----------------------------------------------------
function _Events_PageChanged() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Report.off removes a given event listener if it exists.
report.off("pageChanged");
// Report.on will add an event listener.
report.on("pageChanged", function(event) {
var page = event.detail.newPage;
Log.logText("Page changed to: " + page.name + " - " + page.displayName);
});
// Select Run and change to a different page.
// You should see an entry in the Log window.
Log.logText("Select different page to see events in Log window.");
}
function _Events_DataSelected() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Report.off removes a given event listener if it exists.
report.off("dataSelected");
// Report.on will add an event listener.
report.on("dataSelected", function(event) {
var data = event.detail;
Log.log(data);
});
// Select Run and select an element of a visualization.
// For example, a bar in a bar chart. You should see an entry in the Log window.
Log.logText("Select data to see events in Log window.");
}
function _Events_SaveAsTriggered() {
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
// Report.off removes a given event listener if it exists.
report.off("saveAsTriggered");
// Report.on will add an event listener.
report.on("saveAsTriggered", function(event) {
Log.log(event);
});
// Select Run and then select SaveAs.
// You should see an entry in the Log window.
Log.logText("Select SaveAs to see events in Log window.");
}

Просмотреть файл

@ -0,0 +1,75 @@
const mockDict = {
_Report_GetPages: datasetNotSupported,
_Report_SetPage: datasetNotSupported,
_Report_SetFilters: datasetNotSupported,
_Report_GetFilters: datasetNotSupported,
_Report_RemoveFilters: datasetNotSupported,
_Report_PrintCurrentReport: datasetNotSupported,
_Report_UpdateSettings: datasetNotSupported,
_Report_Reload: datasetNotSupported,
_Page_SetActive: datasetNotSupported,
_Page_SetFilters: datasetNotSupported,
_Page_GetFilters: datasetNotSupported,
_Page_RemoveFilters: datasetNotSupported,
_Report_switchModeEdit: datasetNotSupported,
_Report_switchModeView: datasetNotSupported,
_Embed_BasicEmbed: _Mock_Embed_BasicEmbed_ViewMode,
_Embed_BasicEmbed_EditMode: _Mock_Embed_BasicEmbed_EditMode,
_Report_save: _Mock_Report_save,
_Report_saveAs: _Mock_Report_save,
_Embed_Create: _Mock_Embed_Create
};
function datasetNotSupported() {
Log.logText('Operation not supported for dataset')
}
function IsSaveMock(funcName) {
return ((funcName === '_Report_save' || funcName === '_Report_saveAs') && (
_session.embedId === 'c52af8ab-0468-4165-92af-dc39858d66ad' /*Sample Report*/ ||
_session.embedId === '1ee0b264-b280-43f1-bbb7-9d8bd2d03a78' /*Sample dataset*/ ));
}
function IsBasicMock(funcName) {
return ((funcName === '_Embed_BasicEmbed' || funcName === '_Embed_BasicEmbed_EditMode') && _session.embedId === 'c52af8ab-0468-4165-92af-dc39858d66ad');
}
function IsCreateMock(funcName) {
return (funcName === '_Embed_Create' && _session.embedId === '1ee0b264-b280-43f1-bbb7-9d8bd2d03a78');
}
function IsNotSupported(funcName) {
if (powerbi.embeds.length === 0) {
return false
}
// Get a reference to the embedded element
var embed = powerbi.get($('#reportContainer')[0]);
if (embed.config.type !== 'create') {
return false;
}
var runFunc = mockDict[funcName];
return (runFunc && runFunc === datasetNotSupported) ? true : false;
}
function IsMock(funcName) {
return (IsBasicMock(funcName) || IsSaveMock(funcName) || IsCreateMock(funcName) || IsNotSupported(funcName));
}
function mapFunc(func) {
var funcName = getFuncName(func);
return IsMock(funcName) ? mockDict[funcName] : func;
}
function getFuncName(func) {
var funcName = func.name;
if (!funcName)
{
// in IE, func.name is invalid method. so, function name should be extracted manually.
funcName = func.toString().match(/^function\s*([^\s(]+)/)[1];
}
return funcName;
}

Просмотреть файл

@ -0,0 +1,54 @@
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.
$("#sampleContent").load("sample.html", function() {
$("#mainContent").load("report.html");
sampleContentLoaded = true;
});
}
$("#authorize-step-wrapper").load(authStepHtml);
SetActiveStyle(activeTabSelector);
$(".content").hide();
$("#sampleContent").show();
OpenAuthStep();
}
function OpenDocumentationSection() {
if (!documentationContentLoaded)
{
$("#documentationContent").load("docs.html");
documentationContentLoaded = true;
}
SetActiveStyle("#top-docs");
$(".content").hide();
$("#documentationContent").show();
}
function SetActiveStyle(id)
{
$("#top-ul li").removeClass("top-li-active");
$(id).addClass("top-li-active");
}

Просмотреть файл

@ -0,0 +1,23 @@
function InitLogger(divId) {
var Logger = {};
Logger.log = function name(event) {
this.logText("Json Object\n" + JSON.stringify(event, null, " "));
};
Logger.logText = function name(text) {
var textbox = document.getElementById(divId);
if (!textbox.value)
{
textbox.value = "";
}
textbox.value += "> " + text + "\n";
textbox.scrollTop = textbox.scrollHeight;
};
return Logger;
}

Просмотреть файл

@ -0,0 +1,132 @@
const active_class = 'active';
const active_li = 'steps-li-active';
const EmbedViewMode = "view";
const EmbedEditMode = "edit";
const EmbedCreateMode = "create";
function OpenAuthStep() {
$('#steps-ul a').removeClass(active_class);
$(".steps-li-active").removeClass(active_li);
$("#steps-auth a").addClass(active_class);
$("#steps-auth").addClass(active_li);
// Hide Embed view in authorization step.
$("#authorize-step-wrapper").show();
$("#embed-and-interact-steps-wrapper").hide();
}
function OpenEmbedStep(mode) {
$('#steps-ul a').removeClass(active_class);
$(".steps-li-active").removeClass(active_li);
$('#steps-embed a').addClass(active_class);
$('#steps-embed').addClass(active_li);
// Hide Embed view in authorization step.
$("#authorize-step-wrapper").hide();
$("#embed-and-interact-steps-wrapper").show();
$("#settings").load("settings_embed.html", function() {
OpenEmbedMode(mode);
// Fix report size ratio
var reportContainer = $("#reportContainer");
reportContainer.height(reportContainer.width() * 0.59);
});
}
function OpenInteractStep() {
$('#steps-ul a').removeClass(active_class);
$(".steps-li-active").removeClass(active_li);
$('#steps-interact a').addClass(active_class);
$('#steps-interact').addClass(active_li);
// Hide Embed view in authorization step.
$("#authorize-step-wrapper").hide();
$("#embed-and-interact-steps-wrapper").show();
$("#settings").load("settings_interact.html", function() {
SetToggleHandler("report-operations-div");
SetToggleHandler("page-operations-div");
SetToggleHandler("events-operations-div");
SetToggleHandler("editandsave-operations-div");
LoadCodeArea("#embedCodeDiv", _Report_GetId);
});
}
function setCodeArea(mode)
{
if (mode === EmbedViewMode)
{
LoadCodeArea("#embedCodeDiv", _Embed_BasicEmbed);
}
else if (mode === EmbedEditMode)
{
LoadCodeArea("#embedCodeDiv", _Embed_BasicEmbed_EditMode);
}
else if (mode === EmbedCreateMode)
{
LoadCodeArea("#embedCodeDiv", _Embed_Create);
}
}
function showEmbedSettings(mode)
{
var inputDivToShow = "#embedModeInput";
var inputDivToHide = "#createModeInput";
if (mode === EmbedCreateMode)
{
inputDivToShow = "#createModeInput";
inputDivToHide = "#embedModeInput";
}
$(inputDivToShow).show();
$(inputDivToHide).hide();
var embedModeRadios = $('input:radio[name=embedMode]');
embedModeRadios.filter('[value='+ mode + ']').prop('checked', true);
}
function OpenEmbedMode(mode)
{
if (mode == EmbedCreateMode)
{
if (IsEmbeddingSampleReport())
{
LoadSampleDatasetIntoSession();
}
SetTextBoxesFromSessionOrUrlParam("#txtCreateAccessToken", "#txtCreateReportEmbed", "#txtEmbedDatasetId");
}
else {
if (IsEmbeddingSampleReport())
{
LoadSampleReportIntoSession();
}
SetTextBoxesFromSessionOrUrlParam("#txtAccessToken", "#txtReportEmbed", "#txtEmbedReportId");
}
setCodeArea(mode);
showEmbedSettings(mode);
}
function OpenViewMode() {
OpenEmbedMode(EmbedViewMode);
}
function OpenEditMode() {
OpenEmbedMode(EmbedEditMode);
}
function OpenCreateMode() {
OpenEmbedMode(EmbedCreateMode);
}
function IsEmbeddingSampleReport() {
return GetSession(SessionKeys.IsSampleReport) == true;
}

Просмотреть файл

@ -0,0 +1,76 @@
var _session = {};
const SessionKeys = {
AccessToken : "accessToken",
EmbedUrl : "embedUrl",
EmbedId : "embedId",
GroupId : "groupId",
IsSampleReport: "isSampleReport",
QnaQuestion: "qnaQuestion",
EntityIsAlreadyEmbedded: "EntityIsAlreadyEmbedded",
};
function GetParameterByName(name, url) {
if (!url) {
url = window.location.href;
}
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
function SetSession(key, value) {
// This is a temporal solution for session (which is cleared on reload). Should be replaced with a real session.
_session[key] = value;
}
function GetSession(key) {
// This is a temporal solution for session (which is cleared on reload). Should be replaced with a real session.
return _session[key];
}
function UpdateSession(button, sessionKey) {
var value = $(button).val();
if (value)
{
SetSession(sessionKey, value);
}
}
function SetTextBoxesFromSessionOrUrlParam(accessTokenSelector, embedUrlSelector, embedIdSelector) {
var accessToken = GetParameterByName(SessionKeys.AccessToken);
if (!accessToken)
{
accessToken = GetSession(SessionKeys.AccessToken);
}
var embedUrl = GetParameterByName(SessionKeys.EmbedUrl);
if (!embedUrl)
{
embedUrl = GetSession(SessionKeys.EmbedUrl);
} else {
var groupId = GetParameterByName(SessionKeys.GroupId);
if(groupId)
{
if (embedUrl.indexOf("?") != -1)
{
embedUrl += "&groupId=" + groupId;
} else {
embedUrl += "?groupId=" + groupId;
}
}
}
var embedId = GetParameterByName(SessionKeys.EmbedId);
if (!embedId)
{
embedId = GetSession(SessionKeys.EmbedId);
}
$(accessTokenSelector).val(accessToken);
$(embedUrlSelector).val(embedUrl);
$(embedIdSelector).val(embedId);
}

Просмотреть файл

@ -0,0 +1,41 @@
const SampleReport = {
AccessToken : "",
EmbedUrl : "https://embedded.powerbi.com/appTokenReportEmbed?reportId=c52af8ab-0468-4165-92af-dc39858d66ad",
EmbedId : "c52af8ab-0468-4165-92af-dc39858d66ad"
};
const SampleDataset = {
AccessToken : "",
EmbedUrl : "https://embedded.powerbi.com/appTokenReportEmbed",
EmbedId : "1ee0b264-b280-43f1-bbb7-9d8bd2d03a78"
};
function LoadSampleReportIntoSession() {
setSession(SampleReport.AccessToken, SampleReport.EmbedUrl, SampleReport.EmbedId);
}
function LoadSampleDatasetIntoSession() {
setSession(SampleDataset.AccessToken, SampleDataset.EmbedUrl, SampleDataset.EmbedId);
}
function OpenEmbedStepWithSample() {
SetSession(SessionKeys.IsSampleReport, true);
OpenEmbedStep(EmbedViewMode);
}
function OpenEmbedStepCreateWithSample() {
SetSession(SessionKeys.IsSampleReport, true);
OpenEmbedStep(EmbedCreateMode);
}
function OpenEmbedStepFromUserSettings() {
SetSession(SessionKeys.IsSampleReport, false);
OpenEmbedStep(EmbedViewMode);
}
function setSession(accessToken, embedUrl, embedId)
{
SetSession(SessionKeys.AccessToken, accessToken);
SetSession(SessionKeys.EmbedUrl, embedUrl);
SetSession(SessionKeys.EmbedId, embedId);
}

Просмотреть файл

@ -0,0 +1,98 @@
// ---- Report Operations ----------------------------------------------------
function Report_GetId() {
SetCode(_Report_GetId);
}
function Report_UpdateSettings() {
SetCode(_Report_UpdateSettings);
}
function Report_GetPages() {
SetCode(_Report_GetPages);
}
function Report_SetPage() {
SetCode(_Report_SetPage);
}
function Report_GetFilters() {
SetCode(_Report_GetFilters);
}
function Report_SetFilters() {
SetCode(_Report_SetFilters);
}
function Report_RemoveFilters() {
SetCode(_Report_RemoveFilters);
}
function Report_PrintCurrentReport() {
SetCode(_Report_PrintCurrentReport);
}
function Report_Reload() {
SetCode(_Report_Reload);
}
function Report_Refresh() {
SetCode(_Report_Refresh);
}
function Report_FullScreen() {
SetCode(_Report_FullScreen);
}
function Report_ExitFullScreen() {
SetCode(_Report_ExitFullScreen);
}
// ---- Page Operations ----------------------------------------------------
function Page_SetActive() {
SetCode(_Page_SetActive);
}
function Page_GetFilters() {
SetCode(_Page_GetFilters);
}
function Page_SetFilters() {
SetCode(_Page_SetFilters);
}
function Page_RemoveFilters() {
SetCode(_Page_RemoveFilters);
}
// ---- Event Listener ----------------------------------------------------
function Events_PageChanged() {
SetCode(_Events_PageChanged);
}
function Events_DataSelected() {
SetCode(_Events_DataSelected);
}
function Events_SaveAsTriggered() {
SetCode(_Events_SaveAsTriggered);
}
// ---- Edit and Save Operations ----------------------------------------------------
function Report_switchModeEdit() {
SetCode(_Report_switchModeEdit);
}
function Report_switchModeView() {
SetCode(_Report_switchModeView);
}
function Report_save() {
SetCode(_Report_save);
}
function Report_saveAs() {
SetCode(_Report_saveAs);
}

Просмотреть файл

@ -0,0 +1,73 @@
function OpenReportOperations() {
$("#report-operations-div").show();
$("#page-operations-div").hide();
$("#events-operations-div").hide();
$("#editandsave-operations-div").hide();
$("#report-operations-li").addClass('active');
$('#page-operations-li').removeClass('active');
$('#events-operations-li').removeClass('active');
$('#editandsave-operations-li').removeClass('active');
$("#report-operations-div .function-ul li.active").click()
$("#selected-catogory-button").html("Report operations");
}
function OpenPageOperations() {
$("#page-operations-div").show();
$("#report-operations-div").hide();
$("#events-operations-div").hide();
$("#editandsave-operations-div").hide();
$("#page-operations-li").addClass('active');
$('#report-operations-li').removeClass('active');
$('#events-operations-li').removeClass('active');
$('#editandsave-operations-li').removeClass('active');
$("#page-operations-div .function-ul li.active").click();
$("#selected-catogory-button").html("Page operations");
}
function OpenEventOperations() {
$("#page-operations-div").hide();
$("#report-operations-div").hide();
$("#events-operations-div").show();
$("#editandsave-operations-div").hide();
$("#page-operations-li").removeClass('active');
$('#report-operations-li').removeClass('active');
$('#events-operations-li').addClass('active');
$('#editandsave-operations-li').removeClass('active');
$("#events-operations-div .function-ul li.active").click();
$("#selected-catogory-button").html("Events Listener");
}
function OpenEditAndSaveOperations() {
$("#page-operations-div").hide();
$("#report-operations-div").hide();
$("#events-operations-div").hide();
$("#editandsave-operations-div").show();
$("#page-operations-li").removeClass('active');
$('#report-operations-li').removeClass('active');
$('#events-operations-li').removeClass('active');
$('#editandsave-operations-li').addClass('active');
$("#editandsave-operations-div .function-ul li.active").click();
$("#selected-catogory-button").html("Edit and save operations");
}
function SetToggleHandler(devId) {
var selector = "#" + devId + " .function-ul li";
$(selector).each(function(index, li) {
$(li).click(function() {
$(selector).removeClass('active');
$(li).addClass('active');
});
});
}

Просмотреть файл

@ -0,0 +1,82 @@
function ValidateEmbedUrl(embedUrl) {
var embedUrl = $('#txtReportEmbed').val();
if (!embedUrl)
{
alert("You must specify an embed url.");
return false;
}
var id = null;
var parts = embedUrl.split("reportId=");
if (parts && parts.length > 0)
{
var guidParts = parts[parts.length -1].split("&");
if (guidParts && guidParts.length > 0)
{
id = guidParts[0];
}
}
if (!id)
{
alert("Could not find report ID in url");
return false;
}
return true;
}
function BodyCodeOfFunction(func) {
var lines = func.toString().split('\n');
lines = lines.slice(1, lines.length-1);
for (var i = 0; i < lines.length; ++i)
{
// remove trailing spaces.
lines[i] = lines[i].substring(4);
}
return lines.join('\n');
}
function LoadCodeArea(divSelector, initialFunctionCode) {
$(divSelector).load("code_area.html", function() {
SetCode(initialFunctionCode);
});
}
function LoadLogWindow(divSelector) {
$(divSelector).load("log_window.html");
}
function SetCode(func) {
var codeHtml = '<pre id="txtCode" class="brush: js; gutter: false;">';
codeHtml = codeHtml + BodyCodeOfFunction(func) + '</pre><script type="text/javascript" src="syntaxHighlighter/syntaxhighlighter.js"></script>';
$("#highlighter").html(codeHtml);
var runFunc = mapFunc(func);
$('#btnRunCode').off('click');
$('#btnRunCode').click(runFunc);
}
function CopyCode() {
CopyTextArea("#txtCode", "#btnRunCopyCode");
}
function CopyResponseWindow() {
CopyTextArea("#txtResponse", "#btnCopyResponse");
}
function CopyTextArea(textAreaSelector, buttonSelector) {
$(textAreaSelector).select();
document.execCommand('copy');
window.getSelection().removeAllRanges();
// Set focus on copy button - this will deselect text in copied area.
$(buttonSelector).focus();
}
function ClearTextArea(textAreaSelector) {
$(textAreaSelector).val("");
}

Просмотреть файл

@ -0,0 +1,50 @@
<div id="report-embed-table">
<div class="pageTitle">
<h4>Embed Report</h4>
</div>
<h8>Select mode to embed your report in:</h8>
<div class="spacer"></div>
<div id="modeSelector">
<div onclick="OpenViewMode();"><input type="radio" name="embedMode" value="view" checked="checked"> View mode </input></div>
<div onclick="OpenEditMode();"><input type="radio" name="embedMode" value="edit"> Edit mode</input></div>
<div onclick="OpenCreateMode();"><input type="radio" name="embedMode" value="create"> Create mode</input></div>
</div>
<div id="embedModeInput">
<h8>Fill in the fields below to get the code to embed your report.</h8>
<div class="spacer"></div>
<div class="inputLine">
<div class="inputLineTitle">Embed Token</div>
<input type="text" id="txtAccessToken" onchange="UpdateSession(this, SessionKeys.AccessToken);" />
</div>
<div class="inputLine">
<div class="inputLineTitle">Embed URL</div>
<input type="text" id="txtReportEmbed" onchange="UpdateSession(this, SessionKeys.EmbedUrl);" value="https://embedded.powerbi.com/appTokenReportEmbed"/>
</div>
<div class="inputLine">
<div class="inputLineTitle">Report Id</div>
<input type="text" id="txtEmbedReportId" onchange="UpdateSession(this, SessionKeys.EmbedId);"/>
</div>
</div>
<div id="createModeInput">
<h8>Fill in the fields below to get the code to embed your report.</h8>
<div class="spacer"></div>
<div class="inputLine">
<div class="inputLineTitle">Embed Token</div>
<input type="text" id="txtCreateAccessToken" onchange="UpdateSession(this, SessionKeys.AccessToken);" />
</div>
<div class="inputLine">
<div class="inputLineTitle">Embed URL</div>
<input type="text" id="txtCreateReportEmbed" onchange="UpdateSession(this, SessionKeys.EmbedUrl);" value="https://embedded.powerbi.com/appTokenReportEmbed"/>
</div>
<div class="inputLine">
<div class="inputLineTitle">Dataset Id</div>
<input type="text" id="txtEmbedDatasetId" onchange="UpdateSession(this, SessionKeys.EmbedId);"/>
</div>
</div>
</div>

Просмотреть файл

@ -0,0 +1,65 @@
<div id="step-interact-wrapper">
<div>
<div id="operation-categories">
<div id="operations-ul-wrapper" tabindex="-1">
<ul id="operations-ul">
<li id="report-operations-li" onclick="OpenReportOperations();" class="active">
<a href="#">Report</a>
</li>
<li id="page-operations-li" onclick="OpenPageOperations();">
<a href="#">Page</a>
</li>
<li id="events-operations-li" onclick="OpenEventOperations();">
<a href="#">Events</a>
</li>
<li id="editandsave-operations-li" onclick="OpenEditAndSaveOperations();">
<a href="#">Edit & save</a>
</li>
</ul>
</div>
</div>
<div id="category-browser">
<div id="wrapper-operations-div" class="operations-div">
<div id="report-operations-div" class="operations-div">
<ul class="function-ul">
<li class="active" onclick="Report_GetId()">Get Id</li>
<li onclick="Report_GetPages()">Get pages</li>
<li onclick="Report_SetPage()">Set page</li>
<li onclick="Report_SetFilters()">Set filters</li>
<li onclick="Report_GetFilters()">Get filters</li>
<li onclick="Report_RemoveFilters()">Remove filters</li>
<li onclick="Report_PrintCurrentReport()">Print</li>
<li onclick="Report_UpdateSettings()">Update settings</li>
<li onclick="Report_Reload()">Reload</li>
<li onclick="Report_Refresh()">Refresh</li>
<li onclick="Report_FullScreen()">Full screen</li>
<li onclick="Report_ExitFullScreen()">Exit full screen</li>
</ul>
</div>
<div id="page-operations-div" class="operations-div" style="display: none;">
<ul class="function-ul">
<li class="active" onclick="Page_SetActive()">Set Active</li>
<li onclick="Page_SetFilters()">Set Filters</li>
<li onclick="Page_GetFilters()">Get Filters</li>
<li onclick="Page_RemoveFilters()">Remove Filters</li>
</ul>
</div>
<div id="events-operations-div" class="operations-div" style="display: none;">
<ul class="function-ul">
<li class="active" onclick="Events_PageChanged()">Page Changed</li>
<li onclick="Events_DataSelected()">Data Selected</li>
<li onclick="Events_SaveAsTriggered()">SaveAs Triggered</li>
</ul>
</div>
<div id="editandsave-operations-div" class="operations-div" style="display: none;">
<ul class="function-ul">
<li onclick="Report_switchModeEdit()">Enter edit mode</li>
<li onclick="Report_switchModeView()">Enter view mode</li>
<li onclick="Report_save()">Save report</li>
<li onclick="Report_saveAs()">SaveAs report</li>
</ul>
</div>
</div>
</div>
</div>
</div>

Просмотреть файл

@ -0,0 +1,32 @@
<!DOCTYPE html>
<div id="authStepDiv">
<div id="sampleReport" class="pbi-line">
<div id="deprecationNote">
<div class="pageTitle">
<h3>Deprecation Note</h3>
</div>
This sample is deprecated. please use the new sample available
<a href="https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html">here</a>.
<br/>
The new sample accommodates the changes announced in the embedded offering described in
<a href="https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedding/">Power BI Documentation page</a>.
</div>
<div class="pageTitle">
<h3>Sample Report</h3>
<h8>You can embed a sample report and interact with Power BI Embedded firsthand by clicking below.</h8>
</div>
<div class="settings">
<button id="GoToEmbedStepButton" class="blueButton" onclick="OpenEmbedStepWithSample()">Embed sample report</button>
</div>
</div>
</div>
<script>
$(document).ready(function() {
SetTextBoxesFromSessionOrUrlParam("#auth_txtAccessToken", "#auth_txtReportEmbed", "#auth_txtEmbedReportId");
SetSession(SessionKeys.IsSampleReport, false);
});
</script>

Просмотреть файл

@ -0,0 +1,359 @@
body {
min-width: 300px;
}
header
{
padding: 20px 40px;
}
.logo-text-span {
color: rgb(0, 174, 239);
font-family: 'Segoe UI Web Light', 'Segoe UI Light', 'Segoe WP Light', 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif;
font-weight: normal;
font-size: 28px;
}
#mainContent {
position: relative;
color: #404040;
/* margin: 15px 30px; */
float: left;
width: 100%;
}
.content {
position: relative;
color: #404040;
margin: 15px 30px;
height: 100%;
}
#settings {
width: 270px;
margin-right: 20px;
}
#embedCodeDiv {
width: 400px;
margin-right: 20px;
max-height: 300px;
float: left;
}
#embedArea {
clear: both;
width: 100%;
padding-left: 290px;
}
#reportContainer {
width: 100%;
height: 450px;
background-color: white;
padding: 0px;
clear: both;
}
#logWindow {
width: 400px;
float: left;
}
.topPanel {
margin-bottom: 10px;
}
.bottomPanel {
width: 100%;
margin-bottom: 10px;
max-width: 100%;
}
#steps-nav-bar {
width: 100%;
font-size: 90%;
border-bottom: 1px solid #E5E5E5;
margin-bottom: 20px;
padding-right: 0;
margin-right: 0;
}
#steps-ul li {
width: 32%;
display: inline-block;
}
@media screen and (max-width: 320px) {
header
{
padding: 15px 30px;
}
.logo-text-span {
font-size: 90%;
line-height: 42px;
min-width: 295px;
}
.topPanel {
height: 430px;
width: 100%;
}
#embedCodeDiv {
width: 100%;
margin-bottom: 30px;
margin-right: 0px;
}
#logWindow {
width: 100%;
}
#settings {
width: 100%;
float: left;
margin-right: 0px;
}
#reportContainer {
width: 100%;
height: 360px;
}
#embedArea {
padding-left: 0px;
}
}
@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
{
padding: 15px 30px;
}
.logo-text-span {
font-size: 110%;
line-height: 42px;
min-width: 295px;
}
.topPanel {
height: 430px;
width: 100%;
}
#embedCodeDiv {
width: 100%;
margin-bottom: 30px;
margin-right: 0px;
}
#logWindow {
width: 100%;
}
#settings {
width: 100%;
float: left;
margin-right: 0px;
}
#reportContainer {
width: 100%;
height: 360px;
}
#embedArea {
padding-left: 0px;
}
}
@media screen and (min-width: 551px) {
header
{
padding: 15px 10px;
}
.logo-text-span {
font-size: 90%;
line-height: 42px;
min-width: 295px;
}
.topPanel {
height: 330px;
width: 100%;
}
#embedCodeDiv {
width: 100%;
margin-bottom: 30px;
margin-right: 0px;
}
#logWindow {
width: 100%;
}
#settings {
width: 100%;
float: left;
margin-right: 0px;
}
#reportContainer {
width: 100%;
height: 360px;
}
#embedArea {
padding-left: 0px;
}
}
@media screen and (min-width: 861px) and (max-width: 1023px) {
header
{
padding: 20px 40px;
}
.logo-text-span {
font-size: 28px;
}
#embedCodeDiv {
width: 49%;
font-size: 90%;
margin-right: 2%;
}
#logWindow {
width: 49%;
}
#settings {
float: none;
width: 380px;
}
#reportContainer {
width: 100%;
height: 360px;
}
#embedArea {
padding-left: 0px;
}
}
@media screen and (min-width: 1024px) {
header
{
padding: 20px 40px;
}
.logo-text-span {
font-size: 28px;
}
#mainContent {
width: 86.7%;
margin-left: 0.8%;
}
#embedCodeDiv {
width: 34%;
font-size: 90%;
margin-right: 1%;
}
#logWindow {
width: 34%;
}
#settings {
float: left;
width: 30%;
margin-right: 1%;
}
#operations-ul li {
margin: 0px 2px;
}
#reportContainer {
width: 100%;
height: 380px;
}
.bottomPanel {
margin-left: 0;
width: 100%;
}
#steps-nav-bar {
width: 13.3%;
font-size: 90%;
padding-right: 0.8%;
border-right: 1px solid #E5E5E5;
border-bottom: none;
margin-bottom: 0px;
}
#steps-ul li {
width: 100%;
display: block;
}
}
@media screen and (min-width: 1280px) {
.logo-text-span {
font-size: 28px;
}
.content {
margin: 15px 20px;
}
.bottomPanel {
max-width: 100%;
margin-left: 0px;
}
.steps-ul li {
font-size: 17px;
}
}
@media screen and (min-width: 1600px) {
.logo-text-span {
font-size: 28px;
}
.content {
margin: 15px 40px;
}
}
@media screen and (min-width: 1800px) {
.logo-text-span {
font-size: 28px;
}
#reportContainer {
height: 450px;
}
}

Просмотреть файл

@ -0,0 +1,628 @@
html {
margin:0;
padding:0;
height:100%;
}
body {
background-color: rgb(241, 241, 241);
font-family: 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif;
margin:0;
padding:0;
height:100%;
}
h3 {
margin: 0;
}
hr {
border-color: #DDDDDD;
}
header {
display: block;
width: 100%;
top: 0px;
z-index: 1030;
color: rgb(8, 122, 165);
background-color: rgb(24, 24, 25);
height: 100px;
}
a:hover, a:visited, a:link, a:active
{
text-decoration: none;
}
#nextStep {
float: right;
}
#result-wrap {
margin-top: 10px;
}
#user-embed-details {
width: 100%;
}
#user-embed-details tr {
width: 100%;
}
#user-embed-details input[type="text"] {
width: 100%;
border: none;
margin-bottom: 5px;
}
#report-embed-table {
width: 100%;
}
#report-embed-table tr {
width: 100%;
}
.inputLine > span {
width: 30%;
}
#report-embed-table input[type="text"] {
width: 73%;
border: none;
margin-bottom: 5px;
}
#report-embed-checkbox input {
width: auto;
border: none;
margin-bottom: 5px;
}
#oldSample {
display: block;
float: right;
margin-right: 30px;
}
#deprecationNote {
margin-bottom: 30px;
}
#deprecationNote .pageTitle {
margin-bottom: 15px;
font-weight: normal;
color: red;
}
#sampleReportImgDiv img {
width: 265px;
height: 180px;
}
#sampleReportImgDiv {
margin-top: 17px;
margin-right: 32px;
float: left;
}
#sampleReportDescription {
float: left;
margin-top: 17px;
max-width: 400px;
}
a {
text-decoration: none;
}
.btn.btn-margin {
margin-bottom: 5px;
}
.halfWidth.right {
width: 750px;
min-height: 100px;
float: left;
padding-top: 10px;
padding-bottom: 10px;
}
.halfWidth.left {
width: 750px;
min-height: 100px;
float: left;
padding-top: 10px;
padding-bottom: 10px;
margin-right: 40px;
}
.break-float {
clear: both;
width: 100%;
}
.pbi-line {
display: inline-block;
width: 100%;
}
#top-nav-bar {
margin-top: 10px;
}
#top-nav-bar a {
color: white;
display: inline-block;
}
#top-nav-bar a:hover {
color: rgb(8, 122, 165);
}
#top-nav-bar .active {
color: rgb(0, 174, 239);
}
#steps-nav-bar a {
color: black;
display: inline-block;
}
#steps-nav-bar a:hover {
font-weight: bold;
}
#steps-nav-bar .active {
color: white;
}
.main-ul {
list-style-type: none;
margin: 0px 30px;
padding: 0;
overflow: hidden;
float: right;
}
.main-ul .active {
background-color: rgb(245, 211, 65);
}
.main-li {
float: left;
}
.main-li a {
display: block;
color: black;
text-align: center;
padding: 0px 16px;
text-decoration: none;
}
.main-li a:visited {
display: block;
color: black;
text-align: center;
padding: 0px 16px;
text-decoration: none;
background-color: rgb(245, 211, 65);
}
.main-li a:hover {
display: block;
color: black;
text-align: center;
padding: 0px 16px;
text-decoration: none;
background-color: rgb(245, 211, 65);
}
.main-li a:active {
display: block;
color: black;
text-align: center;
padding: 0px 16px;
text-decoration: none;
background-color: rgb(245, 211, 65);
}
.main-title {
font-family: 'Segoe UI Web Light', 'Segoe UI Light', 'Segoe WP Light', 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif;
font-size: 28px;
font-weight: bold;
}
#navbar {
float: left;
width: 100%;
}
#top-ul-dev {
float: left;
}
.top-ul {
list-style-type: none;
margin: 0px;
overflow: hidden;
-webkit-margin-before: 0;
-webkit-padding-start: 0;
line-height: 30px;
}
.top-ul li {
float: left;
margin-right: 40px;
text-align: center;
line-height: 22px;
font-size: 17px;
}
#top-docs {
margin-right: 0px;
}
.top-li-active {
color: white;
border-bottom: 1px solid white;
padding-bottom: 3px;
}
#steps-ul-dev {
float: left;
width: 100%;
}
.steps-ul {
list-style-type: none;
margin: 0px;
overflow: hidden;
-webkit-margin-before: 0;
-webkit-padding-start: 0;
line-height: 30px;
width: 100%;
}
.steps-ul li {
float: none;
text-align: left;
line-height: 22px;
font-weight: 400;
height: 40px;
width: 100%;
margin-bottom: 10px;
vertical-align: middle;
}
#steps-interact {
margin-right: 0px;
}
.steps-li-active {
color: white;
text-decoration: none;
background-color: #666666;
}
.operations-div {
height: 100%;
width: 95%;
background-color: rgb(231, 232, 233);
text-align: center;
overflow-y: scroll;
position: relative;
}
#operations-ul a {
text-decoration: none;
color: rgb(27, 27, 27);
width: 100%;
text-align: center;
}
#operations-ul li:hover {
border-bottom: 3px solid #444444;
}
#operations-ul {
-webkit-margin-before: 0;
-webkit-margin-after: 0;
-webkit-padding-start: 0;
}
#operations-ul li {
margin: 0px 30px 0px 0px;
display: inline-block;
/* font-size: 14px; */
color: #444444;
}
#operations-ul > .active {
border-bottom: 3px #444444 solid;
}
#wrapper-operations-div {
padding: 10px 20px 15px 20px;
background-color: rgb(231, 232, 233);
width: 100%;
height: 300px;
overflow: hidden;
display: inline-block;
}
#report-operations-div::-webkit-scrollbar-track, #page-operations-div::-webkit-scrollbar-track, #events-operations-div::-webkit-scrollbar-track
{
border-radius: 10px;
background-color: transparent;
}
#report-operations-div::-webkit-scrollbar, #page-operations-div::-webkit-scrollbar, #events-operations-div::-webkit-scrollbar
{
width:10px;
height:10px;
background-color: transparent;
}
#report-operations-div::-webkit-scrollbar-thumb, page-operations-div::-webkit-scrollbar-thumb, #events-operations-div::-webkit-scrollbar-thumb
{
border-radius: 10px;
background-color: #888888;
}
#operations-ul-wrapper img {
width: 20px;
position: relative;
top: 3px;
}
#operation-categories {
margin-bottom: 0px;
}
#selected-catogory-button {
background-color: transparent;
border: none;
color: rgb(27, 27, 27);
min-width: 120px;
text-align: left;
}
.function-ul {
width: 100%;
clear: both;
margin: 0;
padding: 0px 20px 0px 0px;
}
.function-ul li {
width: 100%;
clear: both;
cursor: default;
}
.function-ul a {
text-decoration: none;
color: rgb(27, 27, 27);
}
.function-ul .active {
background-color: rgb(88, 88, 90);
color: white;
}
.function-ul a:hover {
background-color: #888888;
}
.function-ul li {
list-style-type: none;
margin: 0px;
overflow: hidden;
-webkit-margin-before: 0;
-webkit-padding-start: 0;
margin: 5px 0px;
text-align: left;
padding: 3px;
}
.td-field-name {
width: 130px;
text-align: right;
color: #888888;
padding-right: 5px;
}
.pageTitle {
margin-bottom: 10px;
}
.pageTitle h3 {
margin-bottom: 15px;
font-weight: normal;
}
.editorTitle {
margin-bottom: 5px;
}
#GoToInteractStep {
display: inline-block;
position: relative;
}
.textAreaControls {
text-align: right;
position: relative;
z-index: 1;
height: 30px;
padding: 10px 20px;
font-size: 14px;
}
.textAreaControl {
color: rgb(127, 127, 127);
background-color: transparent;
border: none;
margin-right: 5px;
}
.textAreaControl img {
width: 16px;
height: 16px;
position: relative;
top: -2px;
}
.responseTextArea {
width: 100%;
height: 300px;
border: none;
padding-top: 40px;
position: relative;
top: -30px;
padding-left: 10px;
margin-bottom: -30px;
}
.responseDiv {
width: 100%;
float: left;
}
.blueButton {
background-color: rgb(36, 169, 225);
border: none;
color: white;
padding: 5px 30px;
}
.spacer {
height: 10px;
}
.scrollbar
{
margin-left: 30px;
float: left;
height: 300px;
width: 65px;
background: #F5F5F5;
overflow-y: scroll;
margin-bottom: 25px;
}
#txtCode {
width: 100%;
height: 300px;
border: none;
padding: 20px;
position: relative;
top: -30px;
background: #FFFFFF;
overflow: auto;
white-space: pre-wrap;
}
#GoToEmbedStepButton {
margin-top: 12px;
}
#authStepDiv {
max-width: 500px;
}
#report-embed-table .inputLine {
margin: 5px 0px;
}
.pageTitle h4 {
font-size: 18px;
font-weight: normal;
margin: 0px 0px 5px 0px;
}
.top-div {
border-radius: 50%;
width: 10px;
height: 10px;
display: inline-block;
background-color: white;
border: solid black 1px;
}
.active-top {
background-color: rgb(36, 169, 225);
}
.step-div {
border-radius: 50%;
width: 10px;
height: 10px;
display: inline-block;
background-color: white;
border: solid black 1px;
}
.active-step {
background-color: rgb(36, 169, 225);
}
.editorTitleText {
display: inline-block;
}
#selected-catogory-button-wrapper img {
width: 20px;
position: relative;
top: -1px;
}
.checkbox.input {
width: auto;
}
.stepsButton {
height: 100%;
padding: 10px 0px 0px 10px;
line-height: 20px;
}
.video {
width: 90%;
height: 500px;
max-width: 800px;
}
.title {
font-size: 17px;
font-weight: 400px;
}
#embedModeInput {
}
#createModeInput {
display: none;
}
.inputLineTitle {
width: 25%;
display: inline-block;
}
#modeSelector {
margin-bottom: 20px;
cursor: default;
}
#reportContainer iframe {
border: none;
}

Просмотреть файл

@ -0,0 +1,10 @@
.syntaxhighlighter {
overflow: hidden !important;
margin: 0em !important;
padding: 0em !important;
top: -85px !important;
}
.syntaxhighlighter .line {
white-space: pre-wrap !important;
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,238 @@
.syntaxhighlighter a,
.syntaxhighlighter div,
.syntaxhighlighter code,
.syntaxhighlighter table,
.syntaxhighlighter table td,
.syntaxhighlighter table tr,
.syntaxhighlighter table tbody,
.syntaxhighlighter table thead,
.syntaxhighlighter table caption,
.syntaxhighlighter textarea {
-moz-border-radius: 0 0 0 0 !important;
-webkit-border-radius: 0 0 0 0 !important;
background: none !important;
border: 0 !important;
bottom: auto !important;
float: none !important;
height: auto !important;
left: auto !important;
line-height: 1.1em !important;
margin: 0 !important;
outline: 0 !important;
overflow: visible !important;
padding: 0 !important;
position: static !important;
right: auto !important;
text-align: left !important;
top: auto !important;
vertical-align: baseline !important;
width: auto !important;
box-sizing: content-box !important;
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
font-weight: normal !important;
font-style: normal !important;
font-size: 1em !important;
min-height: inherit !important;
min-height: auto !important; }
.syntaxhighlighter {
width: 100% !important;
margin: 1em 0 1em 0 !important;
position: relative !important;
overflow: auto !important;
font-size: 1em !important; }
.syntaxhighlighter .container:before, .syntaxhighlighter .container:after {
content: none !important; }
.syntaxhighlighter.source {
overflow: hidden !important; }
.syntaxhighlighter .bold {
font-weight: bold !important; }
.syntaxhighlighter .italic {
font-style: italic !important; }
.syntaxhighlighter .line {
white-space: pre !important; }
.syntaxhighlighter table {
width: 100% !important; }
.syntaxhighlighter table caption {
text-align: left !important;
padding: .5em 0 0.5em 1em !important; }
.syntaxhighlighter table td.code {
width: 100% !important; }
.syntaxhighlighter table td.code .container {
position: relative !important; }
.syntaxhighlighter table td.code .container textarea {
box-sizing: border-box !important;
position: absolute !important;
left: 0 !important;
top: 0 !important;
width: 100% !important;
height: 100% !important;
border: none !important;
background: white !important;
padding-left: 1em !important;
overflow: hidden !important;
white-space: pre !important; }
.syntaxhighlighter table td.gutter .line {
text-align: right !important;
padding: 0 0.5em 0 1em !important; }
.syntaxhighlighter table td.code .line {
padding: 0 1em !important; }
.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
padding-left: 0em !important; }
.syntaxhighlighter.show {
display: block !important; }
.syntaxhighlighter.collapsed table {
display: none !important; }
.syntaxhighlighter.collapsed .toolbar {
padding: 0.1em 0.8em 0em 0.8em !important;
font-size: 1em !important;
position: static !important;
width: auto !important;
height: auto !important; }
.syntaxhighlighter.collapsed .toolbar span {
display: inline !important;
margin-right: 1em !important; }
.syntaxhighlighter.collapsed .toolbar span a {
padding: 0 !important;
display: none !important; }
.syntaxhighlighter.collapsed .toolbar span a.expandSource {
display: inline !important; }
.syntaxhighlighter .toolbar {
position: absolute !important;
right: 1px !important;
top: 1px !important;
width: 11px !important;
height: 11px !important;
font-size: 10px !important;
z-index: 10 !important; }
.syntaxhighlighter .toolbar span.title {
display: inline !important; }
.syntaxhighlighter .toolbar a {
display: block !important;
text-align: center !important;
text-decoration: none !important;
padding-top: 1px !important; }
.syntaxhighlighter .toolbar a.expandSource {
display: none !important; }
.syntaxhighlighter.ie {
font-size: .9em !important;
padding: 1px 0 1px 0 !important; }
.syntaxhighlighter.ie .toolbar {
line-height: 8px !important; }
.syntaxhighlighter.ie .toolbar a {
padding-top: 0px !important; }
.syntaxhighlighter.printing .line.alt1 .content,
.syntaxhighlighter.printing .line.alt2 .content,
.syntaxhighlighter.printing .line.highlighted .number,
.syntaxhighlighter.printing .line.highlighted.alt1 .content,
.syntaxhighlighter.printing .line.highlighted.alt2 .content {
background: none !important; }
.syntaxhighlighter.printing .line .number {
color: #bbbbbb !important; }
.syntaxhighlighter.printing .line .content {
color: black !important; }
.syntaxhighlighter.printing .toolbar {
display: none !important; }
.syntaxhighlighter.printing a {
text-decoration: none !important; }
.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
color: black !important; }
.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
color: #008200 !important; }
.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
color: blue !important; }
.syntaxhighlighter.printing .keyword {
color: #006699 !important;
font-weight: bold !important; }
.syntaxhighlighter.printing .preprocessor {
color: gray !important; }
.syntaxhighlighter.printing .variable {
color: #aa7700 !important; }
.syntaxhighlighter.printing .value {
color: #009900 !important; }
.syntaxhighlighter.printing .functions {
color: #ff1493 !important; }
.syntaxhighlighter.printing .constants {
color: #0066cc !important; }
.syntaxhighlighter.printing .script {
font-weight: bold !important; }
.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
color: gray !important; }
.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
color: #ff1493 !important; }
.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
color: red !important; }
.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
color: black !important; }
.syntaxhighlighter {
background-color: white !important; }
.syntaxhighlighter .line.alt1 {
background-color: white !important; }
.syntaxhighlighter .line.alt2 {
background-color: white !important; }
.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
background-color: #e0e0e0 !important; }
.syntaxhighlighter .line.highlighted.number {
color: black !important; }
.syntaxhighlighter table caption {
color: black !important; }
.syntaxhighlighter table td.code .container textarea {
background: white;
color: black; }
.syntaxhighlighter .gutter {
color: #afafaf !important; }
.syntaxhighlighter .gutter .line {
border-right: 3px solid #6ce26c !important; }
.syntaxhighlighter .gutter .line.highlighted {
background-color: #6ce26c !important;
color: white !important; }
.syntaxhighlighter.printing .line .content {
border: none !important; }
.syntaxhighlighter.collapsed {
overflow: visible !important; }
.syntaxhighlighter.collapsed .toolbar {
color: #00f !important;
background: #fff !important;
border: 1px solid #6ce26c !important; }
.syntaxhighlighter.collapsed .toolbar a {
color: #00f !important; }
.syntaxhighlighter.collapsed .toolbar a:hover {
color: #f00 !important; }
.syntaxhighlighter .toolbar {
color: #fff !important;
background: #6ce26c !important;
border: none !important; }
.syntaxhighlighter .toolbar a {
color: #fff !important; }
.syntaxhighlighter .toolbar a:hover {
color: #000 !important; }
.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
color: black !important; }
.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
color: #008200 !important; }
.syntaxhighlighter .string, .syntaxhighlighter .string a {
color: blue !important; }
.syntaxhighlighter .keyword {
font-weight: bold !important;
color: #006699 !important; }
.syntaxhighlighter .preprocessor {
color: gray !important; }
.syntaxhighlighter .variable {
color: #aa7700 !important; }
.syntaxhighlighter .value {
color: #009900 !important; }
.syntaxhighlighter .functions {
color: #ff1493 !important; }
.syntaxhighlighter .constants {
color: #0066cc !important; }
.syntaxhighlighter .script {
font-weight: bold !important;
color: #006699 !important;
background-color: none !important; }
.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
color: gray !important; }
.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
color: #ff1493 !important; }
.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
color: red !important; }