Closed Tenzian closed 3 years ago
For clarification, this isn't the scenario where the dashboard isn't the current tab so the timer's been carrying on unattended and giving you a garbage value when you return.
In this scenario, the dashboard has been the active tab all along, the timer becomes hidden and the loading icon is present permanently instead.
Call $('#dashboardLiveTimer').timer('reset');
within a .always(function(){})
on the promise returned by $.get()
?
i.e.
$.get("/en_GB/dashboard/index/live", function(data) {
$('#homeDashboard').html(data);
}).always(function(){
$('#dashboardLiveLoading').hide();
$('#dashboardLiveTimer').parent().show();
$('#dashboardLiveTimer').timer('reset');
});
I have this issue too. It happens about 30% of the time.
Should be fixed
Occasionally the dashboard timer will get stuck & forces you to manually refresh the page.
It looks like the code to reset the timer is only called if there's a successful get() request from
dashboard/index/live
:I think that if the get() doesn't return data, the timer reset is not getting called.
Looks like it needs an action to reset the timer in case of a failure or timeout.