Merged PR 19200: Merge dev to master
This commit is contained in:
Родитель
b3fc219590
Коммит
8104c39d95
|
@ -503,6 +503,23 @@ function _Report_Reload() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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.log(result);
|
||||||
|
})
|
||||||
|
.catch(function (errors) {
|
||||||
|
Log.log(errors);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function _Report_FullScreen() {
|
function _Report_FullScreen() {
|
||||||
// Get a reference to the embedded report HTML element
|
// Get a reference to the embedded report HTML element
|
||||||
var reportContainer = $('#reportContainer')[0];
|
var reportContainer = $('#reportContainer')[0];
|
||||||
|
|
|
@ -4,6 +4,7 @@ const SessionKeys = {
|
||||||
AccessToken : "accessToken",
|
AccessToken : "accessToken",
|
||||||
EmbedUrl : "embedUrl",
|
EmbedUrl : "embedUrl",
|
||||||
EmbedId : "embedId",
|
EmbedId : "embedId",
|
||||||
|
GroupId : "groupId",
|
||||||
IsSampleReport: "isSampleReport"
|
IsSampleReport: "isSampleReport"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -48,6 +49,17 @@ function SetTextBoxesFromSessionOrUrlParam(accessTokenSelector, embedUrlSelector
|
||||||
if (!embedUrl)
|
if (!embedUrl)
|
||||||
{
|
{
|
||||||
embedUrl = GetSession(SessionKeys.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);
|
var embedId = GetParameterByName(SessionKeys.EmbedId);
|
||||||
|
|
|
@ -35,6 +35,10 @@ function Report_Reload() {
|
||||||
SetCode(_Report_Reload);
|
SetCode(_Report_Reload);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Report_Refresh() {
|
||||||
|
SetCode(_Report_Refresh);
|
||||||
|
}
|
||||||
|
|
||||||
function Report_FullScreen() {
|
function Report_FullScreen() {
|
||||||
SetCode(_Report_FullScreen);
|
SetCode(_Report_FullScreen);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
<li class="" onclick="Report_PrintCurrentReport()">Print</li>
|
<li class="" onclick="Report_PrintCurrentReport()">Print</li>
|
||||||
<li class="" onclick="Report_UpdateSettings()">Update settings</li>
|
<li class="" onclick="Report_UpdateSettings()">Update settings</li>
|
||||||
<li class="" onclick="Report_Reload()">Reload</li>
|
<li class="" onclick="Report_Reload()">Reload</li>
|
||||||
|
<li class="" onclick="Report_Refresh()">Refresh</li>
|
||||||
<li class="" onclick="Report_FullScreen()">Full screen</li>
|
<li class="" onclick="Report_FullScreen()">Full screen</li>
|
||||||
<li class="" onclick="Report_ExitFullScreen()">Exit full screen</li>
|
<li class="" onclick="Report_ExitFullScreen()">Exit full screen</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -313,8 +313,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
/** Removes the iframe from the element. */
|
/** Removes the iframe from the element. */
|
||||||
var iframe = element.querySelector('iframe');
|
var iframe = element.querySelector('iframe');
|
||||||
if (iframe) {
|
if (iframe) {
|
||||||
|
if (iframe.remove !== undefined) {
|
||||||
iframe.remove();
|
iframe.remove();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
/** Workaround for IE: unhandled rejection TypeError: object doesn't support propert or method 'remove' */
|
||||||
|
iframe.parentElement.removeChild(iframe);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Given an event object, finds the embed component with the matching type and ID, and invokes its handleEvent method with the event object.
|
* Given an event object, finds the embed component with the matching type and ID, and invokes its handleEvent method with the event object.
|
||||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -170,7 +170,6 @@ export class Service implements IService {
|
||||||
let powerBiElement = <IPowerBiElement>element;
|
let powerBiElement = <IPowerBiElement>element;
|
||||||
const component = new Create(this, powerBiElement, config);
|
const component = new Create(this, powerBiElement, config);
|
||||||
powerBiElement.powerBiEmbed = component;
|
powerBiElement.powerBiEmbed = component;
|
||||||
|
|
||||||
this.addOrOverwriteEmbed(component, element);
|
this.addOrOverwriteEmbed(component, element);
|
||||||
|
|
||||||
return component;
|
return component;
|
||||||
|
@ -350,8 +349,14 @@ export class Service implements IService {
|
||||||
/** Removes the iframe from the element. */
|
/** Removes the iframe from the element. */
|
||||||
const iframe = element.querySelector('iframe');
|
const iframe = element.querySelector('iframe');
|
||||||
if (iframe) {
|
if (iframe) {
|
||||||
|
if(iframe.remove !== undefined) {
|
||||||
iframe.remove();
|
iframe.remove();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
/** Workaround for IE: unhandled rejection TypeError: object doesn't support propert or method 'remove' */
|
||||||
|
iframe.parentElement.removeChild(iframe);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
"check-decl",
|
"check-decl",
|
||||||
"check-operator",
|
"check-operator",
|
||||||
"check-module",
|
"check-module",
|
||||||
"check-seperator",
|
"check-separator",
|
||||||
"check-type"
|
"check-type"
|
||||||
],
|
],
|
||||||
"object-literal-sort-keys": false
|
"object-literal-sort-keys": false
|
||||||
|
|
Загрузка…
Ссылка в новой задаче