This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ModulePaths> | |
<Exclude> | |
<ModulePath>.*Moq.dll</ModulePath> | |
<ModulePath>.*GenFu.dll</ModulePath> | |
</Exclude> | |
</ModulePaths> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dotnet test <Path to *.csproj file> --results-directory:<Test Result directory> --collect:"Code Coverage" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getToken() { | |
this.adalSrv.context.acquireToken(environment.powerBIEndpoint, (error, token) => { | |
if (error || !token) { | |
// TODO: Handle error obtaining access token | |
console.error('ERROR:\n\n' + error); | |
return; | |
} | |
// Get available dashboards | |
this.adalSrv.getDashboardsInGroup(environment.groupId).pipe(mergeMap((res, ind) => { | |
// select the first among the available dashboards |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getToken() { | |
this.adalSrv.context.acquireToken(environment.powerBIEndpoint, (error, token) => { | |
if (error || !token) { | |
// TODO: Handle error obtaining access token | |
console.error('ERROR:\n\n' + error); | |
return; | |
} | |
//Get available reports in the group | |
this.adalSrv.getReportsInGroup(environment.groupId).subscribe(res=>{ | |
// select the first report among it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get access token | |
getToken() { | |
this.adalSrv.context.acquireToken(environment.powerBIEndpoint, (error, token) => { | |
if (error || !token) { | |
// TODO: Handle error obtaining access token | |
console.error('ERROR:\n\n' + error); | |
return; | |
} | |
// Get available dashboards | |
this.adalSrv.getDashboardsInGroup(environment.groupId).subscribe(res=>{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public getTilesInGroup(groupId: string, dashboardKey: string){ | |
const headers = new HttpHeaders({ | |
'Content-Type': 'application/json', | |
'Authorization': `Bearer ${this._context.getCachedToken(environment.powerBIEndpoint)}` | |
});// this._context is the ADAL AuthenticationContext object | |
return this.http.get(`https://api.powerbi.com/v1.0/myorg/groups/${groupId}/dashboards/${dashboardKey}/tiles`, { headers: headers }); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public getDashboardsInGroup(groupId: string){ | |
const headers = new HttpHeaders({ | |
'Content-Type': 'application/json', | |
'Authorization': `Bearer ${this._context.getCachedToken(environment.powerBIEndpoint)}` | |
});// this._context is the ADAL AuthenticationContext object | |
return this.http.get(`https://api.powerbi.com/v1.0/myorg/groups/${groupId}/dashboards`, { headers: headers }); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const environment = { | |
production: false, | |
apiEndPoint: "", // api endpoint for generationg embed tokens (for app-owns-data) | |
powerBIEndpoint: "https://analysis.windows.net/powerbi/api", | |
groupId: "", // similar to workspace id | |
adalConfig: { | |
tenant: '', //tenant id of your organization | |
clientId: '', // client id of your azure ad application | |
cacheLocation: 'localStorage', // Default is sessionStorage | |
redirectUri:`${window.location.origin}/` , |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Id of the Azure AD application--> | |
<add key="applicationId" value="" /> | |
<!--Id of the workspace where your reports reside--> | |
<add key="workspaceId" value="" /> | |
<!-- The id of the report to embed. If empty, will use the first report in group --> | |
<add key="reportId" value="" /> | |
<add key="authorityUrl" value="https://login.windows.net/common/oauth2/authorize/" /> | |
<add key="resourceUrl" value="https://analysis.windows.net/powerbi/api" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public getReportsInGroup(groupId: string){ | |
const headers = new HttpHeaders({ | |
'Content-Type': 'application/json', | |
'Authorization': `Bearer ${this._context.getCachedToken(environment.powerBIEndpoint)}` | |
}); // this._context is the ADAL AuthenticationContext object | |
return this.http.get(`https://api.powerbi.com/v1.0/myorg/groups/${groupId}/reports`, { headers: headers }); | |
} |