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:
parent
9b3e3ec48e
commit
e7540a3507
@ -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
|
||||
});
|
||||
}
|
||||
};
|
||||
|
9
views/imgur/imgurstats.jade
Normal file
9
views/imgur/imgurstats.jade
Normal 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}
|
Loading…
Reference in New Issue
Block a user