MCPcopy Index your code
hub / github.com/syncthing/syncthing / refreshFolder

Function refreshFolder

gui/default/syncthing/core/syncthingController.js:538–553  ·  view source on GitHub ↗
(folder)

Source from the content-addressed store, hash-verified

536 var debouncedFuncs = {};
537
538 function refreshFolder(folder) {
539 if ($scope.folders[folder].paused) {
540 return;
541 }
542 var key = "refreshFolder" + folder;
543 if (!debouncedFuncs[key]) {
544 debouncedFuncs[key] = debounce(function () {
545 $http.get(urlbase + '/db/status?folder=' + encodeURIComponent(folder)).success(function (data) {
546 $scope.model[folder] = data;
547 recalcLocalStateTotal();
548 console.log("refreshFolder", folder, data);
549 }).error($scope.emitHTTPError);
550 }, 1000);
551 }
552 debouncedFuncs[key]();
553 }
554
555 function updateLocalConfig(config) {
556 var hasConfig = !isEmptyObject($scope.config);

Callers 1

updateLocalConfigFunction · 0.85

Calls 4

debounceFunction · 0.85
recalcLocalStateTotalFunction · 0.85
logMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected