change file name
This commit is contained in:
parent
2004ec6c9b
commit
1db9e2d352
|
@ -284,7 +284,7 @@
|
||||||
<script src="scripts/filters/volumn.js"></script>
|
<script src="scripts/filters/volumn.js"></script>
|
||||||
<script src="scripts/services/ariaNgCommonService.js"></script>
|
<script src="scripts/services/ariaNgCommonService.js"></script>
|
||||||
<script src="scripts/services/ariaNgSettingService.js"></script>
|
<script src="scripts/services/ariaNgSettingService.js"></script>
|
||||||
<script src="scripts/services/ariaNgTaskService.js"></script>
|
<script src="scripts/services/aria2TaskService.js"></script>
|
||||||
<script src="scripts/services/aria2SettingService.js"></script>
|
<script src="scripts/services/aria2SettingService.js"></script>
|
||||||
<script src="scripts/services/aria2RpcService.js"></script>
|
<script src="scripts/services/aria2RpcService.js"></script>
|
||||||
<script src="scripts/services/aria2HttpRpcService.js"></script>
|
<script src="scripts/services/aria2HttpRpcService.js"></script>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('ariaNg').controller('DownloadListController', ['$rootScope', '$scope', '$window', '$location', '$route', '$interval', 'dragulaService', 'ariaNgCommonService', 'ariaNgSettingService', 'ariaNgTaskService', function ($rootScope, $scope, $window, $location, $route, $interval, dragulaService, ariaNgCommonService, ariaNgSettingService, ariaNgTaskService) {
|
angular.module('ariaNg').controller('DownloadListController', ['$rootScope', '$scope', '$window', '$location', '$route', '$interval', 'dragulaService', 'ariaNgCommonService', 'ariaNgSettingService', 'aria2TaskService', function ($rootScope, $scope, $window, $location, $route, $interval, dragulaService, ariaNgCommonService, ariaNgSettingService, aria2TaskService) {
|
||||||
var location = $location.path().substring(1);
|
var location = $location.path().substring(1);
|
||||||
var downloadTaskRefreshPromise = null;
|
var downloadTaskRefreshPromise = null;
|
||||||
var pauseDownloadTaskRefresh = false;
|
var pauseDownloadTaskRefresh = false;
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ariaNgTaskService.getTaskList(location, needRequestWholeInfo, function (result) {
|
return aria2TaskService.getTaskList(location, needRequestWholeInfo, function (result) {
|
||||||
if (!ariaNgCommonService.extendArray(result, $rootScope.taskContext.list, 'gid')) {
|
if (!ariaNgCommonService.extendArray(result, $rootScope.taskContext.list, 'gid')) {
|
||||||
if (needRequestWholeInfo) {
|
if (needRequestWholeInfo) {
|
||||||
$rootScope.taskContext.list = result;
|
$rootScope.taskContext.list = result;
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($rootScope.taskContext.list) {
|
if ($rootScope.taskContext.list) {
|
||||||
ariaNgTaskService.processDownloadTasks($rootScope.taskContext.list);
|
aria2TaskService.processDownloadTasks($rootScope.taskContext.list);
|
||||||
$rootScope.taskContext.enableSelectAll = $rootScope.taskContext.list.length > 1;
|
$rootScope.taskContext.enableSelectAll = $rootScope.taskContext.list.length > 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
pauseDownloadTaskRefresh = true;
|
pauseDownloadTaskRefresh = true;
|
||||||
|
|
||||||
ariaNgTaskService.changeTaskPosition(gid, index, function (result) {
|
aria2TaskService.changeTaskPosition(gid, index, function (result) {
|
||||||
pauseDownloadTaskRefresh = false;
|
pauseDownloadTaskRefresh = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('ariaNg').controller('MainController', ['$rootScope', '$scope', '$route', '$interval', 'aria2SettingService', 'ariaNgCommonService', 'ariaNgTaskService', 'ariaNgSettingService', function ($rootScope, $scope, $route, $interval, aria2SettingService, ariaNgCommonService, ariaNgTaskService, ariaNgSettingService) {
|
angular.module('ariaNg').controller('MainController', ['$rootScope', '$scope', '$route', '$interval', 'ariaNgCommonService', 'ariaNgSettingService', 'aria2TaskService', 'aria2SettingService', function ($rootScope, $scope, $route, $interval, ariaNgCommonService, ariaNgSettingService, aria2TaskService, aria2SettingService) {
|
||||||
var globalStatRefreshPromise = null;
|
var globalStatRefreshPromise = null;
|
||||||
|
|
||||||
var refreshGlobalStat = function () {
|
var refreshGlobalStat = function () {
|
||||||
|
@ -40,9 +40,9 @@
|
||||||
var invoke = null;
|
var invoke = null;
|
||||||
|
|
||||||
if (state == 'start') {
|
if (state == 'start') {
|
||||||
invoke = ariaNgTaskService.startTasks;
|
invoke = aria2TaskService.startTasks;
|
||||||
} else if (state == 'pause') {
|
} else if (state == 'pause') {
|
||||||
invoke = ariaNgTaskService.pauseTasks;
|
invoke = aria2TaskService.pauseTasks;
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('ariaNg').controller('TaskDetailController', ['$rootScope', '$scope', '$routeParams', '$interval', 'ariaNgCommonService', 'ariaNgSettingService', 'ariaNgTaskService', function ($rootScope, $scope, $routeParams, $interval, ariaNgCommonService, ariaNgSettingService, ariaNgTaskService) {
|
angular.module('ariaNg').controller('TaskDetailController', ['$rootScope', '$scope', '$routeParams', '$interval', 'ariaNgCommonService', 'ariaNgSettingService', 'aria2TaskService', function ($rootScope, $scope, $routeParams, $interval, ariaNgCommonService, ariaNgSettingService, aria2TaskService) {
|
||||||
var tabOrders = ['overview', 'blocks', 'filelist', 'btpeers'];
|
var tabOrders = ['overview', 'blocks', 'filelist', 'btpeers'];
|
||||||
var downloadTaskRefreshPromise = null;
|
var downloadTaskRefreshPromise = null;
|
||||||
|
|
||||||
|
@ -12,17 +12,17 @@
|
||||||
$scope.healthPercent = 0;
|
$scope.healthPercent = 0;
|
||||||
|
|
||||||
var refreshBtPeers = function (task) {
|
var refreshBtPeers = function (task) {
|
||||||
return ariaNgTaskService.getBtTaskPeers(task.gid, function (result) {
|
return aria2TaskService.getBtTaskPeers(task.gid, function (result) {
|
||||||
if (!ariaNgCommonService.extendArray(result, $scope.peers, 'peerId')) {
|
if (!ariaNgCommonService.extendArray(result, $scope.peers, 'peerId')) {
|
||||||
$scope.peers = result;
|
$scope.peers = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.healthPercent = ariaNgTaskService.estimateHealthPercentFromPeers(task, $scope.peers);
|
$scope.healthPercent = aria2TaskService.estimateHealthPercentFromPeers(task, $scope.peers);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var refreshDownloadTask = function () {
|
var refreshDownloadTask = function () {
|
||||||
return ariaNgTaskService.getTaskStatus($routeParams.gid, function (result) {
|
return aria2TaskService.getTaskStatus($routeParams.gid, function (result) {
|
||||||
if (result.status == 'active' && result.bittorrent) {
|
if (result.status == 'active' && result.bittorrent) {
|
||||||
refreshBtPeers(result);
|
refreshBtPeers(result);
|
||||||
} else {
|
} else {
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.loadTaskOption = function (task) {
|
$scope.loadTaskOption = function (task) {
|
||||||
$rootScope.loadPromise = ariaNgTaskService.getTaskOption(task.gid, function (result) {
|
$rootScope.loadPromise = aria2TaskService.getTaskOption(task.gid, function (result) {
|
||||||
$scope.options = result;
|
$scope.options = result;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('ariaNg').factory('ariaNgTaskService', ['$translate', 'aria2RpcService', function ($translate, aria2RpcService) {
|
angular.module('ariaNg').factory('aria2TaskService', ['$translate', 'aria2RpcService', function ($translate, aria2RpcService) {
|
||||||
var getFileNameFromPath = function (path) {
|
var getFileNameFromPath = function (path) {
|
||||||
if (!path) {
|
if (!path) {
|
||||||
return path;
|
return path;
|
Reference in a new issue