3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 20:39:25 +01:00

stats on web

This commit is contained in:
reality 2013-04-16 18:59:29 +00:00
parent 9b3e3ec48e
commit e7540a3507
2 changed files with 18 additions and 1 deletions

View File

@ -3,7 +3,15 @@ var _ = require('underscore')._;
var pages = function(dbot) {
return {
'/imgur/random': function(req, res) {
res.render('imgurr', {
res.render('imgurr', { });
},
'/imgur/stats': function(req, res) {
res.render('imgurstats', {
'name': dbot.config.name,
'totalHttpRequests': this.db.totalHttpRequests,
'totalApiRequests': this.db.totalApiRequests,
'totalImages': this.db.totalImages
});
}
};

View File

@ -0,0 +1,9 @@
extends ../layout
block content
div#http
Total Imgur HTTP requests made: #{totalHttpRequests}
div#api
Total Imgur API requests made: #{totalApiRequests}
div#images
Total Images generated: #{totalImages}