MCPcopy
hub / github.com/mayswind/AriaNg / refreshGlobalStat

Function refreshGlobalStat

src/scripts/controllers/main.js:27–43  ·  view source on GitHub ↗
(silent, callback)

Source from the content-addressed store, hash-verified

25 };
26
27 var refreshGlobalStat = function (silent, callback) {
28 return aria2SettingService.getGlobalStat(function (response) {
29 if (!response.success && response.data.message === aria2RpcErrors.Unauthorized.message) {
30 $interval.cancel(globalStatRefreshPromise);
31 return;
32 }
33
34 if (response.success) {
35 $scope.globalStat = response.data;
36 ariaNgMonitorService.recordGlobalStat(response.data);
37 }
38
39 if (callback) {
40 callback(response);
41 }
42 }, silent);
43 };
44
45 var getCurrentRPCProfile = function () {
46 if (!$scope.rpcSettings || $scope.rpcSettings.length < 1) {

Callers 2

main.jsFile · 0.85
removeTasksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected