(silent, callback)
| 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) { |
no outgoing calls
no test coverage detected