mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
Don't start a new refresh() loop on each UIOnline (fixes #1143)
Separate out the stuff that should run on each UIOnline from the stuff that should only run on init.
This commit is contained in:
parent
bf2e4a561a
commit
e4658bb99d
@ -11,27 +11,6 @@ angular.module('syncthing.core')
|
|||||||
|
|
||||||
function initController() {
|
function initController() {
|
||||||
LocaleService.autoConfigLocale();
|
LocaleService.autoConfigLocale();
|
||||||
|
|
||||||
refreshSystem();
|
|
||||||
refreshConfig();
|
|
||||||
refreshConnectionStats();
|
|
||||||
refreshDeviceStats();
|
|
||||||
refreshFolderStats();
|
|
||||||
|
|
||||||
$http.get(urlbase + '/version').success(function (data) {
|
|
||||||
$scope.version = data.version;
|
|
||||||
}).error($scope.emitHTTPError);
|
|
||||||
|
|
||||||
$http.get(urlbase + '/report').success(function (data) {
|
|
||||||
$scope.reportData = data;
|
|
||||||
}).error($scope.emitHTTPError);
|
|
||||||
|
|
||||||
$http.get(urlbase + '/upgrade').success(function (data) {
|
|
||||||
$scope.upgradeInfo = data;
|
|
||||||
}).error(function () {
|
|
||||||
$scope.upgradeInfo = null;
|
|
||||||
});
|
|
||||||
|
|
||||||
setInterval($scope.refresh, 10000);
|
setInterval($scope.refresh, 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +64,27 @@ angular.module('syncthing.core')
|
|||||||
}
|
}
|
||||||
|
|
||||||
console.log('UIOnline');
|
console.log('UIOnline');
|
||||||
initController();
|
|
||||||
|
refreshSystem();
|
||||||
|
refreshConfig();
|
||||||
|
refreshConnectionStats();
|
||||||
|
refreshDeviceStats();
|
||||||
|
refreshFolderStats();
|
||||||
|
|
||||||
|
$http.get(urlbase + '/version').success(function (data) {
|
||||||
|
$scope.version = data.version;
|
||||||
|
}).error($scope.emitHTTPError);
|
||||||
|
|
||||||
|
$http.get(urlbase + '/report').success(function (data) {
|
||||||
|
$scope.reportData = data;
|
||||||
|
}).error($scope.emitHTTPError);
|
||||||
|
|
||||||
|
$http.get(urlbase + '/upgrade').success(function (data) {
|
||||||
|
$scope.upgradeInfo = data;
|
||||||
|
}).error(function () {
|
||||||
|
$scope.upgradeInfo = null;
|
||||||
|
});
|
||||||
|
|
||||||
online = true;
|
online = true;
|
||||||
restarting = false;
|
restarting = false;
|
||||||
$('#networkError').modal('hide');
|
$('#networkError').modal('hide');
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user