mirror of
https://github.com/bitinflow/server.git
synced 2026-03-13 21:45:54 +00:00
remove request count on homepage
This commit is contained in:
@@ -49,12 +49,6 @@ function maybe_bounce(req, res, bounce) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
++stats.requests;
|
|
||||||
|
|
||||||
res.once('close', function() {
|
|
||||||
--stats.requests;
|
|
||||||
});
|
|
||||||
|
|
||||||
// get client port
|
// get client port
|
||||||
client.next_socket(function(socket, done) {
|
client.next_socket(function(socket, done) {
|
||||||
// happens when client upstream is disconnected
|
// happens when client upstream is disconnected
|
||||||
|
|||||||
@@ -1,16 +1,6 @@
|
|||||||
var eio = require('engine.io-client');
|
var eio = require('engine.io-client');
|
||||||
var flipCounter = require('flip-counter');
|
var flipCounter = require('flip-counter');
|
||||||
|
|
||||||
var request_counter = new flipCounter('request-count', {
|
|
||||||
value: 0,
|
|
||||||
pace: 10,
|
|
||||||
fW: 30,
|
|
||||||
tFH: 20,
|
|
||||||
bFH: 40,
|
|
||||||
bOffset: 200,
|
|
||||||
auto: false
|
|
||||||
});
|
|
||||||
|
|
||||||
var user_counter = new flipCounter('user-count', {
|
var user_counter = new flipCounter('user-count', {
|
||||||
value: 0,
|
value: 0,
|
||||||
pace: 10,
|
pace: 10,
|
||||||
@@ -26,12 +16,10 @@ socket.on('open', function () {});
|
|||||||
|
|
||||||
socket.on('message', function (data) {
|
socket.on('message', function (data) {
|
||||||
var msg = JSON.parse(data);
|
var msg = JSON.parse(data);
|
||||||
request_counter.incrementTo(msg.requests);
|
|
||||||
user_counter.incrementTo(msg.tunnels);
|
user_counter.incrementTo(msg.tunnels);
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on('close', function () {
|
socket.on('close', function () {
|
||||||
request_counter.incrementTo(0);
|
|
||||||
user_counter.incrementTo(0);
|
user_counter.incrementTo(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -72,12 +72,6 @@ your url is: https://gqgh.localtunnel.me</pre></div>
|
|||||||
<h3>Tunnels</h3>
|
<h3>Tunnels</h3>
|
||||||
<div id="user-count" class="flip-counter"></div>
|
<div id="user-count" class="flip-counter"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="half">
|
|
||||||
<h3>Requests</h3>
|
|
||||||
<div id="request-count" class="flip-counter"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>other cool stuff</h2>
|
<h2>other cool stuff</h2>
|
||||||
|
|||||||
Reference in New Issue
Block a user