Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mircea Danila Dumitrescu committed May 16, 2014
1 parent 4e5875f commit 9deeb02
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions bin/databases-config.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
16 changes: 9 additions & 7 deletions bin/webServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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;
}
Expand All @@ -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);
});
}());

14 changes: 7 additions & 7 deletions public/js/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -415,7 +415,6 @@ function RealTimeAggregations() {
.datum(chartData)
.transition().duration(1)
.call(chart);

chart.update();
});

Expand Down Expand Up @@ -728,7 +727,7 @@ function RealTimeAggregations() {
* test
*/
this.test = function () {
_this.setAggType('type1');
_this.setAggType('t1');
_this.setChartAnchor('stack-charts');
_this.init();
};
Expand Down Expand Up @@ -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();
}

0 comments on commit 9deeb02

Please sign in to comment.