Add Rescan button to repositories

This commit is contained in:
Jakob Borg
2014-08-15 12:48:36 +02:00
parent 32a9466277
commit 50f0097843
4 changed files with 10 additions and 8 deletions

View File

@@ -755,8 +755,6 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $loca
cfg.APIKey = randomString(30, 32);
};
$scope.acceptUR = function () {
$scope.config.Options.URAccepted = 1000; // Larger than the largest existing report version
$scope.saveConfig();
@@ -794,9 +792,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $loca
};
$scope.override = function (repo) {
$http.post(urlbase + "/model/override?repo=" + encodeURIComponent(repo)).success(function () {
$scope.refresh();
});
$http.post(urlbase + "/model/override?repo=" + encodeURIComponent(repo));
};
$scope.about = function () {
@@ -807,6 +803,10 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $loca
$scope.reportPreview = true;
};
$scope.rescanRepo = function (repo) {
$http.post(urlbase + "/scan?repo=" + encodeURIComponent(repo));
};
$scope.init();
setInterval($scope.refresh, 10000);
});