Created
November 3, 2017 12:28
-
-
Save mikexine/3d853f039e1e43ab8a8b274c17f979f0 to your computer and use it in GitHub Desktop.
Autorefresh a dashboard on Tableau Server
This file contains 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
<html> | |
<body> | |
<script type="text/javascript"> | |
getTableau = function() { | |
return parent.parent.tableau; | |
}; | |
getCurrentViz = function() { | |
return getTableau().VizManager.getVizs()[0]; | |
}; | |
getCurrentWorkbook = function() { | |
return getCurrentViz().getWorkbook(); | |
}; | |
initAutoRefresh = function() { | |
console.log("AutoRefresh running"); | |
tableau = getTableau(); | |
workbook = getCurrentWorkbook(); | |
viz = getCurrentViz(); | |
getCurrentViz().refreshDataAsync(); | |
}; | |
window.setInterval(function() { | |
initAutoRefresh(); | |
}, 5000); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment