Permalink
Browse files

update

  • Loading branch information...
1 parent f9d3a49 commit 217629d1523aec3824ef595a59416528b8d22ce2 Wang Ling committed May 22, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/web/fairy.coffee
  2. +1 −1 src/web/fairy.html
View
@@ -12,7 +12,7 @@ statistics_template = [
'</tbody>',
'<tfoot>',
'<tr>',
- '<td>Total</td><td><%= _.reduce(data, function(memo, item){ return memo + Number(item.workers); }, 0)%></td><td><%= _.reduce(data, function(memo, item){ return memo + Number(item.average_pending_time); }, 0)%></td><td><span><%= _.reduce(data, function(memo, item){ return memo + Number(item.total.tasks); }, 0)%></span><span>/</span><span><%= _.reduce(data, function(memo, item){ return memo + Number(item.total.groups); }, 0) %></span></td><td><%= _.reduce(data, function(memo, item){ return memo + Number(item.finished_tasks); }, 0)%></td><td><%= _.reduce(data, function(memo, item){ return memo + Number(item.processing_tasks); }, 0)%></td><td><%= _.reduce(data, function(memo, item){ return memo + Number(item.pending_tasks); }, 0)%></td><td><%= _.reduce(data, function(memo, item){ return memo + Number(item.failed_tasks); }, 0)%></td><td><span><%= _.reduce(data, function(memo, item){ return memo + Number(item.blocked.tasks); }, 0)%></span><span>/</span><span><%= _.reduce(data, function(memo, item){ return memo + Number(item.blocked.groups); }, 0)%></span></td><td>&nbsp;</td><td>&nbsp;</td>',
+ '<td>Total</td><td><%= _.reduce(data, function(memo, item){ return memo + Number(item.workers); }, 0)%></td><td>-</td><td><span><%= _.reduce(data, function(memo, item){ return memo + Number(item.total.tasks); }, 0)%></span><span>/</span><span><%= _.reduce(data, function(memo, item){ return memo + Number(item.total.groups); }, 0) %></span></td><td><%= _.reduce(data, function(memo, item){ return memo + Number(item.finished_tasks); }, 0)%></td><td><%= _.reduce(data, function(memo, item){ return memo + Number(item.processing_tasks); }, 0)%></td><td><%= _.reduce(data, function(memo, item){ return memo + Number(item.pending_tasks); }, 0)%></td><td><%= _.reduce(data, function(memo, item){ return memo + Number(item.failed_tasks); }, 0)%></td><td><span><%= _.reduce(data, function(memo, item){ return memo + Number(item.blocked.tasks); }, 0)%></span><span>/</span><span><%= _.reduce(data, function(memo, item){ return memo + Number(item.blocked.groups); }, 0)%></span></td><td>&nbsp;</td><td>&nbsp;</td>',
'</tr>',
'</tfoot>',
'</table>'
View
@@ -79,7 +79,7 @@
<tr><th>Total</td><th><%= statistics.finished_tasks %></td></tr>
<tr><th>Avg. Waiting In</th><td><%= statistics.average_pending_time %></td></tr>
<tr><th>Avg. Processing In</th><td><%= statistics.average_process_time %></td></tr>
- <tr><th>Avg. Finished In</th><td><%= (Number(statistics.average_pending_time)+Number(statistics.average_process_time)).toFixed(2)%></td></tr>
+ <tr><th>Avg. Finished In</th><td><%= (Number(statistics.average_pending_time)+Number(statistics.average_process_time))?(Number(statistics.average_pending_time)+Number(statistics.average_process_time)).toFixed(2):'-'%></td></tr>
</table>
</script>

0 comments on commit 217629d

Please sign in to comment.