How to Add Customized Cache Refresh Button at Dashboard Level in Helical Insight Application
In below blog, we are going to explain how the dashboard can be refreshed on HTML button click in Helical Insight application
- Create a sample dashboard (see the screenshot)
- Open the dashboard in edit mode
- Create HTML component in the dashboard and paste copy the below code
- In CSS editor copy the below code( for button styling)
- In JS editor copy the below code :
- Finally, a button is created in the dashboard ( see the screenshot rounded with red line)
- Open the dashboard in open mode, If we click on the button “Cache Refresh”, the cache will be refreshed for the current dashboard.
<button class="button">Cache Refresh</button>
And align the button position in the dashboard
.button { background-color: #75a3a3; border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; }
This code forms the url with cache refresh information,
and calls the cache refresh url.
$(".button").click(function () { var baseUrl=DashboardGlobals.baseUrl; var dir='hi.html?dir='; var dirName=DashboardGlobals.efwddir; var file='&file='; var fileName=DashboardGlobals.file; var mode='&mode='; var modeName='open'; var refresh='&refresh='; var refreshStatus='true'; var url=''; var refreshUrl=url.concat(baseUrl,dir,dirName,file,fileName,mode,modeName,refresh,refreshStatus); window.open(refreshUrl, "_self"); });
In case if you have any queries please get us at support@helicalinsight.com