support display aria2 status
This commit is contained in:
parent
eac99875d6
commit
84d4743ef0
|
@ -141,6 +141,9 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li data-href-match="/status">
|
||||||
|
<a href="#/status"><i class="fa fa-server"></i> <span translate>Aria2 Status</span></a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</aside>
|
</aside>
|
||||||
|
@ -217,6 +220,7 @@
|
||||||
<script src="scripts/controllers/main.js"></script>
|
<script src="scripts/controllers/main.js"></script>
|
||||||
<script src="scripts/controllers/settings-aria2.js"></script>
|
<script src="scripts/controllers/settings-aria2.js"></script>
|
||||||
<script src="scripts/controllers/settings-ariang.js"></script>
|
<script src="scripts/controllers/settings-ariang.js"></script>
|
||||||
|
<script src="scripts/controllers/status.js"></script>
|
||||||
<script src="scripts/filters/dateDuration.js"></script>
|
<script src="scripts/filters/dateDuration.js"></script>
|
||||||
<script src="scripts/filters/percent.js"></script>
|
<script src="scripts/filters/percent.js"></script>
|
||||||
<script src="scripts/filters/substring.js"></script>
|
<script src="scripts/filters/substring.js"></script>
|
||||||
|
|
13
app/scripts/controllers/status.js
Normal file
13
app/scripts/controllers/status.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
(function () {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
angular.module('ariaNg').controller('Aria2StatusController', ['$scope', 'SweetAlert', 'aria2RpcService', 'ariaNgSettingService', function ($scope, SweetAlert, aria2RpcService, ariaNgSettingService) {
|
||||||
|
$scope.loadPromise = (function () {
|
||||||
|
return aria2RpcService.getVersion({
|
||||||
|
callback: function (result) {
|
||||||
|
$scope.serverStatus = result;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})();
|
||||||
|
}]);
|
||||||
|
})();
|
|
@ -35,6 +35,10 @@
|
||||||
templateUrl: 'views/settings-aria2.html',
|
templateUrl: 'views/settings-aria2.html',
|
||||||
controller: 'Aria2SettingsController'
|
controller: 'Aria2SettingsController'
|
||||||
})
|
})
|
||||||
|
.when('/status', {
|
||||||
|
templateUrl: 'views/status.html',
|
||||||
|
controller: 'Aria2StatusController'
|
||||||
|
})
|
||||||
.otherwise({
|
.otherwise({
|
||||||
redirectTo: '/downloading'
|
redirectTo: '/downloading'
|
||||||
});
|
});
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
'BitTorrent Settings': 'BitTorrent Settings',
|
'BitTorrent Settings': 'BitTorrent Settings',
|
||||||
'RPC Settings': 'RPC Settings',
|
'RPC Settings': 'RPC Settings',
|
||||||
'Advanced Settings': 'Advanced Settings',
|
'Advanced Settings': 'Advanced Settings',
|
||||||
|
'Aria2 Status': 'Aria2 Status',
|
||||||
'File Name': 'File Name',
|
'File Name': 'File Name',
|
||||||
'File Size': 'File Size',
|
'File Size': 'File Size',
|
||||||
'Completed Percent': 'Percent',
|
'Completed Percent': 'Percent',
|
||||||
|
@ -38,6 +39,8 @@
|
||||||
'Aria2 RPC Protocol': 'Aria2 RPC Protocol',
|
'Aria2 RPC Protocol': 'Aria2 RPC Protocol',
|
||||||
'Global Stat Refresh Interval': 'Global Stat Refresh Interval',
|
'Global Stat Refresh Interval': 'Global Stat Refresh Interval',
|
||||||
'Download Task Refresh Interval': 'Download Task Refresh Interval',
|
'Download Task Refresh Interval': 'Download Task Refresh Interval',
|
||||||
|
'Aria2 Version': 'Aria2 Version',
|
||||||
|
'Enabled Features': 'Enabled Features',
|
||||||
'Toggle Navigation': 'Toggle Navigation',
|
'Toggle Navigation': 'Toggle Navigation',
|
||||||
'Loading': 'Loading...',
|
'Loading': 'Loading...',
|
||||||
'More Than One Day': 'More than 1 day',
|
'More Than One Day': 'More than 1 day',
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
'BitTorrent Settings': 'BitTorrent 设置',
|
'BitTorrent Settings': 'BitTorrent 设置',
|
||||||
'RPC Settings': 'RPC 设置',
|
'RPC Settings': 'RPC 设置',
|
||||||
'Advanced Settings': '高级设置',
|
'Advanced Settings': '高级设置',
|
||||||
|
'Aria2 Status': 'Aria2 状态',
|
||||||
'File Name': '文件名',
|
'File Name': '文件名',
|
||||||
'File Size': '大小',
|
'File Size': '大小',
|
||||||
'Completed Percent': '进度',
|
'Completed Percent': '进度',
|
||||||
|
@ -38,6 +39,8 @@
|
||||||
'Aria2 RPC Protocol': 'Aria2 RPC 协议',
|
'Aria2 RPC Protocol': 'Aria2 RPC 协议',
|
||||||
'Global Stat Refresh Interval': '全局状态刷新间隔',
|
'Global Stat Refresh Interval': '全局状态刷新间隔',
|
||||||
'Download Task Refresh Interval': '下载任务刷新间隔',
|
'Download Task Refresh Interval': '下载任务刷新间隔',
|
||||||
|
'Aria2 Version': 'Aria2 版本',
|
||||||
|
'Enabled Features': '已启用的功能',
|
||||||
'Toggle Navigation': '切换导航',
|
'Toggle Navigation': '切换导航',
|
||||||
'Loading': '正在加载...',
|
'Loading': '正在加载...',
|
||||||
'More Than One Day': '超过1天',
|
'More Than One Day': '超过1天',
|
||||||
|
|
|
@ -357,6 +357,10 @@ td {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.settings-table .wholeline {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
.settings-table .tip {
|
.settings-table .tip {
|
||||||
background-color: #fff !important;
|
background-color: #fff !important;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
@ -367,6 +371,14 @@ td {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
|
.settings-table .setting-key {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-table .status-key {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.settings-table .description {
|
.settings-table .description {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
20
app/views/status.html
Normal file
20
app/views/status.html
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<section class="content no-padding">
|
||||||
|
<div class="settings-table">
|
||||||
|
<div class="row">
|
||||||
|
<div class="status-key col-sm-4">
|
||||||
|
<span translate>Aria2 Version</span>
|
||||||
|
</div>
|
||||||
|
<div class="status-value col-sm-8">
|
||||||
|
<span ng-bind="serverStatus.version"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="status-key col-sm-4">
|
||||||
|
<span translate>Enabled Features</span>
|
||||||
|
</div>
|
||||||
|
<div class="status-value col-sm-8">
|
||||||
|
<span class="wholeline" ng-repeat="feature in serverStatus.enabledFeatures" ng-bind="feature"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
Reference in a new issue