Countdown Timer

b__KieronJ
Tera Contributor

I have a script that refreshes my incident data every 5 minutes in a Dashboard I built in UI Builder (Below). I now want to have a visualization that shows a countdown timer for 5 minutes and resets to 5 minutes when everytime the below client script executes. Is this possible? I would think to try using the Stylized text box component as I see there are no other components that can accomodate this?
/**
* @Param {params} params
* @Param {api} params.api
* @Param {any} params.event
* @Param {any} params.imports
* @Param {ApiHelpers} params.helpers
*/
function handler({ api, helpers }) {
// Define a function to refresh the data
function refreshData() {
api.data.look_up_multiple_records_2.refresh();
}
helpers.timing.setInterval(refreshData, 300000);
}

0 REPLIES 0