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') { } else if (task.status == 'complete') {
return translateFilter('Completed'); return translateFilter('Completed');
} else if (task.status == 'error') { } else if (task.status == 'error') {
return translateFilter('Error Occurred'); return translateFilter('Error Occurred') + (task.errorCode ? ' (' + task.errorCode + ')' : '');
} else if (task.status == 'removed') { } else if (task.status == 'removed') {
return translateFilter('Removed'); return translateFilter('Removed');
} else { } else {

View file

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

View file

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

View file

@ -43,6 +43,14 @@
<span ng-bind="task | taskStatus"></span> <span ng-bind="task | taskStatus"></span>
</div> </div>
</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="row">
<div class="setting-key col-sm-4"> <div class="setting-key col-sm-4">
<span ng-bind="('Completed Percent' | translate) + (task.status == 'active' && task.bittorrent ? ' (' + ('Health Percent' | translate) + ')' : '')"></span> <span ng-bind="('Completed Percent' | translate) + (task.status == 'active' && task.bittorrent ? ' (' + ('Health Percent' | translate) + ')' : '')"></span>