blob: f24583cf872b5ce1f2d0d1a9aee0dd02a77ab1d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
backupApp.controller('ThrottleController', function($scope, AppService, ServerStatus, SystemInfo, AppUtils) {
$scope.speedMultipliers = AppUtils.speedMultipliers;
$scope.selection = $scope.$parent.state.CurrentItem;
AppService.get('/serversettings').then(function(data) {
$scope.selection.uploadspeed = data.data['max-upload-speed'];
$scope.selection.downloadspeed = data.data['max-download-speed'];
$scope.selection.uploadthrottleenabled = ($scope.selection.uploadspeed != '');
$scope.selection.downloadthrottleenabled = ($scope.selection.downloadspeed != '');
// Nicer looking UI
if (!$scope.selection.uploadthrottleenabled)
$scope.selection.uploadspeed = "10MB";
if (!$scope.selection.downloadthrottleenabled)
$scope.selection.downloadspeed = "10MB";
}, AppUtils.connectionError);
});
|