Automatic switching between dashboards
Summary: Community_Admin provides instructions on setting up automatic rotation between dashboards, which can be useful for displaying updated data on a monitor. The process involves creating a dedicated user, republishing relevant dashboards, and editing scripts to define the URL, display time, and user for the auto cycle. A JavaScript example is included to illustrate how to implement the functionality.
This article explains how to automatically switch between dashboards every predetermined amount of time. This might come useful, when you have multiple dashboards that you want to be presented in a cycle on a monitor to reflect updated data\records. Take a look at the video example below:
Please follow the instructions below to set up automatic rotation between dashboards:
Create a dedicated user (Consumer) that will be used for presenting the dashboards.
Republish all the relevant dashboards to the consumer user
Edit script for every dashboard and add the Javascript code shown below, being sure to change the variables "d, t, u" in the Javascript code.
d - the url of next dashboard in the queue
t - the amount of time that the current dashboard will be displayed (in milliseconds)
u - the user that is used with the auto cycle
Once the Javascript has been applied, login to Sisense with the designated user and open one of the dashboards to check the change is working.
Javascript Code
dashboard.on('refreshend', function(se, ev) {
var d = 'http://localhost:8081/app/main#/dashboards/5558943e17c636a410000009'; /* URL for next dashboard to be loaded */
var t = 3000 /* Milliseceonds until switching to the next dashboard */
var u = 'consumer@gmail.com' /* The designated user for the auto cycle */
if (prism.user.userName == u) {
setTimeout(function() {
window.top.location = d;
}, t)
}
})