|
@@ -62,7 +62,7 @@ app.all('/search', function (req, res) {
|
|
|
search('sets_statistics');
|
|
|
});
|
|
|
|
|
|
-function query(table, req, res)
|
|
|
+function query(table, req, mysql_query_result, res)
|
|
|
{
|
|
|
var from = new Date(req.body.range.from);
|
|
|
var to = new Date(req.body.range.to);
|
|
@@ -117,13 +117,13 @@ function query(table, req, res)
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-var mysql_query_result = [];
|
|
|
app.all('/query', function (req, res) {
|
|
|
- mysql_query_result = [];
|
|
|
- query('gauges_statistics', req);
|
|
|
- query('counters_statistics', req);
|
|
|
- query('timers_statistics', req);
|
|
|
- query('sets_statistics', req, res);
|
|
|
+ var mysql_query_result = [];
|
|
|
+
|
|
|
+ query('gauges_statistics', req, mysql_query_result);
|
|
|
+ query('counters_statistics', req, mysql_query_result);
|
|
|
+ query('timers_statistics', req, mysql_query_result);
|
|
|
+ query('sets_statistics', req, mysql_query_result, res);
|
|
|
});
|
|
|
|
|
|
app.listen(8000);
|