Skip to content

Commit

Permalink
Update ClientMainCtrl.js
Browse files Browse the repository at this point in the history
Added the condition for the initial status of background import (awaiting for import) to start the interval.
  • Loading branch information
ruslanbaidan authored Apr 12, 2023
1 parent 9a78f52 commit 1e6f48a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ClientMainCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
$scope.anrList = $scope.allAnrs.map(x => x['label' + x.language]);
$scope.clientAnrs = data.anrs.filter(anr => anr.rwd >= 0);
$scope.clientCurrentAnr = data.anrs.find(anr => anr.isCurrentAnr);
let isImportingProcess = $scope.clientAnrs.some(anr => anr.status == 3);
let isImportingProcess = $scope.clientAnrs.some(anr => anr.status == 2 || anr.status == 3);

$scope.clientAnrs.sort(function (a, b) {
let anrLabelA = a['label' + a['language']].toLowerCase()
Expand All @@ -267,7 +267,7 @@
if (!angular.isDefined(intervalAnrRefresh) && isImportingProcess) {
intervalAnrRefresh = $interval(function() {
updateMenuANRs()
}, 30000)
}, 20000)
} else if (angular.isDefined(intervalAnrRefresh) && !isImportingProcess) {
$interval.cancel(intervalAnrRefresh);
intervalAnrRefresh = undefined;
Expand Down

0 comments on commit 1e6f48a

Please sign in to comment.