Job details

https://trello.com/c/i4MeikiL/266-unable-to-select-play-after-job-completes

When play button clicked to resume live event processing an additional draw loop (setInterval) was being started. Multiple draw loops might be running at the end of the job, and only the most one was gettings stopped. The others kept running. User would click a play, the screen would be repainted one or more times by the remaining draw loops, seleting the first play and irst task in the list regardless of the user selection. Fixed by always checking for and killing the current draw loop before starting a new one.
This commit is contained in:
Chris Houseknecht 2014-08-13 16:26:54 -04:00
parent d967cdc244
commit 14aa9e4004

View File

@ -169,6 +169,9 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar
}
else {
api_complete = true; //trigger events to start processing
if ($rootScope.jobDetailInterval) {
window.clearInterval($rootScope.jobDetailInterval);
}
$rootScope.jobDetailInterval = setInterval(function() {
UpdateDOM({ scope: scope });
}, 2000);