Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:baoshan/fairy

  • Loading branch information...
commit 37b79e232fd8b440d850d89419c4138050334560 2 parents 34bc62c + a3a22dc
@baoshan authored
View
1  Makefile
@@ -14,7 +14,6 @@ build:
test:
@rm -f test/workers/*.dmp
@NODE_ENV=test ./node_modules/.bin/mocha --compilers coffee:coffee-script \
- --ui exports \
--reporter $(REPORTER) \
--timeout 0 \
--slow 50000 \
View
0  src/server.coffee → src/web.coffee
File renamed without changes
View
2  src/web/fairy.coffee
@@ -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
2  src/web/fairy.html
@@ -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>
View
2  web/index.js
@@ -1,2 +1,2 @@
-module.exports = require('../lib/server');
+module.exports = require('../lib/web');
Please sign in to comment.
Something went wrong with that request. Please try again.