@@ -8,26 +8,16 @@ function OpenEmbedStepWithSampleValues(accessToken, embedUrl, reportId)
88}
99
1010function OpenEmbedStepWithSample ( ) {
11- var staticReportUrl = 'https://powerbiembedapi .azurewebsites.net/api/reports/c52af8ab-0468-4165-92af-dc39858d66ad' ;
11+ var staticReportUrl = 'https://powerbi-embed-api .azurewebsites.net/api/reports/c52af8ab-0468-4165-92af-dc39858d66ad' ;
1212 fetch ( staticReportUrl ) . then ( function ( response ) {
13- if ( response . ok ) {
14- return response . json ( ) . then ( function ( embedConfig ) {
15- OpenEmbedStepWithSampleValues ( embedConfig . accessToken , embedConfig . embedUrl , embedConfig . id ) ;
16- } ) ;
17- }
18- else {
13+ // Do Nothing. Keeping this call for telemtry usage (Meanwhile)
1914
20- // Default values - report with embed token which expires on 1/1/2030.
21- var embedUrl = 'https://embedded.powerbi.com/appTokenReportEmbed?reportId=c52af8ab-0468-4165-92af-dc39858d66ad' ;
22- var reportId = 'c52af8ab-0468-4165-92af-dc39858d66ad' ;
23- var accessToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXIiOiIwLjIuMCIsIndjbiI6IlBvd2VyQmlBenVyZVNhbXBsZXMiLCJ3aWQiOiJmODFjMTk2Ni1lZGVlLTQxMWItOGY4YS1mODQ0NjAxOWIwNDQiLCJyaWQiOiJjNTJhZjhhYi0wNDY4LTQxNjUtOTJhZi1kYzM5ODU4ZDY2YWQiLCJpc3MiOiJQb3dlckJJU0RLIiwiYXVkIjoiaHR0cHM6Ly9hbmFseXNpcy53aW5kb3dzLm5ldC9wb3dlcmJpL2FwaSIsImV4cCI6MTg5MzQ0ODgwMCwibmJmIjoxNDgxMDM3MTY5fQ.m4SwqmRWA9rJgfl72lEQ_G-Ijpw9Up5YwmBOfXi00YU" ;
15+ } ) ;
2416
25- OpenEmbedStepWithSampleValues ( accessToken , embedUrl , id ) ;
17+ // Default values - report with embed token which expires on 1/1/2030.
18+ var embedUrl = 'https://embedded.powerbi.com/appTokenReportEmbed?reportId=c52af8ab-0468-4165-92af-dc39858d66ad' ;
19+ var reportId = 'c52af8ab-0468-4165-92af-dc39858d66ad' ;
20+ var accessToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXIiOiIwLjIuMCIsIndjbiI6IlBvd2VyQmlBenVyZVNhbXBsZXMiLCJ3aWQiOiJmODFjMTk2Ni1lZGVlLTQxMWItOGY4YS1mODQ0NjAxOWIwNDQiLCJyaWQiOiJjNTJhZjhhYi0wNDY4LTQxNjUtOTJhZi1kYzM5ODU4ZDY2YWQiLCJpc3MiOiJQb3dlckJJU0RLIiwiYXVkIjoiaHR0cHM6Ly9hbmFseXNpcy53aW5kb3dzLm5ldC9wb3dlcmJpL2FwaSIsImV4cCI6MTg5MzQ0ODgwMCwibmJmIjoxNDgxMDM3MTY5fQ.m4SwqmRWA9rJgfl72lEQ_G-Ijpw9Up5YwmBOfXi00YU" ;
2621
27- return response . json ( ) . then ( function ( error ) {
28- // log error to console.
29- console . log ( error ) ;
30- } ) ;
31- }
32- } ) ;
22+ OpenEmbedStepWithSampleValues ( accessToken , embedUrl , reportId ) ;
3323}
0 commit comments