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

Function refreshSystem

gui/default/syncthing/core/syncthingController.js:640–679  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

638 }
639
640 function refreshSystem() {
641 return $http.get(urlbase + '/system/status').success(function (data) {
642 $scope.myID = data.myID;
643 $scope.system = data;
644
645 if ($scope.reportDataPreviewVersion === '') {
646 $scope.reportDataPreviewVersion = $scope.system.urVersionMax;
647 }
648
649 var listenersFailed = [];
650 var listenersRunning = [];
651 for (var address in data.connectionServiceStatus) {
652 if (data.connectionServiceStatus[address].error) {
653 listenersFailed.push(address + ": " + data.connectionServiceStatus[address].error);
654 } else {
655 listenersRunning.push(address);
656 }
657 }
658 $scope.listenersFailed = listenersFailed;
659 $scope.listenersRunning = listenersRunning;
660 $scope.listenersTotal = $scope.sizeOf(data.connectionServiceStatus);
661
662 var discoveryFailed = [];
663 var discoveryRunning = [];
664 for (var disco in data.discoveryStatus) {
665 if (data.discoveryStatus[disco] && data.discoveryStatus[disco].error) {
666 discoveryFailed.push(disco + ": " + data.discoveryStatus[disco].error);
667 } else {
668 discoveryRunning.push(disco);
669 }
670 }
671 $scope.discoveryFailed = discoveryFailed;
672 $scope.discoveryRunning = discoveryRunning;
673 $scope.discoveryTotal = $scope.sizeOf(data.discoveryStatus);
674
675 refreshNoAuthWarning();
676
677 console.log("refreshSystem", data);
678 }).error($scope.emitHTTPError);
679 }
680
681 $scope.isAuthEnabled = function () {
682 // This function should match IsAuthEnabled() in guiconfiguration.go

Callers 1

Calls 3

refreshNoAuthWarningFunction · 0.85
logMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected