From 9deeb02de42590f1c3ad94538d2987565413e707 Mon Sep 17 00:00:00 2001 From: Mircea Danila Dumitrescu Date: Fri, 16 May 2014 14:15:49 +0100 Subject: [PATCH] Minor changes --- bin/databases-config.js | 4 ++-- bin/webServer.js | 16 +++++++++------- public/js/analytics.js | 14 +++++++------- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/bin/databases-config.js b/bin/databases-config.js index b031dad..c4684b9 100644 --- a/bin/databases-config.js +++ b/bin/databases-config.js @@ -1,13 +1,13 @@ module.exports = { events: { - "mongo-host": "localhost", + "mongo-host": "192.168.56.101", "mongo-port": 27017, "mongo-database": "events", "mongo-username": null, "mongo-password": null }, aggregations: { - "mongo-host": "localhost", + "mongo-host": "192.168.56.101", "mongo-port": 27017, "mongo-database": "aggregations", "mongo-username": null, diff --git a/bin/webServer.js b/bin/webServer.js index 69bc3f7..0ea3c73 100644 --- a/bin/webServer.js +++ b/bin/webServer.js @@ -12,7 +12,7 @@ app.use("/", express.static('public')); // env app.set('port', process.env.port || port); -app.set('views', path.join(__dirname, '/public/views')); +app.set('views', path.join(__dirname, '/../public/views')); app.set('view engine', 'jade'); app.disable('x-powered-by'); @@ -27,7 +27,8 @@ app.get('/:page', function (req, res) { }); //public dir -fs.readdir("public", function (err, files) { +console.log(__dirname); +fs.readdir(__dirname + "/../public/", function (err, files) { if (err) { throw err; } @@ -36,10 +37,11 @@ fs.readdir("public", function (err, files) { app.use(express.static('public/' + files[i])); } } + (function () { + http.createServer(app).listen(app.get('port'), function (req, res) { + util.log('View server listening on port ' + port); + }); + }()); }); -(function () { - http.createServer(app).listen(app.get('port'), function (req, res) { - util.log('View server listening on port ' + port); - }); -}()); + diff --git a/public/js/analytics.js b/public/js/analytics.js index 55d9848..d77fee7 100644 --- a/public/js/analytics.js +++ b/public/js/analytics.js @@ -331,13 +331,13 @@ function RealTimeEvents() { * test */ this.test = function () { - _this.setEventType('type1'); + _this.setEventType('t1'); _this.setChartAnchor('line-chart'); _this.init(); }; // variables - this.eventType = 'type1'; // event type + this.eventType = 't1'; // event type this.chartAnchor = ''; this.chartData = []; // chartData should be formatted like {x: new Date, y: 130}... this._data = {}; // temporary data dictionary for aggregation @@ -415,7 +415,6 @@ function RealTimeAggregations() { .datum(chartData) .transition().duration(1) .call(chart); - chart.update(); }); @@ -728,7 +727,7 @@ function RealTimeAggregations() { * test */ this.test = function () { - _this.setAggType('type1'); + _this.setAggType('t1'); _this.setChartAnchor('stack-charts'); _this.init(); }; @@ -769,8 +768,9 @@ function RealTimeAggregations() { } function testRealTime() { - var rte = new RealTimeEvents(), - rta = new RealTimeAggregations(); + var rte = new RealTimeEvents(); +//, +// rta = new RealTimeAggregations(); rte.test(); - rta.test(); +// rta.test(); } \ No newline at end of file