From 712d5bce5bec1cd902de18e16f250a3f5a81c65d Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 20 Dec 2014 20:34:46 -0500 Subject: [PATCH] show 24 hours in traffic graph --- public/src/admin/general/dashboard.js | 6 +++--- src/socket.io/admin.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/src/admin/general/dashboard.js b/public/src/admin/general/dashboard.js index 20bba7d22e..f24bd485a0 100644 --- a/public/src/admin/general/dashboard.js +++ b/public/src/admin/general/dashboard.js @@ -193,7 +193,7 @@ define('admin/general/dashboard', ['semver'], function(semver) { var currentHour = new Date().getHours(), labels = []; - for (var i = currentHour, ii = currentHour - 12; i > ii; i--) { + for (var i = currentHour, ii = currentHour - 24; i > ii; i--) { var hour = i < 0 ? 24 + i : i; labels.push(hour + ':00 '); } @@ -227,7 +227,7 @@ define('admin/general/dashboard', ['semver'], function(semver) { pointStrokeColor: "#fff", pointHighlightFill: "#fff", pointHighlightStroke: "rgba(220,220,220,1)", - data: [0,0,0,0,0,0,0,0,0,0,0,0] + data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] }, { label: "Unique Visitors", @@ -237,7 +237,7 @@ define('admin/general/dashboard', ['semver'], function(semver) { pointStrokeColor: "#fff", pointHighlightFill: "#fff", pointHighlightStroke: "rgba(151,187,205,1)", - data: [0,0,0,0,0,0,0,0,0,0,0,0] + data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] } ] }; diff --git a/src/socket.io/admin.js b/src/socket.io/admin.js index fecd4213c4..b659397220 100644 --- a/src/socket.io/admin.js +++ b/src/socket.io/admin.js @@ -189,7 +189,7 @@ SocketAdmin.email.test = function(socket, data, callback) { SocketAdmin.analytics.get = function(socket, data, callback) { data.units = 'hours'; // temp - data.amount = 12; + data.amount = 24; if (data && data.graph && data.units && data.amount) { if (data.graph === 'traffic') {