-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathopenBI.htm
38 lines (36 loc) · 1.42 KB
/
openBI.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<html>
<head>
<title>Open PowerBI</title>
</head>
<body>
<div id=wait></div>
<button id=open>Open</button>
<script>
// Open MyApps, wait 10 seconds, then open PowerBI,
var myAppsUrl = "https://myapps.microsoft.com/?whr=seattlechildrens.org";
var reportsUrl = "https://app.powerbi.com/groups/me/apps/cfab6534-72ea-4a4c-85db-e7acb57e008b/reports/452e08d1-95a9-429a-80b2-b8a614b9c2ae/ReportSection?ctid=9f693e63-5e9e-4ced-98a4-8ab28f9d0c2d";
// To skip sign up page, should look like:
// "https://app.powerbi.com/?route=groups%2fme%2fapps%2fcfab6534-72ea-4a4c-85db-e7acb57e008b%2freports%2f452e08d1-95a9-429a-80b2-b8a614b9c2ae%2fReportSection%3fctid%3d9f693e63-5e9e-4ced-98a4-8ab28f9d0c2d&ctid=9f693e63-5e9e-4ced-98a4-8ab28f9d0c2d&noSignUpCheck=1";
document.getElementById("open").onclick = openPowerBI;
openPowerBI();
function openPowerBI() {
var delay = 10;
var wait = delay;
var appsWindow = open(myAppsUrl);
var interval = setInterval(showWait, 1000); // 1 second
function showWait() {
wait--;
if (wait > 0) {
message = "PowerBI will open in " + wait + " seconds.";
} else {
appsWindow.close();
open("https://app.powerbi.com/?route=" + encodeURIComponent(reportsUrl.substr(24)) + "&noSignupCheck=1");
clearInterval(interval);
message = "";
}
document.getElementById("wait").innerHTML = message;
}
}
</script>
</body>
</html>