Knowledge Base Article

How to pause widgets loading

How to pause widgets loading

If you need to pause the loading of the widgets for some time, you should do the following.

Open the dashboard, press edit widget, find three dots in the right corner of the widget, press on them, and choose Edit Script.

Paste the next code to the new window:

 

 

 

 

widget.on("beforequery", function(w, args){
const delay = 4; //Delay in seconds
const currentTime = new Date().getTime();
do {
	//Nothing
} while (shouldContinue())
	
function shouldContinue() {
	return new Date().getTime() < currentTime + 1000 * delay;
}
});

 

 

 

 

Press Save button and check how it works.

Check out this related content: 
Academy
Documentation

Disclaimer: This blog post contains one possible custom workaround solution for users with similar use cases. We cannot guarantee that the custom code solution described in this post will work in every scenario or with every Sisense software version. As such, we strongly advise users to test solutions in their environment before deploying them to ensure that the solutions proffered function as desired. To avoid doubt, the content of this blog post is provided to you “as-is” and without warranty of any kind, express, implied, or otherwise, including without limitation any warranty of security and or fitness for a particular purpose. The workaround solution described in this post incorporates custom coding, which is outside the Sisense product development environment and is, therefore, not covered by Sisense warranty and support services.

Published 09-05-2024
No CommentsBe the first to comment