Repository navigation
Alihamud live code - #93
Conversation
V2.2.1 remove refresh since it could cause additional billing.
Add print and reload to live demo.
| <div id="left-pane" class="halfWidth right"> | ||
| <div id="embedArea"> | ||
| <h3>Embedded Report Area</h3> | ||
| <h5>The following div id is <b>reportContainer</b>. In code, we embed a report to it.</h5> |
There was a problem hiding this comment.
I think we need to go through text scrubbing for the texts here..
There was a problem hiding this comment.
that is sure.
I will do it in another increment.
| <br/> | ||
| <div class="line"> | ||
| <h4>Flow</h4> | ||
| Once you have a report imported to PowerBI Workspace, you are ready to Embed it.<br/> |
There was a problem hiding this comment.
*embed.. no caps..
please go through text scrubbing
|
|
||
| function _Report_GetId() { | ||
| report = powerbi.embeds[0]; | ||
| $('#result').html(report.getId()); |
There was a problem hiding this comment.
Is"report" always defined? is there a chance for referencing a null here? (and same comment for the below code thar references the report object without checking if it is defined.)
There was a problem hiding this comment.
Actually report can be null if there is no embeds.
There was a problem hiding this comment.
But the code will not be that clear.
this is a sample code for developers, they should add the check after copying.
|
|
||
| function UpdateSessions() { | ||
| var txtAccessToken = $('#txtAccessToken').val(); | ||
| if (txtAccessToken) |
There was a problem hiding this comment.
what happens if these strings are empty strings? do you want to update the session with them anyway?
| } | ||
| } | ||
|
|
||
| function SetAccessTokenFromSession() { |
There was a problem hiding this comment.
the session should always be updated with correct values and is responsible for checking for nulls when it is updates, so is it neccessary do check it also here?
| @@ -0,0 +1,32 @@ | |||
| var embedWithSpecificReportDivExpanded = false; | |||
|
|
|||
| function ExpandEmbedWithSpecificReportDiv() { | |||
There was a problem hiding this comment.
shouldn't this function name be somethings with "toggle" (that was it does doesn't it?)
| if (parts && parts.length > 0) | ||
| { | ||
| var guidParts = parts[parts.length -1].split("&"); | ||
| id = guidParts[0]; |
There was a problem hiding this comment.
is there a chance "guidParts" is null?
Live Demo with visible code.