show 24 hours in traffic graph

v1.18.x
barisusakli 10 years ago
parent 94cf29d42c
commit 712d5bce5b

@ -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]
}
]
};

@ -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') {

Loading…
Cancel
Save