Browse Source

Handle UI in restart/shutdown

Jakob Borg 11 years ago
parent
commit
51e9839237
2 changed files with 5 additions and 2 deletions
  1. 0 0
      auto/gui.files.go
  2. 5 2
      gui/app.js

File diff suppressed because it is too large
+ 0 - 0
auto/gui.files.go


+ 5 - 2
gui/app.js

@@ -55,10 +55,10 @@ syncthing.controller('EventCtrl', function ($scope, $http) {
             online = false;
         }
         setTimeout(function () {
-            $http.get(urlbase + '/events?since=' + lastID)
+            $http.get(urlbase + '/events?limit=1')
             .success(successFn)
             .error(errorFn);
-        }, 500);
+        }, 1000);
     };
 
     $http.get(urlbase + '/events?limit=1')
@@ -118,13 +118,16 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $loca
     }
 
     $scope.$on('UIOnline', function (event, arg) {
+        console.log('UIOnline');
         $scope.init();
+        restarting = false;
         $('#networkError').modal('hide');
         $('#restarting').modal('hide');
         $('#shutdown').modal('hide');
     });
 
     $scope.$on('UIOffline', function (event, arg) {
+        console.log('UIOffline');
         if (!restarting) {
             $('#networkError').modal({backdrop: 'static', keyboard: false});
         }

Some files were not shown because too many files changed in this diff