support show error message in task detail page

This commit is contained in:
MaysWind 2016-05-25 22:09:34 +08:00
parent 1b66822f44
commit d901ca123a
4 changed files with 11 additions and 1 deletions

View file

@ -20,7 +20,7 @@
} else if (task.status == 'complete') {
return translateFilter('Completed');
} else if (task.status == 'error') {
return translateFilter('Error Occurred');
return translateFilter('Error Occurred') + (task.errorCode ? ' (' + task.errorCode + ')' : '');
} else if (task.status == 'removed') {
return translateFilter('Removed');
} else {

View file

@ -57,6 +57,7 @@
'File List': 'File List',
'Peers': 'Peers',
'Task Status': 'Task Status',
'Error Description': 'Error Description',
'Health Percent': 'Health Percent',
'Info Hash': 'Info Hash',
'Seeders': 'Seeders',

View file

@ -57,6 +57,7 @@
'File List': '文件列表',
'Peers': '连接状态',
'Task Status': '任务状态',
'Error Description': '错误描述',
'Health Percent': '健康度',
'Info Hash': '特征值',
'Seeders': '种子数',

View file

@ -43,6 +43,14 @@
<span ng-bind="task | taskStatus"></span>
</div>
</div>
<div class="row" ng-if="task.status == 'error' && task.errorMessage">
<div class="setting-key col-sm-4">
<span translate>Error Description</span>
</div>
<div class="setting-value col-sm-8">
<span ng-bind="task.errorMessage"></span>
</div>
</div>
<div class="row">
<div class="setting-key col-sm-4">
<span ng-bind="('Completed Percent' | translate) + (task.status == 'active' && task.bittorrent ? ' (' + ('Health Percent' | translate) + ')' : '')"></span>