-
Notifications
You must be signed in to change notification settings - Fork 475
Alihamud live code #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to go through text scrubbing for the texts here..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is sure.
I will do it in another increment.
demo/code-demo/step_authorize.html
Outdated
| <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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually report can be null if there is no embeds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if these strings are empty strings? do you want to update the session with them anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
| } | ||
| } | ||
|
|
||
| function SetAccessTokenFromSession() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this function name be somethings with "toggle" (that was it does doesn't it?)
demo/code-demo/scripts/utils.js
Outdated
| if (parts && parts.length > 0) | ||
| { | ||
| var guidParts = parts[parts.length -1].split("&"); | ||
| id = guidParts[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a chance "guidParts" is null?
Live Demo with visible code.